summaryrefslogtreecommitdiffstats
path: root/sound/firewire/lib.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-10-09 01:10:27 +0200
committerTakashi Iwai <tiwai@suse.de>2015-10-09 09:57:05 +0200
commite8a40d9bcb2392ea502dc629d5d6c0556fdd3b0c (patch)
treec74d4774ab4daaf6739361b6edf87939d47e1417 /sound/firewire/lib.c
parentALSA: firewire-lib: add a restriction for a transaction at once (diff)
downloadlinux-e8a40d9bcb2392ea502dc629d5d6c0556fdd3b0c.tar.xz
linux-e8a40d9bcb2392ea502dc629d5d6c0556fdd3b0c.zip
ALSA: firewire-lib: schedule work again when MIDI substream has rest of MIDI messages
Currently, when two MIDI trigger callbacks can be called immediately, transactions for the second MIDI messages can be postpone till next trigger callback. This is not good for real-time message transmission. This commit schedules work again at response handling callback if the MIDI substream still includes untransferred MIDI messages. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/lib.c')
-rw-r--r--sound/firewire/lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/firewire/lib.c b/sound/firewire/lib.c
index ddc3e88ee0d1..3e9afd7d402c 100644
--- a/sound/firewire/lib.c
+++ b/sound/firewire/lib.c
@@ -78,6 +78,9 @@ static void async_midi_port_callback(struct fw_card *card, int rcode,
snd_rawmidi_transmit_ack(substream, port->consume_bytes);
port->idling = true;
+
+ if (!snd_rawmidi_transmit_empty(substream))
+ schedule_work(&port->work);
}
static void midi_port_work(struct work_struct *work)