diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-03-04 10:33:18 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-04 17:09:51 +0000 |
commit | 386669fcec85a16cb81cd19236abe76abe0f1fc1 (patch) | |
tree | ca79c091832aa746ab40e7cc552ef7efe5198be9 | |
parent | 970939964c26db4643f58d4e84487821962e0b65 (diff) | |
download | op-kernel-dev-386669fcec85a16cb81cd19236abe76abe0f1fc1.zip op-kernel-dev-386669fcec85a16cb81cd19236abe76abe0f1fc1.tar.gz |
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: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/generic/simple-card.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index f7c6734..b8ee47b 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -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, |