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_I. Constant identifying the Format Type the AudioStreaming interface is using.
4 bNrChannels 1 Number Indicates the number of physical channels in the audio data stream.
5 bSubframeSize 1 Number The number of bytes occupied by one audio subframe. Can be 1, 2, 3 or 4.
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.
这个bSubframeSize 1 Number The number of bytes occupied by one audio subframe. Can be 1, 2, 3 or 4. 没看懂是什么意思。哪位知道告知一声。
看下面实例
HT82A824R 有一个Isochronous Out 端点 (Endpoint)。Isochronous Out 是用来将PC 的播放媒体的语音数据通过USB Port 传给装置,语音数据设置为PCM 格式,假设是在48kHz/16-bit/2-CH 情况下,一个Frame 传192 Bytes 数据,所以此端点的Ping-Pong Buffer大小总共为384 Bytes,在描述符 (Descriptor) 关于播放语音格式的定义如下文字描述所示,在此描述符定义了播放频率、一个Frame 的数据量、端点号码与端点的方向等;HT82A824R的Endpoint Number 设置为2 ; 如下的描述语言支持48kHz/16-bit/2-CH 与44.1kHz/16-bit/2-CH 两种格式。
format_type_descriptor:
;support 48K/44.1K
DW 0240EH ;descriptor type(CS_INTERFACE) , size of descriptor (add 44.1 KHz)
DW 00102H ;FormatType(FORMAT_TYPE_I) , descriptorSubType(FORMAT_TYPE)
DW 00202H ;SubFrameSize(2 byte per slot) , number of channel(2 channels)
DW 00210H ;SamFreqType(support 2 type) , BitSolution(16 bits)(add 44.1 KHz)
DW 03F80H ;Sample Frequency(48000 Hz)
DW 000BBH ;
DW 03F44H ;Sample Frequency(44100 Hz)
DW 000ACH ;
end_point_descriptor:
DW 00509H ;descriptor type(END_POINT) , size of descriptor
DW 00902H ;endpoint attributes(adaptive,isochronous) , endpoint2(out direction)
DW 000C0H ;maxPacketSize(192 bytes)
DW 00001H ;Refresh(0) , Interval(1ms)
DW 03F00H ;index string of this descriptor |