espressif / esp-adf

Espressif Audio Development Framework
Other
1.54k stars 677 forks source link

Runtime error in VoIP example in an ESP32 -LyraT-Mini_V1.2 : ***ERROR*** A stack overflow in task OUT_iis has been detected (AUD-5266) #1168

Closed migmelccs closed 6 months ago

migmelccs commented 6 months ago

Hello, I have been trying to run the VoIP example and cannot success in make it to behave as it is suppose to. First I used ESP-IDF v5.2.1 combined with ESP-ADF master. There is a runtime problem because of mixing between deprecated i2s.h and the new headers i2s_std.h, etc., that depend on the framework and there is nothing I can do, unless I modify the ESP-IDF files. Looks like ESP-IDF uses the new i2s headers and ESP-ADF (stream.h or so) still uses the deprecated one. Then I had to moved to ESP-IDF v4.4.7 combined with esp-adf-master, followed all the recommended in the README file, but a new problem arose (as shown in the title) even when I applied the recommended patch idf_v4.4_freertos.patch as suggested. I have been able to make calls using FreeSWITCH and Zoiper client for testing, however, the device keeps rebooting so frequently that is impossible to make it stable. please help me to solve this issue. Here are the logs. I will provide any other information if needed:

E:\idf-v4.4.7\esp-adf-master\examples\protocols\voip0>idf.py -p com12 monitor Executing action: monitor Running idf_monitor in directory E:\idf-v4.4.7\esp-adf-master\examples\protocols\voip0 Executing "E:\tools-v4.4.7\python_env\idf4.4_py3.11_env\Scripts\python.exe E:\idf-v4.4.7\tools/idf_monitor.py -p com12 -b 115200 --toolchain-prefix xtensa-esp32-elf- --target esp32 --revision 0 E:\idf-v4.4.7\esp-adf-master\examples\protocols\voip0\build\voip_app.elf -m 'E:\tools-v4.4.7\python_env\idf4.4_py3.11_env\Scripts\python.exe' 'E:\idf-v4.4.7\tools\idf.py' '-p' 'com12'"... --- idf_monitor on com12 115200 --- --- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H --- D:0,�ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (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:1 load:0x3fff0030,len:7004 ho 0 tail 12 room 4 load:0x40078000,len:15784 ho 0 tail 12 room 4 load:0x40080400,len:4536 0x40080400: _init at ??:?

entry 0x400806bc I (31) boot: ESP-IDF v4.4.7-dirty 2nd stage bootloader I (31) boot: compile time 18:00:31 I (31) boot: Multicore bootloader I (35) boot: chip revision: v3.1 I (39) qio_mode: Enabling default flash chip QIO I (44) boot.esp32: SPI Speed : 80MHz I (49) boot.esp32: SPI Mode : QIO I (53) boot.esp32: SPI Flash Size : 8MB I (58) boot: Enabling RNG early entropy source... I (63) boot: Partition Table: I (67) boot: ## Label Usage Type ST Offset Length I (74) boot: 0 nvs WiFi data 01 02 00009000 00006000 I (81) boot: 1 phy_init RF data 01 01 0000f000 00001000 I (89) boot: 2 factory factory app 00 00 00010000 00200000 I (96) boot: 3 flash_tone Unknown data 01 ff 00210000 0007d000 I (104) boot: End of partition table I (108) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=35dd0h (220624) map I (177) esp_image: segment 1: paddr=00045df8 vaddr=3ffb0000 size=04b50h ( 19280) load I (183) esp_image: segment 2: paddr=0004a950 vaddr=40080000 size=056c8h ( 22216) load I (191) esp_image: segment 3: paddr=00050020 vaddr=400d0020 size=f0d80h (986496) map I (463) esp_image: segment 4: paddr=00140da8 vaddr=400856c8 size=11578h ( 71032) load I (498) boot: Loaded app from partition at offset 0x10000 I (498) boot: Disabling RNG early entropy source... I (510) cpu_start: Multicore app I (510) psram: This chip is ESP32-D0WD I (510) spiram: Found 64MBit SPI RAM device I (512) spiram: SPI RAM mode: flash 80m sram 80m I (517) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (524) cpu_start: Pro cpu up. I (528) cpu_start: Starting app cpu, entry point is 0x40081534 0x40081534: call_start_cpu1 at E:/idf-v4.4.7/components/esp_system/port/cpu_start.c:151

I (0) cpu_start: App cpu up. I (1030) spiram: SPI SRAM memory test OK I (1039) cpu_start: Pro cpu start user code I (1039) cpu_start: cpu freq: 240000000 I (1039) cpu_start: Application information: I (1042) cpu_start: Project name: voip_app I (1047) cpu_start: App version: v2.6-82-g33ba0c5c-dirty I (1053) cpu_start: Compile time: Mar 11 2024 17:59:48 I (1059) cpu_start: ELF file SHA256: 359700a4c2370f47... I (1065) cpu_start: ESP-IDF: v4.4.7-dirty I (1071) cpu_start: Min chip rev: v0.0 I (1076) cpu_start: Max chip rev: v3.99 I (1081) cpu_start: Chip rev: v3.1 I (1085) heap_init: Initializing. RAM available for dynamic allocation: I (1093) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (1099) heap_init: At 3FFB62B8 len 00029D48 (167 KiB): DRAM I (1105) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (1112) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (1118) heap_init: At 40096C40 len 000093C0 (36 KiB): IRAM I (1125) spiram: Adding pool of 4082K of external SPI memory to heap allocator I (1133) spi_flash: detected chip: gd I (1137) spi_flash: flash io: qio I (1141) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (1156) spiram: Reserving pool of 18K of internal memory for DMA/internal allocations I (1164) VoIP_EXAMPLE: Func:app_main, Line:149, MEM Total:4430843 Bytes, Inter:307379 Bytes, Dram:270359 Bytes

I (1191) VoIP_EXAMPLE: [1.0] Initialize peripherals management I (1191) VoIP_EXAMPLE: [1.1] Initialize and start peripherals I (1194) AUDIO_THREAD: The button_task task allocate stack on internal memory I (1200) AUDIO_THREAD: The esp_periph task allocate stack on internal memory I (1208) VoIP_EXAMPLE: [1.2] Create and start input key service I (1215) AUDIO_THREAD: The input_key_service task allocate stack on external memory I (1223) VoIP_EXAMPLE: [ 2 ] Initialize av stream I (1229) I2S: DMA Malloc info, datalen=blocksize=128, dma_buf_count=8 I (1236) I2S: DMA Malloc info, datalen=blocksize=128, dma_buf_count=8 I (1243) I2S: I2S0, MCLK output by GPIO0 I (1253) DRV8311: ES8311 in Slave mode I (1266) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 W (1311) I2C_BUS: I2C bus has been already created, [port:0] I (1315) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=8 I (1315) I2S: DMA Malloc info, datalen=blocksize=256, dma_buf_count=8 I (1320) I2S: I2S1, MCLK output by GPIO0 I (1325) AUDIO_HAL: Codec mode is 3, Ctrl:1 I (1337) VoIP_EXAMPLE: [ 3 ] Initialize tone player I (1338) AUDIO_THREAD: The media_task task allocate stack on external memory I (1343) ESP_AUDIO_TASK: media_ctrl_task running...,0x3f805464

----------------------------- ESP Audio Platform ----------------------------- | | | ESP_AUDIO-v1.7.3-22-ga3cf4e4-9f1d1e8-e2f9463 | | Compile date: Feb 5 2024-12:23:16 |

I (1384) ESP_AUDIO_CTRL: Func:media_ctrl_create, Line:355, MEM Total:4402391 Bytes, Inter:282047 Bytes, Dram:245027 Bytes

I (1397) MP3_DECODER: MP3 init E (1400) I2S: register I2S object to platform failed I (1406) I2S: I2S0, MCLK output by GPIO0 E (1410) I2S_STREAM: i2s_set_clk failed, type = 2,port:0 I (1416) VoIP_EXAMPLE: [ 4 ] Create Wi-Fi service instance E (1423) DISPATCHER: exe first list: 0x0 I (1427) DISPATCHER: dispatcher_event_task is running... I (1433) AUDIO_THREAD: The esp_dispatcher task allocate stack on internal memory I (1444) AUDIO_THREAD: The wifi_serv task allocate stack on external memory I (1452) wifi:wifi driver task: 3ffcb404, prio:23, stack:6656, core=0 I (1455) system_api: Base MAC address is not set I (1460) system_api: read default base MAC address from EFUSE I (1469) wifi:wifi firmware version: 1fd20f4 I (1471) wifi:wifi certification version: v7.0 I (1475) wifi:config NVS flash: enabled I (1478) wifi:config nano formating: disabled I (1483) wifi:Init data frame dynamic rx buffer num: 128 I (1488) wifi:Init static rx mgmt buffer num: 5 I (1492) wifi:Init management short buffer num: 32 I (1496) wifi:Init static tx buffer num: 9 I (1501) wifi:Init tx cache buffer num: 32 I (1504) wifi:Init static rx buffer size: 1600 I (1508) wifi:Init static rx buffer num: 9 I (1512) wifi:Init dynamic rx buffer num: 128 I (1517) wifi_init: rx ba win: 16 I (1520) wifi_init: tcpip mbox: 64 I (1524) wifi_init: udp mbox: 64 I (1528) wifi_init: tcp mbox: 64 I (1532) wifi_init: tcp tx win: 65535 I (1536) wifi_init: tcp rx win: 65535 I (1540) wifi_init: tcp mss: 1440 I (1544) wifi_init: WiFi/LWIP prefer SPIRAM I (1550) phy_init: phy_version 4791,2c4672b,Dec 20 2023,16:06:06 I (1620) wifi:mode : sta (a0:a3:b3:8b:48:e4) I (1621) wifi:enable tsf I (1630) WIFI_SERV: Connect to wifi ssid: rebit-mesh, pwd: XXXXXXXXXX I (1636) wifi:new:<1,0>, old:<1,0>, ap:<255,255>, sta:<1,0>, prof:1 I (1806) wifi:state: init -> auth (b0) I (1810) wifi:state: auth -> assoc (0) I (1814) wifi:state: assoc -> run (10) I (1840) wifi:connected with rebit-mesh, aid = 4, channel 1, BW20, bssid = fc:7f:f1:4c:da:22 I (1841) wifi:security: WPA2-PSK, phy: bgn, rssi: -54 I (1843) wifi:pm start, type: 1

W (1847) WIFI_SERV: WiFi Event cb, Unhandle event_base:WIFI_EVENT, event_id:4 I (1851) wifi:AP's beacon interval = 102400 us, DTIM period = 1 I (1861) wifi:idx:0 (ifx:0, fc:7f:f1:4c:da:22), tid:0, ssn:2, winSize:64 I (2627) AUDIO_SYS: | Task | Run Time | Per | Prio | HWM | State | CoreId | Stack I (2628) AUDIO_SYS: | main | 2268 | 0% | 1 | 1504 | Running | 0 | Intr I (2637) AUDIO_SYS: | IDLE1 | 1163031 |49% | 0 | 3472 | Ready | 1 | Intr I (2648) AUDIO_SYS: | IDLE0 | 746896 |31% | 0 | 3484 | Ready | 0 | Intr I (2658) AUDIO_SYS: | esp_periph | 2816 | 0% | 5 | 2180 | Blocked | 0 | Intr I (2668) AUDIO_SYS: | button_task | 22634 | 0% | 10 | 1660 | Blocked | 0 | Intr I (2679) AUDIO_SYS: | tiT | 3638 | 0% | 18 | 2940 | Blocked | 7fffffff | Intr I (2689) AUDIO_SYS: | esp_dispatcher | 40119 | 1% | 10 | 2308 | Blocked | 0 | Intr I (2699) AUDIO_SYS: | Tmr Svc | 0 | 0% | 1 | 7604 | Blocked | 0 | Intr I (2710) AUDIO_SYS: | ipc0 | 0 | 0% | 1 | 948 | Blocked | 0 | Intr I (2720) AUDIO_SYS: | input_key_servi | 0 | 0% | 5 | 3448 | Blocked | 1 | Extr I (2730) AUDIO_SYS: | media_task | 0 | 0% | 6 | 2084 | Blocked | 0 | Extr I (2741) AUDIO_SYS: | ipc1 | 9855 | 0% | 24 | 968 | Blocked | 1 | Intr I (2751) AUDIO_SYS: | sys_evt | 6266 | 0% | 20 | 2936 | Blocked | 0 | Intr I (2761) AUDIO_SYS: | wifi | 351346 |14% | 23 | 6016 | Blocked | 0 | Intr I (2772) AUDIO_SYS: | wifi_serv | 1002 | 0% | 6 | 2156 | Blocked | 0 | Extr I (2782) AUDIO_SYS: | esp_timer | 1573 | 0% | 22 | 3556 | Suspended | 0 | Intr

I (2793) VoIP_EXAMPLE: Func:app_main, Line:209, MEM Total:4281831 Bytes, Inter:228387 Bytes, Dram:191367 Bytes

I (2848) esp_netif_handlers: sta ip: 192.168.130.111, mask: 255.255.255.0, gw: 192.168.130.254 I (2850) WIFI_SERV: Got ip:192.168.130.111 W (2854) WIFI_SERV: STATE type:2, pdata:0x0, len:0 I (2873) VoIP_EXAMPLE: PERIPH_WIFI_CONNECTED [104] I (2874) VoIP_EXAMPLE: [ 5 ] Create SIP Service I (2874) ESP_RTC_CORE: esp_rtc ver: 1.1.0 compile date: Feb 5 2024-12:23:15 I (2882) SIP: Conecting... I (2884) ESP_RTC_CORE: esp_rtc_init done W (2885) SIP: CHANGE STATE FROM 0, TO 1, :func: sip_connect:1835 I (2896) SIP: [1970-01-01/00:00:00]=======WRITE 0606 bytes>> I (2902) SIP:

REGISTER sip:192.168.130.156:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.130.111:11818;branch=z9hG4bK-471737521;rport From: sip:1000@192.168.130.156:5060;tag=-2013164762 To: sip:1000@192.168.130.156:5060 Contact: sip:1000@192.168.130.111:11818;transport=UDP Max-Forwards: 70 Call-ID: BE01B6194515B0484EF1EA41F1099575CF5EAABD0C8A CSeq: 1 REGISTER Expires: 3600 User-Agent: ESP32 SIP/2.0 Content-Length: 0 Allow: INVITE, ACK, CANCEL, BYE, UPDATE, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri Allow-Events: presence, kpml

I (2959) SIP: [1970-01-01/00:00:00]=======================>> I (2986) SIP: [1970-01-01/00:00:00]<<=====READ 0669 bytes== I (2987) SIP:

SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.130.111:11818;branch=z9hG4bK-471737521;rport=11818 From: sip:1000@192.168.130.156:5060;tag=-2013164762 To: sip:1000@192.168.130.156:5060;tag=tQDp5HjvmHFNa Call-ID: BE01B6194515B0484EF1EA41F1099575CF5EAABD0C8A CSeq: 1 REGISTER User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-cab1565 2010-05-18 10-42-16 -0400 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE Supported: timer, precondition, path, replaces WWW-Authenticate: Digest realm="192.168.130.156", nonce="9d2a219a-0a0f-42b0-a9f7-c6fa46992812", algorithm=MD5, qop="auth" Content-Length: 0

I (3044) SIP: [1970-01-01/00:00:01]<<====================== I (3051) SIP: Required authentication I (3056) SIP: [1970-01-01/00:00:01]=======WRITE 0856 bytes>> I (3061) SIP:

REGISTER sip:192.168.130.156:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.130.111:11818;branch=z9hG4bK-382461329;rport From: sip:1000@192.168.130.156:5060;tag=668958499 To: sip:1000@192.168.130.156:5060 Contact: sip:1000@192.168.130.111:11818;transport=UDP Max-Forwards: 70 Call-ID: BE01B6194515B0484EF1EA41F1099575CF5EAABD0C8A CSeq: 2 REGISTER Expires: 3600 User-Agent: ESP32 SIP/2.0 Content-Length: 0 Allow: INVITE, ACK, CANCEL, BYE, UPDATE, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri Allow-Events: presence, kpml Authorization: Digest username="1000", realm="192.168.130.156", nonce="9d2a219a-0a0f-42b0-a9f7-c6fa46992812", uri="sip:192.168.130.156:5060", response="d11218f7663c087be5b9a9327aaf5b9b", algorithm=MD5, qop=auth, nc=00000001, cnonce="71b65a079b283894"

I (3139) SIP: [1970-01-01/00:00:01]=======================>> W (6148) SIP: Retransmit again I (6148) SIP: [1970-01-01/00:00:02]=======WRITE 0856 bytes>> I (6148) SIP:

REGISTER sip:192.168.130.156:5060 SIP/2.0 Via: SIP/2.0/UDP 192.168.130.111:11818;branch=z9hG4bK-382461329;rport From: sip:1000@192.168.130.156:5060;tag=668958499 To: sip:1000@192.168.130.156:5060 Contact: sip:1000@192.168.130.111:11818;transport=UDP Max-Forwards: 70 Call-ID: BE01B6194515B0484EF1EA41F1099575CF5EAABD0C8A CSeq: 2 REGISTER Expires: 3600 User-Agent: ESP32 SIP/2.0 Content-Length: 0 Allow: INVITE, ACK, CANCEL, BYE, UPDATE, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri Allow-Events: presence, kpml Authorization: Digest username="1000", realm="192.168.130.156", nonce="9d2a219a-0a0f-42b0-a9f7-c6fa46992812", uri="sip:192.168.130.156:5060", response="d11218f7663c087be5b9a9327aaf5b9b", algorithm=MD5, qop=auth, nc=00000001, cnonce="71b65a079b283894"

I (6225) SIP: [1970-01-01/00:00:02]=======================>> I (6359) SIP: [1970-01-01/00:00:02]<<=====READ 0641 bytes== I (6359) SIP:

SIP/2.0 200 OK Via: SIP/2.0/UDP 192.168.130.111:11818;branch=z9hG4bK-382461329;rport=11818 From: sip:1000@192.168.130.156:5060;tag=668958499 To: sip:1000@192.168.130.156:5060;tag=U06e7c3ZHt57N Call-ID: BE01B6194515B0484EF1EA41F1099575CF5EAABD0C8A CSeq: 2 REGISTER Contact: sip:1000@192.168.130.111:11818;transport=UDP;expires=3600 Date: Mon, 12 Mar 2024 02:01:09 GMT User-Agent: FreeSWITCH-mod_sofia/1.0.head-git-cab1565 2010-05-18 10-42-16 -0400 Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE Supported: timer, precondition, path, replaces Content-Length: 0

I (6414) SIP: [1970-01-01/00:00:02]<<====================== I (6421) SIP_SERVICE: ESP_RTC_EVENT_REGISTERED I (6425) ESP_AUDIO_CTRL: Enter play procedure, src:0 I (6431) ESP_AUDIO_CTRL: Play procedure, URL is ok, src:0 I (6437) ESP_AUDIO_CTRL: Request_CMD_Queue CMD:0, Available:5, que:0x3ffc5b34 I (6445) ESP_AUDIO_CTRL: Func:_ctrl_play, Line:776, MEM Total:4259559 Bytes, Inter:227203 Bytes, Dram:190183 Bytes

I (6457) ESP_AUDIO_TASK: It's a decoder I (6461) ESP_AUDIO_TASK: 1.CUR IN:[IN_flash],CODEC:[DEC_mp3],RESAMPLE:[8000],OUT:[OUT_iis],rate:0,ch:0,pos:0 I (6472) ESP_AUDIO_TASK: 2.Handles,IN:0x3f806724,CODEC:0x3f8068bc,FILTER:0x3f81beb4,OUT:0x3f806a70 I (6481) ESP_AUDIO_TASK: 2.2 Update all pipeline I (6486) ESP_AUDIO_TASK: 2.3 Linked new pipeline I (6492) AUDIO_PIPELINE: link el->rb, el:0x3f806724, tag:IN_flash, rb:0x3f81c28c I (6500) AUDIO_PIPELINE: link el->rb, el:0x3f8068bc, tag:DEC_mp3, rb:0x3f81ead4 I (6508) AUDIO_PIPELINE: link el->rb, el:0x3f81beb4, tag:Audio_forge, rb:0x3f820b1c I (6516) ESP_AUDIO_TASK: 3. Previous starting... I (6521) AUDIO_THREAD: The IN_flash task allocate stack on internal memory I (6529) AUDIO_THREAD: The DEC_mp3 task allocate stack on external memory I (6530) TONE_PARTITION: tone partition format 1, total 7 I (6537) MP3_DECODER: MP3 opened I (6537) ESP_AUDIO_TASK: Blocking play until received AEL_MSG_CMD_REPORT_MUSIC_INFO I (6547) TONE_STREAM: Tone offset:0001A92C, Tone length:21212, pos:5

I (6563) ESP_AUDIO_TASK: Recv Element[IN_flash-0x3f806724] MSG,type:20000,cmd:8,len:4,status:AEL_STATUS_STATE_RUNNING I (6564) CODEC_ELEMENT_HELPER: The element is 0x3f8068bc. The reserve data 2 is 0x0. I (6584) ESP_AUDIO_TASK: Recv Element[DEC_mp3-0x3f8068bc] MSG,type:20000,cmd:8,len:4,status:AEL_STATUS_STATE_RUNNING I (6593) ESP_AUDIO_TASK: Received muisc info then on play I (6599) ESP_AUDIO_TASK: On event play, status:UNKNOWN, 0 I (6605) AUDIO_THREAD: The Audio_forge task allocate stack on external memory I (6613) AUDIO_FORGE: audio_forge opened I (6613) AUDIO_THREAD: The OUT_iis task allocate stack on external memory I (6625) I2S_STREAM: AUDIO_STREAM_WRITER I (6629) ESP_AUDIO_TASK: Recv Element[OUT_iis-0x3f806a70] MSG,type:20000,cmd:8,len:4,status:AEL_STATUS_STATE_RUNNING

ERROR A stack overflow in task OUT_iis has been detected.

Backtrace: 0x400821fd:0x3f830d60 0x40090ac9:0x3f830d80 0x400911c5:0x3f830da0 0x400922f9:0x3f830e20 0x40090bc4:0x3f830e40 0x40090b76:0xbf5d3838 |<-CORRUPTED 0x400821fd: panic_abort at E:/idf-v4.4.7/components/esp_system/panic.c:408

0x40090ac9: esp_system_abort at E:/idf-v4.4.7/components/esp_system/esp_system.c:137

0x400911c5: vApplicationStackOverflowHook at E:/idf-v4.4.7/components/freertos/port/xtensa/port.c:407

0x400922f9: vTaskSwitchContext at E:/idf-v4.4.7/components/freertos/tasks.c:3664

0x40090bc4: _frxt_dispatch at E:/idf-v4.4.7/components/freertos/port/xtensa/portasm.S:436

0x40090b76: _frxt_int_exit at E:/idf-v4.4.7/components/freertos/port/xtensa/portasm.S:231

ELF file SHA256: 359700a4c2370f47

Rebooting... ets Jul 29 2019 12:21:46

TempoTian commented 6 months ago

Seems you have changed the source code, default example use av_stream to do audio output. Log show that i2s_stream task stack over flow, you can adjust it according following codes:

    i2s_stream_cfg_t i2s_writer = I2S_STREAM_CFG_DEFAULT();
    i2s_writer.i2s_config.sample_rate = 48000;
    i2s_writer.i2s_config.mode = I2S_MODE_MASTER | I2S_MODE_TX;
    i2s_writer.type = AUDIO_STREAM_WRITER;
    i2s_writer.task_stack = NEW_STACK_SIZE; (such as 4k or more)
    i2s_h = i2s_stream_init(&i2s_writer);
    esp_audio_output_stream_add(player, i2s_h);
migmelccs commented 6 months ago

Hello, thank you, I'll look at it. I have not modified this example, other than the SIP user, SIP server IP, WiFi credentials but nothing related to I2S. Actually this is the example packet with esp adf v2.6 and master

Miguel

On Thu, Mar 14, 2024 at 2:34 PM TempoTian @.***> wrote:

Seems you have changed the source code, default example use av_stream to do audio output. Log show that i2s_stream task stack over flow, you can adjust it according following codes:

i2s_stream_cfg_t i2s_writer = I2S_STREAM_CFG_DEFAULT();
i2s_writer.i2s_config.sample_rate = 48000;
i2s_writer.i2s_config.mode = I2S_MODE_MASTER | I2S_MODE_TX;
i2s_writer.type = AUDIO_STREAM_WRITER;
i2s_writer.task_stack = NEW_STACK_SIZE; (such as 4k or more)
i2s_h = i2s_stream_init(&i2s_writer);
esp_audio_output_stream_add(player, i2s_h);

— Reply to this email directly, view it on GitHub https://github.com/espressif/esp-adf/issues/1168#issuecomment-1996619473, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASC3NS52ARY6E7CEYCQA6GTYYFAJDAVCNFSM6AAAAABERMQZIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJWGYYTSNBXGM . You are receiving this because you authored the thread.Message ID: @.***>

TempoTian commented 6 months ago

Sorry,forget that audio tone also use audio player, you can modify it in code: https://github.com/espressif/esp-adf/blob/master/examples/protocols/components/audio_flash_tone/audio_player_int_tone.c#L91

migmelccs commented 6 months ago

Yes, I follow the error to this file, however no matter how big I make I2S_STREAM_TASK_STACK, it still sends the message ERROR A stack overflow in task OUT_iis has been detected.

And get stuck in these last lines: I (3615) AUDIO_THREAD: The OUT_iis task allocate stack on external memory I (3627) I2S_STREAM: AUDIO_STREAM_WRITER I (3631) ESP_AUDIO_TASK: Recv Element[OUT_iis-0x3f806a70] MSG,type:20000,cmd:8,len:4,status:AEL_STATUS_STATE_RUNNING

I did close this case because I did not provide enough information, and open a new case here: https://github.com/espressif/esp-adf/issues/1169