Usb Audio Device Descriptor(2) Class-Specific Audio Control Interface Header Descriptor

来源:互联网 发布:床垫品牌 知乎 编辑:程序博客网 时间:2024/05/17 10:38

Class-Specific Audio Control Interface Header Descriptor

struct usb_ac_cs_interface_descriptor{    U8 bLength; /*Size of this descriptor, in bytes: 8+n*/    U8 bDescriptorType; /*CS_INTERFACE descriptor type*/    U8 bDescriptorSubtype; /*HEADER descriptor subtype.*/    U16 bcdADC; /*Audio Device Class Specification Release                Number in Binary-Coded Decimal.*/    U16 wTotalLength; /*Total number of bytes returned for the                      class-specific AudioControl interface                      descriptor. Includes the combined length                      of this descriptor header and all Unit and                      Terminal descriptors.*/    U8 bInCollection; /*The number of AudioStreaming and                      MIDIStreaming interfaces in the Audio                      Interface Collection to which this                      AudioControl interface belongs: n*/    U8 *baInterfaceNr; /*Interface number of the first                        AudioStreaming or MIDIStreaming                        interface in the Collection.*/};

bLength = 8+n;
bDescriptor = 0x24; 说明这是一个class-specific audio device interface, 注意,不一定是Audio Control interface, 也可能是Audio Streaming interface; 如果是 Audio Streaming interface,则bLength=0x07;
bDescriptorSubtype = 0x01; 说明这是head descriptor;
bcdADC: BCD编码的class specification Release编号,即版本号,如果是0x100,就是1.00版,0x200,就是2.00版;
wTotalLength: 包含Header和所有Unit, Terminal的总和的length;
bInCollection:此Audio Control Interface所拥有的Audio Streaming和Audio MidiStreaming的interface集合数量;即bLength = 8+n 中的n
baInterfaceNr: Audio Streaming 和MidiStreaming在集合中的索引值;

0 0
原创粉丝点击