All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda/realtek: Add mute and mic-mute LEDs for HP ENVY 16 (103c:8be5)
@ 2026-10-20 10:32 Ajanesh Lal
  2026-10-20 11:54 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Ajanesh Lal @ 2026-10-20 10:32 UTC (permalink / raw)
  To: tiwai; +Cc: perex, linux-sound, linux-kernel

The HP ENVY Laptop 16-h1xxx (PCI SSID 103c:8be5) uses an ALC245 codec
with CS35L41 I2C speaker amplifiers. No LED fixup is applied for this
subsystem ID, so the speaker mute LED and the microphone mute LED are
never driven and do not follow their keys.

Add a fixup that calls the existing ALC245 mute LED COEF helper and the
GPIO mic-mute LED helper directly, then chains to the CS35L41 I2C
amplifier setup so the speakers keep working. Use it for 103c:8be5.

Tested on an HP ENVY Laptop 16-h1xxx running kernel 7.2.11: the
hda::mute and hda::micmute LEDs appear and follow their keys, and the
speaker amplifiers still bind (CS35L41 Bound in dmesg). The mic LED
GPIO pin and polarity are not verified on other hardware.

Assisted-by: Claude:claude-haiku-5-5
Signed-off-by: DragonicRage13 <ajaneshlal3@gmail.com>
---
  sound/hda/codecs/realtek/alc269.c | 17 ++++++++++++++++-
  1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/sound/hda/codecs/realtek/alc269.c 
b/sound/hda/codecs/realtek/alc269.c
index e98cc42e1..850a15801 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -1572,6 +1572,14 @@ static void 
alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
      }
  }

+/* mute LED via COEF bit and mic-mute LED via GPIO, called directly */
+static void alc245_fixup_cs35l41_mute_micmute(struct hda_codec *codec,
+                          const struct hda_fixup *fix, int action)
+{
+    alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
+    alc245_fixup_hp_gpio_led(codec, fix, action);
+}
+
  static void alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec *codec,
                        const struct hda_fixup *fix,
                        int action)
@@ -4230,6 +4238,7 @@ enum {
      ALC245_FIXUP_BASS_HP_DAC,
      ALC245_FIXUP_ACER_MICMUTE_LED,
      ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED,
+    ALC245_FIXUP_CS35L41_I2C_2_MUTE_MICMUTE_LED,
      ALC236_FIXUP_HP_DMIC,
      ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO,
      ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX,
@@ -6859,6 +6868,12 @@ static const struct hda_fixup alc269_fixups[] = {
          .chained = true,
          .chain_id = ALC287_FIXUP_CS35L41_I2C_2,
      },
+    [ALC245_FIXUP_CS35L41_I2C_2_MUTE_MICMUTE_LED] = {
+        .type = HDA_FIXUP_FUNC,
+        .v.func = alc245_fixup_cs35l41_mute_micmute,
+        .chained = true,
+        .chain_id = ALC287_FIXUP_CS35L41_I2C_2,
+    },
      [ALC236_FIXUP_HP_DMIC] = {
          .type = HDA_FIXUP_PINS,
          .v.pins = (const struct hda_pintbl[]) {
@@ -7361,7 +7376,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
      SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15", 
ALC287_FIXUP_CS35L41_I2C_2),
      SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15", 
ALC287_FIXUP_CS35L41_I2C_2),
      SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15", 
ALC287_FIXUP_CS35L41_I2C_2),
-    SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", 
ALC287_FIXUP_CS35L41_I2C_2),
+    SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16", 
ALC245_FIXUP_CS35L41_I2C_2_MUTE_MICMUTE_LED),
      SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16", 
ALC287_FIXUP_CS35L41_I2C_2),
      SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17", 
ALC287_FIXUP_CS35L41_I2C_2),
      SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17", 
ALC287_FIXUP_CS35L41_I2C_2),
-- 
2.56.0



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

* Re: [PATCH] ALSA: hda/realtek: Add mute and mic-mute LEDs for HP ENVY 16 (103c:8be5)
  2026-10-20 10:32 [PATCH] ALSA: hda/realtek: Add mute and mic-mute LEDs for HP ENVY 16 (103c:8be5) Ajanesh Lal
@ 2026-10-20 11:54 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-10-20 11:54 UTC (permalink / raw)
  To: Ajanesh Lal; +Cc: tiwai, perex, linux-sound, linux-kernel

