Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bill Gatliff <bgat@billgatliff.com>
To: alsa-devel@alsa-project.org
Subject: What is the format of dma_area?
Date: Thu, 06 Oct 2005 22:15:49 -0500	[thread overview]
Message-ID: <4345E865.9060102@billgatliff.com> (raw)

Guys:


I'm trying to write a PCM driver that uses an AC97 codec, on an ARM 
host, but no DMA.  (Please pardon some of my terminology, I'm a bit of 
an ALSA noob).

My trigger() looks something like this:

int *buffer;
int bytes;
...
  switch (cmd) {
  case SNDRV_PCM_TRIGGER_START:
    bytes = frames_to_bytes(substream->runtime, 
substream->runtime->period_size);
    buffer = substream->runtime->dma_area;
...

Then, I copy *buffer++ out to the codec one 32-bit chunk (truncated to 
20 bits) at a time.

One thing I don't understand is how dma_area is formatted.  Is it a 
stream of integers, like this?

int dma_area[channels][samples];

... or like this?

int dma_area[samples][channels];

... or what?  I'm having trouble figuring out where the left- and 
right-channel data is in the dma buffer.


Thanks!


b.g.

-- 
Bill Gatliff
bgat@billgatliff.com



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl

             reply	other threads:[~2005-10-07  3:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-07  3:15 Bill Gatliff [this message]
2005-10-07 10:08 ` What is the format of dma_area? Takashi Iwai
2005-10-07 14:06   ` Bill Gatliff

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=4345E865.9060102@billgatliff.com \
    --to=bgat@billgatliff.com \
    --cc=alsa-devel@alsa-project.org \
    /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