* RE: CMI8768 patch
@ 2005-02-23 3:42 "Tien, C.L. - 田承禮"
2005-02-23 10:42 ` Takashi Iwai
0 siblings, 1 reply; 18+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-02-23 3:42 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de]
Sent: 2005/2/22 [星期二] 下午 02:51
To: Tien, C.L. - 田承禮
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] CMI8768 patch
At Wed, 23 Feb 2005 03:07:02 +0800,
Tien, C.L. wrote:
>
> But the aplay -D default still shows:
>
> ALSA lib pcm.c:2068:(snd_pcm_open_noupdate) Unknown PCM 0
> ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave
> aplay: main:508: audio open error: No such file or directory
Hmm, are you using CVS version of alsa-lib or 1.0.8?
The config file I sent was for CVS version.
The message was created with alsa-lib-1.0.8 on RedHat 7.3 (kernel 2.4.26)
Now I switch to CVS on FC3. I found the result is opposite:
alsa-lib-1.0.8+RH 7.3, front, rear can be used as -D option, while default shows the above message.
alsa-lib CVS+FC3 it is ok to "aplay" directly or "aplay -D default", but either front or rear I got
ALSA lib pcm.c:1939:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_softvol.so
aplay: main:508: audio open error: No such file or directory
The libasound.so.2.0.0 is installed successfully and there is no /usr/lib/alsa-lib path
in my system (should I create?) Please help!
Sincerely,
ChenLi Tien
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://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: CMI8768 patch
2005-02-23 3:42 CMI8768 patch "Tien, C.L. - 田承禮"
@ 2005-02-23 10:42 ` Takashi Iwai
0 siblings, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2005-02-23 10:42 UTC (permalink / raw)
To: cltien; +Cc: alsa-devel
At Wed, 23 Feb 2005 11:42:53 +0800,
Tien, C.L. wrote:
>
> The message was created with alsa-lib-1.0.8 on RedHat 7.3 (kernel 2.4.26)
> Now I switch to CVS on FC3. I found the result is opposite:
>
> alsa-lib-1.0.8+RH 7.3, front, rear can be used as -D option, while default shows the above message.
>
> alsa-lib CVS+FC3 it is ok to "aplay" directly or "aplay -D default", but either front or rear I got
> ALSA lib pcm.c:1939:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_softvol.so
> aplay: main:508: audio open error: No such file or directory
It's weird.
Please make sure that your cvs tree is all updated properly.
> The libasound.so.2.0.0 is installed successfully and there is no /usr/lib/alsa-lib path
> in my system (should I create?) Please help!
/usr/lib/alsa-lib is the extra path for plugin shared objects. The
plugins alsa-plugins repository are installed there. However, the
standard plugins are included in libasound.so. So, you don't need to
create this directory at all.
Just to be sure: your system is i386, not AMD64, right?
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: CMI8768 patch
@ 2005-02-23 22:50 "Tien, C.L. - 田承禮"
2005-02-24 4:20 ` Sergio Monteiro Basto
2005-02-24 9:52 ` Takashi Iwai
0 siblings, 2 replies; 18+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-02-23 22:50 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Finally I got a clue.
The FC3 install the alsa-lib (libasound.so.2.0.0) at /lib, while the alsa-cvs and alsa-lib-1.0.8
install it in /usr/lib, no wonder the softvol cannot run with it! Finally I get PCM volume
appear. Thanks for your help and sorry that it took me so long to discover this.
Sincerely,
ChenLi Tien
-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de]
Sent: 2005/2/23 [星期三] 上午 05:42
To: Tien, C.L. - 田承禮
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] CMI8768 patch
At Wed, 23 Feb 2005 11:42:53 +0800,
Tien, C.L. wrote:
>
> The message was created with alsa-lib-1.0.8 on RedHat 7.3 (kernel 2.4.26)
> Now I switch to CVS on FC3. I found the result is opposite:
>
> alsa-lib-1.0.8+RH 7.3, front, rear can be used as -D option, while default shows the above message.
>
> alsa-lib CVS+FC3 it is ok to "aplay" directly or "aplay -D default", but either front or rear I got
> ALSA lib pcm.c:1939:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_softvol.so
> aplay: main:508: audio open error: No such file or directory
It's weird.
Please make sure that your cvs tree is all updated properly.
> The libasound.so.2.0.0 is installed successfully and there is no /usr/lib/alsa-lib path
> in my system (should I create?) Please help!
/usr/lib/alsa-lib is the extra path for plugin shared objects. The
plugins alsa-plugins repository are installed there. However, the
standard plugins are included in libasound.so. So, you don't need to
create this directory at all.
Just to be sure: your system is i386, not AMD64, right?
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://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: CMI8768 patch
2005-02-23 22:50 "Tien, C.L. - 田承禮"
@ 2005-02-24 4:20 ` Sergio Monteiro Basto
2005-02-24 10:30 ` Takashi Iwai
2005-02-24 9:52 ` Takashi Iwai
1 sibling, 1 reply; 18+ messages in thread
From: Sergio Monteiro Basto @ 2005-02-24 4:20 UTC (permalink / raw)
To: "Tien, C.L. - 田承禮"
Cc: Takashi Iwai, alsa-devel, t.schorpp
On Thu, 2005-02-24 at 06:50 +0800, "Tien, C.L. - 田承禮" wrote:
> Finally I got a clue.
> The FC3 install the alsa-lib (libasound.so.2.0.0) at /lib, while the alsa-cvs and alsa-lib-1.0.8
> install it in /usr/lib, no wonder the softvol cannot run with it! Finally I get PCM volume
> appear. Thanks for your help and sorry that it took me so long to discover this.
yap very good tip, I link the old one to new one with this command :
ln -s /usr/lib/libasound.so.2.0.0 /lib/libasound.so.2.0.0 -f
The package gettext-devel.i386 is needed for cvscompile alsa-utils.
About my : C-Media CMI9761A
With this change above and compile ALSA from latest CVS, PCM and Master
volume appears !, PCM works great but master doesn't do nothing !
thanks,
>
> Sincerely,
> ChenLi Tien
>
> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@suse.de]
> Sent: 2005/2/23 [星期三] 上午 05:42
> To: Tien, C.L. - 田承禮
> Cc: alsa-devel@lists.sourceforge.net
> Subject: Re: [Alsa-devel] CMI8768 patch
> At Wed, 23 Feb 2005 11:42:53 +0800,
> Tien, C.L. wrote:
> >
> > The message was created with alsa-lib-1.0.8 on RedHat 7.3 (kernel 2.4.26)
> > Now I switch to CVS on FC3. I found the result is opposite:
> >
> > alsa-lib-1.0.8+RH 7.3, front, rear can be used as -D option, while default shows the above message.
> >
> > alsa-lib CVS+FC3 it is ok to "aplay" directly or "aplay -D default", but either front or rear I got
> > ALSA lib pcm.c:1939:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_softvol.so
> > aplay: main:508: audio open error: No such file or directory
>
> It's weird.
> Please make sure that your cvs tree is all updated properly.
>
> > The libasound.so.2.0.0 is installed successfully and there is no /usr/lib/alsa-lib path
> > in my system (should I create?) Please help!
>
> /usr/lib/alsa-lib is the extra path for plugin shared objects. The
> plugins alsa-plugins repository are installed there. However, the
> standard plugins are included in libasound.so. So, you don't need to
> create this directory at all.
>
> Just to be sure: your system is i386, not AMD64, right?
>
>
> Takashi
--
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: CMI8768 patch
2005-02-24 4:20 ` Sergio Monteiro Basto
@ 2005-02-24 10:30 ` Takashi Iwai
2005-02-24 18:42 ` Sergio Monteiro Basto
0 siblings, 1 reply; 18+ messages in thread
From: Takashi Iwai @ 2005-02-24 10:30 UTC (permalink / raw)
To: sergio; +Cc: alsa-devel
At Thu, 24 Feb 2005 04:20:22 +0000,
Sergio Monteiro Basto wrote:
>
>
> About my : C-Media CMI9761A
>
> With this change above and compile ALSA from latest CVS, PCM and Master
> volume appears !, PCM works great but master doesn't do nothing !
It's a known problem. I readded Master volume because of the report
that it affects the input loop-back. If it's not, we should remove
it.
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: CMI8768 patch
2005-02-24 10:30 ` Takashi Iwai
@ 2005-02-24 18:42 ` Sergio Monteiro Basto
2005-02-24 18:52 ` Takashi Iwai
0 siblings, 1 reply; 18+ messages in thread
From: Sergio Monteiro Basto @ 2005-02-24 18:42 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Thu, 2005-02-24 at 11:30 +0100, Takashi Iwai wrote:
> At Thu, 24 Feb 2005 04:20:22 +0000,
> Sergio Monteiro Basto wrote:
> >
> >
> > About my : C-Media CMI9761A
> >
> > With this change above and compile ALSA from latest CVS, PCM and Master
> > volume appears !, PCM works great but master doesn't do nothing !
>
> It's a known problem. I readded Master volume because of the report
> that it affects the input loop-back. If it's not, we should remove
> it.
How I remove it ? for testing and give you a feed-back.
thanks,
>
>
> Takashi
--
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: CMI8768 patch
2005-02-24 18:42 ` Sergio Monteiro Basto
@ 2005-02-24 18:52 ` Takashi Iwai
2005-02-24 23:23 ` Sergio Monteiro Basto
0 siblings, 1 reply; 18+ messages in thread
From: Takashi Iwai @ 2005-02-24 18:52 UTC (permalink / raw)
To: sergio; +Cc: alsa-devel
At Thu, 24 Feb 2005 18:42:28 +0000,
Sergio Monteiro Basto wrote:
>
> On Thu, 2005-02-24 at 11:30 +0100, Takashi Iwai wrote:
> > At Thu, 24 Feb 2005 04:20:22 +0000,
> > Sergio Monteiro Basto wrote:
> > >
> > >
> > > About my : C-Media CMI9761A
> > >
> > > With this change above and compile ALSA from latest CVS, PCM and Master
> > > volume appears !, PCM works great but master doesn't do nothing !
> >
> > It's a known problem. I readded Master volume because of the report
> > that it affects the input loop-back. If it's not, we should remove
> > it.
>
> How I remove it ? for testing and give you a feed-back.
Enable the commented out part again in pci/ac97/ac97_patch.c:2043
ac97->flags |= /*AC97_HAS_NO_MASTER_VOL |*/ AC97_HAS_NO_PCM_VOL;
to
ac97->flags |= AC97_HAS_NO_MASTER_VOL | AC97_HAS_NO_PCM_VOL;
The _only_ question is, whether the Master volume really does nothing,
or has _any_ role. As mentioned, if it's really a dummy control, we
should rather remove it to avoid confusion.
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: CMI8768 patch
2005-02-24 18:52 ` Takashi Iwai
@ 2005-02-24 23:23 ` Sergio Monteiro Basto
0 siblings, 0 replies; 18+ messages in thread
From: Sergio Monteiro Basto @ 2005-02-24 23:23 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Thu, 2005-02-24 at 19:52 +0100, Takashi Iwai wrote:
> Enable the commented out part again in pci/ac97/ac97_patch.c:2043
>
> ac97->flags |= /*AC97_HAS_NO_MASTER_VOL |*/ AC97_HAS_NO_PCM_VOL;
>
> to
>
> ac97->flags |= AC97_HAS_NO_MASTER_VOL | AC97_HAS_NO_PCM_VOL;
>
>
> The _only_ question is, whether the Master volume really does nothing,
> or has _any_ role. As mentioned, if it's really a dummy control, we
> should rather remove it to avoid confusion.
Well I try to remove it and Master and PCM volume disappears.
And when put comment back in source, the results of mixer has been
change from begging, PCM doesn't appears with volume, after some make
install , modprobes, alsamixer and kmix, finally I got PCM back.
Seems after install alsa-drive, I have to reinstall alsa-lib !?
>
>
> Takashi
--
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
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: CMI8768 patch
2005-02-23 22:50 "Tien, C.L. - 田承禮"
2005-02-24 4:20 ` Sergio Monteiro Basto
@ 2005-02-24 9:52 ` Takashi Iwai
1 sibling, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2005-02-24 9:52 UTC (permalink / raw)
To: cltien; +Cc: alsa-devel
At Thu, 24 Feb 2005 06:50:39 +0800,
Tien, C.L. wrote:
>
> Finally I got a clue.
> The FC3 install the alsa-lib (libasound.so.2.0.0) at /lib, while the
> alsa-cvs and alsa-lib-1.0.8 install it in /usr/lib, no wonder the
> softvol cannot run with it!
That's a good information.
I'll add a note about it in INSTALL.
thanks,
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: CMI8768 patch
@ 2005-02-23 20:50 "Tien, C.L. - 田承禮"
0 siblings, 0 replies; 18+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-02-23 20:50 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
I use alsa-driver and alsa-lib from cvs but alsa-util from 1.0.8 because I have problem
conigure the alsa-util tree.
My system is an i386 system (P4).
Sincerely,
ChenLi Tien
-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de]
Sent: 2005/2/23 [星期三] 上午 05:42
To: Tien, C.L. - 田承禮
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] CMI8768 patch
At Wed, 23 Feb 2005 11:42:53 +0800,
Tien, C.L. wrote:
>
> The message was created with alsa-lib-1.0.8 on RedHat 7.3 (kernel 2.4.26)
> Now I switch to CVS on FC3. I found the result is opposite:
>
> alsa-lib-1.0.8+RH 7.3, front, rear can be used as -D option, while default shows the above message.
>
> alsa-lib CVS+FC3 it is ok to "aplay" directly or "aplay -D default", but either front or rear I got
> ALSA lib pcm.c:1939:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_softvol.so
> aplay: main:508: audio open error: No such file or directory
It's weird.
Please make sure that your cvs tree is all updated properly.
> The libasound.so.2.0.0 is installed successfully and there is no /usr/lib/alsa-lib path
> in my system (should I create?) Please help!
/usr/lib/alsa-lib is the extra path for plugin shared objects. The
plugins alsa-plugins repository are installed there. However, the
standard plugins are included in libasound.so. So, you don't need to
create this directory at all.
Just to be sure: your system is i386, not AMD64, right?
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://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: CMI8768 patch
@ 2005-02-22 22:00 "Tien, C.L. - 田承禮"
0 siblings, 0 replies; 18+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-02-22 22:00 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de]
Sent: 2005/2/22 [星期二] 下午 02:51
To: Tien, C.L. - 田承禮
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] CMI8768 patch
At Wed, 23 Feb 2005 03:07:02 +0800,
Tien, C.L. wrote:
>
>
> I also recmmend that the "Four Channel" switch should be turned off for
> surround41 and surround50, as well as surround51 and surround71. The
It is turned off, indeed. In the configuration:
{
name "Four Channel Mode"
lock true
preserve true
==> value false
}
Then I think following lines should be added too:
CMI8738-MC8.pcm.surround41.0 "cards.CMI8738-MC8.pcm.surround40.0"
CMI8738-MC8.pcm.surround50.0 "cards.CMI8738-MC8.pcm.surround40.0"
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://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread* RE: CMI8768 patch
@ 2005-02-22 19:07 "Tien, C.L. - 田承禮"
2005-02-22 19:51 ` Takashi Iwai
0 siblings, 1 reply; 18+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-02-22 19:07 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
I made changes to the CMI8738-MC8.conf so the PCM volume appear after
play with -D front or -D rear:
--- alsa/CMI8738-MC8.conf Fri Feb 18 17:29:38 2005
+++ CMI8738-MC8.conf Tue Feb 22 13:28:58 2005
@@ -7,7 +7,7 @@
CMI8738-MC8.pcm.front.0 {
@args [ CARD ]
@args.CARD {
- type string
+ type integer
}
type softvol
slave.pcm {
@@ -57,7 +57,7 @@
CMI8738-MC8.pcm.rear.0 {
@args [ CARD ]
@args.CARD {
- type string
+ type integer
}
type softvol
slave.pcm {
@@ -76,7 +76,7 @@
CMI8738-MC8.pcm.surround40.0 {
@args [ CARD ]
@args.CARD {
- type string
+ type integer
}
type softvol
slave.pcm {
But the aplay -D default still shows:
ALSA lib pcm.c:2068:(snd_pcm_open_noupdate) Unknown PCM 0
ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave
aplay: main:508: audio open error: No such file or directory
BTW, the query_chip() should be run with 8738 only, there is no
chip version for 8338 and the register checked in query_chip()
is reserved in 8338, so I made following change:
--- alsa-driver-1.0.8/alsa-kernel/pci/cmipci.c Mon Jan 3 06:45:31 2005
+++ alsa-driver-1.0.8-update/alsa-kernel/pci/cmipci.c Tue Feb 22 13:31:06 2005@@ -2623,7 +2664,8 @@
cm->max_channels = 2;
cm->do_soft_ac3 = soft_ac3[dev];
- query_chip(cm);
+ if (strcmp(card->driver, "CMI8338"))
+ query_chip(cm);
cm->dig_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
cm->dig_pcm_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
I also recmmend that the "Four Channel" switch should be turned off for
surround41 and surround50, as well as surround51 and surround71. The
Sincerely,
ChenLi Tien
-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de]
Sent: 2005/2/22 [星期二] 上午 06:30
To: Tien, C.L. - 田承禮
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] CMI8768 patch
At Mon, 21 Feb 2005 07:20:55 +0800,
Tien, C.L. wrote:
>
> Should it be instide the patch or just like:
>
> Signed-off-by: ChenLi Tien <cltien@cmedia.com.tw>
Both are OK. Thanks.
> I still cannot use the softvol with 8768, but softvol works with the 8739 so I don't
> know if anything need to do except not setting PCM Playback Volume item for mixer.
The softvol won't create a control if it already exists in h/w, and
skips the software attenuation. But, in your patch, PCM Playback
Volume control is removed, so it should work...
Did you try my config file I sent you in the last mail?
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://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: CMI8768 patch
2005-02-22 19:07 "Tien, C.L. - 田承禮"
@ 2005-02-22 19:51 ` Takashi Iwai
0 siblings, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2005-02-22 19:51 UTC (permalink / raw)
To: cltien; +Cc: alsa-devel
At Wed, 23 Feb 2005 03:07:02 +0800,
Tien, C.L. wrote:
>
> I made changes to the CMI8738-MC8.conf so the PCM volume appear after
> play with -D front or -D rear:
>
> --- alsa/CMI8738-MC8.conf Fri Feb 18 17:29:38 2005
> +++ CMI8738-MC8.conf Tue Feb 22 13:28:58 2005
> @@ -7,7 +7,7 @@
> CMI8738-MC8.pcm.front.0 {
> @args [ CARD ]
> @args.CARD {
> - type string
> + type integer
> }
> type softvol
> slave.pcm {
> @@ -57,7 +57,7 @@
> CMI8738-MC8.pcm.rear.0 {
> @args [ CARD ]
> @args.CARD {
> - type string
> + type integer
> }
> type softvol
> slave.pcm {
> @@ -76,7 +76,7 @@
> CMI8738-MC8.pcm.surround40.0 {
> @args [ CARD ]
> @args.CARD {
> - type string
> + type integer
> }
> type softvol
> slave.pcm {
Oh yes, they should be integer.
> But the aplay -D default still shows:
>
> ALSA lib pcm.c:2068:(snd_pcm_open_noupdate) Unknown PCM 0
> ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave
> aplay: main:508: audio open error: No such file or directory
Hmm, are you using CVS version of alsa-lib or 1.0.8?
The config file I sent was for CVS version.
> BTW, the query_chip() should be run with 8738 only, there is no
> chip version for 8338 and the register checked in query_chip()
> is reserved in 8338, so I made following change:
Agreed. Will be fixed on CVS.
>
> --- alsa-driver-1.0.8/alsa-kernel/pci/cmipci.c Mon Jan 3 06:45:31 2005
> +++ alsa-driver-1.0.8-update/alsa-kernel/pci/cmipci.c Tue Feb 22 13:31:06 2005@@ -2623,7 +2664,8 @@
> cm->max_channels = 2;
> cm->do_soft_ac3 = soft_ac3[dev];
>
> - query_chip(cm);
> + if (strcmp(card->driver, "CMI8338"))
> + query_chip(cm);
>
> cm->dig_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
> cm->dig_pcm_status = SNDRV_PCM_DEFAULT_CON_SPDIF;
>
> I also recmmend that the "Four Channel" switch should be turned off for
> surround41 and surround50, as well as surround51 and surround71. The
It is turned off, indeed. In the configuration:
{
name "Four Channel Mode"
lock true
preserve true
==> value false
}
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: CMI8768 patch
@ 2005-02-20 23:20 "Tien, C.L. - 田承禮"
2005-02-22 11:30 ` Takashi Iwai
0 siblings, 1 reply; 18+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-02-20 23:20 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Should it be instide the patch or just like:
Signed-off-by: ChenLi Tien <cltien@cmedia.com.tw>
I still cannot use the softvol with 8768, but softvol works with the 8739 so I don't
know if anything need to do except not setting PCM Playback Volume item for mixer.
Sincerely,
ChenLi Tien
-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de]
Sent: 2005/2/18 [星期五] 上午 05:27
To: Tien, C.L. - 田承禮
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] CMI8768 patch
At Fri, 18 Feb 2005 06:11:03 +0800,
Tien, C.L. wrote:
>
> Hi,
>
> I made a patch for CM8768, which has the same PCI ID but there are
> several HW diffecece, aas listed:
>
> 1. 8768 has no PCM volume control.
> 2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
> 3. 8768 can support up to 8 channels.
>
> I made change for item 2 and 3, I want to use the softvol plugin but
> don't know how to. The driver just don't generate the PCM volume slider
> for now.
Thanks for the patch. It looks fine.
Could you provide a "Signed-off-by" line to keep your credit in
changelog, such as
Signed-off-by: Foo Bar <foo@bar.com>
This is required to submit to linux-kernel.
thanks,
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://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: CMI8768 patch
2005-02-20 23:20 "Tien, C.L. - 田承禮"
@ 2005-02-22 11:30 ` Takashi Iwai
0 siblings, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2005-02-22 11:30 UTC (permalink / raw)
To: cltien; +Cc: alsa-devel
At Mon, 21 Feb 2005 07:20:55 +0800,
Tien, C.L. wrote:
>
> Should it be instide the patch or just like:
>
> Signed-off-by: ChenLi Tien <cltien@cmedia.com.tw>
Both are OK. Thanks.
> I still cannot use the softvol with 8768, but softvol works with the 8739 so I don't
> know if anything need to do except not setting PCM Playback Volume item for mixer.
The softvol won't create a control if it already exists in h/w, and
skips the software attenuation. But, in your patch, PCM Playback
Volume control is removed, so it should work...
Did you try my config file I sent you in the last mail?
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* CMI8768 patch
@ 2005-02-17 22:11 "Tien, C.L. - 田承禮"
2005-02-18 10:27 ` Takashi Iwai
2005-02-18 10:58 ` Takashi Iwai
0 siblings, 2 replies; 18+ messages in thread
From: "Tien, C.L. - 田承禮" @ 2005-02-17 22:11 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 462 bytes --]
Hi,
I made a patch for CM8768, which has the same PCI ID but there are
several HW diffecece, aas listed:
1. 8768 has no PCM volume control.
2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
3. 8768 can support up to 8 channels.
I made change for item 2 and 3, I want to use the softvol plugin but
don't know how to. The driver just don't generate the PCM volume slider
for now.
The patch file is attached.
Sincerely,
ChenLi Tien
[-- Attachment #2: cmipci.c.patch --]
[-- Type: application/octet-stream, Size: 5019 bytes --]
--- alsa-driver-1.0.8/alsa-kernel/pci/cmipci.c Mon Jan 3 06:45:31 2005
+++ alsa-driver-1.0.8-update/alsa-kernel/pci/cmipci.c Thu Feb 17 12:48:53 2005
@@ -156,6 +156,8 @@
#define CM_CHIP_MASK2 0xff000000
#define CM_CHIP_039 0x04000000
#define CM_CHIP_039_6CH 0x01000000
+#define CM_CHIP_055 0x08000000
+#define CM_CHIP_8768 0x20000000
#define CM_TDMA_INT_EN 0x00040000
#define CM_CH1_INT_EN 0x00020000
#define CM_CH0_INT_EN 0x00010000
@@ -328,6 +330,13 @@
#define CM_REG_CH0_FRAME2 0x84
#define CM_REG_CH1_FRAME1 0x88 /* 0-15: count of samples at bus master; buffer size */
#define CM_REG_CH1_FRAME2 0x8C /* 16-31: count of samples at codec; fragment size */
+#define CM_REG_MISC_CTRL_8768 0x92 /* reg. name the same as 0x18 */
+#define CM_CHB3D8C 0x20 /* 7.1 channels support */
+#define CM_SPD32FMT 0x10 /* SPDIF/IN 32k */
+#define CM_ADC2SPDIF 0x08 /* ADC output to SPDIF/OUT */
+#define CM_SHAREADC 0x04 /* DAC in ADC as Center/LFE */
+#define CM_REALTCMP 0x02 /* monitor the CMPL/CMPR of ADC */
+#define CM_INVLRCK 0x01 /* invert ZVPORT's LRCK */
/*
* size of i/o region
@@ -674,7 +683,7 @@
/*
*/
-static unsigned int hw_channels[] = {1, 2, 4, 5, 6};
+static unsigned int hw_channels[] = {1, 2, 4, 5, 6, 8};
static snd_pcm_hw_constraint_list_t hw_constraints_channels_4 = {
.count = 3,
.list = hw_channels,
@@ -685,6 +694,11 @@
.list = hw_channels,
.mask = 0,
};
+static snd_pcm_hw_constraint_list_t hw_constraints_channels_8 = {
+ .count = 6,
+ .list = hw_channels,
+ .mask = 0,
+};
static int set_dac_channels(cmipci_t *cm, cmipci_pcm_t *rec, int channels)
{
@@ -704,13 +718,20 @@
snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_CHB3D);
}
- if (channels == 6) {
+ if (channels >= 6) {
snd_cmipci_set_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_ENCENTER);
} else {
snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_ENCENTER);
}
+ if (cm->chip_version == 68) {
+ if (channels == 8) {
+ snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL_8768, CM_CHB3D8C);
+ } else {
+ snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL_8768, CM_CHB3D8C);
+ }
+ }
spin_unlock_irq(&cm->reg_lock);
} else {
@@ -1504,6 +1525,7 @@
if ((err = open_device_check(cm, CM_OPEN_PLAYBACK, substream)) < 0)
return err;
runtime->hw = snd_cmipci_playback;
+ runtime->hw.channels_max = cm->max_channels;
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
cm->dig_pcm_status = cm->dig_status;
return 0;
@@ -1518,6 +1540,10 @@
if ((err = open_device_check(cm, CM_OPEN_CAPTURE, substream)) < 0)
return err;
runtime->hw = snd_cmipci_capture;
+ if (cm->chip_version == 68) { // 8768 only supports 44k/48k recording
+ runtime->hw.rate_min = 41000;
+ runtime->hw.rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000;
+ }
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
return 0;
}
@@ -1537,8 +1563,10 @@
runtime->hw.channels_max = cm->max_channels;
if (cm->max_channels == 4)
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels_4);
- else
+ else if (cm->max_channels == 6)
snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels_6);
+ else if (cm->max_channels == 8)
+ snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, &hw_constraints_channels_8);
}
snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 0, 0x10000);
}
@@ -2346,6 +2374,11 @@
spin_unlock_irq(&cm->reg_lock);
for (idx = 0; idx < ARRAY_SIZE(snd_cmipci_mixers); idx++) {
+ if (cm->chip_version == 68) { // 8768 has no PCM volume
+ if (!strcmp(snd_cmipci_mixers[idx].name,
+ "PCM Playback Volume"))
+ continue;
+ }
if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cmipci_mixers[idx], cm))) < 0)
return err;
}
@@ -2496,21 +2529,29 @@
}
} else {
/* check reg 0Ch, bit 26 */
- if (detect & CM_CHIP_039) {
+ if (detect & CM_CHIP_8768) {
+ cm->chip_version = 68;
+ cm->max_channels = 8;
+ cm->can_ac3_hw = 1;
+ cm->has_dual_dac = 1;
+ cm->can_multi_ch = 1;
+ } else if (detect & CM_CHIP_055) {
+ cm->chip_version = 55;
+ cm->max_channels = 6;
+ cm->can_ac3_hw = 1;
+ cm->has_dual_dac = 1;
+ cm->can_multi_ch = 1;
+ } else if (detect & CM_CHIP_039) {
cm->chip_version = 39;
- if (detect & CM_CHIP_039_6CH)
- cm->max_channels = 6;
+ if (detect & CM_CHIP_039_6CH) /* 4 or 6 channels */
+ cm->max_channels = 6;
else
cm->max_channels = 4;
cm->can_ac3_hw = 1;
cm->has_dual_dac = 1;
cm->can_multi_ch = 1;
} else {
- cm->chip_version = 55; /* 4 or 6 channels */
- cm->max_channels = 6;
- cm->can_ac3_hw = 1;
- cm->has_dual_dac = 1;
- cm->can_multi_ch = 1;
+ printk(KERN_ERR "chip %x version not supported\n", detect);
}
}
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: CMI8768 patch
2005-02-17 22:11 "Tien, C.L. - 田承禮"
@ 2005-02-18 10:27 ` Takashi Iwai
2005-02-18 10:58 ` Takashi Iwai
1 sibling, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2005-02-18 10:27 UTC (permalink / raw)
To: cltien; +Cc: alsa-devel
At Fri, 18 Feb 2005 06:11:03 +0800,
Tien, C.L. wrote:
>
> Hi,
>
> I made a patch for CM8768, which has the same PCI ID but there are
> several HW diffecece, aas listed:
>
> 1. 8768 has no PCM volume control.
> 2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
> 3. 8768 can support up to 8 channels.
>
> I made change for item 2 and 3, I want to use the softvol plugin but
> don't know how to. The driver just don't generate the PCM volume slider
> for now.
Thanks for the patch. It looks fine.
Could you provide a "Signed-off-by" line to keep your credit in
changelog, such as
Signed-off-by: Foo Bar <foo@bar.com>
This is required to submit to linux-kernel.
thanks,
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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: CMI8768 patch
2005-02-17 22:11 "Tien, C.L. - 田承禮"
2005-02-18 10:27 ` Takashi Iwai
@ 2005-02-18 10:58 ` Takashi Iwai
1 sibling, 0 replies; 18+ messages in thread
From: Takashi Iwai @ 2005-02-18 10:58 UTC (permalink / raw)
To: cltien; +Cc: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
At Fri, 18 Feb 2005 06:11:03 +0800,
Tien, C.L. wrote:
>
> 1. 8768 has no PCM volume control.
> 2. The ADC of 8768 can only record in 44.1kHz or 48kHz.
> 3. 8768 can support up to 8 channels.
>
> I made change for item 2 and 3, I want to use the softvol plugin but
> don't know how to. The driver just don't generate the PCM volume slider
> for now.
Regarding the softvol:
Could you try the config below? Copy it to /usr/share/alsa/cards.
And run once like "aplay foo.wav". Then PCM volume should appear.
Takashi
[-- Attachment #2: CMI8738-MC8.conf --]
[-- Type: application/octet-stream, Size: 2302 bytes --]
#
# Configuration for the CMI8768 chip with 8 multi-channel support
#
<confdir:pcm/front.conf>
CMI8738-MC8.pcm.front.0 {
@args [ CARD ]
@args.CARD {
type string
}
type softvol
slave.pcm {
type hw
card $CARD
device 0
}
control {
name "PCM Playback Volume"
card $CARD
}
}
# default with dmix+softvol & dsnoop
CMI8738-MC8.pcm.default {
@args [ CARD ]
@args.CARD {
type integer
}
type asym
playback.pcm {
type plug
slave.pcm {
type softvol
slave.pcm {
@func concat
strings [ "dmix:" $CARD ]
}
control {
name "PCM Playback Volume"
card $CARD
}
}
}
capture.pcm {
type plug
slave.pcm {
@func concat
strings [ "dsnoop:" $CARD ]
}
}
}
<confdir:pcm/rear.conf>
# 2nd DAC
CMI8738-MC8.pcm.rear.0 {
@args [ CARD ]
@args.CARD {
type string
}
type softvol
slave.pcm {
type hw
card $CARD
device 1
}
control {
name "PCM Playback Volume"
card $CARD
}
}
<confdir:pcm/surround40.conf>
CMI8738-MC8.pcm.surround40.0 {
@args [ CARD ]
@args.CARD {
type string
}
type softvol
slave.pcm {
type hooks
slave.pcm {
type hw
card $CARD
device 1
}
hooks.0 {
type ctl_elems
hook_args [
{
name "Four Channel Mode"
lock true
preserve true
value false
}
]
}
}
control {
name "PCM Playback Volume"
card $CARD
}
}
<confdir:pcm/surround41.conf>
<confdir:pcm/surround50.conf>
<confdir:pcm/surround51.conf>
CMI8738-MC8.pcm.surround51.0 "cards.CMI8738-MC8.pcm.surround40.0"
<confdir:pcm/surround71.conf>
CMI8738-MC8.pcm.surround71.0 "cards.CMI8738-MC8.pcm.surround40.0"
<confdir:pcm/iec958.conf>
CMI8738-MC8.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.AES0 {
type integer
}
@args.AES1 {
type integer
}
@args.AES2 {
type integer
}
@args.AES3 {
type integer
}
type asym
playback.pcm {
type hooks
slave.pcm {
type hw
card $CARD
device 2
}
hooks.0 {
type ctl_elems
hook_args [
{
interface PCM
name "IEC958 Playback PCM Stream"
device 2
lock true
preserve true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
name "IEC958 Loop"
lock true
preserve true
value off
}
]
}
}
capture.pcm {
type hw
card $CARD
device 2
}
}
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2005-02-24 23:23 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-23 3:42 CMI8768 patch "Tien, C.L. - 田承禮"
2005-02-23 10:42 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2005-02-23 22:50 "Tien, C.L. - 田承禮"
2005-02-24 4:20 ` Sergio Monteiro Basto
2005-02-24 10:30 ` Takashi Iwai
2005-02-24 18:42 ` Sergio Monteiro Basto
2005-02-24 18:52 ` Takashi Iwai
2005-02-24 23:23 ` Sergio Monteiro Basto
2005-02-24 9:52 ` Takashi Iwai
2005-02-23 20:50 "Tien, C.L. - 田承禮"
2005-02-22 22:00 "Tien, C.L. - 田承禮"
2005-02-22 19:07 "Tien, C.L. - 田承禮"
2005-02-22 19:51 ` Takashi Iwai
2005-02-20 23:20 "Tien, C.L. - 田承禮"
2005-02-22 11:30 ` Takashi Iwai
2005-02-17 22:11 "Tien, C.L. - 田承禮"
2005-02-18 10:27 ` Takashi Iwai
2005-02-18 10:58 ` 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.