Open nodens opened 2 years ago
digging into it a bit, it seems channel names for UAC are hardcoded in desc-defs.c
?
iChannelNames is just an index to the string descriptor for that channel. bNrChannels
is the "number of logical channels in this cluster" it is not a list of different channels and their names that I can determine.
See 3.7.2.3 Audio Channel Cluster Format
in the USB Audio specification for more details about this (it can be found on the usb.org site), but I think lsusb is writing these out correctly.
I have a USB device here with 8 bNrChannels
and it shows this as:
bLength 17
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 10
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bCSourceID 4
bNrChannels 8
bmChannelConfig 0x000000ff
Front Left (FL)
Front Right (FR)
Front Center (FC)
Low Frequency Effects (LFE)
Back Left (BL)
Back Right (BR)
Front Left of Center (FLC)
Front Right of Center (FRC)
iChannelNames 0
but it does not have a string descriptor here. You should only have one per channel configuration like this. It's showing up for you as Output Left
which is correct, right?
What version of lsusb
are you using that doesn't show all the names?
Hi!
I use usbutils / lsusb 014 (from Debian unstable).
The problem is I see only one descriptor per output (first), instead of all the strings per channel, which would be useful to handle alsa configuration (use-case manager, etc).
So here I see Output Left
, which is one channel, but I'd like to know the 3 other channels are Output Right, Loopback Left, Loopback Right
.
I see no way to get this info with lsusb currently.
To get all the channel descriptors, I had to run a windows VM and dump the data there: Win10_DescriptorDump_MiniFuse_2.txt . complete lsusb -v for the same device (as root): lsusb_minifuse2.txt
Note: This windows dump shows the index of descriptor. With another tool (usblyzer, but it was a trial version and I can't export it anymore now), I saw it neatly organized per AudioControl descriptor.
Dumping the usb data under windows
Are you using USB Device Tree Viewer, which is actually on par with usbutils on windows?
Well, now I am, thanks for the hint! Here is the dump. Win10_usbdtreeviewDump_Minifuse_2.txt
Hi,
trying to implement an alsa UCM2 profile for my USB audio interface (Arturia Minifuse 2), I noticed that when using lsusb -v, I can only see the first channel description in iChannelNames attribute from a cluster.
e.g:
Dumping the usb data under windows, I see all the iChannelNames, there is one per channel (so 4 here). In this case, it should show
Output Left, Output Right, Loopback Left, Loopback Right
or something similar.I suppose the issue is only the first string descriptor (array[0]) is shown, where it should iterate on bNrChannels to get array[1-3] descriptors as well.
Sadly, I'm not fluent enough in C to see where in the code it could be fixed ;)
Thanks!