Update of /cvsroot/alsa/alsa-lib/include/sound
In directory sc8-pr-cvs1:/tmp/cvs-serv15126a/include/sound

Modified Files:
        asound.h 
Log Message:
Timestamp update (struct timeval -> struct timespec).


Index: asound.h
===================================================================
RCS file: /cvsroot/alsa/alsa-lib/include/sound/asound.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- asound.h    20 Feb 2003 14:53:20 -0000      1.3
+++ asound.h    28 Feb 2003 17:23:30 -0000      1.4
@@ -1,6 +1,6 @@
 /*
  *  Advanced Linux Sound Architecture - ALSA - Driver
- *  Copyright (c) 1994-2000 by Jaroslav Kysela <[EMAIL PROTECTED]>,
+ *  Copyright (c) 1994-2003 by Jaroslav Kysela <[EMAIL PROTECTED]>,
  *                             Abramo Bagnara <[EMAIL PROTECTED]>
  *
  *
@@ -93,7 +93,7 @@
  *                                                                          *
  ****************************************************************************/
 
-#define SNDRV_HWDEP_VERSION            SNDRV_PROTOCOL_VERSION(1, 0, 0)
+#define SNDRV_HWDEP_VERSION            SNDRV_PROTOCOL_VERSION(1, 0, 1)
 
 enum sndrv_hwdep_iface {
        SNDRV_HWDEP_IFACE_OPL2 = 0,
@@ -150,7 +150,7 @@
  *                                                                           *
  *****************************************************************************/
 
-#define SNDRV_PCM_VERSION              SNDRV_PROTOCOL_VERSION(2, 0, 3)
+#define SNDRV_PCM_VERSION              SNDRV_PROTOCOL_VERSION(2, 0, 5)
 
 typedef unsigned long sndrv_pcm_uframes_t;
 typedef long sndrv_pcm_sframes_t;
@@ -398,8 +398,8 @@
 
 struct sndrv_pcm_status {
        enum sndrv_pcm_state state;     /* stream state */
-       struct timeval trigger_tstamp;  /* time when stream was started/stopped/paused 
*/
-       struct timeval tstamp;          /* reference timestamp */
+       struct timespec trigger_tstamp; /* time when stream was started/stopped/paused 
*/
+       struct timespec tstamp;         /* reference timestamp */
        sndrv_pcm_uframes_t appl_ptr;   /* appl ptr */
        sndrv_pcm_uframes_t hw_ptr;     /* hw ptr */
        sndrv_pcm_sframes_t delay;      /* current delay in frames */
@@ -414,7 +414,7 @@
        enum sndrv_pcm_state state;     /* RO: state - SNDRV_PCM_STATE_XXXX */
        int pad1;                       /* Needed for 64 bit alignment */
        sndrv_pcm_uframes_t hw_ptr;     /* RO: hw ptr (0...boundary-1) */
-       struct timeval tstamp;          /* Timestamp */
+       struct timespec tstamp;         /* Timestamp */
        enum sndrv_pcm_state suspended_state; /* RO: suspended stream state */
 };
 
@@ -438,6 +438,7 @@
 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_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),
@@ -455,6 +456,7 @@
        SNDRV_PCM_IOCTL_REWIND = _IOW('A', 0x46, sndrv_pcm_uframes_t),
        SNDRV_PCM_IOCTL_RESUME = _IO('A', 0x47),
        SNDRV_PCM_IOCTL_XRUN = _IO('A', 0x48),
+       SNDRV_PCM_IOCTL_FORWARD = _IOW('A', 0x49, sndrv_pcm_uframes_t),
        SNDRV_PCM_IOCTL_WRITEI_FRAMES = _IOW('A', 0x50, struct sndrv_xferi),
        SNDRV_PCM_IOCTL_READI_FRAMES = _IOR('A', 0x51, struct sndrv_xferi),
        SNDRV_PCM_IOCTL_WRITEN_FRAMES = _IOW('A', 0x52, struct sndrv_xfern),
