Commit bc95e53d authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Clemens Ladisch <clemens@ladisch.de>

USB generic driver
prevent twenty-seconds wait when unplugging USB MIDI device with a port subscription
parent febf142f
......@@ -453,8 +453,16 @@ static void snd_usbmidi_output_trigger(snd_rawmidi_substream_t* substream, int u
usbmidi_out_port_t* port = (usbmidi_out_port_t*)substream->runtime->private_data;
port->active = up;
if (up)
if (up) {
if (port->ep->umidi->chip->shutdown) {
/* gobble up remaining bytes to prevent wait in
* snd_rawmidi_drain_output */
while (!snd_rawmidi_transmit_empty(substream))
snd_rawmidi_transmit_ack(substream, 1);
return;
}
tasklet_hi_schedule(&port->ep->tasklet);
}
}
static int snd_usbmidi_input_open(snd_rawmidi_substream_t* substream)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment