|
@@ -48,16 +48,14 @@
|
|
|
|
|
|
/* Bit sequence to send to the clock generator */
|
|
|
|
|
|
-#if SAMPLE_RATE == 8000
|
|
|
+#if SAMPLE_RATE == 8000 || SAMPLE_RATE == 16000
|
|
|
static uint16_t pll_seq = 21518;
|
|
|
-#elif SAMPLE_RATE == 16000
|
|
|
-static uint16_t pll_seq = 17422;
|
|
|
#elif SAMPLE_RATE == 32000
|
|
|
-static uint16_t pll_seq = 25614;
|
|
|
+static uint16_t pll_seq = 17422;
|
|
|
#elif SAMPLE_RATE == 44100
|
|
|
-static uint16_t pll_seq = 41998;
|
|
|
+static uint16_t pll_seq = 33806;
|
|
|
#elif SAMPLE_RATE == 48000
|
|
|
-static uint16_t pll_seq = 9230;
|
|
|
+static uint16_t pll_seq = 1038;
|
|
|
#endif
|
|
|
|
|
|
/* Event group for Wifi events */
|
|
@@ -296,7 +294,11 @@ void app_main(void) {
|
|
|
// Initialize GPIO pins
|
|
|
ESP_ERROR_CHECK(setup_gpio());
|
|
|
// Set PCM1808 configuration
|
|
|
- pcm1808_config(0, 1);
|
|
|
+ if (SAMPLE_RATE == 8000) {
|
|
|
+ pcm1808_config(0, 1);
|
|
|
+ } else {
|
|
|
+ pcm1808_config(1, 1);
|
|
|
+ }
|
|
|
gpio_set(CSEL, 0);
|
|
|
// Power down PLL1708
|
|
|
send_pll_bits(40974);
|