diff --git a/src/AudioOutputI2S.cpp b/src/AudioOutputI2S.cpp index 1cc0d82b..a77a3bcb 100644 --- a/src/AudioOutputI2S.cpp +++ b/src/AudioOutputI2S.cpp @@ -32,6 +32,13 @@ AudioOutputI2S::AudioOutputI2S(int port, bool builtInDAC) i2sOn = false; #ifdef ESP32 if (!i2sOn) { + // don't use audio pll on buggy rev0 chips + int use_apll = 0; + esp_chip_info_t out_info; + esp_chip_info(&out_info); + if(out_info.revision > 0) { + use_apll = 1; + } i2s_config_t i2s_config_dac = { .mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_TX | (builtInDAC ? I2S_MODE_DAC_BUILT_IN : 0)), .sample_rate = 44100, @@ -41,7 +48,7 @@ AudioOutputI2S::AudioOutputI2S(int port, bool builtInDAC) .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1, // high interrupt priority .dma_buf_count = 8, .dma_buf_len = 64, //Interrupt level 1 - .use_apll = 1 // Use audio PLL + .use_apll = use_apll // Use audio PLL }; Serial.printf("+%d %p\n", portNo, &i2s_config_dac); if (i2s_driver_install((i2s_port_t)portNo, &i2s_config_dac, 0, NULL) != ESP_OK) {