summaryrefslogtreecommitdiffstats
path: root/Documentation/ptp
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-10-09 08:10:25 +0900
committerTakashi Iwai <tiwai@suse.de>2015-10-09 09:57:04 +0200
commit585d7cba5e1fcd8703a120042f35695165986b9b (patch)
treef9caae76a9b43aa0beae8c3572d521d5d513f73c /Documentation/ptp
parent694470273de29c2d3f3792856d4e748969294789 (diff)
downloadop-kernel-dev-585d7cba5e1fcd8703a120042f35695165986b9b.zip
op-kernel-dev-585d7cba5e1fcd8703a120042f35695165986b9b.tar.gz
ALSA: firewire-lib: add helper functions for asynchronous transactions to transfer MIDI messages
Some models receive MIDI messages via IEEE 1394 asynchronous transactions. In this case, MIDI messages are transferred in fixed-length payload. It's nice that firewire-lib module has common helper functions. This commit implements this idea. Each driver adds 'struct snd_fw_async_midi_port' in its instance structure. In probing, it should call snd_fw_async_midi_port_init() to initialize the structure with some parameters such as target address, the length of payload in a transaction and a pointer for callback function to fill the payload buffer. At 'struct snd_rawmidi_ops.trigger()' callback, it should call 'snd_fw_async_midi_port_run()' to start transactions. Each driver should ensure that the lifetime of MIDI substream continues till calling 'snd_fw_async_midi_port_finish()'. The helper functions support retries to transferring MIDI messages when transmission errors occur. When transactions are successful, the helper functions call 'snd_rawmidi_transmit_ack()' internally to consume MIDI bytes in the buffer. Therefore, Each driver is expected to use 'snd_rawmidi_transmit_peek()' to tell the number of bytes to transfer to return value of 'fill' callback. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/ptp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud