Lines Matching defs:gus

11 #include <sound/gus.h>
21 struct snd_gus_card *gus;
23 gus = snd_timer_chip(timer);
24 guard(spinlock_irqsave)(&gus->reg_lock);
26 tmp = (gus->gf1.timer_enabled |= 4);
27 snd_gf1_write8(gus, SNDRV_GF1_GB_ADLIB_TIMER_1, 256 - ticks); /* timer 1 count */
28 snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp); /* enable timer 1 IRQ */
29 snd_gf1_adlib_write(gus, 0x04, tmp >> 2); /* timer 2 start */
36 struct snd_gus_card *gus;
38 gus = snd_timer_chip(timer);
39 guard(spinlock_irqsave)(&gus->reg_lock);
40 tmp = (gus->gf1.timer_enabled &= ~4);
41 snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp); /* disable timer #1 */
53 struct snd_gus_card *gus;
55 gus = snd_timer_chip(timer);
56 guard(spinlock_irqsave)(&gus->reg_lock);
58 tmp = (gus->gf1.timer_enabled |= 8);
59 snd_gf1_write8(gus, SNDRV_GF1_GB_ADLIB_TIMER_2, 256 - ticks); /* timer 2 count */
60 snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp); /* enable timer 2 IRQ */
61 snd_gf1_adlib_write(gus, 0x04, tmp >> 2); /* timer 2 start */
68 struct snd_gus_card *gus;
70 gus = snd_timer_chip(timer);
71 guard(spinlock_irqsave)(&gus->reg_lock);
72 tmp = (gus->gf1.timer_enabled &= ~8);
73 snd_gf1_write8(gus, SNDRV_GF1_GB_SOUND_BLASTER_CONTROL, tmp); /* disable timer #1 */
81 static void snd_gf1_interrupt_timer1(struct snd_gus_card * gus)
83 struct snd_timer *timer = gus->gf1.timer1;
90 static void snd_gf1_interrupt_timer2(struct snd_gus_card * gus)
92 struct snd_timer *timer = gus->gf1.timer2;
123 struct snd_gus_card *gus = timer->private_data;
124 gus->gf1.timer1 = NULL;
129 struct snd_gus_card *gus = timer->private_data;
130 gus->gf1.timer2 = NULL;
133 void snd_gf1_timers_init(struct snd_gus_card * gus)
138 if (gus->gf1.timer1 != NULL || gus->gf1.timer2 != NULL)
141 gus->gf1.interrupt_handler_timer1 = snd_gf1_interrupt_timer1;
142 gus->gf1.interrupt_handler_timer2 = snd_gf1_interrupt_timer2;
146 tid.card = gus->card->number;
147 tid.device = gus->timer_dev;
150 if (snd_timer_new(gus->card, "GF1 timer", &tid, &timer) >= 0) {
152 timer->private_data = gus;
156 gus->gf1.timer1 = timer;
160 if (snd_timer_new(gus->card, "GF1 timer", &tid, &timer) >= 0) {
162 timer->private_data = gus;
166 gus->gf1.timer2 = timer;
169 void snd_gf1_timers_done(struct snd_gus_card * gus)
171 snd_gf1_set_default_handlers(gus, SNDRV_GF1_HANDLER_TIMER1 | SNDRV_GF1_HANDLER_TIMER2);
172 if (gus->gf1.timer1) {
173 snd_device_free(gus->card, gus->gf1.timer1);
174 gus->gf1.timer1 = NULL;
176 if (gus->gf1.timer2) {
177 snd_device_free(gus->card, gus->gf1.timer2);
178 gus->gf1.timer2 = NULL;