Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* What is the format of dma_area?
@ 2005-10-07  3:15 Bill Gatliff
  2005-10-07 10:08 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Gatliff @ 2005-10-07  3:15 UTC (permalink / raw)
  To: alsa-devel

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

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

end of thread, other threads:[~2005-10-07 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-07  3:15 What is the format of dma_area? Bill Gatliff
2005-10-07 10:08 ` Takashi Iwai
2005-10-07 14:06   ` Bill Gatliff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox