[alsa-devel] [PATCH] ALSA: Provide a CLOCK_MONOTONIC_RAW timestamp type
Clemens Ladisch
clemens at ladisch.de
Tue Jul 8 19:01:48 CEST 2014
Takashi Iwai wrote:
> Mark Brown wrote:
>> For applications which need to synchronise with external timebases such
>> as broadcast TV applications the kernel monotonic time is not optimal as
>> it includes adjustments from NTP and so may still include discontinuities
>> due to that. A raw monotonic time which does not include any adjustments
>> is available in the kernel from getrawmonotonic() so provide userspace with
>> a new timestamp type SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW which provides
>> timestamps based on this as an option.
>
> This looks good to me. Or, thinking of the original use case, should
> we just replace ktime_get_ts() with getrawmonotonic()? The MONOTONIC
> mode is really to be monotonic.
This would break any applications that relate these timestamps to their
own timestamps from clock_gettime(CLOCK_MONOTONIC).
Regards,
Clemens
More information about the Alsa-devel
mailing list