[wdmaudiodev] Re: Vista: Input Volume x4 gain on microphone

  • From: Keith Larson <klarsondsp@xxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 22 Aug 2008 12:19:27 -0400

Hi Sam

Thanks for the tip, but I already have the 'master volume mixer' functions built into a DLL. I will then call the DLL only if Vista is detected keeping functionality back through Win98se. My problem (and only in Vista) is making sure the device I detect while searching Wave devices is the same as by searching endpoints.

I am also hoping to find ways around the 'reprocessing' of raw data. This is very problematic with regards to any measurement device.

Best regards,
Keith

Sam Tertzakian wrote:
Hi,
One possible avenue you might investigate is to write a WDM Filter Driver
that would sit over (upper filter) the instance of USB Audio device driver
that is installed to support your device. In this way you can modify the
requests that go to the USB driver and the information that is returned from
the USB driver. I think you could lock or effectively disable the gain this
way...as for the DSP processing, I am not sure. There might be a way for a
filter driver to send a command to the USB audio driver to disable such
processing...but I am not sure.
This solution would be compatible across 2000/xp/vista.
There are possibly other solutions that depend on some sort of USB Audio
driver vendor specific support but I am not sure. You would have to look at
the USB Audio class driver specification for such information.
I am sure others will have ideas, but perhaps this is an avenue you might
investigate.

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Keith Larson
Sent: Thursday, August 21, 2008 9:36 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Vista: Input Volume x4 gain on microphone

Hi All

This is the first time visiting this wdmaudiodev, and I have three questions. Being a newbie, let me begin with a kind 'Hello'.

I am here because I am working with a measurement device and the new Vista audio interface is, well, variable. After a lot of mucking around, I am closing on a solution that will lock the input and output levels. This is a kludge, but at least it works. There are however remaining snags.

USB Audio Codec -> Classified as microphone ->  gain of x4 (+12db) applied
--------------------------------------------------------------------------
The device I am using is a fairly simple 2 channel in, 2 channel out ADC/DAC. I can deal with the OS classifying the input as a 'microphone', but more importantly it seems that the default action is to multiply the raw input stream by 4 (+12db gain). I can clearly see this when I set the application and master volume to 100%. The input is exactly 4x the expected value. Low signal level values are wrong, and if the signal is large, the data is clipped.

If I set the master volume to 25% and application to 100%, things are ok (but maybe not if reversed), but this also means I need to lock the gain values. The issue now whether or not the x4 microphone gain ever changes in the future. It would be *far* better if I did not have to deal with the variable gain.

DSP processing routines
-----------------------
This time it is the output side. The DSP routines modify the outputs. Again, this is NOT desirable for a measurement system.

Enumerating End Point and Wave Devices
--------------------------------------
My code uses the 'Wavexxx' interface and as such I can get a handle, or an enumerated value. I can also get an enumerated listing of the 'end point' audio devices. As expected, these enumerations do not match (an endpoint can have multiple WAVE connections), so a direct matching is out. Luckily(?) the identifying strings, eg "USB Audio Codec' *SEEM* to match. That is, I am looking for something a bit more definitive.

Suggestion
----------
Would there be a way to effectively achieve this for (both input and output) in some future release of Vista?

[X] Lock master volume at 100% *and* bypass DSP processing
       (This endpoint is for a measurement device)

Best regards,
Keith

PS: My code is and needs to be compatible with all Windows platforms.


******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/


******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/



******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: