From 837b648bbcdc4400c3045ae110715c6dcfe3d234 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 9 Mar 2023 15:22:58 +0000 Subject: [PATCH 1/3] Reinstate check for current samplerate before changing --- lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc index 3027b5b7..afcf378e 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc +++ b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc @@ -342,7 +342,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c int newSampleRate = buffer[0]; /* Instruct audio thread to change sample freq (if change required) */ - //if(newSampleRate != g_curSamFreq) + if(newSampleRate != g_curSamFreq) { int newMasterClock; From cf1940245f9b8899e6a4ae31a88c0945d0dfa008 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 9 Mar 2023 15:24:21 +0000 Subject: [PATCH 2/3] Return value of XUD_DoSetRequestStatus in Samp freq change --- lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc index afcf378e..24f3502c 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc +++ b/lib_xua/src/core/endpoint0/xua_ep0_uacreqs.xc @@ -395,7 +395,7 @@ int AudioClassRequests_2(XUD_ep ep0_out, XUD_ep ep0_in, USB_SetupPacket_t &sp, c } #endif /* MAX_FREQ != MIN_FREQ */ /* Send 0 Length as status stage */ - int x = XUD_DoSetRequestStatus(ep0_in); + return XUD_DoSetRequestStatus(ep0_in); } /* Direction: Device-to-host: Send Current Sample Freq */ else From 9c20fab21631263e1f673f53709f6990f81c2cd9 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 9 Mar 2023 15:32:15 +0000 Subject: [PATCH 3/3] Updated copyright comment --- lib_xua/api/xua.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/api/xua.h b/lib_xua/api/xua.h index 1215e926..b3136b84 100644 --- a/lib_xua/api/xua.h +++ b/lib_xua/api/xua.h @@ -1,4 +1,4 @@ -// Copyright 2017-2022 XMOS LIMITED. +// Copyright 2017-2023 XMOS LIMITED. // This Software is subject to the terms of the XMOS Public Licence: Version 1. #ifndef _XUA_H_ #define _XUA_H_