Lines Matching refs:timer

24 static void calc_alsa_tempo(struct seq_oss_timer *timer);
116 calc_alsa_tempo(struct seq_oss_timer *timer) in calc_alsa_tempo() argument
118 timer->tempo = (60 * 1000000) / timer->oss_tempo; in calc_alsa_tempo()
119 timer->ppq = timer->oss_timebase; in calc_alsa_tempo()
147 snd_seq_oss_timer_start(struct seq_oss_timer *timer) in snd_seq_oss_timer_start() argument
149 struct seq_oss_devinfo *dp = timer->dp; in snd_seq_oss_timer_start()
152 if (timer->running) in snd_seq_oss_timer_start()
153 snd_seq_oss_timer_stop(timer); in snd_seq_oss_timer_start()
157 tmprec.ppq = timer->ppq; in snd_seq_oss_timer_start()
158 tmprec.tempo = timer->tempo; in snd_seq_oss_timer_start()
162 timer->running = 1; in snd_seq_oss_timer_start()
163 timer->cur_tick = 0; in snd_seq_oss_timer_start()
172 snd_seq_oss_timer_stop(struct seq_oss_timer *timer) in snd_seq_oss_timer_stop() argument
174 if (! timer->running) in snd_seq_oss_timer_stop()
176 send_timer_event(timer->dp, SNDRV_SEQ_EVENT_STOP, 0); in snd_seq_oss_timer_stop()
177 timer->running = 0; in snd_seq_oss_timer_stop()
186 snd_seq_oss_timer_continue(struct seq_oss_timer *timer) in snd_seq_oss_timer_continue() argument
188 if (timer->running) in snd_seq_oss_timer_continue()
190 send_timer_event(timer->dp, SNDRV_SEQ_EVENT_CONTINUE, 0); in snd_seq_oss_timer_continue()
191 timer->running = 1; in snd_seq_oss_timer_continue()
200 snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value) in snd_seq_oss_timer_tempo() argument
206 timer->oss_tempo = value; in snd_seq_oss_timer_tempo()
207 calc_alsa_tempo(timer); in snd_seq_oss_timer_tempo()
208 if (timer->running) in snd_seq_oss_timer_tempo()
209 send_timer_event(timer->dp, SNDRV_SEQ_EVENT_TEMPO, timer->tempo); in snd_seq_oss_timer_tempo()
218 snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg) in snd_seq_oss_timer_ioctl() argument
228 value = ((timer->oss_tempo * timer->oss_timebase) + 30) / 60; in snd_seq_oss_timer_ioctl()
232 if (timer->dp->seq_mode == SNDRV_SEQ_OSS_MODE_SYNTH) in snd_seq_oss_timer_ioctl()
237 return snd_seq_oss_timer_start(timer); in snd_seq_oss_timer_ioctl()
239 return snd_seq_oss_timer_stop(timer); in snd_seq_oss_timer_ioctl()
241 return snd_seq_oss_timer_continue(timer); in snd_seq_oss_timer_ioctl()
245 return snd_seq_oss_timer_tempo(timer, value); in snd_seq_oss_timer_ioctl()
253 timer->oss_timebase = value; in snd_seq_oss_timer_ioctl()
254 calc_alsa_tempo(timer); in snd_seq_oss_timer_ioctl()