Discussion:
softvol plugin [Fwd: Re: [Alsa-devel] [PATCH V0.1] C-Media CMI9761 -A- type]
Sergio Monteiro Basto
2005-02-19 03:04:38 UTC
Permalink
Sorry for cross posting, I am replying to 2 different threads 1 is alsa-
user and other in alsa-devel!

Please cc to me!

Like Jakob Schurdak, I reinstall alsa from CVS (alsa-driver, alsa-lib,
alsa-utils), that already have Takashi patch, but the mixer still have
exactly the same behavior.

I have one ASRock P4VT8+ with CMedia CMI9761 (not the same of Jakob) but
same rev. of sound card.
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)

Applying this patch from Thomas Schorpp, I have a better mixer and don't
have mute nothing as before, I just unmute PCM and have sound, Master
volume appears but don't have any effect when mute or unmute or change
volume.

For me, try to set up a PCM config manually on my own ~/.asoundrc ,
doesn't change noting ( unless when I forget close "}") :)

thanks and regards,

-------- Forwarded Message --------
Subject: Re: [Alsa-devel] [PATCH V0.1] C-Media CMI9761 -A- type
Date: Thu, 17 Feb 2005 05:10:08 +0100
created a patch with branch -A- type support by Mainboard for the start.
like youve done it before for a mainboard in the code.
and now i want a pcm slider. lets see...
hello,
| Hi,
|
| After search on https://bugtrack.alsa-project.org/ for CMI9761, 1
| issues, resolved !
| with some similarity is one ASRock k7vt4a+ with CMedia CMI9761, I have
| one ASRock P4VT8+ with CMedia CMI9761.
ive got the follower CMI9761A.
got ascreenshot from cmedia windosdriver app, for "unbeliefers" ;)
|
| After play around with alsamixer,
| I got sound when unmute PCM and Off (mute) IEC958 Capture Monitor.
|
| All others controls does change anything include mute or unmute the
| Master.
| Except VIA DXS (this one can do sound balance, left and right).
| VIA DXS 1, VIA DXS 2 and VIA DXS 3 also doesn't do nothing.
|
| Play around with
| options snd-via82xx dxs_support
| on file /etc/modprobe.conf
| only with "options snd-via82xx dxs_support=2" I see any difference but
| for worst, make disappear VIA DXS, VIA DXS 1, VIA DXS 2 and VIA DXS 3
| controls.
|
| So, can help you testing alsa CVS ?
| Now I have to sleep and tomorrow, I am a little busy but, have you some
| patch in specific to test this C-MEDIA sound card ?
|
| Sorry for my weak English, if you don't understand something just ask
| me, that I will try explain again.
|
| thanks,
|
all verified yet yesterday, negative
thx
tom
--
Sérgio M.B.
thomas schorpp
2005-02-19 03:41:58 UTC
Permalink
uh-oh :)

i code with too much drink and the users like it, great! :]]

... sergio, this patch is crap, pls pull cvs with attached revisions and
tell if your master vol works then.

my does. and so balance.

THEN update to head and apply both patches attached further below from
takashi and report (especially if you get pcm sound after unmute of "iec
capture" switch.)

y
tom
Post by Sergio Monteiro Basto
Sorry for cross posting, I am replying to 2 different threads 1 is alsa-
user and other in alsa-devel!
Please cc to me!
Like Jakob Schurdak, I reinstall alsa from CVS (alsa-driver, alsa-lib,
alsa-utils), that already have Takashi patch, but the mixer still have
exactly the same behavior.
I have one ASRock P4VT8+ with CMedia CMI9761 (not the same of Jakob) but
same rev. of sound card.
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
Applying this patch from Thomas Schorpp, I have a better mixer and don't
have mute nothing as before, I just unmute PCM and have sound, Master
volume appears but don't have any effect when mute or unmute or change
volume.
For me, try to set up a PCM config manually on my own ~/.asoundrc ,
doesn't change noting ( unless when I forget close "}") :)
thanks and regards,
Index: ac97_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -r1.170 -r1.171
--- ac97_codec.c 9 Feb 2005 10:27:15 -0000 1.170
+++ ac97_codec.c 16 Feb 2005 16:21:03 -0000 1.171
@@ -120,7 +120,8 @@
{ 0x434d4961, 0xffffffff, "CMI9739", patch_cm9739, NULL },
{ 0x434d4978, 0xffffffff, "CMI9761", patch_cm9761, NULL },
{ 0x434d4982, 0xffffffff, "CMI9761", patch_cm9761, NULL },
-{ 0x434d4983, 0xffffffff, "CMI9761", patch_cm9761, NULL },
+/* { 0x434d4983, 0xffffffff, "CMI9761", patch_cm9761, NULL }, */
+{ 0x434d4983, 0xffffffff, "CMI9761A", patch_cm9761a, NULL },
{ 0x43525900, 0xfffffff8, "CS4297", NULL, NULL },
{ 0x43525910, 0xfffffff8, "CS4297A", patch_cirrus_spdif, NULL },
{ 0x43525920, 0xfffffff8, "CS4298", patch_cirrus_spdif, NULL },

Index: ac97_patch.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- ac97_patch.c 11 Feb 2005 09:56:09 -0000 1.72
+++ ac97_patch.c 16 Feb 2005 16:21:04 -0000 1.73
@@ -2094,6 +2094,34 @@
return 0;
}

+/* CM9761-A is incompatible with CM9761 */
+int patch_cm9761a(ac97_t *ac97)
+{
+ unsigned short val;
+
+ ac97->build_ops = &patch_cm9761_ops;
+
+#if 0
+ /* enable spdif */
+ /* force the SPDIF bit in ext_id - codec doesn't set this bit! */
+ ac97->ext_id |= AC97_EI_SPDIF;
+ /* to be sure: we overwrite the ext status bits */
+ snd_ac97_write_cache(ac97, AC97_EXTENDED_STATUS, 0x05c0);
+ snd_ac97_write_cache(ac97, AC97_CM9761_SPDIF_CTRL, 0x0209);
+ ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_48000; /* 48k only */
+#endif
+ /* set-up multi channel */
+ val = snd_ac97_read(ac97, AC97_CM9761_MULTI_CHAN);
+ val |= (1 << 4);
+ snd_ac97_write_cache(ac97, AC97_CM9761_MULTI_CHAN, val);
+
+ /* FIXME: set up GPIO */
+ snd_ac97_write_cache(ac97, 0x70, 0x0100);
+ snd_ac97_write_cache(ac97, 0x72, 0x0020);
+
+ return 0;
+}
+

/*
* VIA VT1616 codec

Index: ac97_patch.h
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ac97_patch.h 29 Sep 2004 15:45:52 -0000 1.17
+++ ac97_patch.h 16 Feb 2005 16:21:04 -0000 1.18
@@ -53,6 +53,7 @@
int patch_cm9738(ac97_t * ac97);
int patch_cm9739(ac97_t * ac97);
int patch_cm9761(ac97_t * ac97);
+int patch_cm9761a(ac97_t * ac97);
int patch_vt1616(ac97_t * ac97);
int patch_it2646(ac97_t * ac97);
int mpatch_si3036(ac97_t * ac97);


AFTER TESTING THEN UPDATE TO HEAD AND APPLY: ATT 2 PATCHES
Sergio Monteiro Basto
2005-02-20 22:15:50 UTC
Permalink
Hello
the patch give a compile error see above :

thanks,
Post by thomas schorpp
uh-oh :)
THEN update to head and apply both patches attached further below from
takashi and report (especially if you get pcm sound after unmute of "iec
capture" switch.)
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- ac97_patch.c 11 Feb 2005 09:56:09 -0000 1.72
+++ ac97_patch.c 16 Feb 2005 16:21:04 -0000 1.73
@@ -2094,6 +2094,34 @@
return 0;
}
+/* CM9761-A is incompatible with CM9761 */
+int patch_cm9761a(ac97_t *ac97)
+{
+ unsigned short val;
+
+ ac97->build_ops = &patch_cm9761_ops;
patch_cm9761_ops is not defined in any place , compiler give an error
undeclare and use for the first time ....
--
Sérgio M.B.



-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
thomas schorpp
2005-02-19 03:52:44 UTC
Permalink
Post by Sergio Monteiro Basto
I have one ASRock P4VT8+ with CMedia CMI9761 (not the same of Jakob) but
same rev. of sound card.
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
BTW, THATS NOT THE CODEC, only a interface.

this is it:

lspci -v

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
Subsystem: Unknown device 1849:9761 <--------------------

tom



-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Sergio Monteiro Basto
2005-02-19 16:26:53 UTC
Permalink
Hello,
Alsa-webmaster please read the end of message and improve your
http://www.alsa-project.org/download.php page !

Well mine is:
lspci -v
00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
Subsystem: ASRock Incorporation: Unknown device 9739
lspci -n
00:11.5 Class 0401: 1106:3059 (rev 60)

I finished to test last sources of the CVS, I back to first state, no
improves, no master again.

For Jakob and alsa-webmaster, a little fast How to compile alsa from
CVS:

yum -y install gettext-devel.i386 ( you will need this for cvscompile
alsa-utils and you will need autotools )

service alsasound stop (or rmmod all snd-*)

cvs -d:pserver:***@cvs.sourceforge.net:/cvsroot/alsa login
(enter)
cvs -z3 -q -d:pserver:***@cvs.sourceforge.net:/cvsroot/alsa co alsa-driver
cvs -z3 -q -d:pserver:***@cvs.sourceforge.net:/cvsroot/alsa co alsa-kernel
cvs -z3 -q -d:pserver:***@cvs.sourceforge.net:/cvsroot/alsa co alsa-lib
cvs -z3 -q -d:pserver:***@cvs.sourceforge.net:/cvsroot/alsa co alsa-utils
cd alsa-driver
cvscompile (stop when enter in configure, because will compile drives
for all cards and we just need for our via82xx)
./configure --with-cards=dummy,via82xx --with-sequencer=yes --with-isapnp=no
make
make install
modprobe snd-via82xx

cd ../alsa-lib
cvscompile && make install && ldconfig
cd ../alsa-utils
cvscompile && make install

regards,
Post by thomas schorpp
Post by Sergio Monteiro Basto
I have one ASRock P4VT8+ with CMedia CMI9761 (not the same of Jakob) but
same rev. of sound card.
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
BTW, THATS NOT THE CODEC, only a interface.
lspci -v
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
Subsystem: Unknown device 1849:9761 <--------------------
tom
--
Sérgio M.B.



-------------------------------------------------------
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
thomas schorpp
2005-02-19 19:11:56 UTC
Permalink
Post by Sergio Monteiro Basto
Hello,
Alsa-webmaster please read the end of message and improve your
http://www.alsa-project.org/download.php page !
lspci -v
00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
Subsystem: ASRock Incorporation: Unknown device 9739
thats the CMI9739.

http://www.cmedia.com.tw/product/CMI9739.htm
Post by Sergio Monteiro Basto
I finished to test last sources of the CVS, I back to first state, no
improves, no master again.
thx.
Post by Sergio Monteiro Basto
For Jakob and alsa-webmaster, a little fast How to compile alsa from
yum -y install gettext-devel.i386 ( you will need this for cvscompile
alsa-utils and you will need autotools )
service alsasound stop (or rmmod all snd-*)
(enter)
i prefer using the kde cervisia frontend in konqueror, you get a better
overview of versions and logs then. its fine.
Post by Sergio Monteiro Basto
cd alsa-driver
cvscompile (stop when enter in configure, because will compile drives
for all cards and we just need for our via82xx)
i use only this:

./configure --with-cards=via82xx
Post by Sergio Monteiro Basto
make
su
Post by Sergio Monteiro Basto
make install
modprobe snd-via82xx
exit

heres a script for testing automation (edit for your needs):

att.
Post by Sergio Monteiro Basto
cd ../alsa-lib
cvscompile && make install && ldconfig
cd ../alsa-utils
cvscompile && make install
? i dont use the userspace from cvs, only the debian 1.08 distri packages.

tom
Post by Sergio Monteiro Basto
regards,
Loading...