USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 56
Extension Unit is not available in this case because it is bypassed). Default behavior is assumed when set
to off. In the case of a single Input Pin, logical channels that enter the Extension Unit are passed unaltered
for those channels that are also present in the output cluster. Logical channels not available in the output
cluster are absorbed by the Extension Unit. Logical channels present in the output cluster but unavailable
in the input cluster are muted. In case of multiple Input Pins, corresponding logical input channels are
equally mixed together before being passed to the output.
An index to a string descriptor is provided to further describe the Extension Unit.
The following table outlines the Extension Unit descriptor.
Table 4-15: Extension Unit Descriptor
Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor, in bytes: 13+p+n
1 bDescriptorType 1 Constant CS_INTERFACE descriptor type.
2 bDescriptorSubtype 1 Constant EXTENSION_UNIT descriptor subtype.
3 bUnitID 1 Number Constant uniquely identifying the Unit
within the audio function. This value is
used in all requests to address this Unit.
4 wExtensionCode 2 Constant Vendor-specific code identifying the
Extension Unit.
6 bNrInPins 1 Number Number of Input Pins of this Unit: p
7 baSourceID(1) 1 Number ID of the Unit or Terminal to which the
first Input Pin of this Extension Unit is
connected.
… … … … …
7+(p-1) baSourceID (p) 1 Number ID of the Unit or Terminal to which the
last Input Pin of this Extension Unit is
connected.
7+p bNrChannels 1 Number Number of logical output channels in the
audio channel cluster of the Extension
Unit.
7+p+1 wChannelConfig 2 Bitmap Describes the spatial location of the
logical channels in the audio channel
cluster of the Extension Unit.
7+p+3 iChannelNames 1 Index Index of a string descriptor, describing
the name of the first logical channel in the
audio channel cluster of the Extension
Unit.
11+p bControlSize 1 Number Size, in bytes, of the bmControls field: n
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 57
Offset Field Size Value Description
12+p bmControls n Bitmap A bit set to 1 indicates that the mentioned
Control is supported:
D0 Enable Processing
D1..(n*8-1)
Reserved
12+p+n iExtension 1 Index Index of a string descriptor, describing
this Extension Unit.
4.3.2.8 Associated Interface Descriptor
The Associated Interface descriptor provides a means to indicate a relationship between a Terminal or a
Unit and an interface, external to the audio function. It directly follows the Entity descriptor to which it is
related.
The bInterfaceNr field contains the interface number of the associated interface. The remainder of the
descriptor depends both on the Entity to which it is related and on the interface class of the target
interface. At this moment, no specific layouts are defined by this specification.
The following table outlines the Associated Interface descriptor.
Table 4-16: Associated Interfaces Descriptor
Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor, in bytes: 4+x
1 bDescriptorType 1 Constant CS_INTERFACE descriptor type.
2 bDescriptorSubtype 1 Constant ASSOC_INTERFACE descriptor subtype.
3 bInterfaceNr 1 Number The interface number of the associated
interface.
4 Association-specific x Number Association-specific extension to the
open-ended descriptor.
4.4 AudioControl Endpoint Descriptors
The following sections describe all possible endpoint-related descriptors for the AudioControl interface.
4.4.1 AC Control Endpoint Descriptors
4.4.1.1 Standard AC Control Endpoint Descriptor
Because endpoint 0 is used as the AudioControl control endpoint, there is no dedicated standard control
endpoint descriptor.
4.4.1.2 Class-Specific AC Control Endpoint Descriptor
There is no dedicated class-specific control endpoint descriptor.
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 58
4.4.2 AC Interrupt Endpoint Descriptors
4.4.2.1 Standard AC Interrupt Endpoint Descriptor
The interrupt 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. Its fields are set to reflect the interrupt type of the endpoint. This endpoint is optional.
The following table outlines the standard AC Interrupt Endpoint descriptor.
Table 4-17: Standard AC Interrupt 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. 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
00 = None
D1..0: Transfer type
11 = Interrupt
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. Used here to
pass 2-byte status information.
Set to 2 if not shared, set to the
appropriate value if shared.
6 bInterval 1 Number Left to the designer’s discretion. A value
of 10 ms or more seems sufficient.
7 bRefresh 1 Number Reset to 0.
8 bSynchAddress 1 Endpoint Reset to 0.
4.4.2.2 Class-Specific AC Interrupt Endpoint Descriptor
There is no class-specific AudioControl interrupt endpoint descriptor.
4.5 AudioStreaming Interface Descriptors
The AudioStreaming (AS) interface descriptors contain all relevant information to characterize the
AudioStreaming interface in full.
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 59
4.5.1 Standard AS Interface Descriptor
The standard AS interface descriptor is identical to the standard interface descriptor defined in Section
9.6.3, “Interface,” of the USB Specification, except that some fields now have dedicated values.
Table 4-18: Standard AS Interface Descriptor
Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor, in bytes: 9
1 bDescriptorType 1 Constant INTERFACE descriptor type
2 bInterfaceNumber 1 Number Number of interface. A zero-based value
identifying the index in the array of
concurrent interfaces supported by this
configuration.
3 bAlternateSetting 1 Number Value used to select an alternate setting
for the interface identified in the prior
field.
4 bNumEndpoints 1 Number Number of endpoints used by this
interface (excluding endpoint 0).
5 bInterfaceClass 1 Class AUDIO Audio Interface Class code
(assigned by the USB). See Section A.1,
“Audio Interface Class Code.”
6 bInterfaceSubClass 1 Subclass AUDIO_STREAMING Audio Interface
Subclass code. Assigned by this
specification. See Section A.2, “Audio
Interface Subclass Codes.”
7 bInterfaceProtocol 1 Protocol Not used. Must be set to 0.
8 iInterface 1 Index Index of a string descriptor that describes
this interface.
4.5.2 Class-Specific AS Interface Descriptor
The bTerminalLink field contains the unique Terminal ID of the Input or Output Terminal to which this
interface is connected.
The bDelay field holds a value that is a measure for the delay that is introduced in the audio data stream
due to internal processing of the signal within the audio function. The Host software can take this value
into account when phase relations between audio streams, processed by different audio functions, are
important.
The wFormatTag field holds information about the Audio Data Format that should be used when
communicating with this interface. If the interface has a USB isochronous endpoint associated with it, the
wFormatTag field describes the Audio Data Format that should be used when exchanging data with this
endpoint. If the interface has no endpoint, the wFormatTag field describes the Audio Data Format that is
used on the (external) connection this interface represents.
This specification defines a number of standard Formats, ranging from Mono 8-bit PCM to MPEG2 7.1
encoded audio streams. A complete list of supported Audio Data Formats is provided in a separate
document, USB Audio Data Formats, that is considered part of this specification. Further specific
USB Device Class Definition for Audio Devices
Release 1.0 March 18, 1998 60
information concerning the Audio Data Format for this interface is reported in a separate type-specific
descriptor, see Section 4.5.3, “Class-Specific AS Format Type Descriptor.” This can optionally be
supplemented by format-specific information through a format-specific descriptor, see Section 4.5.4,
“Class-Specific AS Format-Specific Descriptor.”
Table 4-19: Class-Specific AS Interface Descriptor
Offset Field Size Value Description
0 bLength 1 Number Size of this descriptor in bytes: 7
1 bDescriptorType 1 Constant CS_INTERFACE descriptor type.
2 bDescriptorSubtype 1 Constant AS_GENERAL descriptor subtype.
3 bTerminalLink 1 Constant The Terminal ID of the Terminal to which
the endpoint of this interface is
connected.
4 bDelay 1 Number Delay (d) introduced by the data path
(see Section 3.4, “Inter Channel
Synchronization”). Expressed in number
of frames.
5 wFormatTag 2 Number The Audio Data Format that has to be
used to communicate with this interface.
4.5.3 Class-Specific AS Format Type Descriptor
The wFormatTag field in the class-specific AS Interface Descriptor implicitly indicates which Format
Type should be used to communicate with the connection (USB or external) this interface represents.
(Each Audio Data Format belongs to a certain Format Type as outlined in USB Audio Data Formats.)
Each Format Type has a specific Format Type descriptor associated with it. This class-specific AS Format
Type descriptor follows the class-specific AS interface descriptor and delivers format type-specific
information to the Host. The details and layout of this descriptor for each of the supported Format Types is
found in USB Audio Data Formats.
4.5.4 Class-Specific AS Format-Specific Descriptor
As stated earlier, the wFormatTag field in the class-specific AS Interface Descriptor not only describes to
what Format Type the interface belongs. It also states exactly what Audio Data Format should be used to
communicate with the connection (USB or external) this interface represents. Some Audio Data Formats
need additional format-specific information conveyed to the Host. Therefore, the Format Type descriptor
may be followed by a class-specific AS format-specific descriptor. The details and layout of this descriptor
for the Audio Data Formats that need it, is outlined in USB Audio Data Formats.
4.6 AudioStreaming Endpoint Descriptors
The following sections describe all possible endpoint-related descriptors for the AudioStreaming interface.
最終更新:2011年05月02日 03:33