From 7562320e3b0d6a165dfb0a8c1783223f7531c37f Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 17 Dec 2007 09:04:42 +0100 Subject: [PATCH] Added SNDRV_PCM_IOCTL_TTSTAMP and updated PCM API version to 2.0.9 --- include/sound/asound.h | 10 +++++++++- src/pcm/pcm_hw.c | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/sound/asound.h b/include/sound/asound.h index 3909e837..18eeb073 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -157,7 +157,7 @@ enum { * * *****************************************************************************/ -#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7) +#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 9) typedef unsigned long sndrv_pcm_uframes_t; typedef long sndrv_pcm_sframes_t; @@ -460,10 +460,18 @@ struct sndrv_xfern { sndrv_pcm_uframes_t frames; }; + +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, +}; + enum { SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int), SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct sndrv_pcm_info), SNDRV_PCM_IOCTL_TSTAMP = _IOW('A', 0x02, int), + SNDRV_PCM_IOCTL_TTSTAMP = _IOW('A', 0x03, int), SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct sndrv_pcm_hw_params), SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct sndrv_pcm_hw_params), SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12), diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index 7be92961..94eca84e 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -102,7 +102,7 @@ typedef struct { #define SNDRV_FILE_PCM_STREAM_PLAYBACK ALSA_DEVICE_DIRECTORY "pcmC%iD%ip" #define SNDRV_FILE_PCM_STREAM_CAPTURE ALSA_DEVICE_DIRECTORY "pcmC%iD%ic" -#define SNDRV_PCM_VERSION_MAX SNDRV_PROTOCOL_VERSION(2, 0, 5) +#define SNDRV_PCM_VERSION_MAX SNDRV_PROTOCOL_VERSION(2, 0, 9) /* update appl_ptr with driver */ #define FAST_PCM_STATE(hw) \ -- 2.47.1