ALSA: rawmidi: Add framing mode
This commit adds a new framing mode that frames all MIDI data into 32-byte frames with a timestamp. The main benefit is that we can get accurate timestamps even if userspace wakeup and processing is not immediate. Testing on a Celeron N3150 with this mode has a max jitter of 2.8 ms, compared to the in-kernel seq implementation which has a max jitter of 5 ms during idle and much worse when running scheduler stress tests in parallel. Signed-off-by:David Henningsson <coding@diwic.se> Reviewed-by:
Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20210515071533.55332-1-coding@diwic.se Signed-off-by:
Takashi Iwai <tiwai@suse.de>
Showing
- include/sound/rawmidi.h 2 additions, 0 deletionsinclude/sound/rawmidi.h
- include/uapi/sound/asound.h 28 additions, 2 deletionsinclude/uapi/sound/asound.h
- sound/core/rawmidi.c 91 additions, 2 deletionssound/core/rawmidi.c
- sound/core/rawmidi_compat.c 3 additions, 1 deletionsound/core/rawmidi_compat.c
Please register or sign in to comment