mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(i2s): support i2s & apll on esp32s31
This commit is contained in:
@@ -792,6 +792,17 @@ esp_err_t i2s_init_dma_intr(i2s_chan_handle_t handle, int intr_flag)
|
||||
gdma_trigger_t trig = {0};
|
||||
|
||||
switch (port_id) {
|
||||
#if I2S_LL_SUPPORT(GDMA_RECOMB)
|
||||
// Minimum support for GDMA channels on esp32s31
|
||||
case I2S_NUM_0:
|
||||
trig.instance_id = SOC_GDMA_TRIG_PERIPH_I2S0CH0;
|
||||
trig.bus_id = SOC_GDMA_TRIG_PERIPH_I2S0CH0_BUS;
|
||||
break;
|
||||
case I2S_NUM_1:
|
||||
trig.instance_id = SOC_GDMA_TRIG_PERIPH_I2S1CH0;
|
||||
trig.bus_id = SOC_GDMA_TRIG_PERIPH_I2S1CH0_BUS;
|
||||
break;
|
||||
#else
|
||||
#if I2S_LL_GET(INST_NUM) > 2
|
||||
case I2S_NUM_2:
|
||||
trig = GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_I2S, 2);
|
||||
@@ -805,6 +816,7 @@ esp_err_t i2s_init_dma_intr(i2s_chan_handle_t handle, int intr_flag)
|
||||
case I2S_NUM_0:
|
||||
trig = GDMA_MAKE_TRIGGER(GDMA_TRIG_PERIPH_I2S, 0);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
ESP_LOGE(TAG, "Unsupported I2S port number");
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
|
||||
Reference in New Issue
Block a user