From: Takashi Iwai Subject: Re: Intel HDA / ca0132: support for Alienware 15 Creative Sound Core3D-EX Date: Tue, 28 Apr 2015 08:15:33 +0200 Message-ID: References: <553AE4CF.3070805@gmx.com> <553E7B34.2080501@gmx.com> <553EB55D.4060701@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 8ED8426553A for ; Tue, 28 Apr 2015 08:15:37 +0200 (CEST) In-Reply-To: <553EB55D.4060701@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 Tue, 28 Apr 2015 00:17:01 +0200, Gabriele Martino wrote: > > On 27/04/2015 20:51, Takashi Iwai wrote: > > At Mon, 27 Apr 2015 20:08:52 +0200, > > Gabriele Martino wrote: > >> !!Advanced information - PCI Vendor/Device/Subsystem ID's > >> !!------------------------------------------------------- > >> > >> 00:03.0 0403: 8086:0c0c (rev 06) > >> Subsystem: 1028:0685 > >> -- > >> 00:1b.0 0403: 8086:8c20 (rev 05) > >> Subsystem: 1028:0685 > > PCI SSID is 1028:0685. > > > >> Codec: Creative CA0132 > >> Address: 0 > >> AFG Function Id: 0x1 (unsol 1) > >> Vendor Id: 0x11020011 > >> Subsystem Id: 0x10280685 > > Codec SSID is also 1028:0685. > I couldn't find any occurrence of SND_PCI_QUIRK() to mess up with in > patch_ca0132.c. > I gave a look at patch_realtek.c and got something like: > > enum { > CA0132_FIXUP_CORE3D_EX > } > > static const struct hda_fixup ca0132_fixups[] = { > [CA0132_FIXUP_CORE3D_EX] = { > .type = HDA_FIXUP_PINS, > .v.pins = (const struct hda_pintbl[]) { > { 0x0f, 0x032110f0 }, /* headphones */ > { } > } > }, > {} > } > > static const struct snd_pci_quirk alc861_fixup_tbl[] = { > SND_PCI_QUIRK(0x1028, 0x0685, "Alienware 15", CA0132_FIXUP_CORE3D_EX), > {} > }; > > But I don't know how to load this on ca0132. > It there any simple documentation about quirks? I fear this is beyond my > capabilities. snd_pci_quirk_lookup() just returns a value matching in the given table. Provide a table like: enum { QUIRK_NONE, QUIRK_ALIENWARE, }; static const struct snd_pci_quirk ca0132_quirks[] = { SND_PCI_QUIRK(0x1028, 0x0685, "Alienware 15", QUIRK_ALIENWARE), {} }; then somewhere in the probe, check the table spec->quirk = snd_pci_quirk_lookup(codec->bus->pci, ca0132_quirks); then refer it appropriately if (spec->quirk == QUIRK_ALIENWARE) { spec->out_pins[1] = 0x0f; .... } else { spec->out_pins[1] = 0x10; .... } The current ca0132 code has way too may fixed assignment, so the pin reassignment like other codec drivers doesn't work as is. We'd need to sort it out first. So, start from the simple workaround. Takashi