pvdmeer
Posts: 29
Joined: Mon Feb 22, 2016 10:29 am

USB MIDI (and HID devices) on Pi3

Sun May 20, 2018 8:31 am

Dear all,

I'm using the Pi3 in a synthesizer product, and I have to say I really love it.. and overall it was a great choice to include it in the product instead because it provides relatively easy interfacing with display, easy GUI development, and has enough processing power with it's multiple cores and Neon SIMD instruction set, to do complex real-time DSP synthesis..

However, we tested several USB MIDI devices and some of them do end up with missing packets. Having researched what the cause may be, it turns out the Pi USB driver development is on hold since 2013 and missing packets from some devices are accepted. The problem occurs with something that is called "split transactions", apparently. I have no idea what that is, and I accept that USB host development can be daunting.

Devices that have problems:
- Everything from Arturia (Beatstep, Keystep, etc)
- Roli Seaboard

The workaround is using dwc_otg.speed=1 in cmdline.txt, but that makes it USB1 speed. Loading samples from USB stick, are now slowed down to a crawl. All other parameter combinations with dwc_otg don't result in a fix.

Can anyone help me with this? I'm willing to join in the driver development here to get it fixed. For my product it would really be beneficial. If anyone could help me started, please do so.

Thanks in advance.

pvdmeer
Posts: 29
Joined: Mon Feb 22, 2016 10:29 am

Re: USB MIDI (and HID devices) on Pi3

Mon May 21, 2018 8:57 am

Alright, after searching the Raspberry Pi Linux kernel Github... The solution can be found that makes these type of USB MIDI controllers work in USB2 mode:

in /boot/cmdline.txt, add the following:

dwc_otg.fiq_fsm_mask=0x3 dwc_otg.nak_holdoff=0

Seems to fix all, but will do some more testing.

Return to “Interfacing (DSI, CSI, I2C, etc.)”