[alsa-devel] Buffer management in ALSA

Giuliano Pochini pochini at shiny.it
Fri Mar 21 01:51:31 CET 2008


On Wed, 19 Mar 2008 08:36:06 +0530
"Aggarwal, Anuj" <anuj.aggarwal at ti.com> wrote:

> Hi All,
> 
> Can anyone throw some light on the buffer management part in the ALSA
> framework? How and where it is implemented? And what is expected from
> the driver, which is hooking its code to the framework?

Since each card has different requirements the driver has to manage its
buffers. Usually the driver has just to set up the buffer and the
scatter-gather list and then ALSA accesses it with no other support from
the driver. The buffer is supposed di be a "ring", ie. when the card
reaches the end of the buffer, it restarts automatically from the
beginning. If the cards needs the CPU to copy or process the data (e.g. it
doesn't support DMA), then the driver has to provide a callback function
which will be called at the end of each period.


--
Giuliano.


More information about the Alsa-devel mailing list