Merge branch 'idf/ble_audio_lock_update' into 'master'

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

See merge request espressif/esp-idf!52346
This commit is contained in:
Island
2026-09-08 11:35:05 +08:00
63 changed files with 2350 additions and 1306 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