Merge branch 'feat/ble_iso_lea_s31' into 'master'

feat(ble_audio): Support ISO and LE Audio on ESP32-S31

Closes IDF-14608

See merge request espressif/esp-idf!47837
This commit is contained in:
Island
2026-04-23 11:27:51 +08:00
39 changed files with 153 additions and 45 deletions
+3
View File
@@ -1347,6 +1347,9 @@ if(CONFIG_BT_AUDIO)
if(CONFIG_IDF_TARGET_ESP32H4) if(CONFIG_IDF_TARGET_ESP32H4)
add_prebuilt_library(ble_audio "esp_ble_audio/lib/lib/esp32h4/libble_audio.a") add_prebuilt_library(ble_audio "esp_ble_audio/lib/lib/esp32h4/libble_audio.a")
target_link_libraries(${COMPONENT_LIB} PRIVATE ble_audio) target_link_libraries(${COMPONENT_LIB} PRIVATE ble_audio)
elseif(CONFIG_IDF_TARGET_ESP32S31)
add_prebuilt_library(ble_audio "esp_ble_audio/lib/lib/esp32s31/libble_audio.a")
target_link_libraries(${COMPONENT_LIB} PRIVATE ble_audio)
endif() endif()
endif() endif()
+6 -6
View File
@@ -39,6 +39,10 @@ menu "CAP Options"
rsource "Kconfig/Kconfig.cap.in" rsource "Kconfig/Kconfig.cap.in"
endmenu endmenu
menu "TBS Options"
rsource "Kconfig/Kconfig.tbs.in"
endmenu
menu "CCP Options" menu "CCP Options"
rsource "Kconfig/Kconfig.ccp.in" rsource "Kconfig/Kconfig.ccp.in"
endmenu endmenu
@@ -71,18 +75,14 @@ menu "PACS Options"
rsource "Kconfig/Kconfig.pacs.in" rsource "Kconfig/Kconfig.pacs.in"
endmenu endmenu
menu "TBS Options" menu "VOCS Options"
rsource "Kconfig/Kconfig.tbs.in" rsource "Kconfig/Kconfig.vocs.in"
endmenu endmenu
menu "VCP Options" menu "VCP Options"
rsource "Kconfig/Kconfig.vcp.in" rsource "Kconfig/Kconfig.vcp.in"
endmenu endmenu
menu "VOCS Options"
rsource "Kconfig/Kconfig.vocs.in"
endmenu
menu "TMAP Options" menu "TMAP Options"
rsource "Kconfig/Kconfig.tmap.in" rsource "Kconfig/Kconfig.tmap.in"
endmenu endmenu
@@ -422,7 +422,7 @@ int bt_conn_cb_unregister(struct bt_conn_cb *cb);
* @param _name Name of callback structure. * @param _name Name of callback structure.
*/ */
#define BT_CONN_CB_DEFINE(_name) \ #define BT_CONN_CB_DEFINE(_name) \
static const STRUCT_SECTION_ITERABLE(bt_conn_cb, \ static STRUCT_SECTION_ITERABLE(bt_conn_cb, \
_CONCAT(bt_conn_cb_, \ _CONCAT(bt_conn_cb_, \
_name)) _name))
@@ -1183,6 +1183,14 @@ config SOC_BLE_SUPPORTED
bool bool
default y default y
config SOC_BLE_ISO_SUPPORTED
bool
default y
config SOC_BLE_AUDIO_SUPPORTED
bool
default y
config SOC_ESP_NIMBLE_CONTROLLER config SOC_ESP_NIMBLE_CONTROLLER
bool bool
default y default y
@@ -494,6 +494,8 @@
#define SOC_BT_CLASSIC_SUPPORTED (1) /*!< Support Bluetooth Classic hardware */ #define SOC_BT_CLASSIC_SUPPORTED (1) /*!< Support Bluetooth Classic hardware */
#define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */ #define SOC_BLE_SUPPORTED (1) /*!< Support Bluetooth Low Energy hardware */
// #define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */ // #define SOC_BLE_MESH_SUPPORTED (1) /*!< Support BLE MESH */
#define SOC_BLE_ISO_SUPPORTED (1) /*!< Support BLE ISO */
#define SOC_BLE_AUDIO_SUPPORTED (1) /*!< Support BLE Audio */
#define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */ #define SOC_ESP_NIMBLE_CONTROLLER (1) /*!< Support BLE EMBEDDED controller V1 */
#define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */ #define SOC_BLE_50_SUPPORTED (1) /*!< Support Bluetooth 5.0 */
#define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */ #define SOC_BLE_DEVICE_PRIVACY_SUPPORTED (1) /*!< Support BLE device privacy mode */
@@ -504,7 +506,6 @@
#define SOC_BLE_CTE_SUPPORTED (1) /*!< Support Bluetooth LE Constant Tone Extension (CTE) */ #define SOC_BLE_CTE_SUPPORTED (1) /*!< Support Bluetooth LE Constant Tone Extension (CTE) */
#define SOC_BLE_SUBRATE_SUPPORTED (1) /*!< Support Bluetooth LE Connection Subrating */ #define SOC_BLE_SUBRATE_SUPPORTED (1) /*!< Support Bluetooth LE Connection Subrating */
#define SOC_BLE_PERIODIC_ADV_WITH_RESPONSE (1) /*!< Support Bluetooth LE Periodic Advertising with Response (PAwR) */ #define SOC_BLE_PERIODIC_ADV_WITH_RESPONSE (1) /*!< Support Bluetooth LE Periodic Advertising with Response (PAwR) */
// #define SOC_BLE_ISO_SUPPORTED (1) /*!< Support Bluetooth ISO */
/*-------------------------- I2S CAPS ----------------------------------------*/ /*-------------------------- I2S CAPS ----------------------------------------*/
#define SOC_I2S_NUM (2U) #define SOC_I2S_NUM (2U)
+4 -8
View File
@@ -180,19 +180,15 @@ examples/bluetooth/blufi:
examples/bluetooth/esp_ble_audio: examples/bluetooth/esp_ble_audio:
<<: *bt_default_depends <<: *bt_default_depends
enable: disable:
- if: SOC_BLE_AUDIO_SUPPORTED == 1 and IDF_TARGET == "esp32H4" - if: SOC_BLE_AUDIO_SUPPORTED != 1
temporary: true
reason: BLE Audio examples only supported on ESP32-H4
depends_filepatterns: depends_filepatterns:
- examples/bluetooth/esp_ble_audio/common_components/**/* - examples/bluetooth/esp_ble_audio/common_components/**/*
examples/bluetooth/esp_ble_iso: examples/bluetooth/esp_ble_iso:
<<: *bt_default_depends <<: *bt_default_depends
enable: disable:
- if: SOC_BLE_ISO_SUPPORTED == 1 and IDF_TARGET == "esp32H4" - if: SOC_BLE_ISO_SUPPORTED != 1
temporary: true
reason: BLE ISO examples only supported on ESP32-H4
depends_filepatterns: depends_filepatterns:
- examples/bluetooth/esp_ble_iso/common_components/**/* - examples/bluetooth/esp_ble_iso/common_components/**/*
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# BAP Broadcast Sink Example # BAP Broadcast Sink Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# BAP Broadcast Source Example # BAP Broadcast Source Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# BAP Unicast Client Example # BAP Unicast Client Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# BAP Unicast Server Example # BAP Unicast Server Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# CAP Acceptor Example # CAP Acceptor Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# CAP Initiator Example # CAP Initiator Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# TMAP Broadcast Media Receiver (BMR) Example # TMAP Broadcast Media Receiver (BMR) Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# TMAP Broadcast Media Sender (BMS) Example # TMAP Broadcast Media Sender (BMS) Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# TMAP Central Example # TMAP Central Example
@@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 16k
phy_init, data, phy, 0xf000, 4k
factory, app, factory, 0x10000, 1600k
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, 0x9000, 16k
4 phy_init, data, phy, 0xf000, 4k
5 factory, app, factory, 0x10000, 1600k
@@ -2,6 +2,9 @@
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
# #
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=n CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# TMAP Peripheral Example # TMAP Peripheral Example
@@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 16k
phy_init, data, phy, 0xf000, 4k
factory, app, factory, 0x10000, 1600k
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, 0x9000, 16k
4 phy_init, data, phy, 0xf000, 4k
5 factory, app, factory, 0x10000, 1600k
@@ -2,6 +2,9 @@
# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration
# #
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_BT_ENABLED=y CONFIG_BT_ENABLED=y
CONFIG_BT_BLUEDROID_ENABLED=n CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# BLE BIG Broadcaster Example # BLE BIG Broadcaster Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# BLE BIG Receiver Example # BLE BIG Receiver Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# BLE CIS Central Example # BLE CIS Central Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y
@@ -1,5 +1,5 @@
| Supported Targets | ESP32-H4 | | Supported Targets | ESP32-H4 | ESP32-S31 |
| ----------------- | -------- | | ----------------- | -------- | --------- |
# BLE CIS Peripheral Example # BLE CIS Peripheral Example
@@ -0,0 +1,6 @@
# Override some defaults so BT stack is enabled
# by default in this example
CONFIG_IDF_TARGET="esp32s31"
CONFIG_BT_LE_ISO_SUPPORT=y