All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] snd_pcm_start_at: Add enum for timestamp class, and helper struct for start_at ioctl.
@ 2014-12-17 17:29 Tim Cussins
  2014-12-17 17:29 ` [PATCH v2 2/3] snd_pcm_start_at: Add snd_pcm_ops so that driver can handle start_at requests Tim Cussins
  2014-12-17 17:29 ` [PATCH v2 3/3] snd_pcm_start_at: Implement snd_pcm_start_at for system and audio tstamp types Tim Cussins
  0 siblings, 2 replies; 5+ messages in thread
From: Tim Cussins @ 2014-12-17 17:29 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, nstoughton, Tim Cussins, pierre-louis.bossart

As per Pierre's suggestion, timestamp types are of two types:
System, and Audio.

Signed-off-by: Tim Cussins <timcussins@eml.cc>

diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 1f23cd6..bd1e9be 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -466,12 +466,30 @@ struct snd_xfern {
 };
 
 enum {
+        SNDRV_PCM_TSTAMP_CLASS_SYSTEM = 0,
+        SNDRV_PCM_TSTAMP_CLASS_AUDIO,
+        SNDRV_PCM_TSTAMP_CLASS_LAST = SNDRV_PCM_TSTAMP_CLASS_AUDIO,
+};
+
+enum {
 	SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0,	/* gettimeofday equivalent */
 	SNDRV_PCM_TSTAMP_TYPE_MONOTONIC,	/* posix_clock_monotonic equivalent */
 	SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,    /* monotonic_raw (no NTP) */
 	SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
 };
 
+enum {
+        SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 0,
+        SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK,
+        SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK,
+};
+
+struct snd_start_at {
+        int tstamp_class;
+        int tstamp_type;
+        struct timespec start_time;
+};
+
 /* channel positions */
 enum {
 	SNDRV_CHMAP_UNKNOWN = 0,
@@ -550,6 +568,8 @@ 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_start_at)
+
 
 /*****************************************************************************
  *                                                                           *
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-19 11:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 17:29 [PATCH v2 1/3] snd_pcm_start_at: Add enum for timestamp class, and helper struct for start_at ioctl Tim Cussins
2014-12-17 17:29 ` [PATCH v2 2/3] snd_pcm_start_at: Add snd_pcm_ops so that driver can handle start_at requests Tim Cussins
2014-12-17 17:29 ` [PATCH v2 3/3] snd_pcm_start_at: Implement snd_pcm_start_at for system and audio tstamp types Tim Cussins
2014-12-17 23:37   ` Raymond Yau
2014-12-19 11:41     ` Tim Cussins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.