8 device limit for USB MIDI devices?

I notice that when I connect several USB MIDI devices to Zynthian, some devices are not getting recognized. The kernel log shows this:
snd-usb-audio 1-1.2.3:1.0: cannot find the slot for index -1 (range 0-7), error: -19
If this is the case, then I wonder if this limit can be removed ?
MIDI is usually not very bandwidth and CPU intensive and in my opinion it should not cause problems on a Pi4.

I remember reading about this limitation in the raspberry pi forums and a user compiled a kernel with a higher limit (32 in his case).
I’m not sure if this is somehow impacting performance (or maybe it could break some config) but it would be nice to be able to use more than 7 USB devices (the RPi counts as one too).



Good catch @STM. I believe we use a stock kernel. (@jofemodo can confirm.) To fix this looks like compiling our own kernel and maintaining this and encouraging Raspbian maintaners to adjust the setting in their kernel.


I’m guessing It will be because Raspberry Pi OS also has to support running on the pi1 which had a severely limited usb device enumeration.

I’m guessing MIDI is not primary use for RPi so no one responsible for kernel build configuration had thought about it. Changing it within buildtools is possible and pretty straightforward. If I can suggest, compile all MIDI stuff to kernel itself, snd_seq_dummy also.

I filed a bug report on GitHub: Please remove limitation to only 8 USB MIDI devices · Issue #4179 · raspberrypi/linux · GitHub
Please leave encouraging comments to the kernel maintainers there. Thanks !


Ooo, we probably need to test this on Official Raspberry Pi
OS too as zynthian doesn’t use the most recent kernel.

Hello :slight_smile:
Any evolution on this issue ?

This happened:

Really tempted by the sudo rpi-update pulls/5637 :wink:

1 Like

Hi @Koshdukai !

Welcome to zynthianland!
Did you reach the limit? Could you give more details about your setup and use-case?
Anyway, next SD- image is based in bullseye-64bits and probably will solve this. I have to confirm.


1 Like

I have experience with limit of USB sound card (8) on standart raspberry os (32bit). PatchBox OS is without problem becouse use specialy compiled kernel with limit up to 32 USB sound cards.

Hi @jofemodo, thanks :slight_smile:

Yes, quite easily in fact due to some of the MIDI controllers having multiple MIDI USB ports where the more extreme example is the Arturia MiniLab mk3 with 4 USB MIDI ports (MIDI, DIN THRU, MCU/HUI and ALV)

Other 2nd gen Arturia Keylab also have 2 MIDI USB ports (the 2nd being a DAW oriented port).

So, simply plugging 2 Keylabs and a MiniLab3 will immediately take over 8 ports.

In my actual setup I’m trying to have a rack of 6 controllers, a USB Audio interface and an TE OP-1.

The 6th and the TE OP-1 are left out due to this limitation.

I’m able to still use the 6th controller through DIN MIDI into one of the recognized controllers but the OP-1 is USB only so… no deal on that one unless unplugging one of the 5 recognized USB MIDI controllers.

Zynthian takes care of 90% of the sampler/synth output through the USB Audio interface

Channel 11 would be used to play the TE OP-1 which outputs its audio into the MOD-UI through the USB Audio interface’s IN.

Right now, if I want to plug a KeyStep PRO to play 4 of the MIDI Channels I have to physically unplug one of the controllers to “make room” in the Zynthian “USB MIDI space” :confused:

1 Like