Commit ce22e03e authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] hda-codec - Don't build boost controls for digital mics

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: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 9c8f2abd
...@@ -6111,7 +6111,7 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) ...@@ -6111,7 +6111,7 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
hda_nid_t nid; hda_nid_t nid;
nid = spec->autocfg.input_pins[AUTO_PIN_MIC]; 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, err = add_control(spec, ALC_CTL_WIDGET_VOL,
"Mic Boost", "Mic Boost",
HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT));
...@@ -6119,7 +6119,7 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec) ...@@ -6119,7 +6119,7 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
return err; return err;
} }
nid = spec->autocfg.input_pins[AUTO_PIN_FRONT_MIC]; 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, err = add_control(spec, ALC_CTL_WIDGET_VOL,
"Front Mic Boost", "Front Mic Boost",
HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT)); HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_INPUT));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment