Message ID | 2264204.W7vnUSq2WO@xps13 (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Saturday 25 April 2015 13:51:33 Gabriele Mazzotta wrote: > Hi, > > I think this the patch here below is simpler than the other I sent. > snd_hda_get_default_vref() guesses the vref input pins. We know that > some of these are for headphones/headset mics, so we could set the > vref to HIZ for these. > > Are there systems that would misbehave with this change? > > Gabriele > > --- > diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c > index 3d2597b..081db8b 100644 > --- a/sound/pci/hda/hda_generic.c > +++ b/sound/pci/hda/hda_generic.c > @@ -3257,7 +3257,9 @@ static int create_input_ctls(struct hda_codec *codec) > continue; > > val = PIN_IN; > - if (cfg->inputs[i].type == AUTO_PIN_MIC) > + if (cfg->inputs[i].type == AUTO_PIN_MIC && > + !cfg->inputs[i].is_headset_mic && > + !cfg->inputs[i].is_headphone_mic) > val |= snd_hda_get_default_vref(codec, pin); > if (pin != spec->hp_mic_pin) > set_pin_target(codec, pin, val, false); Sorry, I think I misunderstood the meaning of the two flags and they can't be used like that.
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 3d2597b..081db8b 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -3257,7 +3257,9 @@ static int create_input_ctls(struct hda_codec *codec) continue; val = PIN_IN; - if (cfg->inputs[i].type == AUTO_PIN_MIC) + if (cfg->inputs[i].type == AUTO_PIN_MIC && + !cfg->inputs[i].is_headset_mic && + !cfg->inputs[i].is_headphone_mic) val |= snd_hda_get_default_vref(codec, pin); if (pin != spec->hp_mic_pin) set_pin_target(codec, pin, val, false);