ALSA: provide a simple mechanism to start playback at a given time
PATCH 1/1 ALSA: provide a simple mechanism to start playback at a given time
Given an absolute time based on the clock used by the substream setup a high resolution timer to cause playback to be triggered at that time.
Signed-off-by Nick Stoughton <[email protected]>
--- include/uapi/sound/asound.h | 6 ++ sound/core/pcm_native.c | 142 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+)
include/uapi/sound/asound.h +6 -0
@@ -462,6 +462,11 @@ struct snd_xfern {snd_pcm_uframes_t frames; }; +struct snd_clock_time { +clockid_t clock; +struct timespec time; +}; +enum {SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY =0 ,/* gettimeofday equivalent */ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC ,/* posix_clock_monotonic equivalent */
@@ -547,6 +552,7 @@ enum {#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern)#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int)#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61) +#define SNDRV_PCM_IOCTL_START_AT _IOW('A', 0x62, struct snd_clock_time)/***************************************************************************** * *
sound/core/pcm_native.c +142 -0
166 lines not on this page · raw message
Signature · 1 line
1.9.3