Digital Audio Protection

Digital Audio Protection - 3

Digital Audio Protection

May 12, 2008

Abstract

This paper includes information about Windows® Media Center capabilities in Windows Vista® Home Premium and Windows Vista Ultimate editions. It provides guidelines for independent hardware vendors (IHVs) to enable and disable High-Bandwidth Digital Content Protection (HDCP) over High-Definition Multimedia Interface (HDMI) and Serial Copy Management System (SCMS) protection over Sony/Philips Digital Interconnect Format (SPDIF) in the Windows Vista Media Center Feature Pack 2008 release.

This information applies only for the Windows Vista Media Center Feature Pack 2008 release and will be deprecated in future Windows releases.

References and resources discussed here are listed at the end of this paper.

For the latest information, see:
http://www.microsoft.com/whdc/device/audio/digital-aud_protect.mspx

Disclaimer: This is a preliminary document and may be changed substantially prior to final commercial release of the software described herein.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This white paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

You have no obligation to give Microsoft any suggestions, comments or other feedback ("Feedback") relating to this document. However, any Feedback you voluntarily provide may be used in Microsoft Products or other documentation (collectively, "Microsoft Offerings") which in turn may be relied upon by other third parties to develop their own Products. Accordingly, if you do give Microsoft Feedback on any version of this document or the Microsoft Offerings to which they apply, you agree: (a) Microsoft may freely use, reproduce, license, distribute, and otherwise commercialize your Feedback in any Microsoft Offering; (b) You also grant third parties, without charge, only those patent rights necessary to enable other Products to use or interface with any specific parts of a Microsoft Product that incorporate your Feedback; and (c) You will not give Microsoft any Feedback (i) that you have reason to believe is subject to any patent, copyright or other intellectual property claim or right of any third party; or (ii) subject to license terms which seek to require any Microsoft Offering incorporating or derived from such Feedback, or other Microsoft intellectual property, to be licensed to or otherwise shared with any third party.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Microsoft, Windows, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

All other trademarks are property of their respective owner.

© 2008 Microsoft Corporation. All rights reserved.

Document History

Date / Change /
May 12, 2008 / Updated to reflect a temporary solution that applies only to the Windows Vista Media Center Feature Pack 2008 release.
February 4, 2008 / First publication

Contents

Introduction 3

Scenarios 3

Overview 3

General Setup for Protecting Audio 4

Audio Device Driver Setup 4

Application Setup 4

Enabling HDCP for Audio over HDMI 4

Enabling SCMS for Audio over SPDIF 5

Resources 6

Introduction

This paper defines a temporary mechanism for an audio device driver stack to enable and disable two hardware-based content access technologies. The solutions in this document define I/O control (IOCTL) codes and class IDs that are necessary to implement High-Bandwidth Digital Content Protection (HDCP) over High-Definition Multimedia Interface (HDMI) and Serial Copy Management System (SCMS) protection over Sony/Philips Digital Interconnect Format (SPDIF) for the Windows Vista® Media Center Feature Pack 2008 release.

This paper does not indicate a recommendation or endorsement by Microsoft for these solutions. The goal of this document is to provide independent hardware vendors (IHVs) with sufficient information to attempt to build temporary custom solutions that can interoperate with Windows® Media Center so that these solutions do not jeopardize the stability and security of the operating system.

The information in this paper applies only for Windows Vista Media Center Feature Pack 2008. These solutions are specific to this release and should not be used for any other Windows audio content access control scenarios or by third-party media playback applications. These solutions will be deprecated in future Windows releases.

Scenarios

This paper addresses the following two common digital audio scenarios:

·  Video playback with HDMI audio.

·  HDCP is the mechanism for protecting digital audio/video content over HDMI.

·  The operating system enumerates HDMI as a digital audio device.

·  Audio and video are streamed through the same HDMI endpoint, and audio obtains the same HDCP protections that are set on the video stream.

·  Video playback with SPDIF (TOSLink or coaxial) audio.

·  SCMS is the mechanism for protecting digital audio content over SPDIF.

·  The operating system enumerates SPDIF as a digital audio device.

·  Audio is streamed through the SPDIF endpoint with SCMS applied.

Overview

Windows Vista® provides various mechanisms that attempt to protect content from being illegally copied. Despite these protection mechanisms, Windows Vista does not explicitly address the following two scenarios:

·  End-to-end protection of HDMI audio with HDCP as protected content passes through HDMI to the TV display.

·  End-to-end protection of digital audio content with SCMS as protected content is streamed across SPDIF.

This paper proposes a mechanism that IHVs can implement to better protect digital audio content over HDMI and SPDIF.

General Setup for Protecting Audio

Both HDMI and SPDIF mechanisms share a common control system, which is accessed by a secondary logical device that controls the audio device and reports the protection status. If HDMI or SPDIF protection features are supported, the audio driver of the system must populate this secondary logical device so that an application can use the features when it accesses the logical device. The following steps outline the basic process.

Audio Device Driver Setup

1. Enumerate a physical device object (PDO) for the logical protection device, which is internally linked to the audio device to which it is related.

2. Call AddDevice for the PDO, and create and enable a CLSID_AudioProtection device interface by using the IoRegisterDeviceInterface and IoSetDeviceInterfaceState interfaces for the functional device object (FDO) that is being created.

Application Setup

1. Locate the device node for the audio endpoint where audio is being rendered by calling SetupDiEnumDeviceInfo.

2. Obtain the audio protection device name related to the device by using SetupDiGetDeviceInterfaceDetail for the CLSID_AudioProtection interface class ID.

3. Open the audio protection device.

The following are the definitions for the CLSID_AudioProtection interface class ID:

//

// Class ID of drivers that support the audio protection IOCTLs

//

DEFINE_GUID( CLSID_AudioProtection, 0x9ff3b516, 0xcd99, 0x4eaf, 0x83, 0x73, 0xf2, 0xca, 0xf8, 0x7e, 0xd2, 0x6b );

The specific audio protection controls to and from the device are described later in this paper.

Enabling HDCP for Audio over HDMI

HDCP is the mechanism that protects digital audio content over HDMI. This is the same mechanism that is used to protect digital video content over HDMI. Setting HDCP protections on the video stream creates the same HDCP protections on its audio stream. Because the HDCP protection mechanism for video already exists, HDCP is the primary method to use to protect the digital audio stream over HDMI.

After a player application sets HDCP protections on the video stream, the application can follow the steps outlined in “General Setup for Protecting Audio” to locate and connect to the logical audio protection device for the audio stream that is being rendered. If the audio endpoint for factor is HDMI, the IOCTL_AUDIO_GET_
HDCP_STATUS control can be used to verify that the audio stream is being protected over HDCP.

In addition to determining whether HDCP is enabled, the application can optionally provide the HDMI Audio Content Protection (ACP) Type and ACP Type Dependent information for the audio stream. The ACP Type and ACP Type Dependent data are defined in High-Definition Multimedia Interface Specification 1.3a.

When the application sets ACP information, it should open the logical audio protection device in exclusive mode.

The following are the IOCTL definitions for HDMI protections:

//

// Audio protection IOCTLs for HDCP

//

#define IOCTL_AUDIO_GET_HDCP_STATUS \

CTL_CODE(FILE_DEVICE_WAVE_OUT, 0x200, METHOD_BUFFERED, FILE_READ_ACCESS)

#define IOCTL_AUDIO_SET_HDMI_ACP \

CTL_CODE(FILE_DEVICE_WAVE_OUT, 0x201, METHOD_BUFFERED, FILE_WRITE_ACCESS)

#define IOCTL_AUDIO_GET_HDMI_ACP \

CTL_CODE(FILE_DEVICE_WAVE_OUT, 0x201, METHOD_BUFFERED, FILE_READ_ACCESS)

//

// IOCTL output buffer for IOCTL_AUDIO_GET_HDCP_STATUS

//

// The output buffer for IOCTL_AUDIO_HDCP_STATUS

typedef struct _AUDIO_HDCP_STATUS

{

BOOL HdcpEnabled;

} AUDIO_HDCP_STATUS, *PAUDIO_HDCP_STATUS;

// The buffer for IOCTL_AUDIO_SET_HDMI_ACP and IOCTL_AUDIO_GET_HDMI_ACP

typedef struct _AUDIO_HDMI_ACP

{

BYTE ACP_Type; // As per hdmi 1.3a

BYTE Reserved_HB2; // Set MBZ, Get Ignore

BYTE ACP_Type_Dependent[ 28 ];

} AUDIO_HDMI_ACP, *PAUDIO_HDMI_ACP;

Enabling SCMS for Audio over SPDIF

SCMS is the mechanism that protects digital audio content over SPDIF. The logical audio protection device, described earlier in “General Setup for Protecting Audio,” is used to control the SCMS output of the audio device with which it is associated.

After a player application determines the form factor of the audio endpoint for which audio is being rendered, the application follow the steps outlined in “General Setup for Protecting Audio” to locate and connect to the logical audio protection device for the audio stream that is being rendered. The IOCTL_AUDIO_SET_SCMS_STATUS control is used to set the SCMS control data of the SPDIF audio stream.

For SCMS protections, the application should open the logical audio protection device in exclusive mode for the duration that SCMS is applied.

The following are the definitions for IOCTL_AUDIO_SET_SCMS_STATUS and IOCTL_AUDIO_GET_SCMS_STATUS:

//

// Audio protection IOCTLs for SCMS

//

#define IOCTL_AUDIO_SET_SCMS_STATUS \

CTL_CODE(FILE_DEVICE_WAVE_OUT, 0x202, METHOD_BUFFERED, FILE_WRITE_ACCESS)

#define IOCTL_AUDIO_GET_SCMS_STATUS \

CTL_CODE(FILE_DEVICE_WAVE_OUT, 0x202, METHOD_BUFFERED, FILE_READ_ACCESS)

//

// The IOCTL buffer for IOCTL_AUDIO_GET_SCMS_STATUS and

// IOCTL_AUDIO_SET_SCMS_STATUS

//

// The buffer for IOCTL_AUDIO_SET_SCMS_STATUS and IOCTL_AUDIO_GET_SCMS_STATUS

typedef struct _AUDIO_SCMS_STATUS

{

union

{

BYTE Byte0;

struct

{

BYTE Reserved1:2; // Set MBZ, Get Ignore

BYTE Copy:1; // 1 = allowed

BYTE Reserved2:5; // Set MBZ, Get Ignore

};

};

union

{

BYTE Byte1;

struct

{

BYTE CatagoryCode:7; // SPDIF defined. 0=general

BYTE BitL:1; // Original or !Original based on

}; // lower 3 bits of CategoryCode

};

} AUDIO_SCMS_STATUS, *PAUDIO_SCMS_STATUS;

Resources

High-Definition Multimedia Interface Specification 1.3a

http://www.hdmi.org/download/HDMISpecification13a.pdf

May 12, 2008
© 2008 Microsoft Corporation. All rights reserved.