From: Massimo Del Fedele <max@veneto.com>
To: alsa-devel@alsa-project.org
Subject: Re: Fix for Asus G75 notebook subwoofer
Date: Tue, 06 Nov 2012 18:23:51 +0100 [thread overview]
Message-ID: <509947A7.9080406@veneto.com> (raw)
In-Reply-To: <s5h390m95d5.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]
Il 06/11/2012 15:24, Takashi Iwai ha scritto:
> At Tue, 06 Nov 2012 15:18:58 +0100,
> Massimo Del Fedele wrote:
>> Il 06/11/2012 10:06, Takashi Iwai ha scritto:
>>
>>> Could you attach to ML too?
>> I tried, but they're too big
> Did you compress it?
No, but I'm doing now... in compressed file are both info
>
>>>> BTW, did you see the above patch (error in via_auto_fill_dac_nids) ?
>>>> My patch isn't correct either (fails when the 'continue' path is taken)
>>>> but it's better than now. I guess that code should be rewritten, it's
>>>> quite weird in respect to dac numbering.
>>> Could you elaborate a bit more?
>>>
>> Ok. here the original functions :
> Hmm... could you give a "diff -up" output instead?
Ok... here is te diff (with whole asus patch). I cleaned up the part of via_auto_fill_dac_nids,
it should be correct now in all parts, even for skipped nids.
>
> In anyway, mail me directly and add Cc to ML. This is the standard
> way to reach developers. People (including me) don't read ML often
> but check the inbox more frequently.
Ok, thank you for telling
>
> Takashi
>
Massimo
[-- Attachment #2: alsa-info.tar.bz2 --]
[-- Type: application/x-bzip, Size: 40960 bytes --]
[-- Attachment #3: asusG75.diff --]
[-- Type: text/x-patch, Size: 3285 bytes --]
--- ../../../../patch_via.c 2012-09-24 14:33:19.000000000 +0200
+++ patch_via.c 2012-11-06 18:07:02.069073574 +0100
@@ -1868,31 +1868,28 @@ static int via_auto_fill_dac_nids(struct
{
struct via_spec *spec = codec->spec;
const struct auto_pin_cfg *cfg = &spec->autocfg;
- int i, dac_num;
+ int i;
hda_nid_t nid;
spec->multiout.dac_nids = spec->private_dac_nids;
- dac_num = 0;
+ spec->multiout.num_dacs = 0;
for (i = 0; i < cfg->line_outs; i++) {
hda_nid_t dac = 0;
nid = cfg->line_out_pins[i];
if (!nid)
continue;
- if (parse_output_path(codec, nid, 0, 0, &spec->out_path[i]))
- dac = spec->out_path[i].path[0];
+ if (parse_output_path(codec, nid, 0, 0, &spec->out_path[spec->multiout.num_dacs]))
+ dac = spec->out_path[spec->multiout.num_dacs].path[0];
if (!i && parse_output_path(codec, nid, dac, 1,
&spec->out_mix_path))
dac = spec->out_mix_path.path[0];
- if (dac) {
- spec->private_dac_nids[i] = dac;
- dac_num++;
- }
+ if (dac)
+ spec->private_dac_nids[spec->multiout.num_dacs++] = dac;
}
if (!spec->out_path[0].depth && spec->out_mix_path.depth) {
spec->out_path[0] = spec->out_mix_path;
spec->out_mix_path.depth = 0;
}
- spec->multiout.num_dacs = dac_num;
return 0;
}
@@ -3326,7 +3323,6 @@ static int add_secret_dac_path(struct hd
return 0;
}
-
static int patch_vt1718S(struct hda_codec *codec)
{
struct via_spec *spec;
@@ -3692,6 +3688,40 @@ static const struct snd_pci_quirk vt2002
{}
};
+/* Fixes for Asus G75 subwoofer
+ pin 24 is marked as speaker by bios -- should mark as line
+ pin 33 has a wrong connection to out-of-range nid #3e
+*/
+ static int fix_asus_g75_subwoofer(struct hda_codec *codec)
+ {
+ /* right connection to pin widget #33 */
+ hda_nid_t conn[8] = {0x1c};
+ unsigned int conf;
+
+ /* Fix connection of pin widget #33 on VT1802p
+ * reported connection (33-1e) refers to non-existent widget #1e which in turn
+ * reports a connection to #1c; we skip nonexistent 1e widget landing directly
+ * on 1c one
+ */
+ snd_hda_override_conn_list(codec, 0x33, 1, conn);
+
+ // pin 24 should be marked as line out pin (not speaker as in bios)
+ // and as AC_JACK_PORT_COMPLEX connection to avoid to be taken by autoparser as a speaker
+ conf = snd_hda_codec_get_pincfg(codec, 0x24);
+ conf = conf & ~AC_DEFCFG_DEVICE;
+ conf = (conf & ~AC_DEFCFG_PORT_CONN) | (AC_JACK_PORT_COMPLEX << AC_DEFCFG_PORT_CONN_SHIFT);
+ snd_hda_codec_set_pincfg(codec, 0x24, conf);
+
+ // pin 33 should be marked as line out pin (not speaker as in bios)
+ // and as AC_JACK_PORT_COMPLEX, not AC_JACK_PORT_NONE as in bios
+ conf = snd_hda_codec_get_pincfg(codec, 0x33);
+ conf = conf & ~AC_DEFCFG_DEVICE;
+ conf = (conf & ~AC_DEFCFG_PORT_CONN) | (AC_JACK_PORT_COMPLEX << AC_DEFCFG_PORT_CONN_SHIFT);
+ snd_hda_codec_set_pincfg(codec, 0x33, conf);
+
+ return 0;
+}
+
/* patch for vt2002P */
static int patch_vt2002P(struct hda_codec *codec)
{
@@ -3703,6 +3733,10 @@ static int patch_vt2002P(struct hda_code
if (spec == NULL)
return -ENOMEM;
+ /* should check for asus g75 model instead...*/
+ if (spec->codec_type == VT1802)
+ fix_asus_g75_subwoofer(codec);
+
spec->aa_mix_nid = 0x21;
override_mic_boost(codec, 0x2b, 0, 3, 40);
override_mic_boost(codec, 0x29, 0, 3, 40);
[-- Attachment #4: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-11-06 17:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 16:49 Fix for Asus G75 notebook subwoofer Massimo Del Fedele
2012-11-01 8:11 ` Raymond Yau
2012-11-01 11:15 ` Massimo Del Fedele
2012-11-02 1:44 ` Raymond Yau
2012-11-02 14:57 ` Massimo Del Fedele
2012-11-03 0:37 ` Raymond Yau
2012-11-03 9:04 ` Massimo Del Fedele
2012-11-04 6:27 ` Raymond Yau
2012-11-04 9:31 ` Massimo Del Fedele
2012-11-07 0:50 ` Raymond Yau
2012-11-06 8:36 ` Takashi Iwai
2012-11-06 8:57 ` Massimo Del Fedele
2012-11-06 9:06 ` Takashi Iwai
2012-11-06 14:18 ` Massimo Del Fedele
2012-11-06 14:24 ` Takashi Iwai
2012-11-06 17:23 ` Massimo Del Fedele [this message]
2012-11-07 8:56 ` Takashi Iwai
2012-11-07 8:56 ` Takashi Iwai
2012-11-07 13:37 ` Massimo Del Fedele
2012-11-07 13:45 ` Takashi Iwai
2012-11-07 15:51 ` Massimo Del Fedele
2012-11-07 15:54 ` Takashi Iwai
2012-11-07 17:02 ` Massimo Del Fedele
2012-11-07 17:13 ` 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=509947A7.9080406@veneto.com \
--to=max@veneto.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