ASoC: omap-abe-twl6040: Register machine level DMIC DAPM routes with the card
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 12 Mar 2014 14:27:32 +0000 (15:27 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 13 Mar 2014 19:10:21 +0000 (19:10 +0000)
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@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/omap/omap-abe-twl6040.c

index ebb1390..024dafc 100644 (file)
@@ -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));