Commit 37c367ec authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Add a fixup for HP Folio 13 mute LED

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
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent c60666bd
...@@ -98,6 +98,7 @@ enum { ...@@ -98,6 +98,7 @@ enum {
STAC_92HD83XXX_HP_LED, STAC_92HD83XXX_HP_LED,
STAC_92HD83XXX_HP_INV_LED, STAC_92HD83XXX_HP_INV_LED,
STAC_92HD83XXX_HP_MIC_LED, STAC_92HD83XXX_HP_MIC_LED,
STAC_HP_LED_GPIO10,
STAC_92HD83XXX_HEADSET_JACK, STAC_92HD83XXX_HEADSET_JACK,
STAC_92HD83XXX_HP, STAC_92HD83XXX_HP,
STAC_HP_ENVY_BASS, STAC_HP_ENVY_BASS,
...@@ -2130,6 +2131,17 @@ static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec, ...@@ -2130,6 +2131,17 @@ static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec,
} }
} }
static void stac92hd83xxx_fixup_hp_led_gpio10(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
struct sigmatel_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->gpio_led = 0x10; /* GPIO4 */
spec->default_polarity = 0;
}
}
static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec, static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec,
const struct hda_fixup *fix, int action) const struct hda_fixup *fix, int action)
{ {
...@@ -2624,6 +2636,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = { ...@@ -2624,6 +2636,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = {
.chained = true, .chained = true,
.chain_id = STAC_92HD83XXX_HP, .chain_id = STAC_92HD83XXX_HP,
}, },
[STAC_HP_LED_GPIO10] = {
.type = HDA_FIXUP_FUNC,
.v.func = stac92hd83xxx_fixup_hp_led_gpio10,
.chained = true,
.chain_id = STAC_92HD83XXX_HP,
},
[STAC_92HD83XXX_HEADSET_JACK] = { [STAC_92HD83XXX_HEADSET_JACK] = {
.type = HDA_FIXUP_FUNC, .type = HDA_FIXUP_FUNC,
.v.func = stac92hd83xxx_fixup_headset_jack, .v.func = stac92hd83xxx_fixup_headset_jack,
...@@ -2702,6 +2720,8 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = { ...@@ -2702,6 +2720,8 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = {
"HP", STAC_92HD83XXX_HP_cNB11_INTQUAD), "HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1888, SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1888,
"HP Envy Spectre", STAC_HP_ENVY_BASS), "HP Envy Spectre", STAC_HP_ENVY_BASS),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1899,
"HP Folio 13", STAC_HP_LED_GPIO10),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18df, SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18df,
"HP Folio", STAC_HP_BNB13_EQ), "HP Folio", STAC_HP_BNB13_EQ),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18F8, SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18F8,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment