Date 8.7.2014 18:00, Mark Brown wrote:
On Tue, Jul 08, 2014 at 05:00:26PM +0200, Takashi Iwai wrote:
Mark Brown wrote:
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.
I'm totally OK with that as well if people don't mind that, I just added a new clock as the most conservative option. I can easily respin the patch for this if you prefer?
Note that the silent change would break the timestamp compatibility, because monotonic timestamp is used in alsa-lib by default. I would prefer to add a new type as originaly proposed and allow to choose between NTP monotonic and raw monotonic. Also the network timestamp might allow better synchronization for network apps (not sure about the real usage now, but we're working on an universal framework).
While we're at it: there's been long-standing request from V4L guys for improving the timestamps to sync with video streams. I suggested to add a new mode that can be set by the driver. Worth to consider it, too?
Does the wall clock stuff address that? I've no objection to adding a further type if the existing ones (and this one aren't sufficient).
I'm curious about requested sync, too..
Jaroslav