diff -urN -x CVS alsa-1.0/pci/au88x0/au8810.h alsa-1.0-irqcleanup/pci/au88x0/au8810.h --- alsa-1.0/pci/au88x0/au8810.h 2004-01-27 11:05:25.000000000 -0500 +++ alsa-1.0-irqcleanup/pci/au88x0/au8810.h 2004-01-27 11:03:02.000000000 -0500 @@ -188,20 +188,7 @@ /* IRQ */ #define VORTEX_IRQ_SOURCE 0x2a000 /* Interrupt source flags. */ -#define IRQ_FATAL 0x0001 -#define IRQ_PARITY 0x0002 -#define IRQ_PCMOUT 0x0020 /* ?? */ -#define IRQ_TIMER 0x1000 -#define IRQ_MIDI 0x2000 -#define IRQ_MODEM 0x4000 - #define VORTEX_IRQ_CTRL 0x2a004 /* Interrupt source mask. */ -#define IRQ_FATAL 0x0001 -#define IRQ_PARITY 0x0002 -#define IRQ_PCMOUT 0x0020 /* PCM OUT page crossing */ -#define IRQ_TIMER 0x1000 -#define IRQ_MIDI 0x2000 -#define IRQ_MODEM 0x4000 #define VORTEX_STAT 0x2a008 /* Status */ diff -urN -x CVS alsa-1.0/pci/au88x0/au8820.h alsa-1.0-irqcleanup/pci/au88x0/au8820.h --- alsa-1.0/pci/au88x0/au8820.h 2004-01-27 11:05:26.000000000 -0500 +++ alsa-1.0-irqcleanup/pci/au88x0/au8820.h 2004-01-27 11:04:14.000000000 -0500 @@ -187,18 +187,7 @@ /* IRQ */ #define VORTEX_IRQ_SOURCE 0x12800 /* Interrupt source flags. */ -#define IRQ_FATAL 0x0001 -#define IRQ_PARITY 0x0002 -#define IRQ_PCMOUT 0x0020 /* ?? */ -#define IRQ_TIMER 0x1000 -#define IRQ_MIDI 0x2000 - #define VORTEX_IRQ_CTRL 0x12804 /* Interrupt source mask. */ -#define IRQ_FATAL 0x0001 -#define IRQ_PARITY 0x0002 -#define IRQ_PCMOUT 0x0020 /* PCM OUT page crossing */ -#define IRQ_TIMER 0x1000 -#define IRQ_MIDI 0x2000 #define VORTEX_STAT 0x12808 /* ?? */ diff -urN -x CVS alsa-1.0/pci/au88x0/au8830.h alsa-1.0-irqcleanup/pci/au88x0/au8830.h --- alsa-1.0/pci/au88x0/au8830.h 2004-01-27 11:05:26.000000000 -0500 +++ alsa-1.0-irqcleanup/pci/au88x0/au8830.h 2004-01-27 11:03:50.000000000 -0500 @@ -226,20 +226,7 @@ /* IRQ */ #define VORTEX_IRQ_SOURCE 0x2a000 /* Interrupt source flags. */ -#define IRQ_FATAL 0x0001 -#define IRQ_PARITY 0x0002 -#define IRQ_PCMOUT 0x0020 /* DMA page crossing */ -#define IRQ_TIMER 0x1000 -#define IRQ_MIDI 0x2000 -#define IRQ_MODEM 0x4000 - #define VORTEX_IRQ_CTRL 0x2a004 /* Interrupt source mask. */ -#define IRQ_FATAL 0x0001 -#define IRQ_PARITY 0x0002 -#define IRQ_PCMOUT 0x0020 /* PCM OUT page crossing */ -#define IRQ_TIMER 0x1000 -#define IRQ_MIDI 0x2000 -#define IRQ_MODEM 0x4000 //#define VORTEX_IRQ_U0 0x2a008 /* ?? */ #define VORTEX_STAT 0x2a008 /* Some sort of status */ diff -urN -x CVS alsa-1.0/pci/au88x0/au88x0_core.c alsa-1.0-irqcleanup/pci/au88x0/au88x0_core.c --- alsa-1.0/pci/au88x0/au88x0_core.c 2004-01-27 11:05:28.000000000 -0500 +++ alsa-1.0-irqcleanup/pci/au88x0/au88x0_core.c 2004-01-27 11:02:03.000000000 -0500 @@ -1897,12 +1897,22 @@ handled = 0; // Attend every interrupt source. - if (source & IRQ_FATAL) { - printk(KERN_ERR "vortex: IRQ fatal error\n"); - handled = 1; - } - if (source & IRQ_PARITY) { - printk(KERN_ERR "vortex: IRQ parity error\n"); + if (unlikely(source & IRQ_ERR_MASK)) { + if (source & IRQ_FATAL) { + printk(KERN_ERR "vortex: IRQ fatal error\n"); + } + if (source & IRQ_PARITY) { + printk(KERN_ERR "vortex: IRQ parity error\n"); + } + if (source & IRQ_REG) { + printk(KERN_ERR "vortex: IRQ reg error\n"); + } + if (source & IRQ_FIFO) { + printk(KERN_ERR "vortex: IRQ fifo error\n"); + } + if (source & IRQ_DMA) { + printk(KERN_ERR "vortex: IRQ dma error\n"); + } handled = 1; } if (source & IRQ_PCMOUT) { @@ -1910,14 +1920,14 @@ for (i=0; idma_adb[i].fifo_status == FIFO_START) { if (vortex_adbdma_bufshift(vortex, i)); - snd_pcm_period_elapsed(vortex->dma_adb[i].substream); + snd_pcm_period_elapsed(vortex->dma_adb[i].substream); } } #ifndef CHIP_AU8810 for (i=0; idma_wt[i].fifo_status == FIFO_START) { if (vortex_wtdma_bufshift(vortex, i)); - snd_pcm_period_elapsed(vortex->dma_wt[i].substream); + snd_pcm_period_elapsed(vortex->dma_wt[i].substream); } } #endif @@ -1932,7 +1942,7 @@ snd_mpu401_uart_interrupt(vortex->irq, vortex->rmidi->private_data, regs); handled = 1; } - + if (!handled) { printk(KERN_ERR "vortex: unknown irq source %x\n", source); } diff -urN -x CVS alsa-1.0/pci/au88x0/au88x0.h alsa-1.0-irqcleanup/pci/au88x0/au88x0.h --- alsa-1.0/pci/au88x0/au88x0.h 2004-01-27 11:05:26.000000000 -0500 +++ alsa-1.0-irqcleanup/pci/au88x0/au88x0.h 2004-01-27 11:02:49.000000000 -0500 @@ -62,6 +62,18 @@ #define FIFO_START 1 #define FIFO_PAUSE 2 +/* IRQ flags */ +#define IRQ_ERR_MASK 0x00ff +#define IRQ_FATAL 0x0001 +#define IRQ_PARITY 0x0002 +#define IRQ_REG 0x0004 +#define IRQ_FIFO 0x0008 +#define IRQ_DMA 0x0010 +#define IRQ_PCMOUT 0x0020 /* PCM OUT page crossing */ +#define IRQ_TIMER 0x1000 +#define IRQ_MIDI 0x2000 +#define IRQ_MODEM 0x4000 + /* ADB Resource */ #define VORTEX_RESOURCE_DMA 0x00000000 #define VORTEX_RESOURCE_SRC 0x00000001