26 #ifdef CONFIG_SND_DEBUG
27 #define STAT_ADD(x) ((x)++)
29 #define STAT_ADD(x) while (0) { ; }
40 status =
inb(gus->
gf1.reg_irqstat);
47 if (gus->
gf1.interrupt_handler_midi_in)
48 gus->
gf1.interrupt_handler_midi_in(gus);
52 if (gus->
gf1.interrupt_handler_midi_out)
53 gus->
gf1.interrupt_handler_midi_out(gus);
55 if (status & (0x20 | 0x40)) {
56 unsigned int already, _current_;
57 unsigned char voice_status,
voice;
62 voice = voice_status & 0x1f;
63 _current_ = 1 << voice;
64 if (already & _current_)
69 "voice_verify = %i\n",
70 voice, voice_status,
inb(
GUSP(gus, GF1PAGE)));
72 pvoice = &gus->
gf1.voices[voice];
74 if (!(voice_status & 0x80)) {
75 STAT_ADD(pvoice->interrupt_stat_wave);
78 if (!(voice_status & 0x40)) {
79 STAT_ADD(pvoice->interrupt_stat_volume);
91 if (gus->
gf1.interrupt_handler_timer1)
92 gus->
gf1.interrupt_handler_timer1(gus);
96 if (gus->
gf1.interrupt_handler_timer2)
97 gus->
gf1.interrupt_handler_timer2(gus);
102 if (gus->
gf1.interrupt_handler_dma_write)
103 gus->
gf1.interrupt_handler_dma_write(gus);
107 if (gus->
gf1.interrupt_handler_dma_read)
108 gus->
gf1.interrupt_handler_dma_read(gus);
116 #ifdef CONFIG_SND_DEBUG
125 snd_iprintf(buffer,
"midi out = %u\n", gus->
gf1.interrupt_stat_midi_out);
126 snd_iprintf(buffer,
"midi in = %u\n", gus->
gf1.interrupt_stat_midi_in);
127 snd_iprintf(buffer,
"timer1 = %u\n", gus->
gf1.interrupt_stat_timer1);
128 snd_iprintf(buffer,
"timer2 = %u\n", gus->
gf1.interrupt_stat_timer2);
129 snd_iprintf(buffer,
"dma write = %u\n", gus->
gf1.interrupt_stat_dma_write);
130 snd_iprintf(buffer,
"dma read = %u\n", gus->
gf1.interrupt_stat_dma_read);
131 snd_iprintf(buffer,
"voice lost = %u\n", gus->
gf1.interrupt_stat_voice_lost);
132 for (idx = 0; idx < 32; idx++) {
133 pvoice = &gus->
gf1.voices[
idx];
134 snd_iprintf(buffer,
"voice %i: wave = %u, volume = %u\n",
136 pvoice->interrupt_stat_wave,
137 pvoice->interrupt_stat_volume);
145 if (! snd_card_proc_new(gus->
card,
"gusirq", &entry))
146 snd_info_set_text_ops(entry, gus, snd_gus_irq_info_read);