
On 28/04/2015 08:15, Takashi Iwai wrote:
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.
Thank you for your explanation. I managed to fix the pin address, but as I told before the jack detection is totally messed up. "hdajacksensetest" fails with: Ioctl call failed with error 16
I can't understand why, as ca0132_select_out() already relies on spec->out_pins[0] and spec->out_pins[1].
Regards, Gabriele