From a89df80da84ee703bac7e00fba24e485101a1027 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 20 Sep 2023 16:14:00 +0100 Subject: [PATCH 1/8] Updates for new S/PDIF receiver --- lib_xua/src/core/clocking/clockgen.xc | 41 +++++++++------------------ lib_xua/src/core/main.xc | 14 ++++----- 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index ec5f1c77..60e20d7f 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -219,18 +219,6 @@ static inline int validSamples(Counter &counter, int clockIndex) } #endif -#if (XUA_SPDIF_RX_EN) -//:badParity -/* Returns 1 for bad parity, else 0 */ -static inline int badParity(unsigned x) -{ - unsigned X = (x>>4); - crc32(X, 0, 1); - return X & 1; -} -//: -#endif - #ifdef LEVEL_METER_LEDS void VendorLedRefresh(unsigned levelData[]); unsigned g_inputLevelData[NUM_USB_CHAN_IN]; @@ -269,9 +257,10 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa int spdifUnderflow = 1; int spdifSamps = 0; /* Number of samples in buffer */ Counter spdifCounters; - int spdifReceivedTime; + int spdifRxTime; unsigned tmp2; unsigned spdifLeft = 0; + unsigned spdifRxData; #endif #if (XUA_ADAT_RX_EN) @@ -330,7 +319,6 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa adatCounters.samplesPerTick = 0; #endif - t_local :> timeNextEdge; timeLastEdge = timeNextEdge; timeNextClockDetection = timeNextEdge + (LOCAL_CLOCK_INCREMENT / 2); @@ -521,25 +509,24 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa #endif #if (XUA_SPDIF_RX_EN) - /* Receive sample from S/PDIF RX thread (steaming chan) */ - case c_spdif_rx :> tmp: + /* Receive sample from S/PDIF RX thread (streaming chan) */ + case c_spdif_rx :> spdifRxData: /* Record time of sample */ - t_local :> spdifReceivedTime; + t_local :> spdifRxTime; /* Check parity and ignore if bad */ - if(badParity(tmp)) + if(spdif_check_parity(tmp)) continue; - /* Get pre-amble */ - tmp2 = tmp & 0xF; - switch(tmp2) + /* Get preamble */ + unsigned preamble = spdifRxData & SPDIF_RX_PREAMBLE_MASK; + switch(preamble) { /* LEFT */ case SPDIF_FRAME_X: case SPDIF_FRAME_Z: - - spdifLeft = tmp << 4; + spdifLeft = SPDIF_RX_EXTRACT_SAMPLE(spdifRxData); break; /* RIGHT */ @@ -550,7 +537,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa { /* Store left and right sample pair to buffer */ spdifSamples[spdifWr] = spdifLeft; - spdifSamples[spdifWr+1] = tmp << 4; + spdifSamples[spdifWr+1] = SPDIF_RX_EXTRACT_SAMPLE(spdifRxData); spdifWr = (spdifWr + 2) & (MAX_SPDIF_SAMPLES - 1); @@ -586,13 +573,13 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa if((spdifCounters.receivedSamples >= spdifCounters.samplesPerTick)) { /* Check edge is about right... S/PDIF may have changed freq... */ - if(timeafter(spdifReceivedTime, (timeLastEdge + LOCAL_CLOCK_INCREMENT - LOCAL_CLOCK_MARGIN))) + if(timeafter(spdifRxTime, (timeLastEdge + LOCAL_CLOCK_INCREMENT - LOCAL_CLOCK_MARGIN))) { /* Record edge time */ - timeLastEdge = spdifReceivedTime; + timeLastEdge = spdifRxTime; /* Setup for next edge */ - timeNextEdge = spdifReceivedTime + LOCAL_CLOCK_INCREMENT + LOCAL_CLOCK_MARGIN; + timeNextEdge = spdifRxTime + LOCAL_CLOCK_INCREMENT + LOCAL_CLOCK_MARGIN; /* Toggle edge */ i_pll_ref.toggle_timed(1); diff --git a/lib_xua/src/core/main.xc b/lib_xua/src/core/main.xc index 1e2a5145..63f3d1be 100755 --- a/lib_xua/src/core/main.xc +++ b/lib_xua/src/core/main.xc @@ -30,8 +30,8 @@ #include "iap.h" #endif -#if (XUA_SPDIF_RX_EN) -#include "spdif.h" +#if (XUA_SPDIF_RX_EN || XUA_SPDIF_TX_EN) +#include "spdif.h" /* From lib_spdif */ #endif #if (XUA_ADAT_RX_EN) @@ -42,10 +42,6 @@ #include "xua_pdm_mic.h" #endif -#if (XUA_SPDIF_TX_EN) -#include "spdif.h" /* From lib_spdif */ -#endif - #if (XUA_DFU_EN == 1) [[distributable]] void DFUHandler(server interface i_dfu i, chanend ?c_user_cmd); @@ -142,7 +138,11 @@ on stdcore[XUD_TILE] : buffered in port:32 p_adat_rx = PORT_ADAT_IN; #endif #if (XUA_SPDIF_RX_EN) +#if (LEGACY_SPDIF_RECEIVER) on tile[XUD_TILE] : in port p_spdif_rx = PORT_SPDIF_IN; +#else +on tile[XUD_TILE] : buffered in port:32 p_spdif_rx = PORT_SPDIF_IN; +#endif #endif #if (XUA_SPDIF_RX_EN) || (XUA_ADAT_RX_EN) || (XUA_SYNCMODE == XUA_SYNCMODE_SYNC) @@ -643,7 +643,7 @@ int main() on tile[XUD_TILE]: { thread_speed(); - spdif_rx(c_spdif_rx,p_spdif_rx,clk_spd_rx,192000); + spdif_rx(c_spdif_rx, p_spdif_rx, clk_spd_rx, 192000); } #endif From 74894341d1e8b57a3151444df5b989ee2677fdba Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 28 Sep 2023 13:10:05 +0100 Subject: [PATCH 2/8] Updated S/PDIF rx port definition --- lib_xua/src/core/main.xc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib_xua/src/core/main.xc b/lib_xua/src/core/main.xc index 63f3d1be..1bdee960 100755 --- a/lib_xua/src/core/main.xc +++ b/lib_xua/src/core/main.xc @@ -138,11 +138,7 @@ on stdcore[XUD_TILE] : buffered in port:32 p_adat_rx = PORT_ADAT_IN; #endif #if (XUA_SPDIF_RX_EN) -#if (LEGACY_SPDIF_RECEIVER) on tile[XUD_TILE] : in port p_spdif_rx = PORT_SPDIF_IN; -#else -on tile[XUD_TILE] : buffered in port:32 p_spdif_rx = PORT_SPDIF_IN; -#endif #endif #if (XUA_SPDIF_RX_EN) || (XUA_ADAT_RX_EN) || (XUA_SYNCMODE == XUA_SYNCMODE_SYNC) From f1d902306f87cf369b13175c1a9e1d1f9a501479 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 28 Sep 2023 13:33:12 +0100 Subject: [PATCH 3/8] Fixed issue with checking S/PDIF rx parity --- lib_xua/src/core/clocking/clockgen.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index 60e20d7f..c6d3e7e7 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -516,7 +516,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa t_local :> spdifRxTime; /* Check parity and ignore if bad */ - if(spdif_check_parity(tmp)) + if(spdif_check_parity(spdifRxData)) continue; /* Get preamble */ From 764fe0bfe98b97540f0c15064ea2bf84e2ea0d64 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 28 Sep 2023 15:29:28 +0100 Subject: [PATCH 4/8] Fixed some whitespace issues --- lib_xua/src/core/clocking/clockgen.xc | 34 ++++++++++----------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index c6d3e7e7..a9627072 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -1,6 +1,5 @@ // Copyright 2011-2023 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. - #include #include #include @@ -141,9 +140,6 @@ static inline void setClockValidity(chanend c_interruptControl, int clkIndex, in } } - - - /* Returns 1 for valid clock found else 0 */ static inline int validSamples(Counter &counter, int clockIndex) { @@ -250,10 +246,10 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa #if (XUA_SPDIF_RX_EN) /* S/PDIF buffer state */ - int spdifSamples[MAX_SPDIF_SAMPLES]; /* S/PDIF sample buffer */ - int spdifWr = 0; /* Write index */ - int spdifRd = 0; /* Read index */ //(spdifWriteIndex ^ (MAX_SPDIF_SAMPLES >> 1)) & ~1; // Start in middle - int spdifOverflow = 0; /* Overflow/undeflow flags */ + int spdifSamples[MAX_SPDIF_SAMPLES]; /* S/PDIF sample buffer */ + int spdifWr = 0; /* Write index */ + int spdifRd = 0; /* Read index */ //(spdifWriteIndex ^ (MAX_SPDIF_SAMPLES >> 1)) & ~1; // Start in middle + int spdifOverflow = 0; /* Overflow/undeflow flags */ int spdifUnderflow = 1; int spdifSamps = 0; /* Number of samples in buffer */ Counter spdifCounters; @@ -378,8 +374,8 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa break; #endif - /* Updates to clock settings from endpoint 0 */ - case inuint_byref(c_clk_ctl, tmp): + /* Updates to clock settings from endpoint 0 */ + case inuint_byref(c_clk_ctl, tmp): switch(tmp) { case GET_SEL: @@ -453,7 +449,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa break; } - break; + break; /* Generate local clock from timer */ case t_local when timerafter(timeNextEdge) :> void: @@ -513,14 +509,14 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa case c_spdif_rx :> spdifRxData: /* Record time of sample */ - t_local :> spdifRxTime; + t_local :> spdifRxTime; /* Check parity and ignore if bad */ if(spdif_check_parity(spdifRxData)) continue; /* Get preamble */ - unsigned preamble = spdifRxData & SPDIF_RX_PREAMBLE_MASK; + unsigned preamble = spdifRxData & SPDIF_RX_PREAMBLE_MASK; switch(preamble) { /* LEFT */ @@ -692,7 +688,6 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa /* Reset counters */ adatCounters.receivedSamples = 0; - } } } @@ -703,10 +698,9 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa break; #endif - #if (XUA_SPDIF_RX_EN || XUA_ADAT_RX_EN) - /* AudioHub requests data */ - case inuint_byref(c_dig_rx, tmp): + /* AudioHub requests data */ + case inuint_byref(c_dig_rx, tmp): #if (XUA_SPDIF_RX_EN) if(spdifUnderflow) { @@ -721,7 +715,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa tmp2 = spdifSamples[spdifRd + 1]; spdifRd += 2; - spdifRd &= (MAX_SPDIF_SAMPLES - 1); + spdifRd &= (MAX_SPDIF_SAMPLES - 1); g_digData[0] = tmp; g_digData[1] = tmp2; @@ -826,11 +820,9 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa } #endif outuint(c_dig_rx, 1); - break; + break; #endif } - } } - From bd702db2c63bcba4a7801ab51e7c79dd36821e45 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 28 Sep 2023 17:21:29 +0100 Subject: [PATCH 5/8] Updates for new S/PDIF receiver (#348) * Updates for new S/PDIF receiver * Fixed some whitespace issues --- lib_xua/src/core/clocking/clockgen.xc | 71 ++++++++++----------------- lib_xua/src/core/main.xc | 10 ++-- 2 files changed, 28 insertions(+), 53 deletions(-) diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index ec5f1c77..a9627072 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -1,6 +1,5 @@ // Copyright 2011-2023 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. - #include #include #include @@ -141,9 +140,6 @@ static inline void setClockValidity(chanend c_interruptControl, int clkIndex, in } } - - - /* Returns 1 for valid clock found else 0 */ static inline int validSamples(Counter &counter, int clockIndex) { @@ -219,18 +215,6 @@ static inline int validSamples(Counter &counter, int clockIndex) } #endif -#if (XUA_SPDIF_RX_EN) -//:badParity -/* Returns 1 for bad parity, else 0 */ -static inline int badParity(unsigned x) -{ - unsigned X = (x>>4); - crc32(X, 0, 1); - return X & 1; -} -//: -#endif - #ifdef LEVEL_METER_LEDS void VendorLedRefresh(unsigned levelData[]); unsigned g_inputLevelData[NUM_USB_CHAN_IN]; @@ -262,16 +246,17 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa #if (XUA_SPDIF_RX_EN) /* S/PDIF buffer state */ - int spdifSamples[MAX_SPDIF_SAMPLES]; /* S/PDIF sample buffer */ - int spdifWr = 0; /* Write index */ - int spdifRd = 0; /* Read index */ //(spdifWriteIndex ^ (MAX_SPDIF_SAMPLES >> 1)) & ~1; // Start in middle - int spdifOverflow = 0; /* Overflow/undeflow flags */ + int spdifSamples[MAX_SPDIF_SAMPLES]; /* S/PDIF sample buffer */ + int spdifWr = 0; /* Write index */ + int spdifRd = 0; /* Read index */ //(spdifWriteIndex ^ (MAX_SPDIF_SAMPLES >> 1)) & ~1; // Start in middle + int spdifOverflow = 0; /* Overflow/undeflow flags */ int spdifUnderflow = 1; int spdifSamps = 0; /* Number of samples in buffer */ Counter spdifCounters; - int spdifReceivedTime; + int spdifRxTime; unsigned tmp2; unsigned spdifLeft = 0; + unsigned spdifRxData; #endif #if (XUA_ADAT_RX_EN) @@ -330,7 +315,6 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa adatCounters.samplesPerTick = 0; #endif - t_local :> timeNextEdge; timeLastEdge = timeNextEdge; timeNextClockDetection = timeNextEdge + (LOCAL_CLOCK_INCREMENT / 2); @@ -390,8 +374,8 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa break; #endif - /* Updates to clock settings from endpoint 0 */ - case inuint_byref(c_clk_ctl, tmp): + /* Updates to clock settings from endpoint 0 */ + case inuint_byref(c_clk_ctl, tmp): switch(tmp) { case GET_SEL: @@ -465,7 +449,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa break; } - break; + break; /* Generate local clock from timer */ case t_local when timerafter(timeNextEdge) :> void: @@ -521,25 +505,24 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa #endif #if (XUA_SPDIF_RX_EN) - /* Receive sample from S/PDIF RX thread (steaming chan) */ - case c_spdif_rx :> tmp: + /* Receive sample from S/PDIF RX thread (streaming chan) */ + case c_spdif_rx :> spdifRxData: /* Record time of sample */ - t_local :> spdifReceivedTime; + t_local :> spdifRxTime; /* Check parity and ignore if bad */ - if(badParity(tmp)) + if(spdif_check_parity(spdifRxData)) continue; - /* Get pre-amble */ - tmp2 = tmp & 0xF; - switch(tmp2) + /* Get preamble */ + unsigned preamble = spdifRxData & SPDIF_RX_PREAMBLE_MASK; + switch(preamble) { /* LEFT */ case SPDIF_FRAME_X: case SPDIF_FRAME_Z: - - spdifLeft = tmp << 4; + spdifLeft = SPDIF_RX_EXTRACT_SAMPLE(spdifRxData); break; /* RIGHT */ @@ -550,7 +533,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa { /* Store left and right sample pair to buffer */ spdifSamples[spdifWr] = spdifLeft; - spdifSamples[spdifWr+1] = tmp << 4; + spdifSamples[spdifWr+1] = SPDIF_RX_EXTRACT_SAMPLE(spdifRxData); spdifWr = (spdifWr + 2) & (MAX_SPDIF_SAMPLES - 1); @@ -586,13 +569,13 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa if((spdifCounters.receivedSamples >= spdifCounters.samplesPerTick)) { /* Check edge is about right... S/PDIF may have changed freq... */ - if(timeafter(spdifReceivedTime, (timeLastEdge + LOCAL_CLOCK_INCREMENT - LOCAL_CLOCK_MARGIN))) + if(timeafter(spdifRxTime, (timeLastEdge + LOCAL_CLOCK_INCREMENT - LOCAL_CLOCK_MARGIN))) { /* Record edge time */ - timeLastEdge = spdifReceivedTime; + timeLastEdge = spdifRxTime; /* Setup for next edge */ - timeNextEdge = spdifReceivedTime + LOCAL_CLOCK_INCREMENT + LOCAL_CLOCK_MARGIN; + timeNextEdge = spdifRxTime + LOCAL_CLOCK_INCREMENT + LOCAL_CLOCK_MARGIN; /* Toggle edge */ i_pll_ref.toggle_timed(1); @@ -705,7 +688,6 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa /* Reset counters */ adatCounters.receivedSamples = 0; - } } } @@ -716,10 +698,9 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa break; #endif - #if (XUA_SPDIF_RX_EN || XUA_ADAT_RX_EN) - /* AudioHub requests data */ - case inuint_byref(c_dig_rx, tmp): + /* AudioHub requests data */ + case inuint_byref(c_dig_rx, tmp): #if (XUA_SPDIF_RX_EN) if(spdifUnderflow) { @@ -734,7 +715,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa tmp2 = spdifSamples[spdifRd + 1]; spdifRd += 2; - spdifRd &= (MAX_SPDIF_SAMPLES - 1); + spdifRd &= (MAX_SPDIF_SAMPLES - 1); g_digData[0] = tmp; g_digData[1] = tmp2; @@ -839,11 +820,9 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa } #endif outuint(c_dig_rx, 1); - break; + break; #endif } - } } - diff --git a/lib_xua/src/core/main.xc b/lib_xua/src/core/main.xc index 1e2a5145..1bdee960 100755 --- a/lib_xua/src/core/main.xc +++ b/lib_xua/src/core/main.xc @@ -30,8 +30,8 @@ #include "iap.h" #endif -#if (XUA_SPDIF_RX_EN) -#include "spdif.h" +#if (XUA_SPDIF_RX_EN || XUA_SPDIF_TX_EN) +#include "spdif.h" /* From lib_spdif */ #endif #if (XUA_ADAT_RX_EN) @@ -42,10 +42,6 @@ #include "xua_pdm_mic.h" #endif -#if (XUA_SPDIF_TX_EN) -#include "spdif.h" /* From lib_spdif */ -#endif - #if (XUA_DFU_EN == 1) [[distributable]] void DFUHandler(server interface i_dfu i, chanend ?c_user_cmd); @@ -643,7 +639,7 @@ int main() on tile[XUD_TILE]: { thread_speed(); - spdif_rx(c_spdif_rx,p_spdif_rx,clk_spd_rx,192000); + spdif_rx(c_spdif_rx, p_spdif_rx, clk_spd_rx, 192000); } #endif From 5b37c4d224ee1b91e1b342249f49ba4740fb807c Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 25 Oct 2023 13:22:46 +0100 Subject: [PATCH 6/8] Updates for spdif rx api change --- lib_xua/src/core/clocking/clockgen.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index a9627072..205641bf 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -512,7 +512,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa t_local :> spdifRxTime; /* Check parity and ignore if bad */ - if(spdif_check_parity(spdifRxData)) + if(spdif_rx_check_parity(spdifRxData)) continue; /* Get preamble */ From 32c783795bb2bfff04f39fb0551764118b6e52cd Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 25 Oct 2023 13:26:05 +0100 Subject: [PATCH 7/8] merge --- lib_xua/src/core/clocking/clockgen.xc | 1 + lib_xua/src/core/main.xc | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index a9627072..e213fe88 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -517,6 +517,7 @@ void clockGen (streaming chanend ?c_spdif_rx, chanend ?c_adat_rx, client interfa /* Get preamble */ unsigned preamble = spdifRxData & SPDIF_RX_PREAMBLE_MASK; + switch(preamble) { /* LEFT */ diff --git a/lib_xua/src/core/main.xc b/lib_xua/src/core/main.xc index 1bdee960..63f3d1be 100755 --- a/lib_xua/src/core/main.xc +++ b/lib_xua/src/core/main.xc @@ -138,7 +138,11 @@ on stdcore[XUD_TILE] : buffered in port:32 p_adat_rx = PORT_ADAT_IN; #endif #if (XUA_SPDIF_RX_EN) +#if (LEGACY_SPDIF_RECEIVER) on tile[XUD_TILE] : in port p_spdif_rx = PORT_SPDIF_IN; +#else +on tile[XUD_TILE] : buffered in port:32 p_spdif_rx = PORT_SPDIF_IN; +#endif #endif #if (XUA_SPDIF_RX_EN) || (XUA_ADAT_RX_EN) || (XUA_SYNCMODE == XUA_SYNCMODE_SYNC) From eebbb88feee70fecedd3e3edbec57bb85e566fb2 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 25 Oct 2023 13:29:07 +0100 Subject: [PATCH 8/8] Fixed spdif rx port declaration --- lib_xua/src/core/main.xc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib_xua/src/core/main.xc b/lib_xua/src/core/main.xc index 63f3d1be..1bdee960 100755 --- a/lib_xua/src/core/main.xc +++ b/lib_xua/src/core/main.xc @@ -138,11 +138,7 @@ on stdcore[XUD_TILE] : buffered in port:32 p_adat_rx = PORT_ADAT_IN; #endif #if (XUA_SPDIF_RX_EN) -#if (LEGACY_SPDIF_RECEIVER) on tile[XUD_TILE] : in port p_spdif_rx = PORT_SPDIF_IN; -#else -on tile[XUD_TILE] : buffered in port:32 p_spdif_rx = PORT_SPDIF_IN; -#endif #endif #if (XUA_SPDIF_RX_EN) || (XUA_ADAT_RX_EN) || (XUA_SYNCMODE == XUA_SYNCMODE_SYNC)