Unix & Linux Asked by Johan Schuijt on November 16, 2021
I’m trying to increase the USB poll rate of my ION IED05 drum controller to decrease the latency when striking toms. This drum controller is actually behaving like a USB gamepad, instead of being a MIDI instrument. Therefore i’m writing a midi proxy.
Let me first give you some information.
I’m getting events from /dev/input/js0
when striking toms.
I’m running an up-to-date Arch Linux install, with the realtime kernel Linux instrument 5.4.19-rt11-1-rt #1 SMP PREEMPT_RT Fri, 21 Feb 2020 08:55:59 +0000 x86_64 GNU/Linux
On connecting the controller i get the following dmesg output:
[ 3502.121825] usb 2-4.1: new low-speed USB device number 13 using xhci_hcd
[ 3502.238814] usb 2-4.1: New USB device found, idVendor=15e4, idProduct=0100, bcdDevice= 1.00
[ 3502.238817] usb 2-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3502.238819] usb 2-4.1: Product: DRUM VDX-150
[ 3502.238820] usb 2-4.1: Manufacturer: DRUM VDX-150
[ 3502.257116] input: DRUM VDX-150 DRUM VDX-150 as /devices/pci0000:00/0000:00:14.0/usb2/2-4/2-4.1/2-4.1:1.0/0003:15E4:0100.000D/input/input44
[ 3502.257407] hid-generic 0003:15E4:0100.000D: input,hidraw1: USB HID v1.00 Joystick [DRUM VDX-150 DRUM VDX-150] on usb-0000:00:14.0-4.1/input0
The kernel has this to say about the device:
instrument# cat /sys/kernel/debug/usb/devices | grep DRUM -B3 -A3
T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 11 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=15e4 ProdID=0100 Rev= 1.00
S: Manufacturer=DRUM VDX-150
S: Product=DRUM VDX-150
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
USB device information:
instrument# lsusb -vd 15e4:0100
Bus 002 Device 011: ID 15e4:0100 Numark
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x15e4 Numark
idProduct 0x0100
bcdDevice 1.00
iManufacturer 1 DRUM VDX-150
iProduct 2 DRUM VDX-150
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0022
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.00
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 86
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
At the moment the drumkit is polled every 8ms (i believe 10 is interpreted as 8 by the kernel?), as can be seen from Ivl=10ms
Upon researching if found that i could force the poll rate, i’ve set the usbhid.jspoll parameter like so:
instrument# cat /etc/modprobe.d/usbhid.conf
options usbhid jspoll=1
Which seems to be picked up:
instrument# cat /sys/module/usbhid/parameters/jspoll
1
But this parameter does not seem to change anything about the poll rate.
I’m testing all this with gilrs, as i’m creating a midi proxy for this drumkit, and the shortest duration i’m seeing between events is 8ms.
I’ve tried everything i could come up with and i don’t know what to try next..
How do i increase the poll rate of this device?
That's because bInterval it's inherent to the USB Device, it's a spec and you cannot change that unless you are programming the Device itself. You are doing well by decreasing OS poll rate tho, it helps a little in your case.
You can read more about input lag at https://inputlag.science/controller
Answered by Martin on November 16, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP