[wdmaudiodev] Re: Is there a way to force clearing device property cache on device uninstallation?

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sat, 19 Jan 2019 10:19:56 +0000

The key to the cache is the full interface name.



So if the hardware ID changes, that invalidates the cache. Or if “wave” or 
“topology” changes, that invalidates the cache. But the pin friendly name is 
considered a mere attribute of the thingy and does not play into the identity 
of the thingy itself.



What algorithm are you using to generate pin friendly names? Would it make 
sense to generate the interface name according to the same algorithm, so each 
thingy would have its own cache?



How exactly are you uninstalling the device? Are you removing the driver from 
the PDO? Are you removing the driver from the driver cache? Are you actually 
removing the PDO itself?



________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Eugene Muzychenko <reg.wad@xxxxxxxxxxxxxx>
Sent: Friday, January 18, 2019 1:37:35 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Is there a way to force clearing device property cache 
on device uninstallation?

As you may know, Win10 does not clear its audio device property store
for audio devices being uninstalled, using the store as a cache for
further re-installations of the same device.

Unfortunately, such behavior produces undesired effects with
virtual audio drivers that generate pin friendly names dynamically.

For example, the device is installed with "ROOT\MEDIA\0000"
instance ID and the driver returns the appropriate pin names.
Audio Subsystem stores these names in the Property Store.

Then the device is uninstalled. Property Store is not cleared, even
after a restart.

Then a different driver build, with different pin names, is installed.
Since "ROOT\MEDIA\0000" instance ID is free, the new devices gets this
ID. If filter reference names are the same (usually "wave" and
"topology"), full interface names are the same too. In such case,
Audio Subsystem uses friendly names stored in the Property Store
instead of querying the driver.

The problem is observed in 17134.RS4, maybe in newer builds too.

Is there a way to force either clearing Property Store entries on
device uninstallation, or filling them on installation?

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

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:
https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.wdmaudiodev.com%2F&amp;data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C6ce6f7ea0340459e41fb08d67d8e4763%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C1%7C636834447393536100&amp;sdata=G6tURyREvI%2BcaEkas2XGIpAPeJzYI%2BdkpE9DSesuSY0%3D&amp;reserved=0

Other related posts: