Change some timer ioctls due to confliction

Change values of some timer ioctls to avoid confliction with FIO* ioctls.
Use old ioctls if the timer protocol version doesn't match.
This commit is contained in:
Takashi Iwai 2005-05-15 14:47:03 +00:00
parent 1aaf4a50af
commit 0d0e1a55c2
2 changed files with 31 additions and 8 deletions

View file

@ -558,7 +558,7 @@ enum {
* Timer section - /dev/snd/timer
*/
#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 3)
#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 4)
enum sndrv_timer_class {
SNDRV_TIMER_CLASS_NONE = -1,
@ -671,10 +671,11 @@ enum {
SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct sndrv_timer_info),
SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct sndrv_timer_params),
SNDRV_TIMER_IOCTL_STATUS = _IOR('T', 0x14, struct sndrv_timer_status),
SNDRV_TIMER_IOCTL_START = _IO('T', 0x20),
SNDRV_TIMER_IOCTL_STOP = _IO('T', 0x21),
SNDRV_TIMER_IOCTL_CONTINUE = _IO('T', 0x22),
SNDRV_TIMER_IOCTL_PAUSE = _IO('T', 0x23),
/* The following four ioctls are changed since 1.0.9 due to confliction */
SNDRV_TIMER_IOCTL_START = _IO('T', 0xa0),
SNDRV_TIMER_IOCTL_STOP = _IO('T', 0xa1),
SNDRV_TIMER_IOCTL_CONTINUE = _IO('T', 0xa2),
SNDRV_TIMER_IOCTL_PAUSE = _IO('T', 0xa3),
};
struct sndrv_timer_read {