Re: [PATCH v2] ALSA: hda/realtek: Add inverted LED quirk for HP ZBook 8 G2a

From: Chris Chiu

Date: Mon Jul 13 2026 - 21:57:28 EST


On Mon, Jul 13, 2026 at 6:09 PM Takashi Iwai <tiwai@xxxxxxx> wrote:
>
> On Mon, 13 Jul 2026 04:08:39 +0200,
> Chris Chiu wrote:
> >
> > HP ZBook 8 G2a 14 and 16 (SSIDs 0x103c:0x8f94, 0x103c:0x8f95) use
> > Realtek ALC245 codec with TAS2781 amplifier via I2C. These models
> > require inverted speaker mute LED handling compared to the existing
> > ALC245_FIXUP_HP_TAS2781_I2C_MUTE_LED quirk.
> >
> > The existing quirk produces opposite LED behavior: when speaker is
> > muted, the LED turns off (should be on), and when unmuted, the LED
> > turns on (should be off). This patch adds a dedicated quirk that
> > properly handles the inverted LED polarity.
> >
> > Code flow explanation:
> > - With HP pin (hp_pin != 0): Uses standard HDA LED framework via
> > alc245_fixup_hp_mute_led_coefbit() for full control interface
> > support, enabling both manual control and direct hardware updates.
> >
> > - Without HP pin (hp_pin == 0, speaker-only laptops): Registers
> > direct vmaster_mute hook (alc245_hp_spk_mute_led_update_inverted)
> > to control LED during mute operations, ensuring LED feedback
> > without headphone jack detection capability.
> >
> > Both paths use inverted LED update logic to correct polarity and
> > maintain backward compatibility with existing systems.
>
> So there can be multiple models with the same SSID and they have
> different hardware configurations?
>

The new SSIDs 0x8f94 and 0x8f95 actually have the same hardware
configuration as the old 0x8f40, 0x8f41, 0x8f42, 0x8f62 but different
GPIO polarity. I tried to request that they remain aligned but received no
positive response.

> > Signed-off-by: Chris Chiu <chris.chiu@xxxxxxxxxxxxx>
> > ---
> > sound/hda/codecs/realtek/alc269.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 56 insertions(+)
> >
> > diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
> > index b26ed9c1f09f..e04b5adce075a 100644
> > --- a/sound/hda/codecs/realtek/alc269.c
> > +++ b/sound/hda/codecs/realtek/alc269.c
> > @@ -3776,6 +3776,15 @@ static void alc245_hp_spk_mute_led_update(void *private_data, int enabled)
> > alc_update_coef_idx(codec, 0x0b, 0x0c, val);
> > }
> >
> > +static void alc245_hp_spk_mute_led_update_inverted(void *private_data, int enabled)
> > +{
> > + struct hda_codec *codec = private_data;
> > + unsigned int val;
> > +
> > + val = enabled ? 0x04 : 0x08; /* inverted: 0x04 off, 0x08 on */
> > + alc_update_coef_idx(codec, 0x0b, 0x0c, val);
> > +}
> > +
> > /* JD2: mute led GPIO3: micmute led */
> > static void alc245_tas2781_i2c_hp_fixup_muteled(struct hda_codec *codec,
> > const struct hda_fixup *fix, int action)
> > @@ -3804,6 +3813,42 @@ static void alc245_tas2781_i2c_hp_fixup_muteled(struct hda_codec *codec,
> > alc245_fixup_hp_mute_led_coefbit(codec, fix, action);
> > alc285_fixup_hp_coef_micmute_led(codec, fix, action);
> > }
> > +
> > +/* Inverted LED version for HP ZBook 8 G2a models (SSIDs 0x8f94, 0x8f95)
> > + * This fixup handles systems where the speaker mute LED polarity is reversed
> > +/* Inverted LED quirk for HP ZBook 8 G2a (SSIDs 0x8f94, 0x8f95)
>
> The comment block unbalance, you forgot to close the previous comment
> line, or starting a new comment line mistakenly?
>

Thanks for the reminder. I'll propose a v3 to fix.

>
> thanks,
>
> Takashi