diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-05-15 09:04:14 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 04:10:49 -0400 |
commit | 15790a6be14852850ee7cbd791225fa51750d8af (patch) | |
tree | 9dfed38c6fe1ce94174a69d514f9612e67d2c103 /sound/core | |
parent | 92bb010cd874e53e4c2e2a73510966e45cfa4525 (diff) |
[ALSA] Add missing PAUSE ioctl
Timer Midlevel
Added the missing implemenation of TIMER PAUSE ioctl.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/timer.c | 12 | ||||
-rw-r--r-- | sound/core/timer_compat.c | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c index be6d37af76d8..48aebdf6550b 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c | |||
@@ -1680,6 +1680,16 @@ static int snd_timer_user_continue(struct file *file) | |||
1680 | return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0; | 1680 | return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0; |
1681 | } | 1681 | } |
1682 | 1682 | ||
1683 | static int snd_timer_user_pause(struct file *file) | ||
1684 | { | ||
1685 | int err; | ||
1686 | snd_timer_user_t *tu; | ||
1687 | |||
1688 | tu = file->private_data; | ||
1689 | snd_assert(tu->timeri != NULL, return -ENXIO); | ||
1690 | return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0; | ||
1691 | } | ||
1692 | |||
1683 | static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 1693 | static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
1684 | { | 1694 | { |
1685 | snd_timer_user_t *tu; | 1695 | snd_timer_user_t *tu; |
@@ -1729,6 +1739,8 @@ static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned l | |||
1729 | return snd_timer_user_stop(file); | 1739 | return snd_timer_user_stop(file); |
1730 | case SNDRV_TIMER_IOCTL_CONTINUE: | 1740 | case SNDRV_TIMER_IOCTL_CONTINUE: |
1731 | return snd_timer_user_continue(file); | 1741 | return snd_timer_user_continue(file); |
1742 | case SNDRV_TIMER_IOCTL_PAUSE: | ||
1743 | return snd_timer_user_pause(file); | ||
1732 | } | 1744 | } |
1733 | return -ENOTTY; | 1745 | return -ENOTTY; |
1734 | } | 1746 | } |
diff --git a/sound/core/timer_compat.c b/sound/core/timer_compat.c index 9fbc3957a22d..420817d10b7c 100644 --- a/sound/core/timer_compat.c +++ b/sound/core/timer_compat.c | |||
@@ -108,6 +108,7 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, uns | |||
108 | case SNDRV_TIMER_IOCTL_START: | 108 | case SNDRV_TIMER_IOCTL_START: |
109 | case SNDRV_TIMER_IOCTL_STOP: | 109 | case SNDRV_TIMER_IOCTL_STOP: |
110 | case SNDRV_TIMER_IOCTL_CONTINUE: | 110 | case SNDRV_TIMER_IOCTL_CONTINUE: |
111 | case SNDRV_TIMER_IOCTL_PAUSE: | ||
111 | case SNDRV_TIMER_IOCTL_NEXT_DEVICE: | 112 | case SNDRV_TIMER_IOCTL_NEXT_DEVICE: |
112 | return snd_timer_user_ioctl(file, cmd, (unsigned long)argp); | 113 | return snd_timer_user_ioctl(file, cmd, (unsigned long)argp); |
113 | case SNDRV_TIMER_IOCTL_INFO32: | 114 | case SNDRV_TIMER_IOCTL_INFO32: |