From: Ryan Pavlik <rpav@nwlink.com>
To: alsa-devel@lists.sourceforge.net
Subject: MTP/AV / Sequencer MIDI problem... design issue?
Date: Fri, 10 Jan 2003 11:37:11 -0800 [thread overview]
Message-ID: <20030110113711.06e8ee2d.rpav@nwlink.com> (raw)
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
next reply other threads:[~2003-01-10 19:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-10 19:37 Ryan Pavlik [this message]
2003-01-11 13:55 ` MTP/AV / Sequencer MIDI problem... design issue? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030110113711.06e8ee2d.rpav@nwlink.com \
--to=rpav@nwlink.com \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.