ALSA: hda/realtek: fix micmute LED reversed on HP Abe and Bantie

Quirk ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO make mute/micmute LEDs
on HP Abe and Bantie functional. But the micmute LED's function
is reversed, LED will be on when Mic enabled and off when Mic
disabled. Create a new function to fix the micmute LED reversed
issue.

Fixes: b72a6ddf6af2 ("ALSA: hda/realtek: fix mute/micmute LEDs don't work for HP 200 G2i")
Signed-off-by: Dirk Su <dirk.su@canonical.com>
Link: https://patch.msgid.link/20251217025257.44600-1-dirk.su@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Dirk Su and committed by Takashi Iwai 70d6df5c 108c422c

+13 -3
+13 -3
sound/hda/codecs/realtek/alc269.c
··· 1656 alc236_fixup_hp_micmute_led_vref(codec, fix, action); 1657 } 1658 1659 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec, 1660 const unsigned short coefs[2]) 1661 { ··· 5338 }, 5339 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = { 5340 .type = HDA_FIXUP_FUNC, 5341 - .v.func = alc236_fixup_hp_mute_led_coefbit2, 5342 - .chained = true, 5343 - .chain_id = ALC236_FIXUP_HP_GPIO_LED, 5344 }, 5345 [ALC236_FIXUP_LENOVO_INV_DMIC] = { 5346 .type = HDA_FIXUP_FUNC,
··· 1656 alc236_fixup_hp_micmute_led_vref(codec, fix, action); 1657 } 1658 1659 + static void alc236_fixup_hp_mute_led_micmute_gpio(struct hda_codec *codec, 1660 + const struct hda_fixup *fix, int action) 1661 + { 1662 + struct alc_spec *spec = codec->spec; 1663 + 1664 + if (action == HDA_FIXUP_ACT_PRE_PROBE) 1665 + spec->micmute_led_polarity = 1; 1666 + 1667 + alc236_fixup_hp_mute_led_coefbit2(codec, fix, action); 1668 + alc_fixup_hp_gpio_led(codec, action, 0x00, 0x01); 1669 + } 1670 + 1671 static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec, 1672 const unsigned short coefs[2]) 1673 { ··· 5326 }, 5327 [ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = { 5328 .type = HDA_FIXUP_FUNC, 5329 + .v.func = alc236_fixup_hp_mute_led_micmute_gpio, 5330 }, 5331 [ALC236_FIXUP_LENOVO_INV_DMIC] = { 5332 .type = HDA_FIXUP_FUNC,