From: Takashi Iwai Date: Wed, 12 Nov 2008 09:02:04 +0000 (+0100) Subject: Merge branch 'topic/fix/hda' into topic/hda X-Git-Tag: v2.6.29-rc1~590^2~6^2~100 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=90d0be2fc33b4c4e11fc596da4736189be947d99;p=linux-2.6-omap-h63xx.git Merge branch 'topic/fix/hda' into topic/hda Conflicts: sound/pci/hda/patch_sigmatel.c --- 90d0be2fc33b4c4e11fc596da4736189be947d99 diff --cc sound/pci/hda/patch_sigmatel.c index 12c88c42d7f,4300a679cd8..ec8f5ab9c54 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@@ -3730,20 -3655,19 +3736,24 @@@ static int stac92xx_init(struct hda_cod for (i = 0; i < AUTO_PIN_LAST; i++) { hda_nid_t nid = cfg->input_pins[i]; if (nid) { - unsigned int pinctl = snd_hda_codec_read(codec, nid, - 0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0); - /* if PINCTL already set then skip */ - if (pinctl & AC_PINCAP_IN) - continue; - pinctl = AC_PINCTL_IN_EN; - if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC) - pinctl |= stac92xx_get_vref(codec, nid); + unsigned int pinctl; + if (i == AUTO_PIN_MIC || i == AUTO_PIN_FRONT_MIC) { + /* for mic pins, force to initialize */ + pinctl = stac92xx_get_vref(codec, nid); + } else { + pinctl = snd_hda_codec_read(codec, nid, 0, + AC_VERB_GET_PIN_WIDGET_CONTROL, 0); + /* if PINCTL already set then skip */ + if (pinctl & AC_PINCTL_IN_EN) + continue; + } + pinctl |= AC_PINCTL_IN_EN; stac92xx_auto_set_pinctl(codec, nid, pinctl); + err = stac92xx_add_jack(codec, nid, + SND_JACK_MICROPHONE); + if (err < 0) + return err; + enable_pin_detect(codec, nid, STAC_INSERT_EVENT | nid); } } for (i = 0; i < spec->num_dmics; i++)