]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Fix calling cs_automic twice for Cirrus codecs.
authorDylan Reid <dgreid@chromium.org>
Tue, 31 Jan 2012 21:04:41 +0000 (13:04 -0800)
committerTakashi Iwai <tiwai@suse.de>
Wed, 1 Feb 2012 08:43:46 +0000 (09:43 +0100)
commitd229f2701c88d011013c3a2bcde83d98bc87b5c7
tree3b2a1574c8951eba1b8ece7cb277b1db19200778
parent31b56fa07c5daa59f71570a108698785eb3a1423
ALSA: hda - Fix calling cs_automic twice for Cirrus codecs.

If cs_automic is called twice (like it is during init) while the mic
is present, it will over-write the last_input with the new one,
causing it to switch back to the automic input when the mic is
unplugged. This leaves the driver in a state (cur_input, last_input,
and automix_idx the same) where the internal mic can not be selected
until it is rebooted without the mic attached.

Check that the mic hasn't already been switched to before setting
last_input.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_cirrus.c