Author Topic: XHCI and USB Audio perspectives  (Read 58927 times)

Mikhail

  • Newbie
  • *
  • Posts: 43
  • Karma: +3/-1
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #15 on: September 18, 2022, 06:38:19 pm »
Hi David,

I use the PM123 player to play audio over the DLNA protocol. The player has an OS2audio plugin that displays the properties and capabilities of the connected audio device. When trying to connect a UAC device to a USB3 port with an XHCI interface, the plugin shows that it seems to "see" the device, there are no errors, it even tries to start playback, but immediately stops.

I have very..  a heavily stripped-down version of OS2, which is downloaded over the network from a 16MB image, it simply lacks many system applications, such as USB and HW manager. There is not even a permanent hard drive or SSD in the system)

Before asking for help, I deployed the full distribution on the SSD, in order to make sure that my problem is not related to the config or the absence of some files, at the time of testing the standard version of USBaudio 244, the connected devices were not visible in PCIDOCK.

Regards,
Mikhail

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #16 on: September 19, 2022, 07:12:45 am »
May I add the following:

if a USB device is not seen at all under any USB resource manager, then this is not the fault of USBAUDIO.SYS or USBAUD2.SYS because these drivers have nothing to do with device detection. Rather the opposite: these drivers are called for any USB device that is detected and then, they check if they can handle the device or not. If they can handle it, they will then serve the device.

Since various USB resource manager variants (including the HW Explorer or my updated HW Manager) use the USBCALLS/USBRESMG combination to find and list USB devices, then it must be these components that do not properly work. By the way: you can also use the "lsusb.exe" application, provided by Paul. In that case, you also need the latest LIBUSB package which you can pull from netlabs or install via ANPM (it`s an RPM file). The advantage of "lsusb.exe" is that it will give you a very detailed view of the device descriptors (if you specify the -v switch) which will help in finding potential bugs in the USB audio drivers (I just found one two days ago when I realized that the logic to detect the unit that controls the volume would find the wrong unit for some devices like for example my audio 2.0 device ...).

Potentially, it can also be the USB base system (that is: USBD.SYS, USB(U|O|E|X)HCD.SYS) that could be faulty because USBRESMG.SYS relies on their proper operation. But if it were, it would be more likely that no USB devices are detected at all.
This is really odd.

EDIT: I just looked at Davids (Azarewicz) response to Davids (McKenna) AN ticket. He reports that a very fundamental "descriptor read" request does not work. In that case, there is nothing I could do. I am surprised that any USB audio device would fail that request because it is so fundamental, it renders the device useless. In that case there is either a bug in the USB base stack OR the device HW/FW is faulty/unreliable OR the device needs some "quirk" workaround because it has some expectation of how the "descriptor read" request is issued that is not mandated by the USB base specification.
« Last Edit: September 19, 2022, 07:57:17 am by Lars »

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #17 on: September 19, 2022, 07:14:07 am »
Hey Lars,

 Finally got my Behringer UMC202HD back from being borrowed and tried your test driver with the ArcaNoae 12.13 XHCI drivers (on a XHCI only system). Unfortunately, couldn't get any sound out of it, and MP3's don't even start to play. I'm willing to do some testing if you want...

Regards,

Hi David,

please always mention if it is an audio 1.0 device (USBAUDIO.SYS) or an audio 2.0 device (USBAUD2.SYS). Otherwise, it will be more difficult to tell what the failure cause is ...

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #18 on: September 19, 2022, 07:44:25 am »
Hey Lars,

 Finally got my Behringer UMC202HD back from being borrowed and tried your test driver with the ArcaNoae 12.13 XHCI drivers (on a XHCI only system). Unfortunately, couldn't get any sound out of it, and MP3's don't even start to play. I'm willing to do some testing if you want...

Regards,

Two questions/requests:
1) is that device also not detected with my USB stack ? Of course, you will need an EHCI controller to test (a XHCI only system does not work with my USB stack)

I could try and find a "quirk" workaround. David, it would be helpful if you could search the internet for problems with the UMC202HD device. Potentially you will find linux related bug reports. That might give me a clue as to how the workaround needs to look like (I have to ensure that I don`t break the detection logic for all other devices ...)

David McKenna

  • Hero Member
  • *****
  • Posts: 813
  • Karma: +25/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #19 on: September 19, 2022, 02:28:16 pm »
 Hi Lars,

 Thanks for your analysis! This device is supposedly USB audio 2.0 class compliant. It also supposedly works with Linux, although I found one report of it working intermittently until a kernel recompile, and another where it stopped working after a kernel upgrade, but mostly reports of it working with various Linux apps (I don't have a Linux install to test on). I can say it is correctly recognized on Windows, and works.

  I tried lsusb -v, but that failed to detect it too, ending with:

[C:\]lsusb -v > lsusb.txt
can't get debug descriptor: No such file or directory
can't get device qualifier: No such file or directory
can't get debug descriptor: No such file or directory
can't get device qualifier: Invalid argument
can't get debug descriptor: Invalid argument

 One of the reasons I got this device in the first place was that Wim Brul used a virtually identical device (UMC204HD - same with MIDI I/O added) to develop his audio recording app.

 I have a laptop with USB2 ports I'll give your drivers a try with later today... thanks again!

Regards,

Mikhail

  • Newbie
  • *
  • Posts: 43
  • Karma: +3/-1
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #20 on: September 19, 2022, 03:16:03 pm »
David, thank you for opening a ticket in AN.
To successfully promote the ticket, I suggest attaching a log from the configuration where the UAC2 device is connected to the USB2 ehci port of the controller. There it should correctly convey information about itself, which can lead David Azarevich to the right thoughts.
Now FUNDAMENTAL problems are being poked at the incompatibility of a specific UAC2 device, which of course is far from the truth.

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #21 on: September 19, 2022, 03:30:46 pm »
Hi Lars,

  I tried lsusb -v, but that failed to detect it too, ending with:

[C:\]lsusb -v > lsusb.txt
can't get debug descriptor: No such file or directory
can't get device qualifier: No such file or directory
can't get debug descriptor: No such file or directory
can't get device qualifier: Invalid argument
can't get debug descriptor: Invalid argument


Ok, that could be expected. lsusb.exe uses LIBUSB that in turn uses USBCALLS/USBRESMG. Since USBCALLS/USBRESMG fails, then LIBUSB and therefore lsusb.exe will also fail.

David McKenna

  • Hero Member
  • *****
  • Posts: 813
  • Karma: +25/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #22 on: September 19, 2022, 04:32:50 pm »
 Hey Guys,

 I did some more testing  - tried using a plug on the back of the computer instead of the one on the front (which is attached to the MoBo by a bunch of wires) and now the unit is detected in the hardware manager! Strange because the mouse/keyboard radio works fine on the front connectors. lsusb still shows the same errors though.

 But it still doesn't work - there is no sound when trying to play an MP3 with PM123 using the UAC2 interface. I tried Lars' test driver and the one from the 10.244 package, but same result - PM123 just hangs at 0:00 when trying to play.

  So I have an old laptop with both USB2 and USB3 ports. It has the AN 12.13 USB drivers installed. I installed the USB audio drivers from Lars' 10.244 and DLL's on it too. The Behringer unit is detected by the hardware manager on both ports and actually can play with sound using PM123 on the USB2 ports! But on the USB3 ports it just hangs at 0:00. So this Behringer device WILL work with OS/2 - i'll report this finding on the AN ticket.

Regards,

Mikhail

  • Newbie
  • *
  • Posts: 43
  • Karma: +3/-1
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #23 on: September 19, 2022, 06:47:14 pm »
Ugh.. Although I think David Azarevich's arguments are not correct *, try using an active USB hub with external power to connect your UAC2 device. This should eliminate doubts that the device does not have enough power from the port of your computer.

Anyway, we will pass the ball to the other side)

*In my case, UAC2 devices with external power are used, which do not use the USB power bus from the computer at all, so David's arguments are not clear to me.

David McKenna

  • Hero Member
  • *****
  • Posts: 813
  • Karma: +25/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #24 on: September 19, 2022, 06:58:13 pm »
 Hi Mikhail,

  Yes, I tried that - still doesn't get detected. So far it has only been detected on my desktop one time. On the laptop it is always detected. So I have an additional problem with detection on the desktop.

  For testing Lars' driver I will stay with the laptop since I know it can work there at least on the USB2 ports.

Regards,

David McKenna

  • Hero Member
  • *****
  • Posts: 813
  • Karma: +25/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #25 on: September 19, 2022, 09:05:21 pm »
 Hi All,

  Tried Lars' test driver posted above on my laptop, but it produces no sound thru either USB2 or USB3 ports. Back to the 10.244 version and it works again on USB2 ports only.

Regards,

Mikhail

  • Newbie
  • *
  • Posts: 43
  • Karma: +3/-1
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #26 on: September 20, 2022, 01:00:51 pm »
It seems your arguments have had an effect on David Azarewicz.
Now we need to understand how to trace a problem, how to get the missing data to finalize the driver in AN.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #27 on: September 20, 2022, 04:48:01 pm »
That bug seems to be non-public.

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile

Lars

  • Hero Member
  • *****
  • Posts: 1367
  • Karma: +70/-0
    • View Profile
Re: XHCI and USB Audio perspectives
« Reply #29 on: September 21, 2022, 12:35:43 am »
Try the attached, also with USB3. That attempts to fix what David calls "it doesn't work because of a defect in the audio class driver. This driver is apparently not compatible with USB3/XHCI".