]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Allow setting automute/automic hooks after parsing
authorTakashi Iwai <tiwai@suse.de>
Fri, 31 May 2013 12:10:03 +0000 (14:10 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 3 Jun 2013 09:33:06 +0000 (11:33 +0200)
commit4117c0b59b85f96c6949a8fef0b87a4e144781e6
tree89c38b08c64f52168118c32cc299bd1959de0c24
parentff872edd1b3937662c5ba52b0eb3d9bb161a9608
ALSA: hda - Allow setting automute/automic hooks after parsing

Some codec drivers (VIA codecs and some Realtek fixups) set the
automute and automic hooks after calling
snd_hda_gen_parse_auto_config().  In the current code, the hook
pointers are referred only in snd_hda_gen_parse_auto_config() and
passed to snd_hda_jack_detect_enable_callback(), thus changing the
hook values won't change the actually called callbacks properly.

This patch fixes this bug by setting the static functions as the
primary callback functions for the jack detection, and let them
calling the appropriate hooks dynamically.

Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_generic.c