All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Gabriele Martino <g.martino@gmx.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Intel HDA / ca0132: support for Alienware 15 Creative Sound Core3D-EX
Date: Tue, 28 Apr 2015 08:15:33 +0200	[thread overview]
Message-ID: <s5hlhhc3hiy.wl-tiwai@suse.de> (raw)
In-Reply-To: <553EB55D.4060701@gmx.com>

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

  reply	other threads:[~2015-04-28  6:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-25  0:50 Intel HDA / ca0132: support for Alienware 15 Creative Sound Core3D-EX Gabriele Martino
2015-04-27  9:09 ` Takashi Iwai
2015-04-27 18:08   ` Gabriele Martino
2015-04-27 18:51     ` Takashi Iwai
2015-04-27 22:17       ` Gabriele Martino
2015-04-28  6:15         ` Takashi Iwai [this message]
2015-04-28 22:47           ` Gabriele Martino
2015-04-29 13:38             ` Takashi Iwai
2015-04-29 15:42               ` Gabriele Martino
2015-04-29 18:42                 ` Takashi Iwai
2015-04-29 23:40                   ` Gabriele Martino
2015-04-30  5:51                     ` Takashi Iwai
2015-05-01  0:36                       ` Gabriele Martino
2015-05-03 23:53                       ` Gabriele Martino
2015-05-04 12:30                         ` Takashi Iwai
2015-05-04 23:28                           ` Gabriele Martino
2015-05-11 20:17                           ` Gabriele Martino
2015-05-18  9:39                             ` Takashi Iwai
2015-05-18 19:15                               ` Gabriele Martino
2015-05-19  4:59                                 ` Takashi Iwai
2015-04-29 13:40             ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hlhhc3hiy.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=g.martino@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.