From 260740d2108b3b36c6c55b49e2d8f23a06313861 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Mon, 7 Nov 2022 16:26:33 +0100 Subject: [PATCH] small improvement for analog input do not disable ADC initially. --- usermods/audioreactive/audio_source.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/usermods/audioreactive/audio_source.h b/usermods/audioreactive/audio_source.h index 9a05b8f3..9637f879 100644 --- a/usermods/audioreactive/audio_source.h +++ b/usermods/audioreactive/audio_source.h @@ -494,11 +494,12 @@ class I2SAdcSource : public I2SSource { //return; } #else - err = i2s_adc_disable(I2S_NUM_0); - //err = i2s_stop(I2S_NUM_0); - if (err != ESP_OK) { - DEBUGSR_PRINTF("Failed to initially disable i2s adc: %d\n", err); - } + // bugfix: do not disable ADC initially - its already disabled after driver install. + //err = i2s_adc_disable(I2S_NUM_0); + // //err = i2s_stop(I2S_NUM_0); + //if (err != ESP_OK) { + // DEBUGSR_PRINTF("Failed to initially disable i2s adc: %d\n", err); + //} #endif _initialized = true;