Skip to content

Commit ca88eeb

Browse files
TheSmolBoitiwai
authored andcommitted
ALSA: hda/realtek: Enable mute/micmute LEDs on HP Spectre x360 13-aw0xxx
The HP Spectre x360 13-aw0xxx devices use the ALC285 codec with GPIO 0x04 controlling the micmute LED and COEF 0x0b index 8 controlling the mute LED. A quirk was added to make these work as well as a fixup. Signed-off-by: Luka Guzenko <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent de1ccb9 commit ca88eeb

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4646,6 +4646,16 @@ static void alc285_fixup_hp_coef_micmute_led(struct hda_codec *codec,
46464646
}
46474647
}
46484648

4649+
static void alc285_fixup_hp_gpio_micmute_led(struct hda_codec *codec,
4650+
const struct hda_fixup *fix, int action)
4651+
{
4652+
struct alc_spec *spec = codec->spec;
4653+
4654+
if (action == HDA_FIXUP_ACT_PRE_PROBE)
4655+
spec->micmute_led_polarity = 1;
4656+
alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
4657+
}
4658+
46494659
static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
46504660
const struct hda_fixup *fix, int action)
46514661
{
@@ -4667,6 +4677,13 @@ static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
46674677
alc285_fixup_hp_coef_micmute_led(codec, fix, action);
46684678
}
46694679

4680+
static void alc285_fixup_hp_spectre_x360_mute_led(struct hda_codec *codec,
4681+
const struct hda_fixup *fix, int action)
4682+
{
4683+
alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
4684+
alc285_fixup_hp_gpio_micmute_led(codec, fix, action);
4685+
}
4686+
46704687
static void alc236_fixup_hp_mute_led(struct hda_codec *codec,
46714688
const struct hda_fixup *fix, int action)
46724689
{
@@ -7108,6 +7125,7 @@ enum {
71087125
ALC285_FIXUP_ASUS_G533Z_PINS,
71097126
ALC285_FIXUP_HP_GPIO_LED,
71107127
ALC285_FIXUP_HP_MUTE_LED,
7128+
ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
71117129
ALC236_FIXUP_HP_GPIO_LED,
71127130
ALC236_FIXUP_HP_MUTE_LED,
71137131
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
@@ -8488,6 +8506,10 @@ static const struct hda_fixup alc269_fixups[] = {
84888506
.type = HDA_FIXUP_FUNC,
84898507
.v.func = alc285_fixup_hp_mute_led,
84908508
},
8509+
[ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED] = {
8510+
.type = HDA_FIXUP_FUNC,
8511+
.v.func = alc285_fixup_hp_spectre_x360_mute_led,
8512+
},
84918513
[ALC236_FIXUP_HP_GPIO_LED] = {
84928514
.type = HDA_FIXUP_FUNC,
84938515
.v.func = alc236_fixup_hp_gpio_led,
@@ -9330,6 +9352,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
93309352
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
93319353
SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
93329354
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
9355+
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
93339356
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
93349357
SND_PCI_QUIRK(0x103c, 0x8720, "HP EliteBook x360 1040 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
93359358
SND_PCI_QUIRK(0x103c, 0x8724, "HP EliteBook 850 G7", ALC285_FIXUP_HP_GPIO_LED),

0 commit comments

Comments
 (0)