Lines Matching defs:timer

72 	 * The detection algorithm plays with the timer built in the FM chip and
94 /* Unmask and start timer 1 */
137 static int snd_opl3_timer1_start(struct snd_timer * timer)
143 opl3 = snd_timer_chip(timer);
145 ticks = timer->sticks;
148 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER1, 256 - ticks); /* timer 1 count */
149 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp); /* enable timer 1 IRQ */
153 static int snd_opl3_timer1_stop(struct snd_timer * timer)
158 opl3 = snd_timer_chip(timer);
162 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp); /* disable timer #1 */
170 static int snd_opl3_timer2_start(struct snd_timer * timer)
176 opl3 = snd_timer_chip(timer);
178 ticks = timer->sticks;
181 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER2, 256 - ticks); /* timer 1 count */
182 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp); /* enable timer 1 IRQ */
186 static int snd_opl3_timer2_stop(struct snd_timer * timer)
191 opl3 = snd_timer_chip(timer);
195 opl3->command(opl3, OPL3_LEFT | OPL3_REG_TIMER_CONTROL, tmp); /* disable timer #1 */
223 struct snd_timer *timer = NULL;
232 err = snd_timer_new(opl3->card, "AdLib timer #1", &tid, &timer);
234 strscpy(timer->name, "AdLib timer #1");
235 timer->private_data = opl3;
236 timer->hw = snd_opl3_timer1;
238 opl3->timer1 = timer;
244 struct snd_timer *timer = NULL;
253 err = snd_timer_new(opl3->card, "AdLib timer #2", &tid, &timer);
255 strscpy(timer->name, "AdLib timer #2");
256 timer->private_data = opl3;
257 timer->hw = snd_opl3_timer2;
259 opl3->timer2 = timer;
271 struct snd_timer *timer;
282 timer = opl3->timer1;
283 snd_timer_interrupt(timer, timer->sticks);
286 timer = opl3->timer2;
287 snd_timer_interrupt(timer, timer->sticks);