From 43aed48c30da96c64ab03d603d5ed675bd7e4647 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 15 Oct 2025 14:16:51 -0400 Subject: [PATCH] bass: Only attach client if initiator 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 6501d361e..51ed45a21 100644 --- a/profiles/audio/bass.c +++ b/profiles/audio/bass.c @@ -1760,7 +1760,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.47.3