[alsa-devel] What recommended performance for ALSA(ASoC)?
perex at perex.cz
Fri Mar 7 08:49:09 CET 2008
On Fri, 7 Mar 2008, Jinyoung Park wrote:
> Hello, I tred developing new ALSA(ASoC) driver for our company's
> embedded processor.
> Our processor supported I2S and DMA. So, my ALSA drvier implementation
> using DMA.
> I was tested my ALSA driver. When I play wav file(sample rate 44100)
> using aplay( aplay -M -D hw:0,0 test.wav), sometimes occured breaks.
> Also, play mp3 file(sample rate 44100Hz) using madplay and mpg123,
> sometimes occured noises.
> So, I was tested wav file and mp3 file that down sampling 44100 ->
> 22050. They was not occurring break and decreasing noises.
> I tried improving my ALSA driver, optimize souce code and change
> variety buffer size and period size. But It doesn't improve much.
> In my guess, my target system is not enough performance because ALSA is heavy.
> Target system' processor(ARM9) clock is 200MHz and BogoMIPS is
> 99.6(cat /proc/cpuinfo). Linux kernel version is 188.8.131.52.
> What recommended performance for ALSA(ASoC)?
> If my target system is enough performance, shall I do that solve problem?
It looks like that your driver has trouble with highter rates. Also, try
to measure where the problem occurs. Maybe your system is not able to
deliver data from source in time to sound DMA buffer for continuous
playback. Note that whole system must be tuned not only ALSA driver to get
satisfiable results. DMA+mmap transfers are pretty lightweight in ALSA,
but if disc read operation eats too much CPU time, you cannot expect good
Regarding noises - I would check if DMA ring buffer position reported from
driver is correct in application. It looks like a handshake or
maybe cache problem.
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
More information about the Alsa-devel