I have been trying without luck for a couple of days to play a WAV file from a plain esp32 (no lyra, no additional components), to a bluetooth speaker.
I can't get it work. My code is below, and under that is a log of the build and execution.
The things I notice most in the log are these lines:
W (7806) SPIFFS_STREAM: No more data, ret:0
W (7896) BT_APPL: ### UNDERFLOW :: ONLY READ 428 BYTES OUT OF 512 ###
Any help would be much appreciated - if anyone can help me to getg a WAV to play from spiffs it would be much appreciated!!!!
thanks
Code: Select all
/* Play music from Bluetooth device
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "audio_common.h"
#include "audio_element.h"
#include "audio_event_iface.h"
#include "audio_pipeline.h"
#include "bluetooth_service.h"
#include "esp_log.h"
#include "esp_peripherals.h"
#include "wav_decoder.h"
#include "nvs_flash.h"
#include "sdkconfig.h"
#include "periph_spiffs.h"
#include "spiffs_stream.h"
#define SAVE_FILE_RATE 22050
#define SAVE_FILE_CHANNEL 1
#define SAVE_FILE_BITS 8
#define PLAYBACK_RATE 44100
#define PLAYBACK_CHANNEL 2
#define PLAYBACK_BITS 16
static const char *TAG = "BLUETOOTH_SOURCE_EXAMPLE";
static audio_element_handle_t create_spiffs_stream(int sample_rates, int bits, int channels, audio_stream_type_t type)
{
spiffs_stream_cfg_t spiffs_cfg = SPIFFS_STREAM_CFG_DEFAULT();
spiffs_cfg.type = type;
audio_element_handle_t spiffs_stream = spiffs_stream_init(&spiffs_cfg);
mem_assert(spiffs_stream);
audio_element_info_t writer_info = {0};
audio_element_getinfo(spiffs_stream, &writer_info);
writer_info.bits = bits;
writer_info.channels = channels;
writer_info.sample_rates = sample_rates;
audio_element_setinfo(spiffs_stream, &writer_info);
return spiffs_stream;
}
void app_main(void)
{
//nvs_flash_erase();
esp_err_t err = nvs_flash_init();
if (err == ESP_ERR_NVS_NO_FREE_PAGES) {
// NVS partition was truncated and needs to be erased
// Retry nvs_flash_init
ESP_ERROR_CHECK(nvs_flash_erase());
err = nvs_flash_init();
}
audio_pipeline_handle_t pipeline;
audio_element_handle_t spiffs_reader_el, filter_upsample_el, wav_decoder, bt_stream_writer;
// Initialize peripherals management
esp_periph_config_t periph_cfg = { 0 };
esp_periph_init(&periph_cfg);
// Initialize Spiffs peripheral
periph_spiffs_cfg_t spiffs_cfg = {
.root = "/spiffs",
.partition_label = NULL,
.max_files = 5,
.format_if_mount_failed = true
};
esp_periph_handle_t spiffs_handle = periph_spiffs_init(&spiffs_cfg);
// Start spiffs peripheral
esp_periph_start(spiffs_handle);
// Wait until spiffs was mounted
while (!periph_spiffs_is_mounted(spiffs_handle)) {
vTaskDelay(100 / portTICK_PERIOD_MS);
}
esp_log_level_set("*", ESP_LOG_INFO);
esp_log_level_set(TAG, ESP_LOG_DEBUG);
ESP_LOGI(TAG, "[ 1 ] Create Bluetooth service");
bluetooth_service_cfg_t bt_cfg = {
.device_name = "ESP-ADF-SOURCE",
.mode = BLUETOOTH_A2DP_SOURCE,
.remote_name = "BT-12",
};
bluetooth_service_start(&bt_cfg);
ESP_LOGI(TAG, "[1.1] Get Bluetooth stream");
bt_stream_writer = bluetooth_service_create_stream();
ESP_LOGI(TAG, "[ 2 ] Create SPIFFS stream to read data");
spiffs_reader_el = create_spiffs_stream(SAVE_FILE_RATE, SAVE_FILE_BITS, SAVE_FILE_CHANNEL, AUDIO_STREAM_READER);
ESP_LOGI(TAG, "[ 3 ] Create wav decoder to decode wav file");
wav_decoder_cfg_t wavdec_cfg = DEFAULT_WAV_DECODER_CONFIG();
wav_decoder = wav_decoder_init(&wavdec_cfg);
//audio_element_set_read_cb(wav_decoder, wav_music_read_cb, NULL);
ESP_LOGI(TAG, "[ 4 ] Create audio pipeline for BT Source");
audio_pipeline_cfg_t pipeline_cfg = DEFAULT_AUDIO_PIPELINE_CONFIG();
pipeline = audio_pipeline_init(&pipeline_cfg);
ESP_LOGI(TAG, "[4.1] Register all elements to audio pipeline");
audio_pipeline_register(pipeline, spiffs_reader_el, "spiffs_reader");
audio_pipeline_register(pipeline, wav_decoder, "wav");
audio_pipeline_register(pipeline, bt_stream_writer, "bt");
ESP_LOGI(TAG, "[4.2] Link it together wav_decoder-->bt_stream_writer");
audio_pipeline_link(pipeline, (const char *[]) {"spiffs_reader", "wav", "bt"}, 3);
audio_element_set_uri(spiffs_reader_el, "/spiffs/pcm1644sSHORT.wav");
ESP_LOGI(TAG, "[5.1] Create Bluetooth peripheral");
esp_periph_handle_t bt_periph = bluetooth_service_create_periph();
ESP_LOGI(TAG, "[5.2] Start Bluetooth peripheral");
esp_periph_start(bt_periph);
ESP_LOGI(TAG, "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
ESP_LOGI(TAG, "[ 6 ] Setup event listener");
audio_event_iface_cfg_t evt_cfg = AUDIO_EVENT_IFACE_DEFAULT_CFG();
audio_event_iface_handle_t evt = audio_event_iface_init(&evt_cfg);
ESP_LOGI(TAG, "[6.1] Listening event from all elements of pipeline");
audio_pipeline_set_listener(pipeline, evt);
ESP_LOGI(TAG, "[6.2] Listening event from peripherals");
audio_event_iface_set_listener(esp_periph_get_event_iface(), evt);
ESP_LOGI(TAG, "[ 7 ] Start audio_pipeline");
audio_pipeline_run(pipeline);
ESP_LOGI(TAG, "[ 8 ] Listen for all pipeline events");
while (1) {
audio_event_iface_msg_t msg;
esp_err_t ret = audio_event_iface_listen(evt, &msg, portMAX_DELAY);
if (ret != ESP_OK) {
ESP_LOGE(TAG, "[ * ] Event interface error : %d", ret);
continue;
}
ESP_LOGI(TAG, "[ * ] Audio event");
ESP_LOGI(TAG, "[ * ] Free heap: %u", xPortGetFreeHeapSize());
ESP_LOGI(TAG, "[ * ] msg.cmd: %d", msg.cmd);
if (msg.source_type == AUDIO_ELEMENT_TYPE_ELEMENT && msg.source == (void *) wav_decoder
&& msg.cmd == AEL_MSG_CMD_REPORT_MUSIC_INFO) {
audio_element_info_t music_info = {0};
audio_element_getinfo(wav_decoder, &music_info);
ESP_LOGI(TAG, "[ * ] Receive music info from wav decoder, sample_rates=%d, bits=%d, ch=%d",
music_info.sample_rates, music_info.bits, music_info.channels);
audio_element_setinfo(bt_stream_writer, &music_info);
//i2s_stream_set_clk(bt_stream_writer, music_info.sample_rates, music_info.bits, music_info.channels);
continue;
}
/* Stop when the Bluetooth is disconnected or suspended */
if (msg.source_type == PERIPH_ID_BLUETOOTH
&& msg.source == (void *)bt_periph) {
if ((msg.cmd == PERIPH_BLUETOOTH_DISCONNECTED) || (msg.cmd == PERIPH_BLUETOOTH_AUDIO_SUSPENDED)) {
ESP_LOGW(TAG, "[ * ] Bluetooth disconnected or suspended");
periph_bluetooth_stop(bt_periph);
break;
}
}
}
ESP_LOGI(TAG, "[ 9 ] Stop audio_pipeline");
audio_pipeline_terminate(pipeline);
/* Terminate the pipeline before removing the listener */
audio_pipeline_remove_listener(pipeline);
/* Stop all peripherals before removing the listener */
esp_periph_stop_all();
audio_event_iface_remove_listener(esp_periph_get_event_iface(), evt);
/* Make sure audio_pipeline_remove_listener & audio_event_iface_remove_listener are called before destroying event_iface */
audio_event_iface_destroy(evt);
/* Release all resources */
audio_pipeline_unregister(pipeline, spiffs_reader_el);
audio_pipeline_unregister(pipeline, bt_stream_writer);
audio_pipeline_unregister(pipeline, wav_decoder);
//audio_pipeline_deinit(spiffs_reader_el);
audio_pipeline_deinit(pipeline);
audio_element_deinit(bt_stream_writer);
audio_element_deinit(wav_decoder);
esp_periph_destroy();
bluetooth_service_destroy();
}
Here is the make:
Code: Select all
$ make flash
Flashing binaries to serial port /dev/cu.SLAB_USBtoUART (app at offset 0x10000 )...
esptool.py v2.6-beta1
Serial port /dev/cu.SLAB_USBtoUART
Connecting........_
Chip is ESP32D0WDQ6 (revision 0)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC: 24:0a:c4:81:5c:a0
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 21344 bytes to 12567...
Wrote 21344 bytes (12567 compressed) at 0x00001000 in 1.1 seconds (effective 153.4 kbit/s)...
Hash of data verified.
Compressed 864656 bytes to 507801...
Wrote 864656 bytes (507801 compressed) at 0x00010000 in 44.9 seconds (effective 154.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 134...
Wrote 3072 bytes (134 compressed) at 0x00008000 in 0.0 seconds (effective 1522.8 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Code: Select all
$ make monitor
MONITOR
--- idf_monitor on /dev/cu.SLAB_USBtoUART 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5996
load:0x40078000,len:9176
load:0x40080000,len:6064
0x40080000: _WindowOverflow4 at /Users/andrewstuartsupercoders/esp/esp-adf/esp-idf/components/freertos/xtensa_vectors.S:1685
entry 0x40080330
0x40080330: _KernelExceptionVector at ??:?
I (29) boot: ESP-IDF v3.1.1-6-g2aa9a2118 2nd stage bootloader
I (29) boot: compile time 16:28:24
I (40) boot: Enabling RNG early entropy source...
I (40) boot: SPI Speed : 40MHz
I (40) boot: SPI Mode : DIO
I (43) boot: SPI Flash Size : 4MB
I (47) boot: Partition Table:
I (50) boot: ## Label Usage Type ST Offset Length
I (57) boot: 0 nvs WiFi data 01 02 00009000 00005000
I (65) boot: 1 otadata OTA data 01 00 0000e000 00002000
I (72) boot: 2 app0 OTA app 00 10 00010000 00300000
I (80) boot: 3 eeprom Unknown data 01 99 00310000 00001000
I (87) boot: 4 spiffs Unknown data 01 82 00311000 000ef000
I (95) boot: End of partition table
I (99) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x2941c (168988) map
I (141) esp_image: segment 1: paddr=0x00039444 vaddr=0x3ffc0000 size=0x031e8 ( 12776) load
I (144) esp_image: segment 2: paddr=0x0003c634 vaddr=0x3ffc31e8 size=0x00000 ( 0) load
I (148) esp_image: segment 3: paddr=0x0003c63c vaddr=0x40080000 size=0x00400 ( 1024) load
0x40080000: _WindowOverflow4 at /Users/andrewstuartsupercoders/esp/esp-adf/esp-idf/components/freertos/xtensa_vectors.S:1685
I (157) esp_image: segment 4: paddr=0x0003ca44 vaddr=0x40080400 size=0x035cc ( 13772) load
I (169) esp_image: segment 5: paddr=0x00040018 vaddr=0x400d0018 size=0x94d54 (609620) map
0x400d0018: _flash_cache_start at ??:?
I (295) esp_image: segment 6: paddr=0x000d4d74 vaddr=0x400839cc size=0x0e3e0 ( 58336) load
0x400839cc: spi_flash_read_encrypted at /Users/andrewstuartsupercoders/esp/esp-adf/esp-idf/components/spi_flash/flash_ops.c:634
I (308) esp_image: segment 7: paddr=0x000e315c vaddr=0x400c0000 size=0x00000 ( 0) load
I (308) esp_image: segment 8: paddr=0x000e3164 vaddr=0x50000000 size=0x00000 ( 0) load
I (318) boot: Loaded app from partition at offset 0x10000
I (321) boot: Disabling RNG early entropy source...
I (327) cpu_start: Pro cpu up.
I (330) cpu_start: Starting app cpu, entry point is 0x40081008
0x40081008: call_start_cpu1 at /Users/andrewstuartsupercoders/esp/esp-adf/esp-idf/components/esp32/cpu_start.c:231
I (0) cpu_start: App cpu up.
I (341) heap_init: Initializing. RAM available for dynamic allocation:
I (347) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (354) heap_init: At 3FFCAEE0 len 00015120 (84 KiB): DRAM
I (360) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (366) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (372) heap_init: At 40091DAC len 0000E254 (56 KiB): IRAM
I (379) cpu_start: Pro cpu start user code
I (24) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (186) PERIPH_SPIFFS: Partition size: total: 892556, used: 95882
I (186) BLUETOOTH_SOURCE_EXAMPLE: [ 1 ] Create Bluetooth service
I (186) BTDM_INIT: BT controller compile version [7b0770a]
I (196) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (256) phy: phy_version: 4000, b6198fa, Sep 3 2018, 15:11:06, 0, 0
I (656) BLUETOOTH_SERVICE: Starting device discovery...
I (656) BLUETOOTH_SOURCE_EXAMPLE: [1.1] Get Bluetooth stream
I (656) BLUETOOTH_SOURCE_EXAMPLE: [ 2 ] Create SPIFFS stream to read data
I (666) BLUETOOTH_SOURCE_EXAMPLE: [ 3 ] Create wav decoder to decode wav file
I (666) BLUETOOTH_SOURCE_EXAMPLE: [ 4 ] Create audio pipeline for BT Source
I (676) BLUETOOTH_SERVICE: Discovery started.
I (676) BLUETOOTH_SOURCE_EXAMPLE: [4.1] Register all elements to audio pipeline
I (696) BLUETOOTH_SOURCE_EXAMPLE: [4.2] Link it together wav_decoder-->bt_stream_writer
I (696) AUDIO_PIPELINE: audio_pipeline_link:0x3ffe17c0, spiffs_reader, 0x3ffdfed0
I (706) AUDIO_PIPELINE: audio_pipeline_link:0x3ffdf42c, wav, 0x3ffdefc4
I (716) BLUETOOTH_SOURCE_EXAMPLE: [5.1] Create Bluetooth peripheral
I (726) BLUETOOTH_SOURCE_EXAMPLE: [5.2] Start Bluetooth peripheral
I (726) BLUETOOTH_SOURCE_EXAMPLE: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
I (736) BLUETOOTH_SOURCE_EXAMPLE: [ 6 ] Setup event listener
I (746) BLUETOOTH_SOURCE_EXAMPLE: [6.1] Listening event from all elements of pipeline
I (756) BLUETOOTH_SOURCE_EXAMPLE: [6.2] Listening event from peripherals
I (756) BLUETOOTH_SOURCE_EXAMPLE: [ 7 ] Start audio_pipeline
I (766) AUDIO_ELEMENT: [spiffs_reader] audio_element_run
I (776) AUDIO_ELEMENT: [spiffs_reader] Element task created
I (776) AUDIO_ELEMENT: [wav] audio_element_run
I (786) AUDIO_ELEMENT: [wav] Element task created
I (786) AUDIO_ELEMENT: [bt] audio_element_run
I (796) AUDIO_ELEMENT: [bt] Element task created
I (796) AUDIO_PIPELINE: Func:audio_pipeline_run, Line:278, MEM Total:93732 Bytes
I (806) AUDIO_ELEMENT: [spiffs_reader] AEL_MSG_CMD_RESUME,state:1
I (816) AUDIO_ELEMENT: [wav] AEL_MSG_CMD_RESUME,state:1
I (816) SPIFFS_STREAM: File size is 46040 byte, pos:0
I (836) AUDIO_PIPELINE: Pipeline started
I (836) BLUETOOTH_SOURCE_EXAMPLE: [ 8 ] Listen for all pipeline events
I (836) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Audio event
I (846) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Free heap: 93340
I (846) BLUETOOTH_SOURCE_EXAMPLE: [ * ] msg.cmd: 8
I (856) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Audio event
I (866) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Free heap: 93340
I (866) BLUETOOTH_SOURCE_EXAMPLE: [ * ] msg.cmd: 8
I (876) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Audio event
I (876) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Free heap: 93340
I (886) BLUETOOTH_SOURCE_EXAMPLE: [ * ] msg.cmd: 9
I (886) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Receive music info from wav decoder, sample_rates=44100, bits=16, ch=2
I (4626) BLUETOOTH_SERVICE: Scanned device: fc:58:fa:5b:f3:1b
I (4626) BLUETOOTH_SERVICE: --Class of Device: 0x260404
I (4626) BLUETOOTH_SERVICE: --RSSI: -61
I (4636) BLUETOOTH_SERVICE: --Name: BT-12
I (4636) BLUETOOTH_SERVICE: Found a target device, address fc:58:fa:5b:f3:1b, name BT-12
I (4646) BLUETOOTH_SERVICE: Cancel device discovery ...
I (4656) BLUETOOTH_SERVICE: Device discovery stopped.
I (4656) BLUETOOTH_SERVICE: a2dp connecting to peer: BT-12
E (4666) BT_APPL: reset flags
I (4666) BLUETOOTH_SERVICE: bt_a2d_source_cb state 4, evt 0x0
I (7356) BLUETOOTH_SERVICE: authentication success: BT-12
I (7356) BLUETOOTH_SERVICE: fc 58 fa 5b f3 1b
I (7356) BLUETOOTH_SERVICE: ESP_BT_GAP_PIN_REQ_EVT min_16_digit:253
I (7366) BLUETOOTH_SERVICE: Input pin code: 0000 0000 0000 0000
W (7376) BT_BTM: BTM_PINCodeReply() - Wrong State: 0
E (7386) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
W (7586) BT_APPL: new conn_srvc id:18, app_id:0
I (7586) BLUETOOTH_SERVICE: bt_a2d_source_cb state 4, evt 0x0
I (7586) BLUETOOTH_SERVICE: a2dp connected
I (7586) BLUETOOTH_SERVICE: a2dp media ready checking ...
I (7586) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Audio event
I (7596) BLUETOOTH_SERVICE: bt_a2d_source_cb state 5, evt 0x3
I (7596) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Free heap: 88736
I (7606) BLUETOOTH_SERVICE: a2dp media ready, starting ...
I (7616) BLUETOOTH_SOURCE_EXAMPLE: [ * ] msg.cmd: 1
W (7616) BT_APPL: new conn_srvc id:18, app_id:1
I (7636) BT_LOG: bta_av_link_role_ok hndl:x41 role:0 conn_audio:x1 bits:1 features:x824b
I (7636) BLUETOOTH_SERVICE: bt_a2d_source_cb state 5, evt 0x3
I (7646) BLUETOOTH_SERVICE: a2dp media start successfully.
I (7656) BLUETOOTH_SERVICE: bt_a2d_source_cb state 5, evt 0x1
W (7806) SPIFFS_STREAM: No more data, ret:0
I (7806) AUDIO_ELEMENT: IN-[spiffs_reader] AEL_IO_DONE,0
I (7806) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Audio event
I (7806) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Free heap: 91100
I (7816) BLUETOOTH_SOURCE_EXAMPLE: [ * ] msg.cmd: 8
I (7866) AUDIO_ELEMENT: IN-[wav] AEL_IO_DONE,-2
I (7866) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Audio event
I (7866) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Free heap: 86976
I (7866) BLUETOOTH_SOURCE_EXAMPLE: [ * ] msg.cmd: 8
W (7896) BT_APPL: ### UNDERFLOW :: ONLY READ 428 BYTES OUT OF 512 ###
W (7896) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 1, 428
I (7926) AUDIO_ELEMENT: IN-[bt] AEL_IO_DONE,-2
W (7926) BT_APPL: ### UNDERFLOW :: ONLY READ -2 BYTES OUT OF 84 ###
W (7926) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 12, 426
I (7926) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Audio event
I (7936) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Free heap: 91100
I (7946) BLUETOOTH_SOURCE_EXAMPLE: [ * ] msg.cmd: 4
W (7946) BLUETOOTH_SOURCE_EXAMPLE: [ * ] Bluetooth disconnected or suspended
W (7956) BT_APPL: btc_get_num_aa_frame() - Limiting frames to be sent from 22 to 21
I (7956) BLUETOOTH_SOURCE_EXAMPLE: [ 9 ] Stop audio_pipeline
I (7966) AUDIO_ELEMENT: IN-[bt] AEL_IO_DONE,-2
W (7976) BT_APPL: ### UNDERFLOW :: ONLY READ -2 BYTES OUT OF 86 ###
W (7966) AUDIO_PIPELINE: There are no listener registered
W (7986) BT_APPL: btc_media_aa_prep_sbc_2_send underflow 21, 424
W (7996) BT_APPL: btc_get_num_aa_frame() - Limiting frames to be sent from 37 to 21
/Users/andrewstuartsupercoders/esp/esp-adf/esp-idf/components/freertos/queue.c:1441 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x4008c855 on core 1
0x4008c855: xQueueGenericReceive at /Users/xxx/esp/esp-adf/esp-idf/components/freertos/queue.c:2037
Backtrace: 0x4008f790:0x3ffe13b0 0x4008f967:0x3ffe13d0 0x4008c855:0x3ffe13f0 0x400e7fcd:0x3ffe1430 0x400e70d2:0x3ffe1460 0x400e82e1:0x3ffe1490 0x4011ddad:0x3ffe14b0 0x4011dfac:0x3ffe14f0 0x4011e13e:0x3ffe1520 0x4011e17f:0x3ffe1550 0x4011e1a7:0x3ffe1570 0x4011e201:0x3ffe1590
0x4008f790: invoke_abort at /Users/xxx/esp/esp-adf/esp-idf/components/esp32/panic.c:649
0x4008f967: abort at /Users/xxx/esp/esp-adf/esp-idf/components/esp32/panic.c:649
0x4008c855: xQueueGenericReceive at /Users/xxx/esp/esp-adf/esp-idf/components/freertos/queue.c:2037
0x400e7fcd: rb_read at /Users/xxx/esp/esp-adf/components/audio_pipeline/ringbuf.c:444
0x400e70d2: audio_element_input at /Users/xxx/esp/esp-adf/components/audio_pipeline/audio_element.c:702
0x400e82e1: bt_a2d_source_data_cb at /Users/xxx/esp/esp-adf/components/audio_service/bluetooth_service.c:671
0x4011ddad: btc_aa_src_data_read at /Users/xxx/esp/esp-adf/esp-idf/components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c:200
(inlined by) btc_media_aa_read_feeding at /Users/xxx/esp/esp-adf/esp-idf/components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c:1201
0x4011dfac: btc_media_aa_prep_sbc_2_send at /Users/xxx/esp/esp-adf/esp-idf/components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c:1348
0x4011e13e: btc_a2dp_source_prep_2_send at /Users/xxx/esp/esp-adf/esp-idf/components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c:1433
0x4011e17f: btc_a2dp_source_send_aa_frame at /Users/xxx/esp/esp-adf/esp-idf/components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c:1460
0x4011e1a7: btc_a2dp_source_handle_timer at /Users/xxx/esp/esp-adf/esp-idf/components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c:1478
0x4011e201: btc_a2dp_source_task_handler at /Users/xxx/esp/esp-adf/esp-idf/components/bt/bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c:294
Rebooting...