Skip to content

Commit 70d6df5

Browse files
xantheintiwai
authored andcommitted
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: b72a6dd ("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>
1 parent 108c422 commit 70d6df5

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

sound/hda/codecs/realtek/alc269.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,18 @@ static void alc236_fixup_hp_mute_led_micmute_vref(struct hda_codec *codec,
16561656
alc236_fixup_hp_micmute_led_vref(codec, fix, action);
16571657
}
16581658

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+
16591671
static inline void alc298_samsung_write_coef_pack(struct hda_codec *codec,
16601672
const unsigned short coefs[2])
16611673
{
@@ -5326,9 +5338,7 @@ static const struct hda_fixup alc269_fixups[] = {
53265338
},
53275339
[ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO] = {
53285340
.type = HDA_FIXUP_FUNC,
5329-
.v.func = alc236_fixup_hp_mute_led_coefbit2,
5330-
.chained = true,
5331-
.chain_id = ALC236_FIXUP_HP_GPIO_LED,
5341+
.v.func = alc236_fixup_hp_mute_led_micmute_gpio,
53325342
},
53335343
[ALC236_FIXUP_LENOVO_INV_DMIC] = {
53345344
.type = HDA_FIXUP_FUNC,

0 commit comments

Comments
 (0)