Usb Audio Device Descriptor(8) Type I Format Type Descriptor

Type I Format Type Descriptor

struct usb_format_type_1
{
    U8 bLength; /*Size of this descriptor, in bytes: 8+(ns*3)*/
    U8 bDescriptorType; /*CS_INTERFACE descriptor type*/
    U8 bDescriptorSubtype; /*FORMAT_TYPE descriptor subtype.*/
    U8 bFormatType; /*FORMAT_TYPE_I. Constant identifying
                    the Format Type the AudioStreaming
                    interface is using.*/
    U8 bNrChannels; /*Indicates the number of physical
                    channels in the audio data stream.*/
    U8 bSubframeSize; /*The number of bytes occupied by one
                        audio subframe. Can be 1, 2, 3 or 4.*/
    U8 bBitResolution; /*The number of effectively used bits from
                        the available bits in an audio subframe.*/
    U8 bSamFreqType; /*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)*/
    U8 tLowerSamFreq[3]; /*Lower bound in Hz of the sampling
                        frequency range for this isochronous data
                        endpoint.*/
    U8 tUpperSamFreq[3]; /*Upper bound in Hz of the sampling
                        frequency range for this isochronous data
                        endpoint.*/
};

bLength = 8+(ns*3); 当为continous frequecy 时, ns = 2;
bDescriptorType = 0x24; class-specific interface;
bDescriptorSubtype = 0x02; 同input terminal->bDescriptorSubtype, 此时要通过bLength来区别,input terminal->bLength = 12;
bFormatType = 0x01; FORMAT_TYPE_I;
bNrChannels: audio streaming 物理声道数;
bSubframeSize: 对于一个subframe, 需要多少bytes;
bBitResolution: bit resolution,即多少位的pcm数据;
bSamFreqType: 0 表示 continuous sampling frequecy; 1…ns(max=255)表示离散的sampling freqency;
tLowSamFreq/tUpperSamFreq: Sampling Frequency的高低位;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值