Merge pull request #18 from larry-xmos/uac1_control_descriptor_name

Give UAC1 control interface a name and swap UAC1 DFU and control interface numbers
This commit is contained in:
Larry Snizek
2017-10-06 17:49:21 +01:00
committed by GitHub
2 changed files with 11 additions and 3 deletions

View File

@@ -5,6 +5,8 @@ sc_usb_audio Change Log
-----
- ADDED: Linux Makefile for xmosdfu host application
- ADDED: Raspberry Pi Makefile for xmosdfu host application
- CHANGE: Vendor specific control interface in UAC1 descriptor now has a string descriptor
so it shows up with a descriptive name in Windows Device Manager
7.4.1
-----

View File

@@ -64,6 +64,9 @@ typedef struct
#ifdef DFU
STR_TABLE_ENTRY(dfuStr); /* iInterface for DFU interface */
#endif
#ifdef USB_CONTROL_DESCS
STR_TABLE_ENTRY(ctrlStr);
#endif
#ifdef MIDI
STR_TABLE_ENTRY(midiOutStr); /* iJack for MIDI Out */
STR_TABLE_ENTRY(midiInStr); /* iJack for MIDI In */
@@ -334,6 +337,9 @@ StringDescTable_t g_strTable =
#ifdef DFU
.dfuStr = APPEND_VENDOR_STR(DFU),
#endif
#ifdef USB_CONTROL_DESCS
.ctrlStr = APPEND_VENDOR_STR(Control),
#endif
#ifdef MIDI
.midiOutStr = APPEND_VENDOR_STR(MIDI Out),
.midiInStr = APPEND_VENDOR_STR(MIDI In),
@@ -2743,7 +2749,7 @@ unsigned char cfgDesc_Audio1[] =
/* Standard DFU class Interface descriptor */
0x09, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */
0x04, /* 1 bDescriptorType : INTERFACE descriptor. (field size 1 bytes) */
(OUTPUT_INTERFACES_A1 + INPUT_INTERFACES_A1 + 1), /* 2 bInterfaceNumber : Index of this interface. (field size 1 bytes) */
(OUTPUT_INTERFACES_A1 + INPUT_INTERFACES_A1 + NUM_CONTROL_INTERFACES + 1), /* 2 bInterfaceNumber : Index of this interface. (field size 1 bytes) */
0x00, /* 3 bAlternateSetting : Index of this setting. (field size 1 bytes) */
0x00, /* 4 bNumEndpoints : 0 endpoints. (field size 1 bytes) */
0xFE, /* 5 bInterfaceClass : DFU. (field size 1 bytes) */
@@ -2767,13 +2773,13 @@ unsigned char cfgDesc_Audio1[] =
/* Standard DFU class Interface descriptor */
0x09, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */
0x04, /* 1 bDescriptorType : INTERFACE descriptor. (field size 1 bytes) */
(OUTPUT_INTERFACES_A1 + INPUT_INTERFACES_A1 + DFU_INTERFACES_A1 + 1), /* 2 bInterfaceNumber */
(OUTPUT_INTERFACES_A1 + INPUT_INTERFACES_A1 + 1), /* 2 bInterfaceNumber */
0x00, /* 3 bAlternateSetting : Index of this setting. (field size 1 bytes) */
0x00, /* 4 bNumEndpoints : 0 endpoints. (field size 1 bytes) */
0xFF, /* 5 bInterfaceClass : DFU. (field size 1 bytes) */
0xFF, /* 6 bInterfaceSubclass : (field size 1 bytes) */
0xFF, /* 7 bInterfaceProtocol : Unused. (field size 1 bytes) */
0x00, /* 8 iInterface */
offsetof(StringDescTable_t, ctrlStr)/sizeof(char *), /* 8 iInterface */
#endif
};