Skip to content

Commit

Permalink
ASoC: tegra_alc5632: 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 8, 2015
1 parent c77dc2c commit 884c0f5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/tegra/tegra_alc5632.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ static const struct snd_kcontrol_new tegra_alc5632_controls[] = {

static int tegra_alc5632_asoc_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_codec *codec = codec_dai->codec;
struct snd_soc_dapm_context *dapm = &codec->dapm;
struct tegra_alc5632 *machine = snd_soc_card_get_drvdata(rtd->card);

snd_soc_card_jack_new(rtd->card, "Headset Jack", SND_JACK_HEADSET,
Expand All @@ -118,7 +115,7 @@ static int tegra_alc5632_asoc_init(struct snd_soc_pcm_runtime *rtd)
&tegra_alc5632_hp_jack_gpio);
}

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

return 0;
}
Expand Down

0 comments on commit 884c0f5

Please sign in to comment.