Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
USB System Architecture (USB 2.0).pdf
Скачиваний:
172
Добавлен:
03.05.2015
Размер:
7.03 Mб
Скачать

Chapter 21: Device Classes

Monitor Class — Defined to control monitor configuration and is specified in a single document.

-Monitor Device Document 1.0.

Physical Interface Device Class (PID) — Devices that provide tactile feedback to operator. Examples include: Joystick with variable resistance for simulating increased stick forces and turbulence. Split off from HID class. This class is specified in the:

-Device Class Definition for PID 1.0 document.

Power Device Class — Devices that provide power to system or to peripherals. Example devices include: Uninterruptable power supplies and smart batteries. Can be either stand alone device or integrated into the interface. The related document is the:

-Power Device Class Document 1.0.

Printer Device Class — Defines the descriptors, endpoints, and requests for printers. This class is specified by a single document.

-Printer Device Class Document 1.1

Another important class document that relates to all device classes is the “Universal Serial Bus Common Class Specification.” This document is intended as a guideline for developing device class specifications to promote compliant implementations of generic device drivers. To this end, the document describes the basic requirements for all USB classes and related specifications. It also describes common characteristic, attributes, and services used by many of the classes.

The following sections introduce the major features of the audio, device classes discussed previously.

Audio Device Class

The audio class specification defines standardized audio transport mechanisms used to propagate and control digital audio. A major focus of the audio class is synchronization of the audio data stream to ensure no distortion of the sound.

Each audio function has its own device interface that is used to access and control the function. Audio devices are those devices that interact with USB-com- pliant audio data streams. Audio devices are grouped into subclasses as listed below:

8-bit Pulse Code Modulated (PCM) Audio Data

16-bit PCM Audio Data

16-bit Dolby Surround Data

407

USB System Architecture

IEC958 Audio Encoded Data

MPEG1 Audio Encoded Data

AC3 Audio Encoded Data

Each of these subclasses has protocol codes that further define the audio device. The subclass codes and protocol codes are defined in Table 21-1. Note that the protocol codes only apply to certain subclasses and that some protocols can apply to more than one subclass. The definition for AC3 encoded data was not completely defined at the time of writing.

Table 21-1: Audio Subclasses and Protocols

Subclass

Subclass Name

Protocol

Protocol Name

Code

Code

 

 

 

 

 

 

 

 

 

 

01h

8-bit Pulse Code Modulated

01h

Mono

 

(PCM) Audio Data

02h

Stereo

 

 

 

 

02h

16-bit PCM Audio Data

01h

Mono

 

 

02h

Stereo

 

 

03h

Quadro

 

 

04h

Stereo & Stereo

 

 

 

 

03h

16-bit Dolby Surround Data

02h

Stereo

 

 

 

 

04h

IEC958 Audio Encoded Data

05h

IEC958 Consumer

 

 

06h

IEC958 Professional

 

 

 

 

05h

MPEG1 Audio Encoded Data

07h

Layer 1

 

 

08h

Layer 2

 

 

 

 

06h

AC3 Audio Encoded Data

TBD

TBD

 

 

 

 

Standard Audio Interface Requirements

The standard endpoints required by an audio include the following:

Control Endpoint Zero — used to manipulate settings and to retrieve the state of the audio function.

Interrupt Endpoint — used to obtain status information.

Isochronous Endpoint — one or more isochronous endpoints for audio data transfers. Note that a synchronization endpoint may accompany an isochro-

408

Chapter 21: Device Classes

nous endpoint.

The number of isochronous endpoints required is specified for each audio subclass/protocol combination defined in Table 21-1. For example, all PCM audio data subclass/protocol combinations require a single isochronous endpoint except for the 16-bit PCM Stereo & Stereo interface, which requires two isochronous endpoints.

Synchronization Types

The audio device class specification defines three methods that an isochronous endpoint can use to ensure synchronization between itself and the host:

Asynchronous — Isochronous endpoints using asynchronous synchronization send or receive audio data at a rate that is locked to an external clock or a free running internal clock. The device cannot synchronize the transfer rate to the USB clock (based on the 1ms Start of Frame).

Synchronous — Devices whose isochronous endpoints have their own sense of timing and need to synchronize their audio data rate to the USB’s SOF. Two methods are defined to accomplish this:

1.Synchronize the sample clock to the 1ms SOF.

2.Adjust the SOF until it is synchronous to the sample clock.

Adaptive — These devices have a specific range of rates at which they can send or receive audio data, permitting them to synchronize to the rate imposed at their interface by SOF timing.

Audio Class-Specific Descriptors

The audio class specification defines a class-specific interface descriptor and class-specific endpoint descriptors. These class-specific descriptors are in addition to the standard interface and endpoint descriptors. Devices are configured based on the standard endpoint descriptor information; that is, bus bandwidth is allocated based on the requirements specified within the descriptors. Once the audio class driver loads, it must obtain additional information from the device to completely understand the properties supported by the device and the method used for data synchronization. See the audio class specification for details regarding the format and definition of these class-specific descriptors.

409

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]