Linux bluetooth development
 help / color / mirror / Atom feed
diff for duplicates of <cover.1794428234.git.luiz.von.dentz@intel.com>

diff --git a/a/1.txt b/N1/1.txt
index a0bea98..e08993f 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -1,39 +1,41 @@
 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(-)
+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
diff --git a/a/content_digest b/N1/content_digest
index fbcdcf0..3a6ce3e 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,47 +1,49 @@
  "From\0Luiz Augusto von Dentz <luiz.dentz@gmail.com>\0"
- "Subject\0[PATCH BlueZ v3 0/5] shared/bap: Don't disconnect a CIS still used by another ASE\0"
- "Date\0Wed, 11 Nov 2026 15:37:21 -0500\0"
+ "Subject\0[PATCH BlueZ v3 0/6] bap: Release cached ASEs on ClearConfiguration\0"
+ "Date\0Wed, 11 Nov 2026 15:37:27 -0500\0"
  "To\0linux-bluetooth@vger.kernel.org\0"
  "\00:1\0"
  "b\0"
  "From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>\n"
  "\n"
- "A remote initiator, e.g. a phone in a voice call, may enable the Source\n"
- "ASE of a CIS shared with a Sink ASE and then switch to the Sink ASE\n"
- "alone. The acceptor disconnected the CIS when the Source ASE detached\n"
- "from it, although the linked Sink ASE was still configured for it, and\n"
- "as the initiator does not request the CIS again, the Sink ASE was left\n"
- "enabled without a CIS and the voice stayed silent.\n"
- "\n"
- "Keep the CIS while another ASE is still configured for it. Unit tests\n"
- "cover releasing an ASE of a CIS kept by its link, of a shared CIS and\n"
- "switching the direction, and a functional test counts the CIS the\n"
- "acceptor is asked to accept.\n"
- "\n"
- "v2: Also tell the streams using the CIS of a linked stream when it is\n"
- "    lost, not only the ones that hold it themselves.\n"
- "\n"
- "v3: Hold the IO of a link when an ASE enabled again over the CIS its link\n"
- "    kept uses it (new patch 2/5), so disabling the link doesn't free the CIS\n"
- "    while the ASE streams. The functional test covers it, and counts the\n"
- "    second CIS requested after teardown.\n"
- "v2: Also tell the streams using the CIS of a linked stream when it is\n"
- "    lost, not only the ones that hold it themselves.\n"
- "\n"
- "Luiz Augusto von Dentz (5):\n"
- "  shared/bap: Don't disconnect a CIS still configured for a link\n"
- "  shared/bap: Hold the IO of a link when using it\n"
- "  unit/test-bap: Add tests for a CIS shared by two ASEs\n"
- "  doc/functional-bap: Document switching the direction of a CIS\n"
- "  test: functional: Cover switching the direction of a CIS\n"
- "\n"
- " doc/functional-bap.rst      |  44 +++++++\n"
- " src/shared/bap.c            |  91 +++++++++++----\n"
- " test/functional/test_bap.py |  86 ++++++++++++++\n"
- " unit/test-bap.c             | 227 ++++++++++++++++++++++++++++++++++++\n"
- " 4 files changed, 423 insertions(+), 25 deletions(-)\n"
+ "An acceptor may keep an ASE in Codec Configured, caching its codec\n"
+ "configuration, once the initiator removes the transport. The initiator\n"
+ "then has no way to get rid of it, as it no longer has a transport to\n"
+ "release.\n"
+ "\n"
+ "Release such cached ASEs on ClearConfiguration of an endpoint, and add\n"
+ "endpoint.clear to bluetoothctl to exercise it, with a functional test.\n"
+ "\n"
+ "This series is independent of the other two.\n"
+ "\n"
+ "v2: Wait for the release of the cached ASEs before replying to\n"
+ "    ClearConfiguration, validate the transport path of endpoint.clear and\n"
+ "    update the remote PAC of an ASE when it is reused (new patch 2/6).\n"
+ "\n"
+ "v3: Reply to ClearConfiguration once the cached ASEs are idle, and\n"
+ "    report a failed release as an error.\n"
+ "v2: Wait for the release of the cached ASEs before replying, validate the\n"
+ "    transport path of endpoint.clear and update the remote PAC of an ASE\n"
+ "    when it is reused (new patch 2/6).\n"
+ "\n"
+ "Luiz Augusto von Dentz (6):\n"
+ "  shared/bap: Add bt_bap_foreach_stream and bt_bap_stream_get_rpac\n"
+ "  shared/bap: Update the remote PAC when reusing an ASE\n"
+ "  bap: Release cached ASEs on ClearConfiguration of an endpoint\n"
+ "  client/player: Add endpoint.clear command\n"
+ "  doc/functional-bap: Document clearing a cached configuration\n"
+ "  test: functional: Cover clearing a cached configuration\n"
+ "\n"
+ " client/player.c               |  57 ++++++++++++\n"
+ " doc/bluetoothctl-endpoint.rst |  20 +++++\n"
+ " doc/functional-bap.rst        |  24 +++++\n"
+ " profiles/audio/bap.c          | 159 ++++++++++++++++++++++++++++++++--\n"
+ " src/shared/bap.c              |  32 +++++++\n"
+ " src/shared/bap.h              |   8 ++\n"
+ " test/functional/test_bap.py   |  23 +++++\n"
+ " 7 files changed, 314 insertions(+), 9 deletions(-)\n"
  "\n"
  "-- \n"
  2.56.0
 
-efd616214c916bd6d77b21b261a677b68d8fdbb2ab9dcdcf194866dc76ea2f52
+fca7a612162c6b9f2abc74911341b3fdbc265177cebc3436ba5176afb283ae07

diff --git a/a/1.txt b/N2/1.txt
index a0bea98..e1df7e0 100644
--- a/a/1.txt
+++ b/N2/1.txt
@@ -1,39 +1,43 @@
 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(-)
+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
diff --git a/a/content_digest b/N2/content_digest
index fbcdcf0..b24f6ea 100644
--- a/a/content_digest
+++ b/N2/content_digest
@@ -1,47 +1,51 @@
  "From\0Luiz Augusto von Dentz <luiz.dentz@gmail.com>\0"
- "Subject\0[PATCH BlueZ v3 0/5] shared/bap: Don't disconnect a CIS still used by another ASE\0"
- "Date\0Wed, 11 Nov 2026 15:37:21 -0500\0"
+ "Subject\0[PATCH BlueZ v3 0/8] transport: Hand the owner over to a link still streaming\0"
+ "Date\0Wed, 11 Nov 2026 15:37:34 -0500\0"
  "To\0linux-bluetooth@vger.kernel.org\0"
  "\00:1\0"
  "b\0"
  "From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>\n"
  "\n"
- "A remote initiator, e.g. a phone in a voice call, may enable the Source\n"
- "ASE of a CIS shared with a Sink ASE and then switch to the Sink ASE\n"
- "alone. The acceptor disconnected the CIS when the Source ASE detached\n"
- "from it, although the linked Sink ASE was still configured for it, and\n"
- "as the initiator does not request the CIS again, the Sink ASE was left\n"
- "enabled without a CIS and the voice stayed silent.\n"
- "\n"
- "Keep the CIS while another ASE is still configured for it. Unit tests\n"
- "cover releasing an ASE of a CIS kept by its link, of a shared CIS and\n"
- "switching the direction, and a functional test counts the CIS the\n"
- "acceptor is asked to accept.\n"
- "\n"
- "v2: Also tell the streams using the CIS of a linked stream when it is\n"
- "    lost, not only the ones that hold it themselves.\n"
- "\n"
- "v3: Hold the IO of a link when an ASE enabled again over the CIS its link\n"
- "    kept uses it (new patch 2/5), so disabling the link doesn't free the CIS\n"
- "    while the ASE streams. The functional test covers it, and counts the\n"
- "    second CIS requested after teardown.\n"
- "v2: Also tell the streams using the CIS of a linked stream when it is\n"
- "    lost, not only the ones that hold it themselves.\n"
- "\n"
- "Luiz Augusto von Dentz (5):\n"
- "  shared/bap: Don't disconnect a CIS still configured for a link\n"
- "  shared/bap: Hold the IO of a link when using it\n"
- "  unit/test-bap: Add tests for a CIS shared by two ASEs\n"
- "  doc/functional-bap: Document switching the direction of a CIS\n"
- "  test: functional: Cover switching the direction of a CIS\n"
- "\n"
- " doc/functional-bap.rst      |  44 +++++++\n"
- " src/shared/bap.c            |  91 +++++++++++----\n"
- " test/functional/test_bap.py |  86 ++++++++++++++\n"
- " unit/test-bap.c             | 227 ++++++++++++++++++++++++++++++++++++\n"
- " 4 files changed, 423 insertions(+), 25 deletions(-)\n"
+ "When one ASE of a shared CIS is disabled alone, e.g. a microphone closed\n"
+ "while media keeps playing, the transport leaving streaming took the\n"
+ "owner, and so the state, of its linked transport with it: the audio\n"
+ "server stopped the stream of the other ASE while it kept receiving data.\n"
+ "\n"
+ "Hand the owner over to a link still streaming instead (not while the\n"
+ "transport is being released or has a pending request), and clear the\n"
+ "owner of desynchronized links when removing it, which fixes a\n"
+ "use-after-free at teardown. A unit test and functional tests cover it.\n"
+ "\n"
+ "This series applies on top of \"shared/bap: Don't disconnect a CIS still\n"
+ "used by another ASE\" (1-cis-switch), as the unit test reuses the test\n"
+ "helpers added there.\n"
+ "\n"
+ "v2: Start the multiline comment of patch 3 on the line after /*. Rebased\n"
+ "    on v2 of the first series.\n"
+ "\n"
+ "v3: Start the multiline comment of patch 1 on the line after /*, and\n"
+ "    rebase on v3 of the first series.\n"
+ "v2: Start the multiline comment of patch 3 on the line after /*.\n"
+ "\n"
+ "Kannan J (2):\n"
+ "  transport: Hand the owner over to a link still streaming\n"
+ "  unit/test-bap: Add test for disabling one ASE of a shared CIS\n"
+ "\n"
+ "Luiz Augusto von Dentz (6):\n"
+ "  transport: Clear the owner of desynchronized links when removing it\n"
+ "  transport: Don't hand the owner over while releasing\n"
+ "  doc/functional-bap: Document disabling one ASE of a shared owner\n"
+ "  test: functional: Cover disabling one ASE of a shared owner\n"
+ "  doc/functional-bap: Document releasing a shared owner\n"
+ "  test: functional: Cover releasing a shared owner\n"
+ "\n"
+ " doc/functional-bap.rst      | 58 ++++++++++++++++++++++++\n"
+ " profiles/audio/transport.c  | 64 ++++++++++++++++++++++++--\n"
+ " test/functional/test_bap.py | 66 +++++++++++++++++++++++++++\n"
+ " unit/test-bap.c             | 90 +++++++++++++++++++++++++++++++++++++\n"
+ " 4 files changed, 275 insertions(+), 3 deletions(-)\n"
  "\n"
  "-- \n"
  2.56.0
 
-efd616214c916bd6d77b21b261a677b68d8fdbb2ab9dcdcf194866dc76ea2f52
+6f3ec3bcda6152fc6aaac654233e5140240c1c93daa3146b9d0f41d0daec28d9

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