USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 61
4.6.1 AS Isochronous Audio Data Endpoint Descriptors
The standard and class-specific audio data endpoint descriptors provide pertinent information on how
audio data streams are communicated to the audio function. In addition, specific endpoint capabilities and
properties are reported.
4.6.1.1 Standard AS Isochronous Audio Data Endpoint Descriptor
The standard AS isochronous audio data endpoint descriptor is identical to the standard endpoint
descriptor defined in Section 9.6.4, “Endpoint,” of the USB Specification and further expanded as defined
in the Universal Serial Bus Class Specification. D7 of the bEndpointAddress field indicates whether the
endpoint is an audio source (D7 = 1) or an audio sink (D7 = 0). The bmAttributes Field bits are set to
reflect the isochronous type of the endpoint. The synchronization type is indicated by D3..2 and must be
set to Asynchronous, Adaptive or Synchronous. For further details, refer to Section 5.10.4.1,
“Synchronous Type,” of the USB Specification.
Table 4-20: Standard AS Isochronous Audio Data Endpoint Descriptor
Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor, in bytes: 9
1 bDescriptorType 1 Constant ENDPOINT descriptor type
2 bEndpointAddress 1 Endpoint The address of the endpoint on the USB
device described by this descriptor. The
address is encoded as follows:
D7: Direction.
0 = OUT endpoint
1 = IN endpoint
D6..4: Reserved, reset to zero
D3..0: The endpoint number,
determined by the designer.
3 bmAttributes 1 Bit Map D3..2: Synchronization type
01 = Asynchronous
10 = Adaptive
11 = Synchronous
D1..0: Transfer type
01 = Isochronous
All other bits are reserved.
4 wMaxPacketSize 2 Number Maximum packet size this endpoint is
capable of sending or receiving when this
configuration is selected.
This is determined by the audio
bandwidth constraints of the endpoint.
6 bInterval 1 Number Interval for polling endpoint for data
transfers expressed in milliseconds.
Must be set to 1.
7 bRefresh 1 Number Reset to 0.
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 62
Offset Field Size Value Description
8 bSynchAddress 1 Endpoint The address of the endpoint used to
communicate synchronization information
if required by this endpoint. Reset to zero
if no synchronization pipe is used.
4.6.1.2 Class-Specific AS Isochronous Audio Data Endpoint Descriptor
The bmAttributes field indicates which endpoint-specific Controls this endpoint supports through bits
D6..0. Bit D7 is reserved to indicate whether the endpoint always needs USB packets of wMaxPacketSize
length (D7 = 1) or that it can handle short packets (D7 = 0). In any case, the endpoint is required to
support null packets. This bit must be used by the Host software to determine if the driver should pad all
potential short packets (except null packets) with zero bytes to wMaxPacketSize length before sending
them to an OUT endpoint. Likewise, when receiving data from an IN endpoint, the Host software must be
prepared to receive more bytes than expected and discard the superfluous zero bytes.
The bLockDelayUnits and wLockDelay fields are used to indicate to the Host how long it takes for the
clock recovery circuitry of this endpoint to lock and reliably produce or consume the audio data stream.
This information can be used by the Host to take appropriate action so that no meaningful data gets lost
during the locking period. (for instance, sending digital silence during lock period)
Depending on the implementation, the locking period can be a fixed amount of time or can be
proportional to the sampling frequency. In this case, it usually takes a fixed amount of samples to become
locked. To accommodate both cases, the bLockDelayUnits field indicates whether the wLockDelay field
is expressed in time (milliseconds) or number of samples.
Note: Some implementations may use locking strategies that do not lead to either fixed time or fixed
number of samples lock delay. In this case, a worst case value can be reported back to the Host.
The bLockDelayUnits and wLockDelay fields are only applicable for synchronous and adaptive
endpoints. For asynchronous endpoints, the clock is generated internally in the audio function and is
completely independent. In this case, bLockDelayUnits and wLockDelay must be set to zero.
Table 4-21: Class-Specific AS Isochronous Audio Data Endpoint Descriptor
Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor, in bytes: 7
1 bDescriptorType 1 Constant CS_ENDPOINT descriptor type.
2 bDescriptorSubtype 1 Constant EP_GENERAL descriptor subtype.
3 bmAttributes 1 Bit Map A bit in the range D6..0 set to 1 indicates
that the mentioned Control is supported
by this endpoint.
D0: Sampling Frequency
D1: Pitch
D6..2: Reserved
Bit D7 indicates a requirement for
wMaxPacketSize packets.
D7: MaxPacketsOnly
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 63
Offset Field Size Value Description
4 bLockDelayUnits 1 Number Indicates the units used for the
wLockDelay field:
0: Undefined
1: Milliseconds
2: Decoded PCM samples
3..255: Reserved
5 wLockDelay Number Indicates the time it takes this endpoint
to reliably lock its internal clock recovery
circuitry. Units used depend on the value
of the bLockDelayUnits field.
4.6.2 AS Isochronous Synch Endpoint Descriptor
This descriptor is present only when one or more isochronous audio data endpoints of the adaptive source
type or the asynchronous sink type are implemented.
4.6.2.1 Standard AS Isochronous Synch Endpoint Descriptor
The isochronous synch endpoint descriptor is identical to the standard endpoint descriptor defined in
Section 9.6.4, “Endpoint,” of the USB Specification and further expanded as defined in the Universal
Serial Bus Class Specification. The bmAttributes field bits are set to reflect the isochronous type and
synchronization type of the endpoint.
Table 4-22: Standard AS Isochronous Synch Endpoint Descriptor
Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor, in bytes: 9
1 bDescriptorType 1 Constant ENDPOINT descriptor type.
2 bEndpointAddress 1 Endpoint The address of the endpoint on the USB
device described by this descriptor. The
address is encoded as follows:
D7: Direction.
0 = OUT endpoint for sources
1 = IN endpoint for sinks
D6..4: Reserved, reset to zero
D3..0: The endpoint number,
determined by the designer.
3 bmAttributes 1 Bit Map
D3..2: Synchronization type
00 = None
D1..0: Transfer type
01 = Isochronous
All other bits are reserved.
4 wMaxPacketSize 2 Number Maximum packet size this endpoint is
capable of sending or receiving when this
configuration is selected.
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 64
Offset Field Size Value Description
6 bInterval 1 Number Interval for polling endpoint for data
transfers expressed in milliseconds.
Must be set to 1.
7 bRefresh 1 Number This field indicates the rate at which an
isochronous synchronization pipe
provides new synchronization feedback
data. This rate must be a power of 2,
therefore only the power is reported back
and the range of this field is from 1
(2 ms) to 9 (512 ms).
8 bSynchAddress 1 Endpoint Must be reset to zero.
4.6.2.2 Class-Specific AS Isochronous Synch Endpoint Descriptor
There is no class-specific AS isochronous synch endpoint descriptor.
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 65
5 Requests
5.1 Standard Requests
The Audio Device Class supports the standard requests described in Section 9, “USB Device Framework,”
of the USB Specification. The Audio Device Class places no specific requirements on the values for the
standard requests.
5.2 Class-Specific Requests
Most class-specific requests are used to set and get audio related Controls. These Controls fall into two
main groups: those that manipulate the audio function Controls, such as volume, tone, selector position,
etc. and those that influence data transfer over an isochronous endpoint, such as the current sampling
frequency.
· AudioControl Requests. Control of an audio function is performed through the manipulation of the
attributes of individual Controls that are embedded in the Units of the audio function. The classspecific
AudioControl interface descriptor contains a collection of Unit descriptors, each indicating
which Controls are present in every Unit. AudioControl requests are always directed to the single
AudioControl interface of the audio function. The request contains enough information (Unit ID,
Channel Number, and Control Selector) for the audio function to decide to where a specific request
must be routed. The same request layout can be used for vendor-specific requests to Extension Units.
However, they are not covered by this specification.
· AudioStreaming Requests. Control of the class-specific behavior of an AudioStreaming interface is
performed through manipulation of either interface Controls or endpoint Controls. These can be
either standard Controls, as defined in this specification or vendor-specific. In either case, the same
request layout can be used. AudioStreaming requests are directed to the recipient where the Control
resides. This can be either the interface or its associated isochronous endpoint.
The Audio Device Class supports additional class-specific request:
· Memory Requests. Every addressable Entity in the audio function (Terminal, Unit, and endpoint)
can expose a memory-mapped interface that provides the means to generically manipulate the Entity.
Vendor-specific Control implementations could be based on this type of request.
· The Get Status request is a general query to an Entity in the AudioControl interface or one of the
Audio Streaming interfaces and does not manipulate Controls.
In principle, all requests are optional. If an audio function does not support a certain request, it must
indicate this by stalling the control pipe when that request is issued to the function. However, if a certain
Set request is supported, the associated Get request must also be supported. Get requests may be supported
without the associated Set request being supported.
The rest of this section describes the class-specific requests used to manipulate both audio Controls and
endpoint Controls.
5.2.1 Request Layout
The following paragraphs describe the general structure of the Set and Get requests. Subsequent
paragraphs detail the use of the Set/Get requests for the different request types.
最終更新:2011年05月02日 03:33