On Tue, 27 Feb 2024 at 20:45, Alexander Tsoy alexander@tsoy.me wrote:
В Пн, 26/02/2024 в 13:05 +0000, Ian Malone пишет:
Hi,
In short I have a USB to 3.5mm adapter which seems not to work in duplex mode on USB2.0 systems, possibly due to a bandwidth calculation bug.
This is an evolution of an issue I previously posted on the users list with no luck. I have an Anker USB-C to 3.5mm audio dongle (lsusb: Conexant Systems (Rockwell), Inc. Hi-Res Audio) which I've used for some time on my phone (Android with USB-3.2). On trying to use it with an older T420 laptop recently with only USB-2.0 ports I discovered it will not work in duplex mode. Input-only and output-only profiles work (tested recording and playback with audacity), but with duplex no sound is recorded (Fedora 39, pipewire). This is easily reproduced by looking at the pavucontrol volume monitor for Output Devices, if I switch the device to Analog or Digital Input in configuration then the Input Devices level monitor for it shows activity if I speak into or tap the microphone. With duplex selected there is no activity, the level monitor bar may or may not display. I can switch between the two behaviours by changing the profile. Various applications such as Audacity and Zoom appear to hang when accessing this microphone with the duplex profile set. I've used pipewire configuration to force the format to 16LE only (playback and recording), but this has not helped.
In dmesg this error appears when this happens (microphone opened, for example by pavucontrol): [ 294.825544] usb 1-1.1: cannot submit urb 0, error -28: not enough bandwidth (T420, Fedora 39, kernel 6.7.5)
Sorry, I somehow misread the first part of an email and was under impression that the problem is only with xhci host controller. Here I can only add that I have a system with the same "6 Series/C200 Series" chipset where I cannot reproduce this issue. But my full-speed card has a lower wMaxPacketSize.
Yes, a brief summary would on EHCI this device doesn't work in duplex while XHCI works but moans a bit in the log, the same EHCI hardware works in duplex on Win7.
I've got another adaptor (KTMicro/KT USB Audio, vendor "Huawei Technologies Co., Ltd") which on the Legion 5 Pro USB 3.0 side ports doesn't cause the same complaining that the Synaptics/Hi-Res Audio/Conexant Systems (Rockwell) device (not had a chance to test it on the T420 yet as it sits in the office). The KTMicro device has similar playback, but mono input with only 16LE format, wMaxPacketSize 0x0060 1x 96 bytes, while the Synaptics has 24 bit stereo, and wMaxPacketSize sizes 0x00c0 1x 192 bytes and 0x0120 1x 288 bytes in the input descriptors (and a 0x0300 1x 768 bytes output descriptor).
Best filed as a bug in the driver? (The Tab A/SM-T510 may be a blind alley, although it is supposed to be USB2.0 I've been able to dump the logs and its using an XHCI controller.)