Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8a40d9b authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai
Browse files

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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d3ef9cb9
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -78,6 +78,9 @@ static void async_midi_port_callback(struct fw_card *card, int rcode,
		snd_rawmidi_transmit_ack(substream, port->consume_bytes);
		snd_rawmidi_transmit_ack(substream, port->consume_bytes);


	port->idling = true;
	port->idling = true;

	if (!snd_rawmidi_transmit_empty(substream))
		schedule_work(&port->work);
}
}


static void midi_port_work(struct work_struct *work)
static void midi_port_work(struct work_struct *work)