Lines Matching defs:timer
78 * The detection algorithm plays with the timer built in the FM chip and
100 /* Unmask and start timer 1 */
143 static int snd_opl3_timer1_start(struct snd_timer * timer)
150 opl3 = snd_timer_chip(timer);
152 ticks = timer->sticks;
155 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER1, 256 - ticks); /* timer 1 count */
156 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp); /* enable timer 1 IRQ */
161 static int snd_opl3_timer1_stop(struct snd_timer * timer)
167 opl3 = snd_timer_chip(timer);
171 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp); /* disable timer #1 */
180 static int snd_opl3_timer2_start(struct snd_timer * timer)
187 opl3 = snd_timer_chip(timer);
189 ticks = timer->sticks;
192 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER2, 256 - ticks); /* timer 1 count */
193 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp); /* enable timer 1 IRQ */
198 static int snd_opl3_timer2_stop(struct snd_timer * timer)
204 opl3 = snd_timer_chip(timer);
208 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp); /* disable timer #1 */
237 struct snd_timer *timer = NULL;
246 err = snd_timer_new(opl3->card, "AdLib timer #1", &tid, &timer);
248 strcpy(timer->name, "AdLib timer #1");
249 timer->private_data = opl3;
250 timer->hw = snd_opl3_timer1;
252 opl3->timer1 = timer;
258 struct snd_timer *timer = NULL;
267 err = snd_timer_new(opl3->card, "AdLib timer #2", &tid, &timer);
269 strcpy(timer->name, "AdLib timer #2");
270 timer->private_data = opl3;
271 timer->hw = snd_opl3_timer2;
273 opl3->timer2 = timer;
285 struct snd_timer *timer;
299 timer = opl3->timer1;
300 snd_timer_interrupt(timer, timer->sticks);
303 timer = opl3->timer2;
304 snd_timer_interrupt(timer, timer->sticks);