From 918e2ed0f117d3358d63d8516c62f7c8eb7e3b71 Mon Sep 17 00:00:00 2001 From: xross Date: Thu, 13 Oct 2022 16:08:19 +0100 Subject: [PATCH] Removed some build warnings and updated comments for doc inclusion --- lib_xua/module_build_info | 2 +- lib_xua/src/core/buffer/ep/ep_buffer.xc | 7 ++++--- lib_xua/src/core/main.xc | 10 ++++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index b94a8987..eecbfd34 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -14,7 +14,7 @@ DEPENDENT_MODULES = lib_locks(>=2.1.0) \ lib_spdif(>=4.1.0) \ lib_xassert(>=4.1.0) \ lib_xud(>=2.1.0) \ - lib_adat (>=1.0.0) + lib_adat(>=1.0.0) MODULE_XCC_FLAGS = $(XCC_FLAGS) \ -O3 \ diff --git a/lib_xua/src/core/buffer/ep/ep_buffer.xc b/lib_xua/src/core/buffer/ep/ep_buffer.xc index e052c0ca..be3c09a9 100644 --- a/lib_xua/src/core/buffer/ep/ep_buffer.xc +++ b/lib_xua/src/core/buffer/ep/ep_buffer.xc @@ -230,8 +230,11 @@ void XUA_Buffer_Ep(register chanend c_aud_out, unsigned u_tmp; unsigned sampleFreq = DEFAULT_FREQ; unsigned masterClockFreq = DEFAULT_MCLK_FREQ; - unsigned lastClock = 0; +#if (XUA_SYNCMODE == XUA_SYNCMODE_ASYNC) + unsigned lastClock = 0; + unsigned freqChange = 0; +#endif unsafe{masterClockFreq_ptr = &masterClockFreq;} unsigned clocks = 0; @@ -245,7 +248,6 @@ void XUA_Buffer_Ep(register chanend c_aud_out, unsigned bufferIn = 1; #endif unsigned sofCount = 0; - unsigned freqChange = 0; unsigned mod_from_last_time = 0; #ifdef FB_TOLERANCE_TEST @@ -355,7 +357,6 @@ void XUA_Buffer_Ep(register chanend c_aud_out, #ifndef LOCAL_CLOCK_MARGIN #define LOCAL_CLOCK_MARGIN (1000) #endif - int sofClockValid = 0; timer t_sofCheck; unsigned timeLastEdge; unsigned timeNextEdge; diff --git a/lib_xua/src/core/main.xc b/lib_xua/src/core/main.xc index 7e2aacf5..dbe933fa 100755 --- a/lib_xua/src/core/main.xc +++ b/lib_xua/src/core/main.xc @@ -310,12 +310,11 @@ VENDOR_REQUESTS_PARAMS_DEC_ /* Run UAC2.0 at high-speed, UAC1.0 at full-speed */ unsigned usbSpeed = (AUDIO_CLASS == 2) ? XUD_SPEED_HS : XUD_SPEED_FS; - /* USB Interface Core */ + /* USB interface core */ XUD_Main(c_xud_out, ENDPOINT_COUNT_OUT, c_xud_in, ENDPOINT_COUNT_IN, c_sof, epTypeTableOut, epTypeTableIn, usbSpeed, XUD_PWR_CFG); } - /* USB Packet buffering Core */ { unsigned x; thread_speed(); @@ -332,7 +331,7 @@ VENDOR_REQUESTS_PARAMS_DEC_ asm("ldw %0, dp[clk_audio_mclk]":"=r"(x)); asm("setclk res[%0], %1"::"r"(p_for_mclk_count), "r"(x)); #endif - //:buffer + /* Endpoint & audio buffering cores */ XUA_Buffer(c_xud_out[ENDPOINT_NUMBER_OUT_AUDIO],/* Audio Out*/ #if (NUM_USB_CHAN_IN > 0) @@ -460,7 +459,7 @@ void usb_audio_io(chanend ?c_aud_in, } #endif - /* Audio I/O Core (pars additional S/PDIF TX Core) */ + /* Audio I/O core (pars additional S/PDIF TX Core) */ { thread_speed(); #ifdef MIXER @@ -596,6 +595,7 @@ int main() #endif #endif #if XUA_USB_EN + /* Core USB audio task, buffering, USB etc */ usb_audio_core(c_mix_out #ifdef MIDI , c_midi @@ -621,6 +621,7 @@ int main() on tile[AUDIO_IO_TILE]: { + /* Audio I/O task, includes mixing etc */ usb_audio_io(c_mix_out #if (XUA_SPDIF_TX_EN) && (SPDIF_TX_TILE != AUDIO_IO_TILE) , c_spdif_tx @@ -643,6 +644,7 @@ int main() #endif ); } + //: #if (XUA_SPDIF_TX_EN) && (SPDIF_TX_TILE != AUDIO_IO_TILE) on tile[SPDIF_TX_TILE]: