forked from PAWPAW-Mirror/lib_xua
Define, stringtable and whitespace tidy
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "usb.h"
|
||||
#include "usbaudio20.h" /* Defines from the USB Audio 2.0 Specifications */
|
||||
#include "devicedefines.h" /* Define specific define */
|
||||
#include "devicedefines.h" /* Device specific define */
|
||||
|
||||
/***** Device Descriptors *****/
|
||||
|
||||
@@ -58,7 +58,7 @@ unsigned char devDesc_Audio2[] =
|
||||
(BCD_DEVICE & 0xFF), /* 12 bcdDevice : Device release number */
|
||||
(BCD_DEVICE >> 8), /* 13 bcdDevice : Device release number */
|
||||
MANUFACTURER_STR_INDEX, /* 14 iManufacturer : Index of manufacturer string */
|
||||
PRODUCT_STR_INDEX, /* 15 iProduct : Index of product string descriptor */
|
||||
PRODUCT_STR_INDEX_A2, /* 15 iProduct : Index of product string descriptor */
|
||||
0,// SERIAL_STR_INDEX, /* 16 iSerialNumber : Index of serial number decriptor */
|
||||
0x02 /* 17 bNumConfigurations : Number of possible configs. Set to 2 so that Windows
|
||||
does not load Composite driver. */
|
||||
@@ -82,7 +82,7 @@ unsigned char devDesc_Null[] =
|
||||
(BCD_DEVICE & 0xFF), /* 12 bcdDevice : Device release number */
|
||||
(BCD_DEVICE >> 8), /* 13 bcdDevice : Device release number */
|
||||
MANUFACTURER_STR_INDEX, /* 14 iManufacturer : Index of manufacturer string */
|
||||
PRODUCT_STR_INDEX, /* 15 iProduct : Index of product string descriptor */
|
||||
PRODUCT_STR_INDEX_A2, /* 15 iProduct : Index of product string descriptor */
|
||||
0,//SERIAL_STR_INDEX, /* 16 iSerialNumber : Index of serial number decriptor */
|
||||
0x01 /* 17 bNumConfigurations : Number of possible configs */
|
||||
};
|
||||
@@ -335,7 +335,7 @@ unsigned char cfgDesc_Audio2[] =
|
||||
AUDIO_FUNCTION, /* 4 bFunctionClass: AUDIO_FUNCTION */
|
||||
FUNCTION_SUBCLASS_UNDEFINED, /* 5 bFunctionSubClass: FUNCTION_SUBCLASS_UNDEFINED */
|
||||
AF_VERSION_02_00, /* 6 bFunctionProtocol: AF_VERSION_02_00 */
|
||||
0x00, /* 7 iFunction (String Index) *(re-use iProduct) */
|
||||
0x00, /* 7 iFunction (String Index) */
|
||||
|
||||
/* Standard Audio Control Interface Descriptor (Note: Must be first with lowest interface number)r */
|
||||
0x09, /* 0 bLength: 9 */
|
||||
@@ -350,7 +350,7 @@ unsigned char cfgDesc_Audio2[] =
|
||||
AUDIO, /* 5 bInterfaceClass: AUDIO */
|
||||
AUDIOCONTROL, /* 6 bInterfaceSubClass: AUDIOCONTROL*/
|
||||
IP_VERSION_02_00, /* 7 bInterfaceProtocol: IP_VERSION_02_00 */
|
||||
PRODUCT_STR_INDEX, /* 8 iInterface (re-use iProduct) */
|
||||
PRODUCT_STR_INDEX_A2, /* 8 iInterface (re-use iProduct) */
|
||||
|
||||
/* Class Specific Audio Control Interface Header Descriptor: */
|
||||
LEN_AC, /* 0 bLength */
|
||||
@@ -920,7 +920,6 @@ unsigned char cfgDesc_Audio2[] =
|
||||
|
||||
#endif /* NATIVE_DSD */
|
||||
|
||||
|
||||
#ifdef ADAT_TX
|
||||
/* Standard AS Interface Descriptor (4.9.1) (Alt) */
|
||||
0x09, /* 0 bLength: (in bytes, 9) */
|
||||
@@ -1417,23 +1416,29 @@ unsigned char cfgDesc_Audio2[] =
|
||||
|
||||
#define APPEND_VENDOR_STR(x) VENDOR_STR " "#x
|
||||
|
||||
#define APPEND_PRODUCT_STR_A2_(x) PRODUCT_STR_A2 #x
|
||||
#define APPEND_PRODUCT_STR_A2(x) APPEND_PRODUCT_STR_A2_(x)
|
||||
#define APPEND_PRODUCT_STR_A2(x) PRODUCT_STR_A2 " " #x
|
||||
|
||||
#define APPEND_PRODUCT_STR_A1_(x) PRODUCT_STR_A1 #x
|
||||
#define APPEND_PRODUCT_STR_A1(x) APPEND_PRODUCT_STR_A1_(x)
|
||||
#define APPEND_PRODUCT_STR_A1(x) PRODUCT_STR_A1 " " #x
|
||||
|
||||
#if defined(SPDIF)
|
||||
#if ((NUM_USB_CHAN_OUT - 2) <= 0)
|
||||
#define SPDIF_TX_OVERLAP 1
|
||||
#else
|
||||
#define SPDIF_TX_OVERLAP 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static unsigned char strDescs[][40] =
|
||||
{
|
||||
"Langids", /* 0 LangIDs) place holder */
|
||||
"Langids", // 0 LangIDs place holder
|
||||
APPEND_VENDOR_STR( ), // 1 iManufacturer (at MANUFACTURER_STRING_INDEX)
|
||||
|
||||
"",//SERIAL_STR, // 2 iSerialNumber (at SERIAL_STR_INDEX)
|
||||
|
||||
/* Audio 2.0 Strings */
|
||||
PRODUCT_STR_A2, // 2 iProduct and iInterface for control interface (at PRODUCT_STR_INDEX)
|
||||
"",//SERIAL_STR, // 3 iSerialNumber (at SERIAL_STR_INDEX)
|
||||
PRODUCT_STR_A2, // 3 iProduct and iInterface for control interface (at PRODUCT_STR_INDEX)
|
||||
APPEND_PRODUCT_STR_A2(), // 4 iInterface for Streaming interaces
|
||||
APPEND_PRODUCT_STR_A2(), // 5
|
||||
|
||||
APPEND_PRODUCT_STR_A2(), // 6 "USB Input Terminal" (User sees as output from host)
|
||||
APPEND_PRODUCT_STR_A2(), // 7 "USB Output Terminal" (User sees as input to host)
|
||||
|
||||
@@ -1461,8 +1466,9 @@ static unsigned char strDescs[][40] =
|
||||
APPEND_VENDOR_STR(MIDI In ), // iJack for MIDI IN
|
||||
#endif
|
||||
|
||||
// Output channel name place holders - Get customised at runtime based on devic
|
||||
#if (NUM_USB_CHAN_OUT > 0)
|
||||
"Analogue 1", // Output channel name place holders - Get customised at runtime based on device config
|
||||
"Analogue 1",
|
||||
#endif
|
||||
#if (NUM_USB_CHAN_OUT > 1)
|
||||
"Analogue 2",
|
||||
|
||||
Reference in New Issue
Block a user