]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Avoid overwrite of jack events with STAC/IDT
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Jul 2009 12:23:09 +0000 (14:23 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 29 Jul 2009 12:28:37 +0000 (14:28 +0200)
commit86dc64ddb45ae16ae3d7c7c8623018cc4d1113d8
treef2c7f7b7fb63105ce56e11934fb712ce76a86c44
parent1221c63e78f063e286722510f1e05df97375ff10
ALSA: hda - Avoid overwrite of jack events with STAC/IDT

Since only one event can be associated to a (pin) widget, it's safer
to avoid the multiple mapping.  This patch fixes the behavior of the
STAC/IDT codec driver.

Now stac_get_event() doesn't take the type argument but simply returns
the first hit element.  Then enable_pin_detect() checks the validity
of the type, and returns non-zero only if a valid entry.  The caller
can call stac_issue_unsol_event() after checking the return value.

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