From eae62a9e3c7498e276bd9c8f9582c5f1b21e576e Mon Sep 17 00:00:00 2001 From: Keith Au Date: Wed, 8 Jan 2020 13:49:54 +0800 Subject: [PATCH] moved defined to xua_conf.h. Fixed bug that causes compile error --- lib_xua/api/xua_conf_default.h | 24 ------------------- .../src/core/endpoint0/xua_ep0_descriptors.h | 2 +- lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc | 2 +- 3 files changed, 2 insertions(+), 26 deletions(-) diff --git a/lib_xua/api/xua_conf_default.h b/lib_xua/api/xua_conf_default.h index 2b2a722a..b22046f0 100644 --- a/lib_xua/api/xua_conf_default.h +++ b/lib_xua/api/xua_conf_default.h @@ -233,30 +233,6 @@ #define DEFAULT_AUDOUT_FREQ (48000) #endif -#define USB_CMD_CFG_SAMP_FREQ -// Not ready yet -// #define USB_IN_CONFIGURABLE_BIT_RES -// #ifdef USB_IN_CONFIGURABLE_BIT_RES - // #define USB_IN_BIT_RES_0 STREAM_FORMAT_INPUT_1_RESOLUTION_BITS - // #define USB_IN_BIT_RES_1 STREAM_FORMAT_INPUT_1_RESOLUTION_BITS//24 -// #endif - -#ifdef USB_CMD_CFG_SAMP_FREQ - #define USB_IN_SAMP_FREQ_NUM 3 - #define USB_IN_SAMP_FREQ_0 DEFAULT_AUDOUT_FREQ - #define USB_IN_SAMP_FREQ_1 16000 - #define USB_IN_SAMP_FREQ_2 16000 - - #if (USB_IN_SAMP_FREQ_NUM < 3) - #error "USB_IN_SAMP_FREQ_NUM must be >=3" - #endif -#else - #define USB_IN_DESCRIPTOR_FREQ_OVERRIDE //used if USB in frequency is not conifigurable by USB endpoint command - #ifdef USB_IN_DESCRIPTOR_FREQ_OVERRIDE - #define USB_IN_FREQ_DESCIPTOR_OFFSET 161 //161- (3 * 3) are the position of descriptor that needed to be modified for USB in frequency - #endif -#endif - /* Audio Class Defines */ /** diff --git a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h index bcb2178e..05c8a906 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h +++ b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h @@ -20,7 +20,7 @@ #include "iap2.h" /* Defines iAP EA Native Transport protocol name */ #endif -#include "xua_conf_default.h" +#include "xua_conf.h" #define APPEND_VENDOR_STR(x) VENDOR_STR" "#x diff --git a/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc index d07ffe59..d096c9c9 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc +++ b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc @@ -1116,7 +1116,7 @@ int AudioEndpointRequests_1(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp { return result; } -#if ((MAX_FREQ != MIN_FREQ) || (defined USB_CMD_CFG_SAMP_FREQ) +#if ((MAX_FREQ != MIN_FREQ) || (defined USB_CMD_CFG_SAMP_FREQ)) if(controlSelector == SAMPLING_FREQ_CONTROL) { /* Expect length 3 for sample rate */