Thanks a lot for all the advice. Ive solved the problem The snd_pcm_dump() revealed that the ice1712 was defaulting to a period time of 2 frames!! My CPU was spending all its energy handling interrupts. The faster I sampled the data, the more it worked. I increased it to 1024 and now all sampling rates work at under 3% CPU. That is still probably too high by a factor of 3, but its within working range. Im probably missing a few other such parameters. I intend to track them down.
Thanks a lot for your help again! -Bhiksha
Jaroslav Kysela wrote:
On Sun, 28 Dec 2003, bhiksha wrote:
Hi Jaroslav,
Thanks a lot! That helped.
Using hw:0 instead of plughw:0 did not make a difference.
Then something is broken in your code. The hw:0 does not do any processing, so you cannot capture 8 channels.
However, capturing 12 channels instead of 8 did. If I capture 12 channels, I use only 21% of the CPU. 8 channels use 50%. This happens regardless of whether I use plughw or hw. This is a huge improvement. Apparently the additional 30% CPU was used to reformat the 12interleaved samples into a stream with 8 interleaved samples.
The CPU is still a function of sampling rate: sampling at
48khz takes 10% cpu, whereas 96Khz uses 21%.
So I suspect there is still some unnecessary processing
going on, since both 96k and 48k are supported sampling
rates. Would you have any other leads to follow?
Does arecord show the same behaviour? You may check the installed
plugins via snd_pcm_dump() function. Also, if you use read()/write() interface instead of mmap one, you must take in account the extra copy from the ring buffer to your buffers. But yes, the 11% difference is a little bit big.
Jaroslav
-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Alsa-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-user