Commit 15790a6b authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] Add missing PAUSE ioctl

Timer Midlevel
Added the missing implemenation of TIMER PAUSE ioctl.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 92bb010c
...@@ -1680,6 +1680,16 @@ static int snd_timer_user_continue(struct file *file) ...@@ -1680,6 +1680,16 @@ static int snd_timer_user_continue(struct file *file)
return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0; return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0;
} }
static int snd_timer_user_pause(struct file *file)
{
int err;
snd_timer_user_t *tu;
tu = file->private_data;
snd_assert(tu->timeri != NULL, return -ENXIO);
return (err = snd_timer_continue(tu->timeri)) < 0 ? err : 0;
}
static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{ {
snd_timer_user_t *tu; snd_timer_user_t *tu;
...@@ -1729,6 +1739,8 @@ static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned l ...@@ -1729,6 +1739,8 @@ static long snd_timer_user_ioctl(struct file *file, unsigned int cmd, unsigned l
return snd_timer_user_stop(file); return snd_timer_user_stop(file);
case SNDRV_TIMER_IOCTL_CONTINUE: case SNDRV_TIMER_IOCTL_CONTINUE:
return snd_timer_user_continue(file); return snd_timer_user_continue(file);
case SNDRV_TIMER_IOCTL_PAUSE:
return snd_timer_user_pause(file);
} }
return -ENOTTY; return -ENOTTY;
} }
......
...@@ -108,6 +108,7 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, uns ...@@ -108,6 +108,7 @@ static long snd_timer_user_ioctl_compat(struct file *file, unsigned int cmd, uns
case SNDRV_TIMER_IOCTL_START: case SNDRV_TIMER_IOCTL_START:
case SNDRV_TIMER_IOCTL_STOP: case SNDRV_TIMER_IOCTL_STOP:
case SNDRV_TIMER_IOCTL_CONTINUE: case SNDRV_TIMER_IOCTL_CONTINUE:
case SNDRV_TIMER_IOCTL_PAUSE:
case SNDRV_TIMER_IOCTL_NEXT_DEVICE: case SNDRV_TIMER_IOCTL_NEXT_DEVICE:
return snd_timer_user_ioctl(file, cmd, (unsigned long)argp); return snd_timer_user_ioctl(file, cmd, (unsigned long)argp);
case SNDRV_TIMER_IOCTL_INFO32: case SNDRV_TIMER_IOCTL_INFO32:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment