Daniel James wrote: 

> For ALSA MIDI there is: http://github.com/koppi/alsa-midi-latency-test


64 Studio 3.0 β

$ git clone git://github.com/koppi/alsa-midi-latency-test.git
$ cd alsa-midi-latency-test
$ sudo apt-get update
$ sudo apt-get install debhelper autotools-dev automake libasound2-dev
 debhelper is already the newest version.
 autotools-dev is already the newest version.
 automake is already the newest version.
 libasound2-dev is already the newest version.
$ sh autogen.sh
$ ./configure
$ sudo checkinstall
 Done. The new package has been installed and saved to
 /usr/src/alsa-midi-latency-test/alsa-midi-latency_0.0.3-1git20100621_amd64.deb
$ sudo make clean
$ alsa-midi-latency-test -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
 16:0    TerraTec EWX24/96                TerraTec EWX24/96 MIDI
 20:0    USB Device 0x170b:0x11           USB Device 0x170b:0x11 MIDI 1
$ alsa-midi-latency-test -i20:0 -o20:0
> alsa-midi-latency-test 0.0.3
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
     0;       1.80;       1.80     
     2;       1.99;       1.99     
     4;       3.14;       3.14     
    11;       3.41;       3.41     
    27;       5.16;       5.16     
  2845;       5.43;       5.43     
  3842;       5.62;       5.62     
  3853;       7.00;       7.00     
  9999;       1.96;       7.00     
> done.

> latency distribution:
...
  1.3 -  1.4 ms:        1 #
  1.4 -  1.5 ms:        5 #
  1.5 -  1.6 ms:        6 #
  1.6 -  1.7 ms:        8 #
  1.7 -  1.8 ms:       10 #
  1.8 -  1.9 ms:       50 #
  1.9 -  2.0 ms:      229 #
  2.0 -  2.1 ms:     9570
##################################################
  2.1 -  2.2 ms:       44 #
  2.2 -  2.3 ms:       33 #
  2.3 -  2.4 ms:        9 #
  2.4 -  2.5 ms:        4 #
  2.5 -  2.6 ms:        5 #
  2.6 -  2.7 ms:        2 #
  2.7 -  2.8 ms:        1 #
  2.8 -  2.9 ms:        1 #
  2.9 -  3.0 ms:        2 #
  3.0 -  3.1 ms:        2 #
  3.1 -  3.2 ms:        2 #
  3.2 -  3.3 ms:        2 #
  3.3 -  3.4 ms:        1 #
  3.4 -  3.5 ms:        3 #
...
  3.7 -  3.8 ms:        1 #
  3.8 -  3.9 ms:        1 #
...
  4.4 -  4.5 ms:        1 #
...
  5.0 -  5.1 ms:        1 #
  5.1 -  5.2 ms:        1 #
  5.2 -  5.3 ms:        1 #
...
  5.4 -  5.5 ms:        1 #
...
  5.6 -  5.7 ms:        1 #
...
  6.0 -  6.1 ms:        1 #
...
  7.0 -  7.1 ms:        1 #

> FAIL

 best latency was 1.29 ms
 worst latency was 7.00 ms, which is too much. Please check:

  - if your hardware uses shared IRQs - `watch -n 1
cat /proc/interrupts`
    while running this test to see, which IRQs the OS is using for your
midi hardware,

  - if you're running this test on a realtime OS - `uname -a` should
contain '-rt',

  - your OS' scheduling priorities - `chrt -p [pidof process name|
IRQ-?]`.

 Have a look at
  http://www.linuxaudio.org/mailarchive/lat/
 to find out, howto fix issues with high midi latencies.
$ uname -a
Linux 64studio 2.6.31.12-rt20 #1 SMP PREEMPT RT Sun Feb 7 13:55:55 CET
2010 x86_64 GNU/Linux
$ alsa-midi-latency-test -i20:0 -o20:0
> alsa-midi-latency-test 0.0.3
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
     0;       2.12;       2.12     
    41;       2.29;       2.29     
    56;       3.21;       3.21     
  2252;       3.24;       3.24     
  2423;       3.35;       3.35     
  4748;       4.44;       4.44     
  6760;       5.10;       5.10     
  7872;      15.41;      15.41     
  9999;       1.99;      15.41     
> done.

> latency distribution:
...
  1.3 -  1.4 ms:        2 #
  1.4 -  1.5 ms:        6 #
  1.5 -  1.6 ms:       26 #
  1.6 -  1.7 ms:       12 #
  1.7 -  1.8 ms:       20 #
  1.8 -  1.9 ms:       21 #
  1.9 -  2.0 ms:      280 #
  2.0 -  2.1 ms:     9508
##################################################
  2.1 -  2.2 ms:       33 #
  2.2 -  2.3 ms:       18 #
  2.3 -  2.4 ms:       18 #
  2.4 -  2.5 ms:       12 #
  2.5 -  2.6 ms:       17 #
  2.6 -  2.7 ms:        4 #
  2.7 -  2.8 ms:        1 #
  2.8 -  2.9 ms:        3 #
  2.9 -  3.0 ms:        2 #
  3.0 -  3.1 ms:        3 #
  3.1 -  3.2 ms:        2 #
  3.2 -  3.3 ms:        2 #
  3.3 -  3.4 ms:        1 #
  3.4 -  3.5 ms:        1 #
  3.5 -  3.6 ms:        2 #
  3.6 -  3.7 ms:        1 #
...
  4.2 -  4.3 ms:        1 #
...
  4.4 -  4.5 ms:        2 #
...
  5.1 -  5.2 ms:        1 #
...
 15.4 - 15.5 ms:        1 #

> FAIL

 best latency was 1.30 ms
 worst latency was 15.41 ms, which is too much. Please check:

  - if your hardware uses shared IRQs - `watch -n 1
