diff options
author | Hui Wang <hui.wang@canonical.com> | 2016-10-11 10:48:58 +0800 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-10-12 20:07:25 +0200 |
commit | 4875a5f7218068cdeea5f998330dfa3d118b2fea (patch) | |
tree | 30a64cb5f6c98b0ed47668adb0fb0283bac17d18 /sound | |
parent | b907900ec4065e1d9b65fafa05fd6601b6a2ffc7 (diff) | |
download | linux-stable-4875a5f7218068cdeea5f998330dfa3d118b2fea.tar.gz linux-stable-4875a5f7218068cdeea5f998330dfa3d118b2fea.tar.bz2 linux-stable-4875a5f7218068cdeea5f998330dfa3d118b2fea.zip |
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: 00ef99408b6c ('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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/dell_wmi_helper.c | 2 | ||||
-rw-r--r-- | sound/pci/hda/thinkpad_helper.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/dell_wmi_helper.c b/sound/pci/hda/dell_wmi_helper.c index 9c22f95838ef..19d41da79f93 100644 --- a/sound/pci/hda/dell_wmi_helper.c +++ b/sound/pci/hda/dell_wmi_helper.c @@ -49,7 +49,7 @@ static void alc_fixup_dell_wmi(struct hda_codec *codec, removefunc = true; if (dell_led_set_func(DELL_LED_MICMUTE, false) >= 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"); else { dell_old_cap_hook = spec->gen.cap_sync_hook; diff --git a/sound/pci/hda/thinkpad_helper.c b/sound/pci/hda/thinkpad_helper.c index f0955fd7a2e7..6a23302297c9 100644 --- a/sound/pci/hda/thinkpad_helper.c +++ b/sound/pci/hda/thinkpad_helper.c @@ -62,7 +62,7 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec, removefunc = false; } 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, "Skipping micmute LED control due to several ADCs"); else { |