On Sat, 11 Jan 2003, Ryan Pavlik wrote:

> On Sat, 11 Jan 2003 20:50:49 -0500
> Paul Davis <[EMAIL PROTECTED]> wrote:
> > 
> > i would have thought that the mtpav driver should do the same
> > thing. if you want to access all 8 ports, you should have 8 access
> > points (whether this is via the sequencer or the rawmidi interface),
> > and write to each one of them. the use of the "Dn" byte(s?) to switch
> > output ports shouldn't be exported to user space. 
> 
> It does, and you do... except the driver has the problems with parallel
> access of ports I mentioned in the original message.  When you access
> them with the sequencer API, the driver/library doesn't seem to properly
> send entire messages.  Thus the problem arises.

If the device needs full midi messages a stream parser must be implemented 
in the mtpav driver. There is no guarantee, that the MIDI message is 
complete in the rawmidi implementation. It behaves like a char stream 
device (something like tty).

Example:

port #2 received three bytes from an application: 0x80 0x10 0x15
port #3 received three bytes from an application: 0x90 0x20 0x00

So the mtpav driver might send this sequence in this order:

0xf5 0x02 0x80 0xf5 0x03 0x90 0xf5 0x02 0x10 0x15 0xf5 0x03 0x20 0x00

Where 0xf5 0xXX are port addresses. There is guarantee (using spinlocks) 
that the port will receive the right values but not whole midi message at 
once.

I think that the problem might be in another code.

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to