[openbeos-midi] Re: MPU401 Specifications - maybe
- From: Philippe Houdoin <philippe.houdoin@xxxxxxx>
- To: openbeos-midi@xxxxxxxxxxxxx
- Date: Thu, 16 Jan 2003 16:05:20 +0100 (CET)
En réponse à Crain Greg:
> I'm still having trouble with my driver getting the module to work
> (emu10k2). It gets into UART mode, but no midi data. I found this note
> at the Alsa driver site:
> "Some soundchips have similar but a little bit different implementation
> of mpu401 stuff. For example, emu10k1 has its own mpu401 routines".
> I really wonder what that "workaround" is.
Hmm. It would explain why Be didn't include midi support in their emu10k
driver...
> I do have a question that is kinda related:
> I was going to try bypassing the module write and just write directly to
> the UART.
> Seems the midi server sends this data to the write hook:
>
> status_t (*write_hook)(void * cookie, off_t pos, const void * data,
> size_t * len);
>
> Is there a way to determine what the 'const void * data' is ? I don't
> know what to cast it to. len was 3, pos was 0. The message was a
> simple C note, key on. I figured a 3 byte message, with 'data' being a
> simple pointer buffer. Any hints, or am I totally confused ?
That exactly that:
- data point to first midi byte(s) to send
- len tell you how many bytes
- pos should be always 0, as calling write_pos() on a /dev/midi/...
doesn't make much sense.
So, it should be only a matter of *pushing* each byte at [data..data+len]
thru the UART data register.
Please, keep this code somewhere for us, as it may become our best code
candidate to complete a OBOS mpu401 kernel module.
-Philippe
- References:
- [openbeos-midi] Re: MPU401 Specifications - maybe
- From: Crain Greg
Other related posts:
- » [openbeos-midi] MPU401 Specifications - maybe
- » [openbeos-midi] Re: MPU401 Specifications - maybe
- » [openbeos-midi] Re: MPU401 Specifications - maybe
- » [openbeos-midi] Re: MPU401 Specifications - maybe
- » [openbeos-midi] Re: MPU401 Specifications - maybe
- » [openbeos-midi] Re: MPU401 Specifications - maybe
- [openbeos-midi] Re: MPU401 Specifications - maybe
- From: Crain Greg