[alsa-devel] When command SNDRV_PCM_TRIGGER_STOP is asked in snd_pcm_ops trigger(), which buffer in the buffer list should be the last one to output by the DMA?

Sonic Zhang sonic.adi at gmail.com
Thu Nov 8 06:43:13 CET 2007


In our blackfin ad1981 linux driver, there is an output ring with
"periods" buffers. Each buffer is of the size of "period_size".

After ALSA starts playing, several buffers ahead of current one
running by the DMA controller are usually filled in advance by the
ALSA layer. When command SNDRV_PCM_TRIGGER_STOP is asked in
snd_pcm_ops trigger(), which buffer should be the last one to output
by the DMA?

1. Current buffer, which is running by the DMA controller
2. The last buffer, which the DMA controller just finished outputting
and snd_pcm_ops pointer() is notifiyed to ALSA layer. Does this mean
current buffer in DMA should be abandoned in the middle?
3. The last buffer, which the ALSA layer has just filled in snd_pcm_ops copy()?


Thanks


More information about the Alsa-devel mailing list