From 353a05b116a088c4f25152c289c0322b17206b29 Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Fri, 26 Apr 2024 13:55:03 +0200 Subject: [PATCH] Bluetooth: BAP: Unicast server depend on PACS When in the BAP unicast server role, at least PAC sink or PAC source shall be set. In order to fulfill this new requirement, a few other Kconfig options had to be changed to a `depends on` from `select` to avoid recursive Kconfig requirements. This change may require some applications to update their configurations according to the migration guide. The change from `select` to `depends on` is ideal anyhow as that is the recommended way to add dependencies. This can checked via the combined BT_PACS Kconfig value. Signed-off-by: Emil Gydesen --- doc/releases/migration-guide-3.7.rst | 5 +++++ samples/bluetooth/hap_ha/prj.conf | 2 ++ samples/bluetooth/tmap_peripheral/prj.conf | 2 ++ samples/bluetooth/unicast_audio_server/prj.conf | 2 ++ subsys/bluetooth/audio/Kconfig.bap | 7 ++++--- tests/bluetooth/audio/ascs/prj.conf | 2 ++ tests/bluetooth/audio/codec/prj.conf | 3 +++ tests/bluetooth/shell/audio.conf | 2 ++ tests/bluetooth/shell/testcase.yaml | 1 + tests/bluetooth/tester/overlay-le-audio.conf | 3 +++ tests/bsim/bluetooth/audio/prj.conf | 2 ++ 11 files changed, 28 insertions(+), 3 deletions(-) diff --git a/doc/releases/migration-guide-3.7.rst b/doc/releases/migration-guide-3.7.rst index d57d09dde0..8d15411be7 100644 --- a/doc/releases/migration-guide-3.7.rst +++ b/doc/releases/migration-guide-3.7.rst @@ -213,6 +213,11 @@ Bluetooth Mesh Bluetooth Audio =============== +* :kconfig:option:`CONFIG_BT_ASCS`, :kconfig:option:`CONFIG_BT_PERIPHERAL` and + :kconfig:option:`CONFIG_BT_ISO_PERIPHERAL` are not longer `select`ed automatically when + enabling :kconfig:option:`CONFIG_BT_BAP_UNICAST_SERVER`, and these must now be set explicitly + in the project configuration file. (:github:`71993`) + Bluetooth Classic ================= diff --git a/samples/bluetooth/hap_ha/prj.conf b/samples/bluetooth/hap_ha/prj.conf index ca019bbafb..c492cdeb1e 100644 --- a/samples/bluetooth/hap_ha/prj.conf +++ b/samples/bluetooth/hap_ha/prj.conf @@ -1,5 +1,6 @@ CONFIG_BT=y CONFIG_BT_PERIPHERAL=y +CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_PRIVACY=y CONFIG_BT_SMP=y @@ -16,6 +17,7 @@ CONFIG_BT_ATT_PREPARE_COUNT=1 CONFIG_BT_AUDIO=y CONFIG_BT_BAP_UNICAST_SERVER=y +CONFIG_BT_ASCS=y CONFIG_BT_ASCS_ASE_SNK_COUNT=1 CONFIG_BT_ASCS_ASE_SRC_COUNT=1 # Support an ISO channel per ASE diff --git a/samples/bluetooth/tmap_peripheral/prj.conf b/samples/bluetooth/tmap_peripheral/prj.conf index 79725aaba2..35f5d15502 100644 --- a/samples/bluetooth/tmap_peripheral/prj.conf +++ b/samples/bluetooth/tmap_peripheral/prj.conf @@ -1,6 +1,7 @@ CONFIG_BT=y CONFIG_LOG=y CONFIG_BT_PERIPHERAL=y +CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_PRIVACY=y CONFIG_BT_AUDIO=y CONFIG_UTF8=y @@ -27,6 +28,7 @@ CONFIG_BT_VCP_VOL_REND=y CONFIG_BT_MCC=y # Support an ISO channel per ASE +CONFIG_BT_ASCS=y CONFIG_BT_ASCS_ASE_SNK_COUNT=1 CONFIG_BT_ASCS_ASE_SRC_COUNT=1 # Support an ISO channel per ASE diff --git a/samples/bluetooth/unicast_audio_server/prj.conf b/samples/bluetooth/unicast_audio_server/prj.conf index 3aec74ddbc..2705d0c189 100644 --- a/samples/bluetooth/unicast_audio_server/prj.conf +++ b/samples/bluetooth/unicast_audio_server/prj.conf @@ -1,8 +1,10 @@ CONFIG_BT=y CONFIG_LOG=y CONFIG_BT_PERIPHERAL=y +CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_AUDIO=y CONFIG_BT_BAP_UNICAST_SERVER=y +CONFIG_BT_ASCS=y CONFIG_BT_ASCS_ASE_SNK_COUNT=2 CONFIG_BT_ASCS_ASE_SRC_COUNT=1 CONFIG_BT_ISO_TX_BUF_COUNT=2 diff --git a/subsys/bluetooth/audio/Kconfig.bap b/subsys/bluetooth/audio/Kconfig.bap index 6e5dc3094b..a6771fc712 100644 --- a/subsys/bluetooth/audio/Kconfig.bap +++ b/subsys/bluetooth/audio/Kconfig.bap @@ -15,12 +15,13 @@ config BT_BAP_UNICAST config BT_BAP_UNICAST_SERVER bool "Bluetooth Unicast Audio Server Support [EXPERIMENTAL]" select EXPERIMENTAL - select BT_PERIPHERAL select BT_BAP_UNICAST - select BT_ISO_PERIPHERAL select BT_GATT_DYNAMIC_DB select BT_GATT_CACHING - select BT_ASCS + depends on BT_PERIPHERAL + depends on BT_ISO_PERIPHERAL + depends on BT_ASCS + depends on BT_PACS help This option enables support for Bluetooth Unicast Audio Server using Isochronous channels. diff --git a/tests/bluetooth/audio/ascs/prj.conf b/tests/bluetooth/audio/ascs/prj.conf index 714c9bde4d..2ed3485e33 100644 --- a/tests/bluetooth/audio/ascs/prj.conf +++ b/tests/bluetooth/audio/ascs/prj.conf @@ -2,6 +2,8 @@ CONFIG_ZTEST=y CONFIG_BT=y CONFIG_BT_MAX_CONN=1 +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_ISO_MAX_CHAN=1 CONFIG_BT_AUDIO=y CONFIG_BT_ASCS=y diff --git a/tests/bluetooth/audio/codec/prj.conf b/tests/bluetooth/audio/codec/prj.conf index 7701c36e5e..0015890a01 100644 --- a/tests/bluetooth/audio/codec/prj.conf +++ b/tests/bluetooth/audio/codec/prj.conf @@ -1,8 +1,11 @@ CONFIG_ZTEST=y CONFIG_BT=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_AUDIO=y CONFIG_BT_BAP_UNICAST_SERVER=y +CONFIG_BT_ASCS=y CONFIG_LOG=y CONFIG_BT_AUDIO_LOG_LEVEL_DBG=y diff --git a/tests/bluetooth/shell/audio.conf b/tests/bluetooth/shell/audio.conf index 29642e9c04..bfc9e3f452 100644 --- a/tests/bluetooth/shell/audio.conf +++ b/tests/bluetooth/shell/audio.conf @@ -48,6 +48,7 @@ CONFIG_BT_PER_ADV_SYNC_TRANSFER_RECEIVER=y CONFIG_BT_PER_ADV_SYNC_TRANSFER_SENDER=y # Support an ISO channel per ASE +CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_ISO_MAX_CHAN=4 CONFIG_BT_ISO_TEST_PARAMS=y CONFIG_BT_ISO_TX_BUF_COUNT=10 @@ -68,6 +69,7 @@ CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT=2 CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE=255 CONFIG_BT_AUDIO_CODEC_CAP_MAX_METADATA_SIZE=255 +CONFIG_BT_ASCS=y CONFIG_BT_ASCS_ASE_SNK_COUNT=2 CONFIG_BT_ASCS_ASE_SRC_COUNT=2 CONFIG_BT_BAP_UNICAST_CLIENT=y diff --git a/tests/bluetooth/shell/testcase.yaml b/tests/bluetooth/shell/testcase.yaml index e10218c36b..ef1a0b39b2 100644 --- a/tests/bluetooth/shell/testcase.yaml +++ b/tests/bluetooth/shell/testcase.yaml @@ -230,6 +230,7 @@ tests: build_only: true extra_configs: - CONFIG_BT_BAP_UNICAST_SERVER=n + - CONFIG_BT_ASCS=n - CONFIG_BT_BAP_UNICAST_CLIENT=n - CONFIG_BT_BAP_BROADCAST_SOURCE=n bluetooth.audio_shell.no_unicast_client: diff --git a/tests/bluetooth/tester/overlay-le-audio.conf b/tests/bluetooth/tester/overlay-le-audio.conf index ba1b6a4e55..6b0186e55d 100644 --- a/tests/bluetooth/tester/overlay-le-audio.conf +++ b/tests/bluetooth/tester/overlay-le-audio.conf @@ -1,4 +1,6 @@ CONFIG_BT_AUDIO=y +CONFIG_BT_PERIPHERAL=y +CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_EXT_ADV=y CONFIG_BT_BAP_UNICAST_SERVER=y CONFIG_BT_BAP_UNICAST_CLIENT=y @@ -54,6 +56,7 @@ CONFIG_BT_L2CAP_TX_MTU=255 CONFIG_BT_BUF_ACL_RX_SIZE=255 # ASCS +CONFIG_BT_ASCS=y CONFIG_BT_ASCS_ASE_SNK_COUNT=2 CONFIG_BT_ASCS_ASE_SRC_COUNT=2 diff --git a/tests/bsim/bluetooth/audio/prj.conf b/tests/bsim/bluetooth/audio/prj.conf index ec75aec447..6da9772590 100644 --- a/tests/bsim/bluetooth/audio/prj.conf +++ b/tests/bsim/bluetooth/audio/prj.conf @@ -24,6 +24,7 @@ CONFIG_BT_BAP_UNICAST_CLIENT=y CONFIG_BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT=4 CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SNK_COUNT=2 CONFIG_BT_BAP_UNICAST_CLIENT_ASE_SRC_COUNT=2 +CONFIG_BT_ASCS=y CONFIG_BT_ASCS_ASE_SNK_COUNT=2 CONFIG_BT_ASCS_ASE_SRC_COUNT=2 CONFIG_BT_BAP_BROADCAST_SOURCE=y @@ -34,6 +35,7 @@ CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT=2 CONFIG_BT_BAP_BROADCAST_SRC_SUBGROUP_COUNT=1 CONFIG_BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT=1 CONFIG_BT_BAP_BROADCAST_SNK_STREAM_COUNT=2 +CONFIG_BT_ISO_PERIPHERAL=y CONFIG_BT_ISO_TX_BUF_COUNT=4 CONFIG_BT_ISO_MAX_CHAN=4 CONFIG_BT_ISO_TX_MTU=310