[wdmaudiodev] Rebuild audio endpoint set after a topology change

  • From: Eugene Muzychenko <emuzychenko@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 20 Mar 2007 23:36:17 +0600


My audio driver implements a topology filter using ITopologyMiniport
interface. Device topology is not fixed, it depends on device
configuration and the driver dynamically builds an appropriate 
set in the ITopologyMiniport::Init method. To create each source line,
the driver uses consecutive node/pin IDs therefore these IDs are
dynamically assigned to nodes and pins during Init processing.

Under Windows 2000/XP/2003, all is OK: restarting the driver with a
new configuration, I see a proper topology and Windows Mixer properly
represents existing lines. But under Vista, endpoint builder service
does not rebuild endpoint set properly.

For example, my driver can create source lines for microphone and/or
for a line connector. Initially I create only a microphone line. In
the recording device list, I see "Mic" endpoint having all three
tabs: General, Levels and Advances.

Then I change device configuration to use both "Mic" and "Line" when
"Mic" line is built first (node/pin IDs assigned are the same as earlier). After
driver restart, "Mic" endpoint seems to be OK and I see a new
"Line" endpoint in the recording device list but it does not have
Advanced tab. Wave In device number is increased but a new device name
cannot be obtained (waveInGetDevCaps returns MMSYSERR_ERROR).

Then I change the driver to build "Line" first, using the same node/pin IDs that
were previously (before driver restart) assigned  to create "Mic", and
build "Mic" later, using different node/pin IDs. After driver restart,
I see "Line" endpoint as a normal but "Mic" as a non-functional.

A proper topology/endpoints correspondence can be achieved only by
Vista restart or by "Windows Audio" service restart. Vista does not
automatically rebuild endpoint set to properly represent a changed
topology. As I understood, Vista does not rebuild endpoint list in
MMDevices\Audio after driver restart, and rebuilds it only when
AudioSrv is started.

It such Vista behavior normal? If yes, how can I reflect device
topology change to the endpoint set without restarting Vista or
AudioSrv? Maybe there is a notification message to send to AudioSrv?



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


Other related posts: