USB开发---最高采样率USB Audio的描述符支持DSD 1536K

USB开发—最高采样率USB Audio的描述符支持DSD 1536K

一、背景

前段时间根据客户要求,做一个HIFI级的USB Audio声卡设备。支持ASIO驱动。采样率达到USB2.0所能支持的最高采样率1536K。 采样率范围44.1k - 1536k。同时支持DSD跟Dop模式,采样率范围DSD64 - DSD1024。支持24bit跟16bit的采样深度。客户那边是用Fpga解码的。具体我这边也没有参与。USB Audio是我这边设计的。也花了不少的时间。下面将描述符分享出来供大家参考学习。有不清楚的可以加QQ群一起学习讨论。

PCM采样率列表

在这里插入图片描述

DSD采样率列表

在这里插入图片描述

二、USB枚举时候用到的描述符

以下描术符确认是可以正常使用的。

------------------------------
Device Descriptor:
------------------------------
0x12	bLength
0x01	bDescriptorType
0x0200	bcdUSB
0xEF	bDeviceClass      (Miscellaneous device)
0x02	bDeviceSubClass   
0x01	bDeviceProtocol   
0x40	bMaxPacketSize0   (64 bytes)
0x152A	idVendor
0x86EF	idProduct
0x0303	bcdDevice
0x01	iManufacturer   "KexiStudio"
0x02	iProduct        "USB HiRes Audio"
0x03	iSerialNumber
0x02	bNumConfigurations

Device Qualifier Descriptor:
------------------------------
0x0A	bLength
0x06	bDescriptorType
0x0200	bcdUSB
0x00	bDeviceClass      
0x00	bDeviceSubClass   
0x00	bDeviceProtocol   
0x40	bMaxPacketSize0   (64 bytes)
0x01	bNumConfigurations 
0x00	bReserved 


-------------------------
Configuration Descriptor:
-------------------------
0x09	bLength
0x02	bDescriptorType
0x00D5	wTotalLength   (213 bytes)
0x02	bNumInterfaces
0x01	bConfigurationValue
0x00	iConfiguration
0xC0	bmAttributes   (Self-powered Device)
0x32	bMaxPower      (100 mA)

Interface Association Descriptor:
------------------------------
0x08	bLength
0x0B	bDescriptorType
0x00	bFirstInterface
0x02	bInterfaceCount
0x01	bFunctionClass      (Audio Device Class)
0x00	bFunctionSubClass   
0x20	bFunctionProtocol   (Audio Protocol IP version 2.00)
0x00	iFunction

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x00	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0x01	bInterfaceClass      (Audio Device Class)
0x01	bInterfaceSubClass   (Audio Control Interface)
0x20	bInterfaceProtocol   (Audio Protocol IP version 2.00)
0x00	iInterface

AC Interface Header Descriptor:
------------------------------
0x09	bLength
0x24	bDescriptorType
0x01	bDescriptorSubtype
0x0200	bcdADC
0x01	bCategory   (DESKTOP_SPEAKER)
0x0048	wTotalLength   (72 bytes)
0x00	bmControls

AC Clock Source Descriptor:
------------------------------
0x08	bLength
0x24	bDescriptorType
0x0A	bDescriptorSubtype
0x29	bClockID
0x03	bmAttributes
0x07	bmControls
          Clock Frequency Control - host programmable
          Clock Validity Control  - read only
0x00	bAssocTerminal
0x00	iClockSource

AC Clock Selector Descriptor:
------------------------------
0x08	bLength
0x24	bDescriptorType
0x0B	bDescriptorSubtype
0x28	bClockID
0x01	bNrInPins
0x29	baCSourceID(1)
0x03	bmControls
          Clock Selector Control - host programmable
0x00	iClockSelector

AC Input Terminal Descriptor:
------------------------------
0x11	bLength
0x24	bDescriptorType
0x02	bDescriptorSubtype
0x2A	bTerminalID
0x0101	wTerminalType   (USB Streaming)
0x00	bAssocTerminal
0x28	bCSourceID
0x02	bNrChannels   (2 channels)
0x00000003	bmChannelConfig
0x00	iChannelNames
0x00	bmControls
0x00	iTerminal

AC Feature Unit Descriptor:
------------------------------
0x12	bLength
0x24	bDescriptorType
0x06	bDescriptorSubtype
0x0A	bUnitID
0x2A	bSourceID
0x00000003	bmaControls(0)
          Mute Control              - host programmable
0x0000000C	bmaControls(1)
          Volume Control            - host programmable
0x0000000C	bmaControls(2)
          Volume Control            - host programmable
0x00	iFeature

AC Output Terminal Descriptor:
------------------------------
0x0C	bLength
0x24	bDescriptorType
0x03	bDescriptorSubtype
0x2B	bTerminalID
0x0301	wTerminalType   (Speaker)
0x00	bAssocTerminal
0x0A	bSourceID
0x28	bCSourceID
0x0000	bmControls
0x00	iTerminal

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x01	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0x01	bInterfaceClass      (Audio Device Class)
0x02	bInterfaceSubClass   (Audio Streaming Interface)
0x20	bInterfaceProtocol   (Audio Protocol IP version 2.00)
0x00	iInterface

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x01	bInterfaceNumber
0x01	bAlternateSetting
0x02	bNumEndPoints
0x01	bInterfaceClass      (Audio Device Class)
0x02	bInterfaceSubClass   (Audio Streaming Interface)
0x20	bInterfaceProtocol   (Audio Protocol IP version 2.00)
0x00	iInterface

AS Interface Descriptor:
------------------------------
0x10	bLength
0x24	bDescriptorType
0x01	bDescriptorSubtype
0x2A	bTerminalLink
0x00	bmControls
0x01	bFormatType   (FORMAT_TYPE_1)
0x00000001	bmFormats
          PCM
0x02	bNrChannels   (2 channels)
0x00000003	bmChannelConfig
0x00	iChannelNames

AS Format Type 1 Descriptor:
------------------------------
0x06	bLength
0x24	bDescriptorType
0x02	bDescriptorSubtype
0x01	bFormatType   (FORMAT_TYPE_1)
0x04	bSubslotSize
0x20	bBitResolution   (32 bits per sample)

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x01	bEndpointAddress  (OUT endpoint 1)
0x05	bmAttributes      (Transfer: Isochronous / Synch: Asynchronous / Usage: Data)
0x0C00	wMaxPacketSize    (2 x 1024 bytes)
0x01	bInterval         (1 microframes)

AS Isochronous Data Endpoint Descriptor:
------------------------------
0x08	bLength
0x25	bDescriptorType
0x01	bDescriptorSubtype
0x00	bmAttributes
0x00	bmControls
0x02	bLockDelayUnits   (decoded PCM samples)
0x0800	wLockDelay

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x81	bEndpointAddress  (IN endpoint 1)
0x11	bmAttributes      (Transfer: Isochronous / Synch: None / Usage: Feedback)
0x0004	wMaxPacketSize    (1 x 4 bytes)
0x04	bInterval         (8 microframes)

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x01	bInterfaceNumber
0x02	bAlternateSetting
0x02	bNumEndPoints
0x01	bInterfaceClass      (Audio Device Class)
0x02	bInterfaceSubClass   (Audio Streaming Interface)
0x20	bInterfaceProtocol   (Audio Protocol IP version 2.00)
0x00	iInterface

AS Interface Descriptor:
------------------------------
0x10	bLength
0x24	bDescriptorType
0x01	bDescriptorSubtype
0x2A	bTerminalLink
0x00	bmControls
0x01	bFormatType   (FORMAT_TYPE_1)
0x80000000	bmFormats
          TYPE_I_RAW_DATA
0x02	bNrChannels   (2 channels)
0x00000000	bmChannelConfig
0x00	iChannelNames

AS Format Type 1 Descriptor:
------------------------------
0x06	bLength
0x24	bDescriptorType
0x02	bDescriptorSubtype
0x01	bFormatType   (FORMAT_TYPE_1)
0x04	bSubslotSize
0x20	bBitResolution   (32 bits per sample)

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x01	bEndpointAddress  (OUT endpoint 1)
0x05	bmAttributes      (Transfer: Isochronous / Synch: Asynchronous / Usage: Data)
0x0C00	wMaxPacketSize    (2 x 1024 bytes)
0x01	bInterval         (1 microframes)

AS Isochronous Data Endpoint Descriptor:
------------------------------
0x08	bLength
0x25	bDescriptorType
0x01	bDescriptorSubtype
0x00	bmAttributes
0x00	bmControls
0x02	bLockDelayUnits   (decoded PCM samples)
0x0800	wLockDelay

Endpoint Descriptor:
------------------------------
0x07	bLength
0x05	bDescriptorType
0x81	bEndpointAddress  (IN endpoint 1)
0x11	bmAttributes      (Transfer: Isochronous / Synch: None / Usage: Feedback)
0x0004	wMaxPacketSize    (1 x 4 bytes)
0x04	bInterval         (8 microframes)


-------------------------
Configuration Descriptor:
-------------------------
0x09	bLength
0x02	bDescriptorType
0x0012	wTotalLength   (18 bytes)
0x01	bNumInterfaces
0x02	bConfigurationValue
0x00	iConfiguration
0xC0	bmAttributes   (Self-powered Device)
0x32	bMaxPower      (100 mA)

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x00	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0xFF	bInterfaceClass      (Vendor specific)
0xFF	bInterfaceSubClass   
0xFF	bInterfaceProtocol   
0x00	iInterface


-------------------------------------
Other Speed Configuration Descriptor:
-------------------------------------
0x09	bLength
0x07	bDescriptorType
0x0012	wTotalLength   (18 bytes)
0x01	bNumInterfaces
0x01	bConfigurationValue
0x00	iConfiguration
0xC0	bmAttributes   (Self-powered Device)
0x32	bMaxPower      (100 mA)

Interface Descriptor:
------------------------------
0x09	bLength
0x04	bDescriptorType
0x00	bInterfaceNumber
0x00	bAlternateSetting
0x00	bNumEndPoints
0xFF	bInterfaceClass      (Vendor specific)
0xFF	bInterfaceSubClass   
0xFF	bInterfaceProtocol   
0x00	iInterface

三、DSD的采样率显示

在这里插入图片描述
我这个方案非常的便宜,性价比很高。有需要的可以沟通合作。

四、联系我们

  • 技术支持 : 加群 339420387 答案1024
    在这里插入图片描述
  • 2
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值