* CMI9739A
@ 2004-11-25 0:46 Zinx Verituse
2004-11-25 16:18 ` CMI9739A Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Zinx Verituse @ 2004-11-25 0:46 UTC (permalink / raw)
To: alsa-devel
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")
--
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/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: CMI9739A
2004-11-25 0:46 CMI9739A Zinx Verituse
@ 2004-11-25 16:18 ` Takashi Iwai
2004-11-30 2:05 ` CMI9739A Zinx Verituse
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2004-11-25 16:18 UTC (permalink / raw)
To: Zinx Verituse; +Cc: alsa-devel
At Wed, 24 Nov 2004 18:46:49 -0600,
Zinx Verituse wrote:
>
> 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")
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/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: CMI9739A
2004-11-25 16:18 ` CMI9739A Takashi Iwai
@ 2004-11-30 2:05 ` Zinx Verituse
2004-11-30 10:09 ` CMI9739A Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Zinx Verituse @ 2004-11-30 2:05 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 1722 bytes --]
On Thu, Nov 25, 2004 at 05:18:57PM +0100, Takashi Iwai wrote:
> At Wed, 24 Nov 2004 18:46:49 -0600,
> Zinx Verituse wrote:
> >
> > 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")
>
> 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
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
--
Zinx Verituse http://zinx.xmms.org/
[-- Attachment #2: cmi9739a-working-ac97.txt --]
[-- Type: text/plain, Size: 566 bytes --]
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
[-- Attachment #3: cmi9739a-working-ac97-regs.txt --]
[-- Type: text/plain, Size: 768 bytes --]
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
[-- Attachment #4: cmi9739a-muted-ac97-regs.txt --]
[-- Type: text/plain, Size: 768 bytes --]
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
[-- Attachment #5: cmi9739a-muted-ac97.txt --]
[-- Type: text/plain, Size: 566 bytes --]
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: CMI9739A
2004-11-30 2:05 ` CMI9739A Zinx Verituse
@ 2004-11-30 10:09 ` Takashi Iwai
2004-12-12 9:30 ` CMI9739A Zinx Verituse
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2004-11-30 10:09 UTC (permalink / raw)
To: Zinx Verituse; +Cc: alsa-devel
At Mon, 29 Nov 2004 20:05:25 -0600,
Zinx Verituse wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
> On Thu, Nov 25, 2004 at 05:18:57PM +0100, Takashi Iwai wrote:
> > At Wed, 24 Nov 2004 18:46:49 -0600,
> > Zinx Verituse wrote:
> > >
> > > 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")
> >
> > 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
>
> 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
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/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: CMI9739A
2004-11-30 10:09 ` CMI9739A Takashi Iwai
@ 2004-12-12 9:30 ` Zinx Verituse
2004-12-12 10:57 ` CMI9739A Zinx Verituse
2004-12-20 14:04 ` CMI9739A Takashi Iwai
0 siblings, 2 replies; 7+ messages in thread
From: Zinx Verituse @ 2004-12-12 9:30 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 2940 bytes --]
On Tue, Nov 30, 2004 at 11:09:52AM +0100, Takashi Iwai wrote:
> At Mon, 29 Nov 2004 20:05:25 -0600,
> Zinx Verituse wrote:
> >
> > [1 <text/plain; us-ascii (7bit)>]
> > On Thu, Nov 25, 2004 at 05:18:57PM +0100, Takashi Iwai wrote:
> > > At Wed, 24 Nov 2004 18:46:49 -0600,
> > > Zinx Verituse wrote:
> > > >
> > > > 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")
> > >
> > > 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
> >
> > 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
>
> 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.
--
Zinx Verituse http://zinx.xmms.org/
[-- Attachment #2: alsa-2.6.10-rc3-CM9739A.diff --]
[-- Type: text/plain, Size: 1464 bytes --]
diff -ru linux-2.6.10-rc3.orig/sound/pci/ac97/ac97_codec.c linux-2.6.10-rc3/sound/pci/ac97/ac97_codec.c
--- linux-2.6.10-rc3.orig/sound/pci/ac97/ac97_codec.c 2004-12-12 03:11:18.000000000 -0600
+++ linux-2.6.10-rc3/sound/pci/ac97/ac97_codec.c 2004-12-12 03:21:40.000000000 -0600
@@ -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 },
diff -ru linux-2.6.10-rc3.orig/sound/pci/ac97/ac97_patch.c linux-2.6.10-rc3/sound/pci/ac97/ac97_patch.c
--- linux-2.6.10-rc3.orig/sound/pci/ac97/ac97_patch.c 2004-12-12 03:11:18.000000000 -0600
+++ linux-2.6.10-rc3/sound/pci/ac97/ac97_patch.c 2004-12-12 03:22:48.000000000 -0600
@@ -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);
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: CMI9739A
2004-12-12 9:30 ` CMI9739A Zinx Verituse
@ 2004-12-12 10:57 ` Zinx Verituse
2004-12-20 14:04 ` CMI9739A Takashi Iwai
1 sibling, 0 replies; 7+ messages in thread
From: Zinx Verituse @ 2004-12-12 10:57 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Sun, Dec 12, 2004 at 03:30:13AM -0600, Zinx Verituse wrote:
>
> 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.
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.
--
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/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: CMI9739A
2004-12-12 9:30 ` CMI9739A Zinx Verituse
2004-12-12 10:57 ` CMI9739A Zinx Verituse
@ 2004-12-20 14:04 ` Takashi Iwai
1 sibling, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2004-12-20 14:04 UTC (permalink / raw)
To: Zinx Verituse; +Cc: alsa-devel
At Sun, 12 Dec 2004 03:30:13 -0600,
Zinx Verituse wrote:
>
> 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.
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/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-12-20 14:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-25 0:46 CMI9739A Zinx Verituse
2004-11-25 16:18 ` CMI9739A Takashi Iwai
2004-11-30 2:05 ` CMI9739A Zinx Verituse
2004-11-30 10:09 ` CMI9739A Takashi Iwai
2004-12-12 9:30 ` CMI9739A Zinx Verituse
2004-12-12 10:57 ` CMI9739A Zinx Verituse
2004-12-20 14:04 ` CMI9739A 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.