i2s: add slot sequence table
Closes: https://github.com/espressif/esp-idf/issues/9208 When I2S is configured into different modes, the slot sequence varies. This commit updates slot sequence tables and corresponding descriptions in (both code and programming guide).
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 | ESP32-H2 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- |
|
||||
|
||||
# I2S ES8311 Example
|
||||
|
||||
@@ -34,21 +34,21 @@ For more details, see [ES8311 datasheet](http://www.everest-semi.com/pdf/ES8311%
|
||||
┌─────────────────┐ ┌──────────────────────────┐
|
||||
│ ESP │ │ ES8311 │
|
||||
│ │ │ │
|
||||
│ MCLK-GPIO 0 ├──────────►│PIN2-MCLK │
|
||||
│ I2S_MCK_IO├──────────►│PIN2-MCLK │
|
||||
│ │ │ │ ┌─────────┐
|
||||
│ BCLK-GPIO 4 ├──────────►│PIN6-BCLK PIN12-OUTP├───────────┤ │
|
||||
│ I2S_BCK_IO├──────────►│PIN6-BCLK PIN12-OUTP├───────────┤ │
|
||||
│ │ │ │ │ EARPHONE│
|
||||
│ WS-GPIO 5 ├──────────►│PIN8-LRCK PIN13-OUTN├───────────┤ │
|
||||
│ I2S_WS_IO├──────────►│PIN8-LRCK PIN13-OUTN├───────────┤ │
|
||||
│ │ │ │ └─────────┘
|
||||
│ SDOUT-GPIO 18├──────────►│PIN9-SDIN │
|
||||
│ (GPIO 2)│ │ │
|
||||
│ SDIN-GPIO 19│◄──────────┤PIN7-SDOUT │
|
||||
│ (GPIO 3)│ │ │ ┌─────────┐
|
||||
│ I2S_DO_IO├──────────►│PIN9-SDIN │
|
||||
│ │ │ │
|
||||
│ I2S_DI_IO│◄──────────┤PIN7-SDOUT │
|
||||
│ │ │ │ ┌─────────┐
|
||||
│ │ │ PIN18-MIC1P├───────────┤ │
|
||||
│ SCL-GPIO 16├──────────►│PIN1 -CCLK │ │ MIC │
|
||||
│ (GPIO 6)│ │ PIN17-MIC1N├───────────┤ │
|
||||
│ SDA-GPIO 17│◄─────────►│PIN19-CDATA │ └─────────┘
|
||||
│ (GPIO 7)│ │ │
|
||||
│ I2C_SCL_IO├──────────►│PIN1 -CCLK │ │ MIC │
|
||||
│ │ │ PIN17-MIC1N├───────────┤ │
|
||||
│ I2C_SDA_IO│◄─────────►│PIN19-CDATA │ └─────────┘
|
||||
│ │ │ │
|
||||
│ VCC 3.3├───────────┤VCC │
|
||||
│ │ │ │
|
||||
│ GND├───────────┤GND │
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
#define I2S_DI_IO (GPIO_NUM_19)
|
||||
#endif
|
||||
/* Example configurations */
|
||||
#define EXAMPLE_RECV_BUF_SIZE (2048)
|
||||
#define EXAMPLE_RECV_BUF_SIZE (2400)
|
||||
#define EXAMPLE_SAMPLE_RATE (16000)
|
||||
#define EXAMPLE_MCLK_MULTIPLE (256)
|
||||
#define EXAMPLE_MCLK_MULTIPLE (384) // If not using 24-bit data width, 256 should be enough
|
||||
#define EXAMPLE_MCLK_FREQ_HZ (EXAMPLE_SAMPLE_RATE * EXAMPLE_MCLK_MULTIPLE)
|
||||
#define EXAMPLE_VOICE_VOLUME CONFIG_EXAMPLE_VOICE_VOLUME
|
||||
#if CONFIG_EXAMPLE_MODE_ECHO
|
||||
@@ -114,6 +114,7 @@ static esp_err_t i2s_driver_init(void)
|
||||
},
|
||||
},
|
||||
};
|
||||
std_cfg.clk_cfg.mclk_multiple = EXAMPLE_MCLK_MULTIPLE;
|
||||
|
||||
ESP_ERROR_CHECK(i2s_channel_init_std_mode(tx_handle, &std_cfg));
|
||||
ESP_ERROR_CHECK(i2s_channel_init_std_mode(rx_handle, &std_cfg));
|
||||
|
||||
@@ -3,7 +3,7 @@ dependencies:
|
||||
espressif/es8311: "==1.0.0"
|
||||
## Required IDF version
|
||||
idf:
|
||||
version: ">=4.1.0"
|
||||
version: "^5.0"
|
||||
# # Put list of dependencies here
|
||||
# # For components maintained by Espressif:
|
||||
# component: "~1.0.0"
|
||||
|
||||
Reference in New Issue
Block a user