[alsa-devel] [PATCH] ALSA: hda - Fix a failure of micmute led when having multi adcs

Takashi Iwai tiwai at suse.de
Wed Oct 12 20:08:31 CEST 2016


On Tue, 11 Oct 2016 04:48:58 +0200,
Hui Wang wrote:
> 
> 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 pathes
> are inactive and powered down.
> 
> Cc: <stable at vger.kernel.org>
> Signed-off-by: Hui Wang <hui.wang at canonical.com>
> ---
> You can find the alsa-info.txt for this machine from:
> http://paste.ubuntu.com/23306165/

Applied, thanks.


Takashi

> 
>  sound/pci/hda/dell_wmi_helper.c | 2 +-
>  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 9c22f95..19d41da 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 f0955fd..6a23302 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 {
> -- 
> 1.9.1
> 


More information about the Alsa-devel mailing list