diff options
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 20 |
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 | } |