diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-03-04 04:33:43 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-04 12:10:47 -0500 |
commit | 783b1e7948010ded40eba784b558d86d72ae2ef4 (patch) | |
tree | e4396d1b230340c33061ea23501a2085f697b11f | |
parent | 00eafe3b1b191c9b2611b74c03e1b573ae257b1e (diff) |
ASoC: tegra_rt5677: Register jacks at the card level
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/tegra/tegra_rt5677.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c index e4cf978a6e3a..68d8b67e79c1 100644 --- a/sound/soc/tegra/tegra_rt5677.c +++ b/sound/soc/tegra/tegra_rt5677.c | |||
@@ -146,10 +146,9 @@ static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd) | |||
146 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 146 | struct snd_soc_dapm_context *dapm = &codec->dapm; |
147 | struct tegra_rt5677 *machine = snd_soc_card_get_drvdata(rtd->card); | 147 | struct tegra_rt5677 *machine = snd_soc_card_get_drvdata(rtd->card); |
148 | 148 | ||
149 | snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, | 149 | snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE, |
150 | &tegra_rt5677_hp_jack); | 150 | &tegra_rt5677_hp_jack, |
151 | snd_soc_jack_add_pins(&tegra_rt5677_hp_jack, 1, | 151 | &tegra_rt5677_hp_jack_pins, 1); |
152 | &tegra_rt5677_hp_jack_pins); | ||
153 | 152 | ||
154 | if (gpio_is_valid(machine->gpio_hp_det)) { | 153 | if (gpio_is_valid(machine->gpio_hp_det)) { |
155 | tegra_rt5677_hp_jack_gpio.gpio = machine->gpio_hp_det; | 154 | tegra_rt5677_hp_jack_gpio.gpio = machine->gpio_hp_det; |
@@ -158,10 +157,9 @@ static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd) | |||
158 | } | 157 | } |
159 | 158 | ||
160 | 159 | ||
161 | snd_soc_jack_new(codec, "Mic Jack", SND_JACK_MICROPHONE, | 160 | snd_soc_card_jack_new(rtd->card, "Mic Jack", SND_JACK_MICROPHONE, |
162 | &tegra_rt5677_mic_jack); | 161 | &tegra_rt5677_mic_jack, |
163 | snd_soc_jack_add_pins(&tegra_rt5677_mic_jack, 1, | 162 | &tegra_rt5677_mic_jack_pins, 1); |
164 | &tegra_rt5677_mic_jack_pins); | ||
165 | 163 | ||
166 | if (gpio_is_valid(machine->gpio_mic_present)) { | 164 | if (gpio_is_valid(machine->gpio_mic_present)) { |
167 | tegra_rt5677_mic_jack_gpio.gpio = machine->gpio_mic_present; | 165 | tegra_rt5677_mic_jack_gpio.gpio = machine->gpio_mic_present; |