Fixed build issue when CODEC_MASTER defined (BUG #15162)

This commit is contained in:
Ross Owen
2014-01-16 17:31:28 +00:00
parent 7c5811e36a
commit 1022f7d5c6

View File

@@ -79,6 +79,8 @@ extern void device_reboot(void);
#define MAX_DIVIDE (MAX_DIVIDE_48) #define MAX_DIVIDE (MAX_DIVIDE_48)
#endif #endif
#ifndef CODEC_MASTER
#error
static inline void doI2SClocks(unsigned divide) static inline void doI2SClocks(unsigned divide)
{ {
switch (divide) switch (divide)
@@ -139,6 +141,7 @@ static inline void doI2SClocks(unsigned divide)
#endif #endif
} }
} }
#endif
/* I2S delivery thread */ /* I2S delivery thread */
#pragma unsafe arrays #pragma unsafe arrays
@@ -193,7 +196,7 @@ static inline void doI2SClocks(unsigned divide)
if(testct(c_out)) if(testct(c_out))
{ {
unsigned command = inct(c_out); unsigned command = inct(c_out);
#ifndef CODEC_MASTER
// Set clocks low // Set clocks low
p_lrclk <: 0; p_lrclk <: 0;
p_bclk <: 0; p_bclk <: 0;
@@ -201,6 +204,7 @@ static inline void doI2SClocks(unsigned divide)
/* DSD Clock might not be shared with lrclk or bclk... */ /* DSD Clock might not be shared with lrclk or bclk... */
p_dsd_clk <: 0; p_dsd_clk <: 0;
#endif #endif
#endif
#if (DSD_CHANS_DAC > 0) #if (DSD_CHANS_DAC > 0)
if(dsdMode == DSD_MODE_DOP) if(dsdMode == DSD_MODE_DOP)
dsdMode = DSD_MODE_OFF; dsdMode = DSD_MODE_OFF;
@@ -384,13 +388,14 @@ static inline void doI2SClocks(unsigned divide)
if(testct(c_out)) if(testct(c_out))
{ {
unsigned command; unsigned command;
#ifndef CODEC_MASTER
// Set clocks low // Set clocks low
p_lrclk <: 0; p_lrclk <: 0;
p_bclk <: 0; p_bclk <: 0;
#if(DSD_CHANS_DAC != 0) #if(DSD_CHANS_DAC != 0)
/* DSD Clock might not be shared with lrclk or bclk... */ /* DSD Clock might not be shared with lrclk or bclk... */
p_dsd_clk <: 0; p_dsd_clk <: 0;
#endif
#endif #endif
command = inct(c_out); command = inct(c_out);