Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Giuliano Pochini <pochini@shiny.it>
To: "Aggarwal, Anuj" <anuj.aggarwal@ti.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Buffer management in ALSA
Date: Fri, 21 Mar 2008 00:51:31 +0000	[thread overview]
Message-ID: <20080321005131.8169cda4.pochini@shiny.it> (raw)
In-Reply-To: <010C7BAE6783F34D9AC336EE5A01A088058D4D70@dbde01.ent.ti.com>

On Wed, 19 Mar 2008 08:36:06 +0530
"Aggarwal, Anuj" <anuj.aggarwal@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.

      reply	other threads:[~2008-03-20 23:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3514.1205879646.2095.alsa-devel@alsa-project.org>
2008-03-19  3:06 ` Buffer management in ALSA Aggarwal, Anuj
2008-03-21  0:51   ` Giuliano Pochini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080321005131.8169cda4.pochini@shiny.it \
    --to=pochini@shiny.it \
    --cc=alsa-devel@alsa-project.org \
    --cc=anuj.aggarwal@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox