Skip to content

Commit

Permalink
ASoC: mioa701_wm9713: Fix speaker event
Browse files Browse the repository at this point in the history
commit 7331ea4 upstream.

Commit f6b2a04 ("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: f6b2a04 ("ASoC: pxa: mioa701_wm9713: Convert to table based DAPM
setup")
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
larsclausen authored and gregkh committed Mar 6, 2015
1 parent e1f2c17 commit a09c233
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/pxa/mioa701_wm9713.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit a09c233

Please sign in to comment.