From a5ca7894d9cb4245e9e43edf5e3da5743dba4d47 Mon Sep 17 00:00:00 2001 From: Vinit Mehta Date: Fri, 18 Jul 2025 14:29:38 +0530 Subject: [PATCH] samples: bluetooth: pbp_public_broadcast: Fix PACS register issue - Add sink PACS register for PBP public broadcast sink example to make it work with PBP broadcast source Signed-off-by: Vinit Mehta --- .../bluetooth/pbp_public_broadcast_sink/src/main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/samples/bluetooth/pbp_public_broadcast_sink/src/main.c b/samples/bluetooth/pbp_public_broadcast_sink/src/main.c index 63f4609a03232..40e40c242f696 100644 --- a/samples/bluetooth/pbp_public_broadcast_sink/src/main.c +++ b/samples/bluetooth/pbp_public_broadcast_sink/src/main.c @@ -327,14 +327,23 @@ static int reset(void) int bap_broadcast_sink_init(void) { int err; + const struct bt_pacs_register_param pacs_param = { + .snk_pac = true, + .snk_loc = true, + }; bt_bap_broadcast_sink_register_cb(&broadcast_sink_cbs); bt_le_per_adv_sync_cb_register(&broadcast_sync_cb); + err = bt_pacs_register(&pacs_param); + if (err != 0) { + printk("Could not register PACS (err %d)\n", err); + return err; + } + err = bt_pacs_cap_register(BT_AUDIO_DIR_SINK, &cap); - if (err) { + if (err != 0) { printk("Capability register failed (err %d)\n", err); - return err; }