bap: Set bap debug func at broadcast probe
authorIulia Tanasescu <iulia.tanasescu@nxp.com>
Thu, 19 Sep 2024 08:20:46 +0000 (11:20 +0300)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 20 Feb 2025 07:43:23 +0000 (16:43 +0900)
When a Broadcast Sink acting as a Scan Delegator probes a Broadcaster with
the help of a Broadcast Assistant, a new BAP session is added for the
Broadcaster device before additional session information is initialized
(like the bt_bap session). This causes the bap debug func to not be set
in bap_data_add.

This commit adds an explicit call to set the function after the bt_bap
session is created.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
profiles/audio/bap.c

index daebd88e94fbb36c539ef05483c0697f5d51b7b9..4ba5b4ebd34706617a8f874c8965584f21f6ef6f 100644 (file)
@@ -3245,6 +3245,9 @@ static int bap_bcast_probe(struct btd_service *service)
                free(data);
                return -EINVAL;
        }
+
+       bt_bap_set_debug(data->bap, bap_debug, NULL, NULL);
+
        data->bcast_snks = queue_new();
 
        if (!bt_bap_attach(data->bap, NULL)) {