summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-15 12:52:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 14:52:46 -0800
commita09c2333260687b750082ba69873d242e4b9f7a6 (patch)
treeb9579389c02cc6c157ccb19fc5391912a95dd04e /sound
parente1f2c1786c1ff105b75566cf1a5b60fe11939924 (diff)
ASoC: mioa701_wm9713: Fix speaker event
commit 7331ea474e9e7a348541c207bdb6aa518c6403f4 upstream. Commit f6b2a04590bb ("ASoC: pxa: mioa701_wm9713: Convert to table based DAPM setup") converted the driver to register the board level DAPM elements with the card's DAPM context rather than the CODEC's DAPM context. The change overlooked that the speaker widget event callback accesses the widget's codec field which is only valid if the widget has been registered in a CODEC DAPM context. This patch modifies the callback to take an alternative route to get the CODEC. Fixes: f6b2a04590bb ("ASoC: pxa: mioa701_wm9713: Convert to table based DAPM setup") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/pxa/mioa701_wm9713.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index 595eee341e90..a08a877fc10c 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -81,7 +81,7 @@ static int rear_amp_power(struct snd_soc_codec *codec, int power)
static int rear_amp_event(struct snd_soc_dapm_widget *widget,
struct snd_kcontrol *kctl, int event)
{
- struct snd_soc_codec *codec = widget->codec;
+ struct snd_soc_codec *codec = widget->dapm->card->rtd[0].codec;
return rear_amp_power(codec, SND_SOC_DAPM_EVENT_ON(event));
}