* [PATCH] hda driver, correct bug in model "auto"
@ 2005-07-19 21:34 Nicolas GRAZIANO
2005-07-27 9:37 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas GRAZIANO @ 2005-07-19 21:34 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
- Correct some index variable inversion in patch_cmedia.c
- Correct the channels order in model autodetection (not sure of this
part, I need validation)
Signed-off-by: Nicolas Graziano <nicolas.graziano@wanadoo.fr>
[-- Attachment #2: hda_auto.diff --]
[-- Type: text/x-patch, Size: 1663 bytes --]
Index: pci/hda/hda_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_codec.c,v
retrieving revision 1.20
diff -u -r1.20 hda_codec.c
--- pci/hda/hda_codec.c 13 Jun 2005 13:16:39 -0000 1.20
+++ pci/hda/hda_codec.c 19 Jul 2005 20:53:04 -0000
@@ -1804,12 +1804,20 @@
}
/* Swap surround and CLFE: the association order is front/CLFE/surr/back */
- if (cfg->line_outs >= 3) {
+ if (cfg->line_outs == 3) {
nid = cfg->line_out_pins[1];
cfg->line_out_pins[1] = cfg->line_out_pins[2];
cfg->line_out_pins[2] = nid;
}
+ if (cfg->line_outs >= 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;
+ }
+
+
return 0;
}
Index: pci/hda/patch_cmedia.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/patch_cmedia.c,v
retrieving revision 1.10
diff -u -r1.10 patch_cmedia.c
--- pci/hda/patch_cmedia.c 13 Jun 2005 13:16:39 -0000 1.10
+++ pci/hda/patch_cmedia.c 19 Jul 2005 20:53:04 -0000
@@ -408,7 +408,7 @@
/* search for an empty channel */
for (j = 0; j < cfg->line_outs; j++) {
if (! assigned[j]) {
- spec->dac_nids[i] = i + 0x03;
+ spec->dac_nids[i] = j + 0x03;
assigned[j] = 1;
break;
}
@@ -444,11 +444,10 @@
len = snd_hda_get_connections(codec, nid, conn, 4);
for (k = 0; k < len; k++)
if (conn[k] == spec->dac_nids[i]) {
- spec->multi_init[j].param = j;
+ spec->multi_init[j].param = k;
break;
}
j++;
- break;
}
}
return 0;
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] hda driver, correct bug in model "auto" 2005-07-19 21:34 [PATCH] hda driver, correct bug in model "auto" Nicolas GRAZIANO @ 2005-07-27 9:37 ` Takashi Iwai 2005-07-27 18:32 ` Nicolas GRAZIANO 0 siblings, 1 reply; 6+ messages in thread From: Takashi Iwai @ 2005-07-27 9:37 UTC (permalink / raw) To: Nicolas GRAZIANO; +Cc: alsa-devel At Tue, 19 Jul 2005 23:34:20 +0200, Nicolas GRAZIANO wrote: > > - Correct the channels order in model autodetection (not sure of this > part, I need validation) I think this is not correct (although I'm not 100% sure, too). The association order is front/clfe/surround/side. (The comment in hda_codec.c is wrong.) I'll apply the fix for c-media now. Thanks, Takashi ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda driver, correct bug in model "auto" 2005-07-27 9:37 ` Takashi Iwai @ 2005-07-27 18:32 ` Nicolas GRAZIANO 2005-07-28 9:06 ` Takashi Iwai 0 siblings, 1 reply; 6+ messages in thread From: Nicolas GRAZIANO @ 2005-07-27 18:32 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel Takashi Iwai a écrit : >At Tue, 19 Jul 2005 23:34:20 +0200, >Nicolas GRAZIANO wrote: > > >>- Correct the channels order in model autodetection (not sure of this >>part, I need validation) >> >> > >I think this is not correct (although I'm not 100% sure, too). >The association order is front/clfe/surround/side. >(The comment in hda_codec.c is wrong.) > > > I make the modification because I was thinking than the order was front/clfe/side/back (aka surround ?) and the text on back panel of my motherboard (ASUS P5AD2) make me more confident (with my modification the channels are at the right place). Can we check with an other card/codec ? an another question : the model full_dig correspond to the position on back panel of my motherboard, can we make the selection of model automatic ? lspci -vn for my card : 0000:00:1b.0 0403: 8086:2668 (rev 03) Subsystem: 1043:813d thanks in advance, Nicolas ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&op=click ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda driver, correct bug in model "auto" 2005-07-27 18:32 ` Nicolas GRAZIANO @ 2005-07-28 9:06 ` Takashi Iwai 2005-07-28 18:32 ` Nicolas GRAZIANO 0 siblings, 1 reply; 6+ messages in thread From: Takashi Iwai @ 2005-07-28 9:06 UTC (permalink / raw) To: Nicolas GRAZIANO; +Cc: alsa-devel At Wed, 27 Jul 2005 20:32:24 +0200, Nicolas GRAZIANO wrote: > > Takashi Iwai a écrit : > > >At Tue, 19 Jul 2005 23:34:20 +0200, > >Nicolas GRAZIANO wrote: > > > > > >>- Correct the channels order in model autodetection (not sure of this > >>part, I need validation) > >> > >> > > > >I think this is not correct (although I'm not 100% sure, too). > >The association order is front/clfe/surround/side. > >(The comment in hda_codec.c is wrong.) > > > > > > > I make the modification because I was thinking than the order was > front/clfe/side/back (aka surround ?) and the text on back panel of my > motherboard (ASUS P5AD2) make me more confident (with my modification > the channels are at the right place). Can we check with an other > card/codec ? Hmm, interesting. So, on your board, the association 3 (4th) corresponds to a surround jack? > an another question : the model full_dig correspond to the position on > back panel of my motherboard, can we make the selection of model automatic ? Sure, just add a hda_board_config entry for the corresponding pci subids. See patch_realtek.c. Takashi ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda driver, correct bug in model "auto" 2005-07-28 9:06 ` Takashi Iwai @ 2005-07-28 18:32 ` Nicolas GRAZIANO 2005-07-29 10:49 ` Takashi Iwai 0 siblings, 1 reply; 6+ messages in thread From: Nicolas GRAZIANO @ 2005-07-28 18:32 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel Takashi Iwai a écrit : >At Wed, 27 Jul 2005 20:32:24 +0200, >Nicolas GRAZIANO wrote: > > >>Takashi Iwai a écrit : >> >> >>>At Tue, 19 Jul 2005 23:34:20 +0200, >>>Nicolas GRAZIANO wrote: >>> >>> >>>>- Correct the channels order in model autodetection (not sure of this >>>>part, I need validation) >>>> >>>> >>>> >>>> >>>I think this is not correct (although I'm not 100% sure, too). >>>The association order is front/clfe/surround/side. >>>(The comment in hda_codec.c is wrong.) >>> >>> >>> >>I make the modification because I was thinking than the order was >>front/clfe/side/back (aka surround ?) and the text on back panel of my >>motherboard (ASUS P5AD2) make me more confident (with my modification >>the channels are at the right place). Can we check with an other >>card/codec ? >> >> > >Hmm, interesting. So, on your board, the association 3 (4th) >corresponds to a surround jack? > > > I am not sure to understand what you mean. But perhaps the following information will help. On the back pannel the inscription are : Green ()-> Front Orange ()-> Ctr Bass Black ()-> Side SPK Grey ()-> Rear SPK Extract of the /proc/asound/Intel/codec#0 order by the sequence number (last byte of Pincap): Node 0x0b [Pin Complex] wcaps 0x400581: Stereo Pincap 0x0833f: IN OUT HP Pin Default 0x01014010: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green Node 0x1f [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0833f: IN OUT HP Pin Default 0x01016012: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Orange Node 0x0e [Pin Complex] wcaps 0x400581: Stereo Pincap 0x081033f: IN OUT HP Pin Default 0x01011014: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Black Node 0x20 [Pin Complex] wcaps 0x400181: Stereo Pincap 0x0833f: IN OUT HP Pin Default 0x01012016: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Grey with my modification : $speaker-test -D hw:0,0 -c8 0 - Front Left --> Green Jack 4 - Center --> Orange left 1 - Front Right --> Green Jack 7 - Side Right --> Black Jack 3 - Rear Right --> Grey Jack 2 - Rear Left --> Grey Jack 6 - Side Left --> Black Jack 5 - LFE --> nothing without my modification (actual cvs code): $speaker-test -D hw:0,0 -c8 0 - Front Left --> Green Jack 4 - Center --> black Jack 1 - Front Right --> Grenn Jack 7 - Side Right --> nothing 3 - Rear Right --> orange Jack 2 - Rear Left --> orange Jack 6 - Side Left --> Grey Jack 5 - LFE --> black Jack I hope this information will help. >Sure, just add a hda_board_config entry for the corresponding pci >subids. See patch_realtek.c. > > > I try the following path for my ASUS P5AD2 and it's working. thanks Nicolas Index: pci/hda/patch_cmedia.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/patch_cmedia.c,v retrieving revision 1.11 diff -u -r1.11 patch_cmedia.c --- pci/hda/patch_cmedia.c 27 Jul 2005 16:25:08 -0000 1.11 +++ pci/hda/patch_cmedia.c 28 Jul 2005 18:22:45 -0000 @@ -647,6 +647,8 @@ { .modelname = "min_fp", .config = CMI_MIN_FP }, { .modelname = "full", .config = CMI_FULL }, { .modelname = "full_dig", .config = CMI_FULL_DIG }, + { .pci_subvendor = 0x1043, .pci_subdevice = 0x813d, .config = CMI_FULL_DIG }, + { .modelname = "allout", .config = CMI_ALLOUT }, { .modelname = "auto", .config = CMI_AUTO }, {} /* terminator */ ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] hda driver, correct bug in model "auto" 2005-07-28 18:32 ` Nicolas GRAZIANO @ 2005-07-29 10:49 ` Takashi Iwai 0 siblings, 0 replies; 6+ messages in thread From: Takashi Iwai @ 2005-07-29 10:49 UTC (permalink / raw) To: Nicolas GRAZIANO; +Cc: alsa-devel At Thu, 28 Jul 2005 20:32:41 +0200, Nicolas GRAZIANO wrote: > > Takashi Iwai a écrit : > > >At Wed, 27 Jul 2005 20:32:24 +0200, > >Nicolas GRAZIANO wrote: > > > > > >>Takashi Iwai a écrit : > >> > >> > >>>At Tue, 19 Jul 2005 23:34:20 +0200, > >>>Nicolas GRAZIANO wrote: > >>> > >>> > >>>>- Correct the channels order in model autodetection (not sure of this > >>>>part, I need validation) > >>>> > >>>> > >>>> > >>>> > >>>I think this is not correct (although I'm not 100% sure, too). > >>>The association order is front/clfe/surround/side. > >>>(The comment in hda_codec.c is wrong.) > >>> > >>> > >>> > >>I make the modification because I was thinking than the order was > >>front/clfe/side/back (aka surround ?) and the text on back panel of my > >>motherboard (ASUS P5AD2) make me more confident (with my modification > >>the channels are at the right place). Can we check with an other > >>card/codec ? > >> > >> > > > >Hmm, interesting. So, on your board, the association 3 (4th) > >corresponds to a surround jack? > > > > > > > I am not sure to understand what you mean. > But perhaps the following information will help. > On the back pannel the inscription are : > Green ()-> Front > Orange ()-> Ctr Bass > Black ()-> Side SPK > Grey ()-> Rear SPK > > Extract of the /proc/asound/Intel/codec#0 order by the sequence number > (last byte of Pincap): OK, then you seem right. It's front/clfe/side/rear. OK, let's fix that. > >Sure, just add a hda_board_config entry for the corresponding pci > >subids. See patch_realtek.c. > > > > > > > I try the following path for my ASUS P5AD2 and it's working. Will apply this, too. thanks, Takashi ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-07-29 10:49 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-07-19 21:34 [PATCH] hda driver, correct bug in model "auto" Nicolas GRAZIANO 2005-07-27 9:37 ` Takashi Iwai 2005-07-27 18:32 ` Nicolas GRAZIANO 2005-07-28 9:06 ` Takashi Iwai 2005-07-28 18:32 ` Nicolas GRAZIANO 2005-07-29 10:49 ` Takashi Iwai
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.