Re: [Alsa-devel] An driver error when I using aplay!
Roc Wu wrote: # ./aplay -t wav -f U8 -r 22050 alarm.wav Playing WAVE 'alarm.wav' : Unsigned 8 bit, Rate 22050 Hz, Mono ALSA lib pcm_plug.c:727:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for 'default' aplay: set_params:832: Sample format non available And the kernel driver will dump out the message as below: Badness in aaci_pcm_close at sound/arm/aaci.c:404 This seems to be a bug in the sound driver. However, arm/aaci.c is not part of the official ALSA distribution. AFAIK it's a patch written by Russell King. HTH Clemens --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
--- Clemens Ladisch [EMAIL PROTECTED] Roc Wu wrote: # ./aplay -t wav -f U8 -r 22050 alarm.wav Playing WAVE 'alarm.wav' : Unsigned 8 bit, Rate 22050 Hz, Mono ALSA lib pcm_plug.c:727:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for 'default' aplay: set_params:832: Sample format non available And the kernel driver will dump out the message as below: Badness in aaci_pcm_close at sound/arm/aaci.c:404 This seems to be a bug in the sound driver. However, arm/aaci.c is not part of the official ALSA distribution. AFAIK it's a patch written by Russell King. HTH Clemens Yes. Thanks for your replay. Maybe I should send the mail to arm-linux mailist. PS. Could you recommend some docs about the ALSA internals and Low level drivers? There are too many docs in the www.alsa-project.org, I am an embedded Linux driver developer, so which one is suit for me? Thanks a lot Best Regards _ Do You Yahoo!? http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.html --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
On Mon, Jun 07, 2004 at 05:25:22PM +0800, Roc Wu wrote: --- Clemens Ladisch [EMAIL PROTECTED] µÄÕýÎÄ£º Roc Wu wrote: # ./aplay -t wav -f U8 -r 22050 alarm.wav Playing WAVE 'alarm.wav' : Unsigned 8 bit, Rate 22050 Hz, Mono ALSA lib pcm_plug.c:727:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for 'default' aplay: set_params:832: Sample format non available And the kernel driver will dump out the message as below: Badness in aaci_pcm_close at sound/arm/aaci.c:404 This seems to be a bug in the sound driver. Actually, I disagree. It's an ALSA bug. The warning is created if the AACI close method is called while the DMA or IO is still running. If DMA is still running here, we've already freed the DMA buffer, so we're either reading from or writing to memory we don't own - which is a major bug. The question is therefore: why is ALSA trying to shut down and free a device which still has DMA running? To be more explicit, why didn't ALSA call the trigger callback with SNDRV_PCM_TRIGGER_STOP prior to calling the hw_free or close methods? -- Russell King Linux kernel2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
On Mon, 7 Jun 2004, Russell King wrote: Actually, I disagree. It's an ALSA bug. The warning is created if the AACI close method is called while the DMA or IO is still running. If DMA is still running here, we've already freed the DMA buffer, so we're either reading from or writing to memory we don't own - which is a major bug. The question is therefore: why is ALSA trying to shut down and free a device which still has DMA running? To be more explicit, why didn't ALSA call the trigger callback with SNDRV_PCM_TRIGGER_STOP prior to calling the hw_free or close methods? The midlevel calls *drop() (which must stop the running stream) and then -hw_free and -close callbacks. I've never seen this error, so I suspect that something else is wrong. Could you track why snd_pcm_playback_drop() call fails in snd_pcm_release() for this hardware? Jaroslav - Jaroslav Kysela [EMAIL PROTECTED] Linux Kernel Sound Maintainer ALSA Project, SuSE Labs --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
At Mon, 7 Jun 2004 12:43:01 +0200 (CEST), Jaroslav wrote: On Mon, 7 Jun 2004, Russell King wrote: Actually, I disagree. It's an ALSA bug. The warning is created if the AACI close method is called while the DMA or IO is still running. If DMA is still running here, we've already freed the DMA buffer, so we're either reading from or writing to memory we don't own - which is a major bug. The question is therefore: why is ALSA trying to shut down and free a device which still has DMA running? To be more explicit, why didn't ALSA call the trigger callback with SNDRV_PCM_TRIGGER_STOP prior to calling the hw_free or close methods? The midlevel calls *drop() (which must stop the running stream) and then -hw_free and -close callbacks. I've never seen this error, so I suspect that something else is wrong. i guess so, too. as you can see in the original post, the error returned from hw_params callback (sample not available), thus it doesn't call trigger(START) callback yet at all. unfurtunately i can't tell any more unless i read the driver code. where can i find the code? Takashi --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
At Mon, 7 Jun 2004 14:08:17 +0100, Russell King wrote: On Mon, Jun 07, 2004 at 02:45:20PM +0200, Takashi Iwai wrote: i guess so, too. as you can see in the original post, the error returned from hw_params callback (sample not available), thus it doesn't call trigger(START) callback yet at all. If we never got past hw_params() then we didn't enable the IO, and it must be that something else in the system fiddled with the chip and set it incorrectly. unfurtunately i can't tell any more unless i read the driver code. where can i find the code? I never officially released the driver, though it was part of the old -rmk patches back in the 2.6.0-test era. Where Roc has got the source from, and what modifications have been made is anyones guess. Roc sent me the code now :) after a quick look, it seems that txcr isn't initialized in the open callback but only in hw_params callback (which was never called in this case). if my guess is correct, adding the following to aacpi_playback_open() should fix this problem: chan-txcr = 0; Takashi --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
At Mon, 7 Jun 2004 14:51:13 +0100, Russell King wrote: On Mon, Jun 07, 2004 at 03:40:23PM +0200, Takashi Iwai wrote: At Mon, 7 Jun 2004 14:08:17 +0100, Russell King wrote: On Mon, Jun 07, 2004 at 02:45:20PM +0200, Takashi Iwai wrote: i guess so, too. as you can see in the original post, the error returned from hw_params callback (sample not available), thus it doesn't call trigger(START) callback yet at all. If we never got past hw_params() then we didn't enable the IO, and it must be that something else in the system fiddled with the chip and set it incorrectly. unfurtunately i can't tell any more unless i read the driver code. where can i find the code? I never officially released the driver, though it was part of the old -rmk patches back in the 2.6.0-test era. Where Roc has got the source from, and what modifications have been made is anyones guess. Roc sent me the code now :) after a quick look, it seems that txcr isn't initialized in the open callback but only in hw_params callback (which was never called in this case). Why should it be explicitly initialised? Take a moment to consider what guarantees snd_card_new() gives for the allocated memory. Yep, that's right - it's initialised to zero. So, chan-txcr is already initialised to zero. You're right. The error was not txcr, but in another WARN_ON() for checking chan-tx_substream (line 404)! (Russell, you mislead this, too ;) The reason is same -- since hw_params is not called, chan-tx_substream is not set, too. Takashi --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
Russell King wrote: But unfortunately I don't have the driver code myself to be able to comment, so its probably been fscked. If the code was posted publically, the author of the code would get a lot more useful help from more eyes. --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
On Mon, Jun 07, 2004 at 04:18:55PM +0200, Takashi Iwai wrote: You're right. The error was not txcr, but in another WARN_ON() for checking chan-tx_substream (line 404)! (Russell, you mislead this, too ;) Well I don't have the exact source which this guy is using, so I can only guess. The reason is same -- since hw_params is not called, chan-tx_substream is not set, too. Wrong. It's memset to zero by matter of fact of how it is allocated. I'm surprised you don't know this. It is afterall code which I thought you'd be fully aware of, being core ALSA code. -- Russell King Linux kernel2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
On Mon, Jun 07, 2004 at 03:24:46PM +0100, James Courtier-Dutton wrote: Russell King wrote: But unfortunately I don't have the driver code myself to be able to comment, so its probably been fscked. If the code was posted publically, the author of the code would get a lot more useful help from more eyes. The author of the code (me) is complaining that he can't see the exact code in question because it appears to be either and old version or contains additional modifications. And the reason it isn't publically released yet is because ALSA fails to work correctly on ARM, so the desire to release it and end up supporting a lot of whinging people, explaining why core ALSA on ARM is broken is _NOT_ what I want. I'm not in the habbit of releasing known broken code. -- Russell King Linux kernel2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
Hi folks: I don't want to post my question again. But there is not any response about my question. Maybe I did some thing wrong about asking question, please let me know. I will change my method, Thanks a lot. Please give me some help. Best Regards --- Roc Wu [EMAIL PROTECTED] Hi folks: I compiled the alsa-utils. Then I run the aplay on my board like this: # ./aplay -t wav -f U8 -r 22050 alarm.wav Playing WAVE 'alarm.wav' : Unsigned 8 bit, Rate 22050 Hz, Mono ALSA lib pcm_plug.c:727:(snd_pcm_plug_hw_refine_schange) Unable to find an usable access for 'default' aplay: set_params:832: Sample format non available And the kernel driver will dump out the message as below: Badness in aaci_pcm_close at sound/arm/aaci.c:404 [c012ead0] (aaci_pcm_close+0x0/0x90) from [c011333c] (snd_pcm_release_file+0 x58/0x8c) r5 = C03852BC r4 = C03CDC88 [c01132e4] (snd_pcm_release_file+0x0/0x8c) from [c0113764] (snd_pcm_release+ 0x8c/0x110) r7 = C03852BC r6 = C7BF8820 r5 = C0388A00 r4 = C0388B18 [c01136d8] (snd_pcm_release+0x0/0x110) from [c0061e1c] (__fput+0x58/0x138) r7 = C7DEB1E8 r6 = C7FF5260 r5 = C7AFD7FC r4 = C7BF8820 [c0061dc4] (__fput+0x0/0x138) from [c0060824] (filp_close+0x84/0x90) r7 = 0001 r6 = C7FEAA00 r5 = r4 = C7BF8820 [c00607a0] (filp_close+0x0/0x90) from [c002e700] (put_files_struct+0x8c/0xe8 ) r6 = 0004 r5 = 0001 r4 = C7FEAA00 [c002e674] (put_files_struct+0x0/0xe8) from [c002f314] (do_exit+0x188/0x398) r7 = 0100 r6 = C00169C0 r5 = C0390360 r4 = C00169A0 [c002f18c] (do_exit+0x0/0x398) from [c002f55c] (next_thread+0x0/0x28) r7 = 0001 r6 = 0001 r5 = 402DDE10 r4 = 402DDE10 [c002f544] (sys_exit+0x0/0x18) from [c001e300] (ret_fast_syscall+0x0/0x2c) Please give me some hints about the problem. Thanks a lot Best Regards _ Do You Yahoo!? http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.html --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel _ Do You Yahoo!? http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.html --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel