2 #include "AudioConfig.h"
3 #include "AudioTools/CoreAudio/AudioTypes.h"
6 # define PIN_I2S_MCK -1
9 #if defined(ESP32) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0 , 0)
10 # include "driver/i2s.h"
43 pin_data = PIN_I2S_DATA_IN;
47 pin_data = PIN_I2S_DATA_OUT;
48 auto_clear = I2S_AUTO_CLEAR;
51 auto_clear = I2S_AUTO_CLEAR;
52 pin_data = PIN_I2S_DATA_OUT;
53 pin_data_rx = PIN_I2S_DATA_IN;
62 bool is_master =
true;
64 int pin_ws = PIN_I2S_WS;
65 int pin_bck = PIN_I2S_BCK;
68 int pin_mck = PIN_I2S_MCK;
69 int buffer_count = I2S_BUFFER_COUNT;
70 int buffer_size = I2S_BUFFER_SIZE;
71 bool auto_clear = I2S_AUTO_CLEAR;
72 bool use_apll = I2S_USE_APLL;
73 uint32_t fixed_mclk = 0;
74 #if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0 , 0)
75 int channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT;
78 void logInfo(
const char* source=
"") {
79 AudioInfo::logInfo(source);
81 LOGI(
"port_no: %d", port_no);
82 LOGI(
"is_master: %s", is_master ?
"Master":
"Slave");
85 LOGI(
"number of channels: %d",
channels);
86 LOGI(
"signal_type: %s", i2s_signal_types[signal_type]);
87 if (signal_type==Digital){
88 LOGI(
"i2s_format: %s", i2s_formats[i2s_format]);
90 LOGI(
"auto_clear: %s",auto_clear?
"true" :
"false");
92 LOGI(
"use_apll: %s", use_apll ?
"true" :
"false");
95 LOGI(
"fixed_mclk: %d", (
int) fixed_mclk);
97 LOGI(
"buffer_count:%d",buffer_count);
98 LOGI(
"buffer_size:%d",buffer_size);
101 LOGI(
"pin_mck: %d", pin_mck);
103 LOGI(
"pin_bck: %d", pin_bck);
105 LOGI(
"pin_ws: %d", pin_ws);
107 LOGI(
"pin_data: %d", pin_data);
108 if (pin_data_rx!=-1 &&
rx_tx_mode==RXTX_MODE){
109 LOGI(
"pin_data_rx: %d", pin_data_rx);
115 using I2SConfig = I2SConfigESP32;
RxTxMode
The Microcontroller is the Audio Source (TX_MODE) or Audio Sink (RX_MODE). RXTX_MODE is Source and Si...
Definition: AudioTypes.h:28