From a942c8af3d1828acfe3005c48152100440abd3cb Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Fri, 10 May 2024 13:57:20 +0100 Subject: [PATCH 1/2] Initialise smux based on DEFAULT_FREQ in clockgen --- lib_xua/src/core/clocking/clockgen.xc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index c75f56e4..ac172b8f 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -235,7 +235,23 @@ void clockGen ( streaming chanend ?c_spdif_rx, unsigned tmp; /* Start in no-SMUX (8-channel) mode */ - int smux = 0; + int smux; + // Initialise smux based based on the DEFAULT_FREQ + if(DEFAULT_FREQ < 88200) + { + /* No SMUX */ + smux = 0; + } + else if(DEFAULT_FREQ < 176400) + { + /* SMUX */ + smux = 1; + } + else + { + /* SMUX II */ + smux = 2; + } #ifdef LEVEL_METER_LEDS timer t_level; From b635b0a64b1444521766f62d85fe5ee2522055ef Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Mon, 13 May 2024 10:45:26 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e14cfd90..2e42ce4a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,7 @@ UNRELEASED * FIXED: Incorrect internal input EP count for input only devices * ADDED: MIDI unit and subsystem tests * FIXED: ADAT Tx called too frequently + * FIXED: Initialise SMUX based on DEFAULT_FREQ in clockgen 4.0.0 -----