Επεξεργασία

Κοινή χρήση μέσω


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 ID KS Pin Category GUID

0x0201

KSNODETYPE_MICROPHONE

0x0202

KSNODETYPE_DESKTOP_MICROPHONE

0x0203

KSNODETYPE_PERSONAL_MICROPHONE

0x0204

KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE

0x0205

KSNODETYPE_MICROPHONE_ARRAY

0x0206

KSNODETYPE_PROCESSING_MICROPHONE_ARRAY

Output Terminal Types

USB Terminal ID KS Pin Category GUID

0x0301

KSNODETYPE_SPEAKER

0x0302

KSNODETYPE_HEADPHONES

0x0303

KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO

0x0304

KSNODETYPE_DESKTOP_SPEAKER

0x0305

KSNODETYPE_ROOM_SPEAKER

0x0306

KSNODETYPE_COMMUNICATION_SPEAKER

0x0307

KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER

Bidirectional Terminal Types

USB Terminal ID KS Pin Category GUID

0x0401

KSNODETYPE_HANDSET

0x0402

KSNODETYPE_HEADSET

0x0403

KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION

0x0404

KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE

0x0405

KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE

Telephony Terminal Types

USB Terminal ID KS Pin Category GUID

0x0501

KSNODETYPE_PHONE_LINE

0x0502

KSNODETYPE_TELEPHONE

0x0503

KSNODETYPE_DOWN_LINE_PHONE

External Terminal Types

USB Terminal ID KS Pin Category GUID

0x0601

KSNODETYPE_ANALOG_CONNECTOR

0x0602

KSNODETYPE_DIGITAL_AUDIO_INTERFACE

0x0603

KSNODETYPE_LINE_CONNECTOR

0x0604

KSNODETYPE_LEGACY_AUDIO_CONNECTOR

0x0605

KSNODETYPE_SPDIF_INTERFACE

0x0606

KSNODETYPE_1394_DA_STREAM

0x0607

KSNODETYPE_1394_DV_STREAM_SOUNDTRACK

Embedded Function Terminal Types

USB Terminal ID KS Pin Category GUID

0x0701

KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE

0x0702

KSNODETYPE_EQUALIZATION_NOISE

0x0703

KSNODETYPE_CD_PLAYER

0x0704

KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE

0x0705

KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE

0x0706

KSNODETYPE_MINIDISK

0x0707

KSNODETYPE_ANALOG_TAPE

0x0708

KSNODETYPE_PHONOGRAPH

0x0709

KSNODETYPE_VCR_AUDIO

0x070A

KSNODETYPE_VIDEO_DISC_AUDIO

0x070B

KSNODETYPE_DVD_AUDIO

0x070C

KSNODETYPE_TV_TUNER_AUDIO

0x070D

KSNODETYPE_SATELLITE_RECEIVER_AUDIO

0x070E

KSNODETYPE_CABLE_TUNER_AUDIO

0x070F

KSNODETYPE_DSS_AUDIO

0x0710

KSNODETYPE_RADIO_RECEIVER

0x0711

KSNODETYPE_RADIO_TRANSMITTER

0x0712

KSNODETYPE_MULTITRACK_RECORDER

0x0713

KSNODETYPE_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 USB Implementers Forum website.

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 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).

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.