From ea5991d4cd397583ea9058ae995e34ccb099c8f2 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Sat, 2 Feb 2019 22:36:03 +0200 Subject: [PATCH] cleaned up the 16bit interrupt ack --- src/au_sb.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/au_sb.c b/src/au_sb.c index 06f862a..eb58762 100644 --- a/src/au_sb.c +++ b/src/au_sb.c @@ -63,6 +63,11 @@ #define MIX_SB16_VOICE_R 0x33 #define MIX_SB16_IRQ_SEL 0x80 #define MIX_SB16_DMA_SEL 0x81 +#define MIX_SB16_INTSTAT 0x82 + +#define INTSTAT_DMA8 0x01 +#define INTSTAT_DMA16 0x02 +#define INTSTAT_MPU401 0x04 #define VER_MAJOR(x) ((x) >> 8) #define VER_MINOR(x) ((x) & 0xff) @@ -425,14 +430,10 @@ static void INTERRUPT intr_handler() if(cur_bits == 8) { inp(REG_INTACK); } else { - /* - unsigned char istat; - outp(REG_MIXPORT, 0x82); - istat = inp(REG_MIXDATA); - if(istat & 2) { - */ + unsigned char istat = read_mix(MIX_SB16_INTSTAT); + if(istat & INTSTAT_DMA16) { inp(REG_INT16ACK); - //} + } } if(irq > 7) { -- 1.7.10.4