aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-04-03 07:04:06 -0400
committerMark Brown <broonie@kernel.org>2015-04-08 16:10:01 -0400
commitc67a443b11d96f35f8514283334c50302253f2b4 (patch)
tree283a8e53768ee86a0ba0e10b4ac4d8c520c6c7be /sound/soc
parent884c0f5b2ad542037b6f04de84a3fd3f82b15828 (diff)
ASoC: tegra_rt5677: Use card DAPM context to access widgets
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>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/tegra/tegra_rt5677.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c
index d082882547dd..1470873ecde6 100644
--- a/sound/soc/tegra/tegra_rt5677.c
+++ b/sound/soc/tegra/tegra_rt5677.c
@@ -141,9 +141,6 @@ static const struct snd_kcontrol_new tegra_rt5677_controls[] = {
141 141
142static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd) 142static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd)
143{ 143{
144 struct snd_soc_dai *codec_dai = rtd->codec_dai;
145 struct snd_soc_codec *codec = codec_dai->codec;
146 struct snd_soc_dapm_context *dapm = &codec->dapm;
147 struct tegra_rt5677 *machine = snd_soc_card_get_drvdata(rtd->card); 144 struct tegra_rt5677 *machine = snd_soc_card_get_drvdata(rtd->card);
148 145
149 snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE, 146 snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE,
@@ -167,7 +164,7 @@ static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd)
167 &tegra_rt5677_mic_jack_gpio); 164 &tegra_rt5677_mic_jack_gpio);
168 } 165 }
169 166
170 snd_soc_dapm_force_enable_pin(dapm, "MICBIAS1"); 167 snd_soc_dapm_force_enable_pin(&rtd->card->dapm, "MICBIAS1");
171 168
172 return 0; 169 return 0;
173} 170}