public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 01/13] bass: Only attach client if initiator
@ 2025-10-16 21:00 Luiz Augusto von Dentz
  2025-10-16 21:00 ` [PATCH BlueZ v1 02/13] device: Add initial support for setting DEVICE_FLAG_PAST Luiz Augusto von Dentz
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Luiz Augusto von Dentz @ 2025-10-16 21:00 UTC (permalink / raw)
  To: linux-bluetooth

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

This makes calling to bt_bass_attach conditional to being the initiator
of the connection, otherwise both device may act as both roles which is
not recommended.
---
 profiles/audio/bass.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/profiles/audio/bass.c b/profiles/audio/bass.c
index d42740ca4afb..e4d343a1fc02 100644
--- a/profiles/audio/bass.c
+++ b/profiles/audio/bass.c
@@ -1735,7 +1735,11 @@ static int bass_accept(struct btd_service *service)
 		return -EINVAL;
 	}
 
-	if (!bt_bass_attach(data->bass, client)) {
+	/* Only attach client if initiator of the connection otherwise act as
+	 * delegator.
+	 */
+	if (btd_service_is_initiator(service) &&
+			!bt_bass_attach(data->bass, client)) {
 		error("BASS unable to attach");
 		return -EINVAL;
 	}
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-10-27 13:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 21:00 [PATCH BlueZ v1 01/13] bass: Only attach client if initiator Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 02/13] device: Add initial support for setting DEVICE_FLAG_PAST Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 03/13] bass: Add " Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 04/13] MediaAssistant: Add Device option to Push Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 05/13] shared/bap: Add bt_bap_get_db Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 06/13] shared/bap: Fix no calling attach callback on bt_bap_attach_broadcast Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 07/13] shared/bap: Fix bt_bap_stream_io_get_qos for broadcast streams Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 08/13] gatt-database: Add btd_gatt_database_get and btd_gatt_database_get_adapter Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 09/13] bass: Implement Device option for Push Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 10/13] client/assistant: Handle assistant.push to own broadcasts Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 11/13] client/assistant: Detect if object already contains a valid BCode Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 12/13] client: Add script that setup a broadcast source with 2 BIS Luiz Augusto von Dentz
2025-10-16 21:00 ` [PATCH BlueZ v1 13/13] client: Add script for testing Broadcast Delegator Luiz Augusto von Dentz
2025-10-16 22:28 ` [BlueZ,v1,01/13] bass: Only attach client if initiator bluez.test.bot
2025-10-24 20:30 ` [PATCH BlueZ v1 01/13] " patchwork-bot+bluetooth
2025-10-27 13:50 ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox