Skip to content

Commit

Permalink
ASoC: pxa: Pass correct DAPM context to {corgi,poodle,spitz}_ext_control
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Mar 3, 2014
1 parent 9b87a5b commit e14de47
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions sound/soc/pxa/corgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions sound/soc/pxa/poodle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 1 addition & 2 deletions sound/soc/pxa/spitz.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e14de47

Please sign in to comment.