From 4b2cd1c5ca95a2c47aafdb5f7dc766cae7a412d9 Mon Sep 17 00:00:00 2001 From: Shuchita Khare Date: Fri, 17 May 2024 16:15:04 +0100 Subject: [PATCH] Add known pattern in underflow buffers --- lib_xua/src/core/buffer/decouple/decouple.xc | 5 +++++ lib_xua/src/core/clocking/clockgen.xc | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib_xua/src/core/buffer/decouple/decouple.xc b/lib_xua/src/core/buffer/decouple/decouple.xc index fe730776..f358d0f3 100644 --- a/lib_xua/src/core/buffer/decouple/decouple.xc +++ b/lib_xua/src/core/buffer/decouple/decouple.xc @@ -772,6 +772,11 @@ void XUA_Buffer_Decouple(chanend c_mix_out aud_to_host_flag = 0; SET_SHARED_GLOBAL(g_aud_to_host_flag, aud_to_host_flag); + for(int i=1; i<(MAX_DEVICE_AUD_PACKET_SIZE_IN >> 2); i++) + { + inZeroBuff[i] = 5678 << 8; + } + /* NOTE: For UAC2 IN EP not marked ready at this point - Initial size of zero buffer not known * since we don't know the USB bus-speed yet. * The host will send a SetAltInterface before streaming which will lead to this core diff --git a/lib_xua/src/core/clocking/clockgen.xc b/lib_xua/src/core/clocking/clockgen.xc index ac172b8f..55c14baf 100644 --- a/lib_xua/src/core/clocking/clockgen.xc +++ b/lib_xua/src/core/clocking/clockgen.xc @@ -833,13 +833,13 @@ void clockGen ( streaming chanend ?c_spdif_rx, if (adatUnderflow) { /* ADAT underflowing, send out zero samples */ - g_digData[2] = 0; - g_digData[3] = 0; - g_digData[4] = 0; - g_digData[5] = 0; - g_digData[6] = 0; - g_digData[7] = 0; - g_digData[8] = 0; + g_digData[2] = 1234 << 8; + g_digData[3] = 1234 << 8; + g_digData[4] = 1234 << 8; + g_digData[5] = 1234 << 8; + g_digData[6] = 1234 << 8; + g_digData[7] = 1234 << 8; + g_digData[8] = 1234 << 8; g_digData[9] = 0; } else