public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] a2dp: start connecting sink profile before source
@ 2026-02-15 12:54 Pauli Virtanen
  2026-02-15 14:16 ` [BlueZ] " bluez.test.bot
  2026-02-16  8:16 ` [PATCH BlueZ] " Pauli Virtanen
  0 siblings, 2 replies; 4+ messages in thread
From: Pauli Virtanen @ 2026-02-15 12:54 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Since cdcd845f87ee the order in which profiles with the same priority are
connected is the same order as btd_profile_register() is called, instead
of being the opposite order.

When initiating connections, we want to prefer a2dp-sink profile over
a2dp-source, as connecting both at the same time does not work
currently.

So swap the order of registration, to restore the previous behavior.

Fixes: https://github.com/bluez/bluez/issues/1898
---
 profiles/audio/a2dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 7a37003a2..7216ed017 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -3796,8 +3796,8 @@ static struct btd_adapter_driver media_driver = {
 static int a2dp_init(void)
 {
 	btd_register_adapter_driver(&media_driver);
-	btd_profile_register(&a2dp_source_profile);
 	btd_profile_register(&a2dp_sink_profile);
+	btd_profile_register(&a2dp_source_profile);
 
 	return 0;
 }
-- 
2.53.0


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

end of thread, other threads:[~2026-02-16 14:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-15 12:54 [PATCH BlueZ] a2dp: start connecting sink profile before source Pauli Virtanen
2026-02-15 14:16 ` [BlueZ] " bluez.test.bot
2026-02-16  8:16 ` [PATCH BlueZ] " Pauli Virtanen
2026-02-16 14:42   ` Luiz Augusto von Dentz

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