hda driver, correct bug in model "auto"
PATCH 1/1 hda driver, correct bug in model "auto"
- Correct some index variable inversion in patch_cmedia.c
- Correct the channels order in model autodetection (not sure of this part, I need validation)
Index: pci/hda/hda_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_codec.c,v retrieving revision 1.20
hda/hda_codec.c +9 -1
@@ -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
hda/patch_cmedia.c +2 -3
@@ -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 ;
At Tue, 19 Jul 2005 23:34:20 +0200,
Quoted 3 lines · Nicolas GRAZIANO
- 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
Quoted 4 lines · Takashi Iwai
At Tue, 19 Jul 2005 23:34:20 +0200,
Nicolas GRAZIANO wrote:
Quoted 11 lines
Quoted 4 lines
- 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.cis 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_id492&op=click
At Wed, 27 Jul 2005 20:32:24 +0200,
Quoted 18 lines · Nicolas GRAZIANO
Quoted 4 lines · Takashi Iwai
At Tue, 19 Jul 2005 23:34:20 +0200,
Nicolas GRAZIANO wrote:Quoted 11 lines
Quoted 4 lines
- 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.cis wrong.)
Quoted 5 lines
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?
Quoted 2 lines
an another question : the model
full_digcorrespond 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
Quoted 31 lines · Takashi Iwai
At Wed, 27 Jul 2005 20:32:24 +0200,
Quoted 19 lines · Nicolas GRAZIANO
Quoted 10 lines · Takashi Iwai
At Tue, 19 Jul 2005 23:34:20 +0200,
Quoted 6 lines · Nicolas GRAZIANO
- Correct the channels order in model autodetection (not sure of this part, I need validation)
Quoted 6 lines
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.cis wrong.)Quoted 7 lines
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 ?
Quoted 5 lines
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.
Quoted 5 lines
Sure, just add a
hda_board_configentry for the corresponding pci subids. Seepatch_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
hda/patch_cmedia.c 28 Jul 2005 18:22:45 -0000 renamed from hda/patch_cmedia.c 27 Jul 2005 16:25:08 -0000 1.11 +1 -0
@@ -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
At Thu, 28 Jul 2005 20:32:41 +0200,
Quoted 47 lines · Nicolas GRAZIANO
Quoted 31 lines · Takashi Iwai
At Wed, 27 Jul 2005 20:32:24 +0200,
Quoted 19 lines · Nicolas GRAZIANO
Quoted 10 lines · Takashi Iwai
At Tue, 19 Jul 2005 23:34:20 +0200,
Quoted 6 lines · Nicolas GRAZIANO
- Correct the channels order in model autodetection (not sure of this part, I need validation)
Quoted 6 lines
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.cis wrong.)Quoted 7 lines
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 ?
Quoted 5 lines
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
Quoted 2 lines
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.
Quoted 6 lines
Quoted 5 lines
Sure, just add a
hda_board_configentry for the corresponding pci subids. Seepatch_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