[ALSA] hda-codec - Don't build boost controls for digital mics
authorTakashi Iwai <tiwai@suse.de>
Fri, 11 Jan 2008 16:38:35 +0000 (17:38 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jan 2008 16:29:55 +0000 (17:29 +0100)
The ALC auto-probe creates mic boost controls automatically for the
probed pins, but it assumes that they are analog mics.  The digital
mics have no boost controls and must be skipped.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/pci/hda/patch_realtek.c

index 4bc7f3daeab00d0e98dcfcc6105678f590c1990f..11bd68bb55f98681de74ec211474907248012848 100644 (file)
@@ -6111,7 +6111,7 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
        hda_nid_t nid;
 
        nid = spec->autocfg.input_pins[AUTO_PIN_MIC];
-       if (nid) {
+       if (nid && (get_wcaps(codec, nid) & AC_WCAP_IN_AMP)) {
                err = add_control(spec, ALC_CTL_WIDGET_VOL,
                                  "Mic Boost",
                                  HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT));
@@ -6119,7 +6119,7 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
                        return err;
        }
        nid = spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC];
-       if (nid) {
+       if (nid && (get_wcaps(codec, nid) & AC_WCAP_IN_AMP)) {
                err = add_control(spec, ALC_CTL_WIDGET_VOL,
                                  "Front Mic Boost",
                                  HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT));