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

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

diff -u --recursive --new-file v1.3.37/linux/drivers/sound/sb16_dsp.c linux/drivers/sound/sb16_dsp.c
@@ -49,7 +49,7 @@
 static int      dsp_current_speed = 8000;
 static int      dsp_busy = 0;
 static int      dma16, dma8;
-static int      trigger_bits = 0x7fffffff;
+static int      trigger_bits = 0;
 static unsigned long dsp_count = 0;
 
 static int      irq_mode = IMODE_NONE;
@@ -233,7 +233,7 @@
 
   irq_mode = IMODE_NONE;
   dsp_busy = 1;
-  trigger_bits = irq_mode;
+  trigger_bits = 0;
 
   return 0;
 }
@@ -385,6 +385,8 @@
   audio_devs[my_dev]->dmachan1 = dsp_16bit ? dma16 : dma8;
   dsp_count = 0;
   dsp_cleanup ();
+  sb_dsp_command (0xd0);	/* Halt DMA until trigger() is called */
+  trigger_bits = 0;
   return 0;
 }
 
@@ -394,12 +396,17 @@
   audio_devs[my_dev]->dmachan1 = dsp_16bit ? dma16 : dma8;
   dsp_count = 0;
   dsp_cleanup ();
+  sb_dsp_command (0xd0);	/* Halt DMA until trigger() is called */
+  trigger_bits = 0;
   return 0;
 }
 
 static void
 sb16_dsp_trigger (int dev, int bits)
 {
+  if (bits != 0)
+    bits = 1;
+
   if (bits == trigger_bits)	/* No change */
     return;
 
@@ -572,7 +579,7 @@
   int             data;
 
   data = inb (DSP_DATA_AVL16);	/*
-				 * Interrupt acknowledge
+				   * Interrupt acknowledge
 				 */
 
   if (intr_active)

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