ASoC: simple-card: Register jacks at the card level
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 4 Mar 2015 09:33:18 +0000 (10:33 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 4 Mar 2015 17:09:51 +0000 (17:09 +0000)
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>
sound/soc/generic/simple-card.c

index f7c6734bd5daee1dafd76ba8b6feafa05b2a6c52..b8ee47b7ba9c0b15330f87098b2b8a74096181da 100644 (file)
@@ -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,
This page took 0.031491 seconds and 5 git commands to generate.