From f69f25bc48355fe35e8c9168a89f531052c37d43 Mon Sep 17 00:00:00 2001 From: Mike Bruno Date: Wed, 10 Jan 2018 15:46:10 -0500 Subject: [PATCH] Allow lib_xua to drive its DACs even when there are no output USB channels This makes more sense since the number of DAC output channels is independent of the number of USB output channels --- lib_xua/src/core/audiohub/xua_audiohub.xc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_xua/src/core/audiohub/xua_audiohub.xc b/lib_xua/src/core/audiohub/xua_audiohub.xc index e18d3c02..9fde1664 100755 --- a/lib_xua/src/core/audiohub/xua_audiohub.xc +++ b/lib_xua/src/core/audiohub/xua_audiohub.xc @@ -761,7 +761,7 @@ unsigned static deliver(chanend ?c_out, chanend ?c_spd_out #pragma xta endpoint "i2s_output_l" -#if (I2S_CHANS_DAC != 0) && (NUM_USB_CHAN_OUT != 0) +#if (I2S_CHANS_DAC != 0) index = 0; #pragma loop unroll /* Output "even" channel to DAC (i.e. left) */ @@ -782,7 +782,7 @@ unsigned static deliver(chanend ?c_out, chanend ?c_spd_out #endif /* (AUD_TO_USB_RATIO > 1) */ p_i2s_dac[index++] <: bitrev(samplesOut[frameCount +i]); } -#endif // (I2S_CHANS_DAC != 0) && (NUM_USB_CHAN_OUT != 0) +#endif // (I2S_CHANS_DAC != 0) #ifndef CODEC_MASTER /* Clock out the LR Clock, the DAC data and Clock in the next sample into ADC */ @@ -915,7 +915,7 @@ unsigned static deliver(chanend ?c_out, chanend ?c_spd_out index = 0; #pragma xta endpoint "i2s_output_r" -#if (I2S_CHANS_DAC != 0) && (NUM_USB_CHAN_OUT != 0) +#if (I2S_CHANS_DAC != 0) /* Output "odd" channel to DAC (i.e. right) */ #pragma loop unroll for(int i = 1; i < I2S_CHANS_DAC; i+=I2S_CHANS_PER_FRAME) @@ -935,7 +935,7 @@ unsigned static deliver(chanend ?c_out, chanend ?c_spd_out #endif /* (AUD_TO_USB_RATIO > 1) */ p_i2s_dac[index++] <: bitrev(samplesOut[frameCount + i]); } -#endif // (I2S_CHANS_DAC != 0) && (NUM_USB_CHAN_OUT != 0) +#endif // (I2S_CHANS_DAC != 0) #ifndef CODEC_MASTER doI2SClocks(divide);