
When MIDI buffer stores two or more MIDI messages, TASCAM driver transfers asynchronous transactions including one MIDI message and extra bytes in second MIDI message.
This commit fixes this bug by clear needless bytes in the buffer.
Signed-off-by: Takashi Sakamoto o-takashi@sakamocchi.jp --- sound/firewire/tascam/tascam-transaction.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/sound/firewire/tascam/tascam-transaction.c b/sound/firewire/tascam/tascam-transaction.c index 4ffaa8a..4bedfe4 100644 --- a/sound/firewire/tascam/tascam-transaction.c +++ b/sound/firewire/tascam/tascam-transaction.c @@ -130,6 +130,9 @@ static int fill_message(struct snd_rawmidi_substream *substream, u8 *buf) buf[0] = (port << 4) | (buf[1] >> 4); }
+ if (len < 3) + memset(buf + 1, 0, 3 - len); + return len; }