diff --git a/lib_xua/src/core/buffer/ep/ep_buffer.xc b/lib_xua/src/core/buffer/ep/ep_buffer.xc index 6c72dd7a..2a7ee928 100644 --- a/lib_xua/src/core/buffer/ep/ep_buffer.xc +++ b/lib_xua/src/core/buffer/ep/ep_buffer.xc @@ -10,9 +10,6 @@ #include "xud.h" #include "testct_byref.h" -on tile[0] : out port p_test = XS1_PORT_1A; -int tog = 0; - #if XUA_HID_ENABLED #include "xua_hid_report.h" #include "user_hid.h" @@ -576,8 +573,6 @@ void XUA_Buffer_Ep(register chanend c_aud_out, asm volatile("getts %0, res[%1]" : "=r" (mclk_pt) : "r" (p_off_mclk)); outuint(c_swpll_update, mclk_pt); outct(c_swpll_update, XS1_CT_END); - p_test <: tog; - tog = !tog; } #endif diff --git a/lib_xua/src/core/clocking/apppll.xc b/lib_xua/src/core/clocking/apppll.xc index 66120dfe..9d79e585 100644 --- a/lib_xua/src/core/clocking/apppll.xc +++ b/lib_xua/src/core/clocking/apppll.xc @@ -292,16 +292,18 @@ int SoftPllUpdate(tileref tile, unsigned short mclk_pt, unsigned short mclk_pt_l #endif void XUA_SoftPll(tileref tile, server interface SoftPll_if i_softPll, chanend c_update) { +#if (XUA_SYNCMODE == XUA_SYNCMODE_SYNC) unsigned ds_out; timer tmr; int time; unsigned mclk_pt; unsigned short mclk_pt_last; + tmr :> time; +#endif struct SoftPllState pllState; int running = 0; int firstUpdate = 1; - tmr :> time; while(1) { @@ -347,7 +349,7 @@ void XUA_SoftPll(tileref tile, server interface SoftPll_if i_softPll, chanend c_ default : break; - } + } // Second order, Single bit delta sigma - mod2 pllState.ds_x1 += pllState.ds_in - pllState.ds_fb; diff --git a/lib_xua/src/core/main.xc b/lib_xua/src/core/main.xc index b4dbbd38..6719541c 100755 --- a/lib_xua/src/core/main.xc +++ b/lib_xua/src/core/main.xc @@ -598,7 +598,9 @@ int main() #endif /* XUA_USB_EN */ } +#if(XUA_USE_APP_PLL) on tile[AUDIO_IO_TILE]: XUA_SoftPll(tile[0], i_softPll, c_swpll_update); +#endif on tile[AUDIO_IO_TILE]: { /* Audio I/O task, includes mixing etc */