Skip to content

Commit

Permalink
ASoC: wm1133-ev1: Use card DAPM context to access widgets
Browse files Browse the repository at this point in the history
The dapm field of the snd_soc_codec struct will eventually be removed
(replaced with the DAPM context from the component embedded inside the
CODEC). Replace its usage with the card's DAPM context. The idea is that
DAPM is hierarchical and with the card at the root it is possible to access
widgets from other contexts through the card context.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Apr 12, 2015
1 parent 77c7176 commit 02f5164
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/fsl/wm1133-ev1.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ static struct snd_soc_jack_pin mic_jack_pins[] = {
static int wm1133_ev1_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_codec *codec = rtd->codec;
struct snd_soc_dapm_context *dapm = &codec->dapm;

/* Headphone jack detection */
snd_soc_card_jack_new(rtd->card, "Headphone", SND_JACK_HEADPHONE,
Expand All @@ -216,7 +215,7 @@ static int wm1133_ev1_init(struct snd_soc_pcm_runtime *rtd)
wm8350_mic_jack_detect(codec, &mic_jack, SND_JACK_MICROPHONE,
SND_JACK_BTN_0);

snd_soc_dapm_force_enable_pin(dapm, "Mic Bias");
snd_soc_dapm_force_enable_pin(&rtd->card->dapm, "Mic Bias");

return 0;
}
Expand Down

0 comments on commit 02f5164

Please sign in to comment.