From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Support Dell headset mode for ALC288 Date: Wed, 08 Apr 2015 09:40:07 +0200 Message-ID: References: <6FAB7C47BCF00940BB0999A99BE3547A17A0C909@RTITMBSV09.realtek.com.tw> <6FAB7C47BCF00940BB0999A99BE3547A17A0D1AB@RTITMBSV09.realtek.com.tw> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 92565265122 for ; Wed, 8 Apr 2015 09:40:08 +0200 (CEST) In-Reply-To: <6FAB7C47BCF00940BB0999A99BE3547A17A0D1AB@RTITMBSV09.realtek.com.tw> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Kailang Cc: " (alsa-devel@alsa-project.org)" List-Id: alsa-devel@alsa-project.org 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 ] >