USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 16
Bit D6 indicates that the multilingual information that is encoded at normal sampling rates (32 kHz, 44.1 kHz or 48 kHz). This bit is only applicable for MPEG-2 decoders.
Bit D7 indicates that the decoder is capable of processing streams that are encoded using adaptive multichannel prediction.
Bits D9..8 indicate if the decoder can process embedded multilingual information. Multilingual capabilities can consist of being able to process multilingual information encoded at the same sampling frequency as the main audio channels (D9..8 = ‘01’). Some decoders may provide the additional capability to process multilingual information encoded at half the sampling frequency of the main audio channels (D9..8 = ‘11’).
Bits D15..10 are reserved for future extensions.
The bmMPEGFeatures field indicates compression-related features.
Bits D5..4 report which type of Dynamic Range Control the MPEG 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-7: MPEG Format-Specific Descriptor
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bLength |
1 |
Number |
Size of this descriptor, in bytes: 9 |
| 1 |
bDescriptorType |
1 |
Constant |
CS_INTERFACE descriptor type. |
| 2 |
bDescriptorSubtype |
1 |
Constant |
FORMAT_SPECIFIC descriptor subtype. |
| 3 |
wFormatTag |
2 |
Constant |
MPEG. Constant identifying the precise format the AudioStreaming interface is using. |
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 17
| Offset |
Field |
Size |
Value |
Description |
| 5 |
bmMPEGCapabilities |
2 |
Bitmap |
Bitmap identifying the MPEG capabilities of the decoder. A bit set indicates that the capability is supported: D2..0: Layer support: D0 = Layer I D1 = Layer II D2 = Layer III D3: MPEG-1 only. D4: MPEG-1 dual-channel. D5: MPEG-2 second stereo. D6: MPEG-2 7.1 channel augmentation. D7: Adaptive multi-channel prediction. D9..8: MPEG-2 multilingual support: 00 = Not supported 01 = Supported at Fs 10 = Reserved 11 = Supported at Fs and ½Fs. D15..10: Reserved. |
| 7 |
bmMPEGFeatures |
1 |
Bitmap |
Bitmap identifying the features the decoder supports. A bit set indicates that the feature is supported: D3..0: Reserved. 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. |
2.3.8.1.2 MPEG Format-Specific Requests
The following paragraphs describe the Set and Get MPEG Control requests. Some of the requests control parameters that are also dependent on the content of the incoming MPEG data stream. In general, the behavior of the MPEG decoder is primarily controlled by the incoming bitstream. Parameters set using MPEG Control requests retain their setting, even if that setting is not applicable to the current incoming bitstream. As an example, consider a decoder that is receiving a stream containing two independent stereo channel pairs. In this case, the Select Second Stereo Control can be enabled so that the second stereo channel is reproduced over the Left and Right channel. If the incoming stream is now switched to a full 5.1 encoded stream, the Select Second Stereo Control has no more influence and the decoder overrides its setting and produces full 5.1 sound. However, if the incoming stream switches back to the previous format, the Select Second Stereo Control becomes active again and resumes its previous setting so that the second stereo channel is reproduced again over the Left and Right channel.
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 18
2.3.8.1.2.1 Set MPEG Control Request
This request is used to set an attribute of an MPEG Control inside an AudioStreaming interface of the audio function.
Table 2-8: Set MPEG 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 plock |
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.1.2.3, “MPEG 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.1.2.3, “MPEG Controls.”
2.3.8.1.2.2 Get MPEG Control Request
This request returns the attribute setting of a specific MPEG Control inside an AudioStreaming interface of the audio function.
Table 2-9: Get MPEG Control Request Values
| bmRequest Type |
bRequest |
wValue |
wIndex |
wLength |
Data |
| 10100001B |
GET_CUR GET_MIN GET_MAX GET_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.1.2.3, “MPEG Controls.”
2.3.8.1.2.3 MPEG 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 appropriate Control Selector is listed. The Control Selector codes are defined in Section A.3.1, “MPEG Control Selectors.”
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 19
2.3.8.1.2.3.1 Dual Channel Control
The Dual Channel Control is used to select which of the two available channels in the MPEG-1 base stream is actually retrieved and reproduced over the Left and Right output channels. If this Control is addressed on a decoder that does not implement Dual Channel Control (D4 = ‘0’ in the bmMPEGCapabilities field of the MPEG format-specific descriptor), the control pipe must indicate a stall.
The Dual Channel Control can have only the current setting attribute (CUR). The position of the Channel2Enable switch can be either TRUE or FALSE. When FALSE, Channel I is selected, and when TRUE, Channel II is selected. The current setting of the Control can be queried using a Get MPEG Control request.
Table 2-10: Dual Channel Control Parameter Block
| Control Selector |
MP_DUAL_CHANNEL_CONTROL |
| wLength |
1 |
| Offset |
Field |
Size |
Value |
Description |
| 0 |
BChannel2Enable |
1 |
Number |
The setting for the attribute of the Dual Channel Control. Channel I selected when FALSE, Channel II selected when TRUE. |
2.3.8.1.2.3.2 Second Stereo Control
The Second Stereo Control is used to select the second stereo channel pair that can be encoded in an MPEG-2 stream instead of the multi-channel stereophonic information (3/2). If this Control is addressed on a decoder that does not implement Second Stereo support (D5 = ‘0’ in the bmMPEGCapabilities field of the MPEG format-specific descriptor), the control pipe must indicate a stall.
The Second Stereo Control can have only the current setting attribute (CUR). The position of the 2ndStereoEnable switch can be either TRUE or FALSE. When FALSE, the main stereo channel pair is selected; when TRUE, the second stereo channel pair is selected. The current setting of the Control can be queried using a Get MPEG Control request.
Table 2-11: Second Stereo Control Parameter Block
| Control Selector |
MP_SECOND_STEREO_CONTROL |
| wLength |
1 |
| Offset |
Field |
Size |
Value |
Description |
| 0 |
B2ndStereoEnable |
1 |
Number |
The setting for the attribute of the Second Stereo Control. Main stereo channel pair selected when FALSE, second stereo channel pair selected when TRUE. |
2.3.8.1.2.3.3 Multilingual Control
The Multilingual Control is used to select the multilingual channel actually retrieved from the MPEG stream. If this Control is addressed on a decoder that does not implement multilingual support (D9..8 =
USB Device Class Definition for Audio Data Formats
Release 1.0 March 18, 1998 20
‘00’ in the bmMPEGCapabilities field of the MPEG format-specific descriptor), the control pipe must indicate a stall.
The Multilingual Control supports only the CUR Control attribute. The valid range is from zero (0x00) to seven (0x07). The actual range depends on the incoming MPEG stream. It may contain only a limited number of multilingual channels (less than seven). The Multilingual Control honors the request to the best of its abilities. It may truncate the attribute values to its closest available settings. It will report these settings when queried during a Get MPEG Control request.
Table 2-12: Multilingual Control Parameter Block
| Control Selector |
MP_MULTILINGUAL_CONTROL |
| wLength |
1 |
| Offset |
Field |
Size |
Value |
Description |
| 0 |
bMultiLingual |
1 |
Number |
The setting for the attribute of the multilingual channel selection: 0 = decode no channel 1..7 = decode channel 1..7 8..255 = reserved |
2.3.8.1.2.3.4 Dynamic Range Control
The Dynamic Range Control (DRC) is used to enable or disable the Dynamic Range Control functionality of the decoder. If the decoder does not support Dynamic Range control (D5..4 = ‘00’ in the bmMPEGFeaturesfield of the MPEG format-specific descriptor), the control pipe must indicate a stall when receiving this request.
The Dynamic Range Control can have only the current setting attribute (CUR). The position of the DRC switch can be either TRUE or FALSE. TRUE means that the MPEG decoder is using the Dynamic Range control words (possibly with additional scaling) contained in the MPEG 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 MPEG Control request.
Table 2-13: Dynamic Range Control Parameter Block
| Control Selector |
MP_DYN_RANGE_CONTROL |
| wLength |
1 |
| 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.1.2.3.5 Scaling Control
The Scaling Control is used to manipulate the single scaling coefficient used by MPEG decoders that implement a common boost/cut scaling value for Dynamic Range Control (D5..4 = ‘10’ in the bmMPEGFeatures field of the MPEG format-specific descriptor). If this Control is addressed on a non- ‘10’ decoder, the control pipe must indicate a stall.
最終更新:2011年05月23日 00:08