diff mbox series

[BlueZ,v1,3/3] a2dp: Don't wait to reconfigure

Message ID 20241106154917.64459-3-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v1,1/3] sink: Fix transitioning to BTD_SERVICE_STATE_DISCONNECTED on idle | expand

Commit Message

Luiz Augusto von Dentz Nov. 6, 2024, 3:49 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If the stream has been confirmed to be closed it should be safe to
attempt to send SetConfiguration without having to wait for a period
since the remote end can assume no new stream would be created it may
end up disconnecting the session.
---
 profiles/audio/a2dp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 37332abcad57..c97bd6e89deb 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -58,7 +58,6 @@ 
 /* The duration that streams without users are allowed to stay in
  * STREAMING state. */
 #define SUSPEND_TIMEOUT 5
-#define RECONFIGURE_TIMEOUT 500
 
 #define AVDTP_PSM 25
 
@@ -1398,7 +1397,7 @@  static bool setup_reconfigure(struct a2dp_setup *setup)
 
 	DBG("%p", setup);
 
-	setup->id = g_timeout_add(RECONFIGURE_TIMEOUT, a2dp_reconfigure, setup);
+	setup->id = g_idle_add(a2dp_reconfigure, setup);
 
 	setup->reconfigure = FALSE;