[wdmaudiodev] Re: Enumerating volume controls in Vista

  • From: Andrew Mindrin <wdmaudiodev@xxxxxxxxxxxxxxxxxx>
  • To: Mitchell Rundle <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sat, 3 Mar 2007 08:30:30 +0400

If I manually disable an audio endpoint device in sndvol.exe,
the IMMDevice::Activate method is failed for this endpoint,
so I can't walk the topology, though sndvol.exe is able to
display this enpoint with its child controls.

Is there any solution for this case?

Thanks,
Andrew

Original Message Follows:
-------------------------
The DeviceTopology API needs a pnp device interface to talk to (via 
DeviceIoControl), so if the device isn't there, the API cannot be activated.

What are you trying to accomplish?

Regards,
Mitch

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Andrew Mindrin
Sent: Friday, March 02, 2007 10:41 AM
To: Mitchell Rundle
Subject: [wdmaudiodev] Re: Enumerating volume controls in Vista

I have used the method suggested, all works fine for active audio
endpoint devices. But how to apply it for inactive or disconnected
devices? It is unable to activate IDeviceTopology interface for such
devices by calling IMMDevice::Activate method.

Thanks,
Andrew

Original Message Follows:
-------------------------
You need to walk the topology using IPart::EnumPartsIncoming (for the render 
paths) and IPart::EnumPartsOutgoing (for capture paths).

There is some sample code that shows how to do this at 
http://msdn2.microsoft.com/en-us/library/ms678713.aspx for a capture endpoint.  
Note that the sample doesn't handle branches though.  When EnumPartsIncoming 
returns a partslist with more than 1 part, that indicates a branch in the tree.

Regards,
Mitch

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Andrew Mindrin
Sent: Wednesday, February 21, 2007 9:07 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Enumerating volume controls in Vista

Hello,

I need to enumerate volume controls, i.e. I need to build
the tree:

Volume Group
   Volume
   CD
   AUX
   .. etc

I do the following:

1. Enumerating EndPoints to retrieve IPart (Volume Group)
2. Obtaining IDeviceTopology for each IPart
2. Enumerating volume controls in topology by using GetConnector
   method and querying IPart interface for each connector

All works fine, the problem is when several Volume Groups have the
same topology, i.e. Volume Group 1 and Volume Group 2 have the same
IDeviceTopology object.

The questions is how to determine which controls relate to Volume
Group 1 and which controls relate to Volume Group 2? Or maybe I need
to use another algorithm?

Thanks,
Andrew

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

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:
http://www.wdmaudiodev.com/

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

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:
http://www.wdmaudiodev.com/

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

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:
http://www.wdmaudiodev.com/

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

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:
http://www.wdmaudiodev.com/

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

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:
http://www.wdmaudiodev.com/

Other related posts: