2#include "AudioToolsConfig.h"
3#include "AudioTools/CoreAudio/AudioTypes.h"
10#error "USE_LEGACY_I2S not true"
13#include "driver/i2s.h"
44 pin_data = PIN_I2S_DATA_IN;
48 pin_data = PIN_I2S_DATA_OUT;
49 auto_clear = I2S_AUTO_CLEAR;
52 auto_clear = I2S_AUTO_CLEAR;
53 pin_data = PIN_I2S_DATA_OUT;
54 pin_data_rx = PIN_I2S_DATA_IN;
63 bool is_master =
true;
65 int pin_ws = PIN_I2S_WS;
66 int pin_bck = PIN_I2S_BCK;
69 int pin_mck = PIN_I2S_MCK;
70 int buffer_count = I2S_BUFFER_COUNT;
71 int buffer_size = I2S_BUFFER_SIZE;
72 bool auto_clear = I2S_AUTO_CLEAR;
73 bool use_apll = I2S_USE_APLL;
74 uint32_t fixed_mclk = 0;
75 int channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT;
77 void logInfo(
const char* source=
"") {
78 AudioInfo::logInfo(source);
80 LOGI(
"port_no: %d", port_no);
81 LOGI(
"is_master: %s", is_master ?
"Master":
"Slave");
84 LOGI(
"number of channels: %d",
channels);
85 LOGI(
"signal_type: %s", i2s_signal_types[signal_type]);
86 if (signal_type==Digital){
87 LOGI(
"i2s_format: %s", i2s_formats[i2s_format]);
89 LOGI(
"auto_clear: %s",auto_clear?
"true" :
"false");
91 LOGI(
"use_apll: %s", use_apll ?
"true" :
"false");
94 LOGI(
"fixed_mclk: %d", (
int) fixed_mclk);
96 LOGI(
"buffer_count:%d",buffer_count);
97 LOGI(
"buffer_size:%d",buffer_size);
100 LOGI(
"pin_mck: %d", pin_mck);
102 LOGI(
"pin_bck: %d", pin_bck);
104 LOGI(
"pin_ws: %d", pin_ws);
106 LOGI(
"pin_data: %d", pin_data);
107 if (pin_data_rx!=-1 &&
rx_tx_mode==RXTX_MODE){
108 LOGI(
"pin_data_rx: %d", pin_data_rx);
114using 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:30