From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v3 0/5] shared/bap: Don't disconnect a CIS still used by another ASE
Date: Wed, 11 Nov 2026 15:37:21 -0500 [thread overview]
Message-ID: <cover.1794428234.git.luiz.von.dentz@intel.com> (raw)
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
A remote initiator, e.g. a phone in a voice call, may enable the Source
ASE of a CIS shared with a Sink ASE and then switch to the Sink ASE
alone. The acceptor disconnected the CIS when the Source ASE detached
from it, although the linked Sink ASE was still configured for it, and
as the initiator does not request the CIS again, the Sink ASE was left
enabled without a CIS and the voice stayed silent.
Keep the CIS while another ASE is still configured for it. Unit tests
cover releasing an ASE of a CIS kept by its link, of a shared CIS and
switching the direction, and a functional test counts the CIS the
acceptor is asked to accept.
v2: Also tell the streams using the CIS of a linked stream when it is
lost, not only the ones that hold it themselves.
v3: Hold the IO of a link when an ASE enabled again over the CIS its link
kept uses it (new patch 2/5), so disabling the link doesn't free the CIS
while the ASE streams. The functional test covers it, and counts the
second CIS requested after teardown.
v2: Also tell the streams using the CIS of a linked stream when it is
lost, not only the ones that hold it themselves.
Luiz Augusto von Dentz (5):
shared/bap: Don't disconnect a CIS still configured for a link
shared/bap: Hold the IO of a link when using it
unit/test-bap: Add tests for a CIS shared by two ASEs
doc/functional-bap: Document switching the direction of a CIS
test: functional: Cover switching the direction of a CIS
doc/functional-bap.rst | 44 +++++++
src/shared/bap.c | 91 +++++++++++----
test/functional/test_bap.py | 86 ++++++++++++++
unit/test-bap.c | 227 ++++++++++++++++++++++++++++++++++++
4 files changed, 423 insertions(+), 25 deletions(-)
--
2.56.0
WARNING: multiple messages have this Message-ID (diff)
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v3 0/6] bap: Release cached ASEs on ClearConfiguration
Date: Wed, 11 Nov 2026 15:37:27 -0500 [thread overview]
Message-ID: <cover.1794428234.git.luiz.von.dentz@intel.com> (raw)
Message-ID: <20261111203727._KemEhYsa58qvHSRE0Gz_bwmUXfOvDQ2ulF2r7KDrgc@z> (raw)
In-Reply-To: <cover.1794428234.git.luiz.von.dentz@intel.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
An acceptor may keep an ASE in Codec Configured, caching its codec
configuration, once the initiator removes the transport. The initiator
then has no way to get rid of it, as it no longer has a transport to
release.
Release such cached ASEs on ClearConfiguration of an endpoint, and add
endpoint.clear to bluetoothctl to exercise it, with a functional test.
This series is independent of the other two.
v2: Wait for the release of the cached ASEs before replying to
ClearConfiguration, validate the transport path of endpoint.clear and
update the remote PAC of an ASE when it is reused (new patch 2/6).
v3: Reply to ClearConfiguration once the cached ASEs are idle, and
report a failed release as an error.
v2: Wait for the release of the cached ASEs before replying, validate the
transport path of endpoint.clear and update the remote PAC of an ASE
when it is reused (new patch 2/6).
Luiz Augusto von Dentz (6):
shared/bap: Add bt_bap_foreach_stream and bt_bap_stream_get_rpac
shared/bap: Update the remote PAC when reusing an ASE
bap: Release cached ASEs on ClearConfiguration of an endpoint
client/player: Add endpoint.clear command
doc/functional-bap: Document clearing a cached configuration
test: functional: Cover clearing a cached configuration
client/player.c | 57 ++++++++++++
doc/bluetoothctl-endpoint.rst | 20 +++++
doc/functional-bap.rst | 24 +++++
profiles/audio/bap.c | 159 ++++++++++++++++++++++++++++++++--
src/shared/bap.c | 32 +++++++
src/shared/bap.h | 8 ++
test/functional/test_bap.py | 23 +++++
7 files changed, 314 insertions(+), 9 deletions(-)
--
2.56.0
WARNING: multiple messages have this Message-ID (diff)
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v3 0/8] transport: Hand the owner over to a link still streaming
Date: Wed, 11 Nov 2026 15:37:34 -0500 [thread overview]
Message-ID: <cover.1794428234.git.luiz.von.dentz@intel.com> (raw)
Message-ID: <20261111203734.bz7DvNphUvxqqsZUIz5RQCQMHJPaoxRrnQ9B0NrsKNk@z> (raw)
In-Reply-To: <cover.1794428234.git.luiz.von.dentz@intel.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When one ASE of a shared CIS is disabled alone, e.g. a microphone closed
while media keeps playing, the transport leaving streaming took the
owner, and so the state, of its linked transport with it: the audio
server stopped the stream of the other ASE while it kept receiving data.
Hand the owner over to a link still streaming instead (not while the
transport is being released or has a pending request), and clear the
owner of desynchronized links when removing it, which fixes a
use-after-free at teardown. A unit test and functional tests cover it.
This series applies on top of "shared/bap: Don't disconnect a CIS still
used by another ASE" (1-cis-switch), as the unit test reuses the test
helpers added there.
v2: Start the multiline comment of patch 3 on the line after /*. Rebased
on v2 of the first series.
v3: Start the multiline comment of patch 1 on the line after /*, and
rebase on v3 of the first series.
v2: Start the multiline comment of patch 3 on the line after /*.
Kannan J (2):
transport: Hand the owner over to a link still streaming
unit/test-bap: Add test for disabling one ASE of a shared CIS
Luiz Augusto von Dentz (6):
transport: Clear the owner of desynchronized links when removing it
transport: Don't hand the owner over while releasing
doc/functional-bap: Document disabling one ASE of a shared owner
test: functional: Cover disabling one ASE of a shared owner
doc/functional-bap: Document releasing a shared owner
test: functional: Cover releasing a shared owner
doc/functional-bap.rst | 58 ++++++++++++++++++++++++
profiles/audio/transport.c | 64 ++++++++++++++++++++++++--
test/functional/test_bap.py | 66 +++++++++++++++++++++++++++
unit/test-bap.c | 90 +++++++++++++++++++++++++++++++++++++
4 files changed, 275 insertions(+), 3 deletions(-)
--
2.56.0
next reply other threads:[~2026-11-11 20:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 20:37 Luiz Augusto von Dentz [this message]
2026-11-11 20:37 ` [PATCH BlueZ v3 1/5] shared/bap: Don't disconnect a CIS still configured for a link Luiz Augusto von Dentz
2026-11-12 0:37 ` shared/bap: Don't disconnect a CIS still used by another ASE bluez.test.bot
2026-11-11 20:37 ` [PATCH BlueZ v3 2/5] shared/bap: Hold the IO of a link when using it Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 3/5] unit/test-bap: Add tests for a CIS shared by two ASEs Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 4/5] doc/functional-bap: Document switching the direction of a CIS Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 5/5] test: functional: Cover " Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 0/6] bap: Release cached ASEs on ClearConfiguration Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 1/6] shared/bap: Add bt_bap_foreach_stream and bt_bap_stream_get_rpac Luiz Augusto von Dentz
2026-11-12 2:06 ` [BlueZ,v3,1/6] " bluez.test.bot
2026-11-11 20:37 ` [PATCH BlueZ v3 2/6] shared/bap: Update the remote PAC when reusing an ASE Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 3/6] bap: Release cached ASEs on ClearConfiguration of an endpoint Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 4/6] client/player: Add endpoint.clear command Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 5/6] doc/functional-bap: Document clearing a cached configuration Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 6/6] test: functional: Cover " Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 0/8] transport: Hand the owner over to a link still streaming Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 1/8] " Luiz Augusto von Dentz
2026-11-12 2:13 ` [BlueZ,v3,1/8] " bluez.test.bot
2026-11-11 20:37 ` [PATCH BlueZ v3 2/8] unit/test-bap: Add test for disabling one ASE of a shared CIS Luiz Augusto von Dentz
2026-11-12 0:37 ` [BlueZ,v3,2/8] " bluez.test.bot
2026-11-11 20:37 ` [PATCH BlueZ v3 3/8] transport: Clear the owner of desynchronized links when removing it Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 4/8] transport: Don't hand the owner over while releasing Luiz Augusto von Dentz
2026-11-12 0:37 ` [BlueZ,v3,4/8] " bluez.test.bot
2026-11-11 20:37 ` [PATCH BlueZ v3 5/8] doc/functional-bap: Document disabling one ASE of a shared owner Luiz Augusto von Dentz
2026-11-12 0:37 ` [BlueZ,v3,5/8] " bluez.test.bot
2026-11-11 20:37 ` [PATCH BlueZ v3 6/8] test: functional: Cover " Luiz Augusto von Dentz
2026-11-12 0:37 ` [BlueZ,v3,6/8] " bluez.test.bot
2026-11-11 20:37 ` [PATCH BlueZ v3 7/8] doc/functional-bap: Document releasing " Luiz Augusto von Dentz
2026-11-11 20:37 ` [PATCH BlueZ v3 8/8] test: functional: Cover " Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1794428234.git.luiz.von.dentz@intel.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox