[alsa-devel] ALC882 on Abit AW9D-MAX
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Thanks,
At Thu, 12 Apr 2007 13:09:59 +0300, Dan Aloni wrote:
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Most of such problems are caused by buggy BIOS, as the driver tries to set up based on BIOS information if the device is unknown.
Did you try to pass model options for ALC882? For example, model=3stack or model=6stack. Also, position_fix option is worth try to fix some playback problems.
HTH,
Takashi
On Thu, Apr 12, 2007 at 02:34:49PM +0200, Takashi Iwai wrote:
At Thu, 12 Apr 2007 13:09:59 +0300, Dan Aloni wrote:
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Most of such problems are caused by buggy BIOS, as the driver tries to set up based on BIOS information if the device is unknown.
Maybe it's worth printing abouting this during load, something in the lines of "BIOS-based initialization might be wrong..." etc.
Did you try to pass model options for ALC882? For example, model=3stack or model=6stack. Also, position_fix option is worth try to fix some playback problems.
Okay, I'll try to fiddle with the settings according to your suggestion - and if it works I'll post a patch for my board.
Thanks,
At Thu, 12 Apr 2007 15:51:30 +0300, Dan Aloni wrote:
On Thu, Apr 12, 2007 at 02:34:49PM +0200, Takashi Iwai wrote:
At Thu, 12 Apr 2007 13:09:59 +0300, Dan Aloni wrote:
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Most of such problems are caused by buggy BIOS, as the driver tries to set up based on BIOS information if the device is unknown.
Maybe it's worth printing abouting this during load, something in the lines of "BIOS-based initialization might be wrong..." etc.
Yeah, I found it when looking at the bug report above. (Sorry, too little time to respond BTS nowadays...)
Did you try to pass model options for ALC882? For example, model=3stack or model=6stack. Also, position_fix option is worth try to fix some playback problems.
Okay, I'll try to fiddle with the settings according to your suggestion - and if it works I'll post a patch for my board.
Thanks. The options are listed in Documentation/ALSA-Configuration.txt. Also, I recommend you to get the latest ALSA driver/kernel tree from HG for debugging. The rest, alsa-lib and utils should be OK with older versions in most cases.
Takashi
On Thu, Apr 12, 2007 at 02:34:49PM +0200, Takashi Iwai wrote:
At Thu, 12 Apr 2007 13:09:59 +0300, Dan Aloni wrote:
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Most of such problems are caused by buggy BIOS, as the driver tries to set up based on BIOS information if the device is unknown.
Did you try to pass model options for ALC882? For example, model=3stack or model=6stack. Also, position_fix option is worth try to fix some playback problems.
Okay, so based on the 2.6.21-rc6 codebase:
position_fix=1 fixed the clicks.
Concerning the speakers - I have found that if I swap the orange and black - it works.
Of course, it wouldn't be right to swap them out physically (i.e. black connects to orange socket and orange to black socket), so I made a patch for it.
BTW, I have double-checked that everything is wired correctly in my 5.1 system (i.e, Front = Green jack, Rear = Black jack, Center and LFE = Orange jack).
NOTE: This patch is *UGLY*. I don't expect you to commit it, but it provides some info on how to detect my board. You guys properly have a better idea on how to implement it.
Signed-off-by: Dan Aloni da-x@monatomic.org
diff --git a/hda_intel.c b/hda_intel.c index 1672cac..0566147 100644 --- a/hda_intel.c +++ b/hda_intel.c @@ -1520,6 +1520,7 @@ static int azx_dev_free(struct snd_device *device) */ static const struct snd_pci_quirk position_fix_list[] __devinitdata = { SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_NONE), + SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", POS_FIX_POSBUF), {} };
diff --git a/patch_realtek.c b/patch_realtek.c index fba3cb1..4b09c61 100644 --- a/patch_realtek.c +++ b/patch_realtek.c @@ -123,6 +123,7 @@ enum { enum { ALC882_3ST_DIG, ALC882_6ST_DIG, + ALC882_ABIT, ALC882_ARIMA, ALC882_AUTO, ALC885_MACPRO, @@ -3007,7 +3008,7 @@ static void alc880_auto_init_analog_input(struct hda_codec *codec)
/* parse the BIOS configuration and set up the alc_spec */ /* return 1 if successful, 0 if the proper config is not found, or a negative error code */ -static int alc880_parse_auto_config(struct hda_codec *codec) +static int alc880_parse_auto_config(struct hda_codec *codec, int abit) { struct alc_spec *spec = codec->spec; int err; @@ -3016,6 +3017,14 @@ static int alc880_parse_auto_config(struct hda_codec *codec) if ((err = snd_hda_parse_pin_def_config(codec, &spec->autocfg, alc880_ignore)) < 0) return err; + + if (abit) { + struct auto_pin_cfg *cfg = &spec->autocfg; + hda_nid_t nid = cfg->line_out_pins[1]; + cfg->line_out_pins[1] = cfg->line_out_pins[2]; + cfg->line_out_pins[2] = nid; + } + if (! spec->autocfg.line_outs) return 0; /* can't find valid BIOS pin config */
@@ -3082,7 +3091,7 @@ static int patch_alc880(struct hda_codec *codec)
if (board_config == ALC880_AUTO) { /* automatic parse from the BIOS config */ - err = alc880_parse_auto_config(codec); + err = alc880_parse_auto_config(codec, 0); if (err < 0) { alc_free(codec); return err; @@ -4781,6 +4790,7 @@ static struct snd_kcontrol_new alc882_capture_mixer[] = { static const char *alc882_models[ALC882_MODEL_LAST] = { [ALC882_3ST_DIG] = "3stack-dig", [ALC882_6ST_DIG] = "6stack-dig", + [ALC882_ABIT] = "abit", [ALC882_ARIMA] = "arima", [ALC885_MACPRO] = "macpro", [ALC882_AUTO] = "auto", @@ -4792,6 +4802,7 @@ static struct snd_pci_quirk alc882_cfg_tbl[] = { SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA), SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG), + SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_ABIT), {} };
@@ -4907,10 +4918,10 @@ static void alc882_auto_init_analog_input(struct hda_codec *codec) }
/* almost identical with ALC880 parser... */ -static int alc882_parse_auto_config(struct hda_codec *codec) +static int alc882_parse_auto_config(struct hda_codec *codec, int abit) { struct alc_spec *spec = codec->spec; - int err = alc880_parse_auto_config(codec); + int err = alc880_parse_auto_config(codec, abit);
if (err < 0) return err; @@ -4932,6 +4943,7 @@ static int patch_alc882(struct hda_codec *codec) { struct alc_spec *spec; int err, board_config; + int abit = 0;
spec = kzalloc(sizeof(*spec), GFP_KERNEL); if (spec == NULL) @@ -4956,9 +4968,14 @@ static int patch_alc882(struct hda_codec *codec) } }
+ if (board_config == ALC882_ABIT) { + abit = 1; + board_config = ALC882_AUTO; + } + if (board_config == ALC882_AUTO) { /* automatic parse from the BIOS config */ - err = alc882_parse_auto_config(codec); + err = alc882_parse_auto_config(codec, abit); if (err < 0) { alc_free(codec); return err; @@ -5826,7 +5843,7 @@ static void alc883_auto_init_analog_input(struct hda_codec *codec) static int alc883_parse_auto_config(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; - int err = alc880_parse_auto_config(codec); + int err = alc880_parse_auto_config(codec, 0);
if (err < 0) return err;
On Fri, Apr 13, 2007 at 12:11:41AM +0300, Dan Aloni wrote:
On Thu, Apr 12, 2007 at 02:34:49PM +0200, Takashi Iwai wrote:
At Thu, 12 Apr 2007 13:09:59 +0300, Dan Aloni wrote:
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Most of such problems are caused by buggy BIOS, as the driver tries to set up based on BIOS information if the device is unknown.
Did you try to pass model options for ALC882? For example, model=3stack or model=6stack. Also, position_fix option is worth try to fix some playback problems.
Okay, so based on the 2.6.21-rc6 codebase:
position_fix=1 fixed the clicks.
BTW I had no success with any of the provided preset models - they were less correct than the auto mode (e.g. no rear with 6stack-dig).
I also noticed that in the patch I accidently implemented position_fix=2, but it seems to work okay too.
At Fri, 13 Apr 2007 00:23:22 +0300, Dan Aloni wrote:
On Fri, Apr 13, 2007 at 12:11:41AM +0300, Dan Aloni wrote:
On Thu, Apr 12, 2007 at 02:34:49PM +0200, Takashi Iwai wrote:
At Thu, 12 Apr 2007 13:09:59 +0300, Dan Aloni wrote:
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Most of such problems are caused by buggy BIOS, as the driver tries to set up based on BIOS information if the device is unknown.
Did you try to pass model options for ALC882? For example, model=3stack or model=6stack. Also, position_fix option is worth try to fix some playback problems.
Okay, so based on the 2.6.21-rc6 codebase:
position_fix=1 fixed the clicks.
BTW I had no success with any of the provided preset models - they were less correct than the auto mode (e.g. no rear with 6stack-dig).
OK, that's somewhat expected.
I also noticed that in the patch I accidently implemented position_fix=2, but it seems to work okay too.
Interesting. As default, the driver behaves as same as position_fix=2 (using a position-buffer), but with an additional check of validity. Then it falls back to position_fix=1.
Maybe the validity check doesn't work well in your case. Or, it happens in some rare condition.
Takashi
At Fri, 13 Apr 2007 00:11:41 +0300, Dan Aloni wrote:
On Thu, Apr 12, 2007 at 02:34:49PM +0200, Takashi Iwai wrote:
At Thu, 12 Apr 2007 13:09:59 +0300, Dan Aloni wrote:
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Most of such problems are caused by buggy BIOS, as the driver tries to set up based on BIOS information if the device is unknown.
Did you try to pass model options for ALC882? For example, model=3stack or model=6stack. Also, position_fix option is worth try to fix some playback problems.
Okay, so based on the 2.6.21-rc6 codebase:
position_fix=1 fixed the clicks.
Concerning the speakers - I have found that if I swap the orange and black - it works.
I had a similar bug report once and it was also an 8-channel device. Could you try the patch below?
Takashi
diff -r 3f196675e724 pci/hda/hda_codec.c --- a/pci/hda/hda_codec.c Fri Aug 04 19:08:03 2006 +0200 +++ b/pci/hda/hda_codec.c Mon Aug 07 14:55:42 2006 +0200 @@ -2122,16 +2122,19 @@ int snd_hda_parse_pin_def_config(struct */ switch (cfg->line_outs) { case 3: + case 4: nid = cfg->line_out_pins[1]; cfg->line_out_pins[1] = cfg->line_out_pins[2]; cfg->line_out_pins[2] = nid; break; +#if 0 /* seems wrong */ case 4: nid = cfg->line_out_pins[1]; cfg->line_out_pins[1] = cfg->line_out_pins[3]; cfg->line_out_pins[3] = cfg->line_out_pins[2]; cfg->line_out_pins[2] = nid; break; +#endif }
/*
At Fri, 13 Apr 2007 12:21:51 +0200, I wrote:
At Fri, 13 Apr 2007 00:11:41 +0300, Dan Aloni wrote:
On Thu, Apr 12, 2007 at 02:34:49PM +0200, Takashi Iwai wrote:
At Thu, 12 Apr 2007 13:09:59 +0300, Dan Aloni wrote:
Hello,
Yesterday I posted this bug in the bugtracker:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3013
I have received no reponse yet.
I'd like to cooperate on solving this.
Most of such problems are caused by buggy BIOS, as the driver tries to set up based on BIOS information if the device is unknown.
Did you try to pass model options for ALC882? For example, model=3stack or model=6stack. Also, position_fix option is worth try to fix some playback problems.
Okay, so based on the 2.6.21-rc6 codebase:
position_fix=1 fixed the clicks.
Concerning the speakers - I have found that if I swap the orange and black - it works.
I had a similar bug report once and it was also an 8-channel device. Could you try the patch below?
Dan, did you try it?
Takashi
Takashi
diff -r 3f196675e724 pci/hda/hda_codec.c --- a/pci/hda/hda_codec.c Fri Aug 04 19:08:03 2006 +0200 +++ b/pci/hda/hda_codec.c Mon Aug 07 14:55:42 2006 +0200 @@ -2122,16 +2122,19 @@ int snd_hda_parse_pin_def_config(struct */ switch (cfg->line_outs) { case 3:
- case 4: nid = cfg->line_out_pins[1]; cfg->line_out_pins[1] = cfg->line_out_pins[2]; cfg->line_out_pins[2] = nid; break;
+#if 0 /* seems wrong */ case 4: nid = cfg->line_out_pins[1]; cfg->line_out_pins[1] = cfg->line_out_pins[3]; cfg->line_out_pins[3] = cfg->line_out_pins[2]; cfg->line_out_pins[2] = nid; break; +#endif }
/* _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
On Wed, Apr 18, 2007 at 02:29:47PM +0200, Takashi Iwai wrote:
At Fri, 13 Apr 2007 12:21:51 +0200, I wrote:
At Fri, 13 Apr 2007 00:11:41 +0300, Dan Aloni wrote:
[...]
Okay, so based on the 2.6.21-rc6 codebase:
position_fix=1 fixed the clicks.
Concerning the speakers - I have found that if I swap the orange and black - it works.
I had a similar bug report once and it was also an 8-channel device. Could you try the patch below?
Dan, did you try it?
I just reverted my own changes and tried your patch - it didn't fix the problem.
_From what I figured, for my card (where cfg->line_outs == 4) the code from below should be like this:
case 4: if ([Abit-AW9D-MAX ALC822 quirk]) { nid = cfg->line_out_pins[2]; cfg->line_out_pins[2] = cfg->line_out_pins[3]; cfg->line_out_pins[3] = nid; } else { nid = cfg->line_out_pins[1]; cfg->line_out_pins[1] = cfg->line_out_pins[3]; cfg->line_out_pins[3] = cfg->line_out_pins[2]; cfg->line_out_pins[2] = nid; } break;
Explanation:
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?
diff -r 3f196675e724 pci/hda/hda_codec.c --- a/pci/hda/hda_codec.c Fri Aug 04 19:08:03 2006 +0200 +++ b/pci/hda/hda_codec.c Mon Aug 07 14:55:42 2006 +0200 @@ -2122,16 +2122,19 @@ int snd_hda_parse_pin_def_config(struct */ switch (cfg->line_outs) { case 3:
- case 4: nid = cfg->line_out_pins[1]; cfg->line_out_pins[1] = cfg->line_out_pins[2]; cfg->line_out_pins[2] = nid; break;
+#if 0 /* seems wrong */ case 4: nid = cfg->line_out_pins[1]; cfg->line_out_pins[1] = cfg->line_out_pins[3]; cfg->line_out_pins[3] = cfg->line_out_pins[2]; cfg->line_out_pins[2] = nid; break; +#endif }
At Fri, 20 Apr 2007 13:49:47 +0300, Dan Aloni wrote:
On Wed, Apr 18, 2007 at 02:29:47PM +0200, Takashi Iwai wrote:
At Fri, 13 Apr 2007 12:21:51 +0200, I wrote:
At Fri, 13 Apr 2007 00:11:41 +0300, Dan Aloni wrote:
[...]
Okay, so based on the 2.6.21-rc6 codebase:
position_fix=1 fixed the clicks.
Concerning the speakers - I have found that if I swap the orange and black - it works.
I had a similar bug report once and it was also an 8-channel device. Could you try the patch below?
Dan, did you try it?
I just reverted my own changes and tried your patch - it didn't fix the problem.
From what I figured, for my card (where cfg->line_outs == 4) the code from below should be like this:
case 4: if ([Abit-AW9D-MAX ALC822 quirk]) { nid = cfg->line_out_pins[2]; cfg->line_out_pins[2] = cfg->line_out_pins[3]; cfg->line_out_pins[3] = nid; } else { nid = cfg->line_out_pins[1]; cfg->line_out_pins[1] = cfg->line_out_pins[3]; cfg->line_out_pins[3] = cfg->line_out_pins[2]; cfg->line_out_pins[2] = nid; } break;
Explanation:
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?
thanks,
Takashi
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:
Codec: Realtek ALC882 Address: 0 Vendor Id: 0x10ec0882 Subsystem Id: 0x147ba501 Revision Id: 0x100101 Default PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Default Amp-In caps: N/A Default Amp-Out caps: N/A Node 0x02 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x03 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x04 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x05 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital PCM: rates [0x560]: 44100 48000 96000 192000 bits [0x1e]: 16 20 24 32 formats [0x1]: PCM Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x00 0x00] PCM: rates [0x160]: 44100 48000 96000 bits [0x6]: 16 20 formats [0x1]: PCM Connection: 1 0x24 Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x00 0x00] PCM: rates [0x160]: 44100 48000 96000 bits [0x6]: 16 20 formats [0x1]: PCM Connection: 1 0x23 Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x00 0x00] PCM: rates [0x160]: 44100 48000 96000 bits [0x6]: 16 20 formats [0x1]: PCM Connection: 1 0x22 Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital PCM: rates [0x560]: 44100 48000 96000 192000 bits [0x1e]: 16 20 24 32 formats [0x1]: PCM Connection: 1 0x1f Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x80 0x80] [0x18 0x18] [0x18 0x18] [0x00 0x00] [0x19 0x19] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97] [0x97 0x97] Connection: 10 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x17 0x17] Connection: 2 0x02 0x0b Node 0x0d [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x18 0x18] Connection: 2 0x03 0x0b Node 0x0e [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x18 0x18] Connection: 2 0x04 0x0b Node 0x0f [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x17 0x17] Connection: 2 0x05 0x0b Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x12 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x14 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x083f: IN OUT HP Detect Pin Default 0x01014010: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green Pin-ctls: 0x40: OUT Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x083f: IN OUT HP Detect Pin Default 0x01018012: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Purple Pin-ctls: 0x40: OUT Connection: 5 0x0c 0x0d* 0x0e 0x0f 0x26 Node 0x16 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x083f: IN OUT HP Detect Pin Default 0x01011011: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Black Pin-ctls: 0x40: OUT Connection: 5 0x0c 0x0d 0x0e* 0x0f 0x26 Node 0x17 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x083f: IN OUT HP Detect Pin Default 0x01016014: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Orange Pin-ctls: 0x40: OUT Connection: 5 0x0c 0x0d 0x0e 0x0f* 0x26 Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x08173f: IN OUT HP Detect Pin Default 0x01a19830: [Jack] Mic at Ext Rear Conn = 1/8, Color = Pink Pin-ctls: 0x24: IN Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x19 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x08173f: IN OUT HP Detect Pin Default 0x02a1983f: [Jack] Mic at Ext Front Conn = 1/8, Color = Pink Pin-ctls: 0x24: IN Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x08173f: IN OUT HP Detect Pin Default 0x01813031: [Jack] Line In at Ext Rear Conn = 1/8, Color = Blue Pin-ctls: 0x20: IN Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x1b [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x08173f: IN OUT HP Detect Pin Default 0x02214c1f: [Jack] HP Out at Ext Front Conn = 1/8, Color = Green Pin-ctls: 0xc0: OUT HP Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x1c [Pin Complex] wcaps 0x400001: Stereo Pincap 0x0820: IN Pin Default 0x99330132: [Fixed] CD at Int ATAPI Conn = ATAPI, Color = Unknown Pin-ctls: 0x00: Node 0x1d [Pin Complex] wcaps 0x400000: Mono Pincap 0x0820: IN Pin Default 0x99830133: [Fixed] Line In at Int ATAPI Conn = ATAPI, Color = Unknown Pin-ctls: 0x00: Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital Pincap 0x0810: OUT Pin Default 0x01451120: [Jack] SPDIF Out at Ext Rear Conn = Optical, Color = Black Pin-ctls: 0x00: Connection: 1 0x06 Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital Pincap 0x0820: IN Pin Default 0x01c53140: [Jack] SPDIF In at Ext Rear Conn = Optical, Color = Blue Pin-ctls: 0x00: Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono Node 0x21 [Volume Knob Widget] wcaps 0x600080: Mono Node 0x22 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] Amp-Out caps: N/A Amp-Out vals: [0x00 0x00] Connection: 11 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b Node 0x23 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] Amp-Out caps: N/A Amp-Out vals: [0x00 0x00] Connection: 11 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b Node 0x24 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] Amp-Out caps: N/A Amp-Out vals: [0x00 0x00] Connection: 11 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b Node 0x25 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x26 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x1f 0x1f] Connection: 2 0x25 0x0b
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 */
On Fri, Apr 20, 2007 at 04:28:09PM +0200, Takashi Iwai wrote:
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.
The patch works great with 2.6.22.
Thanks.
At Tue, 10 Jul 2007 00:20:54 +0300, Dan Aloni wrote:
On Fri, Apr 20, 2007 at 04:28:09PM +0200, Takashi Iwai wrote:
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.
The patch works great with 2.6.22.
Thanks for confirmation. It's merged to ALSA HG tree now.
Takashi
participants (2)
-
Dan Aloni
-
Takashi Iwai