Commit 4875a5f7 authored by Hui Wang's avatar Hui Wang Committed by Takashi Iwai

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: 00ef9940 ('ALSA: hda - add mic mute led hook for dell machines')
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b907900e
...@@ -49,7 +49,7 @@ static void alc_fixup_dell_wmi(struct hda_codec *codec, ...@@ -49,7 +49,7 @@ static void alc_fixup_dell_wmi(struct hda_codec *codec,
removefunc = true; removefunc = true;
if (dell_led_set_func(DELL_LED_MICMUTE, false) >= 0) { if (dell_led_set_func(DELL_LED_MICMUTE, false) >= 0) {
dell_led_value = 0; dell_led_value = 0;
if (spec->gen.num_adc_nids > 1) if (spec->gen.num_adc_nids > 1 && !spec->gen.dyn_adc_switch)
codec_dbg(codec, "Skipping micmute LED control due to several ADCs"); codec_dbg(codec, "Skipping micmute LED control due to several ADCs");
else { else {
dell_old_cap_hook = spec->gen.cap_sync_hook; dell_old_cap_hook = spec->gen.cap_sync_hook;
......
...@@ -62,7 +62,7 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec, ...@@ -62,7 +62,7 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec,
removefunc = false; removefunc = false;
} }
if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0) { if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0) {
if (spec->num_adc_nids > 1) if (spec->num_adc_nids > 1 && !spec->dyn_adc_switch)
codec_dbg(codec, codec_dbg(codec,
"Skipping micmute LED control due to several ADCs"); "Skipping micmute LED control due to several ADCs");
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment