Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1579
b: refs/heads/master
c: 8c50b37
h: refs/heads/master
i:
  1577: 8043956
  1575: 1f107d3
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 29, 2005
1 parent c00471b commit 6cfc579
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15790a6be14852850ee7cbd791225fa51750d8af
refs/heads/master: 8c50b37c04a026ab6641ecb7eaf0fd479798e8b8
11 changes: 6 additions & 5 deletions trunk/include/sound/asound.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,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,
Expand Down Expand Up @@ -673,10 +673,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 {
Expand Down
11 changes: 11 additions & 0 deletions trunk/sound/core/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,13 @@ static int snd_timer_user_pause(struct file *file)
return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0;
}

enum {
SNDRV_TIMER_IOCTL_START_OLD = _IO('T', 0x20),
SNDRV_TIMER_IOCTL_STOP_OLD = _IO('T', 0x21),
SNDRV_TIMER_IOCTL_CONTINUE_OLD = _IO('T', 0x22),
SNDRV_TIMER_IOCTL_PAUSE_OLD = _IO('T', 0x23),
};

static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
snd_timer_user_t *tu;
Expand Down Expand Up @@ -1734,12 +1741,16 @@ static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned l
case SNDRV_TIMER_IOCTL_STATUS:
return snd_timer_user_status(file, argp);
case SNDRV_TIMER_IOCTL_START:
case SNDRV_TIMER_IOCTL_START_OLD:
return snd_timer_user_start(file);
case SNDRV_TIMER_IOCTL_STOP:
case SNDRV_TIMER_IOCTL_STOP_OLD:
return snd_timer_user_stop(file);
case SNDRV_TIMER_IOCTL_CONTINUE:
case SNDRV_TIMER_IOCTL_CONTINUE_OLD:
return snd_timer_user_continue(file);
case SNDRV_TIMER_IOCTL_PAUSE:
case SNDRV_TIMER_IOCTL_PAUSE_OLD:
return snd_timer_user_pause(file);
}
return -ENOTTY;
Expand Down
4 changes: 4 additions & 0 deletions trunk/sound/core/timer_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,13 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, uns
case SNDRV_TIMER_IOCTL_SELECT:
case SNDRV_TIMER_IOCTL_PARAMS:
case SNDRV_TIMER_IOCTL_START:
case SNDRV_TIMER_IOCTL_START_OLD:
case SNDRV_TIMER_IOCTL_STOP:
case SNDRV_TIMER_IOCTL_STOP_OLD:
case SNDRV_TIMER_IOCTL_CONTINUE:
case SNDRV_TIMER_IOCTL_CONTINUE_OLD:
case SNDRV_TIMER_IOCTL_PAUSE:
case SNDRV_TIMER_IOCTL_PAUSE_OLD:
case SNDRV_TIMER_IOCTL_NEXT_DEVICE:
return snd_timer_user_ioctl(file, cmd, (unsigned long)argp);
case SNDRV_TIMER_IOCTL_INFO32:
Expand Down

0 comments on commit 6cfc579

Please sign in to comment.