patch-2.1.41 linux/drivers/sound/sb_midi.c
Next file: linux/drivers/sound/sequencer.c
Previous file: linux/drivers/sound/sb_common.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Sun May 11 02:59:20 1997
- Orig file:
v2.1.40/linux/drivers/sound/sb_midi.c
- Orig date:
Tue Mar 4 10:25:25 1997
diff -u --recursive --new-file v2.1.40/linux/drivers/sound/sb_midi.c linux/drivers/sound/sb_midi.c
@@ -52,6 +52,7 @@
restore_flags (flags);
devc->irq_mode = IMODE_MIDI;
+ devc->midi_broken = 0;
sb_dsp_reset (devc);
@@ -96,9 +97,16 @@
sb_devc *devc = midi_devs[dev]->devc;
if (devc == NULL)
- return -ENXIO;
+ return 1;
+
+ if (devc->midi_broken)
+ return 1;
- sb_dsp_command (devc, midi_byte);
+ if (!sb_dsp_command (devc, midi_byte))
+ {
+ devc->midi_broken = 1;
+ return 1;
+ }
return 1;
}
@@ -220,6 +228,7 @@
midi_devs[num_midis]->converter->id = "SBMIDI";
num_midis++;
+ sequencer_init ();
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov