* [PATCH BlueZ] a2dp: Don't suspend a sink stream on our own
@ 2026-11-24 13:21 Simon Mikuda
2026-11-24 20:37 ` [BlueZ] " bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Simon Mikuda @ 2026-11-24 13:21 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Simon Mikuda
When the remote source starts a stream that no transport owner takes
within 5 seconds, or the owner goes away without Release(), BlueZ
suspends the stream. Some phones then wait for us to resume it and
never start it again. PTS GAVDP/ACP/APP/TRC/BV-02-C fails the same way.
Leave suspending a sink stream to the remote source. Release() still
suspends it, and source streams keep the timer.
---
profiles/audio/a2dp.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index 3eb3e3bfd..d4d100986 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -1409,7 +1409,10 @@ static gboolean start_ind(struct avdtp *session, struct avdtp_local_sep *sep,
if (!a2dp_stream)
return FALSE;
- if (!a2dp_stream->locked)
+ /* Leave suspending a sink stream to the remote source: some phones
+ * wait for us to resume a stream we suspended.
+ */
+ if (!a2dp_stream->locked && a2dp_sep->type == AVDTP_SEP_TYPE_SOURCE)
a2dp_stream->suspend_timer = timeout_add_seconds(
SUSPEND_TIMEOUT,
(timeout_func_t) suspend_timeout,
@@ -3604,7 +3607,8 @@ gboolean a2dp_sep_unlock(struct a2dp_sep *sep, struct avdtp *session)
/* Set timer here */
break;
case AVDTP_STATE_STREAMING:
- if (avdtp_suspend(session, stream->stream) == 0)
+ if (sep->type == AVDTP_SEP_TYPE_SOURCE &&
+ avdtp_suspend(session, stream->stream) == 0)
stream->suspending = TRUE;
break;
case AVDTP_STATE_IDLE:
base-commit: 1608f836188610aabeff5a3164169ebe0360e443
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-24 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 13:21 [PATCH BlueZ] a2dp: Don't suspend a sink stream on our own Simon Mikuda
2026-11-24 20:37 ` [BlueZ] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox