]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Fix inconsistent Mic mute LED
authorTakashi Iwai <tiwai@suse.de>
Thu, 30 Jan 2014 16:59:02 +0000 (17:59 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 7 Feb 2014 11:13:25 +0000 (12:13 +0100)
commit7352e87c1d4407f893fbb461c8aa8e1afb74bdc0
tree33a6444eef35d6e511f55c60dbeb9fccc9ed5d68
parentddbe813443c89c5555116bf546437c0e0f97e745
ALSA: hda - Fix inconsistent Mic mute LED

The current code for controlling mic mute LED in patch_sigmatel.c
blindly assumes that there is a single capture switch.  But, there can
be multiple multiple ones, and each of them flips the state, ended up
in an inconsistent state.

For fixing this problem, this patch adds kcontrol to be passed to the
hook function so that the callee can check which switch is being
accessed.  In stac_capture_led_hook(), the state is checked as a
bitmask, and turns on the LED when all capture switches are off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_generic.c
sound/pci/hda/hda_generic.h
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_sigmatel.c
sound/pci/hda/thinkpad_helper.c