CMI9739A
I recently purchased a motherboard with an on-board CMI9739A (or so it claims)
the id is: 0x434d4983
Unfortunately, simply adding the line:
{ 0x434d4983, 0xffffffff, "CMI9739A", patch_cm9739, NULL },
causes the card to be muted, reguardless of the mixer, because of the init code in patch_cm9739 -- the init code apparently isn't compatible.
Removing the initialization code, but leaving the ops, gives a few more functional mixer options (like "Line-In as Surround" and "Mic as Center/LFE")
Signature · 8 lines
Zinx Verituse http://zinx.xmms.org/ ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
At Wed, 24 Nov 2004 18:46:49 -0600,
Quoted 7 lines · Zinx Verituse
I recently purchased a motherboard with an on-board CMI9739A (or so it claims)
the id is:
0x434d4983Unfortunately, simply adding the line:
Quoted 7 lines
{
0x434d4983,0xffffffff, "CMI9739A",patch_cm9739, NULL },causes the card to be muted, reguardless of the mixer, because of the init code in
patch_cm9739-- the init code apparently isn't compatible.Removing the initialization code, but leaving the ops, gives a few more functional mixer options (like "Line-In as Surround" and "Mic as Center/LFE")
According to the datasheet, CM9739A is indeed compatible with 9739 except for pins.
Could you get the ac97 register dump of the good- and bad-running states (from /proc/asound/card0/codec97#0/* files) ?
I guess the GPIO initialization (for using HP) is wrong there. Doing the following helps?
# echo 72 0001 > /proc/asound/card0/codec97#0/ac97#0-0+regs
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
Quoted 20 lines · Takashi Iwai
At Wed, 24 Nov 2004 18:46:49 -0600,
Quoted 7 lines · Zinx Verituse
I recently purchased a motherboard with an on-board CMI9739A (or so it claims)
the id is:
0x434d4983Unfortunately, simply adding the line:
Quoted 7 lines
{
0x434d4983,0xffffffff, "CMI9739A",patch_cm9739, NULL },causes the card to be muted, reguardless of the mixer, because of the init code in
patch_cm9739-- the init code apparently isn't compatible.Removing the initialization code, but leaving the ops, gives a few more functional mixer options (like "Line-In as Surround" and "Mic as Center/LFE")
According to the datasheet, CM9739A is indeed compatible with 9739 except for pins.
Quoted 7 lines
Could you get the ac97 register dump of the good- and bad-running states (from /proc/asound/card0/codec97#0/* files) ?
I guess the GPIO initialization (for using HP) is wrong there. Doing the following helps?
# echo 72 0001 > /proc/asound/card0/codec97#0/ac97#0-0+regs
Sorry it took so long to get back to you -- I've attached the following files:
cmi9739a-working-ac97.txt - output from working */codec97#0/ac97#0-0 cmi9739a-working-ac97-regs.txt - output from working */codec97#0/ac97#0-0+regs cmi9739a-muted-ac97.txt - output from muted */codec97#0/ac97#0-0 cmi9739a-muted-ac97-regs.txt - output from muted */codec97#0/ac97#0-0+regs
attempting to write to ac97#0-0+regs with the following:
72 0001
0:72 0001
72=0001
72 = 0001
0:72 = 0001
met with the error:
-su: /proc/asound/card1/codec97#0/ac97#0-0+regs: No such device
Signature · 1 line
Zinx Verituse http://zinx.xmms.org/
0-0/0: C-Media Electronics CMI9739A
Revision : 0x01
Compat. Class : 0x03
Subsys. Vendor ID: 0xffff
Subsys. ID : 0xffff
Capabilities : DAC resolution : 16-bit ADC resolution : 16-bit 3D enhancement : No 3D Stereo Enhancement
Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off
3D enhancement : off Loudness : off Mono output : MIX Mic select : Mic1
ADC/DAC loopback : off
Extended ID : codec=0 rev=2 AMAP LDAC SDAC CDAC DSA=0 DRA
Extended status : SPCV LDAC SDAC CDAC
0:00 = 0000
0:02 = 0101
0:04 = 0000
0:06 = 0000
0:08 = 0000
0:0a = 801e
0:0c = 0000
0:0e = 9f1f
0:10 = 9f1f
0:12 = 9f1f
0:14 = 0000
0:16 = 9f1f
0:18 = 0808
0:1a = 0000
0:1c = 0000
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 0bc2
0:2a = 05f0
0:2c = 0000
0:2e = 0000
0:30 = 0000
0:32 = 0000
0:34 = 0000
0:36 = 8080
0:38 = 0000
0:3a = 2000
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0004
0:5e = 0000
0:60 = 0000
0:62 = 0000
0:64 = 1438
0:66 = 0012
0:68 = 0000
0:6a = 0000
0:6c = 0000
0:6e = 0000
0:70 = 0000
0:72 = 0000
0:74 = c000
0:76 = 3833
0:78 = 0000
0:7a = 0000
0:7c = 434d
0:7e = 4983
0:00 = 0000
0:02 = 0101
0:04 = 0000
0:06 = 0000
0:08 = 0000
0:0a = 801e
0:0c = 0000
0:0e = 9f1f
0:10 = 9f1f
0:12 = 9f1f
0:14 = 0000
0:16 = 9f1f
0:18 = 0808
0:1a = 0000
0:1c = 0000
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 0bc2
0:2a = 05f0
0:2c = 0000
0:2e = 0000
0:30 = 0000
0:32 = 0000
0:34 = 0000
0:36 = 8080
0:38 = 0000
0:3a = 2000
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0004
0:5e = 0000
0:60 = 0000
0:62 = 0000
0:64 = 5400
0:66 = 0012
0:68 = 0000
0:6a = 0000
0:6c = 2001
0:6e = 0000
0:70 = 0100
0:72 = 0000
0:74 = c000
0:76 = 3833
0:78 = 0000
0:7a = 0000
0:7c = 434d
0:7e = 4983
0-0/0: C-Media Electronics CMI9739A
Revision : 0x01
Compat. Class : 0x03
Subsys. Vendor ID: 0xffff
Subsys. ID : 0xffff
Capabilities : DAC resolution : 16-bit ADC resolution : 16-bit 3D enhancement : No 3D Stereo Enhancement
Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off
3D enhancement : off Loudness : off Mono output : MIX Mic select : Mic1
ADC/DAC loopback : off
Extended ID : codec=0 rev=2 AMAP LDAC SDAC CDAC DSA=0 DRA
Extended status : SPCV LDAC SDAC CDAC
At Mon, 29 Nov 2004 20:05:25 -0600,
Quoted 37 lines · Zinx Verituse
[1 <text/plain; us-ascii (7bit)>]
Quoted 20 lines · Takashi Iwai
At Wed, 24 Nov 2004 18:46:49 -0600,
Quoted 7 lines · Zinx Verituse
I recently purchased a motherboard with an on-board CMI9739A (or so it claims)
the id is:
0x434d4983Unfortunately, simply adding the line:
Quoted 7 lines
{
0x434d4983,0xffffffff, "CMI9739A",patch_cm9739, NULL },causes the card to be muted, reguardless of the mixer, because of the init code in
patch_cm9739-- the init code apparently isn't compatible.Removing the initialization code, but leaving the ops, gives a few more functional mixer options (like "Line-In as Surround" and "Mic as Center/LFE")
According to the datasheet, CM9739A is indeed compatible with 9739 except for pins.
Quoted 7 lines
Could you get the ac97 register dump of the good- and bad-running states (from /proc/asound/card0/codec97#0/* files) ?
I guess the GPIO initialization (for using HP) is wrong there. Doing the following helps?
# echo 72 0001 > /proc/asound/card0/codec97#0/ac97#0-0+regsSorry it took so long to get back to you -- I've attached the following files:
cmi9739a-working-ac97.txt - output from working */codec97#0/ac97#0-0 cmi9739a-working-ac97-regs.txt - output from working */codec97#0/ac97#0-0+regs cmi9739a-muted-ac97.txt - output from muted */codec97#0/ac97#0-0 cmi9739a-muted-ac97-regs.txt - output from muted */codec97#0/ac97#0-0+regs
Quoted 8 lines
attempting to write to ac97#0-0+regs with the following:
72 0001
0:72 0001
72=0001
72 = 0001
0:72 = 0001
met with the error:
-su: /proc/asound/card1/codec97#0/ac97#0-0+regs: No such device
Did you compile ALSA drivers with the debug option?
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
Quoted 48 lines · Takashi Iwai
At Mon, 29 Nov 2004 20:05:25 -0600,
Quoted 37 lines · Zinx Verituse
[1 <text/plain; us-ascii (7bit)>]
Quoted 20 lines · Takashi Iwai
At Wed, 24 Nov 2004 18:46:49 -0600,
Quoted 7 lines · Zinx Verituse
I recently purchased a motherboard with an on-board CMI9739A (or so it claims)
the id is:
0x434d4983Unfortunately, simply adding the line:
Quoted 7 lines
{
0x434d4983,0xffffffff, "CMI9739A",patch_cm9739, NULL },causes the card to be muted, reguardless of the mixer, because of the init code in
patch_cm9739-- the init code apparently isn't compatible.Removing the initialization code, but leaving the ops, gives a few more functional mixer options (like "Line-In as Surround" and "Mic as Center/LFE")
According to the datasheet, CM9739A is indeed compatible with 9739 except for pins.
Quoted 7 lines
Could you get the ac97 register dump of the good- and bad-running states (from /proc/asound/card0/codec97#0/* files) ?
I guess the GPIO initialization (for using HP) is wrong there. Doing the following helps?
# echo 72 0001 > /proc/asound/card0/codec97#0/ac97#0-0+regsSorry it took so long to get back to you -- I've attached the following files:
cmi9739a-working-ac97.txt - output from working */codec97#0/ac97#0-0 cmi9739a-working-ac97-regs.txt - output from working */codec97#0/ac97#0-0+regs cmi9739a-muted-ac97.txt - output from muted */codec97#0/ac97#0-0 cmi9739a-muted-ac97-regs.txt - output from muted */codec97#0/ac97#0-0+regsQuoted 8 lines
attempting to write to ac97#0-0+regs with the following:
72 0001
0:72 0001
72=0001
72 = 0001
0:72 = 0001
met with the error:
-su: /proc/asound/card1/codec97#0/ac97#0-0+regs: No such device
Quoted 1 line
Did you compile ALSA drivers with the debug option?
Sorry for the even longer delay this time -- I hadn't compiled debug in, but have now.
Results:
72 0001 does nothing.
However, setting one of the registers that actually differs - 64 - does fix it. The other registers that changed (6c, 70) seemed to have no effect.
Non-working value for register 0x64: 0x5400
Working value for register 0x64: 0x1438
Also working value for register 0x64: 0x0010
Bit 4 doesn't appear to be documented in the source, or in the CM9739 documentation, and it actually defaults to 0x1438 here rather than 0x0000, so I've made a patch that just keeps the value (luckily, it seems to default to on when the card is initialized).
The patch also includes the id for the 9739A.
The patch is against 2.6.10-rc3, but it's fairly simple so it shouldn't be too hard to apply by hand if it fails.
Signature · 1 line
Zinx Verituse http://zinx.xmms.org/
sound/pci/ac97/ac97_codec.c +1 -0
@@ -118,6 +118,7 @@ { 0x414c4770, 0xfffffff0, "ALC203", NULL, NULL }, { 0x434d4941, 0xffffffff, "CMI9738", patch_cm9738, NULL }, { 0x434d4961, 0xffffffff, "CMI9739", patch_cm9739, NULL }, +{ 0x434d4983, 0xffffffff, "CMI9739A", patch_cm9739, NULL }, { 0x434d4978, 0xffffffff, "CMI9761", patch_cm9761, NULL }, { 0x434d4982, 0xffffffff, "CMI9761", patch_cm9761, NULL }, { 0x434d4983, 0xffffffff, "CMI9761", patch_cm9761, NULL },
sound/pci/ac97/ac97_patch.c +3 -1
@@ -1766,8 +1766,10 @@/* bit 12: disable center/lfe (swithable) */ /* bit 10: disable surround/line (switchable) */ /* bit 9: mix 2 surround off */ +/* bit 4: undocumented; 0 mutes the CM9739A, which defaults to 1 */ /* bit 0: dB */ - val = (1 <<13 ); + val =snd_ac97_read (ac97,AC97_CM9739_MULTI_CHAN ) & (1 <<4 ); + val |= (1 <<13 );if (! (ac97->ext_id &AC97_EI_SPDIF )) val |= (1 <<14 );snd_ac97_write_cache (ac97,AC97_CM9739_MULTI_CHAN , val);
Quoted 12 lines · Zinx Verituse
Results:
72 0001 does nothing.However, setting one of the registers that actually differs - 64 - does fix it. The other registers that changed (6c, 70) seemed to have no effect.
Non-working value for register
0x64:0x5400
Working value for register0x64:0x1438Also working value for register
0x64:0x0010
Quoted 8 lines
Bit 4 doesn't appear to be documented in the source, or in the CM9739 documentation, and it actually defaults to
0x1438here rather than0x0000, so I've made a patch that just keeps the value (luckily, it seems to default to on when the card is initialized).The patch also includes the id for the 9739A.
The patch is against 2.6.10-rc3, but it's fairly simple so it shouldn't be too hard to apply by hand if it fails.
Apparently this single bit isn't enough for surround; I should have checked that. Bit 3 is also needed for surround, and I wouldn't doubt bit 5 being needed for something.
Signature · 8 lines
Zinx Verituse http://zinx.xmms.org/ ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
At Sun, 12 Dec 2004 03:30:13 -0600,
Quoted 12 lines · Zinx Verituse
Results:
72 0001 does nothing.However, setting one of the registers that actually differs - 64 - does fix it. The other registers that changed (6c, 70) seemed to have no effect.
Non-working value for register
0x64:0x5400
Working value for register0x64:0x1438Also working value for register
0x64:0x0010
Quoted 8 lines
Bit 4 doesn't appear to be documented in the source, or in the CM9739 documentation, and it actually defaults to
0x1438here rather than0x0000, so I've made a patch that just keeps the value (luckily, it seems to default to on when the card is initialized).The patch also includes the id for the 9739A.
The patch is against 2.6.10-rc3, but it's fairly simple so it shouldn't be too hard to apply by hand if it fails.
Thanks, I applied it to CVS. (bit 3 is enabled, too)
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/