aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-11-11 10:47:24 -0500
committerTakashi Iwai <tiwai@suse.de>2008-11-11 12:00:53 -0500
commit4f1e6bc3646ab50b8181555ab7e6eeab68b8632a (patch)
tree839106df0cbec337f4d46f3a498b90ccbc1bac9d /sound
parent355a0ec471377a8a907b79c8fba3f0f09b44656e (diff)
ALSA: hda - Fix input pin initialization for STAC/IDT codecs
The input pins are sometimes not initialized properly because of the optimization check of the current pinctl code. Force to initialize the mic input pins so that they can be set up properly even if they were in a weird state. But keep other input pins if already set up as input, since this could be an extra mic pin. Reference: Novell bnc#443738 https://bugzilla.novell.com/show_bug.cgi?id=443738 Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_sigmatel.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 1627756e5c7d..a51160106df3 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -3653,14 +3653,18 @@ static int stac92xx_init(struct hda_codec *codec)
3653 for (i = 0; i < AUTO_PIN_LAST; i++) { 3653 for (i = 0; i < AUTO_PIN_LAST; i++) {
3654 hda_nid_t nid = cfg->input_pins[i]; 3654 hda_nid_t nid = cfg->input_pins[i];
3655 if (nid) { 3655 if (nid) {
3656 unsigned int pinctl = snd_hda_codec_read(codec, nid, 3656 unsigned int pinctl;
3657 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0); 3657 if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC) {
3658 /* if PINCTL already set then skip */ 3658 /* for mic pins, force to initialize */
3659 if (pinctl & AC_PINCAP_IN) 3659 pinctl = stac92xx_get_vref(codec, nid);
3660 continue; 3660 } else {
3661 pinctl = AC_PINCTL_IN_EN; 3661 pinctl = snd_hda_codec_read(codec, nid, 0,
3662 if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC) 3662 AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
3663 pinctl |= stac92xx_get_vref(codec, nid); 3663 /* if PINCTL already set then skip */
3664 if (pinctl & AC_PINCTL_IN_EN)
3665 continue;
3666 }
3667 pinctl |= AC_PINCTL_IN_EN;
3664 stac92xx_auto_set_pinctl(codec, nid, pinctl); 3668 stac92xx_auto_set_pinctl(codec, nid, pinctl);
3665 } 3669 }
3666 } 3670 }