On Mon, Jul 5, 2010 at 12:16 AM, Clemens Ladisch <clemens(a)ladisch.de> wrote:
As long we're optimizing for benchmarks: In
recent enough kernel
versions, Roland (Edirol/BOSS) USB MIDI devices have a mixer control
"MIDI Input Mode" (the same as the "Light Load" checkbox in the
Windows
driver) which doesn't have much effect in practice but can improve
benchmark behaviour.
Note that for kernel 2.6.32.14-127.fc12.x86_64, and for
## snd-card-3 snd-usb-audio ## --> Emagic MT4
## alias snd-card-5 snd-usb-audio ## --> Roland UM-2
##
## amixer -c 5 --> returns nothing
## amixer -c 3 --> returns nothing
Maybe the feature will be present in fedora 13?
For bulk transfers (used by Roland devices in
"High Load" mode, and
always by all other devices), the UHCI driver has a feature called FSBR
(full-speed bandwidth reclamation) which makes the controller poll the
device continuously instead of every 1 ms, as long as new input is
available every 10 ms. So to get better benchmark numbers, use "-w 1"
instead of "-w 20". (If your music doesn't have new notes every 10 ms,
this isn't very realistic, but it can improve latency between the
consecutive notes of a chord.)
Here's results for the Roland UM-2 with the argument suggested:
## sudo alsa-midi-latency-test -w 1 -r -R -i 36:0 -o 36:0
alsa-midi-latency-test 0.0.3
set_realtime_priority(SCHED_FIFO, 99).. done.
clock resolution: 0.000000001 s
interval between measurements: 1.000 .. 2.000 ms
Test1)
2.1 - 2.2 ms: 488 ########################
2.2 - 2.3 ms: 961 ###############################################
2.3 - 2.4 ms: 1023 ##################################################
2.4 - 2.5 ms: 1030 ##################################################
2.5 - 2.6 ms: 996 ################################################
2.6 - 2.7 ms: 971 ###############################################
2.7 - 2.8 ms: 952 ##############################################
2.8 - 2.9 ms: 1013 #################################################
2.9 - 3.0 ms: 1025 ##################################################
3.0 - 3.1 ms: 1013 #################################################
3.1 - 3.2 ms: 518 #########################
3.2 - 3.3 ms: 6 #
3.3 - 3.4 ms: 1 #
...
3.5 - 3.6 ms: 1 #
3.6 - 3.7 ms: 1 #
...
3.8 - 3.9 ms: 1 #
best latency was 2.08 ms
worst latency was 3.84 ms, which is great.
..........................................
Test2)
...
2.1 - 2.2 ms: 479 #######################
2.2 - 2.3 ms: 944 #############################################
2.3 - 2.4 ms: 1034 #################################################
2.4 - 2.5 ms: 1012 ################################################
2.5 - 2.6 ms: 1006 ################################################
2.6 - 2.7 ms: 985 ###############################################
2.7 - 2.8 ms: 913 ############################################
2.8 - 2.9 ms: 1046 ##################################################
2.9 - 3.0 ms: 1021 #################################################
3.0 - 3.1 ms: 1011 ################################################
3.1 - 3.2 ms: 543 ##########################
3.2 - 3.3 ms: 3 #
...
3.4 - 3.5 ms: 2 #
3.5 - 3.6 ms: 1 #
best latency was 2.07 ms
worst latency was 3.55 ms, which is great.
............................
Last time, with "-w 20":
Test1)
best latency was 2.03 ms
worst latency was 3.19 ms, which is great.
Test2)
best latency was 2.07 ms
worst latency was 3.11 ms, which is great.
-- Niels
http://nielsmayer.com