1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电路图如下,有点小瑕疵ES8388_VMID PIN10/19/20电容没有忘加,查资料应该不影响语言输出,可能噪音大,如果能导致不输出请告诉我一下。
ESP32S2管脚映射 这里主要问题是我不确定MCLK 放到S2的PIN33是否合适,查资料好像没有时钟管脚约束了,如果这里有问题请告知。 下面是移植过程 1、自定义borad 复制lyrat_v4_3 board文件 改名gm8388_v1_0 2、修改管脚I2CI2S esp_err_t get_i2c_pins(i2c_port_t port, i2c_config_t *i2c_config) { AUDIO_NULL_CHECK(TAG, i2c_config, return ESP_FAIL); if (port == I2C_NUM_0 || port == I2C_NUM_1) { i2c_config->sda_io_num = GPIO_NUM_40;//SDA i2c_config->scl_io_num = GPIO_NUM_39;//SCL } else { i2c_config->sda_io_num = -1; i2c_config->scl_io_num = -1; ESP_LOGE(TAG, "i2c port %d is not supported", port); return ESP_FAIL; } return ESP_OK; } esp_err_t get_i2s_pins(i2s_port_t port, i2s_pin_config_t *i2s_config) { AUDIO_NULL_CHECK(TAG, i2s_config, return ESP_FAIL); if (port == I2S_NUM_0) { i2s_config->bck_io_num = GPIO_NUM_34; // 设置串行时钟引脚 ES8388_SCLK i2s_config->ws_io_num = GPIO_NUM_35; //设置左右声道的时钟引脚 ES8388_LRCK i2s_config->data_out_num = GPIO_NUM_37; //ES8388_ASDOUT i2s_config->data_in_num = GPIO_NUM_36; //ES8388_DSDIN } else if (port == I2S_NUM_1) { i2s_config->bck_io_num = -1; i2s_config->ws_io_num = -1; i2s_config->data_out_num = -1; i2s_config->data_in_num = -1; } else { memset(i2s_config, -1, sizeof(i2s_pin_config_t)); ESP_LOGE(TAG, "i2s port %d is not supported", port); return ESP_FAIL; } return ESP_OK; } 3、mclk管脚 esp_err_t i2s_mclk_gpio_select(i2s_port_t i2s_num, gpio_num_t gpio_num) { if (i2s_num >= I2S_NUM_MAX) { ESP_LOGE(TAG, "Does not support i2s number(%d)", i2s_num); return ESP_ERR_INVALID_ARG; } gpio_num = (gpio_num_t)GPIO_NUM_33; ESP_LOGD(TAG, "I2S%d, MCLK output by GPIO%d", i2s_num, gpio_num); gpio_matrix_out(gpio_num, CLK_I2S_MUX_IDX, 0, 0); } 切换到工程配置选择开发板 别忘记设置一下flash,这里新手容易出差 编译,若有board头文件提示将自建board路径添加c_cpp_properties.json "D:/PROJECT/ESP32/esp-adf/components/audio_board/gm8388_v1_0" 编译完成后下载自己board发现,没有声音只有噪音,log过程也对不知道哪里有问题。 I (350) PLAY_MP3_FLASH: [ 1 ] Start audio codec chip I (370) PLAY_MP3_FLASH: [ 2 ] Create audio pipeline, add all elements to pipeline, and subscribe pipeline event I (370) PLAY_MP3_FLASH: [2.1] Create mp3 decoder to decode mp3 file and set custom read callback I (380) PLAY_MP3_FLASH: [2.2] Create i2s stream to write data to codec chip I (400) PLAY_MP3_FLASH: [2.3] Register all elements to audio pipeline I (400) PLAY_MP3_FLASH: [2.4] Link it together [mp3_music_read_cb]-->mp3_decoder-->i2s_stream-->[codec_chip] I (410) PLAY_MP3_FLASH: [ 3 ] Set up event listener I (410) PLAY_MP3_FLASH: [3.1] Listening event from all elements of pipeline I (420) PLAY_MP3_FLASH: [ 4 ] Start audio_pipeline I (430) PLAY_MP3_FLASH: [ 4.1 ] vol level=69 I (430) PLAY_MP3_FLASH: [ 4.2 ] vol level=100 I (450) PLAY_MP3_FLASH: [ * ] Receive music info from mp3 decoder, sample_rates=44100, bits=16, ch=2 I (7220) PLAY_MP3_FLASH: [ 5 ] Stop audio_pipeline E (7220) AUDIO_ELEMENT: [mp3] Element already stopped E (7220) AUDIO_ELEMENT: [i2s] Element already stopped W (7220) AUDIO_PIPELINE: There are no listener registered W (7230) AUDIO_ELEMENT: [i2s] Element has not create when AUDIO_ELEMENT_TERMINATE W (7240) AUDIO_ELEMENT: [mp3] Element has not create when AUDIO_ELEMENT_TERMINATE 切换到8311开发板可以播放,log和上面相同。 |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
1143 浏览 1 评论
582浏览 6评论
480浏览 5评论
有没有办法在不使用混杂模式的情况下实现Wifi驱动程序接收缓冲区访问中断呢?
464浏览 5评论
466浏览 4评论
441浏览 4评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 12:40 , Processed in 0.689653 second(s), Total 44, Slave 38 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号