[alsa-devel] paravirtualized alsa kernel driver for XEN

Clemens Ladisch clemens at ladisch.de
Tue Mar 20 14:10:14 CET 2012

Stefano Panella wrote:
> I have been reading the documentation on "Writing an ALSA Driver" and I
> am still not completely clear on the meaning of the "pointer" callback
> in the pcm operations.
> 1) In case of a playback stream, is the pointer referring to wich sample
> is currently playing on the DAC or to which is it the last frame read by
> the HW from the alsa memory buffer?

It's the position of the first frame not yet read from the memory buffer.

The delay between the DMA and the DAC output would be reported by
adjusting runtime->delay, but drivers usually do not bother to do this,
except when this delay becomes rather large because of additional
queueing, e.g., in the USB driver.

> 4) is there any test I could run to check I have implemented correctly
> the "pointer" callback? Or any application which would need very high
> "pointer" precision like frame precision?

Or run mplayer and look at the A-V value in the status line.


More information about the Alsa-devel mailing list