Merge tag 'sound-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[sfrench/cifs-2.6.git] / sound / soc / intel / boards / kbl_da7219_max98357a.c
index ceabed85e9daab9abf018855836075526dd46321..329457e3e3a22de7550b20813fd91c3d2c71bfc9 100644 (file)
@@ -99,6 +99,17 @@ static const struct snd_soc_dapm_widget kabylake_widgets[] = {
                        SND_SOC_DAPM_POST_PMD),
 };
 
+static struct snd_soc_jack_pin jack_pins[] = {
+       {
+               .pin    = "Headphone Jack",
+               .mask   = SND_JACK_HEADPHONE,
+       },
+       {
+               .pin    = "Headset Mic",
+               .mask   = SND_JACK_MICROPHONE,
+       },
+};
+
 static const struct snd_soc_dapm_route kabylake_map[] = {
        { "Headphone Jack", NULL, "HPL" },
        { "Headphone Jack", NULL, "HPR" },
@@ -179,10 +190,12 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
         * Headset buttons map to the google Reference headset.
         * These can be configured by userspace.
         */
-       ret = snd_soc_card_jack_new(kabylake_audio_card, "Headset Jack",
-                       SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 |
-                       SND_JACK_BTN_2 | SND_JACK_BTN_3 | SND_JACK_LINEOUT,
-                       &ctx->kabylake_headset);
+       ret = snd_soc_card_jack_new_pins(kabylake_audio_card, "Headset Jack",
+                                        SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 |
+                                        SND_JACK_BTN_2 | SND_JACK_BTN_3 | SND_JACK_LINEOUT,
+                                        &ctx->kabylake_headset,
+                                        jack_pins,
+                                        ARRAY_SIZE(jack_pins));
        if (ret) {
                dev_err(rtd->dev, "Headset Jack creation failed: %d\n", ret);
                return ret;