ALSA: hda - Fix jack-detection control of VT1708
authorTakashi Iwai <tiwai@suse.de>
Thu, 24 Nov 2011 15:33:09 +0000 (16:33 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 16:54:13 +0000 (08:54 -0800)
commit9b8fd4ef07fdfeb445ab35b2329fe3c1727297fe
treee0391754437815310192cb640498849b0f9df7f5
parent03c371b70411f1f2805e2965eff0629908b59c13
ALSA: hda - Fix jack-detection control of VT1708

commit 187d333edc0a8e1bb507900ce89853ffe3bd2c84 upstream.

VT1708 has no support for unsolicited events per jack-plug, the driver
implements the workq for polling the jack-detection.  The mixer element
"Jack Detect" was supposed to control this behavior on/off, but this
doesn't work properly as is now.  The workq is always started and the
HP automute is always enabled.

This patch fixes the jack-detect control behavior by triggering / stopping
the work appropriately at the state change.  Also the work checks the
internal state to continue scheduling or not.

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