On Tue, 20 Oct 2026 12:32:17 +0200,
Ajanesh Lal wrote:
> 
> The HP ENVY Laptop 16-h1xxx (PCI SSID 103c:8be5) uses an ALC245 codec
> with CS35L41 I2C speaker amplifiers. No LED fixup is applied for this
> subsystem ID, so the speaker mute LED and the microphone mute LED are
> never driven and do not follow their keys.
> 
> Add a fixup that calls the existing ALC245 mute LED COEF helper and the
> GPIO mic-mute LED helper directly, then chains to the CS35L41 I2C
> amplifier setup so the speakers keep working. Use it for 103c:8be5.
> 
> Tested on an HP ENVY Laptop 16-h1xxx running kernel 7.2.11: the
> hda::mute and hda::micmute LEDs appear and follow their keys, and the
> speaker amplifiers still bind (CS35L41 Bound in dmesg). The mic LED
> GPIO pin and polarity are not verified on other hardware.
> 
> Assisted-by: Claude:claude-haiku-5-5
> Signed-off-by: DragonicRage13 <ajaneshlal3@gmail.com>

The patch can't be applied, likely because your mailer broke the
spaces and tabs.  Could you fix your mailer setup and resubmit?
At best, use git send-email.


thanks,

Takashi

> ---
>  sound/hda/codecs/realtek/alc269.c | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/hda/codecs/realtek/alc269.c
> b/sound/hda/codecs/realtek/alc269.c
> index e98cc42e1..850a15801 100644
> --- a/sound/hda/codecs/realtek/alc269.c
> +++ b/sound/hda/codecs/realtek/alc269.c
> @@ -1572,6 +1572,14 @@ static void
> alc245_fixup_hp_mute_led_coefbit(struct hda_codec *codec,
>      }
>  }
> 
> +/* mute LED via COEF bit and mic-mute LED via GPIO, called directly */
> +static void alc245_fixup_cs35l41_mute_micmute(struct hda_codec *codec,
> +                          const struct hda_fixup *fix, int action)
> +{
> +    alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
> +    alc245_fixup_hp_gpio_led(codec, fix, action);
> +}
> +
>  static void alc245_fixup_hp_mute_led_v1_coefbit(struct hda_codec *codec,
>                        const struct hda_fixup *fix,
>                        int action)
> @@ -4230,6 +4238,7 @@ enum {
>      ALC245_FIXUP_BASS_HP_DAC,
>      ALC245_FIXUP_ACER_MICMUTE_LED,
>      ALC245_FIXUP_CS35L41_I2C_2_MUTE_LED,
> +    ALC245_FIXUP_CS35L41_I2C_2_MUTE_MICMUTE_LED,
>      ALC236_FIXUP_HP_DMIC,
>      ALC256_FIXUP_HONOR_MRB_XXX_M1020_AUDIO,
>      ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX,
> @@ -6859,6 +6868,12 @@ static const struct hda_fixup alc269_fixups[] = {
>          .chained = true,
>          .chain_id = ALC287_FIXUP_CS35L41_I2C_2,
>      },
> +    [ALC245_FIXUP_CS35L41_I2C_2_MUTE_MICMUTE_LED] = {
> +        .type = HDA_FIXUP_FUNC,
> +        .v.func = alc245_fixup_cs35l41_mute_micmute,
> +        .chained = true,
> +        .chain_id = ALC287_FIXUP_CS35L41_I2C_2,
> +    },
>      [ALC236_FIXUP_HP_DMIC] = {
>          .type = HDA_FIXUP_PINS,
>          .v.pins = (const struct hda_pintbl[]) {
> @@ -7361,7 +7376,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
>      SND_PCI_QUIRK(0x103c, 0x8be1, "HP Envy 15",
> ALC287_FIXUP_CS35L41_I2C_2),
>      SND_PCI_QUIRK(0x103c, 0x8be2, "HP Envy 15",
> ALC287_FIXUP_CS35L41_I2C_2),
>      SND_PCI_QUIRK(0x103c, 0x8be3, "HP Envy 15",
> ALC287_FIXUP_CS35L41_I2C_2),
> -    SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16",
> ALC287_FIXUP_CS35L41_I2C_2),
> +    SND_PCI_QUIRK(0x103c, 0x8be5, "HP Envy 16",
> ALC245_FIXUP_CS35L41_I2C_2_MUTE_MICMUTE_LED),
>      SND_PCI_QUIRK(0x103c, 0x8be6, "HP Envy 16",
> ALC287_FIXUP_CS35L41_I2C_2),
>      SND_PCI_QUIRK(0x103c, 0x8be7, "HP Envy 17",
> ALC287_FIXUP_CS35L41_I2C_2),
>      SND_PCI_QUIRK(0x103c, 0x8be8, "HP Envy 17",
> ALC287_FIXUP_CS35L41_I2C_2),
> -- 
> 2.56.0
> 
> 

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

end of thread, other threads:[~2026-10-20 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20 10:32 [PATCH] ALSA: hda/realtek: Add mute and mic-mute LEDs for HP ENVY 16 (103c:8be5) Ajanesh Lal
2026-10-20 11:54 ` 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.