At Mon, 22 Jul 2002 11:35:40 -0700 (PDT),
Guilhem Tardy wrote:
> 
> Hi all,
> 
> I would have a few questions regarding buffer mgt:
> 
> When is substream->dma_area used for capture or playback? (probably never, as
> snd_pcm_lib_malloc_pages() seems to imply that one should only use
> substream->runtime->dma_area)
 
it's used when the data is copied via copy_from/to_user(), or when the
buffer is mmapped.

please note that you don't need this always.  if you define copy and
silence callbacks, and if they don't handle any dma buffer on the cpu
side (e.g. buffers on a card), then you don't need this.
in such a case, mmap cannot be used.


> Where should captured audio data be copied into runtime->dma_area? Is it up to
> the driver or do capture_copy() and capture_silence() functions take the same
> role as for playback?

yes.  if copy and silence callbacks are defined, then it's up to the
driver.


> When does the pointer to the next playback/capture audio period rewind? I
> noticed that for more than 2 periods_max, this can happen anytime (eg. after 2,
> 3, ...) even before we reached the end of the buffer.

it must be after the hw_ptr reaches the end of the buffer.
please check snd_pcm_update_hw_ptr_interrupt() in pcm_lib.c.


Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to