Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v1 0/6] Fix linked transports of an ASE not enabled yet
@ 2026-11-02 18:12 Luiz Augusto von Dentz
  2026-11-02 18:12 ` [PATCH BlueZ v1 1/6] client/scripts: Add bap-duplex-lc3.bt Luiz Augusto von Dentz
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-02 18:12 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When acting as an acceptor, a remote initiator may enable only one ASE of
a bidirectional CIS first, e.g. a phone in a voice call enabling the
Source ASE of a headset before its Sink ASE. Once the CIS is established,
the transport of the Sink ASE, still in QoS Configured, was set pending
along with its link, so an audio server would acquire it and either get
NotAuthorized, failing the working link as well, or have it made active
through the link while its ASE is not enabled.

Likewise, once both ASEs were acquired on their own, disabling one of
them set the transport of the other idle and disabled its ASE as well,
stopping the other direction.

The first patches add a functional test reproducing this, using the
Desynchronized property of an initiator in testing mode to enable and
disable each ASE separately, and the last ones fix it by only updating
the state and owner of a link once its ASE is enabled when acting as a
server, and by leaving links acquired on their own, or desynchronized,
alone when a transport is released.

Luiz Augusto von Dentz (6):
  client/scripts: Add bap-duplex-lc3.bt
  doc/functional-bap: Document the duplex unicast test cases
  test: functional: Cover enabling one ASE of a bidirectional CIS
  shared/bap: Add bt_bap_stream_is_client
  transport: Don't set linked transports pending before they are enabled
  transport: Don't disable desynchronized links on release

 client/scripts/bap-duplex-lc3.bt |  41 ++++++++
 doc/functional-bap.rst           | 105 +++++++++++++++++++
 profiles/audio/transport.c       |  95 ++++++++++++++++-
 src/shared/bap.c                 |   8 ++
 src/shared/bap.h                 |   2 +
 test/functional/test_bap.py      | 170 +++++++++++++++++++++++++++++++
 6 files changed, 418 insertions(+), 3 deletions(-)
 create mode 100644 client/scripts/bap-duplex-lc3.bt

-- 
2.56.0


^ permalink raw reply	[flat|nested] 9+ messages in thread
* [PATCH BlueZ v2 1/6] client/scripts: Add bap-duplex-lc3.bt
@ 2026-11-02 21:54 Luiz Augusto von Dentz
  2026-11-03  2:04 ` Fix linked transports of an ASE not enabled yet bluez.test.bot
  0 siblings, 1 reply; 9+ messages in thread
From: Luiz Augusto von Dentz @ 2026-11-02 21:54 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Register a PAC Sink and a PAC Source endpoint with LC3, both for Front
Left only, so a single CIS carries both directions, e.g. for a voice
call to a headset with a microphone, and describe how to enable and
disable each direction on its own.

Assisted-by: Claude:claude-opus-5-5
---
 client/scripts/bap-duplex-lc3.bt | 53 ++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 client/scripts/bap-duplex-lc3.bt

diff --git a/client/scripts/bap-duplex-lc3.bt b/client/scripts/bap-duplex-lc3.bt
new file mode 100644
index 000000000000..af82658b5df3
--- /dev/null
+++ b/client/scripts/bap-duplex-lc3.bt
@@ -0,0 +1,53 @@
+power on
+#
+#
+# Register a PAC Sink and a PAC Source endpoint with LC3, both for Front
+# Left only, e.g. a headset with a microphone in a voice call. Run on
+# both sides: the device that pairs is the initiator.
+#
+endpoint.register 00002bc9-0000-1000-8000-00805f9b34fb 0x06
+# Auto Accept: accept the configuration chosen by the peer
+y
+# Max Transports: no limit
+a
+# Locations: Front Left
+1
+# Supported Context: same as the contexts bluetoothctl registers with
+0x0fff
+# Context
+0x0fff
+# CIG: assigned automatically
+a
+# CIS: assigned automatically
+a
+endpoint.register 00002bcb-0000-1000-8000-00805f9b34fb 0x06
+# Auto Accept: accept the configuration chosen by the peer
+y
+# Max Transports: no limit
+a
+# Locations: Front Left
+1
+# Supported Context: same as the contexts bluetoothctl registers with
+0x000f
+# Context
+0x000f
+# CIG: assigned automatically
+a
+# CIS: assigned automatically
+a
+#
+#
+# With a single location, the stream of each direction uses the same
+# CIS, so the two transports are linked.
+#
+# To enable each direction on its own, as a phone may do in a voice
+# call, run bluetoothd with Testing = true on the initiator and, after
+# pairing, desynchronize the transports and acquire them one at a time:
+#
+# transport.desync /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/pac_sink0/fd0 on
+# transport.acquire /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/pac_source0/fd1
+# transport.acquire /org/bluez/hci0/dev_xx_xx_xx_xx_xx_xx/pac_sink0/fd0
+#
+# bluetoothctl on the acceptor acquires each transport once it is
+# pending, i.e. once its ASE is enabled, and transport.release on the
+# initiator disables the ASE of a transport alone.
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-03  2:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 18:12 [PATCH BlueZ v1 0/6] Fix linked transports of an ASE not enabled yet Luiz Augusto von Dentz
2026-11-02 18:12 ` [PATCH BlueZ v1 1/6] client/scripts: Add bap-duplex-lc3.bt Luiz Augusto von Dentz
2026-11-02 19:43   ` Fix linked transports of an ASE not enabled yet bluez.test.bot
2026-11-02 18:12 ` [PATCH BlueZ v1 2/6] doc/functional-bap: Document the duplex unicast test cases Luiz Augusto von Dentz
2026-11-02 18:12 ` [PATCH BlueZ v1 3/6] test: functional: Cover enabling one ASE of a bidirectional CIS Luiz Augusto von Dentz
2026-11-02 18:12 ` [PATCH BlueZ v1 4/6] shared/bap: Add bt_bap_stream_is_client Luiz Augusto von Dentz
2026-11-02 18:12 ` [PATCH BlueZ v1 5/6] transport: Don't set linked transports pending before they are enabled Luiz Augusto von Dentz
2026-11-02 18:12 ` [PATCH BlueZ v1 6/6] transport: Don't disable desynchronized links on release Luiz Augusto von Dentz
  -- strict thread matches above, loose matches on Subject: below --
2026-11-02 21:54 [PATCH BlueZ v2 1/6] client/scripts: Add bap-duplex-lc3.bt Luiz Augusto von Dentz
2026-11-03  2:04 ` Fix linked transports of an ASE not enabled yet 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