According to the readme documentation it still doesn't work
Environment
Audio development kit: ESP32-LyraT43
IDF version : v5.0.2
MicroPython version : the supported commit d529c2067
ADF version?: try commit d529c2067
Build system: [Make|CMake|idf.py]
Operating system: [macOS]
Problem Description
Compile the MicroPython firmware according to the README document, the version of ADF is not specified in the document, and an error is reported when you try to compile it with the latest code
esp adf error: 'i2s_stream_cfg_t' has no member named 'i2s_port'
Speculate on the cause
error: i2s_stream_cfg_t , but the README document require IDF version : v5.0.2
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 2, 0) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0))
typedef struct {
audio_stream_type_t type; /*!< Type of stream */
i2s_port_t i2s_port; /*!< I2S driver hardware port */
i2s_bits_per_sample_t expand_src_bits; /*!< The source bits per sample when data expand */
i2s_config_t i2s_config; /*!< I2S driver configurations */
bool use_alc; /*!< It is a flag for ALC. If use ALC, the value is true. Or the value is false */
int volume; /*!< The volume of audio input data will be set. */
int out_rb_size; /*!< Size of output ringbuffer */
int task_stack; /*!< Task stack size */
int task_core; /*!< Task running in core (0 or 1) */
int task_prio; /*!< Task priority (based on freeRTOS priority) */
bool stack_in_ext; /*!< Try to allocate stack in external memory */
int multi_out_num; /*!< The number of multiple output */
bool uninstall_drv; /*!< whether uninstall the i2s driver when stream destroyed*/
bool need_expand; /*!< whether to expand i2s data */
int buffer_len; /*!< Buffer length use for an Element. Note: when 'bits_per_sample' is 24 bit, the buffer length must be a multiple of 3. The recommended value is 3600 */
} i2s_stream_cfg_t;
#else
// ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
typedef struct {
audio_stream_type_t type; /*!< Type of stream */
i2s_comm_mode_t transmit_mode; /*!< I2S transmit mode */
i2s_chan_config_t chan_cfg; /*!< I2S controller channel configuration */
i2s_std_config_t std_cfg; /*!< I2S standard mode major configuration that including clock/slot/gpio configuration */
#if SOC_I2S_SUPPORTS_PDM_RX
i2s_pdm_rx_config_t pdm_rx_cfg; /*!< I2S PDM RX mode major configuration that including clock/slot/gpio configuration */
#endif // SOC_I2S_SUPPORTS_PDM_RX
#if SOC_I2S_SUPPORTS_PDM_TX
i2s_pdm_tx_config_t pdm_tx_cfg; /*!< I2S PDM TX mode major configuration that including clock/slot/gpio configuration */
#endif // SOC_I2S_SUPPORTS_PDM_RX
#if SOC_I2S_SUPPORTS_TDM
i2s_tdm_config_t tdm_cfg; /*!< I2S TDM mode major configuration that including clock/slot/gpio configuration */
#endif // SOC_I2S_SUPPORTS_TDM
i2s_data_bit_width_t expand_src_bits; /*!< The source bits per sample when data expand */
bool use_alc; /*!< It is a flag for ALC. If use ALC, the value is true. Or the value is false */
int volume; /*!< The volume of audio input data will be set. */
int out_rb_size; /*!< Size of output ringbuffer */
int task_stack; /*!< Task stack size */
int task_core; /*!< Task running in core (0 or 1) */
int task_prio; /*!< Task priority (based on freeRTOS priority) */
bool stack_in_ext; /*!< Try to allocate stack in external memory */
int multi_out_num; /*!< The number of multiple output */
bool uninstall_drv; /*!< whether uninstall the i2s driver when stream destroyed*/
bool need_expand; /*!< whether to expand i2s data */
int buffer_len; /*!< Buffer length use for an Element. Note: when 'bits_per_sample' is 24 bit, the buffer length must be a multiple of 3. The recommended value is 3600 */
} i2s_stream_cfg_t;
According to the readme documentation it still doesn't work
Environment
d529c2067
d529c2067
Problem Description
Compile the MicroPython firmware according to the README document, the version of ADF is not specified in the document, and an error is reported when you try to compile it with the latest code
Execute the command
idf.py build -D MICROPY_BOARD_DIR=${ADF_PATH}/micropython_adf/boards/lyrat43 -D USER_C_MODULES=${ADF_PATH}/micropython_adf/mod/micropython.cmake
Debug Logs
file: components/audio_stream/i2stream.c function: i2s_stream_clear_dma_buffer Define struct :
i2s_stream_cfg_t
Speculate on the cause
error:
i2s_stream_cfg_t
, but the README document require IDF version : v5.0.2Please check