A good news -- I found a bug!
It is not in awe driver, but in OSS sequencer routine.
It is indirectly because of new AWE driver -- it includes the MIDI
emulation device causing this bug.
Here is the patch to sequencer.c.
--
Takashi Iwai / [EMAIL PROTECTED]
Department of Materials Science
Friedrich-Alexander-University Erlangen-Nuernberg
--
--- linux/drivers/sound/sequencer.c.old Tue Feb 2 22:57:53 1999
+++ linux/drivers/sound/sequencer.c Fri Feb 26 01:19:11 1999
@@ -1105,7 +1105,7 @@
*/
for (i = 0; i < max_mididev; i++)
- if (!midi_opened[i])
+ if (!midi_opened[i] && midi_devs[i])
{
if ((retval = midi_devs[i]->open(i, mode,
sequencer_midi_input, sequencer_midi_output))
>= 0)
@@ -1411,7 +1411,7 @@
case SNDCTL_SEQ_TESTMIDI:
if (__get_user(midi_dev, (int *)arg))
return -EFAULT;
- if (midi_dev < 0 || midi_dev >= max_mididev)
+ if (midi_dev < 0 || midi_dev >= max_mididev ||
+!midi_devs[midi_dev])
return -ENXIO;
if (!midi_opened[midi_dev] &&
@@ -1529,7 +1529,7 @@
case SNDCTL_MIDI_INFO:
if (get_user(dev, (int *)(&(((struct midi_info
*)arg)->device))))
return -EFAULT;
- if (dev < 0 || dev >= max_mididev)
+ if (dev < 0 || dev >= max_mididev || !midi_devs[dev])
return -ENXIO;
midi_devs[dev]->info.device = dev;
return copy_to_user(arg, &midi_devs[dev]->info, sizeof(struct
midi_info))?-EFAULT:0;