USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 21
The Scaling Control can support all possible Control attributes (CUR, MIN, MAX, and RES). The valid range for the CUR, MIN, MAX, and RES attributes is from zero (0x00) to 255/256 (0xFF). The Scaling Control honors the request to the best of its abilities. It may round the bScale attribute value to its closest available setting. It will report this rounded setting when queried during a Get MPEG Control request.
Table 2-14: Scaling Control Parameter Block
| Control Selector |
MP_SCALING_CONTROL |
| wLength |
1 |
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bScale |
1 |
Number |
The setting for the attribute of the Scaling Control. |
2.3.8.1.2.3.6 High/Low Scaling Control
The High/Low Scaling Control is used to manipulate the two scaling coefficients used by MPEG decoders that implement an independent boost and cut scaling value for Dynamic Range Control (D5..4 = ‘11’ in the bmMPEGFeatures field of the MPEG format-specific descriptor). If this Control is addressed on a non-‘11’ decoder, the control pipe must indicate a stall.
The High/Low Scaling Control can support all possible Control attributes (CUR, MIN, MAX, and RES). The valid range for the CUR, MIN, MAX, and RES attributes is from zero (0x00) to 255/256 (0xFF). The High/Low Scaling Control honors the request to the best of its abilities. It may round the bLowScale and bHighScale attribute values to their closest available settings. It will report these rounded settings when queried during a Get MPEG Control request. The bLowScale value is used by the MPEG decoder to scale the Dynamic Range control words that apply a gain increase (for low sound levels). The bHighScale value is used by the MPEG decoder to scale the Dynamic Range control words that apply a gain reduction (for high level sounds).
Table 2-15: High/Low Scaling Control Parameter Block
| Control Selector |
MP_HILO_SCALING_CONTROL |
| wLength |
2 |
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bLowScale |
1 |
Number |
The setting for the attribute of the low level Scaling Control. |
| 1 |
bHighScale |
1 |
Number |
The setting for the attribute of the high level Scaling Control. |
2.3.8.2 AC-3 Format
In the current specification, only AC-3 decoding aspects are considered. Real-time AC-3 encoding peripherals are not (yet) available and consequently are not covered by this specification.
2.3.8.2.1 AC-3 Format-Specific Descriptor
The wFormatTag field is a duplicate of the wFormatTag field in the class-specific AudioStreaming interface descriptor. The same field is used here to identify the format-specific descriptor.
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 22
The bmBSID bitmap field describes which bit stream ID modes this decoder is capable of processing. BSID modes can range from 0 to 31. A bit set indicates that BSID mode [bit_position] is supported. Standard AC-3 decoders must be capable of processing at least BSID modes 0 to 8. Therefore, the lower 9 bits of the bmBSID field must be set.
The bmAC3Features bitmap field indicates compression-related features.
Bits D3..0 indicate which mode the decoder supports. To ease the design of decoder products, Dolby Digital ICs offer standard operating modes called “Line Mode” and “RF Mode.” These modes are included within the Dolby Digital decoder IC itself, thus greatly simplifying the implementation of dialog normalization, dynamic range control and downmixing functions, all of which are necessary in Dolby Digital products. Two “Custom Modes” offer additional design flexibility aimed at more esoteric audio products for which additional implementation cost and complexity are not of primary concern.
Bits D5..4. indicate which type of Dynamic Range Control the AC-3 decoder supports. Some decoders do not implement DRC (D5..4 = ‘00’). If implemented, the DRC can either use the stream embedded gain parameters as is (D5..4 = ‘01’) or can provide for additional DRC scaling factors: either a single scaling factor that influences both the boost and cut value simultaneously (D5..4 = ‘10’), or a separate scaling factor for the boost and the cut value (D5..4 = ‘11’)
All other bits are reserved.
Table 2-16: AC-3 Format-Specific Descriptor
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bLength |
1 |
Number |
Size of this descriptor, in bytes: 10 |
| 1 |
bDescriptorType |
1 |
Constant |
CS_INTERFACE descriptor type. |
| 2 |
bDescriptorSubtype |
1 |
Constant |
FORMAT_SPECIFIC descriptor subtype. |
| 3 |
wFormatTag |
2 |
Constant |
AC-3. Constant identifying the precise format the AudioStreaming interface is using. |
| 5 |
bmBSID |
4 |
Bitmap |
A bit set to 1 indicates that the corresponding BSID mode is supported. |
| 9 |
bmAC3Features |
1 |
Bitmap |
A bit set to 1 indicates that the mentioned feature is supported: D0: RF mode D1: Line mode D2: Custom0 mode D3: Custom1 mode D5..4: Internal Dynamic Range Control: 00 = not supported. 01 = supported but not scalable. 10 = scalable, common boost and cut scaling value. 11 = scalable, separate boost and cut scaling value. D7..6: Reserved |
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 23
2.3.8.2.2 AC-3 Format-Specific Requests
The following paragraphs describe the Set and Get AC-3 Control requests.
2.3.8.2.2.1 Set AC-3 Control Request
This request is used to set an attribute of an AC-3 Control inside an AudioStreaming interface of the audio function.
Table 2-17: Set AC-3 Control Request Values
| bmRequest Type |
bRequest |
wValue |
wIndex |
wLength |
Data |
| 00100001B |
SET_CUR SET_MIN SET_MAX SET_RES |
CS |
Zero and Interface |
Length of Parameter block |
Parameter Block |
The bRequest field indicates which attribute the request is manipulating. The MIN, MAX, and RES attributes are usually not supported for the Set request. Further details on which attributes are supported for which Controls can be found in Section 2.3.8.2.2.3, “AC-3 Controls.”
The wValue field specifies the Control Selector (CS) in the high byte and zero in the low byte. The Control Selector indicates which type of control this request is manipulating. If the request specifies an unknown or unsupported CS to that interface, the control pipe must indicate a stall.
For a description of the parameter blocks for the different Controls that can be addressed through the Set AC-3 Control request, see Section 2.3.8.2.2.3, “AC-3 Controls.”
2.3.8.2.2.2 Get AC-3 Control Request
This request returns the attribute setting of a specific AC-3 Control inside an AudioStreaming interface of the audio function.
Table 2-18: Get AC-3 Control Request Values
| bmRequest Type |
bRequest |
wValue |
wIndex |
wLength |
Data |
| 10100001B |
SET_CUR SET_MIN SET_MAX SET_RES |
CS |
Zero and Interface |
Length of Parameter block |
Parameter Block |
The bRequest field indicates which attribute the request is reading.
The wValue field specifies the Control Selector (CS) in the high byte and zero in the low byte. The Control Selector indicates which type of control this request is addressing. If the request specifies an unknown or unsupported CS to that interface, the control pipe must indicate a stall.
For a description of the parameter blocks for the different Controls that can be addressed through the Get AC-3 Control request, see Section 2.3.8.2.2.3, “AC-3 Controls.”
2.3.8.2.2.3 AC-3 Controls
The following paragraphs present a detailed description of all possible AC-3 Controls an AudioStreaming interface can incorporate. For each Control, the layout of the parameter block together with the
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 24
appropriate Control Selector are listed. The Control Selector codes are defined in Section A.3.2, “AC-3 Control Selectors.”
2.3.8.2.2.3.1 Mode Control
The Mode Control is used to change the compression mode of the AC-3 decoder in the AudioStreaming interface. A Mode Control can only support the CUR attribute. The valid range for the CUR attribute is described through the bmComprFeatures field of the AC-3 format-specific descriptor. Bits D3..0 describe which compression modes the AC-3 decoder supports. Valid values are:
· 0: RF mode
· 1: Line mode
· 2: Custom0 mode
· 3: Custom1 mode
If the Mode Control request specifies an unsupported mode, the control pipe must indicate a stall. The
current setting can be queried during a Get AC-3 Control request.
Table 2-19: Mode Control Parameter Block
| Control Selector |
AC_MODE_CONTROL |
| wLength |
1 |
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bMode |
1 |
Number |
The setting for the attribute of the Compression Mode Control: 0: RF mode 1: Line mode 2: Custom0 mode 3: Custom1 mode All other values are reserved. |
2.3.8.2.2.3.2 Dynamic Range Control
The Dynamic Range Control (DRC) is used to enable or disable the Dynamic Range Control functionality of the decoder. The Dynamic Range Control can have only the current setting attribute (CUR). The position of the Dynamic Range Control switch can be either TRUE or FALSE. TRUE means that the AC- 3 decoder is using the Dynamic Range control words (possibly with additional scaling) contained in the AC-3 bit stream to control the audio dynamic range. FALSE means the control words are being ignored and the original signal dynamic range is being reproduced. The current setting of the Control can be queried using a Get AC-3 Control request.
Table 2-20: Dynamic Range Control Parameter Block
| Control Selector |
MP_DYN_RANGE_CONTROL |
| wLength |
1 |
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 25
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bEnable |
1 |
Bool |
The setting for the Dynamic Range Control CUR attribute. Enabled when TRUE, disabled when FALSE. |
2.3.8.2.2.3.3 Scaling Control
The Scaling Control is used to manipulate the single scaling coefficient used by AC-3 decoders that implement a common boost/cut scaling value for Dynamic Range Control. (D5..4 = ‘10’ in the bmAC3Features field of the AC-3 format-specific descriptor.) If this Control is addressed on a non-‘10’ decoder, the control pipe must indicate a stall.
The Scaling Control can support all possible Control attributes (CUR, MIN, MAX, and RES). The valid range for the CUR, MIN, MAX, and RES attributes is from zero (0x00) to 255/256 (0xFF). The Scaling Control honors the request to the best of its abilities. It may round the bScale attribute value to its closest available setting. It will report this rounded setting when queried during a Get AC-3 Control request.
Table 2-21: Scaling Control Parameter Block
| Control Selector |
AC_SCALING_CONTROL |
| wLength |
1 |
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bScale |
1 |
Number |
The setting for the attribute of the Scaling Control. |
2.3.8.2.2.3.4 High/Low Scaling Control
The High/Low Scaling Control is used to manipulate the two scaling coefficients used by AC-3 decoders that implement an independent boost and cut scaling value for Dynamic Range Control. (D5..4 = ‘11’ in the bmAC3Features field of the AC-3 format-specific descriptor.) If this Control is addressed on a non- ‘11’ decoder, the control pipe must indicate a stall.
The High/Low Scaling Control can support all possible Control attributes (CUR, MIN, MAX, and RES). The valid range for the CUR, MIN, MAX, and RES attributes is from zero (0x00) to 255/256 (0xFF). The High/Low Scaling Control honors the request to the best of its abilities. It may round the bLowScale and bHighScale attribute values to their closest available settings. It will report these rounded settings when queried during a Get AC-3 Control request. The bLowScale value is used by the AC-3 decoder to scale the Dynamic Range control words which apply a gain increase (for low sound levels). The bHighScale value is used by the AC-3 decoder to scale the Dynamic Range control words which apply a gain reduction (for high level sounds).
Table 2-22: High/Low Scaling Control Parameter Block
| Control Selector |
AC_HILO_SCALING_CONTROL |
| wLength |
2 |
最終更新:2011年05月23日 00:54