ALSA: emu10k1: Fix emu1010 dock attach check
authorTakashi Iwai <tiwai@suse.de>
Wed, 2 Nov 2016 15:38:21 +0000 (16:38 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 15 Nov 2016 07:01:14 +0000 (08:01 +0100)
commite8c44abeab76cc3b1d79242612b9a2d82ab11b6b
tree6621a43cee03b6ce0e36da7dff8961416b7fed61
parent43e575fabbaa1cc9e25dd0bb31eb6657ac7092ec
ALSA: emu10k1: Fix emu1010 dock attach check

The emu1010_firmware_thread() checks the previous dock status, but a
wrong register is recorded as the last status when the dock is plugged
in.  Usually this isn't a big issue since this value gets overwritten
by the next loop after one second.  But when a dock is unplugged
immediately after plugging, it means essentially missing undock
handling.

This patch addresses it by remembering the correct register value.

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