diff mbox

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

Message ID 1394634460-15889-5-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit 7f0af4ae86110c46b43fb57f2e0002aa81ca6a67
Headers show

Commit Message

Lars-Peter Clausen March 12, 2014, 2:27 p.m. UTC
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>

---
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(-)

Comments

Peter Ujfalusi March 13, 2014, 10:06 a.m. UTC | #1
On 03/12/2014 04:27 PM, Lars-Peter Clausen wrote:
> 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>

> 
> ---
> 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));
>
Mark Brown March 13, 2014, 7:10 p.m. UTC | #2
On Wed, Mar 12, 2014 at 03:27:32PM +0100, Lars-Peter Clausen wrote:
> Machine level DAPM widgets and routes should be registered in the card's DAPM
> context, rather than in the CODEC's context.

Applied, thanks.
diff mbox

Patch

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));