From: Takashi Iwai <tiwai@suse.de>
To: Dan Aloni <da-x@monatomic.org>
Cc: alsa-devel@alsa-project.org
Subject: Re: ALC882 on Abit AW9D-MAX
Date: Fri, 20 Apr 2007 16:28:09 +0200 [thread overview]
Message-ID: <s5hmz13w26e.wl%tiwai@suse.de> (raw)
In-Reply-To: <20070420111318.GA3134@localdomain>
At Fri, 20 Apr 2007 14:13:18 +0300,
Dan Aloni wrote:
>
> On Fri, Apr 20, 2007 at 01:00:03PM +0200, Takashi Iwai wrote:
> > At Fri, 20 Apr 2007 13:49:47 +0300,
> > Dan Aloni wrote:
> [...]
> > > case 4 originally does {1<=3,3<=2,2<=1}, my working fix effectively
> > > adds {1<=2,2<=1}, which means we need to do {1<=1,3<=2,2<=3}, or just
> > > {3<=2,2<=3}.
> > >
> > > Right?
> >
> > Sounds so. Could you attach the content of /proc/asound/card0/codec#*
> > file to re-check?
>
> Okay. I got the following output *with* my fix applied:
Thanks. Apparently the default pin config values are wrong, so it's a
BIOS bug.
I reread the pin-configuration spec and my last patch is correct. The
configuration of 7.1 outputs is Front/CLFE/Rear/Side. So, I committed
a patch to HG tree.
Now about your fix. I think the best way is to override the pin
default configuration. The patch below is the fix on the top of the
latest ALSA HG tree. Use hg.alsa-project.org since
hg-mirror.alsa-project.org seems (again) out of sync right now.
I have a plan (even high position of my TODO list :) to move the
HD-audio configuration parser to user-space so that this kind of hack
/ fix would be more easily done.
Takashi
diff -r 67cb6a84c18a pci/hda/patch_realtek.c
--- a/pci/hda/patch_realtek.c Fri Apr 20 16:11:43 2007 +0200
+++ b/pci/hda/patch_realtek.c Fri Apr 20 16:16:25 2007 +0200
@@ -679,6 +679,38 @@ static void alc_subsystem_id(struct hda_
snd_hda_codec_write(codec, 0x1a, 0, AC_VERB_SET_PROC_COEF,
(tmp == 5 ? 0x3040 : 0x3050));
break;
+ }
+}
+
+/*
+ * Fix-up pin default configurations
+ */
+
+struct alc_pincfg {
+ hda_nid_t nid;
+ u32 val;
+};
+
+static void alc_fix_pincfg(struct hda_codec *codec,
+ const struct snd_pci_quirk *quirk,
+ const struct alc_pincfg **pinfix)
+{
+ const struct alc_pincfg *cfg;
+
+ quirk = snd_pci_quirk_lookup(codec->bus->pci, quirk);
+ if (!quirk)
+ return;
+
+ cfg = pinfix[quirk->value];
+ for (; cfg->nid; cfg++) {
+ int i;
+ u32 val = cfg->val;
+ for (i = 0; i < 4; i++) {
+ snd_hda_codec_write(codec, cfg->nid, 0,
+ AC_VERB_SET_CONFIG_DEFAULT_BYTES_0 + i,
+ val & 0xff);
+ val >>= 8;
+ }
}
}
@@ -5133,6 +5165,29 @@ static struct alc_config_preset alc882_p
/*
+ * Pin config fixes
+ */
+enum {
+ PINFIX_ABIT_AW9D_MAX
+};
+
+static struct alc_pincfg alc882_abit_aw9d_pinfix[] = {
+ { 0x15, 0x01080104 }, /* side */
+ { 0x16, 0x01011012 }, /* rear */
+ { 0x17, 0x01016011 }, /* clfe */
+ { }
+};
+
+static const struct alc_pincfg *alc882_pin_fixes[] = {
+ [PINFIX_ABIT_AW9D_MAX] = alc882_abit_aw9d_pinfix,
+};
+
+static struct snd_pci_quirk alc882_pinfix_tbl[] = {
+ SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", PINFIX_ABIT_AW9D_MAX),
+ {}
+};
+
+/*
* BIOS auto configuration
*/
static void alc882_auto_set_output_and_unmute(struct hda_codec *codec,
@@ -5253,6 +5308,8 @@ static int patch_alc882(struct hda_codec
board_config = ALC882_AUTO;
}
}
+
+ alc_fix_pincfg(codec, alc882_pinfix_tbl, alc882_pin_fixes);
if (board_config == ALC882_AUTO) {
/* automatic parse from the BIOS config */
next prev parent reply other threads:[~2007-04-20 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070412100959.GA8944@localdomain>
[not found] ` <s5hmz1dwz2u.wl%tiwai@suse.de>
[not found] ` <20070412211141.GA8625@localdomain>
[not found] ` <s5hy7kwvakg.wl%tiwai@suse.de>
[not found] ` <s5hd521hnlw.wl%tiwai@suse.de>
2007-04-20 10:49 ` ALC882 on Abit AW9D-MAX Dan Aloni
2007-04-20 11:00 ` Takashi Iwai
2007-04-20 11:13 ` Dan Aloni
2007-04-20 14:28 ` Takashi Iwai [this message]
2007-07-09 21:20 ` Dan Aloni
2007-07-10 9:32 ` 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=s5hmz13w26e.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=da-x@monatomic.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