[alsa-devel] [PATCH v2 04/12] ASoC: omap-abe-twl6040: Register machine level DMIC DAPM routes with the card

Lars-Peter Clausen lars at metafoo.de
Wed Mar 12 15:27:32 CET 2014


Machine level DAPM widgets and routes should be registered in the card's DAPM
context, rather than in the CODEC's context.

Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>

---
Changes since v1:
	* Only register DMIC DAPM routes with the card, do not join the two routes
	  tables into one.
---
 sound/soc/omap/omap-abe-twl6040.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
index ebb1390..024dafc 100644
--- a/sound/soc/omap/omap-abe-twl6040.c
+++ b/sound/soc/omap/omap-abe-twl6040.c
@@ -203,8 +203,7 @@ static const struct snd_soc_dapm_route dmic_audio_map[] = {
 
 static int omap_abe_dmic_init(struct snd_soc_pcm_runtime *rtd)
 {
-	struct snd_soc_codec *codec = rtd->codec;
-	struct snd_soc_dapm_context *dapm = &codec->dapm;
+	struct snd_soc_dapm_context *dapm = &rtd->card->dapm;
 
 	return snd_soc_dapm_add_routes(dapm, dmic_audio_map,
 				ARRAY_SIZE(dmic_audio_map));
-- 
1.8.0



More information about the Alsa-devel mailing list