forked from PAWPAW-Mirror/lib_xua
Apply manually: [PATCH 02/19] Mixer unit now used MAX_MIX_COUNT define
This commit is contained in:
@@ -170,12 +170,6 @@ unsigned char devQualDesc_Null[] =
|
|||||||
#define MIDI_LENGTH (0)
|
#define MIDI_LENGTH (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MIXER
|
|
||||||
#define MIXER_LENGTH (13+1+18)
|
|
||||||
#else
|
|
||||||
#define MIXER_LENGTH (0)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef IAP
|
#ifdef IAP
|
||||||
#define IAP_LENGTH (30)
|
#define IAP_LENGTH (30)
|
||||||
#else
|
#else
|
||||||
@@ -191,9 +185,18 @@ unsigned char devQualDesc_Null[] =
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MIXER
|
#ifdef MIXER
|
||||||
#define LEN_XU_MIX (17)
|
#define LEN_XU_MIX (17)
|
||||||
|
#define MIX_BMCONTROLS_LEN_TMP ((MAX_MIX_COUNT * MIX_INPUTS) / 8)
|
||||||
|
|
||||||
|
#if ((MAX_MIX_COUNT * MIX_INPUTS)%8)==0
|
||||||
|
#define MIX_BMCONTROLS_LEN (MIX_BMCONTROLS_LEN_TMP)
|
||||||
|
#else
|
||||||
|
#define MIX_BMCONTROLS_LEN (MIX_BMCONTROLS_LEN_TMP+1)
|
||||||
|
#endif
|
||||||
|
#define MIXER_LENGTH (13+1+MIX_BMCONTROLS_LEN)
|
||||||
#else
|
#else
|
||||||
#define LEN_XU_MIX (0)
|
#define LEN_XU_MIX (0)
|
||||||
|
#define MIXER_LENGTH (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LEN_CLK (8)
|
#define LEN_CLK (8)
|
||||||
@@ -219,7 +222,7 @@ unsigned char devQualDesc_Null[] =
|
|||||||
|
|
||||||
|
|
||||||
/* Total length of config descriptor */
|
/* Total length of config descriptor */
|
||||||
#define CFG_TOTAL_LENGTH_A2 (7 + 26 + (INPUT_INTERFACES * 55) + (OUTPUT_INTERFACES * 62) + (MIDI_LENGTH) + (DFU_INTERFACES * 16) + TLEN_AC + (MIXER_LENGTH) + IAP_LENGTH + INPUT_ALT_LENGTH + OUTPUT_ALT_LENGTH)
|
#define CFG_TOTAL_LENGTH_A2 (7 + 26 + (INPUT_INTERFACES * 55) + (OUTPUT_INTERFACES * 62) + (MIDI_LENGTH) + (DFU_INTERFACES * 18) + TLEN_AC + (MIXER_LENGTH) + IAP_LENGTH + INPUT_ALT_LENGTH + OUTPUT_ALT_LENGTH)
|
||||||
|
|
||||||
/* Define for number of audio interfaces (+1 for mandatory control interface) */
|
/* Define for number of audio interfaces (+1 for mandatory control interface) */
|
||||||
#define AUDIO_INTERFACES (INPUT_INTERFACES + OUTPUT_INTERFACES + 1)
|
#define AUDIO_INTERFACES (INPUT_INTERFACES + OUTPUT_INTERFACES + 1)
|
||||||
@@ -621,20 +624,72 @@ unsigned char cfgDesc_Audio2[] =
|
|||||||
/* N = 144 (18 * 8) */
|
/* N = 144 (18 * 8) */
|
||||||
/* Mixer Unit Bitmap - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
/* Mixer Unit Bitmap - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff */
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff */
|
||||||
0x0D+0x01+0x12, /* 0 bLength : 13 + num inputs + bit map (inputs * outputs) */
|
MIXER_LENGTH, /* 0 bLength : 13 + num inputs + bit map (inputs * outputs) */
|
||||||
CS_INTERFACE, /* 1 bDescriptorType: 0x24 */
|
CS_INTERFACE, /* 1 bDescriptorType: 0x24 */
|
||||||
0x04, /* bDescriptorSubtype: MIXER_UNIT */
|
0x04, /* bDescriptorSubtype: MIXER_UNIT */
|
||||||
ID_MIXER_1, /* Mixer unit id */
|
ID_MIXER_1, /* Mixer unit id */
|
||||||
0x01, /* Number of input pins */
|
0x01, /* Number of input pins */
|
||||||
ID_XU_MIXSEL, /* Connected terminal or unit id for input pin*/
|
ID_XU_MIXSEL, /* Connected terminal or unit id for input pin*/
|
||||||
0x08, /* Number of mixer output channels */
|
MAX_MIX_COUNT, /* Number of mixer output channels */
|
||||||
0x00, 0x00, 0x00, 0x00, /* Spacial location ???? */
|
0x00, 0x00, 0x00, 0x00, /* Spacial location ???? */
|
||||||
49, /* Channel name index */
|
49, /* Channel name index */
|
||||||
0xff, 0xff, 0xff, 0xff, /* Mixer programmable control bitmap */
|
#if MIX_BMCONTROLS_LEN > 0 /* Mixer programmable control bitmap */
|
||||||
0xff, 0xff, 0xff, 0xff,
|
0xff,
|
||||||
0xff, 0xff, 0xff, 0xff,
|
#endif
|
||||||
0xff, 0xff, 0xff, 0xff,
|
#if MIX_BMCONTROLS_LEN > 1
|
||||||
0xff, 0xff,
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 2
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 3
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 4
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 5
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 6
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 7
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 8
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 9
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 10
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 11
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 12
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 13
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 14
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 15
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 16
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 17
|
||||||
|
0xff,
|
||||||
|
#endif
|
||||||
|
#if MIX_BMCONTROLS_LEN > 18
|
||||||
|
#error unxpected BMCONTROLS_LEN
|
||||||
|
#endif
|
||||||
0x00, /* bmControls */
|
0x00, /* bmControls */
|
||||||
0, /* Mixer unit string descriptor index */
|
0, /* Mixer unit string descriptor index */
|
||||||
#endif
|
#endif
|
||||||
@@ -715,7 +770,7 @@ unsigned char cfgDesc_Audio2[] =
|
|||||||
0x81, /* 2 bEndpointAddress (D7: 0:out, 1:in) */
|
0x81, /* 2 bEndpointAddress (D7: 0:out, 1:in) */
|
||||||
17, /* 3 bmAttributes (bitmap) */
|
17, /* 3 bmAttributes (bitmap) */
|
||||||
4,0, /* 4 wMaxPacketSize */
|
4,0, /* 4 wMaxPacketSize */
|
||||||
8, /* 6 bInterval */
|
4, /* 6 bInterval. Only values <= 1 frame (8) supported by MS */
|
||||||
|
|
||||||
#ifdef ADAT_TX
|
#ifdef ADAT_TX
|
||||||
/* Standard AS Interface Descriptor (4.9.1) (Alt) */
|
/* Standard AS Interface Descriptor (4.9.1) (Alt) */
|
||||||
@@ -1068,10 +1123,11 @@ unsigned char cfgDesc_Audio2[] =
|
|||||||
0x00, /* 4 bNumEndpoints : 0 endpoints. (field size 1 bytes) */
|
0x00, /* 4 bNumEndpoints : 0 endpoints. (field size 1 bytes) */
|
||||||
0xFE, /* 5 bInterfaceClass : DFU. (field size 1 bytes) */
|
0xFE, /* 5 bInterfaceClass : DFU. (field size 1 bytes) */
|
||||||
0x01, /* 6 bInterfaceSubclass : (field size 1 bytes) */
|
0x01, /* 6 bInterfaceSubclass : (field size 1 bytes) */
|
||||||
0x00, /* 7 bInterfaceProtocol : Unused. (field size 1 bytes) */
|
0x01, /* 7 bInterfaceProtocol : Unused. (field size 1 bytes) */
|
||||||
12, /* 8 iInterface : Used. (field size 1 bytes) */
|
12, /* 8 iInterface : Used. (field size 1 bytes) */
|
||||||
|
|
||||||
/* Standard DFU class functional descriptor */
|
#if 0
|
||||||
|
/* DFU 1.0 Run-Time DFU Functional Descriptor */
|
||||||
0x07,
|
0x07,
|
||||||
0x21,
|
0x21,
|
||||||
0x07,
|
0x07,
|
||||||
@@ -1079,6 +1135,19 @@ unsigned char cfgDesc_Audio2[] =
|
|||||||
0x00,
|
0x00,
|
||||||
0x40,
|
0x40,
|
||||||
0x00,
|
0x00,
|
||||||
|
#else
|
||||||
|
/* DFU 1.1 Run-Time DFU Functional Descriptor */
|
||||||
|
0x09, /* 0 Size */
|
||||||
|
0x21, /* 1 bDescriptorType : DFU FUNCTIONAL */
|
||||||
|
0x07, /* 2 bmAttributes */
|
||||||
|
0xFA, /* 3 wDetachTimeOut */
|
||||||
|
0x00, /* 4 wDetachTimeOut */
|
||||||
|
0x40, /* 5 wTransferSize */
|
||||||
|
0x00, /* 6 wTransferSize */
|
||||||
|
0x10, /* 7 bcdDFUVersion */
|
||||||
|
0x01, /* 7 bcdDFUVersion */
|
||||||
|
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IAP
|
#ifdef IAP
|
||||||
@@ -1536,7 +1605,6 @@ unsigned char cfgDesc_Audio1[] =
|
|||||||
0x00, 0x00, /* Unused */
|
0x00, 0x00, /* Unused */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef DFU
|
|
||||||
/* Standard DFU class Interface descriptor */
|
/* Standard DFU class Interface descriptor */
|
||||||
0x09, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */
|
0x09, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */
|
||||||
0x04, /* 1 bDescriptorType : INTERFACE descriptor. (field size 1 bytes) */
|
0x04, /* 1 bDescriptorType : INTERFACE descriptor. (field size 1 bytes) */
|
||||||
@@ -1545,10 +1613,11 @@ unsigned char cfgDesc_Audio1[] =
|
|||||||
0x00, /* 4 bNumEndpoints : 0 endpoints. (field size 1 bytes) */
|
0x00, /* 4 bNumEndpoints : 0 endpoints. (field size 1 bytes) */
|
||||||
0xFE, /* 5 bInterfaceClass : DFU. (field size 1 bytes) */
|
0xFE, /* 5 bInterfaceClass : DFU. (field size 1 bytes) */
|
||||||
0x01, /* 6 bInterfaceSubclass : (field size 1 bytes) */
|
0x01, /* 6 bInterfaceSubclass : (field size 1 bytes) */
|
||||||
0x00, /* 7 bInterfaceProtocol : Unused. (field size 1 bytes) */
|
0x01, /* 7 bInterfaceProtocol : Unused. (field size 1 bytes) */
|
||||||
0x08, /* 8 iInterface : Unused. (field size 1 bytes) */
|
12, /* 8 iInterface : Unused. (field size 1 bytes) */
|
||||||
|
|
||||||
/* Standard DFU class functional descriptor */
|
#if 0
|
||||||
|
/* DFU 1.0 Run-Time DFU Functional Descriptor */
|
||||||
0x07,
|
0x07,
|
||||||
0x21,
|
0x21,
|
||||||
0x07,
|
0x07,
|
||||||
@@ -1556,6 +1625,18 @@ unsigned char cfgDesc_Audio1[] =
|
|||||||
0x00,
|
0x00,
|
||||||
0x40,
|
0x40,
|
||||||
0x00
|
0x00
|
||||||
|
#else
|
||||||
|
/* DFU 1.1 Run-Time DFU Functional Descriptor */
|
||||||
|
0x09, /* 0 Size */
|
||||||
|
0x21, /* 1 bDescriptorType : DFU FUNCTIONAL */
|
||||||
|
0x07, /* 2 bmAttributes */
|
||||||
|
0xFA, /* 3 wDetachTimeOut */
|
||||||
|
0x00, /* 4 wDetachTimeOut */
|
||||||
|
0x40, /* 5 wTransferSize */
|
||||||
|
0x00, /* 6 wTransferSize */
|
||||||
|
0x10, /* 7 bcdDFUVersion */
|
||||||
|
0x01, /* 7 bcdDFUVersion */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user