All of lore.kernel.org
 help / color / mirror / Atom feed
* How is buffer size, periode size and periods determined?
@ 2006-05-12 13:55 Hans-Christian Egtvedt
  2006-05-17  7:47 ` How is buffer size, periode size and periods de Giuliano Pochini
  0 siblings, 1 reply; 2+ messages in thread
From: Hans-Christian Egtvedt @ 2006-05-12 13:55 UTC (permalink / raw)
  To: alsa-devel

Hi

I'm experiencing that my aplay/arecord (1.0.11) is setting up a bit
weird values for buffer size, period size and periods.

For example when trying to record S16_LE 44100 Hz Mono I get the
following parameters:
buffer size: 44100
period size: 4094
periods    : 10

10 * 4094 = 40940 != 44100, the player asks for a bigger buffer than needed.

Other example, S16_LE 32000 Hz Mono:
buffer size: 32752
period size: 4094
periods    : 8

8 * 4094 = 32752 == 32752, which is a correct buffer size.

How come the alsa-lib/aplay behaves like this? I would like to see the
last behaviour all the time. Does this point to a bug on my platform, or
is this the way alsa-lib can calculate the buffers?

The reason I'm asking is that it wastes some memory and the DMA
controller currently in the Linux for my platform doesn't like the
buffersize to be greater than periode size * periods.

-- 
With kind regards,
Med vennlig hilsen,

Hans-Christian Egtvedt
Applications Engineer - AVR Applications Lab
Atmel Norway


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-17  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-12 13:55 How is buffer size, periode size and periods determined? Hans-Christian Egtvedt
2006-05-17  7:47 ` How is buffer size, periode size and periods de Giuliano Pochini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.