diff options
author | Mark Brown <broonie@linaro.org> | 2014-07-08 16:52:32 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-07-14 17:35:07 +0200 |
commit | 85e4704151677b8fcc5ccfc396071828e9ec1b8e (patch) | |
tree | fc0a25f8270fa93315f99c7bda25d18b132222f9 /include | |
parent | 035f196bcdc1e9903ed52ad1859dc23d3aa74e72 (diff) |
pcm: Provide a CLOCK_MONOTONIC_RAW timestamp type
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.
Reported-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/asound.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h index 1774a5c3..9061cdd5 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -457,7 +457,8 @@ struct snd_xfern { enum { SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ - SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, + SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */ + SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, }; /* channel positions */ |