@@ -512,7 +514,7 @@
 
 struct sndrv_rawmidi_status {
        enum sndrv_rawmidi_stream stream;
-       struct timeval tstamp;          /* Timestamp */
+       struct timespec tstamp;         /* Timestamp */
        size_t avail;                   /* available bytes */
        size_t xruns;                   /* count of overruns since last status (in 
bytes) */
        unsigned char reserved[16];     /* reserved for future use */
@@ -531,7 +533,7 @@
  *  Timer section - /dev/snd/timer
  */
 
-#define SNDRV_TIMER_VERSION            SNDRV_PROTOCOL_VERSION(2, 0, 0)
+#define SNDRV_TIMER_VERSION            SNDRV_PROTOCOL_VERSION(2, 0, 1)
 
 enum sndrv_timer_class {
        SNDRV_TIMER_CLASS_NONE = -1,
@@ -591,8 +593,8 @@
 };
 
 struct sndrv_timer_status {
-       struct timeval tstamp;          /* Timestamp */
-       unsigned int resolution;        /* current resolution */
+       struct timespec tstamp;         /* Timestamp - last update */
+       unsigned int resolution;        /* current resolution in ns */
        unsigned int lost;              /* counter of master tick lost */
        unsigned int overrun;           /* count of read queue overruns */
        unsigned int queue;             /* used queue size */
@@ -602,6 +604,7 @@
 enum {
        SNDRV_TIMER_IOCTL_PVERSION = _IOR('T', 0x00, int),
        SNDRV_TIMER_IOCTL_NEXT_DEVICE = _IOWR('T', 0x01, struct sndrv_timer_id),
+       SNDRV_TIMER_IOCTL_TREAD = _IOW('T', 0x02, int),
        SNDRV_TIMER_IOCTL_SELECT = _IOW('T', 0x10, struct sndrv_timer_select),
        SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct sndrv_timer_info),
        SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct sndrv_timer_params),
@@ -616,13 +619,27 @@
        unsigned int ticks;
 };
 
+enum sndrv_timer_event {
+       SNDRV_TIMER_EVENT_RESOLUTION = 0,       /* val = resolution in ns */
+       SNDRV_TIMER_EVENT_TICK,                 /* val = ticks */
+       SNDRV_TIMER_EVENT_START,                /* val = resolution in ns */
+       SNDRV_TIMER_EVENT_STOP,                 /* val = 0 */
+       SNDRV_TIMER_EVENT_CONTINUE              /* val = resolution in ns */
+};
+
+struct sndrv_timer_tread {
+       enum sndrv_timer_event event;
+       struct timespec tstamp;
+       unsigned int val;
+};
+
 /****************************************************************************
  *                                                                          *
  *        Section for driver control interface - /dev/snd/control?          *
  *                                                                          *
  ****************************************************************************/
 
-#define SNDRV_CTL_VERSION              SNDRV_PROTOCOL_VERSION(2, 0, 0)
+#define SNDRV_CTL_VERSION              SNDRV_PROTOCOL_VERSION(2, 0, 1)
 
 struct sndrv_ctl_card_info {
        int card;                       /* card number */
@@ -663,6 +680,7 @@
 #define SNDRV_CTL_ELEM_ACCESS_WRITE            (1<<1)
 #define SNDRV_CTL_ELEM_ACCESS_READWRITE                
(SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE)
 #define SNDRV_CTL_ELEM_ACCESS_VOLATILE         (1<<2)  /* control value may be 
changed without a notification */
+#define SNDRV_CTL_ELEM_ACCESS_TIMESTAMP                (1<<2)  /* when was control 
changed */
 #define SNDRV_CTL_ELEM_ACCESS_INACTIVE         (1<<8)  /* control does actually 
nothing, but may be updated */
 #define SNDRV_CTL_ELEM_ACCESS_LOCK             (1<<9)  /* write lock */
 #define SNDRV_CTL_ELEM_ACCESS_OWNER            (1<<10) /* write lock owner */
@@ -743,7 +761,8 @@
                } bytes;
                struct sndrv_aes_iec958 iec958;
         } value;                /* RO */
-        unsigned char reserved[128];
+       struct timespec timestamp;
+        unsigned char reserved[128-sizeof(struct timespec)];
 };
 
 enum {



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to