USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 26
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bLowScale |
1 |
Number |
The setting for the attribute of the lowlevel Scaling Control. |
| 1 |
bHighScale |
1 |
Number |
The setting for the attribute of the highlevel Scaling Control. |
2.4 Type III Formats
These formats are based upon the IEC1937 standard. The IEC1937 standard describes a method to transfer non-PCM encoded audio bitstreams over an IEC958 digital audio interface, together with the transfer of the accompanying “Channel Status” and “User Data.”
The IEC958 standard specifies a widely used method of interconnecting digital audio equipment with twochannel linear PCM audio. The IEC1937 standard describes a way in which the IEC958 interface shall be used to convey non-PCM encoded audio bit streams for consumer applications.
The same basic techniques used in IEC1937 are reused here to convey non-PCM encoded audio bit streams over a Type III formatted audio stream.
2.4.1 Type III Format Type Descriptor
The Type III Format Type is identical to the Type I PCM Format Type, set up for two-channel 16-bit PCM data. It therefore uses two audio subframes per audio frame. The subframe size is two bytes and the bit resolution is 16 bits. The Type III Format Type descriptor is identical to the Type I Format Type descriptor but with the bNrChannels field set to two, the bSubframeSize field set to two and the bBitResolution field set to 16. All the techniques used to correctly transport Type I PCM formatted streams over USB equally apply to Type III formatted streams.
The non-PCM encoded audio bitstreams that are transferred within the basic 16-bit data area of the IEC1937 subframes (time-slots 12 [LSB] to 27 [MSB]) are placed unaltered in the two available 16-bit audio subframes per audio frame of the Type III formatted USB stream. The additional information in the IEC1937 subframes (channel status, user bits etc.) is discarded. Refer to the IEC1937 standard for a detailed description of the exact contents of the subframes.
The layout of the Type III Format Type descriptor is given here for clarity. All preassigned fields have been filled in.
Table 2-23: Type III Format Type Descriptor
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bLength |
1 |
Number |
Size of this descriptor, in bytes: 8+(ns*3) |
| 1 |
bDescriptorType |
1 |
Constant |
CS_INTERFACE descriptor type. |
| 2 |
bDescriptorSubtype |
1 |
Constant |
FORMAT_TYPE descriptor subtype. |
| 3 |
bFormatType |
1 |
Constant |
FORMAT_TYPE_III. Constant identifying the Format Type the AudioStreaming interface is using. |
| 4 |
bNrChannels |
1 |
Number |
Indicates the number of ‘virtual’ physical channels in the audio data stream. Must be set to two. |
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 27
| Offset |
Field |
Size |
Value |
Description |
| 5 |
bSubframeSize |
1 |
Number |
The number of bytes occupied by one audio subframe. Must be set to 2. |
| 6 |
bBitResolution |
1 |
Number |
The number of effectively used bits from the available bits in an audio subframe. |
| 7 |
bSamFreqType |
1 |
Number |
Indicates how the sampling frequency can be programmed: 0: Continuous sampling frequency 1..255: The number of discrete sampling frequencies supported by the isochronous data endpoint of the AudioStreaming interface (ns) |
| 8... |
|
|
|
See sampling frequency tables, below. |
Depending on the value in the bSamFreqType field, the layout of the next part of the descriptor is as shown in the following tables.
Table 2-24: Continuous Sampling Frequency
| Offset |
Field |
Size |
Value |
Description |
| 8 |
tLowerSamFreq |
3 |
Number |
Lower bound in Hz of the sampling frequency range for this isochronous data endpoint. |
| 11 |
tUpperSamFreq |
3 |
Number |
Upper bound in Hz of the sampling frequency range for this isochronous data endpoint. |
Table 2-25: Discrete Number of Sampling Frequencies
| Offset |
Field |
Size |
Value |
Description |
| 8 |
tSamFreq [1] |
3 |
Number |
Sampling frequency 1 in Hz for this isochronous data endpoint. |
| … |
… |
… |
… |
… |
| 8+(ns-1)*3 |
tSamFreq [ns] |
3 |
Number |
Sampling frequency ns in Hz for this isochronous data endpoint. |
Note: In the case of adaptive isochronous data endpoints that support only a discrete number of sampling frequencies, the endpoint must at least tolerate ±1000 PPM inaccuracy on the reported sampling frequencies.
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 28
3 Adding New Audio Data Formats
Adding new Audio Data Formats to this specification is achieved by proposing a fully documented Audio Data Format to the Audio Device Class Working Group. Upon acceptance, they will register the new Audio Data Format (attribute a unique wFormatTag) and update this document accordingly. This process will also guarantee that new releases of generic USB audio drivers will support the newly registered Audio Data Formats.
It is always possible to use vendor-specific definitions if the above procedure is considered unsatisfactory.
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 29
Appendix A. Additional Audio Device Class Codes
A.1 Audio Data Format Codes
A.1.1 Audio Data Format Type I Codes
Table A-1: Audio Data Format Type I Codes
| Name |
wFormatTag |
| TYPE_I_UNDEFINED |
0x0000 |
| PCM |
0x0001 |
| PCM8 |
0x0002 |
| IEEE_FLOAT |
0x0003 |
| ALAW |
0x0004 |
| MULAW |
0x0005 |
A.1.2 Audio Data Format Type II Codes
Table A-2: Audio Data Format Type II Codes
| Name |
wFormatTag |
| TYPE_II_UNDEFINED |
0x1000 |
| MPEG |
0x1001 |
| AC-3 |
0x1002 |
A.1.3 Audio Data Format Type III Codes
Table A-3: Audio Data Format Type III Codes
| Name |
wFormatTag |
| TYPE_III_UNDEFINED |
0x2000 |
| IEC1937_AC-3 |
0x2001 |
| IEC1937_MPEG-1_Layer1 |
0x2002 |
IEC1937_MPEG-1_Layer2/3 or IEC1937_MPEG-2_NOEXT |
0x2003 |
| IEC1937_MPEG-2_EXT |
0x2004 |
| IEC1937_MPEG-2_Layer1_LS |
0x2005 |
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 30
| Name |
wFormatTag |
| IEC1937_MPEG-2_Layer2/3_LS |
0x2006 |
A.2 Format Type Codes
Table A-4: Format Type Codes
| Format Type Code |
Value |
| FORMAT_TYPE_UNDEFINED |
0x00 |
| FORMAT_TYPE_I |
0x01 |
| FORMAT_TYPE_II |
0x02 |
| FORMAT_TYPE_II |
0x03 |
A.3 Format-Specific Control Selectors
A.3.1 MPEG Control Selectors
Table A-5: MPEG Control Selectors
| Control Selector |
Value |
| MPEG_CONTROL_UNDEFINED |
0x00 |
| MP_DUAL_CHANNEL_CONTROL |
0x01 |
| MP_SECOND_STEREO_CONTROL |
0x02 |
| MP_MULTILINGUAL_CONTROL |
0x03 |
| MP_DYN_RANGE_CONTROL |
0x04 |
| MP_SCALING_CONTROL |
0x05 |
| MP_HILO_SCALING_CONTROL |
0x06 |
A.3.2 AC-3 Control Selectors
Table A-6: AC-3 Control Selectors
| Control Selector |
Value |
| AC_CONTROL_UNDEFINED |
0x00 |
| AC_MODE_CONTROL |
0x01 |
| AC_DYN_RANGE_CONTROL |
0x02 |
| AC_SCALING_CONTROL |
0x03 |
最終更新:2011年05月23日 01:29