Skip to content

Commit 2f35a96

Browse files
committed
ESP32 I2S auto_clear
1 parent 2a4f4b1 commit 2f35a96

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/AudioI2S/I2SConfigESP32V1.h

+2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class I2SConfigESP32V1 : public AudioInfo {
6565
/// not used any more
6666
int buffer_size = I2S_BUFFER_SIZE;
6767
bool use_apll = I2S_USE_APLL;
68+
bool auto_clear = I2S_AUTO_CLEAR;
6869
/// Select left or right channel when channels == 1
6970
I2SChannelSelect channel_format = I2SChannelSelect::Default;
7071
/// masterclock multiple (-1 = use default)
@@ -81,6 +82,7 @@ class I2SConfigESP32V1 : public AudioInfo {
8182
LOGI("signal_type: %s", i2s_signal_types[signal_type]);
8283
LOGI("buffer_count:%d", buffer_count);
8384
LOGI("buffer_size:%d", buffer_size);
85+
LOGI("auto_clear: %s",auto_clear? "true" : "false");
8486
if (signal_type==Digital){
8587
LOGI("i2s_format: %s", i2s_formats[i2s_format]);
8688
}

src/AudioI2S/I2SESP32V1.h

+1
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ class I2SDriverESP32V1 {
203203
int frame_size = cfg.bits_per_sample * cfg.channels / 8;
204204
if (size > 0) result.dma_frame_num = size / frame_size;
205205
LOGI("dma_frame_num: %d", result.dma_frame_num);
206+
result.auto_clear = cfg.auto_clear;
206207
return result;
207208
}
208209

0 commit comments

Comments
 (0)