[wdmaudiodev] Re: Can I identify my audio endpoint?

  • From: "Michael R. Preston" <mike@xxxxxxxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Sat, 28 Oct 2006 13:17:31 -0700

Mitch,
It still seems like this mechanism isn't working correctly. If I do
as you describe, I still only see the endpoint property store being
populated for the first endpoint. As an experiment, I tried swapping the indexes, so the Speaker endpoint gets populated from "EP\\1" and the headphone endpoint gets populated from "EP\\0", and now only the headphone endpoint's property store gets populated.
Here's a question... Where do these entries belong in the
INF file? In the INF file that came with the Swap APO sample code, both
the "FX\\0" and "EP\\0" entries are populated from the topology AddReg
section for the endpoint. For example:


[HDAudio.SysFx.PrimaryLineOutTopo]
AddReg=HDAudio.SysFx.PrimaryLineOutTopo.AddReg,SysFx.AddReg,OEMSettingsOverride.AddReg

where SysFx.AddReg adds the "FX\\0" entries, and
OEMSettingsOverride.AddReg adds the "EP\\0" entries.  Is this the
correct place to put the "EP\\xxx" entries?  It seems to be working fine
for the first endpoint, but not for the others.

Mike

Mitchell Rundle wrote:
Jeff, it sounds like you have it.

Michael, in your case only the speakers propertystore is populated
because of this entry:

HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_SPEAKER%

If you want all endpoints populated, then change that line to

HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_ANY%

On the other hand, let's say you want to add a different endpoint
propertypage extension for each of the endpoints (speakers,
headphones, spdif).  In this case, (as Jeff alluded to) do something
like

HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_SPEAKER% HKR,"EP\\0",%PKEY_AudioEndpoint_Ext_UiClsid%,,%AUDIOENDPOINT_EXT_UI_CLSID_FORSPEAKERS%


HKR,"EP\\1",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_HEADPHONES%
HKR,"EP\\1",%PKEY_AudioEndpoint_Ext_UiClsid%,,%AUDIOENDPOINT_EXT_UI_CLSID_FORHEADPHONES%



HKR,"EP\\2",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_SPDIF_INTERFACE%
HKR,"EP\\2",%PKEY_AudioEndpoint_Ext_UiClsid%,,%AUDIOENDPOINT_EXT_UI_CLSID_FORSPDIF%



I realize this is all a bit cludgey... Basically, you are creating transient groups of registry properties that will be used by something that doesn't exist at device setup time, namely the audio endpoints. When the endpoints are "created", the AudioEndpointBuilder service looks for these "EP\n" and "FX\n" entries, correlates with the pin category and if there's a match copies the properties into the new endpoint and fx propertystores en masse.

Let me know if this is still unclear.  I'll add to the list of things
that needs more documentation and/or utilities.

Regards, Mitch Rundle Microsoft Corporation

-----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Jeff Pages Sent: Thursday, October 26, 2006 4:05 PM To:
wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] Re: Can I identify
my audio endpoint?


Hi Mike,

I don't know whether what I've done is the right thing or not (this
stuff doesn't seem to be documented anywhere yet apart from in the
SysFx example), but I have multiple endpoints that I needed to set
the default sampling rate and bit depth on, so in the
[OEMSettingsOverride.AddReg] section I just referred to the endpoints
as EP\\0, EP\\1, EP\\2, etc. and it seemed to work.

Jeff

----- Original Message ----- From: "Michael R. Preston"
<mike@xxxxxxxxxxxxxxxxxxx> To: <wdmaudiodev@xxxxxxxxxxxxx> Sent:
Friday, October 27, 2006 8:45 AM Subject: [wdmaudiodev] Re: Can I
identify my audio endpoint?



Frank, see my questions below.  I want to answer Ally's question
first, then I have a question for you...

In the INF file that came with the Swap APO sample code, there are examples of how to put values into both the FX property store, and
the endpoint property store. Entries to go into the FX property
store get a label of "FX\\0", and entries to go into the endpoint
property store get a label of "EP\\0". The following is taken from
the aforementioned INF file:


;; ;; All FX\\0 entries in the same grouping ;; [SysFx.AddReg] HKR,"FX\\0",%PKEY_DisplayName%,,%SYSFX_FriendlyName% HKR,"FX\\0",%PKEY_SYSFX_PreMixClsid%,,%SYSFX_PREMIX_CLSID% HKR,"FX\\0",%PKEY_SYSFX_PostMixClsid%,,%SYSFX_POSTMIX_CLSID% HKR,"FX\\0",%PKEY_SYSFX_UiClsid%,,%SYSFX_UI_CLSID% HKR,"FX\\0",%PKEY_SYSFX_Association%,,%KSNODETYPE_ANY%

;; ;; All EP\\0 entries in the same grouping ;; ;; Set default
format to 48kHz, 16-bit, Stereo ;; Add endpoint extension property
page ;; [OEMSettingsOverride.AddReg] HKR,"EP\\0",%PKEY_AudioEndpoint_Association%,,%KSNODETYPE_SPEAKER% HKR,"EP\\0",%PKEY_AudioEngine_OEMFormat%,%REG_BINARY%,41,00,8C,70,28,00,00,00,FE,FF,02,00,80,BB,00,00,00,EE,02,00,04,00,10,00,16,00,10,00,03,00,00,00,01,00,00,00,00,00,10,00,80,00,00,AA,00,38,9B,71
HKR,"EP\\0",%PKEY_AudioEndpoint_Ext_UiClsid%,,%AUDIOENDPOINT_EXT_UI_CLSID%




The reason I'm bringing this up, is that I think there may be a
problem with this mechanism.  I'm running on a system with more
than one playback endpoint (Speakers, Headphones, and S/PDIF).  I
can see entries destined for the FX property store get populated
for all endpoints. However, entries destined for the endpoint
property store only seem to get populated for the first (default)
endpoint.  Frank, is this a known problem?  Any comments or
suggestions?

Thanks, Mike

Alexandra Schoepel (Ally) wrote:

Hi Frank, Regarding setting a special property to help us locate
our endpoint: as far as I can tell, the sysfx example adds
properties to the FX PROPERTIES key in the registry, but not the
'standard' one, e.g. ..\MMDevices\Audio\Render\{DS
GUID}\Properties\ Am I missing something, or does the example
only demonstrate adding properties for the effects? It looks to
me the only way to find the endpoint associated with an audio
driver is by the device name/description from the inf. Thanks, Ally


------------------------------------------------------------------------
*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Frank
Yerrace *Sent:* Wednesday, October 18, 2006 3:53 PM *To:*
wdmaudiodev@xxxxxxxxxxxxx *Subject:* [wdmaudiodev] Re: Can I
identifying my audio endpoint?


I'm sorry I misled you with my previous response. A colleague
reminded me that PKEY_Endpoint_KsComponentId is not generally
available in the endpoint property stores. Another alternative-
similar in concept- is for your device INF to indirectly populate
the endpoint property stores with your own custom properties. The
SYSFX sample demonstrates this. (Sorry I don't have a pointer to
the SYSFX sample or documentation at my fingertips. I believe
it's been referenced in other messages to this mailing list.)
Then your app can search for an endpoint that has your custom
properties in its property store.

Frank Yerrace

Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers
no rights.

------------------------------------------------------------------------


*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of
*Alexandra Schoepel (Ally) *Sent:* Tuesday, October 17, 2006 4:12
PM *To:* wdmaudiodev@xxxxxxxxxxxxx *Subject:* [wdmaudiodev] Re:
Can I identifying my audio endpoint?


Yes it does.  Okay, very cool.  Is this key defined in a standard
header or is there a section of documentation describing how the
KSCOMPONENTID is encapsulated in the PROPVARIANT so I don't
bother you any more. :)

Thanks again,

Alexandra Schoepel

------------------------------------------------------------------------


*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of *Frank
Yerrace *Sent:* Tuesday, October 17, 2006 3:59 PM *To:*
wdmaudiodev@xxxxxxxxxxxxx *Subject:* [wdmaudiodev] Re: Can I
identifying my audio endpoint?


Does your device have its own audio driver? One alternative is to
read PKEY_Endpoint_KsComponentId from the endpoint property
store. This returns a KSCOMPONENTID structure. However, for this
endpoint property to have useful information, the audio driver
must support the KS property KSPROPERTY_GENERAL_COMPONENTID and
fill it in with useful information.

Frank Yerrace

Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers
no rights.

------------------------------------------------------------------------


*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] *On Behalf Of
*Alexandra Schoepel (Ally) *Sent:* Tuesday, October 17, 2006 3:27
PM *To:* wdmaudiodev@xxxxxxxxxxxxx *Subject:* [wdmaudiodev] Can I
identifying my audio endpoint?


Hi guys,

What is the most effective way to identify one's own audio
endpoint when using the IMMDeviceEnumerator?  None of the
published Audio Endpoint properties seem to be uniquely tied to
the device.  The DirectSound GUID (PKEY_AudioEndpoint_GUID) seems
to be a floating value assigned by the OS and in no way tied to
any information in the inf file of the driver. Additionally, help
on the IMMDevice::GetId function states that the information it
represents is opaque and should not be used to obtain information
about the device.  Any advice?

Thanks, Alexandra Schoepel


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Mike Preston | Home/Office: (360)756-1655 | | E-mail:
mike@xxxxxxxxxxxxxxxxxxx | Cell: (360)303-9331 | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| |
The man who follows the crowd will usually get no | |
further than the crowd. The man who walks alone is | |
likely to find himself in places no one has ever been. | |
-- Alan Ashley-Pitt | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ******************


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/




-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Mike Preston | Home/Office: (360)756-1655 | | E-mail: mike@xxxxxxxxxxxxxxxxxxx | Cell: (360)303-9331 | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| | The man who follows the crowd will usually get no | | further than the crowd. The man who walks alone is | | likely to find himself in places no one has ever been. | | -- Alan Ashley-Pitt | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ******************

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: