diff mbox series

[BlueZ,v3,1/7] bap: Fix not setting SID for broadcast receiver

Message ID 20250416160433.1822263-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v3,1/7] bap: Fix not setting SID for broadcast receiver | expand

Commit Message

Luiz Augusto von Dentz April 16, 2025, 4:04 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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(+)

Comments

patchwork-bot+bluetooth@kernel.org April 16, 2025, 7 p.m. UTC | #1
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 16 Apr 2025 12:04:27 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [BlueZ,v3,1/7] bap: Fix not setting SID for broadcast receiver
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=890149c1fb56
  - [BlueZ,v3,2/7] btdev: Check for valid SID on BT_HCI_CMD_LE_PA_CREATE_SYNC
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=709aa00a1e50
  - [BlueZ,v3,3/7] btdev: Fix not matching SID on le_pa_sync_estabilished
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=e5a27a9c7b68
  - [BlueZ,v3,4/7] iso-tester: Add test for SID=0xff
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7e67dc9dcb9e
  - [BlueZ,v3,5/7] iso-tester: Test getpeername return SID
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=b4c5300f5304
  - [BlueZ,v3,6/7] btio: Add support to BT_IO_OPT_ISO_BC_SID to bt_io_get
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=64e7377d455b
  - [BlueZ,v3,7/7] bap: Add support for using SID for broadcast receiver
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=aedd7b936b72

You are awesome, thank you!
diff mbox series

Patch

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index fd9b751cc1bf..24763666ce96 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);