patch-1.3.58 linux/drivers/sound/midi_synth.c
Next file: linux/drivers/sound/midi_synth.h
Previous file: linux/drivers/sound/maui.c
Back to the patch index
Back to the overall index
- Lines: 73
- Date:
Tue Jan 9 00:37:22 1996
- Orig file:
v1.3.57/linux/drivers/sound/midi_synth.c
- Orig date:
Wed Nov 8 07:11:36 1995
diff -u --recursive --new-file v1.3.57/linux/drivers/sound/midi_synth.c linux/drivers/sound/midi_synth.c
@@ -32,11 +32,11 @@
#include "sound_config.h"
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_MIDI)
+#if defined(CONFIG_MIDI)
#define _MIDI_SYNTH_C_
-static struct wait_queue *sysex_sleeper = NULL;
+static wait_handle *sysex_sleeper = NULL;
static volatile struct snd_wait sysex_sleep_flag =
{0};
@@ -47,7 +47,7 @@
{0};
static unsigned char prev_out_status[MAX_MIDI_DEV];
-#ifdef EXCLUDE_SEQUENCER
+#ifndef CONFIG_SEQUENCER
#define STORE(cmd)
#else
#define STORE(cmd) \
@@ -472,6 +472,8 @@
inc->m_prev_status = 0x00;
restore_flags (flags);
+ sysex_sleep_flag.mode = WK_NONE;
+
return 1;
}
@@ -545,7 +547,7 @@
sysex_sleep_flag.mode = WK_NONE;
- for (i = 0; i < left && !(current->signal & ~current->blocked); i++)
+ for (i = 0; i < left && !current_got_fatal_signal (); i++)
{
unsigned char data;
@@ -566,17 +568,17 @@
}
while (!midi_devs[orig_dev]->putc (orig_dev, (unsigned char) (data & 0xff)) &&
- !(current->signal & ~current->blocked))
+ !current_got_fatal_signal ())
{
unsigned long tl;
if (1)
- current->timeout = tl = jiffies + (1);
+ current_set_timeout (tl = jiffies + (1));
else
tl = 0xffffffff;
sysex_sleep_flag.mode = WK_SLEEP;
- interruptible_sleep_on (&sysex_sleeper);
+ module_interruptible_sleep_on (&sysex_sleeper);
if (!(sysex_sleep_flag.mode & WK_WAKEUP))
{
if (jiffies >= tl)
@@ -638,8 +640,8 @@
int orig_dev = synth_devs[dev]->midi_dev;
int chn, msg;
- if (ctrl_num < 1 || ctrl_num > 127)
- return; /* NOTE! Controller # 0 ignored */
+ if (ctrl_num < 0 || ctrl_num > 127)
+ return;
if (channel < 0 || channel > 15)
return;
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