diff --git a/tests/bluetooth/audio/cap_commander/uut/CMakeLists.txt b/tests/bluetooth/audio/cap_commander/uut/CMakeLists.txt index d91bfbcbe7a9fce..1213c9573673a0d 100644 --- a/tests/bluetooth/audio/cap_commander/uut/CMakeLists.txt +++ b/tests/bluetooth/audio/cap_commander/uut/CMakeLists.txt @@ -11,6 +11,7 @@ add_library(uut STATIC ${ZEPHYR_BASE}/subsys/bluetooth/audio/cap_common.c ${ZEPHYR_BASE}/subsys/logging/log_minimal.c ${ZEPHYR_BASE}/subsys/net/buf_simple.c + bap_broadcast_assistant.c csip.c vcp.c vocs.c diff --git a/tests/bluetooth/audio/cap_commander/uut/bap_broadcast_assistant.c b/tests/bluetooth/audio/cap_commander/uut/bap_broadcast_assistant.c new file mode 100644 index 000000000000000..193cdf7e0720220 --- /dev/null +++ b/tests/bluetooth/audio/cap_commander/uut/bap_broadcast_assistant.c @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "zephyr/bluetooth/audio/bap.h" + +static struct bt_bap_broadcast_assistant_cb *broadcast_assistant_cbs; + +int bt_bap_broadcast_assistant_register_cb(struct bt_bap_broadcast_assistant_cb *cb) +{ + broadcast_assistant_cbs = cb; + + return 0; +} + +int bt_bap_broadcast_assistant_add_src(struct bt_conn *conn, + const struct bt_bap_broadcast_assistant_add_src_param *param) +{ + /* Note that proper parameter checking is done in the caller */ + zassert_not_null(conn, "conn is NULL"); + zassert_not_null(param, "param is NULL"); + + if (broadcast_assistant_cbs->add_src != NULL) { + broadcast_assistant_cbs->add_src(conn, 0); + } + + return 0; +}