### AEC Example Initialization and Setup Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/advanced_examples/aec/README.md This snippet shows the initial steps for the AEC example, including mounting the SD card, starting the codec chip, and configuring audio input. ```c I (951) main_task: Calling app_main() I (952) AEC_EXAMPLES: [1.0] Mount sdcard I (955) SDCARD: Using 1-line SD mode, base path=/sdcard I (1491) AEC_EXAMPLES: [2.0] Start codec chip W (1492) i2c_bus_v2: I2C master handle is NULL, will create new one I (1497) DRV8311: ES8311 in Slave mode I (1508) gpio: GPIO[48]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (1515) ES7210: ES7210 in Slave mode I (1524) ES7210: Enable ES7210_INPUT_MIC1 I (1527) ES7210: Enable ES7210_INPUT_MIC2 I (1529) ES7210: Enable ES7210_INPUT_MIC3 W (1533) ES7210: Enable TDM mode. ES7210_SDP_INTERFACE2_REG12: 2 I (1537) ES7210: config fmt 60 I (1540) AUDIO_HAL: Codec mode is 3, Ctrl:1 ``` -------------------------------- ### HFP Stream Example Initialization and Pipeline Setup Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/player/pipeline_hfp_stream/README.md This log output details the initialization steps for the HFP example, including Bluetooth setup, codec chip configuration, and the creation of an audio pipeline for playback. It shows the sequence of operations and the successful registration of pipeline elements. ```c rst:0x1 (POWERON_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:7204 load:0x40078000,len:13212 load:0x40080400,len:4568 0x40080400: _init at ??:? entry 0x400806f4 I (27) boot: ESP-IDF v4.2.2-1-g379ca2123 2nd stage bootloader I (27) boot: compile time 10:43:35 I (27) boot: chip revision: 3 I (31) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (38) boot.esp32: SPI Speed : 40MHz I (43) boot.esp32: SPI Mode : DIO I (47) boot.esp32: SPI Flash Size : 2MB I (52) boot: Enabling RNG early entropy source... I (57) boot: Partition Table: I (61) boot: ## Label Usage Type ST Offset Length I (68) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (76) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (83) boot: 2 factory factory app 00 00 00010000 00124f80 I (91) boot: End of partition table I (95) boot_comm: chip revision: 3, min. application chip revision: 0 I (102) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x29164 (168292) map I (175) esp_image: segment 1: paddr=0x0003918c vaddr=0x3ffbdb60 size=0x03454 ( 13396) load I (181) esp_image: segment 2: paddr=0x0003c5e8 vaddr=0x40080000 size=0x03a30 ( 14896) load 0x40080000: _WindowOverflow4 at /hengyongchao/esp-idfs/esp-idf-v4.2.2-psram/components/freertos/xtensa/xtensa_vectors.S:1730 I (188) esp_image: segment 3: paddr=0x00040020 vaddr=0x400d0020 size=0xa2e04 (667140) map 0x400d0020: _stext at ??:? I (445) esp_image: segment 4: paddr=0x000e2e2c vaddr=0x40083a30 size=0x13834 ( 79924) load 0x40083a30: esp_flash_erase_region at /hengyongchao/esp-idfs/esp-idf-v4.2.2-psram/components/spi_flash/esp_flash_api.c:313 I (492) boot: Loaded app from partition at offset 0x10000 I (493) boot: Disabling RNG early entropy source... I (493) cpu_start: Pro cpu up. I (497) cpu_start: Application information: I (501) cpu_start: Project name: pipeline_hfp_stream_example I (508) cpu_start: App version: v2.2-230-g511116d7 I (514) cpu_start: Compile time: Nov 12 2021 10:43:27 I (520) cpu_start: ELF file SHA256: 2c459d66b8a1bbd8... I (526) cpu_start: ESP-IDF: v4.2.2-1-g379ca2123 I (532) cpu_start: Starting app cpu, entry point is 0x400819ec 0x400819ec: call_start_cpu1 at /hengyongchao/esp-idfs/esp-idf-v4.2.2-psram/components/esp32/cpu_start.c:287 I (0) cpu_start: App cpu up. I (543) heap_init: Initializing. RAM available for dynamic allocation: I (549) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM I (555) heap_init: At 3FFB7468 len 00000B98 (2 KiB): DRAM I (561) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM I (568) heap_init: At 3FFCE0E8 len 00011F18 (71 KiB): DRAM I (574) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (580) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (587) heap_init: At 40097264 len 00008D9C (35 KiB): IRAM I (593) cpu_start: Pro cpu start user code I (611) spi_flash: detected chip: gd I (612) spi_flash: flash io: dio W (612) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (622) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (673) HFP_EXAMPLE: [ 1 ] init Bluetooth I (673) BTDM_INIT: BT controller compile version [ba56601] I (673) system_api: Base MAC address is not set I (683) system_api: read default base MAC address from EFUSE I (683) phy_init: phy_version 4660,0162888,Dec 23 2020 I (1413) HFP_EXAMPLE: [ 2 ] Start codec chip I (1423) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 I (1443) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (1443) ES8388_DRIVER: init,out:02, in:00 I (1453) AUDIO_HAL: Codec mode is 3, Ctrl:1 I (1453) HFP_EXAMPLE: [ 3 ] Create audio pipeline for playback I (1453) HFP_EXAMPLE: [3.1] Create i2s stream to write data to codec chip and read data from codec chip I (1463) I2S: DMA Malloc info, datalen=blocksize=1200, dma_buf_count=3 I (1473) I2S: DMA Malloc info, datalen=blocksize=1200, dma_buf_count=3 I (1503) I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11289597.000, SCLK: 1411199.625000, diva: 1, divb: 0 I (1503) LYRAT_V4_3: I2S0, MCLK output by GPIO0 W (1513) I2S: I2S driver already installed I (1513) LYRAT_V4_3: I2S0, MCLK output by GPIO0 I (1523) HFP_EXAMPLE: [3.2] Get hfp stream I (1523) HFP_STREAM: outgoing stream init I (1533) HFP_STREAM: incoming stream init I (1533) HFP_EXAMPLE: [3.2] Register all elements to audio pipeline ``` -------------------------------- ### VAD Example Initialization Log Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/speech_recognition/vad/README.md This log shows the initialization steps of the VAD example, including setting up the audio pipeline and VAD handle. It runs automatically upon starting. ```c I (0) cpu_start: App cpu up. I (367) heap_init: Initializing. RAM available for dynamic allocation: I (374) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (380) heap_init: At 3FFB3B50 len 0002C4B0 (177 KiB): DRAM I (386) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (393) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (399) heap_init: At 4008C240 len 00013DC0 (79 KiB): IRAM I (405) cpu_start: Pro cpu start user code I (424) spi_flash: detected chip: gd I (424) spi_flash: flash io: dio W (425) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (434) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (445) EXAMPLE-VAD: [ 1 ] Start codec chip I (475) EXAMPLE-VAD: [ 2 ] Create audio pipeline for recording I (475) EXAMPLE-VAD: [2.1] Create i2s stream to read audio data from codec chip I (505) EXAMPLE-VAD: [2.2] Create filter to resample audio data I (505) EXAMPLE-VAD: [2.3] Create raw to receive data I (505) EXAMPLE-VAD: [ 3 ] Register all elements to audio pipeline I (505) EXAMPLE-VAD: [ 4 ] Link elements together [codec_chip]-->i2s_stream-->filter-->raw-->[VAD] I (515) EXAMPLE-VAD: [ 5 ] Start audio_pipeline I (555) EXAMPLE-VAD: [ 6 ] Initialize VAD handle ``` -------------------------------- ### A2DP Source Stream Initialization and Pipeline Setup Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/player/pipeline_a2dp_source_stream/README.md This log output details the initialization process of the A2DP source stream example. It shows the mounting of the SD card, starting the codec chip, creating the audio pipeline elements (fatfs stream, mp3 decoder, Bluetooth stream), and linking them together. It also includes the Bluetooth A2DP enablement and peripheral setup. ```c I (1714) BLUETOOTH_SOURCE_EXAMPLE: [ 1 ] Mount sdcard I (2214) BLUETOOTH_SOURCE_EXAMPLE: [ 2 ] Start codec chip E (2214) gpio: gpio_install_isr_service(438): GPIO isr service already installed I (2234) BLUETOOTH_SOURCE_EXAMPLE: [3.0] Create audio pipeline for playback I (2234) BLUETOOTH_SOURCE_EXAMPLE: [3.1] Create fatfs stream to read data from sdcard I (2244) BLUETOOTH_SOURCE_EXAMPLE: [3.2] Create mp3 decoder to decode mp3 file I (2254) BLUETOOTH_SOURCE_EXAMPLE: [3.3] Create Bluetooth stream I (2734) BLUETOOTH_SOURCE_EXAMPLE: [3.4] Register all elements to audio pipeline W (2734) BT_BTC: A2DP Enable with AVRC I (2734) BLUETOOTH_SOURCE_EXAMPLE: [3.5] Link it together [sdcard]-->fatfs_stream-->mp3_decoder-->bt_stream-->[bt sink] I (2754) BLUETOOTH_SOURCE_EXAMPLE: [3.6] Set up uri (file as fatfs_stream, mp3 as mp3 decoder, and default output is i2s) I (2754) BLUETOOTH_SOURCE_EXAMPLE: Discovery started. I (2764) BLUETOOTH_SOURCE_EXAMPLE: [3.7] Create bt peripheral I (2774) BLUETOOTH_SOURCE_EXAMPLE: [3.8] Start bt peripheral I (2784) BLUETOOTH_SOURCE_EXAMPLE: [ 4 ] Set up event listener I (2784) BLUETOOTH_SOURCE_EXAMPLE: [4.1] Listening event from all elements of pipeline I (2794) BLUETOOTH_SOURCE_EXAMPLE: [4.2] Listening event from peripherals ``` -------------------------------- ### A2DP Source Example Log Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/player/pipeline_a2dp_source_stream/README.md This log details the initialization and setup process for the A2DP source example, including partition table information, memory allocation, and pipeline configuration. ```c entry 0x400806f4 I (27) boot: ESP-IDF v4.2.2 2nd stage bootloader I (27) boot: compile time 17:52:26 I (27) boot: chip revision: 3 I (30) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (37) boot.esp32: SPI Speed : 40MHz I (42) boot.esp32: SPI Mode : DIO I (46) boot.esp32: SPI Flash Size : 2MB I (51) boot: Enabling RNG early entropy source... I (56) boot: Partition Table: I (60) boot: ## Label Usage Type ST Offset Length I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (74) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (82) boot: 2 factory factory app 00 00 00010000 001e8480 I (89) boot: End of partition table I (94) boot_comm: chip revision: 3, min. application chip revision: 0 I (101) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x38514 (230676) map I (206) esp_image: segment 1: paddr=0x0004853c vaddr=0x3ffbdb60 size=0x03730 ( 14128) load I (213) esp_image: segment 2: paddr=0x0004bc74 vaddr=0x40080000 size=0x043a4 ( 17316) load 0x40080000: _WindowOverflow4 at /hengyongchao/esp-idfs/esp-idf-v4.2.2/components/freertos/xtensa/xtensa_vectors.S:1730 I (221) esp_image: segment 3: paddr=0x00050020 vaddr=0x400d0020 size=0xcb478 (832632) map 0x400d0020: _stext at ??:? I (569) esp_image: segment 4: paddr=0x0011b4a0 vaddr=0x400843a4 size=0x1a32c (107308) load 0x400843a4: psram_enable at /hengyongchao/esp-idfs/esp-idf-v4.2.2/components/esp32/spiram_psram.c:950 I (637) boot: Loaded app from partition at offset 0x10000 I (637) boot: Disabling RNG early entropy source... I (638) psram: This chip is ESP32-D0WD I (644) spiram: Found 64MBit SPI RAM device I (647) spiram: SPI RAM mode: flash 40m sram 40m I (652) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (660) cpu_start: Pro cpu up. I (663) cpu_start: Application information: I (668) cpu_start: Project name: bt_source_demo I (674) cpu_start: App version: v2.2-201-g6fa02923 I (680) cpu_start: Compile time: Sep 30 2021 17:55:05 I (686) cpu_start: ELF file SHA256: db1edda26abcb241... I (692) cpu_start: ESP-IDF: v4.2.2 I (696) cpu_start: Starting app cpu, entry point is 0x4008206c 0x4008206c: call_start_cpu1 at /hengyongchao/esp-idfs/esp-idf-v4.2.2/components/esp32/cpu_start.c:287 I (690) cpu_start: App cpu up. I (1591) spiram: SPI SRAM memory test OK I (1592) heap_init: Initializing. RAM available for dynamic allocation: I (1592) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM I (1598) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM I (1604) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM I (1610) heap_init: At 3FFC33E0 len 0001CC20 (115 KiB): DRAM I (1617) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (1623) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (1630) heap_init: At 4009E6D0 len 00001930 (6 KiB): IRAM I (1636) cpu_start: Pro cpu start user code I (1641) spiram: Adding pool of 4096K of external SPI memory to heap allocator I (1662) spi_flash: detected chip: gd I (1663) spi_flash: flash io: dio W (1663) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (1673) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (1684) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations I (1714) BLUETOOTH_SOURCE_EXAMPLE: [ 1 ] Mount sdcard I (2214) BLUETOOTH_SOURCE_EXAMPLE: [ 2 ] Start codec chip E (2214) gpio: gpio_install_isr_service(438): GPIO isr service already installed I (2234) BLUETOOTH_SOURCE_EXAMPLE: [3.0] Create audio pipeline for playback I (2234) BLUETOOTH_SOURCE_EXAMPLE: [3.1] Create fatfs stream to read data from sdcard I (2244) BLUETOOTH_SOURCE_EXAMPLE: [3.2] Create mp3 decoder to decode mp3 file I (2254) BLUETOOTH_SOURCE_EXAMPLE: [3.3] Create Bluetooth stream I (2734) BLUETOOTH_SOURCE_EXAMPLE: [3.4] Register all elements to audio pipeline W (2734) BT_BTC: A2DP Enable with AVRC I (2734) BLUETOOTH_SOURCE_EXAMPLE: [3.5] Link it together [sdcard]-->fatfs_stream-->mp3_decoder-->bt_stream-->[bt sink] I (2754) BLUETOOTH_SOURCE_EXAMPLE: [3.6] Set up uri (file as fatfs_stream, mp3 as mp3 decoder, and default output is i2s) I (2754) BLUETOOTH_SOURCE_EXAMPLE: Discovery started. I (2764) BLUETOOTH_SOURCE_EXAMPLE: [3.7] Create bt peripheral I (2774) BLUETOOTH_SOURCE_EXAMPLE: [3.8] Start bt peripheral I (2784) BLUETOOTH_SOURCE_EXAMPLE: [ 4 ] Set up event listener I (2784) BLUETOOTH_SOURCE_EXAMPLE: [4.1] Listening event from all elements of pipeline I (2794) BLUETOOTH_SOURCE_EXAMPLE: [4.2] Listening event from peripherals I (2804) BLUETOOTH_SOURCE_EXAMPLE: [ 5 ] Start audio_pipeline I (2814) BLUETOOTH_SOURCE_EXAMPLE: [ 6 ] Listen for all pipeline events ``` -------------------------------- ### SD Card MP3 Player Initialization and Setup Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/player/pipeline_sdcard_mp3_control/README.md This log shows the initialization process of the SD card MP3 control example, including peripheral setup, SD card scanning, codec initialization, and audio pipeline creation. It details the linking of various audio elements for playback. ```c I (0) cpu_start: App cpu up. I (398) heap_init: Initializing. RAM available for dynamic allocation: I (405) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (411) heap_init: At 3FFB2BB0 len 0002D450 (181 KiB): DRAM I (417) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (424) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (430) heap_init: At 4008E128 len 00011ED8 (71 KiB): IRAM I (436) cpu_start: Pro cpu start user code I (454) spi_flash: detected chip: gd I (455) spi_flash: flash io: dio W (455) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header. I (465) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (476) SDCARD_MP3_CONTROL_EXAMPLE: [1.0] Initialize peripherals management I (486) SDCARD_MP3_CONTROL_EXAMPLE: [1.1] Initialize and start peripherals W (516) PERIPH_TOUCH: _touch_init I (996) SDCARD_MP3_CONTROL_EXAMPLE: [1.2] Set up a sdcard playlist and scan sdcard music save to it I (1776) SDCARD_MP3_CONTROL_EXAMPLE: [ 2 ] Start codec chip E (1776) gpio: gpio_install_isr_service(438): GPIO isr service already installed I (1816) SDCARD_MP3_CONTROL_EXAMPLE: [ 3 ] Create and start input key service I (1816) SDCARD_MP3_CONTROL_EXAMPLE: [4.0] Create audio pipeline for playback I (1816) SDCARD_MP3_CONTROL_EXAMPLE: [4.1] Create i2s stream to write data to codec chip I (1856) SDCARD_MP3_CONTROL_EXAMPLE: [4.2] Create mp3 decoder to decode mp3 file I (1856) SDCARD_MP3_CONTROL_EXAMPLE: [4.3] Create resample filter I (1866) SDCARD_MP3_CONTROL_EXAMPLE: [4.4] Create fatfs stream to read data from sdcard I (1886) SDCARD_MP3_CONTROL_EXAMPLE: [4.5] Register all elements to audio pipeline I (1886) SDCARD_MP3_CONTROL_EXAMPLE: [4.6] Link it together [sdcard]-->fatfs_stream-->mp3_decoder-->resample-->i2s_stream-->[codec_chip] I (1896) SDCARD_MP3_CONTROL_EXAMPLE: [5.0] Set up event listener I (1896) SDCARD_MP3_CONTROL_EXAMPLE: [5.1] Listen for all pipeline events W (1906) SDCARD_MP3_CONTROL_EXAMPLE: [ 6 ] Press the keys to control music player: W (1916) SDCARD_MP3_CONTROL_EXAMPLE: [Play] to start, pause and resume, [Set] next song. W (1936) SDCARD_MP3_CONTROL_EXAMPLE: [Vol-] or [Vol+] to adjust volume. ``` -------------------------------- ### Flash Tone Example Log Output Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/player/pipeline_flash_tone/README.md This log output shows the boot process and the execution of the flash tone example. It includes partition table information and audio pipeline setup. Ensure the `/tools/audio-esp.bin` is flashed to the `flashTone` partition before running. ```c ets Jul 29 2019 12:21:46 rst:0x1 (POWERON_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:7204 load:0x40078000,len:13212 load:0x40080400,len:4568 0x40080400: _init at ??:? entry 0x400806f4 I (27) boot: ESP-IDF v4.2.2-1-g379ca2123 2nd stage bootloader I (27) boot: compile time 17:06:12 I (27) boot: chip revision: 3 I (31) boot_comm: chip revision: 3, min. bootloader chip revision: 0 I (38) boot.esp32: SPI Speed : 40MHz I (43) boot.esp32: SPI Mode : DIO I (47) boot.esp32: SPI Flash Size : 4MB I (52) boot: Enabling RNG early entropy source... I (57) boot: Partition Table: I (61) boot: ## Label Usage Type ST Offset Length I (68) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (76) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (83) boot: 2 factory factory app 00 00 00010000 00100000 I (91) boot: 3 flash_tone Unknown data 01 ff 00110000 0007d000 I (98) boot: End of partition table I (102) boot_comm: chip revision: 3, min. application chip revision: 0 I (110) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0e7dc ( 59356) map I (141) esp_image: segment 1: paddr=0x0001e804 vaddr=0x3ffb0000 size=0x01814 ( 6164) load I (144) esp_image: segment 2: paddr=0x00020020 vaddr=0x400d0020 size=0x26c3c (158780) map 0x400d0020: _stext at ??:? I (208) esp_image: segment 3: paddr=0x00046c64 vaddr=0x3ffb1814 size=0x00950 ( 2384) load I (210) esp_image: segment 4: paddr=0x000475bc vaddr=0x40080000 size=0x0c5a8 ( 50600) load 0x40080000: _WindowOverflow4 at /workshop/esp-idfs/esp-idf-v4.2.2-psram/components/freertos/xtensa/xtensa_vectors.S:1730 I (244) boot: Loaded app from partition at offset 0x10000 I (244) boot: Disabling RNG early entropy source... I (245) cpu_start: Pro cpu up. I (248) cpu_start: Application information: I (253) cpu_start: Project name: play_tone_mp3 I (259) cpu_start: App version: v2.2-230-ga154afdc I (264) cpu_start: Compile time: Nov 11 2021 17:06:06 I (271) cpu_start: ELF file SHA256: a51574fed039918d... I (276) cpu_start: ESP-IDF: v4.2.2-1-g379ca2123 I (282) cpu_start: Starting app cpu, entry point is 0x40081708 0x40081708: call_start_cpu1 at /workshop/esp-idfs/esp-idf-v4.2.2-psram/components/esp32/cpu_start.c:287 I (0) cpu_start: App cpu up. I (293) heap_init: Initializing. RAM available for dynamic allocation: I (300) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (306) heap_init: At 3FFB29E0 len 0002D620 (181 KiB): DRAM I (312) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (318) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (325) heap_init: At 4008C5A8 len 00013A58 (78 KiB): IRAM I (331) cpu_start: Pro cpu start user code I (349) spi_flash: detected chip: gd I (350) spi_flash: flash io: dio W (350) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (360) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (371) TONE_MP3_EXAMPLE: [ 1 ] Start codec chip I (401) TONE_MP3_EXAMPLE: [2.0] Create audio pipeline for playback I (401) TONE_MP3_EXAMPLE: [2.1] Create tone stream to read data from flash I (401) TONE_MP3_EXAMPLE: [2.2] Create i2s stream to write data to codec chip I (431) TONE_MP3_EXAMPLE: [2.3] Create mp3 decoder to decode mp3 file I (431) TONE_MP3_EXAMPLE: [2.4] Register all elements to audio pipeline I (441) TONE_MP3_EXAMPLE: [2.5] Link it together [flash]-->tone_stream-->mp3_decoder-->i2s_stream-->[codec_chip] I (451) TONE_MP3_EXAMPLE: [2.6] Set up uri (file as tone_stream, mp3 as mp3 decoder, and default output is i2s) I (461) TONE_MP3_EXAMPLE: [ 3 ] Set up event listener I (461) TONE_MP3_EXAMPLE: [3.1] Listening event from all elements of pipeline I (471) TONE_MP3_EXAMPLE: [ 4 ] Start audio_pipeline I (491) TONE_MP3_EXAMPLE: [ 4 ] Listen for all pipeline events I (491) TONE_MP3_EXAMPLE: [ * ] Receive music info from mp3 decoder, sample_rates=48000, bits=16, ch=1 W (721) TONE_STREAM: No more data,ret:0 ,info.byte_pos:7056 W (1231) TONE_MP3_EXAMPLE: [ * ] Stop event received I (1231) TONE_MP3_EXAMPLE: [ 5 ] Stop audio_pipeline E (1231) AUDIO_ELEMENT: [tone] Element already stopped E (1241) AUDIO_ELEMENT: [mp3] Element already stopped E (1241) AUDIO_ELEMENT: [i2s] Element already stopped W (1251) AUDIO_PIPELINE: There are no listener registered W (1251) AUDIO_ELEMENT: [tone] Element has not create when AUDIO_ELEMENT_TERMINATE ``` -------------------------------- ### Build and Flash AEC Example Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/advanced_examples/aec/README.md Builds the project, flashes it to the board, and starts the serial monitor. Replace 'PORT' with your board's serial port. Exit the monitor with Ctrl+]. ```bash idf.py -p PORT flash monitor ``` -------------------------------- ### Example Log Output Source: https://github.com/espressif/esp-adf/blob/release/v2.x/examples/advanced_examples/flexible_pipeline/README.md This log shows the boot process and initialization of the flexible pipeline for audio playback. It details partition table information, memory allocation, and audio codec setup. ```c entry 0x400806f4 I (27) boot: ESP-IDF v4.2.2 2nd stage bootloader I (27) boot: compile time 17:38:17 I (27) boot: chip revision: 3 I (30) boot.esp32: SPI Speed : 80MHz I (35) boot.esp32: SPI Mode : DIO I (39) boot.esp32: SPI Flash Size : 4MB I (44) boot: Enabling RNG early entropy source... I (49) boot: Partition Table: I (53) boot: ## Label Usage Type ST Offset Length I (60) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (68) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (75) boot: 2 factory factory app 00 00 00010000 00300000 I (83) boot: End of partition table I (87) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1de10 (122384) map I (135) esp_image: segment 1: paddr=0x0002de38 vaddr=0x3ffb0000 size=0x021c4 ( 8644) load I (138) esp_image: segment 2: paddr=0x00030004 vaddr=0x40080000 size=0x00014 ( 20) load 0x40080000: _WindowOverflow4 at /hengyongchao/audio/esp-idfs/esp-idf-v4.2.2/components/freertos/xtensa/xtensa_vectors.S:1730 I (142) esp_image: segment 3: paddr=0x00030020 vaddr=0x400d0020 size=0x51f68 (335720) map 0x400d0020: _stext at ??:? I (258) esp_image: segment 4: paddr=0x00081f90 vaddr=0x40080014 size=0x0df14 ( 57108) load 0x40080014: _WindowOverflow4 at /hengyongchao/audio/esp-idfs/esp-idf-v4.2.2/components/freertos/xtensa/xtensa_vectors.S:1734 I (288) boot: Loaded app from partition at offset 0x10000 I (288) boot: Disabling RNG early entropy source... I (288) psram: This chip is ESP32-D0WD I (293) spiram: Found 64MBit SPI RAM device I (297) spiram: SPI RAM mode: flash 80m sram 80m I (303) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (310) cpu_start: Pro cpu up. I (314) cpu_start: Application information: I (319) cpu_start: Project name: flexible_pipeline I (324) cpu_start: App version: v2.2-210-g86396c1f-dirty I (331) cpu_start: Compile time: Nov 2 2021 17:38:18 I (337) cpu_start: ELF file SHA256: 9018ad4a70009e78... I (343) cpu_start: ESP-IDF: v4.2.2 I (348) cpu_start: Starting app cpu, entry point is 0x40081d74 0x40081d74: call_start_cpu1 at /hengyongchao/audio/esp-idfs/esp-idf-v4.2.2/components/esp32/cpu_start.c:287 I (0) cpu_start: App cpu up. I (846) spiram: SPI SRAM memory test OK I (846) heap_init: Initializing. RAM available for dynamic allocation: I (846) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (852) heap_init: At 3FFB2C18 len 0002D3E8 (180 KiB): DRAM I (858) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (865) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (871) heap_init: At 4008DF28 len 000120D8 (72 KiB): IRAM I (877) cpu_start: Pro cpu start user code I (882) spiram: Adding pool of 4092K of external SPI memory to heap allocator I (903) spi_flash: detected chip: gd I (903) spi_flash: flash io: dio W (903) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header. I (913) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (928) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations I (956) SDCARD: Using 1-line SD mode, 4-line SD mode, base path=/sdcard I (1001) SDCARD: CID name SD16G! I (1456) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 E (1456) gpio: gpio_install_isr_service(438): GPIO isr service already installed I (1461) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 I (1472) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 I (1492) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (1492) ES8388_DRIVER: init,out:02, in:00 W (1497) PERIPH_TOUCH: _touch_init I (1512) AUDIO_HAL: Codec mode is 3, Ctrl:1 I (1522) FLEXIBLE_PIPELINE: [ 1 ] Create all audio elements for playback pipeline I (1522) MP3_DECODER: MP3 init I (1523) I2S: DMA Malloc info, datalen=blocksize=1200, dma_buf_count=3 I (1530) I2S: DMA Malloc info, datalen=blocksize=1200, dma_buf_count=3 I (1554) I2S: APLL: Req RATE: 44100, real rate: 44099.988, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11289597.000, SCLK: 1411199.625000, diva: 1, divb: 0 I (1557) LYRAT_V4_3: I2S0, MCLK output by GPIO0 I (1562) FLEXIBLE_PIPELINE: [ 2 ] Register all audio elements to playback pipeline I (1571) FLEXIBLE_PIPELINE: [ 3 ] Set up event listener I (1578) FLEXIBLE_PIPELINE: [3.1] Set up i2s clock I (1599) I2S: APLL: Req RATE: 48000, real rate: 47999.961, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 12287990.000, SCLK: 1535998.750000, diva: 1, divb: 0 I (1602) FLEXIBLE_PIPELINE: [ 4 ] Start playback pipeline I (1609) AUDIO_PIPELINE: link el->rb, el:0x3f807c50, tag:file_aac_reader, rb:0x3f808604 ```