[PATCH] ASoC: multi-comp: soc-core: Fix for machine given DAPM widgets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move the DAPM initialization after the machine driver has
finished it's init (dai_link driver).
Since in machine init we can add DAPM widgets we need to
take them into account as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxx>
---

Hello Liam, Mark!

With this patch the machine driver given DAPM routing will be functional
with the multi-comp.
This patch also removes the need to call the snd_soc_dapm_sync from
machine driver's init call, since it will be done by the core.

Please squash this patch to the core changes.

Thanks,
Peter

 sound/soc/soc-core.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a7c9a48..8afa271 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1324,9 +1324,6 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num)
 				return ret;
 			}
 		}
-		/* Make sure all DAPM widgets are instantiated */
-		snd_soc_dapm_new_widgets(codec);
-
 		/* mark codec as probed and add to card codec list */
 		codec->probed = 1;
 		list_add(&codec->card_list, &card->codec_dev_list);
@@ -1375,6 +1372,10 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num)
 		}
 	}
 
+	/* Make sure all DAPM widgets are instantiated */
+	snd_soc_dapm_new_widgets(codec);
+	snd_soc_dapm_sync(codec);
+
 	/* register the rtd device */
 	rtd->dev.init_name = rtd->dai_link->stream_name;
 	rtd->dev.release = rtd_release;
-- 
1.7.2

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux