Another followup. I made a little python tool to dump all string descriptors via pyusb - here is the code and the output for the device. No idea why lsusb hides string descriptors. https://gist.github.com/ensonic/00fa344a05c87093058a98a62893e3b4 I just dumped the first 100, since I haven't figured how to check for the number of strings provided by the device. In any case there aren't any useful strings beyond index=62, but the mixer.c code is accessing 82, 90. Will now figure how it gets that number. If there are ready made useful tools that I should use instead of writing them myself in python, please let me know. Thanks Stefan Am 22.06.19 um 23:17 schrieb Stefan Sauer: > Quick followup. Here is the lsusb -v output for the device: > https://gist.github.com/ensonic/2d286a85bbf4aca25e6f36b3569849c3 > > I noticed two warnings: > Warning: Junk at end of descriptor (17 bytes): > ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 00 > Could those be the cause? I don't now how to map the 'nameid' index to anything > in the lsub output though. > > Am 22.06.19 um 22:55 schrieb Stefan Sauer: >> Hi, >> >> when I run >> amixer -D hw:4 controls | sort -n -t = -k2 >> >> I get the output below >> >> numid=1,iface=MIXER,name='KKKKKKKKKKKKKÃÃÃÃÃÃÃÃÃÃÃ Switch' >> numid=2,iface=CARD,name='Internal Validity' >> numid=3,iface=CARD,name='S/PDIF Validity' >> numid=4,iface=CARD,name='ADAT Validity' >> numid=5,iface=MIXER,name='Scarlett 18i20 USB-Sync Clock Source' >> numid=6,iface=MIXER,name=' Switch' >> numid=7,iface=CARD,name='Keep Interface' >> numid=8,iface=MIXER,name='Master Playback Switch' >> numid=9,iface=MIXER,name='Master Playback Volume' >> numid=10,iface=MIXER,name='Master 1 (Monitor) Playback Switch' >> numid=11,iface=MIXER,name='Master 1 (Monitor) Playback Volume' >> ... lots of extra lines ... >> >> Please note the lines for numid=1 and numid=6. The first one contains some >> garbage and the 2nd one look like it should start with another word. >> >> I now added some debug printing here: >> https://github.com/torvalds/linux/blob/master/sound/usb/mixer_scarlett.c#L562 >> >> and get output in dmesg: >> [ 2971.642137] usb 1-2: Product: Scarlett 18i20 USB >> [ 2971.642141] usb 1-2: Manufacturer: Focusrite >> [ 2971.709773] new ctrl: name='Master Playback Switch', index=10, offset=1, >> num=0: numid=8 >> [ 2971.709781] new ctrl: name='Master Playback Volume', index=10, offset=2, >> num=0: numid=9 >> [ 2971.709788] new ctrl: name='Master 1 (Monitor) Playback Switch', index=10, >> offset=1, num=1: numid=10 >> >> So the first 8 controls are added somewhere else. Looks like this is from >> mixer.c and after >> echo -n 'file sound/usb/mixer.c +p' >/sys/kernel/debug/dynamic_debug/control >> I get >> [ 4405.855432] usb 1-2: [51] PU [KKKKKKKKKKKKKÃÃÃÃÃÃÃÃÃÃÃ Switch] ch = 1, val = 0/1 >> [ 4405.856423] usb 1-2: [52] PU [ Switch] ch = 1, val = 0/1 >> >> I now added more debug prints into >> https://github.com/torvalds/linux/blob/master/sound/usb/mixer.c#L2431 >> and its the code that calls snd_usb_copy_string_desc() >> [ 5750.124123] usb 1-2: nameid=90, len=35 >> [ 5750.124157] usb 1-2: [51] PU [KKKKKKKKKKKKKÃÃÃÃÃÃÃÃÃÃÃ Switch] ch = 1, val = 0/1 >> [ 5750.125241] usb 1-2: nameid=82, len=1 >> [ 5750.125260] usb 1-2: [52] PU [ Switch] ch = 1, val = 0/1 >> >> In both cases the returned len seems wrong and the function does not seems to >> copy any useful string here. snd_usb_copy_string_desc() is just a wrapper around >> usb_string(). >> >> Is my hardware returning bogus data in usb descriptors? Can this be address >> through some quirks table? Any other ideas? >> >> Thanks! >> Stefan >> _______________________________________________ >> Alsa-devel mailing list >> Alsa-devel@xxxxxxxxxxxxxxxx >> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel >> > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@xxxxxxxxxxxxxxxx > https://mailman.alsa-project.org/mailman/listinfo/alsa-devel > _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx https://mailman.alsa-project.org/mailman/listinfo/alsa-devel