feat(ble_audio): Miscellaneous update for BLE ISO & BLE Audio safe calling

This commit is contained in:
Liu Linyan
2026-09-03 10:27:44 +08:00
committed by Linyan Liu
parent 8180fab0d3
commit 73bac20eee
62 changed files with 2339 additions and 1305 deletions

View File

@@ -47,7 +47,11 @@ int ccp_server_init(void)
uint8_t bearer_index;
int err;
esp_ble_audio_tbs_register_cb(&tbs_cbs);
err = esp_ble_audio_tbs_register_cb(&tbs_cbs);
if (err) {
ESP_LOGE(TAG, "Failed to register tbs callbacks (err %d)", err);
return err;
}
err = esp_ble_audio_tbs_register_bearer(&gtbs_param, &bearer_index);
if (err) {

View File

@@ -39,9 +39,9 @@ static bool streams_started;
* borrowing one of the stack's. Not an esp_timer callback either: that task is
* shared with the BLE stack's own timers — the ISO TX schedulers post from it
* every SDU interval — and it is serial, so a GATT write chain dispatched there
* would sit in front of them. The audio APIs take the host lock themselves
* (esp_ble_audio_cap_commander_* -> bt_cap_commander_*_safe -> k_lock), which is
* what makes calling them from here safe. */
* would sit in front of them. The audio APIs take the host lock themselves, and
* with a bounded wait that returns ESP_ERR_TIMEOUT rather than blocking this
* task indefinitely, which is what makes calling them from here safe. */
#define VOLUME_PERIOD_MS (5 * 60 * 1000) /* 5 minutes */
#define VOLUME_TASK_STACK 3072
#define VOLUME_TASK_PRIO 5