[alsa-devel] Pop noise on startup when headphones are plugged in (Dell XPS13 9333)

Gabriele Mazzotta gabriele.mzt at gmail.com
Sat Apr 25 15:57:15 CEST 2015


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.


More information about the Alsa-devel mailing list