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

Next file: linux/drivers/sound/hex2hex.h
Previous file: linux/drivers/sound/dmabuf.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.35/linux/drivers/sound/gus_wave.c linux/drivers/sound/gus_wave.c
@@ -896,7 +896,7 @@
     {
     case SNDCTL_SYNTH_INFO:
       gus_info.nr_voices = nr_voices;
-      memcpy_tofs (&(((char *) arg)[0]), (&gus_info), (sizeof (gus_info)));
+      memcpy_tofs ((&((char *) arg)[0]), &gus_info, sizeof (gus_info));
       return 0;
       break;
 
@@ -1029,7 +1029,7 @@
 static void
 compute_and_set_volume (int voice, int volume, int ramp_time)
 {
-  int             current, target, rate;
+  int             curr, target, rate;
   unsigned long   flags;
 
   compute_volume (voice, volume);
@@ -1043,7 +1043,7 @@
 
   gus_select_voice (voice);
 
-  current = gus_read16 (0x09) >> 4;
+  curr = gus_read16 (0x09) >> 4;
   target = voices[voice].initial_volume;
 
   if (ramp_time == INSTANT_RAMP)
@@ -1060,7 +1060,7 @@
     rate = 16;
   gus_ramp_rate (0, rate);
 
-  if ((target - current) / 64 == 0)	/* Close enough to target. */
+  if ((target - curr) / 64 == 0)	/* Close enough to target. */
     {
       gus_rampoff ();
       gus_voice_volume (target);
@@ -1068,11 +1068,11 @@
       return;
     }
 
-  if (target > current)
+  if (target > curr)
     {
       if (target > (4095 - 65))
 	target = 4095 - 65;
-      gus_ramp_range (current, target);
+      gus_ramp_range (curr, target);
       gus_rampon (0x00);	/* Ramp up, once, no IRQ */
     }
   else
@@ -1080,7 +1080,7 @@
       if (target < 65)
 	target = 65;
 
-      gus_ramp_range (target, current);
+      gus_ramp_range (target, curr);
       gus_rampon (0x40);	/* Ramp down, once, no irq */
     }
   restore_flags (flags);
@@ -1330,7 +1330,9 @@
       init_envelope (voice);
     }
   else
-    compute_and_set_volume (voice, volume, 0);
+    {
+      compute_and_set_volume (voice, volume, 0);
+    }
 
   save_flags (flags);
   cli ();
@@ -1399,7 +1401,9 @@
   if (note_num == 255)
     {
       if (voices[voice].volume_irq_mode == VMODE_START_NOTE)
-	voices[voice].volume_pending = volume;
+	{
+	  voices[voice].volume_pending = volume;
+	}
       else
 	{
 	  ret_val = guswave_start_note2 (dev, voice, note_num, volume);
@@ -1540,7 +1544,7 @@
    * been transferred already.
    */
 
-  memcpy_fromfs ((&((char *) &patch)[offs]), &((addr)[offs]), (sizeof_patch - offs));
+  memcpy_fromfs (&((char *) &patch)[offs], &((addr)[offs]), sizeof_patch - offs);
 
   instr = patch.instr_no;
 
@@ -1683,7 +1687,7 @@
 	   * OK, move now. First in and then out.
 	   */
 
-	  memcpy_fromfs ((audio_devs[gus_devnum]->dmap_out->raw_buf), &((addr)[sizeof_patch + src_offs]), (blk_size));
+	  memcpy_fromfs (audio_devs[gus_devnum]->dmap_out->raw_buf, &((addr)[sizeof_patch + src_offs]), blk_size);
 
 	  save_flags (flags);
 	  cli ();
@@ -2430,7 +2434,7 @@
 {
   if (gus_sampling_channels == 1)
     {
-      memcpy_fromfs ((&localbuf[localoffs]), &((userbuf)[useroffs]), (len));
+      memcpy_fromfs (&localbuf[localoffs], &((userbuf)[useroffs]), len);
     }
   else if (gus_sampling_bits == 8)
     {
@@ -3116,14 +3120,9 @@
     }
 
 
-  {
-    caddr_t         ptr;
-
-    ptr = sound_mem_blocks[sound_num_blocks] = kmalloc ((MAX_SAMPLE + 1) * sizeof (*samples), GFP_KERNEL);
-    if (sound_num_blocks < 1024)
-      sound_num_blocks++;
-    samples = (struct patch_info *) ptr;
-  };
+  samples = (struct patch_info *) (sound_mem_blocks[sound_num_blocks] = kmalloc ((MAX_SAMPLE + 1) * sizeof (*samples), GFP_KERNEL));
+  if (sound_num_blocks < 1024)
+    sound_num_blocks++;;
 
   reset_sample_memory ();
 

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