1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * OSS compatible sequencer driver
4 * timer handling routines
6 * Copyright (C) 1998,99 Takashi Iwai <tiwai@suse.de>
9 #ifndef __SEQ_OSS_TIMER_H
10 #define __SEQ_OSS_TIMER_H
12 #include "seq_oss_device.h"
15 * timer information definition
17 struct seq_oss_timer
{
18 struct seq_oss_devinfo
*dp
;
22 int tempo
, ppq
; /* ALSA queue */
23 int oss_tempo
, oss_timebase
;
27 struct seq_oss_timer
*snd_seq_oss_timer_new(struct seq_oss_devinfo
*dp
);
28 void snd_seq_oss_timer_delete(struct seq_oss_timer
*dp
);
30 int snd_seq_oss_timer_start(struct seq_oss_timer
*timer
);
31 int snd_seq_oss_timer_stop(struct seq_oss_timer
*timer
);
32 int snd_seq_oss_timer_continue(struct seq_oss_timer
*timer
);
33 int snd_seq_oss_timer_tempo(struct seq_oss_timer
*timer
, int value
);
34 #define snd_seq_oss_timer_reset snd_seq_oss_timer_start
36 int snd_seq_oss_timer_ioctl(struct seq_oss_timer
*timer
, unsigned int cmd
, int __user
*arg
);
39 * get current processed time
41 static inline abstime_t
42 snd_seq_oss_timer_cur_tick(struct seq_oss_timer
*timer
)
44 return timer
->cur_tick
;