| From 79272471bc152ee1b678420e50b00b9a4486609c Mon Sep 17 00:00:00 2001 |
| From: Kai-Heng Feng <kai.heng.feng@canonical.com> |
| Date: Fri, 27 Mar 2020 12:46:25 +0800 |
| Subject: [PATCH] ALSA: hda/realtek: Enable mute LED on an HP system |
| |
| commit f5a88b0accc24c4a9021247d7a3124f90aa4c586 upstream. |
| |
| The system in question uses ALC285, and it uses GPIO 0x04 to control its |
| mute LED. |
| |
| The mic mute LED can be controlled by GPIO 0x01, however the system uses |
| DMIC so we should use that to control mic mute LED. |
| |
| Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> |
| Cc: <stable@vger.kernel.org> |
| Link: https://lore.kernel.org/r/20200327044626.29582-1-kai.heng.feng@canonical.com |
| Signed-off-by: Takashi Iwai <tiwai@suse.de> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
| index 8b1ce86ce810..4eaab47df324 100644 |
| --- a/sound/pci/hda/patch_realtek.c |
| +++ b/sound/pci/hda/patch_realtek.c |
| @@ -4117,6 +4117,12 @@ static void alc269_fixup_hp_gpio_led(struct hda_codec *codec, |
| alc_fixup_hp_gpio_led(codec, action, 0x08, 0x10); |
| } |
| |
| +static void alc285_fixup_hp_gpio_led(struct hda_codec *codec, |
| + const struct hda_fixup *fix, int action) |
| +{ |
| + alc_fixup_hp_gpio_led(codec, action, 0x04, 0x00); |
| +} |
| + |
| static void alc286_fixup_hp_gpio_led(struct hda_codec *codec, |
| const struct hda_fixup *fix, int action) |
| { |
| @@ -5955,6 +5961,7 @@ enum { |
| ALC294_FIXUP_ASUS_DUAL_SPK, |
| ALC285_FIXUP_THINKPAD_HEADSET_JACK, |
| ALC294_FIXUP_ASUS_HPE, |
| + ALC285_FIXUP_HP_GPIO_LED, |
| }; |
| |
| static const struct hda_fixup alc269_fixups[] = { |
| @@ -7071,6 +7078,10 @@ static const struct hda_fixup alc269_fixups[] = { |
| .chained = true, |
| .chain_id = ALC294_FIXUP_ASUS_HEADSET_MIC |
| }, |
| + [ALC285_FIXUP_HP_GPIO_LED] = { |
| + .type = HDA_FIXUP_FUNC, |
| + .v.func = alc285_fixup_hp_gpio_led, |
| + }, |
| }; |
| |
| static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
| @@ -7218,6 +7229,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
| SND_PCI_QUIRK(0x103c, 0x83b9, "HP Spectre x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
| SND_PCI_QUIRK(0x103c, 0x8497, "HP Envy x360", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
| SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3), |
| + SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_LED), |
| SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC), |
| SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300), |
| SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), |
| -- |
| 2.7.4 |
| |