Skip to content

Commit

Permalink
[ALSA] hda-codec - Don't build boost controls for digital mics
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 31, 2008
1 parent 9c8f2ab commit ce22e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -6111,15 +6111,15 @@ 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));
if (err < 0)
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));
Expand Down

0 comments on commit ce22e03

Please sign in to comment.