gregkh / usbutils

USB utilities for Linux, including lsusb
http://www.linux-usb.org
354 stars 199 forks source link

USB MIDI 2.0 Descriptors #154

Closed symdeb closed 1 year ago

symdeb commented 2 years ago

This is output from lsusb on Ubuntu 22.04.01. This is a prototype MIDI 2.0 (UMP) USB device using alternate setting 1 descriptors Descriptor type 37 subtype 2 is supposed to list bNumGrpTrmBlock but it shows MIDIJack. Reference: USB Device Class Definition for MIDI Devices, Version 2.0 p.42. Not sure where to post this. Only could find this github repo with libusb sources Have no reference to other devices as a comparison (no such devices seem to exist yet).

symdeb commented 2 years ago

MIDI_2_Alt_setting_1.txt

gregkh commented 2 years ago

This is the correct repo, yes.

I don't understand the problem here, what does the output show and what should it show exactly?

symdeb commented 2 years ago

This is what the tool reports:

    MIDIStreaming Endpoint Descriptor:
      bLength                 5
      bDescriptorType        37
      bDescriptorSubtype      2 (Invalid)
      bNumEmbMIDIJack         1
      baAssocJackID( 0)       1

This is what SubType2 per the USB specification should report:

https://www.usb.org/document-library/usb-class-definition-midi-devices-v20

Screenshot from 2022-08-25 19-54-36

gregkh commented 2 years ago

Thanks for the info, should now be fixed in the tree in commit f7cb6bcf153d ("lsusb: fix up Midi Device specification devices")

Can you pull the latest tree and build and test it to verify?

symdeb commented 2 years ago

git checkout f7cb6bc HEAD is now at f7cb6bc lsusb: fix up Midi Device specification devices The "invalid" message is gone but the field names are not updated : bNumEmbMIDIJack , baAssocJackID( 0)

symdeb commented 1 year ago

Posted a pull request for this.