Extra PDO

I should know this.  Shame on me that I don’t.

I’m doing a virtual audio driver, based on SYSVAD or MSVAD – I have
prototypes with both.  I’ve tweaked the media-class INF files to
advertise my own hardware ID, let’s call it ROOT\MyHardware.

When I install this using “devcon install”, I get a PDO for
ROOT\MyHardware.  I also get a PDO for ROOT\MEDIA\0000.  Both of them
appear in Device Manager, and both of them get device instances.  The
sample happens to reject duplicate creates, so one of the two ends up
with a yellow bang.

I don’t want two.  I only want one.  I don’t care which one.  How do I
fix this?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

ROOT\MEDIA\0000 is an instance path, not a hardware ID. ROOT\MEDIA\0000 is actually the instance path for the first PDO enumerated by the ROOT enumerator in the MEDIA class.

I don’t want two.?I only want one.?I don’t care which one. How do I fix this?

Let the second one go (do not fail the AddDevice and attach your FDO to the PDO’s stack) but tell the PNP Manager that the hardware is gone with IoInvalidateDeviceState. You can try to set a flag in the device context, filter the IRP_MN_QUERY_PNP_DEVICE_STATE IRP sent by the PNP Manager after IoInvalidateDeviceState is called to indicate that the device has been removed (set the IRP’s PNP_DEVICE_STATE to PNP_DEVICE_REMOVED).

I had nether tried this, this is a suggestion. Good luck Mr Roberts.

Sorry… you’re in the Audio stack Mr. Roberts. That means you’re beyond me.

Peter
OSR
@OSRDrivers

Sorry about the silly proposal I made Mr Roberts.

PNP drivers must service ALL the devices that advertise a matching hardware ID. No segregation is allowed.

xxxxx@probo.com wrote:

When I install this using “devcon install”, I get a PDO for
ROOT\MyHardware.  I also get a PDO for ROOT\MEDIA\0000.  Both of them
appear in Device Manager, and both of them get device instances.  The
sample happens to reject duplicate creates, so one of the two ends up
with a yellow bang.

I have the answer, thanks to Matthew on the Microsoft audio team, who,
by the way, is a gem of a resource.

The INF for the SYSVAD sample includes a [DeviceInstall32] section,
which is not documented.  It turns out this section is designed for
virtual drivers that do not have hardware.  It creates a new PDO for
you.  It does basically what the “devcon install” function does.

So, the fact that I used “devcon install” meant that I got TWO PDOs. 
When your INF includes [DeviceInstall32], you need to use “pnputil -a”.

And now you know the rest of the story.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.