patch-1.3.37 linux/drivers/sound/audio.c

Next file: linux/drivers/sound/sequencer.c
Previous file: linux/drivers/sound/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.36/linux/drivers/sound/audio.c linux/drivers/sound/audio.c
@@ -154,6 +154,20 @@
   DMAbuf_release (dev, mode);
 }
 
+#if !defined(i386)
+static void
+translate_bytes (const unsigned char *table, unsigned char *buff, int n)
+{
+  unsigned long   i;
+
+  if (n <= 0)
+    return;
+
+  for (i = 0; i < n; ++i)
+    buff[i] = table[buff[i]];
+}
+
+#else
 extern inline void
 translate_bytes (const void *table, void *buff, int n)
 {
@@ -168,7 +182,7 @@
     :	       "bx", "cx", "di", "si", "ax");
     }
 }
-
+#endif
 
 int
 audio_write (int dev, struct fileinfo *file, const snd_rw_buf * buf, int count)
@@ -248,7 +262,7 @@
 	  /*
 	   * This just allows interrupts while the conversion is running
 	   */
-	  __asm__ ("sti");
+	  sti();
 	  translate_bytes (ulaw_dsp, (unsigned char *) &wr_dma_buf[dev][wr_buff_ptr[dev]], l);
 	}
 
@@ -323,7 +337,7 @@
 	  /*
 	   * This just allows interrupts while the conversion is running
 	   */
-	  __asm__ ("sti");
+	  sti();
 
 	  translate_bytes (dsp_ulaw, (unsigned char *) dmabuf, l);
 	}

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