9 Nov
2007
9 Nov
'07
9:58 a.m.
Sonic Zhang wrote:
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?
When the stop trigger is called, the stream should be stopped immediately, that is, you should, if possible, not even wait for the end of the current buffer.
When an application calls snd_pcm_drain(), ALSA stops filling the buffer and waits until the data has played before calling the stop trigger.
HTH Clemens