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

index 5001dbb9b257764d9b88427de5bc86bebfba5a7b..1753c7d9e760e4bfa14e5b5ed8844b530e7413cf 100644 (file)
@@ -78,15 +78,12 @@ static int ttc_pm860x_init(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_codec *codec = rtd->codec;
 
        /* Headset jack detection */
-       snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE
-                       | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2,
-                       &hs_jack);
-       snd_soc_jack_add_pins(&hs_jack, ARRAY_SIZE(hs_jack_pins),
-                             hs_jack_pins);
-       snd_soc_jack_new(codec, "Microphone Jack", SND_JACK_MICROPHONE,
-                        &mic_jack);
-       snd_soc_jack_add_pins(&mic_jack, ARRAY_SIZE(mic_jack_pins),
-                             mic_jack_pins);
+       snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE |
+                             SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2,
+                             &hs_jack, hs_jack_pins, ARRAY_SIZE(hs_jack_pins));
+       snd_soc_card_jack_new(rtd->card, "Microphone Jack", SND_JACK_MICROPHONE,
+                             &mic_jack, mic_jack_pins,
+                             ARRAY_SIZE(mic_jack_pins));
 
        /* headphone, microphone detection & headset short detection */
        pm860x_hs_jack_detect(codec, &hs_jack, SND_JACK_HEADPHONE,