From 0334853e42e84c22f6a7b93a1c92c92ac460fc86 Mon Sep 17 00:00:00 2001 From: Emil Gydesen Date: Fri, 4 Mar 2022 11:32:48 +0100 Subject: [PATCH] samples: Bluetooth: unicast_audio_server multi-cis support Add support for multiple CIS. Signed-off-by: Emil Gydesen --- samples/bluetooth/unicast_audio_server/prj.conf | 4 ++++ samples/bluetooth/unicast_audio_server/src/main.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/samples/bluetooth/unicast_audio_server/prj.conf b/samples/bluetooth/unicast_audio_server/prj.conf index a02ad5cd0c0..caaca0af02f 100644 --- a/samples/bluetooth/unicast_audio_server/prj.conf +++ b/samples/bluetooth/unicast_audio_server/prj.conf @@ -3,6 +3,10 @@ CONFIG_BT_DEBUG_LOG=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_AUDIO=y CONFIG_BT_AUDIO_UNICAST_SERVER=y +CONFIG_BT_ASCS_ASE_SNK_COUNT=2 +CONFIG_BT_ASCS_ASE_SRC_COUNT=2 +# Support an ISO channel per ASE +CONFIG_BT_ISO_MAX_CHAN=4 CONFIG_BT_EXT_ADV=y CONFIG_BT_DEVICE_NAME="Unicast Audio Server" diff --git a/samples/bluetooth/unicast_audio_server/src/main.c b/samples/bluetooth/unicast_audio_server/src/main.c index 4effa6ca0ba..94e91485ee6 100644 --- a/samples/bluetooth/unicast_audio_server/src/main.c +++ b/samples/bluetooth/unicast_audio_server/src/main.c @@ -16,8 +16,6 @@ #include #include -#define MAX_PAC 1 - #define AVAILABLE_SINK_CONTEXT (BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED | \ BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL | \ BT_AUDIO_CONTEXT_TYPE_MEDIA | \ @@ -37,7 +35,7 @@ static struct bt_codec lc3_codec = BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED); static struct bt_conn *default_conn; -static struct bt_audio_stream streams[MAX_PAC]; +static struct bt_audio_stream streams[CONFIG_BT_ASCS_ASE_SNK_COUNT + CONFIG_BT_ASCS_ASE_SRC_COUNT]; static uint8_t unicast_server_addata[] = { BT_UUID_16_ENCODE(BT_UUID_ASCS_VAL), /* ASCS UUID */