Skip to content

Commit 4046906

Browse files
jason77-wangtiwai
authored andcommitted
ALSA: hda - reverse the setting value in the micmute_led_set
Before the micmute_led_set() is introduced, the function of alc_gpio_micmute_update() will set the gpio value with the !micmute_led.led_value, and the machines have the correct micmute led status. After the micmute_led_set() is introduced, it sets the gpio value with !!micmute_led.led_value, so the led status is not correct anymore, we need to set micmute_led_polarity = 1 to workaround it. Now we fix the micmute_led_set() and remove micmute_led_polarity = 1. Fixes: 87dc364 ("ALSA: hda/realtek - Add LED class support for micmute LED") Reported-and-suggested-by: Kai-Heng Feng <[email protected]> Cc: <[email protected]> Signed-off-by: Hui Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 85cb905 commit 4046906

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4125,7 +4125,7 @@ static int micmute_led_set(struct led_classdev *led_cdev,
41254125
struct alc_spec *spec = codec->spec;
41264126

41274127
alc_update_gpio_led(codec, spec->gpio_mic_led_mask,
4128-
spec->micmute_led_polarity, !!brightness);
4128+
spec->micmute_led_polarity, !brightness);
41294129
return 0;
41304130
}
41314131

@@ -4162,8 +4162,6 @@ static void alc285_fixup_hp_gpio_led(struct hda_codec *codec,
41624162
{
41634163
struct alc_spec *spec = codec->spec;
41644164

4165-
spec->micmute_led_polarity = 1;
4166-
41674165
alc_fixup_hp_gpio_led(codec, action, 0x04, 0x01);
41684166
}
41694167

@@ -4414,7 +4412,6 @@ static void alc233_fixup_lenovo_line2_mic_hotkey(struct hda_codec *codec,
44144412
{
44154413
struct alc_spec *spec = codec->spec;
44164414

4417-
spec->micmute_led_polarity = 1;
44184415
alc_fixup_hp_gpio_led(codec, action, 0, 0x04);
44194416
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
44204417
spec->init_amp = ALC_INIT_DEFAULT;

0 commit comments

Comments
 (0)