The mute LED is in this case connected to the Mic1 VREF.
The machine also exposes the following string in BIOS: "HP_Mute_LED_0_A", so if more machines are coming, it probably makes sense to try to do something more generic, like for the IDT codec.
Cc: <email address hidden> BugLink: https://bugs.launchpad.net/bugs/1096789 Signed-off-by: David Henningsson <email address hidden> --- sound/pci/hda/patch_realtek.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 6ee3459..71ae23d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -5992,6 +5992,30 @@ static void alc269_fixup_quanta_mute(struct hda_codec *codec, spec->automute_hook = alc269_quanta_automute; }
+/* update mute-LED according to the speaker mute state via mic1 VREF pin */ +static void alc269_fixup_mic1_mute_hook(void *private_data, int enabled) +{ + struct hda_codec *codec = private_data; + unsigned int pinval = AC_PINCTL_IN_EN + (enabled ? + AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80); + snd_hda_set_pin_ctl_cache(codec, 0x18, pinval); +} + +static void alc269_fixup_mic1_mute(struct hda_codec *codec, + const struct alc_fixup *fix, int action) +{ + struct alc_spec *spec = codec->spec; + switch (action) { + case ALC_FIXUP_ACT_BUILD: + spec->vmaster_mute.hook = alc269_fixup_mic1_mute_hook; + snd_hda_add_vmaster_hook(codec, &spec->vmaster_mute, true); + /* fallthru */ + case ALC_FIXUP_ACT_INIT: + snd_hda_sync_vmaster_hook(&spec->vmaster_mute); + break; + } +} + /* update mute-LED according to the speaker mute state via mic2 VREF pin */ static void alc269_fixup_mic2_mute_hook(void *private_data, int enabled) { @@ -6043,6 +6067,7 @@ enum { ALC269_FIXUP_DMIC, ALC269VB_FIXUP_AMIC, ALC269VB_FIXUP_DMIC, + ALC269_FIXUP_MIC1_MUTE_LED, ALC269_FIXUP_MIC2_MUTE_LED, ALC269_FIXUP_INV_DMIC, ALC269_FIXUP_LENOVO_DOCK, @@ -6171,6 +6196,10 @@ static const struct alc_fixup alc269_fixups[] = { { } }, }, + [ALC269_FIXUP_MIC1_MUTE_LED] = { + .type = ALC_FIXUP_FUNC, + .v.func = alc269_fixup_mic1_mute, + }, [ALC269_FIXUP_MIC2_MUTE_LED] = { .type = ALC_FIXUP_FUNC, .v.func = alc269_fixup_mic2_mute, @@ -6215,6 +6244,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_FIXUP_INV_DMIC), SND_PCI_QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_FIXUP_INV_DMIC), SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_MIC2_MUTE_LED), + SND_PCI_QUIRK(0x103c, 0x1972, "HP Pavilion 17", ALC269_FIXUP_MIC1_MUTE_LED), SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_DMIC), SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_DMIC), SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW), -- 1.7.9.5
The mute LED is in this case connected to the Mic1 VREF.
The machine also exposes the following string in BIOS:
"HP_Mute_LED_0_A", so if more machines are coming, it probably
makes sense to try to do something more generic, like for the
IDT codec.
Cc: <email address hidden> /bugs.launchpad .net/bugs/ 1096789 pci/hda/ patch_realtek. c | 30 +++++++ +++++++ +++++++ +++++++ ++
BugLink: https:/
Signed-off-by: David Henningsson <email address hidden>
---
sound/
1 file changed, 30 insertions(+)
diff --git a/sound/ pci/hda/ patch_realtek. c b/sound/ pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c pci/hda/ patch_realtek. c fixup_quanta_ mute(struct hda_codec *codec, >automute_ hook = alc269_ quanta_ automute;
index 6ee3459..71ae23d 100644
--- a/sound/
+++ b/sound/
@@ -5992,6 +5992,30 @@ static void alc269_
spec-
}
+/* update mute-LED according to the speaker mute state via mic1 VREF pin */ fixup_mic1_ mute_hook( void *private_data, int enabled) set_pin_ ctl_cache( codec, 0x18, pinval); fixup_mic1_ mute(struct hda_codec *codec, ACT_BUILD: mute.hook = alc269_ fixup_mic1_ mute_hook; add_vmaster_ hook(codec, &spec-> vmaster_ mute, true); sync_vmaster_ hook(&spec- >vmaster_ mute); fixup_mic2_ mute_hook( void *private_data, int enabled) FIXUP_DMIC, FIXUP_AMIC, FIXUP_DMIC, FIXUP_MIC1_ MUTE_LED, FIXUP_MIC2_ MUTE_LED, FIXUP_INV_ DMIC, FIXUP_LENOVO_ DOCK, FIXUP_MIC1_ MUTE_LED] = { fixup_mic1_ mute, FIXUP_MIC2_ MUTE_LED] = { fixup_mic2_ mute, QUIRK(0x1025, 0x029b, "Acer 1810TZ", ALC269_ FIXUP_INV_ DMIC), QUIRK(0x1025, 0x0349, "Acer AOD260", ALC269_ FIXUP_INV_ DMIC), QUIRK(0x103c, 0x1586, "HP", ALC269_ FIXUP_MIC2_ MUTE_LED) , QUIRK(0x103c, 0x1972, "HP Pavilion 17", ALC269_ FIXUP_MIC1_ MUTE_LED) , QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_ FIXUP_DMIC) , QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_ FIXUP_DMIC) , QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_ FIXUP_ASUS_ G73JW),
+static void alc269_
+{
+ struct hda_codec *codec = private_data;
+ unsigned int pinval = AC_PINCTL_IN_EN + (enabled ?
+ AC_PINCTL_VREF_HIZ : AC_PINCTL_VREF_80);
+ snd_hda_
+}
+
+static void alc269_
+ const struct alc_fixup *fix, int action)
+{
+ struct alc_spec *spec = codec->spec;
+ switch (action) {
+ case ALC_FIXUP_
+ spec->vmaster_
+ snd_hda_
+ /* fallthru */
+ case ALC_FIXUP_ACT_INIT:
+ snd_hda_
+ break;
+ }
+}
+
/* update mute-LED according to the speaker mute state via mic2 VREF pin */
static void alc269_
{
@@ -6043,6 +6067,7 @@ enum {
ALC269_
ALC269VB_
ALC269VB_
+ ALC269_
ALC269_
ALC269_
ALC269_
@@ -6171,6 +6196,10 @@ static const struct alc_fixup alc269_fixups[] = {
{ }
},
},
+ [ALC269_
+ .type = ALC_FIXUP_FUNC,
+ .v.func = alc269_
+ },
[ALC269_
.type = ALC_FIXUP_FUNC,
.v.func = alc269_
@@ -6215,6 +6244,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_
SND_PCI_
SND_PCI_
+ SND_PCI_
SND_PCI_
SND_PCI_
SND_PCI_
--
1.7.9.5