cat /proc/interrupts`
    while running this test to see, which IRQs the OS is using for your
midi hardware,

  - if you're running this test on a realtime OS - `uname -a` should
contain '-rt',

  - your OS' scheduling priorities - `chrt -p [pidof process name|
IRQ-?]`.

 Have a look at
  http://www.linuxaudio.org/mailarchive/lat/
 to find out, howto fix issues with high midi latencies.

64 Studio 3.3 α

$ su root -c "apt-get update"
$ su root -c "apt-get install git-core debhelper autotools-dev automake
libasound2-dev"
 debhelper is already the newest version.
 autotools-dev is already the newest version.
 automake is already the newest version.
 libasound2-dev is already the newest version.
 The following NEW packages will be installed:
   git-core libdigest-sha1-perl liberror-perl
$ git clone git://github.com/koppi/alsa-midi-latency-test.git
$ cd alsa-midi-latency-test
$ su root -c "apt-get install libtool"
 The following NEW packages will be installed:
   libltdl-dev libtool
$ sh autogen.sh
$ ./configure
$ su root -c checkinstall
 Done. The new package has been installed and saved to
 
/usr/src/alsa-midi-latency-test/alsa-midi-latency_0.0.3-1git20100621~3.3a_amd64.deb
$ su root -c "make clean"
$ alsa-midi-latency-test -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
 16:0    TerraTec EWX24/96                TerraTec EWX24/96 MIDI
 20:0    USB Device 0x170b:0x11           USB Device 0x170b:0x11 MIDI 1
$ alsa-midi-latency-test -i20:0 -o20:0
> alsa-midi-latency-test 0.0.3
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
     0;       1.80;       1.80     
     2;       1.99;       1.99     
     4;       1.99;       1.99     
     6;       2.01;       2.01     
    12;       2.07;       2.07     
    62;       7.16;       7.16     
    65;       9.33;       9.33     
  5668;      10.43;      10.43     
  9999;       1.99;      10.43     
> done.

> latency distribution:
...
  1.3 -  1.4 ms:        2 #
  1.4 -  1.5 ms:        4 #
  1.5 -  1.6 ms:       11 #
  1.6 -  1.7 ms:        8 #
  1.7 -  1.8 ms:       32 #
  1.8 -  1.9 ms:       84 #
  1.9 -  2.0 ms:      848 #####
  2.0 -  2.1 ms:     8810
##################################################
  2.1 -  2.2 ms:       67 #
  2.2 -  2.3 ms:       63 #
  2.3 -  2.4 ms:       13 #
  2.4 -  2.5 ms:        7 #
  2.5 -  2.6 ms:        8 #
  2.6 -  2.7 ms:        3 #
...
  2.8 -  2.9 ms:        4 #
  2.9 -  3.0 ms:        1 #
  3.0 -  3.1 ms:        4 #
  3.1 -  3.2 ms:       10 #
  3.2 -  3.3 ms:        5 #
  3.3 -  3.4 ms:        2 #
...
  3.6 -  3.7 ms:        1 #
...
  3.9 -  4.0 ms:        1 #
  4.0 -  4.1 ms:        1 #
  4.1 -  4.2 ms:        1 #
  4.2 -  4.3 ms:        1 #
  4.3 -  4.4 ms:        1 #
...
  4.5 -  4.6 ms:        1 #
...
  5.0 -  5.1 ms:        1 #
  5.1 -  5.2 ms:        2 #
...
  7.2 -  7.3 ms:        1 #
...
  9.1 -  9.2 ms:        1 #
...
  9.3 -  9.4 ms:        1 #
...
 10.4 - 10.5 ms:        1 #

> FAIL

 best latency was 1.25 ms
 worst latency was 10.43 ms, which is too much. Please check:

  - if your hardware uses shared IRQs - `watch -n 1
cat /proc/interrupts`
    while running this test to see, which IRQs the OS is using for your
midi hardware,

  - if you're running this test on a realtime OS - `uname -a` should
contain '-rt',

  - your OS' scheduling priorities - `chrt -p [pidof process name|
IRQ-?]`.

 Have a look at
  http://www.linuxaudio.org/mailarchive/lat/
 to find out, howto fix issues with high midi latencies.
$ alsa-midi-latency-test -i20:0 -o20:0
> alsa-midi-latency-test 0.0.3
> clock resolution: 0.000000001 s

> sampling 10000 midi latency values - please wait ...
> press Ctrl+C to abort test

sample; latency_ms; latency_ms_worst
     0;       1.68;       1.68     
     1;       1.85;       1.85     
     2;       1.97;       1.97     
     3;       1.98;       1.98     
     5;       1.99;       1.99     
    11;       2.00;       2.00     
    12;       6.49;       6.49     
   652;       7.61;       7.61     
  9999;       1.96;       7.61     
> done.

> latency distribution:
...
  1.3 -  1.4 ms:        6 #
  1.4 -  1.5 ms:        2 #
  1.5 -  1.6 ms:        9 #
  1.6 -  1.7 ms:        4 #
  1.7 -  1.8 ms:       11 #
  1.8 -  1.9 ms:       72 #
  1.9 -  2.0 ms:      892 #####
  2.0 -  2.1 ms:     8813
##################################################
  2.1 -  2.2 ms:      113 #
  2.2 -  2.3 ms:       31 #
  2.3 -  2.4 ms:        7 #
  2.4 -  2.5 ms:        3 #
  2.5 -  2.6 ms:        5 #
  2.6 -  2.7 ms:        4 #
  2.7 -  2.8 ms:        4 #
  2.8 -  2.9 ms:        1 #
  2.9 -  3.0 ms:        1 #
  3.0 -  3.1 ms:        2 #
  3.1 -  3.2 ms:        4 #
  3.2 -  3.3 ms:        2 #
...
  3.4 -  3.5 ms:        3 #
...
  3.6 -  3.7 ms:        1 #
...
  3.8 -  3.9 ms:        2 #
...
  4.3 -  4.4 ms:        1 #
...
  5.0 -  5.1 ms:        1 #
  5.1 -  5.2 ms:        1 #
...
  5.6 -  5.7 ms:        1 #
...
  6.0 -  6.1 ms:        1 #
...
  6.2 -  6.3 ms:        1 #
...
  6.5 -  6.6 ms:        1 #
...
  7.6 -  7.7 ms:        1 #

> FAIL

 best latency was 1.28 ms
 worst latency was 7.61 ms, which is too much. Please check:

  - if your hardware uses shared IRQs - `watch -n 1
cat /proc/interrupts`
    while running this test to see, which IRQs the OS is using for your
midi hardware,

  - if you're running this test on a realtime OS - `uname -a` should
contain '-rt',

  - your OS' scheduling priorities - `chrt -p [pidof process name|
IRQ-?]`.

 Have a look at
  http://www.linuxaudio.org/mailarchive/lat/
 to find out, howto fix issues with high midi latencies.
$ uname -a
Linux 64studio 2.6.31-2-multimedia-amd64 #1 SMP PREEMPT RT Thu Oct 1
16:14:20 BST 2009 x86_64 GNU/Linux
$ watch -n 1 cat /proc/interrupts
Every 1.0s: cat /proc/interrupts
Mon Jun 21 16:19:33 2010

           CPU0       CPU1
  0:        123         11   IO-APIC-edge      timer
  1:          8       3191   IO-APIC-edge      i8042
  4:          0          2   IO-APIC-edge
  7:          0          0   IO-APIC-edge      parport0
  8:          0          1   IO-APIC-edge      rtc0
  9:          0          0   IO-APIC-fasteoi   acpi
 12:       1024     405706   IO-APIC-edge      i8042
 14:         68      26273   IO-APIC-edge      ide0
 16:          0          1   IO-APIC-fasteoi   ohci_hcd:usb1
 17:        131      39969   IO-APIC-fasteoi   ohci_hcd:usb3,
ohci_hcd:usb5
 18:        398     298098   IO-APIC-fasteoi   ohci_hcd:usb4,
ohci_hcd:usb6, nvidia
 19:          0          2   IO-APIC-fasteoi   ehci_hcd:usb2
 21:          0          0   IO-APIC-fasteoi   ICE1712
 22:         97      35525   IO-APIC-fasteoi   ohci1394, ahci
 26:         36      13608   PCI-MSI-edge      eth0
NMI:          0          0   Non-maskable interrupts
LOC:     647594     532821   Local timer interrupts
SPU:          0          0   Spurious interrupts
CNT:          0          0   Performance counter interrupts
PND:          0          0   Performance pending work
RES:     678727      69574   Rescheduling interrupts
CAL:       1102         62   Function call interrupts
TLB:       1383       1591   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:         11         11   Machine check polls
ERR:          0
MIS:          0
$ lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 170b:0011 Swissonic MIDI-USB 1x1
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users

Reply via email to