[alsa-devel] Improving status timestamp accuracy

Clemens Ladisch clemens at ladisch.de
Sat Jun 4 12:17:23 CEST 2016


Alan Young wrote:
> I am looking at ways to get more accurate status timestamp information
> for various SoC drivers.

What for?

> A call to snd_pcm_status() result in snd_pcm_update_hw_ptr0() being
> called. This gets the current output position (pos) via
> substream->ops->pointer(substream) and then makes all the other
> calculations based on the result. In theory, the result of
> substream->ops->pointer() could be sample accurate but in practice it
> is very unlikely to be better than period accurate.

Accurate timestamps make sense only with accurate pointers.  The purpose
of these timestamps is to allow better prediction of the position of the
DMA pointer, but this is pointless when the DMA pointer does large jumps.


Regards,
Clemens


More information about the Alsa-devel mailing list