Merge branch 'topic/fix/hda' into topic/hda
authorTakashi Iwai <tiwai@suse.de>
Wed, 12 Nov 2008 09:02:04 +0000 (10:02 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 12 Nov 2008 09:02:04 +0000 (10:02 +0100)
Conflicts:
sound/pci/hda/patch_sigmatel.c

1  2 
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_sigmatel.c

Simple merge
index 12c88c42d7f34c8f23f22d02e68657ccd5aacb63,4300a679cd8639a0bd1e5a89c22d630a50125def..ec8f5ab9c54dc707235630e18ad1d6cbd00a725c
@@@ -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++)