Lines Matching refs:timer

24 static void calc_alsa_tempo(struct seq_oss_timer *timer);
29 * create and register a new timer.
54 * delete timer.
55 * if no more timer exists, stop the queue.
70 * 0 : not a timer event -- enqueue this event
116 calc_alsa_tempo(struct seq_oss_timer *timer)
118 timer->tempo = (60 * 1000000) / timer->oss_tempo;
119 timer->ppq = timer->oss_timebase;
124 * dispatch a timer event
147 snd_seq_oss_timer_start(struct seq_oss_timer *timer)
149 struct seq_oss_devinfo *dp = timer->dp;
152 if (timer->running)
153 snd_seq_oss_timer_stop(timer);
157 tmprec.ppq = timer->ppq;
158 tmprec.tempo = timer->tempo;
162 timer->running = 1;
163 timer->cur_tick = 0;
172 snd_seq_oss_timer_stop(struct seq_oss_timer *timer)
174 if (! timer->running)
176 send_timer_event(timer->dp, SNDRV_SEQ_EVENT_STOP, 0);
177 timer->running = 0;
186 snd_seq_oss_timer_continue(struct seq_oss_timer *timer)
188 if (timer->running)
190 send_timer_event(timer->dp, SNDRV_SEQ_EVENT_CONTINUE, 0);
191 timer->running = 1;
200 snd_seq_oss_timer_tempo(struct seq_oss_timer *timer, int value)
206 timer->oss_tempo = value;
207 calc_alsa_tempo(timer);
208 if (timer->running)
209 send_timer_event(timer->dp, SNDRV_SEQ_EVENT_TEMPO, timer->tempo);
218 snd_seq_oss_timer_ioctl(struct seq_oss_timer *timer, unsigned int cmd, int __user *arg)
228 value = ((timer->oss_tempo * timer->oss_timebase) + 30) / 60;
232 if (timer->dp->seq_mode == SNDRV_SEQ_OSS_MODE_SYNTH)
237 return snd_seq_oss_timer_start(timer);
239 return snd_seq_oss_timer_stop(timer);
241 return snd_seq_oss_timer_continue(timer);
245 return snd_seq_oss_timer_tempo(timer, value);
253 timer->oss_timebase = value;
254 calc_alsa_tempo(timer);