diff options
author | Jaroslav Kysela <perex@perex.cz> | 2007-12-13 04:19:42 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:29:31 -0500 |
commit | b751eef1fdffca5532344285f2fad0c60d2f0158 (patch) | |
tree | d504104c6315a8abc4b3f657f8f4828fb55a8795 /include/sound/asound.h | |
parent | 25543fa785a32ce22e7374ba403eb6d38854d037 (diff) |
[ALSA] Use posix clock monotonic for PCM and timer timestamps
We need an accurate and continuous (monotonic) time sources to do
accurate synchronization among more timing sources. This patch allows
to enable monotonic timestamps for ALSA PCM devices and enables monotonic
timestamps for ALSA timer devices.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound/asound.h')
-rw-r--r-- | include/sound/asound.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h index 3ad534149c06..475eb71d65ba 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h | |||
@@ -138,7 +138,7 @@ enum { | |||
138 | * * | 138 | * * |
139 | *****************************************************************************/ | 139 | *****************************************************************************/ |
140 | 140 | ||
141 | #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 8) | 141 | #define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9) |
142 | 142 | ||
143 | typedef unsigned long snd_pcm_uframes_t; | 143 | typedef unsigned long snd_pcm_uframes_t; |
144 | typedef signed long snd_pcm_sframes_t; | 144 | typedef signed long snd_pcm_sframes_t; |
@@ -435,9 +435,15 @@ struct snd_xfern { | |||
435 | }; | 435 | }; |
436 | 436 | ||
437 | enum { | 437 | enum { |
438 | SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */ | ||
439 | SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ | ||
440 | SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, | ||
441 | }; | ||
442 | |||
443 | enum { | ||
438 | SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int), | 444 | SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int), |
439 | SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct snd_pcm_info), | 445 | SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct snd_pcm_info), |
440 | SNDRV_PCM_IOCTL_TSTAMP = _IOW('A', 0x02, int), | 446 | SNDRV_PCM_IOCTL_TTSTAMP = _IOW('A', 0x03, int), |
441 | SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct snd_pcm_hw_params), | 447 | SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct snd_pcm_hw_params), |
442 | SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct snd_pcm_hw_params), | 448 | SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct snd_pcm_hw_params), |
443 | SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12), | 449 | SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12), |