ALSA: hda - Fix invalid pin powermap without jack detection
authorTakashi Iwai <tiwai@suse.de>
Thu, 11 Sep 2014 10:59:21 +0000 (12:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:52:11 +0000 (14:52 -0700)
commitd8a93f26a4521548c4b59d7e719a65e61e47c617
treef8fca3cdb1114ed07c0be082b569165f3879883d
parent6d113a44062cb09e8338c14cac5af8a37e8448fa
ALSA: hda - Fix invalid pin powermap without jack detection

commit 7a9744cb455e6faa287e148394b4b422a6f3c5c4 upstream.

When a driver is set up without the jack detection explicitly (either
by passing a model option or via a specific fixup), the pin powermap
of IDT/STAC codecs is set up wrongly, resulting in the silence
output.  It's because of a logic failure in stac_init_power_map().
It tries to avoid creating a callback for the pins that have other
auto-hp and auto-mic callbacks, but the check is done in a wrong way
at a wrong time.  The stac_init_power_map() should be called after
creating other jack detection ctls, and the jack callback should be
created only for jack-detectable widgets.

This patch fixes the check in stac_init_power_map() and its callee
at the right place, after snd_hda_gen_build_controls().

Reported-by: Adam Richter <adam_richter2004@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_sigmatel.c