[PATCH BlueZ v2] bap: Fix not setting adapter address type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

This fixes not setting adapter address type when listening/connecting
ISO sockets which prevents them working when adapter comes unconfigured
which then gets assigned a random address.
---
 profiles/audio/bap.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 964ba9c21..315eff729 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1856,6 +1856,8 @@ static void setup_connect_io(struct bap_data *data, struct bap_setup *setup,
 	io = bt_io_connect(bap_connect_io_cb, setup, NULL, &err,
 				BT_IO_OPT_SOURCE_BDADDR,
 				btd_adapter_get_address(adapter),
+				BT_IO_OPT_SOURCE_TYPE,
+				btd_adapter_get_address_type(data->adapter),
 				BT_IO_OPT_DEST_BDADDR,
 				device_get_address(data->device),
 				BT_IO_OPT_DEST_TYPE,
@@ -1912,6 +1914,8 @@ static void setup_connect_io_broadcast(struct bap_data *data,
 	io = bt_io_connect(bap_connect_bcast_io_cb, setup, NULL, &err,
 			BT_IO_OPT_SOURCE_BDADDR,
 			btd_adapter_get_address(adapter),
+			BT_IO_OPT_SOURCE_TYPE,
+			btd_adapter_get_address_type(adapter),
 			BT_IO_OPT_DEST_BDADDR,
 			&dst_addr,
 			BT_IO_OPT_DEST_TYPE,
@@ -1952,6 +1956,8 @@ static void setup_listen_io(struct bap_data *data, struct bt_bap_stream *stream,
 	io = bt_io_listen(NULL, iso_confirm_cb, data, NULL, &err,
 				BT_IO_OPT_SOURCE_BDADDR,
 				btd_adapter_get_address(adapter),
+				BT_IO_OPT_SOURCE_TYPE,
+				btd_adapter_get_address_type(adapter),
 				BT_IO_OPT_DEST_BDADDR,
 				BDADDR_ANY,
 				BT_IO_OPT_DEST_TYPE,
@@ -2734,6 +2740,8 @@ static int short_lived_pa_sync(struct bap_bcast_pa_req *req)
 			NULL, &err,
 			BT_IO_OPT_SOURCE_BDADDR,
 			btd_adapter_get_address(data->adapter),
+			BT_IO_OPT_SOURCE_TYPE,
+			btd_adapter_get_address_type(data->adapter),
 			BT_IO_OPT_DEST_BDADDR,
 			device_get_address(data->device),
 			BT_IO_OPT_DEST_TYPE,
-- 
2.44.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux