Bewerken

Delen via


Subformat GUIDs for Compressed Audio Formats

For Windows 7, new subformat GUIDs have been added to the Ksmedia.h header file to provide support for compressed audio formats. Subformat GUIDs indicate the specific subformat of a data format. These formats are defined by the Consumer Electronics Association (CEA) standard for uncompressed audio.

As a result of the CEA-861-D standard, you must ensure that audio formats that are not supported by a CEA device are not transmitted to such a device. High definition multimedia interface (HDMI) and DisplayPort are examples of CEA devices.

For user-mode access, the GUIDs are specified in the SubFormat member of WAVEFORMATEXTENSIBLE and in the FormatExt member of WAVEFORMATEXTENSIBLE_IEC61937. For kernel-mode access for audio drivers, the GUIDs are specified in the DataRange member of the KSDATARANGE_AUDIO structure.

The GUIDs for the available compressed audio formats are listed in the following table.

Note   Not all the available formats are supported by the Windows 7 HD audio class driver. The formats supported by Windows 7 are indicated in the tables with an asterisk (*).

CEA 861 type SubFormat GUID Description

0x00

Refer to the stream.

0x01

00000000-0000-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_WAVEFORMATEX

IEC 60958 PCM

0x02

00000092-0000-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL

AC-3

0x03

00000003-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_MPEG1

MPEG-1 (Layer1 & 2)

0x04

00000005-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_MPEG3

MPEG-3 (Layer 3)

0x05

00000004-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_MPEG2

MPEG-2 (Multichannel)

0x06

00000006-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_AAC

Advanced audio coding* (MPEG-2/4 AAC in ADTS)

0x07

00000008-0000-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_DTS

Digital Theater Sound (DTS)

0x0a

0000000a-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUS

Dolby Digital Plus

0x0f

Unused.

Reserved

The GUIDs for audio formats that are transmitted in high bit-rate audio sample packets are listed in the following table.

CEA 861 type SubFormat GUID Description

0x0b

0000000b-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_DTS_HD

DTS-HD (24-bit, 95KHz)

0x0c

0000000c-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_MLP

MAT(MLP)- Meridian Lossless Packing (Dolby Digital True HD - 24-bit 196KHz/up to 18M bps, 8 channels)

0x0e

00000164-0000-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_WMA_PRO

Windows Media Audio (WMA) Pro

The GUIDs for compressed audio formats that can be implemented by third-party solutions are listed in the following table.

CEA 861 type SubFormat GUID Description

0x08

00000008-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_ATRAC

Adaptive Transform Acoustic Coding (ATRAC)

0x09

00000009-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_ONE_BIT_AUDIO

One-bit audio

0x0d

0000000d-0cea-0010-8000-00aa00389b71

KSDATAFORMAT_SUBTYPE_IEC61937_DST

Direct Stream Transport (DST)

The following code example shows how an audio miniport driver defines and initializes a KSDATARANGE_AUDIO structure for use with an HDMI sink that has a fully functional Dolby Digital Plus decoder. A sink of this type supports transfer rates of 44.1 and 48 KHz.

For a sampling rate of 48 KHz, an audio miniport driver uses the following code to define and initialize a KSDATARANGE_AUDIO structure. This code shows the data ranges that the audio miniport driver exposes:

//Define and initialize KSDATARANGE_AUDIO structure
// for use with a sample rate of 48 KHz.
KSDATARANGE_AUDIO drDDPlus48;
drDDPlus48.DataRange.FormatSize = sizeof(KSDATARANGE_AUDIO);
drDDPlus48.DataRange.Flags = 0; // Ignored.
drDDPlus48.DataRange.SampleSize = 0; // Ignored.
drDDPlus48.DataRange.Reserved = 0;
drDDPlus48.DataRange.MajorFormat = KSDATAFORMAT_TYPE_AUDIO;
drDDPlus48.DataRange.SubFormat = KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUS;
drDDPlus48.DataRange.Specifier = KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
drDDPlus48.MaximumChannels = 2
drDDPlus48.MinimumBitsPerSample = 16; // All encoded data is transmitted at
drDDPlus48.MaximumBitsPerSample = 16; // 16 bits over IEC 60958.
drDDPlus48.MinimumSampleFrequency = 192000; // 48 KHz * 4.
drDDPlus48.MaximumSampleFrequency = 192000;

For a sampling rate of 44.1 KHz, an audio miniport driver uses the following code to define and initialize a KSDATARANGE_AUDIO structure:

//Define and initialize KSDATARANGE_AUDIO structure
// for use with a sample rate of 41.1 KHz.
KSDATARANGE_AUDIO drDDPlus44;
drDDPlus44.DataRange.FormatSize = sizeof(KSDATARANGE_AUDIO);
drDDPlus44.DataRange.Flags = 0 // Ignored.
drDDPlus44.DataRange.SampleSize = 0 // Ignored.
drDDPlus44.DataRange.Reserved = 0; 
drDDPlus44.DataRange.MajorFormat = KSDATAFORMAT_TYPE_AUDIO;
drDDPlus44.DataRange.SubFormat = KSDATAFORMAT_SUBTYPE_IEC61937_DOLBY_DIGITAL_PLUS;
drDDPlus44.DataRange.Specifier = KSDATAFORMAT_SPECIFIER_WAVEFORMATEX;
drDDPlus44.MaximumChannels = 2
drDDPlus44.MinimumBitsPerSample = 16; // All encoded data is transmitted at
drDDPlus44.MaximumBitsPerSample = 16; // 16 bits over IEC 60958.
drDDPlus44.MinimumSampleFrequency = 176400; // 44.1 KHz * 4
drDDPlus44.MaximumSampleFrequency = 176400;