Linux bluetooth development
 help / color / mirror / Atom feed
* [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

* RE: [BlueZ] a2dp: Don't suspend a sink stream on our own
  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.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-11-24 20:37 UTC (permalink / raw)
  To: linux-bluetooth, simon.mikuda

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1220855/

---Test result---

Test Summary:
CheckPatch                    PASS      0.20 seconds
GitLint                       PASS      0.15 seconds
BuildEll                      PASS      13.29 seconds
BluezMake                     PASS      202.01 seconds
MakeCheck                     PASS      2.51 seconds
MakeDistcheck                 PASS      103.59 seconds
CheckValgrind                 PASS      107.82 seconds
CheckSmatch                   PASS      183.57 seconds
bluezmakeextell               PASS      65.62 seconds
TestFunctional                PASS      925.41 seconds
IncrementalBuild              PASS      205.15 seconds
ScanBuild                     PASS      686.82 seconds



https://github.com/bluez/bluez/pull/2901

---
Regards,
Linux Bluetooth


^ permalink raw reply	[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