From 0188cea88245e510ed55820286b4811cc3e32f31 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 11 Apr 2025 15:14:42 -0400 Subject: [PATCH] bap: Fix not setting SID for broadcast receiver SID most be set otherwise 0x00 is assume which may not be what the broadcast source is using over the air. but since we don't have access to the SID of the advertisement in userspace mark de SID as invalid (0xff) so the kernel fill it up while scanning when creating the PA sync. --- profiles/audio/bap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index fd9b751cc1..2b2eb3afb7 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -2813,6 +2813,7 @@ static void bap_detached(struct bt_bap *bap, void *user_data) static int pa_sync(struct bap_data *data) { GError *err = NULL; + uint8_t sid = 0xff; if (data->listen_io) { DBG("Already probed"); @@ -2833,6 +2834,7 @@ static int pa_sync(struct bap_data *data) btd_device_get_bdaddr_type(data->device), BT_IO_OPT_MODE, BT_IO_MODE_ISO, BT_IO_OPT_QOS, &bap_sink_pa_qos, + BT_IO_OPT_ISO_BC_SID, &sid, BT_IO_OPT_INVALID); if (!data->listen_io) { error("%s", err->message);