summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Su <dirk.su@canonical.com>2025-12-17 10:52:44 +0800
committerTakashi Iwai <tiwai@suse.de>2025-12-17 10:06:09 +0100
commit70d6df5cb599d92ded120ce4b6ace5d59aa1f817 (patch)
treeaf2c090df57e7a2a717c48bc5b60e5ff4d2e01b8
parent108c422c495dc3232aebad837408cd74d23b1794 (diff)
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>
-rw-r--r--sound/hda/codecs/realtek/alc269.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index e8f3cdcff0f3..2bc99a8755c9 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -1656,6 +1656,18 @@ static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
alc236_fixup_hp_micmute_led_vref(codec, fix, action);
}
+static void alc236_fixup_hp_mute_led_micmute_gpio(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;
+
+ alc236_fixup_hp_mute_led_coefbit2(codec, fix, action);
+ alc_fixup_hp_gpio_led(codec, action, 0x00, 0x01);
+}
+
static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
const unsigned short coefs[2])
{
@@ -5326,9 +5338,7 @@ static const struct hda_fixup alc269_fixups[] = {
},
[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
.type = HDA_FIXUP_FUNC,
- .v.func = alc236_fixup_hp_mute_led_coefbit2,
- .chained = true,
- .chain_id = ALC236_FIXUP_HP_GPIO_LED,
+ .v.func = alc236_fixup_hp_mute_led_micmute_gpio,
},
[ALC236_FIXUP_LENOVO_INV_DMIC] = {
.type = HDA_FIXUP_FUNC,