[wdmaudiodev] Re: USB Audio - INF - installing custom APOs

  • From: KS <wakeup1504@xxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sun, 2 Aug 2009 11:12:53 +0800

Hi,

 

Is it possible to use 2 different APOs for the same endpoint type? For eg,
if I have 2 mic endpoints, but I only want a particular APO to be loaded for
mic 1, and another different APO (or no APO) to be loaded for mic 2, how do
I define this? Thanks.

 

KS

 

  _____  

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Frank Yerrace
Sent: Wednesday, June 10, 2009 5:39 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: USB Audio - INF - installing custom APOs

 

Rather than the approach you are taking, the relevant INF section that you
should look at is this:

 

; System Effects settings

[USBAudio.SysFx.Render]

HKR,"FX\\0",%PKEY_ItemNameDisplay%,,%FX_FriendlyName%

HKR,"FX\\0",%PKEY_FX_PreMixClsid%,,%FX_PREMIX_CLSID%

HKR,"FX\\0",%PKEY_FX_PostMixClsid%,,%FX_POSTMIX_CLSID%

HKR,"FX\\0",%PKEY_FX_UiClsid%,,%FX_UI_CLSID%

HKR,"FX\\0",%PKEY_FX_Association%,,%KSNODETYPE_SPEAKER%

 

HKR,"FX\\1",%PKEY_ItemNameDisplay%,,%FX_FriendlyName%

HKR,"FX\\1",%PKEY_FX_PreMixClsid%,,%FX_PREMIX_CLSID%

HKR,"FX\\1",%PKEY_FX_PostMixClsid%,,%FX_POSTMIX_CLSID%

HKR,"FX\\1",%PKEY_FX_UiClsid%,,%FX_UI_CLSID%

HKR,"FX\\1",%PKEY_FX_Association%,,%KSNODETYPE_HEADPHONES%

 

HKR,"FX\\2",%PKEY_ItemNameDisplay%,,%FX_FriendlyName%

HKR,"FX\\2",%PKEY_FX_PreMixClsid%,,%FX_PREMIX_CLSID%

HKR,"FX\\2",%PKEY_FX_PostMixClsid%,,%FX_POSTMIX_CLSID%

HKR,"FX\\2",%PKEY_FX_UiClsid%,,%FX_UI_CLSID%

HKR,"FX\\2",%PKEY_FX_Association%,,%KSNODETYPE_LINE_CONNECTOR%

 

Each of these groups of registry directives creates the necessary entries to
associate a gfx, lfx, and ui coclasses with a particular type of input or
output on the device. As long as the capture side of your USB device has a
terminal type that results in a KSNODETYPE that is different than the render
side, then you should be able to add a group of registry directives here to
achieve your desired result.

 

If your device has only line connectors, then unfortunately both the capture
and render sides might both be KSNODETYPE_LINE_CONNECTOR and Windows Vista
does not allow you to apply different gfx/lfx/ui coclasses to them when they
are exposed on the same WDM device interface.

 

A couple notes:

1.       The section name [USBAudio.SysFx.Render] is a bit of a misnomer
since it is also applied to capture terminals (if the USB audio hardware has
any).

2.       Although the [USBAudio.Interfaces] section that you were modifying
listed three different device interface classes, they are all just aliases
for a single device interface exposed by the Windows usb audio driver. This
is why your approach doesn't work.

 

Frank Yerrace

Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

 

From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Dibyendu Nandy
Sent: Monday, June 08, 2009 1:24 PM
To: WDMAUDIODEV
Subject: [wdmaudiodev] USB Audio - INF - installing custom APOs

 

Hi All,

 

I am trying to modify the default wdma_usb.inf to have different a sAPO on
the Capture side and the default Microsoft sAPOs on the render side.

 

The defaults for the inf file seems to be controlled via the following
lines.

 

[USBAudio.Interfaces]

AddInterface=%KSCATEGORY_AUDIO%,"GLOBAL",USBAudio.Interface.Curve,

AddInterface=%KSCATEGORY_RENDER%,"GLOBAL",USBAudio.Interface.Curve,

AddInterface=%KSCATEGORY_CAPTURE%,"GLOBAL",USBAudio.Interface.Curve,

.

.

.

[USBAudio.Interface.Curve]

AddReg=USBAudio.Interface.Addreg.Curve, USBAudio.SysFx.Render

 

 

where the [USBAudio.SysFx.Render] defines the appropiate UIs and APOs.

 

The isse here is that the KSCATEGORY_CAPTURE interface uses the same
interface as KSCATEGORY_RENDER.

 

 

My aim is to retain the Microsoft SysFx on the Render side, but add another
interface definition for the capture side, so the INF looks like this.

 

[USBAudio.Interfaces]

AddInterface=%KSCATEGORY_AUDIO%,"GLOBAL",USBAudio.Interface.Curve,

AddInterface=%KSCATEGORY_RENDER%,"GLOBAL",USBAudio.Interface.Curve,

AddInterface=%KSCATEGORY_CAPTURE%,"GLOBAL",USBAudio.CaptureInterface.Curve,

.

.

.

[USBAudio.Interface.Curve]

AddReg=USBAudio.Interface.Addreg.Curve, USBAudio.SysFx.Render

 

[USBAudio.CaptureInterface.Curve]

AddReg=USBAudio.Interface.Addreg.Curve, USBAudio.SysFx.Capture

 

I would have expected the capture device to install the specified capture
LFX on the capture side via [USBAudio.SysFx.Capture].

This is failing, i.e. the MS default sAPOs  get installed on both render and
capture side.

 

I also tried commenting out 

;;;;AddInterface=%KSCATEGORY_AUDIO%,"GLOBAL",USBAudio.Interface.Curve,

with no success.

 

On the other hand if I use the following, I get my APO and UI installed on
the capture device, but my APO and its UI also gets installed on the render
device.

 

[USBAudio.Interfaces]

AddInterface=%KSCATEGORY_AUDIO%,"GLOBAL",USBAudio.Interface.Curve,

;;;;;AddInterface=%KSCATEGORY_RENDER%,"GLOBAL",USBAudio.Interface.Curve,

AddInterface=%KSCATEGORY_CAPTURE%,"GLOBAL",USBAudio.Interface.Curve,

.

.

.

[USBAudio.Interface.Curve]

AddReg=USBAudio.Interface.Addreg.Curve, USBAudio.SysFx.Capture

 

Where [USBAudio.SysFx.Capture]

specifies the capture LFX I am installing with its UI.

 

I tried posting to
<http://social.msdn.microsoft.com/Forums/en-US/windowspro-audiodevelopment/t
hreads>
http://social.msdn.microsoft.com/Forums/en-US/windowspro-audiodevelopment/th
reads with no response.

Would appreciate some help.

 

Thanks

Dibyendu

 

db

dnandy@xxxxxxxxx

 

Other related posts: