Commit 386669fc authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: simple-card: 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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 97093996
......@@ -176,11 +176,11 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
return ret;
if (gpio_is_valid(priv->gpio_hp_det)) {
snd_soc_jack_new(codec->codec, "Headphones", SND_JACK_HEADPHONE,
&simple_card_hp_jack);
snd_soc_jack_add_pins(&simple_card_hp_jack,
ARRAY_SIZE(simple_card_hp_jack_pins),
simple_card_hp_jack_pins);
snd_soc_card_jack_new(rtd->card, "Headphones",
SND_JACK_HEADPHONE,
&simple_card_hp_jack,
simple_card_hp_jack_pins,
ARRAY_SIZE(simple_card_hp_jack_pins));
simple_card_hp_jack_gpio.gpio = priv->gpio_hp_det;
simple_card_hp_jack_gpio.invert = priv->gpio_hp_det_invert;
......@@ -189,11 +189,11 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
}
if (gpio_is_valid(priv->gpio_mic_det)) {
snd_soc_jack_new(codec->codec, "Mic Jack", SND_JACK_MICROPHONE,
&simple_card_mic_jack);
snd_soc_jack_add_pins(&simple_card_mic_jack,
ARRAY_SIZE(simple_card_mic_jack_pins),
simple_card_mic_jack_pins);
snd_soc_card_jack_new(rtd->card, "Mic Jack",
SND_JACK_MICROPHONE,
&simple_card_mic_jack,
simple_card_mic_jack_pins,
ARRAY_SIZE(simple_card_mic_jack_pins));
simple_card_mic_jack_gpio.gpio = priv->gpio_mic_det;
simple_card_mic_jack_gpio.invert = priv->gpio_mic_det_invert;
snd_soc_jack_add_gpios(&simple_card_mic_jack, 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment