Author Topic: Question about USB Audio (Input / Output).  (Read 24292 times)

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #30 on: August 27, 2020, 06:14:01 pm »
I can play both files "applause.wav" and "dsk_opnw.wav" with my USB audio stick (Terratec Aureon Dual USB) without any need to convert those files.
Of course, you can convert files but the intention was to NOT force the user to muck around with his sound files.

Does "dsk_opnw.wav" not play at all, does it sound much too fast or does it have clicking issues ?
If clicking, see the other thread about shortcomings in the AN 12.x EHCI driver. If it sounds much too fast, that means that for whatever reason the sample rate conversion (in USBAUDIO.SYS) does not work.

What you can also do is to run "lsusb.exe" to dump the USB descriptors for your sound device. That would tell me what sample rates, bit depths and num of channels your USB audio device supports natively.


Lars

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #31 on: August 28, 2020, 12:10:35 am »
Hi Lars,

First, I want to thank you for making these drivers available.  It's great to have sound!

I restored the original wav files and connected the C-Media CM119 device I received today and all the wav files played without issue.  The CM6533 device was definitely the problem, likely due to being a synchronous device, as Wim pointed out. 

Using the CM6533, all the dsk_*.wav files would loudly hiss, with the intended sound being heard faintly in the background.

I have attached my lsusb output for the CM6533 device.


Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #32 on: August 28, 2020, 01:13:08 pm »
I had a look at the descriptor info for the CM6533.

It has a setup where it mixes microphone input (from the MIC jack of the device) and USB input to produce sound on the output.

My suspicion is that USBAUDIO.SYS does not do the necessary setup to the FEATURE and MIXER components (look at the descriptor info) to ONLY take USB input (and turn off MIC input) and route that to the sound output. The problem is that the "sound network" between inputs (be it MIC or USB) and outputs (be it SPEAKER or USB) is "universal" and the connections a bit difficult to parse and come up with a generic decision on how to set the FEATURE and MIXER components (maybe someone DOES want to mix MIC input and USB input to a common speaker output).
"Cheapo" devices usually have a very simple network: connect MIC input via FEATURE component to USB output, connect USB input via FEATURE component to speaker and that's what USBAUDIO.SYS (and USBAUD2.SYS) is aiming for.
(short note: a FEATURE component does things like mute on/off, setting volume, setting base, setting treble etc. Your device only allows for mute on/off and volume as most devices do).

If I find some time, I would be able to hack a REXX script to properly set the FEATURE and MIXER components to do the above. It might take some trial and error though, as the REXX interface (using USBCALLS.DLL and USBRESMG.SYS under the hoods) is a little difficult to use.

You would then at least be able to run the REXX script shortly after you plug in the USB device. The USB device itself will keep the settings until you detach it.

One way to check my suspicion would be to attach a MIC to the MIC jack and then see if the picked up sounds are being heard on the speaker while you are playing that WAV file. One the other hand, that would not explain why you can successfully play other WAV files without any probs ...
« Last Edit: August 28, 2020, 01:25:34 pm by Lars »

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #33 on: August 28, 2020, 07:03:02 pm »
Hi Lars,

Thank you very much for your help.

I think it would be better to spend your valuable time supporting more ubiquitous devices.  My bad luck for purchasing the one C-Media device that didn't work (I might use the CM6533 w. a Linux machine).  The other C-Media CM119 device is working beautifully with OS/2 and VMware passthrough.

<<One the other hand, that would not explain why you can successfully play other WAV files without any probs>>

Related to your observations, I think that lovely FEATURE is responsible for having my left channel often times disabled after booting into OS/2, providing sound only from my right channel.  I didn't experience this using Linux.  I did connect a microphone, but didn't hear it when playing a wav file.

My suggestion is for Martin to markup the device as not supported (or limited support).   If this is something you would like to support, I can test anything you send my way.

- Sean

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #34 on: September 04, 2020, 03:48:32 pm »
Can you please also attach the USB descriptor dump for the CM119 audio device ?

I want to check if there are additional differences to the CM6533 apart from the difference adaptive vs. synchronous isochronous data endpoints.

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #35 on: September 05, 2020, 01:22:04 am »
See attached for the CM119.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #36 on: September 06, 2020, 09:06:43 am »
Thanks.

I can see from the descriptor dump that your CM6553 device supports an optional interrupt endpoint in the "Audio Control" interface.
It is optional (HW implementer does not need to implement it and CM119 does not implement it either) and is meant to return back status if a setting has been applied (volume, etc.).
It looks like it is largely useless (as most devices do not have that interrupt endpoint) but potentially, if it IS existent, you might need to deal with it.
What is needed is to set up an interrrupt transfer and once that transfer returns (a status is returned), read the status info and issue a specific command on the control endpoint to acknowledge the status/do some action.

Currently this is just a wild guess but since you are saying that you DO hear the proper sound (albait accompanied by a loud hiss) then maybe these status interrupts need to be acknowledged to get the device to work properly.
I'll talk to Wim.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #37 on: September 06, 2020, 08:59:03 pm »
Hi Lars,

My suggestion is for Martin to markup the device as not supported (or limited support).   If this is something you would like to support, I can test anything you send my way.

- Sean

I have a test driver ready. Where can I send it to ?

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: Question about USB Audio (Input / Output).
« Reply #38 on: September 07, 2020, 01:05:24 am »
PM sent.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Question about USB Audio (Input / Output).
« Reply #39 on: December 27, 2020, 03:30:09 am »
Hi

Today I tested the "HP Gaming Headset H320GS".

Audio output is working, and recording also work (tested with DTAPE), even that it records the audio too fast (I sound like a chipmunk).

I have a question about Wim's Audio Recorder. I noticed on the readme that you need to run it like "record /a1 /b16 /c1 /f44100" (it works fine that way with my laptop internal mic), but how an USB mic should be tested with "Audio Recorder"?

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
Re: Question about USB Audio (Input / Output).
« Reply #40 on: December 27, 2020, 10:43:11 am »
Today I tested the "HP Gaming Headset H320GS".

Audio output is working, and recording also work (tested with DTAPE), even that it records the audio too fast (I sound like a chipmunk).

When using DTAPE for recording you need to set the correct Record Type before you open a new file. You have to do this only once anytime that you plug in a different usb audio device.
For the HP_Gaming_Headset_H320GS you may use PCM, 44100 Hz and 48000 Hz, 16 bits, Mono, Line in. See here for more information...

Quote
I have a question about Wim's Audio Recorder. I noticed on the readme that you need to run it like "record /a1 /b16 /c1 /f44100" (it works fine that way with my laptop internal mic), but how an USB mic should be tested with "Audio Recorder"?

Go to the Multimedia Setup and select the USB Adapter Wave tab.
When it shows Waveaudio02 device then use the /a2 argument.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4713
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: Question about USB Audio (Input / Output).
« Reply #41 on: December 27, 2020, 03:58:08 pm »
Thanks Wim, it is working now with your advice.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.