aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-24 09:23:10 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-07 00:30:11 -0500
commitf5556a68da14573d0f4944cdc134034233e96553 (patch)
treeab8814b9144ee024f8d8bb1c8268a12c32851bde
parent35d1c8332485444fa9e04a13148512951169d275 (diff)
ALSA: hda - Add a fixup for HP Folio 13 mute LED
commit 37c367ecdb9a01c9acc980e6e17913570a1788a7 upstream. HP Folio 13 may have a broken BIOS that doesn't set up the mute LED GPIO properly, and the driver guesses it wrongly, too. Add a new fixup entry for setting the GPIO pin statically for this laptop. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70991 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/pci/hda/patch_sigmatel.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 86624ca17ee0..0c521b7752b2 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -98,6 +98,7 @@ enum {
98 STAC_92HD83XXX_HP_LED, 98 STAC_92HD83XXX_HP_LED,
99 STAC_92HD83XXX_HP_INV_LED, 99 STAC_92HD83XXX_HP_INV_LED,
100 STAC_92HD83XXX_HP_MIC_LED, 100 STAC_92HD83XXX_HP_MIC_LED,
101 STAC_HP_LED_GPIO10,
101 STAC_92HD83XXX_HEADSET_JACK, 102 STAC_92HD83XXX_HEADSET_JACK,
102 STAC_92HD83XXX_HP, 103 STAC_92HD83XXX_HP,
103 STAC_HP_ENVY_BASS, 104 STAC_HP_ENVY_BASS,
@@ -2107,6 +2108,17 @@ static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec,
2107 spec->mic_mute_led_gpio = 0x08; /* GPIO3 */ 2108 spec->mic_mute_led_gpio = 0x08; /* GPIO3 */
2108} 2109}
2109 2110
2111static void stac92hd83xxx_fixup_hp_led_gpio10(struct hda_codec *codec,
2112 const struct hda_fixup *fix, int action)
2113{
2114 struct sigmatel_spec *spec = codec->spec;
2115
2116 if (action == HDA_FIXUP_ACT_PRE_PROBE) {
2117 spec->gpio_led = 0x10; /* GPIO4 */
2118 spec->default_polarity = 0;
2119 }
2120}
2121
2110static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec, 2122static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec,
2111 const struct hda_fixup *fix, int action) 2123 const struct hda_fixup *fix, int action)
2112{ 2124{
@@ -2173,6 +2185,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = {
2173 .chained = true, 2185 .chained = true,
2174 .chain_id = STAC_92HD83XXX_HP, 2186 .chain_id = STAC_92HD83XXX_HP,
2175 }, 2187 },
2188 [STAC_HP_LED_GPIO10] = {
2189 .type = HDA_FIXUP_FUNC,
2190 .v.func = stac92hd83xxx_fixup_hp_led_gpio10,
2191 .chained = true,
2192 .chain_id = STAC_92HD83XXX_HP,
2193 },
2176 [STAC_92HD83XXX_HEADSET_JACK] = { 2194 [STAC_92HD83XXX_HEADSET_JACK] = {
2177 .type = HDA_FIXUP_FUNC, 2195 .type = HDA_FIXUP_FUNC,
2178 .v.func = stac92hd83xxx_fixup_headset_jack, 2196 .v.func = stac92hd83xxx_fixup_headset_jack,
@@ -2244,6 +2262,8 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = {
2244 "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD), 2262 "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
2245 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1888, 2263 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1888,
2246 "HP Envy Spectre", STAC_HP_ENVY_BASS), 2264 "HP Envy Spectre", STAC_HP_ENVY_BASS),
2265 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1899,
2266 "HP Folio 13", STAC_HP_LED_GPIO10),
2247 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18df, 2267 SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18df,
2248 "HP Folio", STAC_92HD83XXX_HP_MIC_LED), 2268 "HP Folio", STAC_92HD83XXX_HP_MIC_LED),
2249 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x1900, 2269 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x1900,