ALSA: rawmidi: A lightweight function to discard pending bytes
authorTakashi Iwai <tiwai@suse.de>
Thu, 13 Sep 2018 06:20:43 +0000 (08:20 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 4 Oct 2018 18:13:17 +0000 (20:13 +0200)
commit6aea5702e27ebc85747d6e4943a0c378e1752be0
treec14ccb05935b7390997e8f4c74a5f4d4b2ab3617
parentcd3b7116b57527f659b96ff6988d2de3d448c5b3
ALSA: rawmidi: A lightweight function to discard pending bytes

For discarding the pending bytes on rawmidi, we process with a loop of
snd_rawmidi_transmit() which is just a waste of CPU power.
Implement a lightweight API function to discard the pending bytes and
the proceed the ring buffer instantly, and use it instead of open
codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/rawmidi.h
sound/core/rawmidi.c
sound/core/seq/seq_virmidi.c
sound/usb/midi.c