]> git.ipfire.org Git - people/ms/linux.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)
committerJiri Slaby <jslaby@suse.cz>
Tue, 1 Apr 2014 20:12:08 +0000 (22:12 +0200)
commit4c74007da904cc0411d788200034b2fb4c9e0d01
tree5fb1326ce415b66e150d6e5707505e7aa67ac072
parentacbf4c08b347d3a405319212aa6c9f85ea3edfab
ALSA: hda - Fix inconsistent Mic mute LED

commit 7fe307117db5bd7ec6efb93c563dcf44577b6d2b upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
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