From: Gabriele Martino <g.martino@gmx.com>
To: alsa-devel@alsa-project.org
Subject: Re: Intel HDA / ca0132: support for Alienware 15 Creative Sound Core3D-EX
Date: Wed, 29 Apr 2015 00:47:16 +0200 [thread overview]
Message-ID: <55400DF4.2080309@gmx.com> (raw)
In-Reply-To: <s5hlhhc3hiy.wl-tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1188 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ca0132-alienware.patch --]
[-- Type: text/x-patch; name="ca0132-alienware.patch", Size: 1185 bytes --]
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 4a4e7b2..c9b0211 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -748,10 +748,24 @@
struct hda_codec *codec;
struct delayed_work unsol_hp_work;
+ const struct snd_pci_quirk *quirk;
#ifdef ENABLE_TUNING_CONTROLS
long cur_ctl_vals[TUNING_CTLS_COUNT];
#endif
+};
+
+/*
+ * CA0132 quirks table
+ */
+enum {
+ QUIRK_NONE,
+ QUIRK_ALIENWARE,
+};
+
+static const struct snd_pci_quirk ca0132_quirks[] = {
+ SND_PCI_QUIRK(0x1028, 0x0685, "Alienware 15", QUIRK_ALIENWARE),
+ {}
};
/*
@@ -4653,6 +4667,7 @@
return -ENOMEM;
codec->spec = spec;
spec->codec = codec;
+ spec->quirk = snd_pci_quirk_lookup(codec->bus->pci, ca0132_quirks);
spec->dsp_state = DSP_DOWNLOAD_INIT;
spec->num_mixers = 1;
@@ -4670,6 +4685,12 @@
ca0132_config(codec);
+ /* Apply detected quirks */
+ if (spec->quirk->value == QUIRK_ALIENWARE) {
+ codec_dbg(codec, "QUIRK_ALIENWARE applied.\n\n");
+ spec->out_pins[1] = 0x0f;
+ }
+
err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, NULL);
if (err < 0)
return err;
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2015-04-28 22:46 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
2015-04-28 22:47 ` Gabriele Martino [this message]
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=55400DF4.2080309@gmx.com \
--to=g.martino@gmx.com \
--cc=alsa-devel@alsa-project.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).