#88 closed enhancement (fixed)
Add support for Class 2 audio devices
Reported by: | Lewis Rosenthal | Owned by: | |
---|---|---|---|
Priority: | major | Component: | USBAUDIO |
Version: | Keywords: | ||
Cc: |
Description
Related ticket in Arca Noae Mantis: 1586.
Opening this here and relating to that ticket, as you have been doing the real work on USB audio, Lars.
Reference material:
Computer Audiophile: This Just In: Microsoft Launches Native Class 2 USB Audio Support. Wait, What? (blog post)
XMOS: Why do you need USB Audio Class 2? (whitepaper)
YouTube: USB Audio Part 2: Class 1 and Class 2 USB Audio (video) Cambridge Audio 4:37 talk about how their DAC switches modes and the differences in quality between Class 1 and Class 2 USB audio
Attachments (28)
Change History (59)
by , 7 years ago
Attachment: | infoSingxer.txt added |
---|
by , 7 years ago
Attachment: | infoEDEL.txt added |
---|
comment:2 by , 7 years ago
Please run "aud1info.cmd" script against any USB audio 1.0 devices you have and attach screen output.
Please run "aud2info.cmd" script against any USB audio 2.0 devices you have and attach screen output.
These scripts will only require base USB support, including USBRESMG.SYS and USBCALLS.DLL.
Therefore they will work without any USB audio support.
You invoke the script for a dedicated device like this:
aud1info / aud2info VendorIDinHEX ProductIDinHEX
aud1info ccd 77
You find vendor ID and product ID at the very beginning of the "lsusb.exe" output that you have already attached for 2 usb audio 2.0 devices.
by , 7 years ago
Attachment: | EDEL_UAC2.0.txt added |
---|
The data collection process hangs on any UAC 2.0 device
comment:3 by , 7 years ago
1) UAC1: unfortunately, for the EDEL the output aborted prematurely as it gives an error on querying the sample freqs. What you would need to do is unplug and plug back in the device until the script no longer reports and error. You can also try and increase the command timeout in lines 235,244,423. It's currently set to "500" (ms), you could try and increase that to "1000" (ms).
2) UAC2: unfortunately I have no USB audio 2.0 device and therefore could not test the script. What you could to is modify the script and remove the "trace o" statement at the beginning. If you then give me output I will be able to fix the script because an error message should pop up which indicates which line is failing. Are you sure that for this case you have been running "aud2info.cmd" ?
comment:4 by , 7 years ago
Can you retry with fixed aud2info.cmd script for the UAC 2.0 device ? If still not, just remove "trace o" and give me screen output. Thanks.
by , 7 years ago
Attachment: | EDEL_UAC2.txt added |
---|
The script runs without error, but the output is clearly not enough.
comment:5 by , 7 years ago
When I tried to fix the script for UAC 1.0, I tried to increase the timeout for each line, and even to very large values, but the result does not change.
In fact, the script completes the work in a second, with a timeout of 3-4 seconds, it seems to me, it's not that the query does not have time to work.
comment:6 by , 7 years ago
1) UAC 1.0: for some reason the device stalls when it should return data. I am out of ideas because the same script works for both of my USB audio 1.0 devices. The only thing you can do is try to detach and reattach the device and rerun the script. If you set the timeout values to "-1" the script should block until the command returns. Maybe you can try that.
2) Ok, try aud2info.cmd and remove "trace o" at beginning of script. Sorry but unless someone gets me a USB audio 2.0 device I cannot be sure the script works ok. Have to fly blind ...
by , 7 years ago
Attachment: | EDEL_UAC1.txt added |
---|
There are no errors in the log, but somehow it is not complete. Or I'm wrong. I tried and disabled the trace, and disabled the timeout. The query is still executed in a second and the result does not change.
by , 7 years ago
Attachment: | EDEL_UAC2.2.txt added |
---|
Again - There are no errors in the log, but somehow it is not complete. Or I'm wrong.
comment:8 by , 7 years ago
I found two more devices with UAC1 support and with them there are problems: the devices do not play sound, and they are not correctly polled by your script.
- Sound Blaster Arena Surround USB Gaming Headset
- Sennheiser MOMENTUM 2.0 Wireless Black (M2 AEBT) (in USB DAC mode)
by , 7 years ago
Attachment: | SenMom_UAC1.txt added |
---|
by , 7 years ago
Attachment: | Creative_UAC1.txt added |
---|
comment:9 by , 7 years ago
1) I updated aud1info.cmd again. Sorry but there are many different devices around ...
2) the Sennheiser Momentum lists NO audio descriptors in its configuration descriptor, it only has a HID interface (output from lsusb). Why do you think it has an audio function ?
3) for the Creative I need to have a closer look
by , 7 years ago
Attachment: | EDEL_UAC1.2.txt added |
---|
Still a mistake, but now it's clear that it's in line 246.
by , 7 years ago
Attachment: | EDEL_UAC2.3.txt added |
---|
Still a mistake, but now it's clear that it's in line 186.
comment:10 by , 7 years ago
1) there is a problem with the EDEL device running in UAC 1.0. This is not a script error.
As a test you could back up files \OS2\DLL\USBCALLS.DLL and \OS2\BOOT\USBRESMG.SYS and replace with the files from my USB package:
http://hobbes.nmsu.edu/h-search.php?sh=1&button=Search&key=usbdrv220&stype=all&sort=type_name&dir=%2F[[BR]]
Then redo the test and see if it is any better. But I have little hope ...
You need to do a "unlock \os2\dll\usbcalls.dll" before you can attempt to overwrite it.
2) fixed the syntax error in aud2info.cmd. On to the next try (and error) ...
by , 7 years ago
Attachment: | Capture.JPG added |
---|
:-/ nop, All the same, despite the replacement of all USB drivers for the latest version. By the way the basic USBAUDIO I have been installed since the release.
follow-up: 12 comment:11 by , 7 years ago
1) Please rerun "aud2info.cmd" against the "EDEL" device (in audio 2.0 mode). I hope to have fixed the remaining script problem ...
2) Please run "lsusb.exe" against the EDEL device when it is in audio 1.0 mode
3) Please rerun "aud1info.cmd" against the "Creative Soundblaster Arena Headset" device
4) Please try the "Creative Soundblaster Arena Headset" device with the following formats:
a) 44100 Hz, stereo, 16-bit
b) 48000 Hz, stereo, 16-bit
c) 44100 Hz, stereo, 24-bit
d) 48000 Hz, stereo, 24-bit
Let me know which of these formats generate sound. There should be freely available WAV files on the internet. If not you might need to download a sample-rate/bitsize conversion tool to generate sound files with these formats.
follow-up: 13 comment:12 by , 7 years ago
Replying to erdmann:
1) Please rerun "aud2info.cmd" against the "EDEL" device (in audio 2.0 mode). I hope to have fixed the remaining script problem ...
2) Please run "lsusb.exe" against the EDEL device when it is in audio 1.0 mode
3) Please rerun "aud1info.cmd" against the "Creative Soundblaster Arena Headset" device
4) Please try the "Creative Soundblaster Arena Headset" device with the following formats:
a) 44100 Hz, stereo, 16-bit
b) 48000 Hz, stereo, 16-bit
c) 44100 Hz, stereo, 24-bit
d) 48000 Hz, stereo, 24-bit
In all these formats, playback starts, but there is no sound. All other formats cause an error.
Let me know which of these formats generate sound. There should be freely available WAV files on the internet. If not you might need to download a sample-rate/bitsize conversion tool to generate sound files with these formats.
Thank you. I will create a link for downloading test samples in all available PCM formats.
by , 7 years ago
Attachment: | lsusb_EDEL_UAC1.txt added |
---|
follow-up: 15 comment:13 by , 7 years ago
Replying to zlmikhail:
Replying to erdmann:
1) Please rerun "aud2info.cmd" against the "EDEL" device (in audio 2.0 mode). I hope to have fixed the remaining script problem ...
2) Please run "lsusb.exe" against the EDEL device when it is in audio 1.0 mode
3) Please rerun "aud1info.cmd" against the "Creative Soundblaster Arena Headset" device
4) Please try the "Creative Soundblaster Arena Headset" device with the following formats:
a) 44100 Hz, stereo, 16-bit
b) 48000 Hz, stereo, 16-bit
c) 44100 Hz, stereo, 24-bit
d) 48000 Hz, stereo, 24-bit
In all these formats, playback starts, but there is no sound. All other formats cause an error.
Let me know which of these formats generate sound. There should be freely available WAV files on the internet. If not you might need to download a sample-rate/bitsize conversion tool to generate sound files with these formats.
Thank you. I will create a link for downloading test samples in all available PCM formats.
1) please attach your MMPM2.INI (in \MMOS2 subdirectory).
2) are your sure that you have USBAUDIO.SYS only listed once in CONFIG.SYS (as DEVICE=C:\MMOS2\USBAUDIO.SYS), that it is located at the correct place (\MMOS2 subdir) and that it is the USBAUDIO.SYS from my stack ?
In order to properly update MMPM2.INI, you need to install USBAUDIO.SYS as described in the readme in my USB package. If everything is correct, have you ensured that the master volume is set to > 0 (there is a master volume control application "volume.exe") ?
comment:14 by , 7 years ago
As to problems with successfully running aud1info.cmd against Creative and EDEL UAC 1.0:
in the meantime I found out that querying the settable range (GET_MIN,GET_MAX,GET_RES) for sampling rate is not supported by all devices, some only support of querying the currently selected sample rate and setting it: see http://www.cypress.com/file/220366/download on page 81
I will try and find a workaround and update the script correspondingly. In general we need a generic solution for this problem as there is always the need to set the device's sampling rate to the sample rate of the sound source. In order to do so, we will need to know what range the device supports (or go with trial and error).
by , 7 years ago
comment:15 by , 7 years ago
Replying to erdmann:
Replying to zlmikhail:
Replying to erdmann:
1) Please rerun "aud2info.cmd" against the "EDEL" device (in audio 2.0 mode). I hope to have fixed the remaining script problem ...
2) Please run "lsusb.exe" against the EDEL device when it is in audio 1.0 mode
3) Please rerun "aud1info.cmd" against the "Creative Soundblaster Arena Headset" device
4) Please try the "Creative Soundblaster Arena Headset" device with the following formats:
a) 44100 Hz, stereo, 16-bit
b) 48000 Hz, stereo, 16-bit
c) 44100 Hz, stereo, 24-bit
d) 48000 Hz, stereo, 24-bit
In all these formats, playback starts, but there is no sound. All other formats cause an error.
Let me know which of these formats generate sound. There should be freely available WAV files on the internet. If not you might need to download a sample-rate/bitsize conversion tool to generate sound files with these formats.
Thank you. I will create a link for downloading test samples in all available PCM formats.
1) please attach your MMPM2.INI (in \MMOS2 subdirectory).
Attached
2) are your sure that you have USBAUDIO.SYS only listed once in CONFIG.SYS (as DEVICE=C:\MMOS2\USBAUDIO.SYS), that it is located at the correct place (\MMOS2 subdir) and that it is the USBAUDIO.SYS from my stack ?
More than sure. Installation took place through MINSTALL, for the USBAUDIO folder and USBWAV, then unlocked and replaced with USBcalls, all other files are simply replaced in the corresponding folders.
In order to properly update MMPM2.INI, you need to install USBAUDIO.SYS as described in the readme in my USB package. If everything is correct, have you ensured that the master volume is set to > 0 (there is a master volume control application "volume.exe") ?
The volume is set to 100%, and in the player and in Volume.exe
follow-up: 19 comment:17 by , 7 years ago
Yes, your setup is ok. For the time being, I suggest to remove the USBWAV installation (IOPROC as well as CODEC installation) and retry and see if that matters. If not, then your device fails in setting the volume (need to find out why).
follow-up: 20 comment:18 by , 7 years ago
Replying to zlmikhail:
Maybe this manual will be interesting to you?
Yes, it is helpful, in a way. What I found out is that there are devices that definitely do not allow to query their min/max/resolution sampling rate in which case we have to fall back to what the fixed configuration tells us what we can use. What the XMOS spec tells me is that the range goes from 44100 Hz to 192000 Hz in discrete frequency steps for the sampling rate (if the Firmware developer uses the defaults). But as I said, that cannot be queried from the device. It is hardcoded into the Firmware. Yuck. We will have to live with that.
comment:19 by , 7 years ago
Replying to erdmann:
Yes, your setup is ok. For the time being, I suggest to remove the USBWAV installation (IOPROC as well as CODEC installation) and retry and see if that matters. If not, then your device fails in setting the volume (need to find out why).
What exactly device with the problem of volume control we say: EDEL or Creative Arena?
EDEL is essentially a pure USBAUDIO converter with digital outputs: SPDif, i2S
https://www.engineered.ch/app/download/12914918422/U2S192-DS-105E.pdf?t=1452249519
I doubt that in such a digital interface there is a need for volume control, since this affects the quality of the output signal.
Creative Arena - a budget headset whose volume is regulated by hardware (in any case, the buttons for this are)
I tried to remove the codecs, it did not change anything.
For Creative Arena, the reason for silence, I think, is not properly configured mapping audio channels in the mixer.
comment:20 by , 7 years ago
Replying to erdmann:
Replying to zlmikhail:
Maybe this manual will be interesting to you?
Yes, it is helpful, in a way. What I found out is that there are devices that definitely do not allow to query their min/max/resolution sampling rate in which case we have to fall back to what the fixed configuration tells us what we can use. What the XMOS spec tells me is that the range goes from 44100 Hz to 192000 Hz in discrete frequency steps for the sampling rate (if the Firmware developer uses the defaults). But as I said, that cannot be queried from the device. It is hardcoded into the Firmware. Yuck. We will have to live with that.
If the original file format coincides with the standard sampling frequencies (for UAC 2.0 devices), I think the driver has the right to initialize the device and send such signal to the device without figuring out its real capabilities, in any case, at the stage of the initialization attempt, you can process the failure or error and report it user, without crashing the system.
comment:21 by , 7 years ago
New scripts have not brought any changes, the logs are completely identical with the previous ones. Of course, if necessary, I can upload them.
comment:22 by , 7 years ago
1) the scripts would fail under certain circumstances. If nothing changed, no need to reupload the output
2) The Creative has a FEATURE UNIT just like any USB audio device. That can be programmed for volume (etc.) so that you can control volume via SW. That should work even if you have HW controls. I even think the HW controls will eventually program the same HW in the device to set the volume.
3) I have a device that reports back that it can handle 8000 Hz to 48000 Hz in steps of 100 Hz. But the feature selector says it should only do 44100 Hz or 48000 Hz. That's obviously a bad choice if you have a "legacy" sound file with 8000 Hz. That was the motivation to use the real capabilities. But by now I have given up on that thought for known reasons.
comment:23 by , 7 years ago
I have prepared an update of USBAUDIO.SYS to support tracing:
1) add this to your config.sys and reboot:
TRACEBUF=1024 /M=W,NQ,NODTI /D=ALL TRACE=ON 238
2) unzip audio.zip directly into the root. It will overwrite \MMOS2\USBAUDIO.SY? and \OS2\SYSTEM\TRACE\TRC00EE.TFF
3) boot without the "Creative" device attached. Once you have booted up, attach device, change the volume with "volume.exe" and try to play a WAV file.
4) open up "tracefmt.exe" (the trace tool). Select "File->Save Formatted" (make sure you select "formatted" and not "unformatted"), choose a filename and save file
5) attach the saved file here.
I can then check if the min and max volume values are correctly queried from the device and if setting the volume within these bounds works ok.
comment:24 by , 7 years ago
By the way:if you plug in this "Creative" headset, can you hear to what you speak ? Looks like the device is capable of mixing USB input with microphone input to output it to the earphones.
Maybe the mixer only puts microphone input to the earphones as a default. Then it might be necessary to program the MIXING UNIT to choose the USB input instead.
by , 7 years ago
Attachment: | aud1info.cmd added |
---|
display notification if device does not allow min/max/res query of samp. freq
follow-up: 26 comment:25 by , 7 years ago
Creative.FTF https://QNOVA.myqnapcloud.com/share.cgi?ssid=071v52d
In my opinion, files with a low sampling rate that do not support the interface can undoubtedly be converted to the nearest suitable format on the fly. Quality :-) does not suffer from this.
by , 7 years ago
Attachment: | EDEL_UAC1.3.txt added |
---|
by , 7 years ago
Attachment: | Creative_UAC1.3.txt added |
---|
by , 7 years ago
Attachment: | Singxer.txt added |
---|
follow-up: 27 comment:26 by , 7 years ago
Replying to zlmikhail:
Creative.FTF https://QNOVA.myqnapcloud.com/share.cgi?ssid=071v52d
In my opinion, files with a low sampling rate that do not support the interface can undoubtedly be converted to the nearest suitable format on the fly. Quality :-) does not suffer from this.
Thanks for the trace. Ok, I looked at the trace. Your device does not support querying min and max volume as I would expect. Without knowing what the min and max values are, setting the volume will fail (as I need to scale the 0-100% volume setting to these min and max values). I'll try to do it differently. I'll try and come up with a script so that this can be done as a test without changing the driver for the time being.
comment:27 by , 7 years ago
Replying to erdmann:
Replying to zlmikhail:
Creative.FTF https://QNOVA.myqnapcloud.com/share.cgi?ssid=071v52d
In my opinion, files with a low sampling rate that do not support the interface can undoubtedly be converted to the nearest suitable format on the fly. Quality :-) does not suffer from this.
Thanks for the trace. Ok, I looked at the trace. Your device does not support querying min and max volume as I would expect. Without knowing what the min and max values are, setting the volume will fail (as I need to scale the 0-100% volume setting to these min and max values). I'll try to do it differently. I'll try and come up with a script so that this can be done as a test without changing the driver for the time being.
Thank you. Just ask not to focus on the problems with the Creative Arena, this device I got from a dusty box :-) in order that the test results would be more representative. I do not use this device and most likely if it works under OS/2 I'll give it to someone who needs it.
The main idea is to understand what prevents to create a relatively universal and very basic driver for the UAC 2.0 devices.
comment:28 by , 7 years ago
1) please run script to test SB Headset volume querying and set
2) the problem that a great many devices do not support the commands where the spec seems to imply they should be mandatory will also be true for UAC 2.0 devices
3) if I find shortcomings in the UAC 1.0 driver, I would like to fix them
Also I need some practice in using REXX for testing USB devices. That will greatly simplify these kind of tests.
by , 7 years ago
Attachment: | SB_vol.txt added |
---|
comment:29 by , 7 years ago
- The log in the attachment.
- In connection with such a variety of devices UAC 2.0, as it was possible for linux to create one universal driver that works with all devices. Apparently there is some secret (set of commands for processing standard events from the API), I just guess, maybe I'm wrong.
- I will be glad to help in any of your experiments, I hope my skills in testing will be enough. Now there is the main thing - the desire to make ArcaOS better.
by , 7 years ago
Attachment: | SB_vol.2.txt added |
---|
comment:30 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
A working USB audio 2.0 driver will be released with version 10.225 of the USB driver package.
Singxer SU-1 USB digital interface with XMOS XU208
http://www.singxer.com/pd.jsp?id=19
https://www.shenzhenaudio.com/singxer-su-1-usb-digital-interface-with-xmos-xu208-cpld-dsd256-dop.html
Specifications:
Each output interface supports sampling rates:
PCM: 44.1KHz, 48KHz, 88.2KHz, 96KHz, 176.4KHz, 192KHz, 352.8KHz, 384KHz (I2S support all sampling rate,S/PDIF support upper to 192KHz
DSD: 2.8 MHz (DSD64)-DoP, native 5.6 MHz (DSD128)-DoP, native 11.2 MHz (DSD256)-native (I2S output support all DSD,S/PDIF,AES/EBU support DSD64 DOP mode)
Bits width: the highest 32 bit over I2S output The highest 24 bit over S/PDIF
engineered SA U2S192 "EDEL" with XMOS XS1-L1
https://www.engineered.ch/products/usb-interface/#cc-m-product-12915291522
Specifications in UAC 2.0:
PCM
resolution: 16bit - 32bit sample rate: 32kHz - 384kHz dynamic range 32bit
DSD
sample rate: 2.8224MHz - 5.6448MHz
But, it should be noted that 95% of all audio material is recorded in 16bit format 44.1kHz and it is unlikely that there will be any changes in the near future. Another thing now increasingly began to appear audio tracks to the video, although they are in a format compressed with loss, but they have high resolution and sampling up to 192kHz