@@ -84,12 +84,17 @@ DMAChannel AudioInputPDM::dma(false); | |||
#define MCLK_MULT 1 | |||
#define MCLK_DIV 17 | |||
#elif F_CPU == 216000000 | |||
#define MCLK_MULT 8 | |||
#define MCLK_DIV 153 | |||
#define MCLK_SRC 0 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 240000000 | |||
#define MCLK_MULT 4 | |||
#define MCLK_MULT 2 | |||
#define MCLK_DIV 85 | |||
#define MCLK_SRC 0 | |||
#elif F_CPU == 256000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 16000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
@@ -1714,4 +1719,4 @@ for ($n=0; $n < 512; $n += 8) { | |||
print "\n};\n"; | |||
print "// max=$max, min=$min\n"; | |||
*/ | |||
#endif | |||
#endif |
@@ -700,6 +700,9 @@ void AudioOutputADAT::setI2SFreq(int freq) { | |||
const tmclk clkArr[numfreqs] = {{32, 3375}, {49, 3750}, {64, 3375}, {49, 1875}, {128, 3375}, {98, 1875}, {8, 153}, {64, 1125}, {196, 1875}, {16, 153}, {128, 1125}, {226, 1081}, {32, 153}, {147, 646} }; | |||
#elif (F_PLL==240000000) | |||
const tmclk clkArr[numfreqs] = {{16, 1875}, {29, 2466}, {32, 1875}, {89, 3784}, {64, 1875}, {147, 3125}, {4, 85}, {32, 625}, {205, 2179}, {8, 85}, {64, 625}, {89, 473}, {16, 85}, {128, 625} }; | |||
#elif (F_PLL==256000000) | |||
// TODO: fix these... | |||
const tmclk clkArr[numfreqs] = {{16, 1875}, {29, 2466}, {32, 1875}, {89, 3784}, {64, 1875}, {147, 3125}, {4, 85}, {32, 625}, {205, 2179}, {8, 85}, {64, 625}, {89, 473}, {16, 85}, {128, 625} }; | |||
#endif | |||
for (int f = 0; f < numfreqs; f++) { |
@@ -302,12 +302,17 @@ void AudioOutputI2S::update(void) | |||
#define MCLK_MULT 1 | |||
#define MCLK_DIV 17 | |||
#elif F_CPU == 216000000 | |||
#define MCLK_MULT 8 | |||
#define MCLK_DIV 153 | |||
#define MCLK_SRC 0 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 240000000 | |||
#define MCLK_MULT 4 | |||
#define MCLK_MULT 2 | |||
#define MCLK_DIV 85 | |||
#define MCLK_SRC 0 | |||
#elif F_CPU == 256000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 16000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 |
@@ -272,12 +272,17 @@ void AudioOutputI2SQuad::update(void) | |||
#define MCLK_MULT 1 | |||
#define MCLK_DIV 17 | |||
#elif F_CPU == 216000000 | |||
#define MCLK_MULT 8 | |||
#define MCLK_DIV 153 | |||
#define MCLK_SRC 0 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 240000000 | |||
#define MCLK_MULT 4 | |||
#define MCLK_MULT 2 | |||
#define MCLK_DIV 85 | |||
#define MCLK_SRC 0 | |||
#elif F_CPU == 256000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 16000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 |
@@ -434,12 +434,17 @@ void AudioOutputPT8211::update(void) | |||
#define MCLK_MULT 1 | |||
#define MCLK_DIV 17 | |||
#elif F_CPU == 216000000 | |||
#define MCLK_MULT 8 | |||
#define MCLK_DIV 153 | |||
#define MCLK_SRC 0 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 240000000 | |||
#define MCLK_MULT 4 | |||
#define MCLK_MULT 2 | |||
#define MCLK_DIV 85 | |||
#define MCLK_SRC 0 | |||
#elif F_CPU == 256000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 16000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 |
@@ -327,12 +327,17 @@ void AudioOutputSPDIF::update(void) | |||
#define MCLK_MULT 1 | |||
#define MCLK_DIV 17 | |||
#elif F_CPU == 216000000 | |||
#define MCLK_MULT 8 | |||
#define MCLK_DIV 153 | |||
#define MCLK_SRC 0 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 240000000 | |||
#define MCLK_MULT 4 | |||
#define MCLK_MULT 2 | |||
#define MCLK_DIV 85 | |||
#define MCLK_SRC 0 | |||
#elif F_CPU == 256000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 16000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 |
@@ -209,12 +209,17 @@ void AudioOutputTDM::update(void) | |||
#define MCLK_MULT 2 | |||
#define MCLK_DIV 17 | |||
#elif F_CPU == 216000000 | |||
#define MCLK_MULT 16 | |||
#define MCLK_DIV 153 | |||
#define MCLK_SRC 0 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#elif F_CPU == 240000000 | |||
#define MCLK_MULT 8 | |||
#define MCLK_MULT 2 | |||
#define MCLK_DIV 85 | |||
#define MCLK_SRC 0 | |||
#elif F_CPU == 256000000 | |||
#define MCLK_MULT 12 | |||
#define MCLK_DIV 17 | |||
#define MCLK_SRC 1 | |||
#else | |||
#error "This CPU Clock Speed is not supported by the Audio library"; | |||
#endif |