Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* ALSA PCM DMA questions
@ 2005-05-19 21:53 Derek Jones
  2005-05-20  8:53 ` Giuliano Pochini
  0 siblings, 1 reply; 2+ messages in thread
From: Derek Jones @ 2005-05-19 21:53 UTC (permalink / raw)
  To: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

Hi,

I am busy developing an ALSA AC97 driver for an ARM9 based SoC. I am pulling my hair out trying to figure out how the DMA buffers are supposed to work in the PCM driver.

To start with, I am only trying to get playback working.

I start the DMA after I get a SNDRV_PCM TRIGGER_START in my trigger routine. The DMA transfer starts from runtime->dma_addr and transfers period_size bytes (snd_pcm_lib_period_bytes(substream)).

After the DMA transfer completes, I call snd_pcm_period_elaped(substream). I'm guessing that this moves a buffer pointer. What I cannot figure out is how to determine where I am in the buffer so that I can start the next DMA from the correct position.

When the entire buffer has been DMA'ed, is the buffer overwritten with new PCM data from userland, or does the DMA buffer work like a circular buffer with userland data being transferred into the buffer at each PCM period.

Any help or pointers would be greatly appreciated.

Regards,

Derek Jones

[-- Attachment #2: Type: text/html, Size: 1429 bytes --]

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

end of thread, other threads:[~2005-05-20  8:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 21:53 ALSA PCM DMA questions Derek Jones
2005-05-20  8:53 ` Giuliano Pochini

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