From 8ea567febff0d09aa3b4f6991dbdf970d1e9723d Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Fri, 3 Aug 2012 12:20:22 +0100 Subject: [PATCH] DFU properly removed for audio class 1.0 --- module_usb_aud_shared/devicedefines.h | 5 +++++ module_usb_aud_shared/endpoint0/descriptors_2.h | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/module_usb_aud_shared/devicedefines.h b/module_usb_aud_shared/devicedefines.h index 2df37615..97b01c69 100644 --- a/module_usb_aud_shared/devicedefines.h +++ b/module_usb_aud_shared/devicedefines.h @@ -273,6 +273,11 @@ /* Total number of USB interfaces this device implements (+1 for required control interface) */ #define NUM_INTERFACES INPUT_INTERFACES + OUTPUT_INTERFACES + DFU_INTERFACES + MIDI_INTERFACES + IAP_INTERFACES + 1 + HID_INTERFACES + +/* Number of interfaces for Audio 1.0 */ +#define NUM_INTERFACES_A1 (1+INPUT_INTERFACES+OUTPUT_INTERFACES) + + /* Audio Unit ID defines */ #define FU_USBIN 11 /* Feature Unit: USB Audio device -> host */ #define FU_USBOUT 10 /* Feature Unit: USB Audio host -> device*/ diff --git a/module_usb_aud_shared/endpoint0/descriptors_2.h b/module_usb_aud_shared/endpoint0/descriptors_2.h index 6b8cd403..c89d9d71 100644 --- a/module_usb_aud_shared/endpoint0/descriptors_2.h +++ b/module_usb_aud_shared/endpoint0/descriptors_2.h @@ -1585,9 +1585,9 @@ unsigned char cfgDesc_Audio1[] = (CFG_TOTAL_LENGTH_A1 & 0xFF), /* wTotalLength */ (CFG_TOTAL_LENGTH_A1 >> 8), /* wTotalLength */ #ifdef MIDI - NUM_INTERFACES-2, /* numInterfaces - we dont support MIDI in audio 1.0 mode*/ + NUM_INTERFACES_A1-2, /* numInterfaces - we dont support MIDI in audio 1.0 mode*/ #else - NUM_INTERFACES, + NUM_INTERFACES_A1, #endif 0x01, /* ID of this configuration */ 0x00, /* Unused */ @@ -1855,6 +1855,7 @@ unsigned char cfgDesc_Audio1[] = 0x00, 0x00, /* Unused */ #endif +#if 0 /* 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) */ @@ -1865,7 +1866,7 @@ unsigned char cfgDesc_Audio1[] = 0x01, /* 6 bInterfaceSubclass : (field size 1 bytes) */ 0x01, /* 7 bInterfaceProtocol : Unused. (field size 1 bytes) */ 8, /* 8 iInterface : Unused. (field size 1 bytes) */ - +#endif #if 0 /* DFU 1.0 Run-Time DFU Functional Descriptor */ 0x07,