aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2012-10-09 06:48:40 -0400
committerTakashi Iwai <tiwai@suse.de>2012-10-09 08:40:14 -0400
commit8d032a8f653a71e309fc4be28f526a0d2a5bf8f4 (patch)
tree693ff3f0477c0b5ae9fdd66af6cd37bb882bc976 /sound
parent5c2e4e0ab6f3faa5b68ffa68a01b050acccf04ac (diff)
ALSA: hda - remove "Mic Jack Mode" for headset jacks (Latitude Exx30)
Dell Latitude 5x30 and 6x30 series of machines all have a single 4-pin headset jack. Enabling line in mode for such jack is very confusing (you would only get mono input, and would have to use non-standard adapters), so remove the option by default. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_sigmatel.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index fe163547f906..770013ff556f 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -104,6 +104,7 @@ enum {
104 STAC_92HD83XXX_HP_LED, 104 STAC_92HD83XXX_HP_LED,
105 STAC_92HD83XXX_HP_INV_LED, 105 STAC_92HD83XXX_HP_INV_LED,
106 STAC_92HD83XXX_HP_MIC_LED, 106 STAC_92HD83XXX_HP_MIC_LED,
107 STAC_92HD83XXX_HEADSET_JACK,
107 STAC_92HD83XXX_MODELS 108 STAC_92HD83XXX_MODELS
108}; 109};
109 110
@@ -204,6 +205,7 @@ struct sigmatel_spec {
204 unsigned int check_volume_offset:1; 205 unsigned int check_volume_offset:1;
205 unsigned int auto_mic:1; 206 unsigned int auto_mic:1;
206 unsigned int linear_tone_beep:1; 207 unsigned int linear_tone_beep:1;
208 unsigned int headset_jack:1; /* 4-pin headset jack (hp + mono mic) */
207 209
208 /* gpio lines */ 210 /* gpio lines */
209 unsigned int eapd_mask; 211 unsigned int eapd_mask;
@@ -1684,6 +1686,7 @@ static const char * const stac92hd83xxx_models[STAC_92HD83XXX_MODELS] = {
1684 [STAC_92HD83XXX_HP_LED] = "hp-led", 1686 [STAC_92HD83XXX_HP_LED] = "hp-led",
1685 [STAC_92HD83XXX_HP_INV_LED] = "hp-inv-led", 1687 [STAC_92HD83XXX_HP_INV_LED] = "hp-inv-led",
1686 [STAC_92HD83XXX_HP_MIC_LED] = "hp-mic-led", 1688 [STAC_92HD83XXX_HP_MIC_LED] = "hp-mic-led",
1689 [STAC_92HD83XXX_HEADSET_JACK] = "headset-jack",
1687}; 1690};
1688 1691
1689static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = { 1692static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
@@ -1694,6 +1697,24 @@ static const struct snd_pci_quirk stac92hd83xxx_cfg_tbl[] = {
1694 "DFI LanParty", STAC_92HD83XXX_REF), 1697 "DFI LanParty", STAC_92HD83XXX_REF),
1695 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba, 1698 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x02ba,
1696 "unknown Dell", STAC_DELL_S14), 1699 "unknown Dell", STAC_DELL_S14),
1700 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0532,
1701 "Dell Latitude E6230", STAC_92HD83XXX_HEADSET_JACK),
1702 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0533,
1703 "Dell Latitude E6330", STAC_92HD83XXX_HEADSET_JACK),
1704 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0534,
1705 "Dell Latitude E6430", STAC_92HD83XXX_HEADSET_JACK),
1706 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0535,
1707 "Dell Latitude E6530", STAC_92HD83XXX_HEADSET_JACK),
1708 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x053c,
1709 "Dell Latitude E5430", STAC_92HD83XXX_HEADSET_JACK),
1710 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x053d,
1711 "Dell Latitude E5530", STAC_92HD83XXX_HEADSET_JACK),
1712 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0549,
1713 "Dell Latitude E5430", STAC_92HD83XXX_HEADSET_JACK),
1714 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x057d,
1715 "Dell Latitude E6430s", STAC_92HD83XXX_HEADSET_JACK),
1716 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0584,
1717 "Dell Latitude E6430U", STAC_92HD83XXX_HEADSET_JACK),
1697 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x1028, 1718 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x1028,
1698 "Dell Vostro 3500", STAC_DELL_VOSTRO_3500), 1719 "Dell Vostro 3500", STAC_DELL_VOSTRO_3500),
1699 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1656, 1720 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1656,
@@ -2855,6 +2876,9 @@ static inline int stac92xx_add_jack_mode_control(struct hda_codec *codec,
2855 char name[22]; 2876 char name[22];
2856 2877
2857 if (snd_hda_get_input_pin_attr(def_conf) != INPUT_PIN_ATTR_INT) { 2878 if (snd_hda_get_input_pin_attr(def_conf) != INPUT_PIN_ATTR_INT) {
2879 if (spec->headset_jack && snd_hda_get_input_pin_attr(def_conf)
2880 != INPUT_PIN_ATTR_DOCK)
2881 return 0;
2858 if (snd_hda_get_default_vref(codec, nid) == AC_PINCTL_VREF_GRD 2882 if (snd_hda_get_default_vref(codec, nid) == AC_PINCTL_VREF_GRD
2859 && nid == spec->line_switch) 2883 && nid == spec->line_switch)
2860 control = STAC_CTL_WIDGET_IO_SWITCH; 2884 control = STAC_CTL_WIDGET_IO_SWITCH;
@@ -5626,6 +5650,9 @@ again:
5626 case STAC_92HD83XXX_HP_MIC_LED: 5650 case STAC_92HD83XXX_HP_MIC_LED:
5627 spec->mic_mute_led_gpio = 0x08; /* GPIO3 */ 5651 spec->mic_mute_led_gpio = 0x08; /* GPIO3 */
5628 break; 5652 break;
5653 case STAC_92HD83XXX_HEADSET_JACK:
5654 spec->headset_jack = 1;
5655 break;
5629 } 5656 }
5630 5657
5631 if (find_mute_led_cfg(codec, default_polarity)) 5658 if (find_mute_led_cfg(codec, default_polarity))