[alsa-devel] Support Dell headset mode for ALC288

Takashi Iwai tiwai at suse.de
Sat Apr 4 14:42:33 CEST 2015


At Tue, 31 Mar 2015 08:01:57 +0000,
Kailang wrote:
> 
> 
> Hi Takashi,
>   
>  Dell has new platform with ALC288.
>  Attach patch is support headset mode for ALC288.

> @@ -3828,6 +3894,11 @@ static void alc_determine_headset_type(struct hda_codec *codec)
>   conteol) */
>  		{}
>  	};
> +	static struct coef_fw coef0286[] = {
> +		//UPDATE_COEF(0x4f, 0xfcc0, 0x5400), /* Combo Jack auto detect */
> +		UPDATE_COEF(0x4f, 0xfcc0, 0xd400),

Why is this commented out and what's the next line does instead?
And it's 0286?  Not 0288?

> @@ -3949,8 +4027,15 @@ static void alc_update_headset_jack_cb(struct hda_codec *codec,
>  				       struct hda_jack_callback *jack)
>  {
>  	struct alc_spec *spec = codec->spec;
> +	int present;
>  	spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
>  	snd_hda_gen_hp_automute(codec, jack);
> +	present = spec->gen.hp_jack_present ? 0x40 : 0;
> +	if (codec->bus->pci->subsystem_vendor == 0x1028 &&
> +				codec->core.vendor_id == 0x10ec0288)
> +		/* Headset Mic enable and disable, ony for Dell Dino */
> +		snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
> +					present);

This is too ugly to put in the common function.
For Dell, prepare its own callback function and use it instead.  Or,
put a new hook there to call additionally.  This avoids the PCI ID
check in each place.

So, better to split to a few patches.  One for adding ALC286 (or 288?)
support generically.  And another for adding Dell-specific things.


thanks,

Takashi


More information about the Alsa-devel mailing list