[alsa-devel] Intel HDA / ca0132: support for Alienware 15 Creative Sound Core3D-EX

Takashi Iwai tiwai at suse.de
Tue Apr 28 08:15:33 CEST 2015


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


More information about the Alsa-devel mailing list