[wdmaudiodev] Re: Help installing custom sAPO for a USB audio device

  • From: Justin Davis <justindvs@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Mon, 2 Mar 2015 09:45:34 -0800

Thank you so much for the explanation Matthew!  That makes sense (I was
using KSNODETYPE_ANY).

I'll give the specific category a try and report back.

Thanks,
Justin

On Mon, Mar 2, 2015 at 9:36 AM, Matthew van Eerde <
Matthew.van.Eerde@xxxxxxxxxxxxx> wrote:

>  Here’s how effects property registration works, in general.
>
>
>
> Before registering the KSCATEGORY_AUDIO device interface, set your desired
> properties with any of the following prefixes:
>
> 1.       MSFX\*n* with PKEY_FX_Assocation = KSNODETYPE_ANY, or
>
> 2.       FX\*n* with PKEY_FX_Assocation = KSNODETYPE_ANY, or
>
> 3.       MSFX\*n* with PKEY_FX_Association = KSPIN_DESCRIPTOR.Category
> where the pin descriptor is for the pin factory on the hardware end of the
> signal path, or
>
> 4.       FX\*n* with PKEY_FX_Association = KSPIN_DESCRIPTOR.Category
> where the pin descriptor is for the pin factory on the hardware end of the
> signal path
>
>
>
> Stores higher up in the list are overridden by stores lower down in the
> list.
>
>
>
> Only Microsoft inbox drivers should use MSFX\*n*. This allows third-party
> drivers to use FX\*n* and override them. You should use FX\*n*.
>
>
>
> wdma_usb.inf uses PKEY_FX_Association = KSPIN_DESCRIPTOR.Category:
>
> ; wdma_usb.inf
>
> HKR,"MSFX\\0",%PKEY_FX_Association%,,%KSNODETYPE_SPEAKER%
>
> HKR,"MSFX\\1",%PKEY_FX_Association%,,%KSNODETYPE_HEADPHONES%
>
> HKR,"MSFX\\2",%PKEY_FX_Association%,,%KSNODETYPE_DESKTOP_SPEAKER%
>
> HKR,"MSFX\\3",%PKEY_FX_Association%,,%KSNODETYPE_HEADSET_SPEAKERS%
>
>
>
> So you will need to use FX\0 with a PKEY_FX_Association =
> KSPIN_DESCRIPTOR.Category yourself, or be overridden by the more specific
> MSFX\*n* match.
>
>
>
> > I'm pretty sure those keys need to be installed as part of an
> "AddInterface" statement
>
>
>
> That’s correct; they should be under the “.AddReg” section from an
> AddInterface=… KSCATEGORY_AUDIO … interface.
>
>
>
> *From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:
> wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Justin Davis
> *Sent:* Saturday, February 28, 2015 3:44 PM
> *To:* wdmaudiodev@xxxxxxxxxxxxx
> *Subject:* [wdmaudiodev] Help installing custom sAPO for a USB audio
> device
>
>
>
> Hi all,
>
>
>
> I've developed drivers for a number of years, but I'm a newbie to audio
> drivers.
>
>
>
> I'm dipping my toes in the water by trying to install a custom sAPO (the
> swap example) for a standard USB microphone (and USB headphones at some
> point too).
>
>
>
> I've read up on as much info as I can find and I've tried several
> examples.  I've had success building and installing the "slate audio"
> example from the WDK 8.1 samples.
>
>
>
> However, I'm having problems adapting this example to my simple USB audio
> device.  I really just want to use the standard USBAudio.sys driver but
> supplement it with my sAPO.  I think I have the proper "Include" and
> "Needs" section to pull that stuff in from the wdma_usb.inf file.
>
>
>
> I think the root of my problem is with putting the right sAPO registration
> data in the registry.  I've generally tried to follow the guidance from
> this page (and the Vista Audio Effects white paper):
>
>
> https://msdn.microsoft.com/en-us/library/windows/hardware/ff536810(v=vs.85).aspx
>
>
>
> However, it uses lots of INF fragments with HKR, which is relative to how
> you get to that INF section.  So it's not 100% clear where those are
> supposed to go.  Through looking at the example, I'm pretty sure those keys
> need to be installed as part of an "AddInterface" statement...but again
> it's not 100% clear.
>
>
>
> My problem is that I install via my INF, and I can see the registry keys
> get installed to what looks like the proper locations.  But...it sounds
> like the installation process is supposed to migrate the sAPO registration
> data to another section (below), and this step doesn't appear to be
> happening.
>
>
>
> HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Capture\{EP
> GUID}\FxProperties
>
>
>
> I've found that if I manually hack the above keys to point to my sAPO, it
> seems to work (I see my sAPO getting loaded in the audiodg process and my
> APOProcess() function is being called).  However...I know I'm not supposed
> to hack those keys manually, the INF file is supposed to do something that
> causes the keys to be migrated there.  It's just not clear on what's going
> wrong in that process.
>
>
>
> I'm not at my work machine right now so I can't copy the INF file I've
> been working with (I'll add that on Monday).
>
>
>
> But any advice on how to troubleshoot this would be greatly appreciated!
> I feel like what I'm trying to do should be simple, I'm just not familiar
> enough with the audio subsystem to know what to look for.
>
>
>
> BTW, I've seen the "Troubleshooting sAPO Load Failures" page, and I do
> have DisableProtectedAudioDG set.  My problem isn't that my sAPO fails to
> load, it's that the system doesn't even try to load it (verified this in
> the debugger).
>
>
>
> Thanks for your help!
>
> Justin
>

Other related posts: