#94 closed defect (fixed)
USBAUD2 device works with USB2, not USB3
Reported by: | David McKenna | Owned by: | Lars Erdmann |
---|---|---|---|
Priority: | major | Component: | USBAUDIO |
Version: | 10.244 | Keywords: | |
Cc: |
Description ¶
I have a Behringer UMC202HD USBAudio 2.0 audio device that works with the USBAUD2.sys driver as long as it is attached to a USB2 port. When connected to a USB3 port, audio files will not play. This is with the 12.14 test drivers from ArcaNoae.
I will attach device descriptors from lsusb when attached to the USB2 and USB3 ports. Also testlogs from the system.
Change History (82)
by , 2 years ago
Attachment: | Behringer lsusb USB2.txt added |
---|
by , 2 years ago
Attachment: | Behringer lsusb USB3.txt added |
---|
by , 2 years ago
Attachment: | PAVILION-20220919-generic USB2.log added |
---|
by , 2 years ago
Attachment: | PAVILION-20220919-generic USB3.log added |
---|
comment:2 by , 2 years ago
Version: | 10.243 → 10.244 |
---|
comment:3 by , 2 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 2 years ago
OK, here is what I did:
- Add the lines:
TRACEBUF=2048 /M=W,Q,NODTI /D=ALL TRACE=ON 238
to CONFIG.SYS, reboot.
- Open the Trace Formatter tool, hit 'recapture buffer'.
- Insert the Behringer in the USB3 port
- Open PM123, try to play file, it hangs, wait a few seconds, close PM123.
- In Trace Formatter, hit 'recapture buffer'. A bunch of text appears.
- Hit 'Save Formatted...' in Trace Formatter tool, save as USB3-1.ftf.
I'll attach the file.
by , 2 years ago
Attachment: | USB3-1.ftf added |
---|
comment:5 by , 2 years ago
Don't know what happened to the format of the message - should have been:
TRACEBUF=2048 /M=W,Q,NODTI /D=ALL
TRACE=ON 238
Sorry....
comment:6 by , 2 years ago
Did you initially tried to play a WAV file with 22050 Hz, mono, 8 bit, but then, before that was finished, decided to play a WAV file with 48000 Hz, stereo, 16-bit ?
comment:7 by , 2 years ago
No, not with the UAC2 device. I did exactly as I described with a mp3 file only using PM123 set to use the UAC2 device (which works on a USB2 port). However, UniAud is the default audio device which plays system sounds so it probably played such a file while opening the folders to get to PM123.
comment:8 by , 2 years ago
Ok, I found where exactly the problem is and what the problem is. I just do not yet know how to fix it. What I could do is to hack around and see if that makes your device work with USB 3.
by , 2 years ago
Attachment: | usbaudio_SVN2357.zip added |
---|
tracing ISOOpen: status code, accepted framelength
comment:10 by , 2 years ago
My notes: 2 * EHCI: Intel, 1 * XHCI: NEC, on USB3 connector, device attaches to XHCI
by , 2 years ago
Attachment: | USB3-2.ftf added |
---|
comment:13 by , 2 years ago
David, the error now occurs at a sligthly different position. Since the device attachment Phase is missing from the Trace, can you Retake the trace with the trace started BEFORE you plug in the device ? I Need to see if anything About the device is maldetected.
by , 2 years ago
Attachment: | USB3-3.ftf added |
---|
comment:14 by , 2 years ago
OK, tried again making sure to start the trace formatter before plugging in the Behringer - USB3-3.ftf.
comment:15 by , 2 years ago
Thanks for that trace. If exactly gave me the info I needed in order to determine why it fails. I have requested an updated XHCI test driver from David that hopefully fixes the error. I´ll report back.
comment:16 by , 2 years ago
David Azarewicz has provided new test drivers, please download and try with USB3 (and with USB2, just to be sure):
https://repos.arcanoae.com/misc/USB-12.14-20220926-test.exe
Please provide trace as before (start tracing, plug in device, play a sound file)
by , 2 years ago
Attachment: | usbaudio_SVN2359.zip added |
---|
make "StartDevice" return with error on failed "USBSetInterface" in order to prevent stream from starting
comment:17 by , 2 years ago
Finally, update to usbaudio_SVN2359.zip and repeat the tracing process.
Do not forget to update TRC00EE.TFF before taking the trace.
With these update audio drivers, I have added some additional error catching that prevents the streaming from starting if something goes wrong. That should lead to a proper error return to the application and aborting the streaming instead of just hanging doing nothing.
comment:18 by , 2 years ago
Well, progress of sorts...
I downloaded and installed the new AN test 12.14 drivers (with SVN2357), then rebooted. Tried playing a file in PM123 with the USB3 port and this time it acted like it was playing - timer counted and EQ waveform displayed - but no sound. When I hit stop, the system trapped in USBXHCI in CPU01.
Decided to bypass this and go to the new SVN2359 driver, but got the same result.
This laptop has an i7 CPU with 4 cores and hyperthreading. CPU01 is a hyperthread core, so I decided to add /CPUMASK=85 to ACPI.PSD in CONFIG.SYS (I cannot turn off hyperthreading in BIOS). I will keep this setting from here on. Rebooted.
Now I captured a trace while playing a file in PM123 using the USB3 port - timer counted and EQ waveform displayed - but no sound. It did not trap when stopping - USB3-4.ftf.
Decided to try the USB2 port - it also 'played' but no sound, so got a trace - USB2-4.tft. No trap...
by , 2 years ago
comment:19 by , 2 years ago
Arggh! The files are way too big to upload, so I zipped them - UBB-4.zip. I let PM123 play for 15 seconds, then stopped each time.
comment:20 by , 2 years ago
are you sure you cranked up the volume far enough ? It is streaming properly. The volume looks like it is only turned up 50%. Try to change the volume back and forth. Do this with the main volume circular slider thingy (that´s the program that displays "Volume" in the titlebar). Also crank up the volume in PM123 itself.
As to the trap in USBXHCD: try to capture that again (taking a photo of the trap screen) and report that on the AN ticket.
As to ACPI: as a test, please try switch /MAXCPU=1. That will limit your system to one core. That´s the easiest test to do regarding hyperthreading.
comment:21 by , 2 years ago
Sorry for asking:
did you ever have any sound with USB2 with the last couple of driver versions that I posted ?
If not, did you ever have sound with USB with the 10.244 driver ?
Does the device have a hardware volume knob that is not cranked up ?
The only explanation I currently have is that the volume control does not work.
comment:22 by , 2 years ago
Also, do your trick as described in the os2world post and boot without the device plugged in, then plug in and try.
follow-up: 28 comment:23 by , 2 years ago
Hey Lars!
Thanks for the the nudge... I tried turning the volume all the way up in PM123 and on the Behringer unit, but got no sound. Then turned up the system volume control (which was at 50%) and when I got past 75% started to hear sound!
I did not need to do this with the 10.244 driver when attached to a USB2 port. I left the settings the same for every test after that. Other versions I may not have checked USB2 (since we are working on the USB3).
In any case it works!
follow-up: 27 comment:25 by , 2 years ago
I am also surprised the system volume is even in control, since UniAud is the default system device...
follow-up: 29 comment:26 by , 2 years ago
I apologize for the silence, despite the invitation to this thread ... The adventures with the volume sincerely pleased me, as I remembered that with the help of working on UAC2 on XMOS chips, there was exactly the same situation. The system volume was at 50% and there was no sound at all until it was increased to 70%. At the same time, devices on Atmel chips with Amanero firmware did not react to the system volume in any way. Maybe it makes sense to create a test function in the multimedia control panel with a button for playing audio samples at the maximum system volume.
Congratulations to all participants on overcoming another and very important obstacle.
Please tell me - where and how can I now get a working, fixed XHCI driver that won't turn into a pumpkin in 30 days?
comment:27 by , 2 years ago
Replying to David McKenna:
I am also surprised the system volume is even in control, since UniAud is the default system device...
I doubt that. If you use ArcaOs, they have a XWP plugin or such to automatically change the default system device when you plug in a USB audio device. I have released a similar app where you need to switch manually. In short: USBAUDIO or USBAUD2 *is* your default system sound device when you plug in a USB audio device.
comment:28 by , 2 years ago
Replying to David McKenna:
Hey Lars!
Thanks for the the nudge... I tried turning the volume all the way up in PM123 and on the Behringer unit, but got no sound. Then turned up the system volume control (which was at 50%) and when I got past 75% started to hear sound!
I did not need to do this with the 10.244 driver when attached to a USB2 port. I left the settings the same for every test after that. Other versions I may not have checked USB2 (since we are working on the USB3).
In any case it works!
If you say that volume control worked fine with the 10.244 driver, then I must have unintentionally broken something. I can go through some trial and error to find the problem, if you want.
I have a suspicion of what I broke but it definitely needs some trial and error.
follow-up: 30 comment:29 by , 2 years ago
Replying to zlmikhail:
I apologize for the silence, despite the invitation to this thread ... The adventures with the volume sincerely pleased me, as I remembered that with the help of working on UAC2 on XMOS chips, there was exactly the same situation. The system volume was at 50% and there was no sound at all until it was increased to 70%. At the same time, devices on Atmel chips with Amanero firmware did not react to the system volume in any way. Maybe it makes sense to create a test function in the multimedia control panel with a button for playing audio samples at the maximum system volume.
Congratulations to all participants on overcoming another and very important obstacle.
Please tell me - where and how can I now get a working, fixed XHCI driver that won't turn into a pumpkin in 30 days?
You will have to wait until AN finally rereleases the XHCI driver. If you are lucky, it will come with AN 5.1.
follow-up: 35 comment:30 by , 2 years ago
Replying to Lars Erdmann:
Replying to zlmikhail:
I apologize for the silence, despite the invitation to this thread ... The adventures with the volume sincerely pleased me, as I remembered that with the help of working on UAC2 on XMOS chips, there was exactly the same situation. The system volume was at 50% and there was no sound at all until it was increased to 70%. At the same time, devices on Atmel chips with Amanero firmware did not react to the system volume in any way. Maybe it makes sense to create a test function in the multimedia control panel with a button for playing audio samples at the maximum system volume.
Congratulations to all participants on overcoming another and very important obstacle.
Please tell me - where and how can I now get a working, fixed XHCI driver that won't turn into a pumpkin in 30 days?
You will have to wait until AN finally rereleases the XHCI driver. If you are lucky, it will come with AN 5.1.
As to "no working system volume at all": I found a bug in the USBAUD2.SYS driver that I have fixed in the meantime. The driver would errouneously identify the wrong feature unit if the device has more than one feature unit (the "feature unit" is the thingy that supports volume control).
Mikhail, did Wim Brul fix this "50% error" back at the time ?
comment:31 by , 2 years ago
David,
had the Sound Setting been working with the 10.244 Driver with USB2 ?
comment:33 by , 2 years ago
Lars,
Didn't know about the auto-switch default sound device when plugging in the USB device. I'll have to look in to disabling that - don't need to hear system sounds in high resolution :-)
comment:34 by , 2 years ago
And to clarify about the volume... with 10.244 I could hear sound with the system volume set at 50% and plugged into the USB2 port. With SVN 2359 I could not hear sound at 50%, even with PM123 and the Behringer turned all the way up - had to turn it up past 75%.
comment:35 by , 2 years ago
Replying to Lars Erdmann:
Replying to Lars Erdmann:
Replying to zlmikhail:
I apologize for the silence, despite the invitation to this thread ... The adventures with the volume sincerely pleased me, as I remembered that with the help of working on UAC2 on XMOS chips, there was exactly the same situation. The system volume was at 50% and there was no sound at all until it was increased to 70%. At the same time, devices on Atmel chips with Amanero firmware did not react to the system volume in any way. Maybe it makes sense to create a test function in the multimedia control panel with a button for playing audio samples at the maximum system volume.
Congratulations to all participants on overcoming another and very important obstacle.
Please tell me - where and how can I now get a working, fixed XHCI driver that won't turn into a pumpkin in 30 days?
You will have to wait until AN finally rereleases the XHCI driver. If you are lucky, it will come with AN 5.1.
As to "no working system volume at all": I found a bug in the USBAUD2.SYS driver that I have fixed in the meantime. The driver would errouneously identify the wrong feature unit if the device has more than one feature unit (the "feature unit" is the thingy that supports volume control).
Mikhail, did Wim Brul fix this "50% error" back at the time ?
I didn't often communicate with Wim Brul, mostly I just prepared traces, Sergey Glazunov communicated with him and apparently is communicating now.
I use cards with Amanero, they play to the full at any position of the system (master) volume level. Of course, I noticed that when installing the XMOS card, I have to climb into the control panel.
by , 2 years ago
Attachment: | usbaudio_SVN2360.zip added |
---|
modify "StartDevice" to first set alt setting to 0, then to set sampling freq on interface, then to set to operational altsetting
comment:36 by , 2 years ago
Hallo David,
try usbaudio_SVN2360.zip and see if that fixes the volume setting problem. Try with USB2 and USB3.
follow-up: 39 comment:37 by , 2 years ago
Lars,
With SVN2360 -
USB2: same as SVN2359 - no sound until system volume is at least at 75%
USB3: no sound, even when turned all the way up (although PM123 looks like it is playing). A lot of clicking noises when changing the volume.
by , 2 years ago
Attachment: | usbaudio_SVN2362.zip added |
---|
modify "StartDevice" to first set alt setting to 0, then to set sampling freq on interface, then to set to operational altsetting
comment:38 by , 2 years ago
I have now also updated the audio 1.0 driver (USBAUDIO) regarding fixing the volume setting problem. On my audio 1.0 device the change did not make a difference but I seem to remember that it did for other people.
comment:39 by , 2 years ago
Replying to David McKenna:
Lars,
With SVN2360 -
USB2: same as SVN2359 - no sound until system volume is at least at 75%
USB3: no sound, even when turned all the way up (although PM123 looks like it is playing). A lot of clicking noises when changing the volume.
But you only hear the clicking noises with USB3 but not with USB2, correct ? Because that is also my exprience with USB3. There is still something odd with the XHCI host controller driver. If so, can you raise a ticket at AN ? I cannot fix that.
by , 2 years ago
Attachment: | usbaudio_SVN2363.zip added |
---|
revert setting alt setting 0 first, then sampling, then operative alt setting, now back to setting operative alt setting, then sampling freq
by , 2 years ago
Attachment: | usbaudio_SVN2364.zip added |
---|
if there is a master control and per channel controls, only ever set the master control (which is also always available)
comment:42 by , 2 years ago
Lars,
SVN2364 is definitely better.. with this both USB2 and USB3 work the same - I start to hear sound when system volume is 50% and PM123 and the Behringer are turned up all the way. This is still not as loud as 10.244 was though.
comment:43 by , 2 years ago
That's good because it pointed me to the place in the code that needs a change.
I now have another idea of how I can crank up the volume for your device. That will hopefully help.
However, I am surprised that 10.244 gave you more volume, because it should have been as wrong as it is now.
Anyway, I don't know if I can make that Change tonight. Otherwise it will have to wait until Monday.
comment:44 by , 2 years ago
Lars,
Just FYI - I will be travelling next week starting Saturday, so will not be able to respond about this until the following week.
by , 2 years ago
Attachment: | usbaudio_SVN2365.zip added |
---|
set master channel to selected volume, but all logical channels to maximum volume
comment:45 by , 2 years ago
If you find the time, please try usbaudio_SVN2365.zip and do this time, take again trace (start BEFORE plugging in the device, plug in device, play soundfile, stop trace and save).
comment:46 by , 2 years ago
SVN2365 works the same as SVN2364 - both USB3 and USB2 work, but the system sound volume needs to be at least 50% with PM123 and the Behringer turned all the way up to hear anything.
I captured a trace on the USB3 port and will upload. Started the trace, plugged in the Behringer, started PM123, played a file, adjusted the system volume, stopped playing, then recaptured the buffer. USB3-5.zip
by , 2 years ago
Attachment: | USB3-5.zip added |
---|
comment:47 by , 2 years ago
I am really sorry but you have been playing for too long, the trace buffer wrapped and I am missing all the "start" information. Can you redo as requested and play only briefly or play and quickly open the tracefmt tool and save trace ?
by , 2 years ago
Attachment: | usb3-6.zip added |
---|
comment:49 by , 2 years ago
Thanks, that was ok.
Unfortunately, I don´t currently have a clue why the volume is so low. The driver does exactly what I want it to do. There must be some "undocumented" constraint of how to set up the volume control if it offers individual volume control per channel (my audio 2.0 device only has a master volume control).
I will have to ask Wim if he can remember of what needs to be done.
comment:50 by , 2 years ago
with usbaudio_SVN2367, I have now backed out a change. Can you retry and take trace ?
by , 2 years ago
Attachment: | usbaudio_SVN2368.zip added |
---|
release stream mutex in SetUnitControl because SetUnitControl is called (and blocks) when the stream mutex is held
comment:51 by , 2 years ago
if usbaudio_SVN2367 is "too jerky" when setting volume, try usbaudio_SVN2368. Also take trace so that I can compare the result.
comment:52 by , 2 years ago
Both SVN2367 and SVN2368 work on both USB2 and USB3 ports. They also both need to have system volume at or above 50% and PM123 and the Behringer turned all the way up.
When I change system volume on SVN2367, I get a bunch of clicking and stuttering before it settles down to the volume changed to. USB3-7.zip
SVN2368 changes volume smoothly and continuosly. USB3-8.zip
by , 2 years ago
Attachment: | USB3-7.zip added |
---|
by , 2 years ago
Attachment: | USB3-8.zip added |
---|
comment:53 by , 2 years ago
Another thing I tested - while I am playing a song on the Behringer using the UAC2 interface with PM123, I can hear system sounds thru the laptop speakers at the same time (but not the Behringer), so I do think UniAud is the default device even with the Behringer plugged in.
comment:54 by , 2 years ago
Your tests with SVN2367 and SVN2368 making no difference regarding the volume setting prove to me that I can safely remove the code that I had restored for building these two versions (in short: that code did not seem to make a difference).
The difference between SVN2367 and SVN2368 was also expected as you have described it.
I´ll have a look at the logs, then I will need to decide on how to continue.
By the way: have you ever compared sound between plugging the device into a USB2 and a USB3 port ?
For me it plays perfectly via a USB2 port but I have crackle when playing via the USB3 port. Is that the same for you ?
comment:55 by , 2 years ago
As to default device: looks like PM123 does not play through the default sound device but rather explicitely picks from the devices that are available via some GUI (which is actually a good thing).
So yes, I think you are seeing this correctly, the default device stays with UNIAUD.
comment:56 by , 2 years ago
Forgot: can you create a new ticket "Volume setting does not work properly with Behringer audio 2.0 device" and close this one ?
This ticket is getting too cluttered.
comment:57 by , 2 years ago
I haven't noticed any crackling when playing on USB3, but I'll pay closer attention now that you mention it.
I'll create a new ticket once I get back from my trip in about a week...
comment:58 by , 2 years ago
Just for the record, there are quite a few problems with UMC202HCD the Behringer device:
https://nandakumar.org/blog/2022/02/umc202hd-linux.html
https://forum.manjaro.org/t/behringer-umc202hd-problems-with-detection-and-choppy-audio/100883
https://www.reddit.com/r/linuxaudio/comments/sim11g/behringer_umc202hd_choppy_audio/
Much of that is about Linux but the answers gave me some ideas.
The described problems are not about volume setting but I am starting to get a suspicion of what hack I might need to introduce that will hopefully also have an effect on the volume setting.
We will continue this in your new ticket.
by , 2 years ago
Attachment: | usbaudio_SVN2371.zip added |
---|
checking for "Clock Valid" up to 10 times before sampling frequency is set
comment:59 by , 2 years ago
https://youtu.be/QmyVOwtXtJI
https://www.sweetwater.com/sweetcare/articles/behringer-audio-interface-setup-guide/
SW / firmware update: https://www.behringer.com/downloads.html
David, the Behringer offers firmware update via USB. If you have Windows, I`d go and install the latest drivers. My hope would be that that will also lead to a firmware update.
comment:60 by , 2 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
USB3 problem has now been fixed with the new XHCI Test driver from AN. Volume control problem is now continued in ticket #95.
This how you enable tracing for the USBAUD2.SYS driver. Add the following to config.sys and reboot.
TRACEBUF=2048 /M=W,Q,NODTI /D=ALL
TRACE=ON 238
Now you can open the "Trace Formatter" tool (tracefmt.exe). File->Recapture Buffer will read all traced data and format it into human readable format. The tool uses file "TRC00EE.TFF" that needs to be placed into the \OS2\SYSTEM\TRACE directory (make sure it is the most up-to-date version !)
Once you traced you need to save away a FORMATTED trace via File->Save Formatted... which will allow you to save the trace output into a text file.
When to take a trace ? I suggest that you do not yet insert the device but open the trace tool and do File->Recapture Buffer which will clear the trace buffer. Then, insert the audio 2.0 device into an "USB3" only port. After that, try to play a sound file. Finally, open the trace tool and again do a File->Recapture Buffer and save away the FORMATTED trace. Attach the text file here.