All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: Add mic-mute LED quirk for the HP 245 14 inch G10
@ 2026-10-17  9:51 Keane Mbae
  2026-10-18  8:35 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Keane Mbae @ 2026-10-17  9:51 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Jaroslav Kysela, Kailang Yang, Zhang Heng, Eric Naim,
	Damien Dagorn, linux-sound, linux-kernel

The HP 245 14 inch G10 Notebook PC (codec SSID 103c:8ba4, ALC236) is not
listed in alc269_fixup_tbl[], so the codec falls back to the vendor-wide
HP entry (ALC269_FIXUP_HP_MUTE_LED).  That entry only registers a speaker
mute LED (hda::mute); no microphone mute LED class device (hda::micmute)
is created, so muting the microphone never lights the LED on the F8 key.

On this model the microphone mute LED is wired to COEF 0x35 bits 2-3 (the
same register as ALC236_FIXUP_HP_MUTE_LED), but with the opposite sense:
1 << 2 lights the LED and 2 << 2 turns it off.  Setting
micmute_led_polarity = 1 makes alc_update_coef_led() write the level that
matches the hardware.

The speaker mute LED (F5) keeps being driven through the HP_Mute_LED DMI
string, exactly as the current fallback does.

Add ALC236_FIXUP_HP_MUTE_LED_MICMUTE_COEF_INV for 103c:8ba4.

Signed-off-by: Keane Mbae <keanembae@gmail.com>
Tested-by: Keane Mbae <keanembae@gmail.com>
---
 sound/hda/codecs/realtek/alc269.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 1623cf9..25f5b51 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -1754,6 +1754,25 @@ static void alc295_fixup_hp_pavilion_mute_led_1b(struct hda_codec *codec,
 		spec->mute_led_nid = 0x1b;
 }
 
+/*
+ * HP 245 14 inch G10 Notebook PC (SSID 103c:8ba4): the speaker mute LED is
+ * controlled through the HP_Mute_LED DMI string (NID 0x1a), same as the
+ * ALC269_FIXUP_HP_MUTE_LED fallback, but the microphone mute LED is wired to
+ * COEF 0x35 bits 2-3 with an inverted sense.
+ */
+static void alc236_fixup_hp_mute_led_micmute_coef_inv(struct hda_codec *codec,
+						      const struct hda_fixup *fix,
+						      int action)
+{
+	struct alc_spec *spec = codec->spec;
+
+	if (action == HDA_FIXUP_ACT_PRE_PROBE)
+		spec->micmute_led_polarity = 1;
+
+	alc269_fixup_hp_mute_led(codec, fix, action);
+	alc236_fixup_hp_coef_micmute_led(codec, fix, action);
+}
+
 static void alc233_fixup_lenovo_coef_micmute_led(struct hda_codec *codec,
 				const struct hda_fixup *fix, int action)
 {
@@ -4237,6 +4256,7 @@ enum {
 	ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
 	ALC236_FIXUP_HP_GPIO_LED,
 	ALC236_FIXUP_HP_MUTE_LED,
+	ALC236_FIXUP_HP_MUTE_LED_MICMUTE_COEF_INV,
 	ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF,
 	ALC236_FIXUP_HP_15_FD0XXX,
 	ALC236_FIXUP_LENOVO_INV_DMIC,
@@ -6033,6 +6053,10 @@ static const struct hda_fixup alc269_fixups[] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc236_fixup_hp_mute_led_micmute_vref,
 	},
+	[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_COEF_INV] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = alc236_fixup_hp_mute_led_micmute_coef_inv,
+	},
 	[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = alc236_fixup_hp_mute_led_micmute_gpio,
@@ -7622,6 +7646,8 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x103c, 0x8b92, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
 	SND_PCI_QUIRK(0x103c, 0x8b96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
 	SND_PCI_QUIRK(0x103c, 0x8b97, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
+	SND_PCI_QUIRK(0x103c, 0x8ba4, "HP 245 14 inch G10 Notebook PC",
+		      ALC236_FIXUP_HP_MUTE_LED_MICMUTE_COEF_INV),
 	SND_PCI_QUIRK(0x103c, 0x8ba9, "HP Omen 16-wd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT),
 	SND_PCI_QUIRK(0x103c, 0x8bb1, "HP Victus 15-fa1xxx (MB 8BB1)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT),
 	SND_PCI_QUIRK(0x103c, 0x8bb3, "HP Slim OMEN", ALC287_FIXUP_CS35L41_I2C_2),
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda/realtek: Add mic-mute LED quirk for the HP 245 14 inch G10
  2026-10-17  9:51 [PATCH] ALSA: hda/realtek: Add mic-mute LED quirk for the HP 245 14 inch G10 Keane Mbae
@ 2026-10-18  8:35 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-10-18  8:35 UTC (permalink / raw)
  To: Keane Mbae
  Cc: Takashi Iwai, Jaroslav Kysela, Kailang Yang, Zhang Heng,
	Eric Naim, Damien Dagorn, linux-sound, linux-kernel

On Sat, 17 Oct 2026 11:51:32 +0200,
Keane Mbae wrote:
> 
> The HP 245 14 inch G10 Notebook PC (codec SSID 103c:8ba4, ALC236) is not
> listed in alc269_fixup_tbl[], so the codec falls back to the vendor-wide
> HP entry (ALC269_FIXUP_HP_MUTE_LED).  That entry only registers a speaker
> mute LED (hda::mute); no microphone mute LED class device (hda::micmute)
> is created, so muting the microphone never lights the LED on the F8 key.
> 
> On this model the microphone mute LED is wired to COEF 0x35 bits 2-3 (the
> same register as ALC236_FIXUP_HP_MUTE_LED), but with the opposite sense:
> 1 << 2 lights the LED and 2 << 2 turns it off.  Setting
> micmute_led_polarity = 1 makes alc_update_coef_led() write the level that
> matches the hardware.
> 
> The speaker mute LED (F5) keeps being driven through the HP_Mute_LED DMI
> string, exactly as the current fallback does.
> 
> Add ALC236_FIXUP_HP_MUTE_LED_MICMUTE_COEF_INV for 103c:8ba4.
> 
> Signed-off-by: Keane Mbae <keanembae@gmail.com>
> Tested-by: Keane Mbae <keanembae@gmail.com>

Applied to for-next branch.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-18  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-17  9:51 [PATCH] ALSA: hda/realtek: Add mic-mute LED quirk for the HP 245 14 inch G10 Keane Mbae
2026-10-18  8:35 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.