From 6eed769d9000c3700e7a8f6fd13a98827c0cb77a Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Wed, 1 Mar 2017 17:07:59 +0000 Subject: [PATCH] Quick fix to borderline I2S timing issue The initial receive on c_pdm_pcm channel ensures the mic array decimator timing requirements are met when running configurations that use the up and down-samplers. However it appears to make the I2S timing very marginal, as subsequent reads from the c_pdm_pcm channel will block for longer. --- module_usb_audio/audio_io/audio_io.xc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module_usb_audio/audio_io/audio_io.xc b/module_usb_audio/audio_io/audio_io.xc index c7fa6997..afbe6818 100755 --- a/module_usb_audio/audio_io/audio_io.xc +++ b/module_usb_audio/audio_io/audio_io.xc @@ -20,6 +20,7 @@ #include "xua_audio.h" #include "audioports.h" #include "audiohw.h" +#include "mic_array_conf.h" #ifdef SPDIF_TX #include "SpdifTransmit.h" #endif @@ -521,7 +522,7 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out, #endif /* (AUD_TO_USB_RATIO > 1) */ -#if (NUM_PDM_MICS > 0) +#if ((DEBUG_MIC_ARRAY == 1) && (NUM_PDM_MICS > 0)) /* Get initial samples from PDM->PCM converter to avoid stalling the decimators */ c_pdm_pcm <: 1; master @@ -532,7 +533,7 @@ unsigned static deliver(chanend c_out, chanend ?c_spd_out, c_pdm_pcm :> samplesIn[readBuffNo][i]; } } -#endif // (NUM_PDM_MICS > 0) +#endif // ((DEBUG_MIC_ARRAY == 1) && (NUM_PDM_MICS > 0)) UserBufferManagementInit(i_audMan);