From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Intel HDA / ca0132: support for Alienware 15 Creative Sound Core3D-EX Date: Mon, 18 May 2015 11:39:40 +0200 Message-ID: References: <553AE4CF.3070805@gmx.com> <553E7B34.2080501@gmx.com> <553EB55D.4060701@gmx.com> <55400DF4.2080309@gmx.com> <5540FBFF.6020904@gmx.com> <55416BEE.5090003@gmx.com> <5546B501.7050207@gmx.com> <55510E3D.90508@gmx.com> 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 3DD6626043A for ; Mon, 18 May 2015 11:39:40 +0200 (CEST) In-Reply-To: <55510E3D.90508@gmx.com> 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: Gabriele Martino Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 11 May 2015 22:17:01 +0200, Gabriele Martino wrote: > > On 04/05/2015 14:30, Takashi Iwai wrote: > > Hm, this can be changed via a proper pin config? > > > > In anyway, I'm traveling in this week and next week, so cannot debug > > the things. Will check it later once when I back from vacation. Just > > ping me. > Hi, this should be the final version. > There are some big changes: > - all the pin configuration is now performed in ca0132_config(), no more > static definitions > - some initialization verbs depend on the pin configuration, so they are > generated from the pin configuration > - the quirks management code now is a simple "if" in the pin configuration > > I can't split the patch because the quirks part requires the dynamic > verbs generation. > I'm using this since 5 May without any trouble, so it shouldn't blow up > things. The patch looks almost OK, but just a few things: > +static int ca0132_prepare_verbs(struct hda_codec *codec) > +{ > + struct ca0132_spec *spec = codec->spec; > + static struct hda_verb empty_verb = {}; > +#define NUM_SPEC_VERBS 4 > + > + spec->chip_init_verbs = ca0132_init_verbs0; > + spec->spec_init_verbs = kzalloc(sizeof(struct hda_verb) * NUM_SPEC_VERBS, GFP_KERNEL); > + if (!spec->spec_init_verbs) > + return -ENOMEM; > + > + /* HP jack autodetection */ > + spec->spec_init_verbs[0].nid = spec->unsol_tag_hp; > + spec->spec_init_verbs[0].param = AC_VERB_SET_UNSOLICITED_ENABLE; > + spec->spec_init_verbs[0].verb = AC_USRSP_EN | spec->unsol_tag_hp; > + > + /* MIC1 jack autodetection */ > + spec->spec_init_verbs[1].nid = spec->unsol_tag_amic1; > + spec->spec_init_verbs[1].param = AC_VERB_SET_UNSOLICITED_ENABLE; > + spec->spec_init_verbs[1].verb = AC_USRSP_EN | spec->unsol_tag_amic1; > + > + /* config EAPD */ > + spec->spec_init_verbs[2].nid = 0x0b; > + spec->spec_init_verbs[2].param = 0x78D; > + spec->spec_init_verbs[2].verb = 0x00; > + > + /* Previously commented configuration */ > + /* > + spec->spec_init_verbs[3].nid = 0x0b; > + spec->spec_init_verbs[3].param = AC_VERB_SET_EAPD_BTLENABLE; > + spec->spec_init_verbs[3].verb = 0x02; > + > + spec->spec_init_verbs[4].nid = 0x10; > + spec->spec_init_verbs[4].param = 0x78D; > + spec->spec_init_verbs[4].verb = 0x02; > + > + spec->spec_init_verbs[5].nid = 0x10; > + spec->spec_init_verbs[5].param = AC_VERB_SET_EAPD_BTLENABLE; > + spec->spec_init_verbs[5].verb = 0x02; > + */ > + > + /* Empty element */ > + spec->spec_init_verbs[NUM_SPEC_VERBS-1] = empty_verb; This line is superfluous when you allocated via kzalloc(). Could you fix it and give a proper patch changelog and your signed-off-by tag? thanks, Takashi