From: Krzysztof Foltman <wdev@foltman.com>
To: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/1] ALSA: usb-audio: add support for Akai MPD16
Date: Thu, 20 May 2010 08:49:14 +0100 [thread overview]
Message-ID: <4BF4E97A.9020209@foltman.com> (raw)
In-Reply-To: <4BF4E440.9030105@ladisch.de>
On 05/20/2010 08:26 AM, Clemens Ladisch wrote:
> Not that it really matters, but if the port variable were unsigned,
> you could just check for "port <= 1".
True.
> It is possible that ALSA's buffer does not yet contain the entire
> SysEx message; in this case, the driver would send off the partial
> message without the 0x10 in the first byte.
In that case, the length wouldn't be updated to include the partial
message, so it would send all the previous messages in the transmit
buffer, but not the new (incomplete) message, and it would lose the
incomplete message (because the code would then expect the message to
end up at offset 0 instead of transfer_buffer_length, which isn't
happening).
Anyway, the only correct solution is - as you say - to keep peeking
until skippable content or a full valid SysEx is found. There are still
some nasty corner cases here, too (for example, a SysEx that's longer
than accepted maximum), but it should work. I'll try to implement it
that way.
> This MIDI port isn't an external port (which would imply that any
> random device could be connected to it). There is no macro for
> internal ports; just use PORT_INFO(... _MIDI_GENERIC | _HARDWARE).
True. It isn't the other end of a MIDI socket, it's a USB version of the
MIDI output of the device.
What about the oversized comment block about MPD16 SysEx messages -
should it remain in the source file, or should I move it to a text file
or remove it altogether?
Thanks for the comments/ideas!
K.
next prev parent reply other threads:[~2010-05-20 7:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 20:06 [PATCH 1/1] ALSA: usb-audio: add support for Akai MPD16 Krzysztof Foltman
2010-05-20 7:26 ` Clemens Ladisch
2010-05-20 7:49 ` Krzysztof Foltman [this message]
2010-05-20 9:21 ` Clemens Ladisch
2010-05-25 9:07 ` Krzysztof Foltman
2010-05-25 9:39 ` Daniel Mack
-- strict thread matches above, loose matches on Subject: below --
2010-05-20 19:31 Krzysztof Foltman
2010-05-18 18:37 Krzysztof Foltman
2010-05-19 6:59 ` Clemens Ladisch
2010-05-19 20:31 ` Krzysztof Foltman
2010-05-17 22:48 wdev
2010-05-18 0:38 ` Daniel Mack
2010-05-18 18:36 ` Krzysztof Foltman
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=4BF4E97A.9020209@foltman.com \
--to=wdev@foltman.com \
--cc=alsa-devel@alsa-project.org \
/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.