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

index a958937ab405ce0d79e43942942c875ad69f66da..0653aa83c9273ca6afedfb0c9b8271df6cc79746 100644 (file)
@@ -205,16 +205,14 @@ static int wm1133_ev1_init(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_dapm_context *dapm = &codec->dapm;
 
        /* Headphone jack detection */
-       snd_soc_jack_new(codec, "Headphone", SND_JACK_HEADPHONE, &hp_jack);
-       snd_soc_jack_add_pins(&hp_jack, ARRAY_SIZE(hp_jack_pins),
-                             hp_jack_pins);
+       snd_soc_card_jack_new(rtd->card, "Headphone", SND_JACK_HEADPHONE,
+                             &hp_jack, hp_jack_pins, ARRAY_SIZE(hp_jack_pins));
        wm8350_hp_jack_detect(codec, WM8350_JDR, &hp_jack, SND_JACK_HEADPHONE);
 
        /* Microphone jack detection */
-       snd_soc_jack_new(codec, "Microphone",
-                        SND_JACK_MICROPHONE | SND_JACK_BTN_0, &mic_jack);
-       snd_soc_jack_add_pins(&mic_jack, ARRAY_SIZE(mic_jack_pins),
-                             mic_jack_pins);
+       snd_soc_card_jack_new(rtd->card, "Microphone",
+                             SND_JACK_MICROPHONE | SND_JACK_BTN_0, &mic_jack,
+                             mic_jack_pins, ARRAY_SIZE(mic_jack_pins));
        wm8350_mic_jack_detect(codec, &mic_jack, SND_JACK_MICROPHONE,
                               SND_JACK_BTN_0);