aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/irq.c')
-rw-r--r--sound/pci/emu10k1/irq.c46
1 files changed, 29 insertions, 17 deletions
diff --git a/sound/pci/emu10k1/irq.c b/sound/pci/emu10k1/irq.c
index b81a7cafff39..cd8460d56752 100644
--- a/sound/pci/emu10k1/irq.c
+++ b/sound/pci/emu10k1/irq.c
@@ -37,7 +37,7 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
37 int handled = 0; 37 int handled = 0;
38 38
39 while ((status = inl(emu->port + IPR)) != 0) { 39 while ((status = inl(emu->port + IPR)) != 0) {
40 // printk("irq - status = 0x%x\n", status); 40 //printk("emu10k1 irq - status = 0x%x\n", status);
41 orig_status = status; 41 orig_status = status;
42 handled = 1; 42 handled = 1;
43 if (status & IPR_PCIERROR) { 43 if (status & IPR_PCIERROR) {
@@ -147,9 +147,36 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
147 snd_emu10k1_intr_disable(emu, INTE_FXDSPENABLE); 147 snd_emu10k1_intr_disable(emu, INTE_FXDSPENABLE);
148 status &= ~IPR_FXDSP; 148 status &= ~IPR_FXDSP;
149 } 149 }
150 if (status & IPR_P16V) {
151 while ((status2 = inl(emu->port + IPR2)) != 0) {
152 u32 mask = INTE2_PLAYBACK_CH_0_LOOP; /* Full Loop */
153 emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]);
154 emu10k1_voice_t *cvoice = &(emu->p16v_capture_voice);
155
156 //printk(KERN_INFO "status2=0x%x\n", status2);
157 orig_status2 = status2;
158 if(status2 & mask) {
159 if(pvoice->use) {
160 snd_pcm_period_elapsed(pvoice->epcm->substream);
161 } else {
162 snd_printk(KERN_ERR "p16v: status: 0x%08x, mask=0x%08x, pvoice=%p, use=%d\n", status2, mask, pvoice, pvoice->use);
163 }
164 }
165 if(status2 & 0x110000) {
166 //printk(KERN_INFO "capture int found\n");
167 if(cvoice->use) {
168 //printk(KERN_INFO "capture period_elapsed\n");
169 snd_pcm_period_elapsed(cvoice->epcm->substream);
170 }
171 }
172 outl(orig_status2, emu->port + IPR2); /* ack all */
173 }
174 status &= ~IPR_P16V;
175 }
176
150 if (status) { 177 if (status) {
151 unsigned int bits; 178 unsigned int bits;
152 //snd_printk(KERN_ERR "emu10k1: unhandled interrupt: 0x%08x\n", status); 179 snd_printk(KERN_ERR "emu10k1: unhandled interrupt: 0x%08x\n", status);
153 //make sure any interrupts we don't handle are disabled: 180 //make sure any interrupts we don't handle are disabled:
154 bits = INTE_FXDSPENABLE | 181 bits = INTE_FXDSPENABLE |
155 INTE_PCIERRORENABLE | 182 INTE_PCIERRORENABLE |
@@ -170,20 +197,5 @@ irqreturn_t snd_emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
170 } 197 }
171 outl(orig_status, emu->port + IPR); /* ack all */ 198 outl(orig_status, emu->port + IPR); /* ack all */
172 } 199 }
173 if (emu->audigy && emu->revision == 4) { /* P16V */
174 while ((status2 = inl(emu->port + IPR2)) != 0) {
175 u32 mask = INTE2_PLAYBACK_CH_0_LOOP; /* Full Loop */
176 emu10k1_voice_t *pvoice = &(emu->p16v_voices[0]);
177 orig_status2 = status2;
178 if(status2 & mask) {
179 if(pvoice->use) {
180 snd_pcm_period_elapsed(pvoice->epcm->substream);
181 } else {
182 snd_printk(KERN_ERR "p16v: status: 0x%08x, mask=0x%08x, pvoice=%p, use=%d\n", status2, mask, pvoice, pvoice->use);
183 }
184 }
185 outl(orig_status2, emu->port + IPR2); /* ack all */
186 }
187 }
188 return IRQ_RETVAL(handled); 200 return IRQ_RETVAL(handled);
189} 201}