[alsa-devel] Questions about virtual ALSA driver (dummy), PortAudio and full-duplex drops

Clemens Ladisch clemens at ladisch.de
Tue Aug 6 15:04:13 CEST 2013

David Henningsson wrote:
> On 08/06/2013 12:59 PM, Clemens Ladisch wrote:
>>> On 2013-07-25 10:37, Clemens Ladisch wrote:
>>>> Your driver's .pointer callback must report the *actual* position at
>>>> which the hardware has finished reading from the buffer
>> ... for a playback stream, or finished reading, for a capture stream.
> What if the pointer granularity is very coarse? E g, some hardware might
> only be able what period you're in (IIRC, I've seen this on the Tegra
> platform), rather than the actual sample. Would you recommend to report
> the latest period boundary in that case, or interpolating it with timers?

By reporting position x, the driver guarantees that the device has
finished reading (for a playback stream) before x, and that the
application is allowed to overwrite the buffer before x with new sample

When the driver does not know the current position of the DMA
controller, it must report the last known 'safe' position (and set


More information about the Alsa-devel mailing list