More UAC descriptors.

This commit is contained in:
imi415 2022-02-10 00:17:09 +08:00
parent fbbc5da2a9
commit d2b2b9c823
Signed by: imi415
GPG Key ID: 17F01E106F9F5E0A
1 changed files with 59 additions and 12 deletions

View File

@ -21,7 +21,7 @@ UCHAR device_framework_fs[] = {
/* Configuration descriptor size=9 */
0x09, // bLength
0x02, // bDescriptorType
0x41, 0x00, // wTotalLength !! 9 + 8 + 9 + 9 + 8 + 8 + 14 + ...
0x6F, 0x00, // wTotalLength !! 9 + 8 + 9 + 9 + 8 + 8 + 8 + 9 + 14 + 17 + 12 + ...
0x01, // bNumInterfaces
0x01, // bConfigurationValue
0x00, // iConfiguration
@ -55,38 +55,85 @@ UCHAR device_framework_fs[] = {
0x01, // bDescriptorSubType
0x00, 0x02, // bcdADC !! 2.00
0x08, // bCategory
0x27, 0x00, // wTotalLength !! UAC2 Table 4-5 9 + 8 + 8 + 14 + ...
0x55, 0x00, // wTotalLength !! <UAC2 Table 4-5> 9 + 8 + 8 + 8 + 9 + 14 + 17 + 12 + ...
0x00, // bmControls
/* Audio Control Clock Source descriptor clockid=0 size=8 */
/* Audio Control Clock Source descriptor CID=0x10 size=8 */
0x08, // bLength
0x24, // bDescriptorType
0x0A, // bDescriptorSubType
0x00, // bClockID
0x01, // bmAttributes !! Internal fixed clock
0x10, // bClockID
0x01, // bmAttributes !! Internal fixed clock 1
0x01, // bmControls
0x00, // bAssocTerminal
0x00, // iClockSource
/* Audio Control Clock Source descriptor clockid=1 size=8 */
/* Audio Control Clock Source descriptor CID=0x11 size=8 */
0x08, // bLength
0x24, // bDescriptorType
0x0A, // bDescriptorSubType
0x01, // bClockID
0x01, // bmAttributes !! Internal fixed clock
0x11, // bClockID
0x01, // bmAttributes !! Internal fixed clock 2
0x01, // bmControls
0x00, // bAssocTerminal
0x00, // iClockSource
/* Audio Control Feature Unit descriptor size=14 */
/* Audio Control Clock Source descriptor CID=0x12 size=8 */
0x08, // bLength
0x24, // bDescriptorType
0x0A, // bDescriptorSubType
0x11, // bClockID
0x05, // bmAttributes !! Sync to SOF
0x01, // bmControls
0x00, // bAssocTerminal
0x00, // iClockSource
/* Audio Control Clock Selector descriptor CID=0x18 size=9 */
0x09, // bLength
0x24, // bDescriptorType !! CS_INTERFACE
0x0B, // bDescriptorSubType !! CLOCK_SELECTOR
0x18, // bClockID !!
0x02, // bNrInPins !! 2 input pins
0x10, // baCSourceID(1) !! From Clock Source CID=0x10
0x11, // baCSourceID(2) !! From Clock Source CID=0x11
0x03, // bmControls !!
0x00, // iClockSelector
/* Audio Control Feature Unit descriptor UID=0 size=14 */
0x0E, // bLength !!
0x24, // bDescriptorType
0x06, // bDescriptorSubType
0x05, // bUnitID !!
0x04, // bSourceID !!
0x30, // bUnitID !!
0x20, // bSourceID !! From Input Terminal TID=0x20
0x0F, 0x00, 0x00, 0x00, // bmaControls(0) !!
0x0F, 0x00, 0x00, 0x00, // bmaControls(1) !!
0x00, // iFeature
/* Audio Control Input Terminal descriptor TID=0x20 size=17 */
0x11, // bLength
0x24, // bDescriptorType
0x02, // bDescriptorSubType
0x20, // bTerminalID !! TID=0x20
0x01, 0x01, // wTerminalType !! Should be an OUT EP
0x00, // bAssocTerminal !!
0x12, // bCSourceID !! From Clock Selector CID=0x12
0x02, // bNrChannels
0x00, 0x00, 0x00, 0x00, // bmChannelConfig
0x00, // iChannelNames
0x00, 0x00, // bmControls
0x00, // iTerminal
/* Audio Control Output Terminal descriptor TID=0x21 size=12 */
0x0C, // bLength
0x24, // bDescriptorType
0x03, // bDescriptorSubType
0x21, // bTerminalID !! TID=0x21
0x01, 0x03, // wTerminalType !! Should be a speaker
0x00, // bAssocTerminal
0x30, // bSourceID !! From Feature Unit UID=0x30
0x18, // bCSourceID !! Associate with Clock selector at id=0x18
0x00, 0x00, // bmControls !! TBD
0x00, // iTerminal
};
UCHAR device_framework_hs[] = {
@ -169,7 +216,7 @@ UCHAR device_framework_string[] = {
0x09, 0x04, // wLANGID
0x01, // bIndex
0x12, // bLength
'S', 'T', 'M', 'i', // ..DATA
'S', 'T', 'M', 'a', // ..DATA
'c', 'r', 'o', 'e', // -^
'l', 'e', 'c', 't', // -^
'r', 'o', 'n', 'i', // -^