[alsa-devel] [PATCH 2/3] fireface: add transaction support
Takashi Sakamoto
o-takashi at sakamocchi.jp
Tue Dec 8 12:25:14 CET 2015
On Dec 08 2015 19:22, Clemens Ladisch wrote:
> Takashi Sakamoto wrote:
>> +static void transmit_midi_msg(struct snd_ff *ff, unsigned int port)
>> ...
>> + /* Retrieve one MIDI byte to calculate length of the message. */
>> + len = snd_rawmidi_transmit_peek(substream, buf,
>> + SND_FF_MAXIMIM_MIDI_QUADS);
>
> SND_FF_MAXIMIM_MIDI_QUADS does not have the value 1.
Oops. It's my mistake to left the message as what it had been.
Originally, I programmed to retrieve one byte. Later, I investigated the
maximum message size and changed the code.
>> + /* Calculate consume bytes. */
>> + consume = calculate_message_bytes(status);
>> + if (consume <= 0)
>> + return;
>
> As far as I can see, sending one of the "undefined" bytes can stop the
> stream permanently. Invalid bytes need to be acked to ignore/remove
> them.
Exactly. We should find better way to handle such messages. Do you have
any good ideas?
Thanks
Takashi Sakamoto
More information about the Alsa-devel
mailing list