diff --git a/components/driver/include/driver/i2s_std.h b/components/driver/include/driver/i2s_std.h index 95f1162928d2..097aa010dd36 100644 --- a/components/driver/include/driver/i2s_std.h +++ b/components/driver/include/driver/i2s_std.h @@ -7,7 +7,7 @@ /** * This file is specified for I2S standard communication mode * Features: - * - Philip/MSB/PCM are supported in standard mode + * - Philips/MSB/PCM are supported in standard mode * - Fixed to 2 slots */ #pragma once @@ -24,11 +24,11 @@ extern "C" { #if CONFIG_IDF_TARGET_ESP32 /** - * @brief Philip format in 2 slots + * @brief Philips format in 2 slots * @param bits_per_sample i2s data bit width * @param mono_or_stereo I2S_SLOT_MODE_MONO or I2S_SLOT_MODE_STEREO */ -#define I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo) { \ +#define I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo) { \ .data_bit_width = bits_per_sample, \ .slot_bit_width = I2S_SLOT_BIT_WIDTH_AUTO, \ .slot_mode = mono_or_stereo, \ @@ -43,7 +43,7 @@ extern "C" { /** * @brief PCM(short) format in 2 slots - * @note PCM(long) is sample as philip in 2 slots + * @note PCM(long) is same as philips in 2 slots * @param bits_per_sample i2s data bit width * @param mono_or_stereo I2S_SLOT_MODE_MONO or I2S_SLOT_MODE_STEREO */ @@ -80,11 +80,11 @@ extern "C" { #elif CONFIG_IDF_TARGET_ESP32S2 /** - * @brief Philip format in 2 slots + * @brief Philips format in 2 slots * @param bits_per_sample i2s data bit width * @param mono_or_stereo I2S_SLOT_MODE_MONO or I2S_SLOT_MODE_STEREO */ -#define I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo) { \ +#define I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo) { \ .data_bit_width = bits_per_sample, \ .slot_bit_width = I2S_SLOT_BIT_WIDTH_AUTO, \ .slot_mode = mono_or_stereo, \ @@ -98,7 +98,7 @@ extern "C" { /** * @brief PCM(short) format in 2 slots - * @note PCM(long) is sample as philip in 2 slots + * @note PCM(long) is same as philips in 2 slots * @param bits_per_sample i2s data bit width * @param mono_or_stereo I2S_SLOT_MODE_MONO or I2S_SLOT_MODE_STEREO */ @@ -133,11 +133,11 @@ extern "C" { #else /** - * @brief Philip format in 2 slots + * @brief Philips format in 2 slots * @param bits_per_sample i2s data bit width * @param mono_or_stereo I2S_SLOT_MODE_MONO or I2S_SLOT_MODE_STEREO */ -#define I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo) { \ +#define I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo) { \ .data_bit_width = bits_per_sample, \ .slot_bit_width = I2S_SLOT_BIT_WIDTH_AUTO, \ .slot_mode = mono_or_stereo, \ @@ -152,7 +152,7 @@ extern "C" { /** * @brief PCM(short) format in 2 slots - * @note PCM(long) is sample as philip in 2 slots + * @note PCM(long) is same as philips in 2 slots * @param bits_per_sample i2s data bit width * @param mono_or_stereo I2S_SLOT_MODE_MONO or I2S_SLOT_MODE_STEREO */ @@ -188,6 +188,11 @@ extern "C" { } #endif +/** @cond */ +#define I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo) \ + I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo) // Alias +/** @endcond */ + /** * @brief i2s default standard clock configuration * @note Please set the mclk_multiple to I2S_MCLK_MULTIPLE_384 while using 24 bits data width @@ -216,7 +221,7 @@ typedef struct { i2s_std_slot_mask_t slot_mask; /*!< Select the left, right or both slot */ uint32_t ws_width; /*!< WS signal width (i.e. the number of bclk ticks that ws signal is high) */ bool ws_pol; /*!< WS signal polarity, set true to enable high lever first */ - bool bit_shift; /*!< Set to enbale bit shift in Philip mode */ + bool bit_shift; /*!< Set to enable bit shift in Philips mode */ #if SOC_I2S_HW_VERSION_1 // For esp32/esp32-s2 bool msb_right; /*!< Set to place right channel data at the MSB in the FIFO */ #else @@ -261,7 +266,7 @@ typedef struct { */ typedef struct { i2s_std_clk_config_t clk_cfg; /*!< Standard mode clock configuration, can be generated by macro I2S_STD_CLK_DEFAULT_CONFIG */ - i2s_std_slot_config_t slot_cfg; /*!< Standard mode slot configuration, can be generated by macros I2S_STD_[mode]_SLOT_DEFAULT_CONFIG, [mode] can be replaced with PHILIP/MSB/PCM */ + i2s_std_slot_config_t slot_cfg; /*!< Standard mode slot configuration, can be generated by macros I2S_STD_[mode]_SLOT_DEFAULT_CONFIG, [mode] can be replaced with PHILIPS/MSB/PCM */ i2s_std_gpio_config_t gpio_cfg; /*!< Standard mode gpio configuration, specified by user */ } i2s_std_config_t; @@ -273,7 +278,7 @@ typedef struct { * @param[in] handle I2S channel handler * @param[in] std_cfg Configurations for standard mode, including clock, slot and gpio * The clock configuration can be generated by the helper macro `I2S_STD_CLK_DEFAULT_CONFIG` - * The slot configuration can be generated by the helper macro `I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG`, + * The slot configuration can be generated by the helper macro `I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG`, * `I2S_STD_PCM_SLOT_DEFAULT_CONFIG` or `I2S_STD_MSB_SLOT_DEFAULT_CONFIG` * * @return @@ -306,7 +311,7 @@ esp_err_t i2s_channel_reconfig_std_clock(i2s_chan_handle_t handle, const i2s_std * @note The input channel handle has to be initialized to standard mode, i.e., 'i2s_channel_init_std_mode' has been called before reconfigring * * @param[in] handle I2S channel handler - * @param[in] slot_cfg Standard mode slot configuration, can be generated by `I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG`, + * @param[in] slot_cfg Standard mode slot configuration, can be generated by `I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG`, * `I2S_STD_PCM_SLOT_DEFAULT_CONFIG` and `I2S_STD_MSB_SLOT_DEFAULT_CONFIG`. * @return * - ESP_OK Set clock successfully diff --git a/components/driver/include/driver/i2s_tdm.h b/components/driver/include/driver/i2s_tdm.h index 00bc448f5f5e..17e39636c4ea 100644 --- a/components/driver/include/driver/i2s_tdm.h +++ b/components/driver/include/driver/i2s_tdm.h @@ -25,12 +25,12 @@ extern "C" { #define I2S_TDM_AUTO_WS_WIDTH (0) // Auto means ws signal width will be equal to the half width of a frame /** - * @brief Philip format in active slot that enabled by mask + * @brief Philips format in active slot that enabled by mask * @param bits_per_sample i2s data bit width * @param mono_or_stereo I2S_SLOT_MODE_MONO or I2S_SLOT_MODE_STEREO * @param mask active slot mask */ -#define I2S_TDM_PHILIP_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo, mask) { \ +#define I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo, mask) { \ .data_bit_width = (bits_per_sample), \ .slot_bit_width = I2S_SLOT_BIT_WIDTH_AUTO, \ .slot_mode = mono_or_stereo, \ @@ -108,6 +108,12 @@ extern "C" { .total_slot = I2S_TDM_AUTO_SLOT_NUM \ } +/** @cond */ +#define I2S_TDM_PHILIP_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo, mask) \ + I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG(bits_per_sample, mono_or_stereo, mask) // Alias +/** @endcond */ + + /** * @brief i2s default tdm clock configuration * @note Please set the mclk_multiple to I2S_MCLK_MULTIPLE_384 while the data width in slot configuration is set to 24 bits @@ -134,7 +140,7 @@ typedef struct { i2s_tdm_slot_mask_t slot_mask; /*!< Slot mask. Activating slots by setting 1 to corresponding bits. When the activated slots is not consecutive, those data in unactivated slots will be ignored */ uint32_t ws_width; /*!< WS signal width (i.e. the number of bclk ticks that ws signal is high) */ bool ws_pol; /*!< WS signal polarity, set true to enable high lever first */ - bool bit_shift; /*!< Set true to enable bit shift in Philip mode */ + bool bit_shift; /*!< Set true to enable bit shift in Philips mode */ bool left_align; /*!< Set true to enable left alignment */ bool big_endian; /*!< Set true to enable big endian */ @@ -176,7 +182,7 @@ typedef struct { */ typedef struct { i2s_tdm_clk_config_t clk_cfg; /*!< TDM mode clock configuration, can be generated by macro I2S_TDM_CLK_DEFAULT_CONFIG */ - i2s_tdm_slot_config_t slot_cfg; /*!< TDM mode slot configuration, can be generated by macros I2S_TDM_[mode]_SLOT_DEFAULT_CONFIG, [mode] can be replaced with PHILIP/MSB/PCM_SHORT/PCM_LONG */ + i2s_tdm_slot_config_t slot_cfg; /*!< TDM mode slot configuration, can be generated by macros I2S_TDM_[mode]_SLOT_DEFAULT_CONFIG, [mode] can be replaced with PHILIPS/MSB/PCM_SHORT/PCM_LONG */ i2s_tdm_gpio_config_t gpio_cfg; /*!< TDM mode gpio configuration, specified by user */ } i2s_tdm_config_t; @@ -188,7 +194,7 @@ typedef struct { * @param[in] handle I2S channel handler * @param[in] tdm_cfg Configurations for TDM mode, including clock, slot and gpio * The clock configuration can be generated by the helper macro `I2S_TDM_CLK_DEFAULT_CONFIG` - * The slot configuration can be generated by the helper macro `I2S_TDM_PHILIP_SLOT_DEFAULT_CONFIG`, + * The slot configuration can be generated by the helper macro `I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG`, * `I2S_TDM_PCM_SHORT_SLOT_DEFAULT_CONFIG`, `I2S_TDM_PCM_LONG_SLOT_DEFAULT_CONFIG` or `I2S_TDM_MSB_SLOT_DEFAULT_CONFIG` * * @return @@ -221,7 +227,7 @@ esp_err_t i2s_channel_reconfig_tdm_clock(i2s_chan_handle_t handle, const i2s_tdm * @note The input channel handle has to be initialized to TDM mode, i.e., 'i2s_channel_init_tdm_mode' has been called before reconfigring * * @param[in] handle I2S channel handler - * @param[in] slot_cfg Standard mode slot configuration, can be generated by `I2S_TDM_PHILIP_SLOT_DEFAULT_CONFIG`, + * @param[in] slot_cfg Standard mode slot configuration, can be generated by `I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG`, * `I2S_TDM_PCM_SHORT_SLOT_DEFAULT_CONFIG`, `I2S_TDM_PCM_LONG_SLOT_DEFAULT_CONFIG` or `I2S_TDM_MSB_SLOT_DEFAULT_CONFIG`. * @return * - ESP_OK Set clock successfully diff --git a/components/driver/include/driver/i2s_types.h b/components/driver/include/driver/i2s_types.h index 3cd4ffa633c2..5a64eb8812e9 100644 --- a/components/driver/include/driver/i2s_types.h +++ b/components/driver/include/driver/i2s_types.h @@ -30,7 +30,7 @@ typedef enum { * @brief I2S controller communication mode */ typedef enum { - I2S_COMM_MODE_STD, /*!< I2S controller using standard communication mode, support philip/MSB/PCM format */ + I2S_COMM_MODE_STD, /*!< I2S controller using standard communication mode, support philips/MSB/PCM format */ #if SOC_I2S_SUPPORTS_PDM I2S_COMM_MODE_PDM, /*!< I2S controller using PDM communication mode, support PDM output or input */ #endif diff --git a/components/driver/test_apps/i2s_test_apps/i2s/main/test_i2s.c b/components/driver/test_apps/i2s_test_apps/i2s/main/test_i2s.c index 20d753fb6423..5916471f319b 100644 --- a/components/driver/test_apps/i2s_test_apps/i2s/main/test_i2s.c +++ b/components/driver/test_apps/i2s_test_apps/i2s/main/test_i2s.c @@ -168,7 +168,7 @@ TEST_CASE("I2S_basic_channel_allocation_reconfig_deleting_test", "[i2s]") i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER); i2s_std_config_t std_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_MASTER_DEFAULT_PIN, }; @@ -263,7 +263,7 @@ static void i2s_reconfig_task(void *args) { while (task_run_flag) { /* Reconfig the slot while reading / writing */ - i2s_std_slot_config_t slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO); + i2s_std_slot_config_t slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO); TEST_ESP_OK(i2s_channel_disable(tx_handle)); TEST_ESP_OK(i2s_channel_disable(rx_handle)); printf("[%d] Reconfiguring the slot...\n", cnt); @@ -579,7 +579,7 @@ TEST_CASE("I2S_memory_leak_test", "[i2s]") i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER); i2s_std_config_t std_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_MASTER_DEFAULT_PIN, }; @@ -619,7 +619,7 @@ TEST_CASE("I2S_loopback_test", "[i2s]") i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_0, I2S_ROLE_MASTER); i2s_std_config_t std_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_MASTER_DEFAULT_PIN, }; TEST_ESP_OK(i2s_new_channel(&chan_cfg, &tx_handle, &rx_handle)); @@ -649,13 +649,13 @@ TEST_CASE("I2S_master_write_slave_read_test", "[i2s]") i2s_std_config_t std_mst_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_MASTER_DEFAULT_PIN, }; i2s_std_config_t std_slv_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_SLAVE_DEFAULT_PIN, }; @@ -685,13 +685,13 @@ TEST_CASE("I2S_master_read_slave_write_test", "[i2s]") i2s_chan_config_t slv_chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_1, I2S_ROLE_SLAVE); i2s_std_config_t std_mst_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_MASTER_DEFAULT_PIN, }; i2s_std_config_t std_slv_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_SLAVE_DEFAULT_PIN, }; @@ -788,7 +788,7 @@ TEST_CASE("I2S_default_PLL_clock_test", "[i2s]") i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_0, I2S_ROLE_MASTER); i2s_std_config_t std_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_MASTER_DEFAULT_PIN, }; @@ -811,7 +811,7 @@ TEST_CASE("I2S_APLL_clock_test", "[i2s]") i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_0, I2S_ROLE_MASTER); i2s_std_config_t std_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(SAMPLE_BITS, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_MASTER_DEFAULT_PIN, }; std_cfg.clk_cfg.clk_src = I2S_CLK_SRC_APLL; @@ -849,7 +849,7 @@ TEST_CASE("I2S_package_lost_test", "[i2s]") chan_cfg.dma_frame_num = 511; i2s_std_config_t std_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_STEREO), .gpio_cfg = I2S_TEST_MASTER_DEFAULT_PIN, }; diff --git a/components/driver/test_apps/i2s_test_apps/i2s_tdm/main/test_i2s_tdm_full_duplex.c b/components/driver/test_apps/i2s_test_apps/i2s_tdm/main/test_i2s_tdm_full_duplex.c index 3f1772a538fb..92f64ce02d20 100644 --- a/components/driver/test_apps/i2s_test_apps/i2s_tdm/main/test_i2s_tdm_full_duplex.c +++ b/components/driver/test_apps/i2s_test_apps/i2s_tdm/main/test_i2s_tdm_full_duplex.c @@ -90,7 +90,7 @@ static void test_i2s_tdm_master(uint32_t sample_rate, i2s_data_bit_width_t bit_w /* Configure channels to TDM mode */ i2s_tdm_config_t i2s_tdm_config = { .clk_cfg = I2S_TDM_CLK_DEFAULT_CONFIG(sample_rate), - .slot_cfg = I2S_TDM_PHILIP_SLOT_DEFAULT_CONFIG(bit_width, I2S_SLOT_MODE_STEREO, slot_mask), + .slot_cfg = I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG(bit_width, I2S_SLOT_MODE_STEREO, slot_mask), .gpio_cfg = { .mclk = GPIO_NUM_NC, .bclk = TEST_I2S_BCK_IO, @@ -197,7 +197,7 @@ static void test_i2s_tdm_slave(uint32_t sample_rate, i2s_data_bit_width_t bit_wi /* Configure channels to TDM mode */ i2s_tdm_config_t i2s_tdm_config = { .clk_cfg = I2S_TDM_CLK_DEFAULT_CONFIG(sample_rate), - .slot_cfg = I2S_TDM_PHILIP_SLOT_DEFAULT_CONFIG(bit_width, I2S_SLOT_MODE_STEREO, slot_mask), + .slot_cfg = I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG(bit_width, I2S_SLOT_MODE_STEREO, slot_mask), .gpio_cfg = { .mclk = GPIO_NUM_NC, .bclk = TEST_I2S_BCK_IO, diff --git a/components/hal/esp32s2/include/hal/i2s_ll.h b/components/hal/esp32s2/include/hal/i2s_ll.h index 773c94e45312..7ec9e948415d 100644 --- a/components/hal/esp32s2/include/hal/i2s_ll.h +++ b/components/hal/esp32s2/include/hal/i2s_ll.h @@ -707,22 +707,22 @@ static inline void i2s_ll_enable_dma(i2s_dev_t *hw, bool ena) } /** - * @brief Set I2S TX to philip standard + * @brief Set I2S TX to philips standard * * @param hw Peripheral I2S hardware instance address. */ -static inline void i2s_ll_tx_set_format_philip(i2s_dev_t *hw) +static inline void i2s_ll_tx_set_format_philips(i2s_dev_t *hw) { hw->conf.tx_short_sync = 0; hw->conf.tx_msb_shift = 1; } /** - * @brief Set I2S RX to philip standard + * @brief Set I2S RX to philips standard * * @param hw Peripheral I2S hardware instance address. */ -static inline void i2s_ll_rx_set_format_philip(i2s_dev_t *hw) +static inline void i2s_ll_rx_set_format_philips(i2s_dev_t *hw) { hw->conf.rx_short_sync = 0; hw->conf.rx_msb_shift = 1; diff --git a/components/hal/include/hal/i2s_hal.h b/components/hal/include/hal/i2s_hal.h index 8a8a476e8f35..573d1f770f24 100644 --- a/components/hal/include/hal/i2s_hal.h +++ b/components/hal/include/hal/i2s_hal.h @@ -37,7 +37,7 @@ typedef struct { i2s_std_slot_mask_t slot_mask; /*!< Select the left, right or both slot */ uint32_t ws_width; /*!< WS signal width (i.e. the number of bclk ticks that ws signal is high) */ bool ws_pol; /*!< WS signal polarity, set true to enable high lever first */ - bool bit_shift; /*!< Set to enbale bit shift in Philip mode */ + bool bit_shift; /*!< Set to enbale bit shift in Philips mode */ #if SOC_I2S_HW_VERSION_1 // For esp32/esp32-s2 bool msb_right; /*!< Set to place right channel data at the MSB in the FIFO */ #else @@ -53,7 +53,7 @@ typedef struct { i2s_tdm_slot_mask_t slot_mask; /*!< Slot mask. Activating slots by setting 1 to corresponding bits. When the activated slots is not consecutive, those data in unactivated slots will be ignored */ uint32_t ws_width; /*!< WS signal width ((i.e. the number of bclk ticks that ws signal is high)) */ bool ws_pol; /*!< WS signal polarity, set true to enable high lever first */ - bool bit_shift; /*!< Set true to enable bit shift in Philip mode */ + bool bit_shift; /*!< Set true to enable bit shift in Philips mode */ bool left_align; /*!< Set true to enable left alignment */ bool big_endian; /*!< Set true to enable big endian */ diff --git a/docs/_static/diagrams/i2s/std_philip.json b/docs/_static/diagrams/i2s/std_philips.json similarity index 95% rename from docs/_static/diagrams/i2s/std_philip.json rename to docs/_static/diagrams/i2s/std_philips.json index 01253410697e..b55e0168491a 100644 --- a/docs/_static/diagrams/i2s/std_philip.json +++ b/docs/_static/diagrams/i2s/std_philips.json @@ -1,6 +1,6 @@ { "head": { - "text": "Standard Philip Timing Diagram" + "text": "Standard Philips Timing Diagram" }, "signal": [ { diff --git a/docs/_static/diagrams/i2s/tdm_philip.json b/docs/_static/diagrams/i2s/tdm_philips.json similarity index 96% rename from docs/_static/diagrams/i2s/tdm_philip.json rename to docs/_static/diagrams/i2s/tdm_philips.json index 9df9cd0e182f..c908e22b4916 100644 --- a/docs/_static/diagrams/i2s/tdm_philip.json +++ b/docs/_static/diagrams/i2s/tdm_philips.json @@ -1,6 +1,6 @@ { "head": { - "text": "TDM Philip Timing Diagram" + "text": "TDM Philips Timing Diagram" }, "signal": [ { diff --git a/docs/en/api-reference/peripherals/i2s.rst b/docs/en/api-reference/peripherals/i2s.rst index 62614d29580f..77da9d2e4da4 100644 --- a/docs/en/api-reference/peripherals/i2s.rst +++ b/docs/en/api-reference/peripherals/i2s.rst @@ -118,11 +118,11 @@ Standard Mode Standard mode always has left and right two sound channels which are called 'slots'. These slots can support 8/16/24/32 bits width sample data. And the communication format for the slots mainly includes these following formats: -- **Philip Format**: Data signal have one bit shift comparing to the WS(word select) signal. And the duty of WS signal is 50%. +- **Philips Format**: Data signal have one bit shift comparing to the WS(word select) signal. And the duty of WS signal is 50%. -.. wavedrom:: /../_static/diagrams/i2s/std_philip.json +.. wavedrom:: /../_static/diagrams/i2s/std_philips.json -- **MSB Format**: Almost same as philip format, but its data have no shift. +- **MSB Format**: Almost same as philips format, but its data have no shift. .. wavedrom:: /../_static/diagrams/i2s/std_msb.json @@ -162,11 +162,11 @@ Standard mode always has left and right two sound channels which are called 'slo TDM(Time Division Multiplexing) mode supports upto 16 slots, these slots can be enabled by :cpp:member:`i2s_tdm_slot_config_t::slot_mask`. But due to the hardware limitation, only upto 4 slots are supported while the slot is set to 32 bit-width, and 8 slots for 16 bit-width, 16 slots for 8 bit-width. The slot communication format of TDM is almost same as standard mode, but there are some small differences between them. - - **Philip Format**: Data signal have one bit shift comparing to the WS(word select) signal. And no matter how many slots are contained in one frame, the duty of WS signal will always keep 50%. + - **Philips Format**: Data signal have one bit shift comparing to the WS(word select) signal. And no matter how many slots are contained in one frame, the duty of WS signal will always keep 50%. - .. wavedrom:: /../_static/diagrams/i2s/tdm_philip.json + .. wavedrom:: /../_static/diagrams/i2s/tdm_philips.json - - **MSB Format**: Almost same as philip format, but its data have no shift. + - **MSB Format**: Almost same as philips format, but its data have no shift. .. wavedrom:: /../_static/diagrams/i2s/tdm_msb.json @@ -274,7 +274,7 @@ Standard TX/RX Usage Different slot communication formats can be generated by following helper macros for standard mode. As described above, there are three formats in standard mode, their helper macros are: -- :c:macro:`I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG` +- :c:macro:`I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG` - :c:macro:`I2S_STD_PCM_SLOT_DEFAULT_CONFIG` - :c:macro:`I2S_STD_MSB_SLOT_DEFAULT_CONFIG` @@ -714,7 +714,7 @@ Here is the table of the data that received in the buffer with different :cpp:me Different slot communication formats can be generated by following helper macros for TDM mode. As described above, there are four formats in TDM mode, their helper macros are: - - :c:macro:`I2S_TDM_PHILIP_SLOT_DEFAULT_CONFIG` + - :c:macro:`I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG` - :c:macro:`I2S_TDM_MSB_SLOT_DEFAULT_CONFIG` - :c:macro:`I2S_TDM_PCM_SHORT_SLOT_DEFAULT_CONFIG` - :c:macro:`I2S_TDM_PCM_LONG_SLOT_DEFAULT_CONFIG` @@ -824,7 +824,7 @@ Here is an example of how to allocate a pair of full-duplex channels: /* Set the configurations for BOTH TWO channels, since tx and rx channel have to be same in full-duplex mode */ i2s_std_config_t std_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(32000), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), .gpio_cfg = { .mclk = I2S_GPIO_UNUSED, .bclk = GPIO_NUM_4, @@ -865,7 +865,7 @@ Here is an example of how to allocate a pair of full-duplex channels: i2s_new_channel(&chan_cfg, &tx_handle, NULL); i2s_std_config_t std_tx_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(48000), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), .gpio_cfg = { .mclk = GPIO_NUM_0, .bclk = GPIO_NUM_4, @@ -925,7 +925,7 @@ Here is an example of how to allocate a pair of full-duplex channels: i2s_new_channel(&chan_cfg, &tx_handle, NULL); i2s_std_config_t std_tx_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(48000), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), .gpio_cfg = { .mclk = GPIO_NUM_0, .bclk = GPIO_NUM_4, diff --git a/docs/zh_CN/migration-guides/release-5.x/5.0/peripherals.rst b/docs/zh_CN/migration-guides/release-5.x/5.0/peripherals.rst index efff278cca1f..a36ab04e4b95 100644 --- a/docs/zh_CN/migration-guides/release-5.x/5.0/peripherals.rst +++ b/docs/zh_CN/migration-guides/release-5.x/5.0/peripherals.rst @@ -88,12 +88,12 @@ GPIO --------------------------------- Sigma-Delta 调制器的驱动现已更新为 :doc:`SDM <../../../api-reference/peripherals/sdm>`。 - + - 新驱动中实现了工厂模式,SDM 通道都位于内部通道池中,因此用户无需手动将 SDM 通道配置到 GPIO 管脚。 - SDM 通道会被自动分配。 - + 尽管我们推荐用户使用新的驱动 API,旧版驱动仍然可用,位于头文件引用路径 ``driver/sigmadelta.h`` 中。但是,引用 ``driver/sigmadelta.h`` 会默认触发如下编译警告,可通过配置 Kconfig 选项 :ref:`CONFIG_SDM_SUPPRESS_DEPRECATE_WARN` 关闭该警告。 - + .. code-block:: text The legacy sigma-delta driver is deprecated, please use driver/sdm.h @@ -150,7 +150,7 @@ UART ------------ .. list-table:: - :width: 700 px + :width: 700 px :header-rows: 1 * - 删除/弃用项目 @@ -162,11 +162,11 @@ UART * - ``uart_isr_free()`` - 无 - 更新后,UART 中断由驱动处理。 - * - :cpp:type:`uart_config_t` 中的 ``use_ref_tick`` + * - :cpp:type:`uart_config_t` 中的 ``use_ref_tick`` - :cpp:member:`uart_config_t::source_clk` - 选择时钟源。 * - ``uart_enable_pattern_det_intr()`` - - :cpp:func:`uart_enable_pattern_det_baud_intr` + - :cpp:func:`uart_enable_pattern_det_baud_intr` - 使能模式检测中断。 I2C @@ -182,7 +182,7 @@ I2C * - ``i2c_isr_register()`` - 无 - 更新后,I2C 中断由驱动处理。 - * - ``i2c_isr_register()`` + * - ``i2c_isr_register()`` - 无 - 更新后,I2C 中断由驱动处理。 * - ``i2c_opmode_t`` @@ -192,7 +192,7 @@ I2C SPI --- -.. list-table:: +.. list-table:: :width: 700 px :header-rows: 1 @@ -200,7 +200,7 @@ SPI - 替代 - 备注 * - ``spi_cal_clock()`` - - :cpp:func:`spi_get_actual_clock` + - :cpp:func:`spi_get_actual_clock` - 获取 SPI 真实的工作频率。 - 内部头文件 ``spi_common_internal.h`` 已被移至 ``esp_private/spi_common_internal.h``。 @@ -211,7 +211,7 @@ SPI ----- .. list-table:: - :width: 700 px + :width: 700 px :header-rows: 1 * - 删除/弃用项目 @@ -239,14 +239,14 @@ LEDC 脉冲计数器 (PCNT) 驱动 ---------------------------------- - + 为统一和简化 PCNT 外设,PCNT 驱动已更新,详见 :doc:`PCNT <../../../api-reference/peripherals/pcnt>`。 - + 尽管我们推荐使用新的驱动 API,旧版驱动仍然可用,保留在头文件引用路径 ``driver/pcnt.h`` 中。但是,引用路径 ``driver/pcnt.h`` 会默认触发如下编译警告,可通过配置 Kconfig 选项 :ref:`CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN` 来关闭该警告。 .. code-block:: text - legacy pcnt driver is deprecated, please migrate to use driver/pulse_cnt.h + legacy pcnt driver is deprecated, please migrate to use driver/pulse_cnt.h 主要概念和使用方法上的更新如下所示: @@ -261,7 +261,7 @@ LEDC ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - 更新前,PCNT 的单元配置和通道配置都通过函数 ``pcnt_unit_config`` 实现。更新后,PCNT 的单元配置通过工厂 API :cpp:func:`pcnt_new_unit` 完成,通道配置通过工厂 API :cpp:func:`pcnt_new_channel` 完成。 - + - 只需配置计数范围即可初始化一个 PCNT 单元。更新后,GPIO 管脚分配通过 :cpp:func:`pcnt_new_channel` 完成。 - 高/低电平控制模式和上升沿/下降沿计数模式分别通过函数 :cpp:func:`pcnt_channel_set_edge_action` 和 :cpp:func:`pcnt_channel_set_level_action` 进行设置。 @@ -276,7 +276,7 @@ LEDC - 更新后, ``pcnt_isr_register`` 与 ``pcnt_isr_unregister`` 已被删除,不允许注册 ISR 句柄。 用户可以通过调用:cpp:func:`pcnt_unit_register_event_callbacks` 来注册事件回调函数。 - 更新后, ``pcnt_set_pin`` 已被删除,新的驱动不再允许在运行时切换 GPIO 管脚。如果用户想切换为其他 GPIO 管脚,可通过:cpp:func:`pcnt_del_channel` 删除当前的 PCNT 通道,然后通过:cpp:func:`pcnt_new_channel` 安装新的 GPIO 管脚。 - ``pcnt_filter_enable``, ``pcnt_filter_disable`` 与 ``pcnt_set_filter_value`` 更新为 :cpp:func:`pcnt_unit_set_glitch_filter`。同时, ``pcnt_get_filter_value`` 已被删除。 - - ``pcnt_set_mode`` 更新为 :cpp:func:`pcnt_channel_set_edge_action` 与 :cpp:func:`pcnt_channel_set_level_action`。 + - ``pcnt_set_mode`` 更新为 :cpp:func:`pcnt_channel_set_edge_action` 与 :cpp:func:`pcnt_channel_set_level_action`。 - ``pcnt_isr_service_install``, ``pcnt_isr_service_uninstall``, ``pcnt_isr_handler_add`` 与 ``pcnt_isr_handler_remove`` 更新为 :cpp:func:`pcnt_unit_register_event_callbacks`。默认的 ISR 句柄已安装在新的驱动中。 .. only:: SOC_TEMP_SENSOR_SUPPORTED @@ -302,9 +302,9 @@ LEDC ---------------------- 为统一和扩展 RMT 外设的使用,RMT 驱动已更新,详见 :doc:`RMT transceiver <../../../api-reference/peripherals/rmt>`。 - + 尽管我们建议使用新的驱动 API,旧版驱动仍然可用,保留在头文件引用路径 ``driver/rmt.h``中。但是,引用路径 ``driver/rmt.h`` 会默认触发如下编译警告,可通过配置 Kconfig 选项 :ref:`CONFIG_RMT_SUPPRESS_DEPRECATE_WARN` 来关闭该警告。 - + .. code-block:: text The legacy RMT driver is deprecated, please use driver/rmt_tx.h and/or driver/rmt_rx.h @@ -377,9 +377,9 @@ LCD ----- MCPWM 驱动已更新(详见 :doc:`MCPWM <../../../api-reference/peripherals/mcpwm>`)。同时,旧版驱动已被弃用。 - + 新驱动中,每个 MCPWM 子模块相互独立,用户可以自由进行资源连接。 - + 尽管我们推荐使用新的驱动 API,旧版驱动仍然可用,其引用路径为 ``driver/mcpwm.h``。但是,使用旧版驱动会默认触发如下编译警告,可以通过配置 Kconfig 选项 :ref:`CONFIG_MCPWM_SUPPRESS_DEPRECATE_WARN` 来关闭该警告。 .. code-block:: text @@ -454,10 +454,10 @@ LCD I2S 驱动 ----------------------- - 旧版 I2S 驱动在支持 ESP32-C3 和 ESP32-S3 新功能时暴露了很多缺点,为解决这些缺点,I2S 驱动已更新(请参考:doc:`I2S Driver <../../../api-reference/peripherals/i2s>`)。用户可以通过引用不同 I2S 模式对应的头文件来使用新版驱动的 API,如 :component_file:`driver/include/driver/i2s_std.h`, :component_file:`driver/include/driver/i2s_pdm.h` 以及 :component_file:`driver/include/driver/i2s_tdm.h`。 - + 旧版 I2S 驱动在支持 ESP32-C3 和 ESP32-S3 新功能时暴露了很多缺点,为解决这些缺点,I2S 驱动已更新(请参考:doc:`I2S Driver <../../../api-reference/peripherals/i2s>`)。用户可以通过引用不同 I2S 模式对应的头文件来使用新版驱动的 API,如 :component_file:`driver/include/driver/i2s_std.h`, :component_file:`driver/include/driver/i2s_pdm.h` 以及 :component_file:`driver/include/driver/i2s_tdm.h`。 + 为保证前向兼容,旧版驱动的 API 仍然在 :component_file:`driver/deprecated/driver/i2s.h` 中可用。但使用旧版 API 会触发编译警告,该警告可通过配置 Kconfig 选项 :ref:`CONFIG_I2S_SUPPRESS_DEPRECATE_WARN` 来关闭。 - + 以下是更新后的 I2S 文件概况。 .. figure:: ../../../../_static/diagrams/i2s/i2s_file_structure.png @@ -484,9 +484,9 @@ LCD I2S 通信模式包括以下三种模式,请注意: - - **标准模式**:标准模式通常包括两个声道,支持 Philip,MSB 和 PCM(短帧同步)格式,详见 :component_file:`driver/include/driver/i2s_std.h`。 + - **标准模式**:标准模式通常包括两个声道,支持 Philips,MSB 和 PCM(短帧同步)格式,详见 :component_file:`driver/include/driver/i2s_std.h`。 - **PDM模式**:PDM 模式仅支持两个声道,16 bit 数据位宽,但是 PDM TX 和 PDM RX 的配置略有不同。对于 PDM TX,采样率可通过 :cpp:member:`i2s_pdm_tx_clk_config_t::sample_rate` 进行设置,其时钟频率取决于上采样的配置。对于 PDM RX,采样率可通过 :cpp:member:`i2s_pdm_rx_clk_config_t::sample_rate` 进行设置,其时钟频率取决于下采样的配置,详见 :component_file:`driver/include/driver/i2s_pdm.h`。 - - **TDM 模式**:TDM 模式可支持高达 16 声道,该模式可工作在 Philip,MSB,PCM(短帧同步)和PCM(长帧同步)格式下,详见 :component_file:`driver/include/driver/i2s_tdm.h`。 + - **TDM 模式**:TDM 模式可支持高达 16 声道,该模式可工作在 Philips,MSB,PCM(短帧同步)和PCM(长帧同步)格式下,详见 :component_file:`driver/include/driver/i2s_tdm.h`。 在某个模式下分配新通道时,必须通过相应的函数初始化这个通道。我们强烈建议使用辅助宏来生成默认配置,以避免默认值被改动。 @@ -502,7 +502,7 @@ LCD Misc """" - + - 更新后,I2S 驱动利用状态和状态机避免在错误状态下调用 API。 - 更新后,ADC 和 DAC 模式已被删除,只有它们各自专用的驱动及 I2S 旧版驱动还支持这两种模式。 @@ -515,11 +515,11 @@ LCD 2. 通过调用 :func:`i2s_channel_init_std_mode`, :func:`i2s_channel_init_pdm_rx_mode`, :func:`i2s_channel_init_pdm_tx_mode` 或 :func:`i2s_channel_init_tdm_mode` 将通道初始化为指定模式。进行相应的声道、时钟和 GPIO 管脚配置。 3. (可选)通过调用 :cpp:func:`i2s_channel_register_event_callback` 注册 ISR 事件回调函数。I2S 事件由回调函数同步接收,而不是从事件队列中异步接收。 4. 通过调用 :cpp:func:`i2s_channel_enable` 来开启 I2S 通道的硬件资源。在更新后的驱动中,I2S 在安装后不会再自动开启,用户需要确定通道是否已经开启。 - 5. 分别通过 :cpp:func:`i2s_channel_read` 和 :cpp:func:`i2s_channel_write` 来读取和写入数据。当然,在 :cpp:func:`i2s_channel_read` 中只能输入接收通道句柄,在 :cpp:func:`i2s_channel_write` 中只能输入发送通道句柄。 + 5. 分别通过 :cpp:func:`i2s_channel_read` 和 :cpp:func:`i2s_channel_write` 来读取和写入数据。当然,在 :cpp:func:`i2s_channel_read` 中只能输入接收通道句柄,在 :cpp:func:`i2s_channel_write` 中只能输入发送通道句柄。 6. (可选)通过相应的 'reconfig' 函数可以更改声道、时钟和 GPIO 管脚配置,但是更改配置前必须调用 :cpp:func:`i2s_channel_disable`。 7. 通过调用 :cpp:func:`i2s_channel_disable` 可以停止使用 I2S 通道的硬件资源。 8. 不再使用某通道时,通过调用 :cpp:func:`i2s_del_channel` 可以删除和释放该通道资源,但是删除之前必须先停用该通道。 - + 用于访问寄存器的宏 --------------------------------------------- diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/README.md b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/README.md index ecae2313f121..9b639535fe10 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/README.md +++ b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/README.md @@ -11,7 +11,7 @@ This example demonstrates how to use I2S TDM mode to record 4 MICs connected to | Mode of ES7210 TDM | Mode of I2S Driver TDM | | :------------------: | :--------------------: | -| ES7210_I2S_FMT_I2S | Philip format | +| ES7210_I2S_FMT_I2S | Philips format | | ES7210_I2S_FMT_LJ | MSB format | | ES7210_I2S_FMT_DSP_A | PCM short format | | ES7210_I2S_FMT_DSP_B | PCM long format | diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/main/i2s_es7210_record_example.c b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/main/i2s_es7210_record_example.c index b7b8cc01d308..3d2fc1857bf7 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/main/i2s_es7210_record_example.c +++ b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/main/i2s_es7210_record_example.c @@ -82,7 +82,7 @@ static i2s_chan_handle_t es7210_i2s_init(void) ESP_LOGI(TAG, "Configure I2S receive channel to TDM mode"); i2s_tdm_config_t i2s_tdm_rx_conf = { #if EXAMPLE_I2S_FORMAT == ES7210_I2S_FMT_I2S - .slot_cfg = I2S_TDM_PHILIP_SLOT_DEFAULT_CONFIG(EXAMPLE_I2S_SAMPLE_BITS, I2S_SLOT_MODE_STEREO, EXAMPLE_I2S_TDM_SLOT_MASK), + .slot_cfg = I2S_TDM_PHILIPS_SLOT_DEFAULT_CONFIG(EXAMPLE_I2S_SAMPLE_BITS, I2S_SLOT_MODE_STEREO, EXAMPLE_I2S_TDM_SLOT_MASK), #elif EXAMPLE_I2S_FORMAT == ES7210_I2S_FMT_LJ .slot_cfg = I2S_TDM_MSB_SLOT_DEFAULT_CONFIG(EXAMPLE_I2S_SAMPLE_BITS, I2S_SLOT_MODE_STEREO, EXAMPLE_I2S_TDM_SLOT_MASK), #elif EXAMPLE_I2S_FORMAT == ES7210_I2S_FMT_DSP_A diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es8311/main/i2s_es8311_example.c b/examples/peripherals/i2s/i2s_codec/i2s_es8311/main/i2s_es8311_example.c index 9311a8510263..76d041e5062e 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es8311/main/i2s_es8311_example.c +++ b/examples/peripherals/i2s/i2s_codec/i2s_es8311/main/i2s_es8311_example.c @@ -100,7 +100,7 @@ static esp_err_t i2s_driver_init(void) ESP_ERROR_CHECK(i2s_new_channel(&chan_cfg, &tx_handle, &rx_handle)); i2s_std_config_t std_cfg = { .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(EXAMPLE_SAMPLE_RATE), - .slot_cfg = I2S_STD_PHILIP_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), + .slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), .gpio_cfg = { .mclk = I2S_MCK_IO, .bclk = I2S_BCK_IO,