patch-1.3.36 linux/drivers/sound/sb16_dsp.c

Next file: linux/drivers/sound/sb_dsp.c
Previous file: linux/drivers/sound/pss.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.35/linux/drivers/sound/sb16_dsp.c linux/drivers/sound/sb16_dsp.c
@@ -49,6 +49,7 @@
 static int      dsp_current_speed = 8000;
 static int      dsp_busy = 0;
 static int      dma16, dma8;
+static int      trigger_bits = 0x7fffffff;
 static unsigned long dsp_count = 0;
 
 static int      irq_mode = IMODE_NONE;
@@ -232,6 +233,7 @@
 
   irq_mode = IMODE_NONE;
   dsp_busy = 1;
+  trigger_bits = irq_mode;
 
   return 0;
 }
@@ -398,6 +400,11 @@
 static void
 sb16_dsp_trigger (int dev, int bits)
 {
+  if (bits == trigger_bits)	/* No change */
+    return;
+
+  trigger_bits = bits;
+
   if (!bits)
     sb_dsp_command (0xd0);	/* Halt DMA */
   else if (bits & irq_mode)
@@ -572,12 +579,10 @@
     switch (irq_mode)
       {
       case IMODE_OUTPUT:
-	intr_active = 0;
 	DMAbuf_outputintr (my_dev, 1);
 	break;
 
       case IMODE_INPUT:
-	intr_active = 0;
 	DMAbuf_inputintr (my_dev);
 	break;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this