Skip to content

Commit

Permalink
ALSA: firewire-lib: schedule work again when MIDI substream has rest …
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
takaswie authored and tiwai committed Oct 9, 2015
1 parent d3ef9cb commit e8a40d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/firewire/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e8a40d9

Please sign in to comment.