TI E2E Community
High CPU usage when recording on TI DM6446 using ASoC AIC33
I am having a problem with high CPU usage (>90%) on TI DM6446 (ARM926 core) with TI TLV320AIC33 audio codec. When using the command "gst-launch -v alsasrc ! mulawenc ! rtppcmupay ! fakesink silent=true" the CPU usage raises to 97% after a while (e.g. after 38s) and drops to 0% again later (e.g. after next 78s). To check if the alsasrc element of GStreamer is the problem, I used "arecord -r 8000 -c 1 -f S16_LE --period-time=10000 --buffer-time=200000 > /dev/null" for comparison, and I also could see a similar problem: after some (more) seconds the CPU usage raises to >90% and drops to 0% afterwards again (but it stays at >90% for only ca. 33s ). I just monitored the problem with top and vmstat - vmstat log for arecord example can be seen at http://pastebin.com/H3LRtyPgWhen using the gstreamer command (especially alsasrc), a different latency-time and buffer-time has influence to the cpu usage (e.g. when using "gst-launch -v alsasrc latency-time=20000 buffer-time=400000 ! mulawenc ! rtppcmupay ! fakesink silent=true" CPU usage raised to 49% after a while, when using "gst-launch -v alsasrc latency-time=40000 buffer-time=800000 ! mulawenc ! rtppcmupay ! fakesink silent=true" CPU usage raised to 25% after a while...)I guess it could be a problem somewhere in the ALSA driver, but before trying to patch the driver to the latest version I would go for sure that this would help...I have seen a lot of commits in AIC33 git tree, but I guess its not that easy to update my kernel to the latest alsa-kernel version???1. Can someone confirm such a behaviour on DM6446 EVM?2. Does someone have a clue how to identify and solve the problem? 3. Would it be possible to update "just" the ALSA part in my Kernel do test the latest ASoC driver for DaVinci/AIC33?I am looking forward for any help!Just some version data:> I am using DM6446 with TI AIC33 Audio Codec running at vendor-specific 2.6.27 kernel (based on http://gitorious.org/linux-davinci/linux-davinci/trees/v2.6.27-davinci1 with ALSA driver patched to cb6e2063697e91ca6983f9fe6958d20469b43641 from alsa-kernel [2008-11-18] tree)> Advanced Linux Sound Architecture Driver Version 1.0.17.> ASoC version 0.13.2> AIC3X Audio Codec 0.2> asoc: aic3x <-> davinci-i2s mapping ok> ALSA device list:> #0: DaVinci EVM (aic3x)> Version of GStreamer 0.10.25 (also tested with 0.10.35 - the same problem)> ALSA library in user space is 1.0.19 (extracted from libasound.so)
Hi Tobias,I am not exactly sure what is included in the kernel you point to and I am not sure it is the latest possible available for DM6446.
a) The latest TI Linux kernel and drivers (PSP) that was released for DM6446 EVM is located below:http://processors.wiki.ti.com/index.php/DaVinci_%28ARM9%29_PSP_Releases#DM644xYou can look at the "What's Supported" and "Validation Information" to see what is supported and what was used to validate it.Rather than porting the latest DM644x alsa drivers to your kernel I would suggest to take the complete TI Linux release.b) Some alternatives are available like the community Angstrom distribution: http://narcissus.angstrom-distribution.org/select Davinci dvevm for DM6446 EVM.it includes for example the Alsa-utils that can be useful for testing the alsa drivers.
c) Also there commercial Linux distribution available: http://processors.wiki.ti.com/index.php/Linux_Consultants_and_Commercial_Linux_ProvidersFor example timesys does provide some evaluation kernel to download for the DM6446 EVM too.
I realize that Iam not really answering your question but at least I am trying to provide a good starting point were I think alsa and the rest of the drivers have been tested.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.