summaryrefslogtreecommitdiffstats
path: root/sound/firewire/amdtp.h
diff options
context:
space:
mode:
authorClemens Ladisch2014-11-25 22:54:10 +0100
committerTakashi Iwai2015-01-16 22:51:23 +0100
commit25ca917c0fcdd1d2c4a701905e11751275186310 (patch)
treefb080f775928a406611e1ae7b0053bdf79aee5f1 /sound/firewire/amdtp.h
parentALSA: firewire-lib: remove rx_blocks_for_midi quirk (diff)
downloadkernel-qcow2-linux-25ca917c0fcdd1d2c4a701905e11751275186310.tar.gz
kernel-qcow2-linux-25ca917c0fcdd1d2c4a701905e11751275186310.tar.xz
kernel-qcow2-linux-25ca917c0fcdd1d2c4a701905e11751275186310.zip
ALSA: firewire-lib: limit the MIDI data rate
Do no send MIDI bytes at the full rate at which FireWire packets happen to be sent, but restrict them to the actual rate of a real MIDI port. This is required by the specification, and prevents data loss when the device's buffer overruns. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/amdtp.h')
-rw-r--r--sound/firewire/amdtp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/firewire/amdtp.h b/sound/firewire/amdtp.h
index cd4c4dfb3951..8a03a91e728b 100644
--- a/sound/firewire/amdtp.h
+++ b/sound/firewire/amdtp.h
@@ -148,6 +148,8 @@ struct amdtp_stream {
bool double_pcm_frames;
struct snd_rawmidi_substream *midi[AMDTP_MAX_CHANNELS_FOR_MIDI * 8];
+ int midi_fifo_limit;
+ int midi_fifo_used[AMDTP_MAX_CHANNELS_FOR_MIDI * 8];
/* quirk: fixed interval of dbc between previos/current packets. */
unsigned int tx_dbc_interval;