patch-2.4.8 linux/drivers/sound/emu10k1/irqmgr.c

Next file: linux/drivers/sound/emu10k1/irqmgr.h
Previous file: linux/drivers/sound/emu10k1/icardwav.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.7/linux/drivers/sound/emu10k1/irqmgr.c linux/drivers/sound/emu10k1/irqmgr.c
@@ -41,10 +41,7 @@
 void emu10k1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct emu10k1_card *card = (struct emu10k1_card *) dev_id;
-	u32 irqstatus, tmp;
-
-	if (!(irqstatus = emu10k1_readfn0(card, IPR)))
-		return;
+	u32 irqstatus;
 
 	DPD(4, "emu10k1_interrupt called, irq =  %u\n", irq);
 
@@ -60,16 +57,22 @@
 	 ** - Eric
 	 */
 
-	do {
-		DPD(4, "irq status %x\n", irqstatus);
+	while ((irqstatus = inl(card->iobase + IPR))) {
+		DPD(4, "irq status %#x\n", irqstatus);
 
-		tmp = irqstatus;
+		/* acknowledge interrupt */
+		outl(irqstatus, card->iobase + IPR);
 
 		if (irqstatus & IRQTYPE_TIMER) {
 			emu10k1_timer_irqhandler(card);
 			irqstatus &= ~IRQTYPE_TIMER;
 		}
 
+		if (irqstatus & IRQTYPE_DSP) {
+			emu10k1_dsp_irqhandler(card);
+			irqstatus &= ~IRQTYPE_DSP;
+		}
+
 		if (irqstatus & IRQTYPE_MPUIN) {
 			emu10k1_mpuin_irqhandler(card);
 			irqstatus &= ~IRQTYPE_MPUIN;
@@ -80,13 +83,22 @@
 			irqstatus &= ~IRQTYPE_MPUOUT;
 		}
 
-		if (irqstatus)
-			emu10k1_irq_disable(card, irqstatus);
+		if (irqstatus & IPR_MUTE) {
+			emu10k1_mute_irqhandler(card);
+			irqstatus &=~IPR_MUTE;
+		}
 
-		emu10k1_writefn0(card, IPR, tmp);
+		if (irqstatus & IPR_VOLINCR) {
+			emu10k1_volincr_irqhandler(card);
+			irqstatus &=~IPR_VOLINCR;
+		}
 
-	} while ((irqstatus = emu10k1_readfn0(card, IPR)));
+		if (irqstatus & IPR_VOLDECR) {
+			emu10k1_voldecr_irqhandler(card);
+			irqstatus &=~IPR_VOLDECR;
+		}
 
-	return;
+		if (irqstatus)
+			emu10k1_irq_disable(card, irqstatus);
+	}
 }
-

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)