Professional Documents
Culture Documents
Windows 7
March 30, 2010
Abstract
Disclaimer: This document is provided as-is. Information and views expressed in this document, including
URL and other Internet Web site references, may change without notice. You bear the risk of using it.
This document does not provide you with any legal rights to any intellectual property in any Microsoft
product. You may copy and use this document for your internal, reference purposes.
2010 Microsoft Corporation. All rights reserved.
Document History
Date
Change
March 30,
2010
First publication
Contents
Introduction........................................................................................ 3
Basic Algorithm for Default Audio Endpoint Selection........................4
The Endpoint Timestamp Property......................................................4
Endpoint Timestamp Property Creation and Update in Windows
Vista................................................................................................ 5
Endpoint Timestamp Property Creation and Update on Windows 7 6
The Windows Vista Default Audio Endpoint Heuristic.........................7
The Windows 7 Default Audio Endpoint Heuristic...............................8
Windows 7 Heuristic Factors............................................................8
Windows 7 Heuristic Details..........................................................10
Windows 7 Inbox Heuristic Settings..................................................11
Inbox Heuristic Settings for the Default Console Audio Endpoint. .11
Inbox Heuristic Settings for the Default Communication Audio
Endpoint........................................................................................ 14
Windows 7 OEM Heuristics Customization........................................16
Resources......................................................................................... 16
Introduction
Most PC audio devices contain multiple logically independent audio
features. In Windows Vista and Windows 7, each feature is
exposed as a separate audio endpoint. Endpoints are listed in the
Control Panel Sound application, as shown in the following example
dialog box.
Only one audio endpoint at a time can be set as the default for a
specific console or communications role.
With this new flexibility, different device roles can be set to different
audio devices.
The default audio endpoint settings that result from this INF
directive are affected by the order in which its driver exposes
an audio endpoint. The last exposed endpoint overrides all
previous settings.
Speakers
Sony/Phillips Digital InterFace (S/PDIF)
All other form factors (all are ranked equally)
Microphone
LineLevel
S/PDIF
Any other form factors (all are ranked equally)
You can see from the preceding examples that the enhanced system
default device heuristic algorithm in Windows 7 is flexible enough to
have much more detailed control on the default device selection
behavior. Heuristic details are provided in the next sections.
An endpoint with this capability implies that audio drivers can notify
the audio subsystem when the audio peripherial device that is
connected to an endpoint is plugged in or unplugged. Audio
endpoints that support jack detection capability are called dynamic
endpoints, and those that do not provide this support are called
static endpoints. To support jack detection capability, audio device
drivers must support the KSPROPERTY_JACK_DESCRIPTION2 property.
For more information about this property, see
KSPROPERTY_JACK_DESCRIPTION2 on the MSDN Web site.
Jack detection capability
enum values
Supported
NotSupported
The Windows 7 default audio device heuristic treats all USB audio
endpoints as jack detection capable.
March 30, 2010
2010 Microsoft Corporation. All rights reserved.
Form Factor
RemoteNetworkD
evice
Speakers
Handset
UnknownDigitalPassthr
ough
LineLevel
SPDIF
Headphones
UnknownFormFactor
Microphone
Headset
DigitalAudioDisplayDevice (defined to be
same as HDMI)
KSNodeType
KSNODETYPE_SPEAKER
KSNODETYPE_MICROPHONE
_ARRAY
KSNODETYPE_HEADPHONES
For more detailed information about KsNodeType, see Pin Category
Property on the MSDN Web site.
Bus Type
This factor represents the bus type from which the audio device that
exposed the audio endpoints was enumerated.
Bus type enum
values
BTHENUM
BTHHFENUM
USB
HDAUDIO
PCI
Unknown
WeightFactor_JackDe
t
WeightFactor_SubTyp
e
WeightFactor_FormF
actor
WeightFactor_BusTyp
e
WeightFactor_GenLo
c
WeightFactor_GeoLo
c
nRankJackDet
nRankSubType
nRankFormFactor
nRankBusType
nRankGenLoc
nRankGeoLoc
* nRankJackDet +
* nRankSubType +
* nRankFormFactor +
* nRankBusType +
* nRankGenLoc +
* nRankGeoLoc;
The audio subsystem calculates the weighted rank value for all
active endpoints and selects the endpoint that has the highest rank
as the default audio endpoint.
The Windows 7 default audio endpoint selection heuristic mechanism
also supports an exception feature. This feature allows the system or
an OEM to cause the audio subsystem to designate an endpoint that
matches a specific set of characteristics with very high or very low
weighted rank values. Such designations make the systems
heuristic more flexible when it deals with unexpected scenarios.
The heuristics for the console device role and the communication
device role are completely separate, but the mechanism is precisely
the same, with different order for the factors based on roles.
Headphones
Speakers
LineLevel
DigitalAudioDisplayDevice
S/PDIF
Anything else (treated with the same lowest priority; that is,
withnRankFormFactor equal to zero)
Headset
Microphone
LineLevel
Anything else (treated with the same lowest priority; that is,
with nRankFormFactor equal to zero)
KSNODETYPE_PROCESSING_MICROPHONE_ARRAY
KSNODETYPE_MICROPHONE_ARRAY
KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE
Anything else (treated with the same lowest priority; that is,
with nRankSubType equal to zero)
When the audio subsystem uses the system heuristic to choose the
default console capture audio endpoint, it selects the microphone
March 30, 2010
2010 Microsoft Corporation. All rights reserved.
Windows 7 ranks the enum values for endpoint bus types in the
following priority order, from highest to lowest priority:
BTHENUM
BTHHFENUM
USB
HDAUDIO
PCI
Others (treated with the same lowest priority; that is, with
nRankBusType equal to zero)
General Location
PrimaryBox
Internal
Separate
Others (treated with the same lowest priority; that is,
nRankGenLoc is equal to zero)
Rear
Front
Left
Right
Top
Bottom
RealPanel
Others (treated with the same lowest priority; that is, with
nRankGeoLoc equal to zero)
KSNODETYPE_PERSONAL_MICROPHONE
KSNODETYPE_HEADSET
KSNODETYPE_PHONE_LINE
KSNODETYPE_DOWN_LINE_PHONE
KSNODETYPE_COMMUNICATION_SPEAKER
KSNODETYPE_HANDSET
KSNODETYPE_TELEPHONE
KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION
KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE
KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE
The jack detection capability heuristic settings are the same for both
default communication audio endpoints and default console audio
endpoints.
Form Factor
Headset
Handset
Headphones
Speakers
LineLevel
DigitalAudioDisplayDevice (HDMI or DisplayPort)
S/PDIF
Anything else (treated with the same lowest priority; that is,
with nRankFormFactor equal to zero)
For example, consider a system with the following three audio render
endpoints:
When the audio subsystem uses the system heuristic to choose the
default console render audio endpoint, it selects the dynamic
speakers endpoint even though its speakers form factor is prioritized
below the headphones form factor of the first endpoint. This is
because the dynamic speakers endpoint has jack detection
capability, which has a higher priority over form factor, whereas the
headphone endpoint does not.
If a dynamic USB headphones endpoint is introduced into the
preceding example, the Windows 7 audio subsystem chooses this
endpoint as the default console render endpoint because it supports
jack detection and its headphones form factor has higher priority
than that of the speakers form factor.
KSNodeType
The KsNodeType heuristic settings are the same for both default
communication audio endpoints and default console audio
endpoints.
Bus Type
The bus type heuristic settings are the same for both default
communication audio endpoints and default console audio
endpoints.
General Location
The general location heuristic settings are the same for both default
communication audio endpoints and default console audio
endpoints.
Geometric Location
The geometric location heuristic settings are the same for both
default communication audio endpoints and default console audio
endpoints.
Exceptions
KSNODETYPE_PERSONAL_MICROPHONE
KSNODETYPE_HEADSET
KSNODETYPE_PHONE_LINE
KSNODETYPE_DOWN_LINE_PHONE
KSNODETYPE_COMMUNICATION_SPEAKER
KSNODETYPE_HANDSET
KSNODETYPE_TELEPHONE
KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION
KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE
KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE