At Wed, 8 Apr 2015 07:31:33 +0000, Kailang wrote:
Hi Takashi,
Attach patch is support alc288 headset mode.
This also supports ALC286, too, right?
Takashi
BR, Kailang
-----Original Message----- From: Takashi Iwai [mailto:tiwai@suse.de] Sent: Saturday, April 04, 2015 8:43 PM To: Kailang Cc: (alsa-devel@alsa-project.org) Subject: Re: Support Dell headset mode for ALC288
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
------Please consider the environment before printing this e-mail.
[2 0000-alc288-headset-mode.patch <application/octet-stream (base64)>]