]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: firewire-digi00x: handle MIDI messages in isochronous packets
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 11 Oct 2015 03:30:15 +0000 (12:30 +0900)
committerTakashi Iwai <tiwai@suse.de>
Sun, 11 Oct 2015 16:25:57 +0000 (18:25 +0200)
commit010fd3fce4bdc1eb09875f4aee2e4777d46076bf
treedaa3bd5ce5641d40cd1139ca6414a290fd3675a9
parent388dca44bf357ea8daa236ead8a4ca9cf9eddf50
ALSA: firewire-digi00x: handle MIDI messages in isochronous packets

In Digi 002/003 protocol, MIDI messages are transferred in the last data
channel of data blocks. Although this data channel has a label of 0x80,
it's not fully MIDI conformant data channel especially because the Counter
field always zero independently of included MIDI bytes. The 4th byte of
the data channel in LSB tells the number of included MIDI bytes. This byte
also includes the number of MIDI port. Therefore, the data format in this
data channel is:
 * 1st: 0x80 as label
 * 2nd: MIDI bytes
 * 3rd: 0 or MIDI bytes
 * 4th: the number of MIDI byte and the number of MIDI port

This commit adds support of MIDI messages in data block processing layer.

Like AM824 data format, this data channel has a capability to transfer
more MIDI messages than the capability of phisical MIDI bus. Therefore, a
throttle for data rate is  required to prevent devices' internal buffer to
overflow.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/digi00x/amdtp-dot.c
sound/firewire/digi00x/digi00x-stream.c
sound/firewire/digi00x/digi00x.h