feat(i2s): enable i2s test on c5

This commit is contained in:
laokaiyao
2024-09-14 18:27:27 +08:00
committed by Kevin (Lao Kaiyao)
parent 0cb4bdc54e
commit ae36f84945
15 changed files with 135 additions and 61 deletions

View File

@@ -41,7 +41,9 @@
#include "esp_private/i2s_platform.h"
#include "esp_private/esp_clk.h"
#if SOC_I2S_SUPPORT_SLEEP_RETENTION
#include "esp_private/sleep_retention.h"
#endif
#include "driver/gpio.h"
#include "esp_private/gpio.h"
@@ -258,7 +260,7 @@ static i2s_controller_t *i2s_acquire_controller_obj(int id)
#endif
#if I2S_USE_RETENTION_LINK
sleep_retention_module_t module = i2s_periph_signal[id].retention_module;
sleep_retention_module_t module = i2s_reg_retention_info[id].retention_module;
sleep_retention_module_init_param_t init_param = {
.cbs = {
.create = {
@@ -936,7 +938,7 @@ esp_err_t i2s_new_channel(const i2s_chan_config_t *chan_cfg, i2s_chan_handle_t *
ESP_RETURN_ON_FALSE(chan_cfg->dma_desc_num >= 2, ESP_ERR_INVALID_ARG, TAG, "there should be at least 2 DMA buffers");
ESP_RETURN_ON_FALSE(chan_cfg->intr_priority >= 0 && chan_cfg->intr_priority <= 7, ESP_ERR_INVALID_ARG, TAG, "intr_priority should be within 0~7");
#if !SOC_I2S_SUPPORT_SLEEP_RETENTION
ESP_RETURN_ON_FALSE(!chan_cfg->backup_before_sleep, ESP_ERR_NOT_SUPPORTED, TAG, "register back up is not supported");
ESP_RETURN_ON_FALSE(!chan_cfg->allow_pd, ESP_ERR_NOT_SUPPORTED, TAG, "register back up is not supported");
#endif
esp_err_t ret = ESP_OK;
@@ -997,7 +999,7 @@ esp_err_t i2s_new_channel(const i2s_chan_config_t *chan_cfg, i2s_chan_handle_t *
i2s_obj->full_duplex = true;
}
#if I2S_USE_RETENTION_LINK
if (chan_cfg->backup_before_sleep) {
if (chan_cfg->allow_pd) {
s_i2s_create_retention_module(i2s_obj);
}
#endif