ASoC: rockchip-max98090: Fix jack detection and event reporting.
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Mon, 9 May 2016 10:46:33 +0000 (12:46 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 30 May 2016 15:19:41 +0000 (16:19 +0100)
Physically there is a jackset which includes a Headphone and a Jackset
Mic pin. The patch add thw two pins with the correct pin name so the
DAPM management can find the pin and make the jack detection and event
reporting work again.

The patch also shut up the following error:

 rockchip-snd-max98090 sound: ASoC: DAPM unknown pin Headset Jack

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_max98090.c

index 3da7891b7dfbf3c5030c9a4ec655bb742dec0916..e70ffad07184fafa3584c2f7ee18a883baa386fb 100644 (file)
 #define DRV_NAME "rockchip-snd-max98090"
 
 static struct snd_soc_jack headset_jack;
+
+/* Headset jack detection DAPM pins */
 static struct snd_soc_jack_pin headset_jack_pins[] = {
        {
-               .pin = "Headset Jack",
-               .mask = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE |
-                       SND_JACK_BTN_0 | SND_JACK_BTN_1 |
-                       SND_JACK_BTN_2 | SND_JACK_BTN_3,
+               .pin = "Headphone",
+               .mask = SND_JACK_HEADPHONE,
+       },
+       {
+               .pin = "Headset Mic",
+               .mask = SND_JACK_MICROPHONE,
        },
+
 };
 
 static const struct snd_soc_dapm_widget rk_dapm_widgets[] = {