MIDI class compliant driver not loaded ("device not supported") for Line6 Pod Go (and HX Stomp) USB devices.
Operating System
Others
Commit SHA
latest git pull on pico-sdk v 2.1.1
Board
RPi pico (RP2040) - pico-sdk 2.1.1 on vscode pico plugin
Firmware
when used in the midi2usbhost project (https://github.com/rppicomidi/midi2usbhost) simple MIDI devices like the Korg NanoKontrol2 are discovered correctly, but Line6 Pod Go is not discovered. usb descriptor and debug output from tinyUSB lib attached below.
What happened ?
when used in the midi2usbhost project (https://github.com/rppicomidi/midi2usbhost) simple MIDI devices like the Korg NanoKontrol2 are discovered correctly, but Line6 Pod Go is not discovered. usb descriptor and debug output from tinyUSB lib attached below.
This is the usb descriptor for the POD Go (dumped on a linux machine): podgo-descriptor.txt
This is the serial log output when debug level set to 2: line6podgo_log.txt
For comparison, this is the log from the same system when a Korg NanoKONTROL2 is plugged in: midi2usbhost_log_nanocontrol2.txt
How to reproduce ?
update vscode and pico-sdk plugin (to latest - 2.1.1) cd to .pico-sdk/sdk/2.1.1/lib/tinyusb run "git checkout master" then "git pull" to ensure tinyusb code is latest run "git clone --recurse-submodules https://github.com/rppicomidi/midi2usbhost.git" import midi2usbhost folder into vscode using the pico-sdk "import" function compile project flash project to pico board
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
Screenshots
No response
I have checked existing issues, dicussion and documentation
- [x] I confirm I have checked existing issues, dicussion and documentation.
When a device it supports both Audio Streaming and MIDI Streaming, the TinyUSB driver expect it to publish descriptors like this:
- Audio Control
- MIDI Streaming
- Audio Streaming Lines 225-228 of the TinyUSB MIDI Host driver stops parsing the descriptor if the the MIDI Streaming descriptor does not immediately follow the Audio Control descriptor.
The POD Go device descriptor attached to this issue publishes descriptors like this:
- Audio Control
- Audio Streaming
- MIDI Streaming That is the reason the code does not recognize the MIDI interface on the POD Go.
A solution to this issue can be found in the usb_midi_host driver's midih_open() function after the audio control interface is detected:
// This driver does not support audio streaming. However, if this is the audio control interface
// there might be a MIDI interface following it. Search through every descriptor until a MIDI
// interface is found or the end of the descriptor is found
while (len_parsed < max_len && (desc_itf->bInterfaceClass != TUSB_CLASS_AUDIO || desc_itf->bInterfaceSubClass != AUDIO_SUBCLASS_MIDI_STREAMING))
{
len_parsed += desc_itf->bLength;
p_desc = tu_desc_next(p_desc);
desc_itf = (tusb_desc_interface_t const *)p_desc;
}
That will skip over the Audio Streaming-related descriptors until it reaches the MIDI descriptor. Because there is no TinyUSB Host Audio Streaming driver, I prefer that solution.
@rppicomidi I miss that in previous PR, do you mind to make a new one. Thank you
@hathach I have sent a patch to @doughadfield to try. If it fixes the issue, then I will submit the patch as a pull request.
Sadly, @doughadfield's device did not enumerate for a different issue. However, I the pull request I submitted should fix compatibility with other guitar effects units that support full speed USB host devices.
re-opened (previously auto closed by github)