Windows Driver Kit: Audio Devices
Pin Category Property

Microsoft Windows Driver Model (WDM) audio drivers for USB audio devices, IEEE 1394 audio devices, and audio devices on internal buses all represent their devices as KS filters with pins. A WDM audio driver maintains one KSPIN_DESCRIPTOR structure for each pin type that it supports. Within this structure, the driver stores the KSPROPSETID_Pin properties of the pin type. Among those properties is the KSPROPERTY_PIN_CATEGORY property. A request for this property retrieves the KS pin category GUID from the KSPIN_DESCRIPTOR structure's Category member. This GUID indicates the general category of functionality that the pin provides. For example, a particular pin category GUID, KSNODETYPE_HEADPHONES, identifies a pin as an output jack for headphones.

In the case of a wave audio device on an internal bus (for example, PCI), the PortCls miniport driver contains an array of pin descriptors, each of which describes a pin type in the filter that represents the device. Each pin descriptor is a PCPIN_DESCRIPTOR structure containing an embedded KSPIN_DESCRIPTOR structure with a pin category GUID. Upon receiving a KSPROPERTY_PIN_CATEGORY property request from a client, the port driver retrieves the pin category GUID from the miniport driver's pin descriptor for the specified pin type. For more information about pin descriptors, see Pin Factories.

A USB audio device has some number of terminals through which digital streams and analog signals can enter and exit the device. When constructing a KS filter to represent a USB audio device, the USBAudio class system driver translates the terminals on the device into pins on the filter. The header file Ksmedia.h defines a mapping for each USB terminal type identifier to a KS pin category GUID. The following six tables show the terminal type identifiers and their corresponding pin category GUIDs.

Input Terminal Types

USB Terminal IDKS Pin Category GUID
0x0201KSNODETYPE_MICROPHONE
0x0202KSNODETYPE_DESKTOP_MICROPHONE
0x0203KSNODETYPE_PERSONAL_MICROPHONE
0x0204KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE
0x0205KSNODETYPE_MICROPHONE_ARRAY
0x0206KSNODETYPE_PROCESSING_MICROPHONE_ARRAY    

Output Terminal Types

USB Terminal IDKS Pin Category GUID
0x0301KSNODETYPE_SPEAKER
0x0302KSNODETYPE_HEADPHONES
0x0303KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO
0x0304KSNODETYPE_DESKTOP_SPEAKER
0x0305KSNODETYPE_ROOM_SPEAKER
0x0306KSNODETYPE_COMMUNICATION_SPEAKER
0x0307KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER  

Bidirectional Terminal Types

USB Terminal IDKS Pin Category GUID
0x0401KSNODETYPE_HANDSET
0x0402KSNODETYPE_HEADSET
0x0403KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION
0x0404KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE
0x0405KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE

Telephony Terminal Types

USB Terminal IDKS Pin Category GUID
0x0501KSNODETYPE_PHONE_LINE
0x0502KSNODETYPE_TELEPHONE
0x0503KSNODETYPE_DOWN_LINE_PHONE                          

External Terminal Types

USB Terminal IDKS Pin Category GUID
0x0601KSNODETYPE_ANALOG_CONNECTOR
0x0602KSNODETYPE_DIGITAL_AUDIO_INTERFACE
0x0603KSNODETYPE_LINE_CONNECTOR
0x0604KSNODETYPE_LEGACY_AUDIO_CONNECTOR
0x0605KSNODETYPE_SPDIF_INTERFACE
0x0606KSNODETYPE_1394_DA_STREAM
0x0607KSNODETYPE_1394_DV_STREAM_SOUNDTRACK        

Embedded Function Terminal Types

USB Terminal IDKS Pin Category GUID
0x0701KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE
0x0702KSNODETYPE_EQUALIZATION_NOISE
0x0703KSNODETYPE_CD_PLAYER
0x0704KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE
0x0705KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE
0x0706KSNODETYPE_MINIDISK
0x0707KSNODETYPE_ANALOG_TAPE
0x0708KSNODETYPE_PHONOGRAPH
0x0709KSNODETYPE_VCR_AUDIO
0x070AKSNODETYPE_VIDEO_DISC_AUDIO
0x070BKSNODETYPE_DVD_AUDIO
0x070CKSNODETYPE_TV_TUNER_AUDIO
0x070DKSNODETYPE_SATELLITE_RECEIVER_AUDIO
0x070EKSNODETYPE_CABLE_TUNER_AUDIO
0x070FKSNODETYPE_DSS_AUDIO
0x0710KSNODETYPE_RADIO_RECEIVER
0x0711KSNODETYPE_RADIO_TRANSMITTER
0x0712KSNODETYPE_MULTITRACK_RECORDER
0x0713KSNODETYPE_SYNTHESIZER

For more information about USB terminal type identifiers, see the Universal Serial Bus Device Class Definition for Terminal Types (release 1.0), which is available at the ms790325.internet_link_sm(en-us,MSDN.10).gifUSB Implementers Forum Web site.

All pin category GUIDs in the preceding tables have parameter names of the form KSNODETYPE_XXX. Note that KS node type GUIDs also have KSNODETYPE_XXX parameter names. This naming convention creates some potential for confusion between pin category GUIDs and node type GUIDs. Fortunately, nearly every KSNODETYPE_XXX parameter identifies either a pin category or a node type, but not both. The one exception to the rule is KSNODETYPE_SYNTHESIZER, which can identify either a pin category or a node type, depending on the context. For a list of node type GUIDs, see Audio Topology Nodes.

When instantiating a USB audio device, the USBAudio class system driver queries the device for its internal topology, including its terminals. With this information, the USBAudio driver constructs a filter to represent the device and translates each terminal into a corresponding pin on the filter. During this process, the driver translates each USB terminal type identifier into the corresponding KS pin category GUID, which is one of the GUIDs in the preceding tables. The driver constructs a KSPIN_DESCRIPTOR structure to describe the pin, and it writes the pin category GUID into the structure.

A PortCls miniport driver does not necessarily use only the category GUIDs that appear in the preceding six tables. For example, a driver might define and use a custom pin category GUID to describe a pin type whose functional category falls outside the categories in the tables. Naturally, a custom pin category GUID is useful only to clients that recognize the GUID.

The audio subsystem maintains a list of pin category GUIDs and their associated friendly names in the system registry. The GUIDs and friendly names are stored in the registry path HKLM\SYSTEM\CurrentControlSet\Control\MediaCategories. The media class installer copies the GUID-name pairs into the registry from the Ks.inf file located in the Inf subfolder of the main Windows folder (for example, C:\Windows\Inf\Ks.inf).

In Windows Vista and later, the operating system uses pin categories to associate friendly names with audio endpoint devices. For more information about how to associate friendly names with audio endpoint devices, see Friendly Names for Audio Endpoint Devices.

In Windows XP, Windows 2000, and Windows Millennium Edition, the operating system makes only limited use of pin categories. The WDMAud system driver acts on behalf of the mixer API to translate pin category GUIDs into MIXERLINE_COMPONENTTYPE_XXX values for use by client applications. WDMAud recognizes only a subset of the pin category GUIDs that appear in the preceding six tables. In addition, for historical reasons, WDMAud recognizes two pin category GUIDs, KSCATEGORY_AUDIO and PINNAME_CAPTURE, that do not appear in the tables. For more information about the translation of pin categories to mixer lines, see Topology Pins. For information about the mixer API, see the Windows SDK documentation.

Page view tracker