25 Nov
2011
25 Nov
'11
6:38 p.m.
Trent Piepho wrote:
When the driver schedules the final period, couldn't it check if the device is draining, and if so try to end playback at the right time.
The ALSA framework was designed for cards where DMA doesn't need to be scheduled continuously, so it is assumed that stopping happens asynchronously.
You could try to check the PCM state, but it's possible that the call to snd_pcm_drain() happens after you've scheduled the final period.
Regards, Clemens