Skip to content

Commit

Permalink
Bluetooth: BAP: Depend on BT_PAC_{SNK,SRC} instead of select
Browse files Browse the repository at this point in the history
Modify ASCS and BAP Broadcast sink to depend on the PAC options
instead of selecting them.

Ideally this dependency for ASCS would be a BT_BAP_UNICAST_SERVER
value, as ASCS does not have this dependency, but the BAP
Unicast Server does, however ASCS and the Unicast Server are
too entangled at this point to separate this requirement.

Signed-off-by: Emil Gydesen <[email protected]>
  • Loading branch information
Thalley committed Nov 14, 2024
1 parent d55f10b commit 5d71f71
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions samples/bluetooth/bap_unicast_server/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ CONFIG_BT_GATT_CACHING=y
CONFIG_BT_GATT_DYNAMIC_DB=y
CONFIG_BT_BAP_UNICAST_SERVER=y
CONFIG_BT_ASCS=y
CONFIG_BT_PAC_SNK=y
CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=2
CONFIG_BT_PAC_SRC=y
CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=1
CONFIG_BT_ISO_TX_BUF_COUNT=2
# Support an ISO channel per ASE
Expand Down
2 changes: 2 additions & 0 deletions samples/bluetooth/cap_acceptor/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ CONFIG_BT_ATT_PREPARE_COUNT=1

# Support an ISO channel per ASE
CONFIG_BT_ASCS=y
CONFIG_BT_PAC_SNK=y
CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=1
CONFIG_BT_PAC_SRC=y
CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=1

# Support an ISO channel per ASE
Expand Down
2 changes: 2 additions & 0 deletions samples/bluetooth/hap_ha/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ CONFIG_BT_ATT_PREPARE_COUNT=1
CONFIG_BT_AUDIO=y
CONFIG_BT_BAP_UNICAST_SERVER=y
CONFIG_BT_ASCS=y
CONFIG_BT_PAC_SNK=y
CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=1
CONFIG_BT_PAC_SRC=y
CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=1
# Support an ISO channel per ASE
CONFIG_BT_ISO_MAX_CHAN=2
Expand Down
2 changes: 2 additions & 0 deletions samples/bluetooth/tmap_peripheral/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ CONFIG_BT_MCC=y

# Support an ISO channel per ASE
CONFIG_BT_ASCS=y
CONFIG_BT_PAC_SNK=y
CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=1
CONFIG_BT_PAC_SRC=y
CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=1
# Support an ISO channel per ASE
CONFIG_BT_ISO_MAX_CHAN=2
Expand Down
4 changes: 2 additions & 2 deletions subsys/bluetooth/audio/Kconfig.ascs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ config BT_ASCS_MAX_ASE_SNK_COUNT
int "Maximum number of Audio Stream Endpoint Sink Characteristics"
default 2
range 0 $(UINT8_MAX)
depends on BT_PAC_SNK
help
An ASE Sink characteristic represents the state of an ASE, which is
coupled to a single direction of a unicast Audio Stream.
Expand All @@ -24,17 +25,16 @@ config BT_ASCS_MAX_ASE_SRC_COUNT
int "Maximum number of Audio Stream Endpoint Source Characteristics"
default 2
range 0 $(UINT8_MAX)
depends on BT_PAC_SRC
help
An ASE Source characteristic represents the state of an ASE, which is
coupled to a single direction of a unicast Audio Stream.

config BT_ASCS_ASE_SNK
def_bool BT_ASCS_MAX_ASE_SNK_COUNT > 0
select BT_PAC_SNK

config BT_ASCS_ASE_SRC
def_bool BT_ASCS_MAX_ASE_SRC_COUNT > 0
select BT_PAC_SRC

config BT_ASCS_MAX_ACTIVE_ASES
int "Number of simultaneously supported ASE sessions"
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/audio/Kconfig.bap
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ endif # BT_BAP_BROADCAST_SOURCE
config BT_BAP_BROADCAST_SINK
bool "Bluetooth Broadcast Sink Audio Support"
depends on BT_ISO_SYNC_RECEIVER
select BT_PAC_SNK
depends on BT_PAC_SNK
depends on BT_PERIPHERAL
depends on BT_BAP_SCAN_DELEGATOR
help
Expand Down
2 changes: 2 additions & 0 deletions tests/bluetooth/audio/ascs/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ CONFIG_BT_GATT_CACHING=y
CONFIG_BT_GATT_DYNAMIC_DB=y
CONFIG_BT_AUDIO=y
CONFIG_BT_ASCS=y
CONFIG_BT_PAC_SNK=y
CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=2
CONFIG_BT_PAC_SRC=y
CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=2
CONFIG_BT_ASCS_MAX_ACTIVE_ASES=1
CONFIG_BT_BAP_UNICAST_SERVER=y
Expand Down
4 changes: 2 additions & 2 deletions tests/bluetooth/shell/audio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ CONFIG_BT_ISO_RX_MTU=310

CONFIG_BT_AUDIO=y
CONFIG_BT_BAP_UNICAST_SERVER=y
CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=2
CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=2

CONFIG_BT_BAP_UNICAST_CLIENT=y
CONFIG_BT_BAP_UNICAST_CLIENT_GROUP_STREAM_COUNT=4
Expand All @@ -79,7 +77,9 @@ CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE=255
CONFIG_BT_AUDIO_CODEC_CAP_MAX_METADATA_SIZE=255

CONFIG_BT_ASCS=y
CONFIG_BT_PAC_SNK=y
CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=2
CONFIG_BT_PAC_SRC=y
CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=2
CONFIG_BT_BAP_BROADCAST_SOURCE=y
CONFIG_BT_BAP_BROADCAST_SRC_SUBGROUP_COUNT=4
Expand Down
2 changes: 2 additions & 0 deletions tests/bluetooth/tester/overlay-le-audio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ CONFIG_BT_BUF_ACL_RX_SIZE=255

# ASCS
CONFIG_BT_ASCS=y
CONFIG_BT_PAC_SNK=y
CONFIG_BT_ASCS_MAX_ASE_SNK_COUNT=2
CONFIG_BT_PAC_SRC=y
CONFIG_BT_ASCS_MAX_ASE_SRC_COUNT=2

# Support an ISO channel per ASE
Expand Down

0 comments on commit 5d71f71

Please sign in to comment.