* Re: What recommended performance for ALSA(ASoC)?
[not found] <5BF78BCE8D9BF14A83F836BD9E3916BA053FDA@blrms.slti.sanyo.co.in>
@ 2008-03-07 17:25 ` Jin-Young Park
0 siblings, 0 replies; 4+ messages in thread
From: Jin-Young Park @ 2008-03-07 17:25 UTC (permalink / raw)
To: Prithwee Narayan N S; +Cc: alsa-devel
Thanks for your reply.
Your advises are very important information for me. Because explained your
target system is very similar my target system.
> I would like to say ALSA will perfectly runs on your target SOC clock.
> I am running it on 192MHz ARM926 core along with H.264 video decoder!!!.
> BogoMIPS = 95.84.
> Even I had the same glitch problem before.
Following debugging tips are very helpful.
I have questions about debugging tips.
> Few debug steps here:
> 1. Check the DMA Configuration. (Transfer size, buffer size and
number of Transfers)
> 2. Does your period,period bytes ,buffer size of Ringbuffer matcheswith the DMA buffer?
What is your ALSA driver setting that buffer bytes, period bytes, periods?
Current my driver setting values are buffer bytes(4KBytes), period
bytes(2KBytes), periods(2).
>Check the correct re-initilization of "period" once the buffer is full.
What does meannig? I don't understand.
And what is proper function for checking buffer and period?
prepare,trigger,irq handler, pointer...
> 3. Check the current DMA postion at the point of "pointer" callback.This should be equal to number of samples send to the PCM middle layer.
> 4. As Jaroslav says disc read speed should be > (44100*2*16) for
44.1K 16bit stereo. Or else read from NFSBOOT if your SOC support Ethernet.
> 5. Always test with a "sinewave" for glitchs, not with your
favoritesong J
Tell me recommended music for audio test.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* What recommended performance for ALSA(ASoC)?
@ 2008-03-07 2:01 Jinyoung Park
2008-03-07 7:49 ` Jaroslav Kysela
0 siblings, 1 reply; 4+ messages in thread
From: Jinyoung Park @ 2008-03-07 2:01 UTC (permalink / raw)
To: alsa-devel
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 2.6.24.1.
What recommended performance for ALSA(ASoC)?
If my target system is enough performance, shall I do that solve problem?
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: What recommended performance for ALSA(ASoC)?
2008-03-07 2:01 Jinyoung Park
@ 2008-03-07 7:49 ` Jaroslav Kysela
2008-03-07 11:20 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Jaroslav Kysela @ 2008-03-07 7:49 UTC (permalink / raw)
To: Jinyoung Park; +Cc: alsa-devel
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 2.6.24.1.
>
> 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
results.
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
-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: What recommended performance for ALSA(ASoC)?
2008-03-07 7:49 ` Jaroslav Kysela
@ 2008-03-07 11:20 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2008-03-07 11:20 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel, Jinyoung Park
On Fri, Mar 07, 2008 at 08:49:09AM +0100, Jaroslav Kysela wrote:
> On Fri, 7 Mar 2008, Jinyoung Park wrote:
> > Target system' processor(ARM9) clock is 200MHz and BogoMIPS is
> > 99.6(cat /proc/cpuinfo). Linux kernel version is 2.6.24.1.
> > What recommended performance for ALSA(ASoC)?
> > If my target system is enough performance, shall I do that solve problem?
That should be more than enough in terms of CPU performance - it's
fairly typical for an ASoC-based system.
> 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
> results.
If the CPU is busy it's also worth ensuring that the playback format you
are using is directly supported by the hardware to avoid the CPU having
to do any additional transcoding.
> 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.
Also check that the clocking of the audio subsystem isn't going to be
introducing any glitches. You usually want to ensure that the audio
parts of the system are part of a single clocking domain.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-07 17:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <5BF78BCE8D9BF14A83F836BD9E3916BA053FDA@blrms.slti.sanyo.co.in>
2008-03-07 17:25 ` What recommended performance for ALSA(ASoC)? Jin-Young Park
2008-03-07 2:01 Jinyoung Park
2008-03-07 7:49 ` Jaroslav Kysela
2008-03-07 11:20 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox