All of lore.kernel.org
 help / color / mirror / Atom feed
* MTP/AV / Sequencer MIDI problem... design issue?
@ 2003-01-10 19:37 Ryan Pavlik
  2003-01-11 13:55 ` Paul Davis
  2003-01-11 14:46 ` Jaroslav Kysela
  0 siblings, 2 replies; 10+ messages in thread
From: Ryan Pavlik @ 2003-01-10 19:37 UTC (permalink / raw)
  To: alsa-devel

Basically, the problem is this.  The MTP/AV protocol takes messages
like this:

   Dn B1 ... Bn

Where Dn is the device number, and B1..Bn are the midi message bytes.
This, at least, is what I gather from talking to Michael Mayers, the
original driver developer.

You may see the problem now.  When multiple threads talk to the device
at once, you have a problem:

A:  Dn B1 ,, ,, B2 ...
B:        Dn B1 ,, ...

The userland solution, when writing raw midi, is to just put a mutex
on the device and never write an incomplete message.

That is, of course, not an acceptable solution, and it also doesn't
work when you're using the ALSA sequencer interface (at least from the
API calls I've seen).  Fixing it in the driver requires interpreting
much MIDI, possibly buffering, and has some problems (what if someone
writes an incomplete message and dies?).

I'd like to hear recommendations; I have a particular interest in
seeing this work and am more than willing to submit patches.

-- 
Ryan Pavlik <rpav@users.sf.net>

"Hey! Captain talks-too-much, quiet time is now."


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-01-12  9:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 19:37 MTP/AV / Sequencer MIDI problem... design issue? Ryan Pavlik
2003-01-11 13:55 ` Paul Davis
2003-01-11 18:30   ` Ryan Pavlik
2003-01-11 23:31     ` Paul Davis
2003-01-12  0:59       ` Ryan Pavlik
2003-01-12  1:50         ` Paul Davis
2003-01-12  4:37           ` Ryan Pavlik
2003-01-12  9:57             ` Jaroslav Kysela
2003-01-11 14:46 ` Jaroslav Kysela
2003-01-12  1:02   ` Ryan Pavlik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.