/[openvortex]/alsa/alsa-kernel/pci/emu10k1/irq.c
ViewVC logotype

Diff of /alsa/alsa-kernel/pci/emu10k1/irq.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by vizard, Sat May 31 02:35:12 2003 UTC revision 1.3 by vizard, Mon Aug 11 00:06:40 2003 UTC
# Line 55  irqreturn_t snd_emu10k1_interrupt(int ir Line 55  irqreturn_t snd_emu10k1_interrupt(int ir
55                  if (status & IPR_CHANNELLOOP) {                  if (status & IPR_CHANNELLOOP) {
56                          int voice;                          int voice;
57                          int voice_max = status & IPR_CHANNELNUMBERMASK;                          int voice_max = status & IPR_CHANNELNUMBERMASK;
                         int voice_max_l;  
58                          u32 val;                          u32 val;
59                          emu10k1_voice_t *pvoice = emu->voices;                          emu10k1_voice_t *pvoice = emu->voices;
60    
61                          val = snd_emu10k1_ptr_read(emu, CLIPL, 0);                          val = snd_emu10k1_ptr_read(emu, CLIPL, 0);
62                          voice_max_l = voice_max;                          for (voice = 0; voice <= voice_max; voice++) {
63                          if (voice_max_l >= 0x20)                                  if (voice == 0x20)
64                                  voice_max_l = 0x1f;                                          val = snd_emu10k1_ptr_read(emu, CLIPH, 0);
                         for (voice = 0; voice <= voice_max_l; voice++) {  
65                                  if (val & 1) {                                  if (val & 1) {
66                                          if (pvoice->use && pvoice->interrupt != NULL) {                                          if (pvoice->use && pvoice->interrupt != NULL) {
67                                                  pvoice->interrupt(emu, pvoice);                                                  pvoice->interrupt(emu, pvoice);
# Line 75  irqreturn_t snd_emu10k1_interrupt(int ir Line 73  irqreturn_t snd_emu10k1_interrupt(int ir
73                                  val >>= 1;                                  val >>= 1;
74                                  pvoice++;                                  pvoice++;
75                          }                          }
                         if (voice_max > 0x1f) {  
                                 val = snd_emu10k1_ptr_read(emu, CLIPH, 0);  
                                 for (; voice <= voice_max; voice++) {  
                                         if(val & 1) {  
                                                 if (pvoice->use && pvoice->interrupt != NULL) {  
                                                         pvoice->interrupt(emu, pvoice);  
                                                         snd_emu10k1_voice_intr_ack(emu, voice);  
                                                 } else {  
                                                         snd_emu10k1_voice_intr_disable(emu, voice);  
                                                 }  
                                         }  
                                         val >>= 1;  
                                         pvoice++;  
                                 }  
                         }  
76                          status &= ~IPR_CHANNELLOOP;                          status &= ~IPR_CHANNELLOOP;
77                  }                  }
78                  status &= ~IPR_CHANNELNUMBERMASK;                  status &= ~IPR_CHANNELNUMBERMASK;
# Line 150  irqreturn_t snd_emu10k1_interrupt(int ir Line 133  irqreturn_t snd_emu10k1_interrupt(int ir
133                          status &= ~IPR_FXDSP;                          status &= ~IPR_FXDSP;
134                  }                  }
135                  if (status) {                  if (status) {
136                          snd_printd(KERN_WARNING "emu10k1: unhandled interrupt: 0x%08x\n", status);                          unsigned int bits;
137                            snd_printk(KERN_ERR "emu10k1: unhandled interrupt: 0x%08x\n", status);
138                            //make sure any interrupts we don't handle are disabled:
139                            bits = INTE_FXDSPENABLE |
140                                    INTE_PCIERRORENABLE |
141                                    INTE_VOLINCRENABLE |
142                                    INTE_VOLDECRENABLE |
143                                    INTE_MUTEENABLE |
144                                    INTE_MICBUFENABLE |
145                                    INTE_ADCBUFENABLE |
146                                    INTE_EFXBUFENABLE |
147                                    INTE_GPSPDIFENABLE |
148                                    INTE_CDSPDIFENABLE |
149                                    INTE_INTERVALTIMERENB |
150                                    INTE_MIDITXENABLE |
151                                    INTE_MIDIRXENABLE;
152                            if (emu->audigy)
153                                    bits |= INTE_A_MIDITXENABLE2 | INTE_A_MIDIRXENABLE2;
154                            snd_emu10k1_intr_disable(emu, bits);
155                  }                  }
156                  outl(orig_status, emu->port + IPR); /* ack */                  outl(orig_status, emu->port + IPR); /* ack all */
157          }          }
158          return IRQ_RETVAL(handled);          return IRQ_RETVAL(handled);
159  }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26