`E (1000) AUDIO_HAL: codec init failed!` on ESP32-LyraT-Mini

j1mmy3
Posts: 2
Joined: Tue Jan 09, 2024 7:09 pm

`E (1000) AUDIO_HAL: codec init failed!` on ESP32-LyraT-Mini

Postby j1mmy3 » Tue Jan 09, 2024 10:35 pm

EDIT: Ultimately, what caused all of the confusion was simply me picking the wrong board via the `idf.py menuconfig`. After this everything compiled and I was able to run the example program. So, I guess the lesson learned was check the obvious things first. :)

I have a ESP32-LyraT-Mini audio board (it's actually my first ESP32 board)...but looking back maybe not the best choice as first board? :D but that's what I have....

I have reached Step #9 on the web page: https://docs.espressif.com/projects/esp ... the-device (the "play_mp3_control" example) and when issuing command `idf.py -p /dev/ttyUSB0 flash monitor` I get a lot of output but the concerning one is the following, this is just a snippet of it:

Code: Select all

I (590) PLAY_FLASH_MP3_CONTROL: [ 1 ] Start audio codec chip
E (600) I2C_BUS: /home/j3/esp/esp-adf-v2.6/components/esp_peripherals/driver/i2c_bus/i2c_bus.c:115 (i2c_bus_write_bytes):I2C Bus WriteReg Error
E (610) I2C_BUS: /home/j3/esp/esp-adf-v2.6/components/esp_peripherals/driver/i2c_bus/i2c_bus.c:115 (i2c_bus_write_bytes):I2C Bus WriteReg Error
1...
E (620) I2C_BUS: /home/j3/esp/esp-adf-v2.6/components/esp_peripherals/driver/i2c_bus/i2c_bus.c:115 (i2c_bus_write_bytes):I2C Bus WriteReg Error
E (970) I2C_BUS: /home/j3/esp/esp-adf-v2.6/components/esp_peripherals/driver/i2c_bus/i2c_bus.c:115 (i2c_bus_write_bytes):I2C Bus WriteReg Error
E (990) I2C_BUS: /home/j3/esp/esp-adf-v2.6/components/esp_peripherals/driver/i2c_bus/i2c_bus.c:115 (i2c_bus_write_bytes):I2C Bus WriteReg Error
E (1000) AUDIO_HAL: codec init failed!
E (1010) AUDIO_BOARD: board.c:55 (audio_board_codec_init): Got NULL Pointer
E (1010) AUDIO_HAL: audio_hal handle is null
E (1020) AUDIO_HAL: audio_hal handle is null
I (1020) PLAY_FLASH_MP3_CONTROL: [ 2 ] Create audio pipeline, add all elements to pipeline, and subscribe pipeline event
I (1030) PLAY_FLASH_MP3_CONTROL: [2.1] Create mp3 decoder to decode mp3 file and set custom read callback
...
I (1110) PLAY_FLASH_MP3_CONTROL: [4.2] Listening event from peripherals
W (1120) PLAY_FLASH_MP3_CONTROL: [ 5 ] Tap touch buttons to control music player:
W (1130) PLAY_FLASH_MP3_CONTROL:       [Play] to start, pause and resume, [Set] to stop.
W (1140) PLAY_FLASH_MP3_CONTROL:       [Vol-] or [Vol+] to adjust volume.
I (1160) PLAY_FLASH_MP3_CONTROL: [ 5.1 ] Start audio_pipeline
W (1160) AUDIO_THREAD: Make sure selected the `CONFIG_SPIRAM_BOOT_INIT` and `CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY` by `make menuconfig`
W (1110) PERIPH_TOUCH: _touch_init
I (1200) PLAY_FLASH_MP3_CONTROL: [ * ] Receive music info from mp3 decoder, sample_rates=8000, bits=16, ch=2
The make matters more difficult I am pretty new to microcontrollers in general with just some initial knowledge of Arduino and most of my knowledge is just software, hardware I struggle with....regardless, what are some things I could initially look for in solving this? What about the settings in the `idf.py menuconfig`? All I did was select:
`AudioHAL > ....ESP32-LyraT-Mini` as the board and saved. Anything else in that menu that I should look at? Other than that, what are some other things I could look for?

Who is online

Users browsing this forum: No registered users and 33 guests