Skip to content

Commit 4875a5f

Browse files
jason77-wangtiwai
authored andcommitted
ALSA: hda - Fix a failure of micmute led when having multi adcs
On a Dell laptop, there is no global adcs for all input devices, so the input devices use the different adc, as a result, dyn_adc_switch is set to true. In this situation, it is safe to control the micmute led according to user's choice of muting/unmuting the current input device, since only current input device path is active, while other input device paths are inactive and powered down. Fixes: 00ef994 ('ALSA: hda - add mic mute led hook for dell machines') Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent b907900 commit 4875a5f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

sound/pci/hda/dell_wmi_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void alc_fixup_dell_wmi(struct hda_codec *codec,
4949
removefunc = true;
5050
if (dell_led_set_func(DELL_LED_MICMUTE, false) >= 0) {
5151
dell_led_value = 0;
52-
if (spec->gen.num_adc_nids > 1)
52+
if (spec->gen.num_adc_nids > 1 && !spec->gen.dyn_adc_switch)
5353
codec_dbg(codec, "Skipping micmute LED control due to several ADCs");
5454
else {
5555
dell_old_cap_hook = spec->gen.cap_sync_hook;

sound/pci/hda/thinkpad_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec,
6262
removefunc = false;
6363
}
6464
if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0) {
65-
if (spec->num_adc_nids > 1)
65+
if (spec->num_adc_nids > 1 && !spec->dyn_adc_switch)
6666
codec_dbg(codec,
6767
"Skipping micmute LED control due to several ADCs");
6868
else {

0 commit comments

Comments
 (0)