[openbeos-midi] Re: mpu401 module

  • From: Crain Greg <greg.crain@xxxxxxxxxxx>
  • To: "'openbeos-midi@xxxxxxxxxxxxx'" <openbeos-midi@xxxxxxxxxxxxx>
  • Date: Thu, 9 Jan 2003 12:28:55 -0500


Greg wrote:
>> I am basically trying to follow the same
>> method.  I can get the module, load it, and create a device.  The
>> problem is, as soon as the midi port is opened, the computer completely
>> freezes and never makes it beyond the open hook.  

>Sounds like something goes wrong at interrupted time.
>Did the callback you pass to MPU401 create_device() call ever called?
>Did the MPU401 interrupt_hook() is correctly called when a MPU interrupt 
>raised?

This all happens before the interupt handler is even installed, or midi 
interrupts are enabled in the soundcard.  
if ( mpu401->create_device (base_addr + A_MUDATA , &card.midi.driver, 0, 
midi_interrupt_op, &card.midi) == B_OK)
{....}
If I understand what you mean by callback, the function 'midi_interrupt_op' 
never gets called, or the interrupt hook.  I think that the problem is somehow 
in the way I create_device.  It gets created, but the first time its called, it 
crashes.  Maybe an incorrect pointer.  Also, in the Ad1816 source, the 
parameter &card.midi is just 0.  I'm not sure what the module is looking for 
here.

>Do you ask Jerome Duval some help? AFAIR, he managed to get some MIDI support 
>in his emu10k driver project...

He was having a similar problem with the midi freezing the computer.  He 
thought it was an interrupt issue.  I know he didn't have midi equipment to 
test it.  I looked at some of his older code, and it is just like the Sonic 
Vibes.  I will have to ask if he made any progress, or at least collaborate.
 
>Oh, BTW, somewhere on the road, OBOS midi team will have to rewrite this 
>MPU401 
>kernel module too. Glup. ;-)

Its only about 9-10kB. Can't be too much code, right? :-)
>-Philippe

I'll look at it some more tonight.  If I getting it working, I will make the 
source available.
-Greg

Other related posts: