]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: pxa: Pass correct DAPM context to {corgi,poodle,spitz}_ext_control
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 1 Mar 2014 14:48:13 +0000 (15:48 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 3 Mar 2014 02:01:48 +0000 (11:01 +0900)
When calling {corgi,poodle,spitz}_ext_control() from the startup callback we
pass the CODEC's DAPM context instead of the card's DAPM context. This is not a
problem per se since all the DAPM functions in ext_control() fallback to widgets
from other DAPM contexts, but passing the card's context is more consistent.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/pxa/corgi.c
sound/soc/pxa/poodle.c
sound/soc/pxa/spitz.c

index b51f88002e623bda7e315a456f2604bb44f61e3c..916ff63d85d0d751c351fc40baa1afcc111d6b4c 100644 (file)
@@ -97,10 +97,9 @@ static void corgi_ext_control(struct snd_soc_dapm_context *dapm)
 static int corgi_startup(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_codec *codec = rtd->codec;
 
        /* check the jack status at stream startup */
-       corgi_ext_control(&codec->dapm);
+       corgi_ext_control(&rtd->card->dapm);
 
        return 0;
 }
index 27c6c03bc5d7a9ef2b4ba1f3f75033777f1ecbb9..c6bdc6c0eff6007f1180d3908b3437600fc6446d 100644 (file)
@@ -74,10 +74,9 @@ static void poodle_ext_control(struct snd_soc_dapm_context *dapm)
 static int poodle_startup(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_codec *codec = rtd->codec;
 
        /* check the jack status at stream startup */
-       poodle_ext_control(&codec->dapm);
+       poodle_ext_control(&rtd->card->dapm);
 
        return 0;
 }
index 0728c1eb780cbe053cbda4625877ac84ebfa6d0a..d1b6bf9c85837cca926bbb4552bcd7b705ce7162 100644 (file)
@@ -106,10 +106,9 @@ static void spitz_ext_control(struct snd_soc_dapm_context *dapm)
 static int spitz_startup(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_codec *codec = rtd->codec;
 
        /* check the jack status at stream startup */
-       spitz_ext_control(&codec->dapm);
+       spitz_ext_control(&rtd->card->dapm);
 
        return 0;
 }