]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Switch HP DAC dynamically with indep-HP switch for VIA
authorTakashi Iwai <tiwai@suse.de>
Mon, 18 Jul 2011 14:54:40 +0000 (16:54 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 18 Jul 2011 14:54:40 +0000 (16:54 +0200)
commit959dcc5c9ef85d921c87259a0581b60d9043d7b3
tree8c795f35ffa819a1edb571251a08770dc93b612a
parentdece191ae3c033c87f43f2c38cfc1c667adf6ce0
ALSA: hda - Switch HP DAC dynamically with indep-HP switch for VIA

This patch changes the behavior of independent-HP enum switch.  Now
instead of returning a busy error, the driver switches dynamically the
stream of the HP (and shared) DACs according to the current mode.
The logic is similar like the dual-mic ADC switch, but a bit more
complicated because of the presence of shared DAC.

Together with the change, a mutex is introduced to protect against the
possible races for the indep-HP mode setting.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_via.c