* [PATCH BlueZ v2 1/3] audio: Add ability to force CIS transport Links property
@ 2026-04-23 7:53 Frédéric Danis
2026-04-23 7:53 ` [PATCH BlueZ v2 2/3] doc: Add documentation for readwrite " Frédéric Danis
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Frédéric Danis @ 2026-04-23 7:53 UTC (permalink / raw)
To: linux-bluetooth
If bluetoothd is started in testing mode the Links property for CIS
is readwrite and can be used to force transport objects Links.
This can used to unlink transport objects by sending an empty array.
For unlinked transport objects, each transports needs to be acquired
separately.
This allows to pass PTS tests BAP/UCL/STR/BV-543-C and BV-546-C.
---
v1 -> v2:
- Add testing mode check in bap_connect_io_cb()
- Replace stream state check by checking that the stream is not linked
before passing the connect event to all streams belonging to same
CIG/CIS.
profiles/audio/bap.c | 46 ++++++++++++++++++++++++++++++
profiles/audio/transport.c | 57 +++++++++++++++++++++++++++++++-------
2 files changed, 95 insertions(+), 10 deletions(-)
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 5333267f7..e20456436 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -2655,13 +2655,61 @@ static void bap_connect_bcast_io_cb(GIOChannel *chan, GError *err,
iso_connect_bcast_cb(chan, err, setup->stream);
}
+struct connect_io_data {
+ GIOChannel *chan;
+ GError *err;
+ uint8_t cig_id;
+ uint8_t cis_id;
+};
+
+static void connect_stream(void *data, void *user_data)
+{
+ struct bap_setup *setup = data;
+ struct connect_io_data *d = user_data;
+ uint8_t state;
+
+ /* Check stream state to only pass the connect event managed
+ * by bap_stream_set_io() */
+ state = bt_bap_stream_get_state(setup->stream);
+ if ((state == BT_BAP_STREAM_STATE_ENABLING ||
+ state == BT_BAP_STREAM_STATE_DISABLING) &&
+ setup->qos.ucast.cig_id == d->cig_id &&
+ setup->qos.ucast.cis_id == d->cis_id)
+ iso_connect_cb(d->chan, d->err, setup->stream);
+}
+
+static void connect_ep(void *data, void *user_data)
+{
+ struct bap_ep *ep = data;
+
+ if (ep->setups)
+ queue_foreach(ep->setups, connect_stream, user_data);
+}
+
static void bap_connect_io_cb(GIOChannel *chan, GError *err, gpointer user_data)
{
struct bap_setup *setup = user_data;
+ struct connect_io_data data;
if (!setup->stream)
return;
+ if (queue_isempty(bt_bap_stream_io_get_links(setup->stream)) &&
+ btd_opts.testing) {
+ /* The stream may have manually been unliked for PTS tests,
+ * e.g. BAP/UCL/STR/BV-543-C or BAP/UCL/STR/BV-546-C,
+ * in this case send the connect event to all streams
+ * belonging to the same CIG/CIS.
+ */
+ data.chan = chan;
+ data.err = err;
+ data.cig_id = setup->qos.ucast.cig_id;
+ data.cis_id = setup->qos.ucast.cis_id;
+ queue_foreach(setup->ep->data->snks, connect_ep, &data);
+ queue_foreach(setup->ep->data->srcs, connect_ep, &data);
+ return;
+ }
+
iso_connect_cb(chan, err, setup->stream);
}
diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 5c2a2777e..b6a5dd1fd 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -37,6 +37,7 @@
#include "src/shared/bap.h"
#include "src/shared/bass.h"
#include "src/shared/io.h"
+#include "src/btd.h"
#ifdef HAVE_A2DP
#include "avdtp.h"
@@ -114,6 +115,7 @@ struct bap_transport {
struct media_transport_ops {
const char *uuid;
const GDBusPropertyTable *properties;
+ const GDBusPropertyTable *test_properties;
void (*set_owner)(struct media_transport *transport,
struct media_owner *owner);
void (*remove_owner)(struct media_transport *transport,
@@ -1419,6 +1421,9 @@ static struct media_transport *find_transport_by_path(const char *path)
return NULL;
}
+static void bap_update_links(const struct media_transport *transport);
+static void transport_unlink(void *data, void *user_data);
+
static void set_links(const GDBusPropertyTable *property,
DBusMessageIter *iter,
GDBusPendingPropertySet id, void *user_data)
@@ -1436,6 +1441,16 @@ static void set_links(const GDBusPropertyTable *property,
dbus_message_iter_recurse(iter, &array);
+ if (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_INVALID) {
+ struct queue *links = bt_bap_stream_io_get_links(bap->stream);
+
+ /* Unlink stream from all its links */
+ queue_foreach(links, transport_unlink, bap->stream);
+
+ bt_bap_stream_io_unlink(bap->stream, NULL);
+ bap_update_links(transport);
+ }
+
while (dbus_message_iter_get_arg_type(&array) ==
DBUS_TYPE_OBJECT_PATH) {
struct media_transport *link;
@@ -1486,6 +1501,21 @@ static const GDBusPropertyTable transport_bap_uc_properties[] = {
{ }
};
+static const GDBusPropertyTable transport_bap_uc_test_properties[] = {
+ { "Device", "o", get_device },
+ { "UUID", "s", get_uuid },
+ { "Codec", "y", get_codec },
+ { "Configuration", "ay", get_configuration },
+ { "State", "s", get_state },
+ { "QoS", "a{sv}", get_ucast_qos, NULL, qos_ucast_exists },
+ { "Endpoint", "o", get_endpoint, NULL, endpoint_exists },
+ { "Location", "u", get_location },
+ { "Metadata", "ay", get_metadata, set_metadata },
+ { "Links", "ao", get_links, set_links, links_exists },
+ { "Volume", "q", get_volume, set_volume, volume_exists },
+ { }
+};
+
static gboolean get_bcast_qos(const GDBusPropertyTable *property,
DBusMessageIter *iter, void *data)
{
@@ -1884,8 +1914,6 @@ static void bap_resume_complete(struct media_transport *transport)
transport_set_state(transport, TRANSPORT_STATE_ACTIVE);
}
-static void bap_update_links(const struct media_transport *transport);
-
static bool match_link_transport(const void *data, const void *user_data)
{
const struct bt_bap_stream *stream = data;
@@ -2540,10 +2568,11 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
#define TRANSPORT_OPS(_uuid, _props, _set_owner, _remove_owner, _init, \
_resume, _suspend, _cancel, _set_state, _get_stream, \
_get_volume, _set_volume, _set_delay, _update_links, \
- _destroy) \
+ _destroy, _test_props) \
{ \
.uuid = _uuid, \
.properties = _props, \
+ .test_properties = _test_props, \
.set_owner = _set_owner, \
.remove_owner = _remove_owner, \
.init = _init, \
@@ -2565,26 +2594,28 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
transport_a2dp_resume, transport_a2dp_suspend, \
transport_a2dp_cancel, NULL, \
transport_a2dp_get_stream, transport_a2dp_get_volume, \
- _set_volume, _set_delay, NULL, _destroy)
+ _set_volume, _set_delay, NULL, _destroy, NULL)
#define BAP_OPS(_uuid, _props, _set_owner, _remove_owner, _update_links, \
- _set_state) \
+ _set_state, _test_props) \
TRANSPORT_OPS(_uuid, _props, _set_owner, _remove_owner,\
transport_bap_init, \
transport_bap_resume, transport_bap_suspend, \
transport_bap_cancel, _set_state, \
transport_bap_get_stream, transport_bap_get_volume, \
transport_bap_set_volume, NULL, \
- _update_links, transport_bap_destroy)
+ _update_links, transport_bap_destroy, _test_props)
#define BAP_UC_OPS(_uuid) \
BAP_OPS(_uuid, transport_bap_uc_properties, \
transport_bap_set_owner, transport_bap_remove_owner, \
- transport_bap_update_links_uc, transport_bap_set_state)
+ transport_bap_update_links_uc, \
+ transport_bap_set_state, \
+ transport_bap_uc_test_properties)
#define BAP_BC_OPS(_uuid) \
BAP_OPS(_uuid, transport_bap_bc_properties, NULL, NULL, \
- transport_bap_update_links_bc, NULL)
+ transport_bap_update_links_bc, NULL, NULL)
#define ASHA_OPS(_uuid) \
TRANSPORT_OPS(_uuid, transport_asha_properties, NULL, NULL, \
@@ -2592,7 +2623,7 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
transport_asha_resume, transport_asha_suspend, \
transport_asha_cancel, NULL, NULL, \
transport_asha_get_volume, transport_asha_set_volume, \
- NULL, NULL, NULL)
+ NULL, NULL, NULL, NULL)
static const struct media_transport_ops transport_ops[] = {
#ifdef HAVE_A2DP
@@ -2647,6 +2678,7 @@ struct media_transport *media_transport_create(struct btd_device *device,
struct media_transport *transport;
const struct media_transport_ops *ops;
int fd;
+ const GDBusPropertyTable *properties;
transport = g_new0(struct media_transport, 1);
if (device)
@@ -2701,9 +2733,14 @@ struct media_transport *media_transport_create(struct btd_device *device,
goto fail;
}
+ if (btd_opts.testing && ops->test_properties)
+ properties = ops->test_properties;
+ else
+ properties = ops->properties;
+
if (g_dbus_register_interface(btd_get_dbus_connection(),
transport->path, MEDIA_TRANSPORT_INTERFACE,
- transport_methods, NULL, ops->properties,
+ transport_methods, NULL, properties,
transport, media_transport_free) == FALSE) {
error("Could not register transport %s", transport->path);
goto fail;
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH BlueZ v2 2/3] doc: Add documentation for readwrite CIS transport Links property
2026-04-23 7:53 [PATCH BlueZ v2 1/3] audio: Add ability to force CIS transport Links property Frédéric Danis
@ 2026-04-23 7:53 ` Frédéric Danis
2026-04-23 7:53 ` [PATCH BlueZ v2 3/3] client/player: Add support to unlink transports Frédéric Danis
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Frédéric Danis @ 2026-04-23 7:53 UTC (permalink / raw)
To: linux-bluetooth
This is only supported when bluetoothd is started in testing mode.
---
doc/org.bluez.MediaTransport.rst | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/doc/org.bluez.MediaTransport.rst b/doc/org.bluez.MediaTransport.rst
index 81cf9e4da..fe69f948b 100644
--- a/doc/org.bluez.MediaTransport.rst
+++ b/doc/org.bluez.MediaTransport.rst
@@ -180,6 +180,11 @@ array{object} Links [readonly, optional, CIS only, experimental]
Linked transport objects which the transport is associated with.
+If D-Bus testing interfaces as been enabled this property is readwrite.
+
+This can be used to manually unlink transport objects by sending empty array.
+Then, each link needs be acquired separately.
+
array{object} Links [readwrite, BIS only, experimental]
```````````````````````````````````````````````````````
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH BlueZ v2 3/3] client/player: Add support to unlink transports
2026-04-23 7:53 [PATCH BlueZ v2 1/3] audio: Add ability to force CIS transport Links property Frédéric Danis
2026-04-23 7:53 ` [PATCH BlueZ v2 2/3] doc: Add documentation for readwrite " Frédéric Danis
@ 2026-04-23 7:53 ` Frédéric Danis
2026-04-23 9:11 ` [BlueZ,v2,1/3] audio: Add ability to force CIS transport Links property bluez.test.bot
2026-04-23 17:08 ` [PATCH BlueZ v2 1/3] " Luiz Augusto von Dentz
3 siblings, 0 replies; 6+ messages in thread
From: Frédéric Danis @ 2026-04-23 7:53 UTC (permalink / raw)
To: linux-bluetooth
This is used to pass PTS tests BAP/UCL/STR/BV-543-C and BV-546-C.
---
client/player.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 56 insertions(+), 1 deletion(-)
diff --git a/client/player.c b/client/player.c
index 1444e939d..e3bd28fea 100644
--- a/client/player.c
+++ b/client/player.c
@@ -5003,6 +5003,9 @@ static bool transport_recv(struct io *io, void *user_data)
static void transport_new(GDBusProxy *proxy, int sk, uint16_t mtu[2])
{
struct transport *transport;
+ DBusMessageIter iter;
+ const char *uuid;
+ bool reader = true;
transport = new0(struct transport, 1);
transport->proxy = proxy;
@@ -5014,7 +5017,23 @@ static void transport_new(GDBusProxy *proxy, int sk, uint16_t mtu[2])
io_set_disconnect_handler(transport->io, transport_disconnected,
transport, NULL);
- io_set_read_handler(transport->io, transport_recv, transport, NULL);
+
+ if (!g_dbus_proxy_get_property(proxy, "UUID", &iter))
+ return;
+
+ dbus_message_iter_get_basic(&iter, &uuid);
+
+ /* For BAP testing, streams may have been manually unlinked.
+ * In this case source and sink streams are acquired separately and
+ * read handler should not be started for source local endpoint.
+ */
+ if (!g_dbus_proxy_get_property(proxy, "Links", &iter) &&
+ !strcmp(uuid, PAC_SOURCE_UUID))
+ reader = false;
+
+ if (reader)
+ io_set_read_handler(transport->io, transport_recv, transport,
+ NULL);
if (!ios)
ios = queue_new();
@@ -6091,6 +6110,39 @@ static void cmd_metadata_transport(int argc, char *argv[])
}
}
+static void unlink_cb(const DBusError *error, void *user_data)
+{
+ if (dbus_error_is_set(error)) {
+ bt_shell_printf("Failed to unlink: %s\n", error->name);
+ return bt_shell_noninteractive_quit(EXIT_FAILURE);
+ }
+
+ bt_shell_printf("Unlink succeeded\n");
+
+ return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+}
+
+static void cmd_unlink_transport(int argc, char *argv[])
+{
+ GDBusProxy *proxy;
+ char *value[0];
+
+ proxy = g_dbus_proxy_lookup(transports, NULL, argv[1],
+ BLUEZ_MEDIA_TRANSPORT_INTERFACE);
+ if (!proxy) {
+ bt_shell_printf("Transport %s not found\n", argv[1]);
+ return bt_shell_noninteractive_quit(EXIT_FAILURE);
+ }
+
+ if (g_dbus_proxy_set_property_array(proxy, "Links",
+ DBUS_TYPE_OBJECT_PATH,
+ value, 0, unlink_cb,
+ NULL, NULL) == FALSE) {
+ bt_shell_printf("Failed to unlink transport\n");
+ return bt_shell_noninteractive_quit(EXIT_FAILURE);
+ }
+}
+
static const struct bt_shell_menu transport_menu = {
.name = "transport",
.desc = "Media Transport Submenu",
@@ -6126,6 +6178,9 @@ static const struct bt_shell_menu transport_menu = {
{ "metadata", "<transport> [value...]", cmd_metadata_transport,
"Get/Set Transport Metadata",
transport_generator },
+ { "unlink", "<transport>", cmd_unlink_transport,
+ "Unlink Transport",
+ transport_generator },
{} },
};
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [BlueZ,v2,1/3] audio: Add ability to force CIS transport Links property
2026-04-23 7:53 [PATCH BlueZ v2 1/3] audio: Add ability to force CIS transport Links property Frédéric Danis
2026-04-23 7:53 ` [PATCH BlueZ v2 2/3] doc: Add documentation for readwrite " Frédéric Danis
2026-04-23 7:53 ` [PATCH BlueZ v2 3/3] client/player: Add support to unlink transports Frédéric Danis
@ 2026-04-23 9:11 ` bluez.test.bot
2026-04-23 17:08 ` [PATCH BlueZ v2 1/3] " Luiz Augusto von Dentz
3 siblings, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2026-04-23 9:11 UTC (permalink / raw)
To: linux-bluetooth, frederic.danis
[-- Attachment #1: Type: text/plain, Size: 2545 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/project/bluetooth/list/?series=1084559
---Test result---
Test Summary:
CheckPatch FAIL 1.65 seconds
GitLint FAIL 1.02 seconds
BuildEll PASS 20.80 seconds
BluezMake PASS 660.92 seconds
MakeCheck PASS 19.20 seconds
MakeDistcheck PASS 248.30 seconds
CheckValgrind PASS 297.58 seconds
CheckSmatch PASS 352.78 seconds
bluezmakeextell PASS 183.93 seconds
IncrementalBuild PASS 654.86 seconds
ScanBuild PASS 1020.42 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v2,1/3] audio: Add ability to force CIS transport Links property
WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#109: FILE: profiles/audio/bap.c:2672:
+ * by bap_stream_set_io() */
/github/workspace/src/patch/14534951.patch total: 0 errors, 1 warnings, 204 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/github/workspace/src/patch/14534951.patch has style problems, please review.
NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v2,1/3] audio: Add ability to force CIS transport Links property
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
15: B2 Line has trailing whitespace: " before passing the connect event to all streams belonging to same "
https://github.com/bluez/bluez/pull/2064
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ v2 1/3] audio: Add ability to force CIS transport Links property
2026-04-23 7:53 [PATCH BlueZ v2 1/3] audio: Add ability to force CIS transport Links property Frédéric Danis
` (2 preceding siblings ...)
2026-04-23 9:11 ` [BlueZ,v2,1/3] audio: Add ability to force CIS transport Links property bluez.test.bot
@ 2026-04-23 17:08 ` Luiz Augusto von Dentz
2026-04-23 20:32 ` Frédéric Danis
3 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2026-04-23 17:08 UTC (permalink / raw)
To: Frédéric Danis; +Cc: linux-bluetooth
Hi Frederic,
On Thu, Apr 23, 2026 at 3:53 AM Frédéric Danis
<frederic.danis@collabora.com> wrote:
>
> If bluetoothd is started in testing mode the Links property for CIS
> is readwrite and can be used to force transport objects Links.
> This can used to unlink transport objects by sending an empty array.
>
> For unlinked transport objects, each transports needs to be acquired
> separately.
>
> This allows to pass PTS tests BAP/UCL/STR/BV-543-C and BV-546-C.
> ---
> v1 -> v2:
> - Add testing mode check in bap_connect_io_cb()
> - Replace stream state check by checking that the stream is not linked
> before passing the connect event to all streams belonging to same
> CIG/CIS.
>
> profiles/audio/bap.c | 46 ++++++++++++++++++++++++++++++
> profiles/audio/transport.c | 57 +++++++++++++++++++++++++++++++-------
> 2 files changed, 95 insertions(+), 10 deletions(-)
>
> diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
> index 5333267f7..e20456436 100644
> --- a/profiles/audio/bap.c
> +++ b/profiles/audio/bap.c
> @@ -2655,13 +2655,61 @@ static void bap_connect_bcast_io_cb(GIOChannel *chan, GError *err,
> iso_connect_bcast_cb(chan, err, setup->stream);
> }
>
> +struct connect_io_data {
> + GIOChannel *chan;
> + GError *err;
> + uint8_t cig_id;
> + uint8_t cis_id;
> +};
> +
> +static void connect_stream(void *data, void *user_data)
> +{
> + struct bap_setup *setup = data;
> + struct connect_io_data *d = user_data;
> + uint8_t state;
> +
> + /* Check stream state to only pass the connect event managed
> + * by bap_stream_set_io() */
> + state = bt_bap_stream_get_state(setup->stream);
> + if ((state == BT_BAP_STREAM_STATE_ENABLING ||
> + state == BT_BAP_STREAM_STATE_DISABLING) &&
> + setup->qos.ucast.cig_id == d->cig_id &&
> + setup->qos.ucast.cis_id == d->cis_id)
> + iso_connect_cb(d->chan, d->err, setup->stream);
From the discussion we had Ive assume we wouldn't be checking the
state here, since we don't check on bap_connect_io_cb either.
> +}
> +
> +static void connect_ep(void *data, void *user_data)
> +{
> + struct bap_ep *ep = data;
> +
> + if (ep->setups)
> + queue_foreach(ep->setups, connect_stream, user_data);
> +}
> +
> static void bap_connect_io_cb(GIOChannel *chan, GError *err, gpointer user_data)
> {
> struct bap_setup *setup = user_data;
> + struct connect_io_data data;
>
> if (!setup->stream)
> return;
>
> + if (queue_isempty(bt_bap_stream_io_get_links(setup->stream)) &&
> + btd_opts.testing) {
> + /* The stream may have manually been unliked for PTS tests,
> + * e.g. BAP/UCL/STR/BV-543-C or BAP/UCL/STR/BV-546-C,
> + * in this case send the connect event to all streams
> + * belonging to the same CIG/CIS.
> + */
> + data.chan = chan;
> + data.err = err;
> + data.cig_id = setup->qos.ucast.cig_id;
> + data.cis_id = setup->qos.ucast.cis_id;
> + queue_foreach(setup->ep->data->snks, connect_ep, &data);
> + queue_foreach(setup->ep->data->srcs, connect_ep, &data);
> + return;
> + }
> +
> iso_connect_cb(chan, err, setup->stream);
> }
>
> diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
> index 5c2a2777e..b6a5dd1fd 100644
> --- a/profiles/audio/transport.c
> +++ b/profiles/audio/transport.c
> @@ -37,6 +37,7 @@
> #include "src/shared/bap.h"
> #include "src/shared/bass.h"
> #include "src/shared/io.h"
> +#include "src/btd.h"
>
> #ifdef HAVE_A2DP
> #include "avdtp.h"
> @@ -114,6 +115,7 @@ struct bap_transport {
> struct media_transport_ops {
> const char *uuid;
> const GDBusPropertyTable *properties;
> + const GDBusPropertyTable *test_properties;
> void (*set_owner)(struct media_transport *transport,
> struct media_owner *owner);
> void (*remove_owner)(struct media_transport *transport,
> @@ -1419,6 +1421,9 @@ static struct media_transport *find_transport_by_path(const char *path)
> return NULL;
> }
>
> +static void bap_update_links(const struct media_transport *transport);
> +static void transport_unlink(void *data, void *user_data);
> +
> static void set_links(const GDBusPropertyTable *property,
> DBusMessageIter *iter,
> GDBusPendingPropertySet id, void *user_data)
> @@ -1436,6 +1441,16 @@ static void set_links(const GDBusPropertyTable *property,
>
> dbus_message_iter_recurse(iter, &array);
>
> + if (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_INVALID) {
> + struct queue *links = bt_bap_stream_io_get_links(bap->stream);
> +
> + /* Unlink stream from all its links */
> + queue_foreach(links, transport_unlink, bap->stream);
> +
> + bt_bap_stream_io_unlink(bap->stream, NULL);
> + bap_update_links(transport);
> + }
> +
> while (dbus_message_iter_get_arg_type(&array) ==
> DBUS_TYPE_OBJECT_PATH) {
> struct media_transport *link;
> @@ -1486,6 +1501,21 @@ static const GDBusPropertyTable transport_bap_uc_properties[] = {
> { }
> };
>
> +static const GDBusPropertyTable transport_bap_uc_test_properties[] = {
> + { "Device", "o", get_device },
> + { "UUID", "s", get_uuid },
> + { "Codec", "y", get_codec },
> + { "Configuration", "ay", get_configuration },
> + { "State", "s", get_state },
> + { "QoS", "a{sv}", get_ucast_qos, NULL, qos_ucast_exists },
> + { "Endpoint", "o", get_endpoint, NULL, endpoint_exists },
> + { "Location", "u", get_location },
> + { "Metadata", "ay", get_metadata, set_metadata },
> + { "Links", "ao", get_links, set_links, links_exists },
> + { "Volume", "q", get_volume, set_volume, volume_exists },
> + { }
> +};
> +
> static gboolean get_bcast_qos(const GDBusPropertyTable *property,
> DBusMessageIter *iter, void *data)
> {
> @@ -1884,8 +1914,6 @@ static void bap_resume_complete(struct media_transport *transport)
> transport_set_state(transport, TRANSPORT_STATE_ACTIVE);
> }
>
> -static void bap_update_links(const struct media_transport *transport);
> -
> static bool match_link_transport(const void *data, const void *user_data)
> {
> const struct bt_bap_stream *stream = data;
> @@ -2540,10 +2568,11 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
> #define TRANSPORT_OPS(_uuid, _props, _set_owner, _remove_owner, _init, \
> _resume, _suspend, _cancel, _set_state, _get_stream, \
> _get_volume, _set_volume, _set_delay, _update_links, \
> - _destroy) \
> + _destroy, _test_props) \
> { \
> .uuid = _uuid, \
> .properties = _props, \
> + .test_properties = _test_props, \
> .set_owner = _set_owner, \
> .remove_owner = _remove_owner, \
> .init = _init, \
> @@ -2565,26 +2594,28 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
> transport_a2dp_resume, transport_a2dp_suspend, \
> transport_a2dp_cancel, NULL, \
> transport_a2dp_get_stream, transport_a2dp_get_volume, \
> - _set_volume, _set_delay, NULL, _destroy)
> + _set_volume, _set_delay, NULL, _destroy, NULL)
>
> #define BAP_OPS(_uuid, _props, _set_owner, _remove_owner, _update_links, \
> - _set_state) \
> + _set_state, _test_props) \
> TRANSPORT_OPS(_uuid, _props, _set_owner, _remove_owner,\
> transport_bap_init, \
> transport_bap_resume, transport_bap_suspend, \
> transport_bap_cancel, _set_state, \
> transport_bap_get_stream, transport_bap_get_volume, \
> transport_bap_set_volume, NULL, \
> - _update_links, transport_bap_destroy)
> + _update_links, transport_bap_destroy, _test_props)
>
> #define BAP_UC_OPS(_uuid) \
> BAP_OPS(_uuid, transport_bap_uc_properties, \
> transport_bap_set_owner, transport_bap_remove_owner, \
> - transport_bap_update_links_uc, transport_bap_set_state)
> + transport_bap_update_links_uc, \
> + transport_bap_set_state, \
> + transport_bap_uc_test_properties)
>
> #define BAP_BC_OPS(_uuid) \
> BAP_OPS(_uuid, transport_bap_bc_properties, NULL, NULL, \
> - transport_bap_update_links_bc, NULL)
> + transport_bap_update_links_bc, NULL, NULL)
>
> #define ASHA_OPS(_uuid) \
> TRANSPORT_OPS(_uuid, transport_asha_properties, NULL, NULL, \
> @@ -2592,7 +2623,7 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
> transport_asha_resume, transport_asha_suspend, \
> transport_asha_cancel, NULL, NULL, \
> transport_asha_get_volume, transport_asha_set_volume, \
> - NULL, NULL, NULL)
> + NULL, NULL, NULL, NULL)
>
> static const struct media_transport_ops transport_ops[] = {
> #ifdef HAVE_A2DP
> @@ -2647,6 +2678,7 @@ struct media_transport *media_transport_create(struct btd_device *device,
> struct media_transport *transport;
> const struct media_transport_ops *ops;
> int fd;
> + const GDBusPropertyTable *properties;
>
> transport = g_new0(struct media_transport, 1);
> if (device)
> @@ -2701,9 +2733,14 @@ struct media_transport *media_transport_create(struct btd_device *device,
> goto fail;
> }
>
> + if (btd_opts.testing && ops->test_properties)
> + properties = ops->test_properties;
> + else
> + properties = ops->properties;
> +
> if (g_dbus_register_interface(btd_get_dbus_connection(),
> transport->path, MEDIA_TRANSPORT_INTERFACE,
> - transport_methods, NULL, ops->properties,
> + transport_methods, NULL, properties,
> transport, media_transport_free) == FALSE) {
> error("Could not register transport %s", transport->path);
> goto fail;
> --
> 2.43.0
>
>
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH BlueZ v2 1/3] audio: Add ability to force CIS transport Links property
2026-04-23 17:08 ` [PATCH BlueZ v2 1/3] " Luiz Augusto von Dentz
@ 2026-04-23 20:32 ` Frédéric Danis
0 siblings, 0 replies; 6+ messages in thread
From: Frédéric Danis @ 2026-04-23 20:32 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
[-- Attachment #1: Type: text/plain, Size: 11866 bytes --]
Hi Luiz,
On 23/04/2026 19:08, Luiz Augusto von Dentz wrote:
> Hi Frederic,
>
> On Thu, Apr 23, 2026 at 3:53 AM Frédéric Danis
> <frederic.danis@collabora.com> wrote:
>> If bluetoothd is started in testing mode the Links property for CIS
>> is readwrite and can be used to force transport objects Links.
>> This can used to unlink transport objects by sending an empty array.
>>
>> For unlinked transport objects, each transports needs to be acquired
>> separately.
>>
>> This allows to pass PTS tests BAP/UCL/STR/BV-543-C and BV-546-C.
>> ---
>> v1 -> v2:
>> - Add testing mode check in bap_connect_io_cb()
>> - Replace stream state check by checking that the stream is not linked
>> before passing the connect event to all streams belonging to same
>> CIG/CIS.
>>
>> profiles/audio/bap.c | 46 ++++++++++++++++++++++++++++++
>> profiles/audio/transport.c | 57 +++++++++++++++++++++++++++++++-------
>> 2 files changed, 95 insertions(+), 10 deletions(-)
>>
>> diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
>> index 5333267f7..e20456436 100644
>> --- a/profiles/audio/bap.c
>> +++ b/profiles/audio/bap.c
>> @@ -2655,13 +2655,61 @@ static void bap_connect_bcast_io_cb(GIOChannel *chan, GError *err,
>> iso_connect_bcast_cb(chan, err, setup->stream);
>> }
>>
>> +struct connect_io_data {
>> + GIOChannel *chan;
>> + GError *err;
>> + uint8_t cig_id;
>> + uint8_t cis_id;
>> +};
>> +
>> +static void connect_stream(void *data, void *user_data)
>> +{
>> + struct bap_setup *setup = data;
>> + struct connect_io_data *d = user_data;
>> + uint8_t state;
>> +
>> + /* Check stream state to only pass the connect event managed
>> + * by bap_stream_set_io() */
>> + state = bt_bap_stream_get_state(setup->stream);
>> + if ((state == BT_BAP_STREAM_STATE_ENABLING ||
>> + state == BT_BAP_STREAM_STATE_DISABLING) &&
>> + setup->qos.ucast.cig_id == d->cig_id &&
>> + setup->qos.ucast.cis_id == d->cis_id)
>> + iso_connect_cb(d->chan, d->err, setup->stream);
> From the discussion we had Ive assume we wouldn't be checking the
> state here, since we don't check on bap_connect_io_cb either.
If the state is not checked this prevents to complete the transport
acquire, ending with:
- for BV-543-C: profiles/audio/bap.c:setup_connect_io() setup
0x50f000007a20 stream 0x50e000010dc0 io already up
- for BV-546-C: profiles/audio/bap.c:bap_state() stream 0x50e00000a5a0:
enabling(3) -> disabling(5)
see attached files.
>
>> +}
>> +
>> +static void connect_ep(void *data, void *user_data)
>> +{
>> + struct bap_ep *ep = data;
>> +
>> + if (ep->setups)
>> + queue_foreach(ep->setups, connect_stream, user_data);
>> +}
>> +
>> static void bap_connect_io_cb(GIOChannel *chan, GError *err, gpointer user_data)
>> {
>> struct bap_setup *setup = user_data;
>> + struct connect_io_data data;
>>
>> if (!setup->stream)
>> return;
>>
>> + if (queue_isempty(bt_bap_stream_io_get_links(setup->stream)) &&
>> + btd_opts.testing) {
>> + /* The stream may have manually been unliked for PTS tests,
>> + * e.g. BAP/UCL/STR/BV-543-C or BAP/UCL/STR/BV-546-C,
>> + * in this case send the connect event to all streams
>> + * belonging to the same CIG/CIS.
>> + */
>> + data.chan = chan;
>> + data.err = err;
>> + data.cig_id = setup->qos.ucast.cig_id;
>> + data.cis_id = setup->qos.ucast.cis_id;
>> + queue_foreach(setup->ep->data->snks, connect_ep, &data);
>> + queue_foreach(setup->ep->data->srcs, connect_ep, &data);
>> + return;
>> + }
>> +
>> iso_connect_cb(chan, err, setup->stream);
>> }
>>
>> diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
>> index 5c2a2777e..b6a5dd1fd 100644
>> --- a/profiles/audio/transport.c
>> +++ b/profiles/audio/transport.c
>> @@ -37,6 +37,7 @@
>> #include "src/shared/bap.h"
>> #include "src/shared/bass.h"
>> #include "src/shared/io.h"
>> +#include "src/btd.h"
>>
>> #ifdef HAVE_A2DP
>> #include "avdtp.h"
>> @@ -114,6 +115,7 @@ struct bap_transport {
>> struct media_transport_ops {
>> const char *uuid;
>> const GDBusPropertyTable *properties;
>> + const GDBusPropertyTable *test_properties;
>> void (*set_owner)(struct media_transport *transport,
>> struct media_owner *owner);
>> void (*remove_owner)(struct media_transport *transport,
>> @@ -1419,6 +1421,9 @@ static struct media_transport *find_transport_by_path(const char *path)
>> return NULL;
>> }
>>
>> +static void bap_update_links(const struct media_transport *transport);
>> +static void transport_unlink(void *data, void *user_data);
>> +
>> static void set_links(const GDBusPropertyTable *property,
>> DBusMessageIter *iter,
>> GDBusPendingPropertySet id, void *user_data)
>> @@ -1436,6 +1441,16 @@ static void set_links(const GDBusPropertyTable *property,
>>
>> dbus_message_iter_recurse(iter, &array);
>>
>> + if (dbus_message_iter_get_arg_type(&array) == DBUS_TYPE_INVALID) {
>> + struct queue *links = bt_bap_stream_io_get_links(bap->stream);
>> +
>> + /* Unlink stream from all its links */
>> + queue_foreach(links, transport_unlink, bap->stream);
>> +
>> + bt_bap_stream_io_unlink(bap->stream, NULL);
>> + bap_update_links(transport);
>> + }
>> +
>> while (dbus_message_iter_get_arg_type(&array) ==
>> DBUS_TYPE_OBJECT_PATH) {
>> struct media_transport *link;
>> @@ -1486,6 +1501,21 @@ static const GDBusPropertyTable transport_bap_uc_properties[] = {
>> { }
>> };
>>
>> +static const GDBusPropertyTable transport_bap_uc_test_properties[] = {
>> + { "Device", "o", get_device },
>> + { "UUID", "s", get_uuid },
>> + { "Codec", "y", get_codec },
>> + { "Configuration", "ay", get_configuration },
>> + { "State", "s", get_state },
>> + { "QoS", "a{sv}", get_ucast_qos, NULL, qos_ucast_exists },
>> + { "Endpoint", "o", get_endpoint, NULL, endpoint_exists },
>> + { "Location", "u", get_location },
>> + { "Metadata", "ay", get_metadata, set_metadata },
>> + { "Links", "ao", get_links, set_links, links_exists },
>> + { "Volume", "q", get_volume, set_volume, volume_exists },
>> + { }
>> +};
>> +
>> static gboolean get_bcast_qos(const GDBusPropertyTable *property,
>> DBusMessageIter *iter, void *data)
>> {
>> @@ -1884,8 +1914,6 @@ static void bap_resume_complete(struct media_transport *transport)
>> transport_set_state(transport, TRANSPORT_STATE_ACTIVE);
>> }
>>
>> -static void bap_update_links(const struct media_transport *transport);
>> -
>> static bool match_link_transport(const void *data, const void *user_data)
>> {
>> const struct bt_bap_stream *stream = data;
>> @@ -2540,10 +2568,11 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
>> #define TRANSPORT_OPS(_uuid, _props, _set_owner, _remove_owner, _init, \
>> _resume, _suspend, _cancel, _set_state, _get_stream, \
>> _get_volume, _set_volume, _set_delay, _update_links, \
>> - _destroy) \
>> + _destroy, _test_props) \
>> { \
>> .uuid = _uuid, \
>> .properties = _props, \
>> + .test_properties = _test_props, \
>> .set_owner = _set_owner, \
>> .remove_owner = _remove_owner, \
>> .init = _init, \
>> @@ -2565,26 +2594,28 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
>> transport_a2dp_resume, transport_a2dp_suspend, \
>> transport_a2dp_cancel, NULL, \
>> transport_a2dp_get_stream, transport_a2dp_get_volume, \
>> - _set_volume, _set_delay, NULL, _destroy)
>> + _set_volume, _set_delay, NULL, _destroy, NULL)
>>
>> #define BAP_OPS(_uuid, _props, _set_owner, _remove_owner, _update_links, \
>> - _set_state) \
>> + _set_state, _test_props) \
>> TRANSPORT_OPS(_uuid, _props, _set_owner, _remove_owner,\
>> transport_bap_init, \
>> transport_bap_resume, transport_bap_suspend, \
>> transport_bap_cancel, _set_state, \
>> transport_bap_get_stream, transport_bap_get_volume, \
>> transport_bap_set_volume, NULL, \
>> - _update_links, transport_bap_destroy)
>> + _update_links, transport_bap_destroy, _test_props)
>>
>> #define BAP_UC_OPS(_uuid) \
>> BAP_OPS(_uuid, transport_bap_uc_properties, \
>> transport_bap_set_owner, transport_bap_remove_owner, \
>> - transport_bap_update_links_uc, transport_bap_set_state)
>> + transport_bap_update_links_uc, \
>> + transport_bap_set_state, \
>> + transport_bap_uc_test_properties)
>>
>> #define BAP_BC_OPS(_uuid) \
>> BAP_OPS(_uuid, transport_bap_bc_properties, NULL, NULL, \
>> - transport_bap_update_links_bc, NULL)
>> + transport_bap_update_links_bc, NULL, NULL)
>>
>> #define ASHA_OPS(_uuid) \
>> TRANSPORT_OPS(_uuid, transport_asha_properties, NULL, NULL, \
>> @@ -2592,7 +2623,7 @@ static void *transport_asha_init(struct media_transport *transport, void *data)
>> transport_asha_resume, transport_asha_suspend, \
>> transport_asha_cancel, NULL, NULL, \
>> transport_asha_get_volume, transport_asha_set_volume, \
>> - NULL, NULL, NULL)
>> + NULL, NULL, NULL, NULL)
>>
>> static const struct media_transport_ops transport_ops[] = {
>> #ifdef HAVE_A2DP
>> @@ -2647,6 +2678,7 @@ struct media_transport *media_transport_create(struct btd_device *device,
>> struct media_transport *transport;
>> const struct media_transport_ops *ops;
>> int fd;
>> + const GDBusPropertyTable *properties;
>>
>> transport = g_new0(struct media_transport, 1);
>> if (device)
>> @@ -2701,9 +2733,14 @@ struct media_transport *media_transport_create(struct btd_device *device,
>> goto fail;
>> }
>>
>> + if (btd_opts.testing && ops->test_properties)
>> + properties = ops->test_properties;
>> + else
>> + properties = ops->properties;
>> +
>> if (g_dbus_register_interface(btd_get_dbus_connection(),
>> transport->path, MEDIA_TRANSPORT_INTERFACE,
>> - transport_methods, NULL, ops->properties,
>> + transport_methods, NULL, properties,
>> transport, media_transport_free) == FALSE) {
>> error("Could not register transport %s", transport->path);
>> goto fail;
>> --
>> 2.43.0
>>
>>
>
--
Frédéric Danis
Senior Software Engineer
Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, United Kingdom
Registered in England & Wales, no. 5513718
[-- Attachment #2: no-state-check-543.log --]
[-- Type: text/x-log, Size: 11845 bytes --]
bluetoothd[487726]: [:1.5304:method_call] > org.bluez.MediaTransport1.Acquire [#101]
bluetoothd[487726]: profiles/audio/transport.c:media_owner_create() Owner created: sender=:1.5304
bluetoothd[487726]: profiles/audio/transport.c:media_transport_resume() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0 Owner :1.5304
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x50600008c360 (op 0x03) queue 0x5030000bc650
bluetoothd[487726]: profiles/audio/transport.c:transport_set_state() State changed /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0: TRANSPORT_STATE_IDLE -> TRANSPORT_STATE_REQUESTING
bluetoothd[487726]: profiles/audio/transport.c:media_request_create() Request created: method=Acquire id=23
bluetoothd[487726]: profiles/audio/transport.c:media_owner_add() Owner :1.5304 Request Acquire
bluetoothd[487726]: profiles/audio/transport.c:media_transport_set_owner() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0 Owner :1.5304
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/bap.c:bap_send() req 0x50600008c360 len 8
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000162a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000162a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_ep_set_status() ASE status: ep 0x504000059690 id 0x01 handle 0x0121 state enabling len 7
bluetoothd[487726]: src/shared/bap.c:ep_status_metadata() CIS 0x00 CIG 0x00 metadata len 4
bluetoothd[487726]: profiles/audio/bap.c:bap_state() stream 0x50e000010ea0: qos(2) -> enabling(3)
bluetoothd[487726]: profiles/audio/transport.c:bap_state_changed() stream 0x50e000010ea0: qos(2) -> enabling(3)
bluetoothd[487726]: profiles/audio/bap.c:bap_update_cig() adapter 0x513000000200 CIG 0x0
bluetoothd[487726]: profiles/audio/bap.c:update_cig_setup_enable() 0x50f000007930
bluetoothd[487726]: profiles/audio/bap.c:setup_create_io() setup 0x50f000007930 stream 0x50e000010ea0 defer false
bluetoothd[487726]: src/shared/bap.c:bt_bap_stream_io_get_qos() in (nil) out 0x50e000010ed8
bluetoothd[487726]: profiles/audio/bap.c:setup_accept_io() stream 0x50e000010ea0 fd 26 defer true
bluetoothd[487726]: profiles/audio/bap.c:iso_connect_cb() ISO connected
bluetoothd[487726]: profiles/audio/bap.c:iso_connect_cb() ISO connected
bluetoothd[487726]: profiles/audio/bap.c:iso_connect_cb() Unable to set IO
bluetoothd[487726]: src/shared/bap.c:bap_stream_io_detach() stream 0x50e000010dc0
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000162a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_ep_set_status() ASE status: ep 0x504000059690 id 0x01 handle 0x0121 state streaming len 7
bluetoothd[487726]: src/shared/bap.c:ep_status_metadata() CIS 0x00 CIG 0x00 metadata len 4
bluetoothd[487726]: profiles/audio/bap.c:bap_state() stream 0x50e000010ea0: enabling(3) -> streaming(4)
bluetoothd[487726]: profiles/audio/transport.c:bap_state_changed() stream 0x50e000010ea0: enabling(3) -> streaming(4)
bluetoothd[487726]: profiles/audio/transport.c:bap_metadata_changed() stream 0x50e000010ea0: metadata 0x5020000f4910 old (nil)
bluetoothd[487726]: /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0: fd(26) ready
bluetoothd[487726]: profiles/audio/transport.c:transport_update_playing() /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0 State=TRANSPORT_STATE_REQUESTING Playing=1
bluetoothd[487726]: profiles/audio/transport.c:bap_resume_complete() stream 0x50e000010ea0 owner 0x5030000d8700 resume complete
bluetoothd[487726]: [signal] org.freedesktop.DBus.Properties.PropertiesChanged
bluetoothd[487726]: [:1.5304:method_return] < [#101]
bluetoothd[487726]: profiles/audio/transport.c:media_owner_remove() Owner :1.5304 Request Acquire
bluetoothd[487726]: profiles/audio/transport.c:transport_set_state() State changed /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0: TRANSPORT_STATE_REQUESTING -> TRANSPORT_STATE_ACTIVE
bluetoothd[487726]: [signal] org.freedesktop.DBus.Properties.PropertiesChanged
bluetoothd[487726]: [:1.5304:method_call] > org.bluez.MediaTransport1.Acquire [#102]
bluetoothd[487726]: profiles/audio/transport.c:media_owner_create() Owner created: sender=:1.5304
bluetoothd[487726]: profiles/audio/transport.c:media_transport_resume() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1 Owner :1.5304
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x50600008c8a0 (op 0x03) queue 0x5030000bc650
bluetoothd[487726]: profiles/audio/transport.c:transport_set_state() State changed /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1: TRANSPORT_STATE_IDLE -> TRANSPORT_STATE_REQUESTING
bluetoothd[487726]: profiles/audio/transport.c:media_request_create() Request created: method=Acquire id=24
bluetoothd[487726]: profiles/audio/transport.c:media_owner_add() Owner :1.5304 Request Acquire
bluetoothd[487726]: profiles/audio/transport.c:media_transport_set_owner() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1 Owner :1.5304
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/bap.c:bap_send() req 0x50600008c8a0 len 8
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000162a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000162a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_ep_set_status() ASE status: ep 0x504000059790 id 0x0a handle 0x0127 state enabling len 7
bluetoothd[487726]: src/shared/bap.c:ep_status_metadata() CIS 0x00 CIG 0x00 metadata len 4
bluetoothd[487726]: profiles/audio/bap.c:bap_state() stream 0x50e000010dc0: qos(2) -> enabling(3)
bluetoothd[487726]: profiles/audio/transport.c:bap_state_changed() stream 0x50e000010dc0: qos(2) -> enabling(3)
bluetoothd[487726]: profiles/audio/bap.c:bap_update_cig() adapter 0x513000000200 CIG 0x0
bluetoothd[487726]: profiles/audio/bap.c:bap_update_cig() setup 0x50f000007930 stream 0x50e000010ea0 busy
bluetoothd[487726]: profiles/audio/bap.c:update_cig_setup_enable() 0x50f000007a20
bluetoothd[487726]: profiles/audio/bap.c:setup_create_io() setup 0x50f000007a20 stream 0x50e000010dc0 defer false
bluetoothd[487726]: src/shared/bap.c:bt_bap_stream_io_get_qos() in 0x50e000010df8 out (nil)
bluetoothd[487726]: profiles/audio/bap.c:setup_connect_io() setup 0x50f000007a20 stream 0x50e000010dc0 io already up
bluetoothd[487726]: [:1.493:method_call] > org.bluez.Device1.Disconnect [#49547]
bluetoothd[487726]: src/device.c:device_set_auto_connect() 9C:47:2A:39:56:FE auto connect: 0
bluetoothd[487726]: src/service.c:change_state() 0x506000075d40: device 9C:47:2A:39:56:FE profile rap state changed: connected -> disconnecting (0)
bluetoothd[487726]: profiles/ranging/rap.c:rap_disconnect()
bluetoothd[487726]: src/service.c:change_state() 0x506000075d40: device 9C:47:2A:39:56:FE profile rap state changed: disconnecting -> disconnected (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000075f20: device 9C:47:2A:39:56:FE profile bap state changed: connected -> disconnecting (0)
bluetoothd[487726]: profiles/audio/bap.c:ep_unregister() ep 0x5060000891e0 path /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0
bluetoothd[487726]: profiles/audio/bap.c:setup_free() 0x50f000007930
bluetoothd[487726]: profiles/audio/bap.c:setup_io_close() setup 0x50f000007930
bluetoothd[487726]: src/shared/bap.c:bap_stream_io_detach() stream 0x50e000010ea0
bluetoothd[487726]: src/shared/bap.c:stream_io_free() fd 26
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x50600008cc60 (op 0x08) queue 0x5030000bc650
bluetoothd[487726]: [signal] org.freedesktop.DBus.ObjectManager.InterfacesRemoved
bluetoothd[487726]: profiles/audio/bap.c:ep_unregister() ep 0x506000088f40 path /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0
bluetoothd[487726]: profiles/audio/bap.c:setup_free() 0x50f000007a20
bluetoothd[487726]: profiles/audio/bap.c:setup_io_close() setup 0x50f000007a20
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x50600008cde0 (op 0x08) queue 0x5030000d96f0
bluetoothd[487726]: [signal] org.freedesktop.DBus.ObjectManager.InterfacesRemoved
bluetoothd[487726]: src/shared/bap.c:bt_bap_detach() 0x510000004240
bluetoothd[487726]: src/shared/bap.c:bap_ucast_detach() stream 0x50e000010dc0 ep 0x504000059790
bluetoothd[487726]: profiles/audio/media.c:pac_clear() endpoint 0x50f000005a40 stream 0x50e000010dc0
bluetoothd[487726]: [:1.5304:method_call] < org.bluez.MediaEndpoint1.ClearConfiguration
bluetoothd[487726]: profiles/audio/transport.c:media_transport_remove_owner() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1 Owner :1.5304
bluetoothd[487726]: profiles/audio/transport.c:media_request_reply() Request Acquire Reply Input/output error
bluetoothd[487726]: [:1.5304:error] < org.bluez.Error.Failed [#102]
bluetoothd[487726]: profiles/audio/transport.c:media_owner_free() Owner :1.5304
bluetoothd[487726]: profiles/audio/transport.c:media_owner_remove() Owner :1.5304 Request Acquire
bluetoothd[487726]: profiles/audio/transport.c:media_transport_suspend() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1 Owner
bluetoothd[487726]: profiles/audio/transport.c:transport_set_state() State changed /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1: TRANSPORT_STATE_REQUESTING -> TRANSPORT_STATE_IDLE
bluetoothd[487726]: [signal] org.freedesktop.DBus.ObjectManager.InterfacesRemoved
bluetoothd[487726]: src/shared/bap.c:bap_ucast_detach() stream 0x50e000010ea0 ep 0x504000059690
bluetoothd[487726]: profiles/audio/media.c:pac_clear() endpoint 0x50f000005950 stream 0x50e000010ea0
bluetoothd[487726]: [:1.5304:method_call] < org.bluez.MediaEndpoint1.ClearConfiguration
bluetoothd[487726]: profiles/audio/transport.c:media_transport_remove_owner() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0 Owner :1.5304
bluetoothd[487726]: profiles/audio/transport.c:media_owner_free() Owner :1.5304
bluetoothd[487726]: profiles/audio/transport.c:media_transport_suspend() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0 Owner
bluetoothd[487726]: profiles/audio/transport.c:transport_set_state() State changed /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0: TRANSPORT_STATE_ACTIVE -> TRANSPORT_STATE_IDLE
bluetoothd[487726]: [signal] org.freedesktop.DBus.ObjectManager.InterfacesRemoved
bluetoothd[487726]: profiles/audio/bass.c:bap_detached() 0x510000004240
bluetoothd[487726]: profiles/audio/bap.c:bap_detached() 0x510000004240
bluetoothd[487726]: src/service.c:change_state() 0x506000075f20: device 9C:47:2A:39:56:FE profile bap state changed: disconnecting -> disconnected (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000076d60: device 9C:47:2A:39:56:FE profile bass state changed: connected -> disconnecting (0)
bluetoothd[487726]: profiles/audio/bass.c:bass_disconnect() 9C:47:2A:39:56:FE
bluetoothd[487726]: profiles/audio/bass.c:bass_detached() 0x50b0000474d0
bluetoothd[487726]: src/service.c:change_state() 0x506000076d60: device 9C:47:2A:39:56:FE profile bass state changed: disconnecting -> disconnected (0)
bluetoothd[487726]: src/service.c:change_state() 0x5060000771e0: device 9C:47:2A:39:56:FE profile gap-profile state changed: connected -> disconnecting (0)
bluetoothd[487726]: src/service.c:change_state() 0x5060000771e0: device 9C:47:2A:39:56:FE profile gap-profile state changed: disconnecting -> disconnected (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000077480: device 9C:47:2A:39:56:FE profile deviceinfo state changed: connected -> disconnecting (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000077480: device 9C:47:2A:39:56:FE profile deviceinfo state changed: disconnecting -> disconnected (0)
[-- Attachment #3: no-state-check-546.log --]
[-- Type: text/x-log, Size: 10241 bytes --]
bluetoothd[487726]: [:1.5289:method_call] > org.bluez.MediaTransport1.Acquire [#212]
bluetoothd[487726]: profiles/audio/transport.c:media_owner_create() Owner created: sender=:1.5289
bluetoothd[487726]: profiles/audio/transport.c:media_transport_resume() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1 Owner :1.5289
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x506000065120 (op 0x03) queue 0x503000083d40
bluetoothd[487726]: profiles/audio/transport.c:transport_set_state() State changed /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1: TRANSPORT_STATE_IDLE -> TRANSPORT_STATE_REQUESTING
bluetoothd[487726]: profiles/audio/transport.c:media_request_create() Request created: method=Acquire id=14
bluetoothd[487726]: profiles/audio/transport.c:media_owner_add() Owner :1.5289 Request Acquire
bluetoothd[487726]: profiles/audio/transport.c:media_transport_set_owner() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1 Owner :1.5289
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/bap.c:bap_send() req 0x506000065120 len 8
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000106a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000106a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_ep_set_status() ASE status: ep 0x50400003eb10 id 0x0a handle 0x0127 state enabling len 7
bluetoothd[487726]: src/shared/bap.c:ep_status_metadata() CIS 0x00 CIG 0x00 metadata len 4
bluetoothd[487726]: profiles/audio/bap.c:bap_state() stream 0x50e00000a5a0: qos(2) -> enabling(3)
bluetoothd[487726]: profiles/audio/transport.c:bap_state_changed() stream 0x50e00000a5a0: qos(2) -> enabling(3)
bluetoothd[487726]: profiles/audio/bap.c:bap_update_cig() adapter 0x513000000200 CIG 0x0
bluetoothd[487726]: profiles/audio/bap.c:update_cig_setup_enable() 0x50f000005680
bluetoothd[487726]: profiles/audio/bap.c:setup_create_io() setup 0x50f000005680 stream 0x50e00000a5a0 defer false
bluetoothd[487726]: src/shared/bap.c:bt_bap_stream_io_get_qos() in 0x50e00000a5d8 out (nil)
bluetoothd[487726]: profiles/audio/bap.c:setup_accept_io() stream 0x50e00000a5a0 fd 26 defer true
bluetoothd[487726]: profiles/audio/bap.c:iso_connect_cb() ISO connected
bluetoothd[487726]: profiles/audio/bap.c:iso_connect_cb() ISO connected
bluetoothd[487726]: profiles/audio/bap.c:iso_connect_cb() Unable to set IO
bluetoothd[487726]: src/shared/bap.c:bap_stream_io_detach() stream 0x50e00000a5a0
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x506000065480 (op 0x05) queue 0x503000083d40
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/bap.c:bap_send() req 0x506000065480 len 3
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000106a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000106a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_ep_set_status() ASE status: ep 0x50400003eb10 id 0x0a handle 0x0127 state disabling len 7
bluetoothd[487726]: src/shared/bap.c:ep_status_metadata() CIS 0x00 CIG 0x00 metadata len 4
bluetoothd[487726]: profiles/audio/bap.c:bap_state() stream 0x50e00000a5a0: enabling(3) -> disabling(5)
bluetoothd[487726]: profiles/audio/transport.c:bap_state_changed() stream 0x50e00000a5a0: enabling(3) -> disabling(5)
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x5060000655a0 (op 0x06) queue 0x503000083d40
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000106a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_ep_set_status() ASE status: ep 0x50400003eb10 id 0x0a handle 0x0127 state qos len 15
bluetoothd[487726]: src/shared/bap.c:ep_status_qos() CIG 0x00 CIS 0x00 interval 10000 framing 0x00 phys 0x02 rtn 2 latency 10 pd 40000
bluetoothd[487726]: src/shared/bap.c:bap_stream_update_io_links() stream 0x50e00000a5a0
bluetoothd[487726]: src/shared/bap.c:bap_ucast_io_link() stream 0x50e00000a680 link 0x50e00000a5a0
bluetoothd[487726]: profiles/audio/bap.c:bap_state() stream 0x50e00000a5a0: disabling(5) -> qos(2)
bluetoothd[487726]: profiles/audio/transport.c:bap_state_changed() stream 0x50e00000a5a0: disabling(5) -> qos(2)
bluetoothd[487726]: profiles/audio/bap.c:bap_update_cig() adapter 0x513000000200 CIG 0x0
bluetoothd[487726]: profiles/audio/bap.c:bap_update_cig() setup 0x50f000005680 stream 0x50e00000a5a0 busy
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: src/shared/bap.c:bap_send() req 0x5060000655a0 len 3
bluetoothd[487726]: src/shared/att.c:can_read_data() (chan 0x5080000106a0) ATT PDU received: 0x1b
bluetoothd[487726]: src/shared/bap.c:bap_process_queue()
bluetoothd[487726]: [:1.493:method_call] > org.bluez.Device1.Disconnect [#49428]
bluetoothd[487726]: src/device.c:device_set_auto_connect() 9C:47:2A:39:56:FE auto connect: 0
bluetoothd[487726]: src/service.c:change_state() 0x506000051b00: device 9C:47:2A:39:56:FE profile rap state changed: connected -> disconnecting (0)
bluetoothd[487726]: profiles/ranging/rap.c:rap_disconnect()
bluetoothd[487726]: src/service.c:change_state() 0x506000051b00: device 9C:47:2A:39:56:FE profile rap state changed: disconnecting -> disconnected (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000051ce0: device 9C:47:2A:39:56:FE profile bap state changed: connected -> disconnecting (0)
bluetoothd[487726]: profiles/audio/bap.c:ep_unregister() ep 0x506000061fa0 path /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0
bluetoothd[487726]: profiles/audio/bap.c:setup_free() 0x50f000005590
bluetoothd[487726]: profiles/audio/bap.c:setup_io_close() setup 0x50f000005590
bluetoothd[487726]: src/shared/bap.c:bap_stream_io_detach() stream 0x50e00000a680
bluetoothd[487726]: src/shared/bap.c:bap_stream_io_detach() stream 0x50e00000a5a0
bluetoothd[487726]: src/shared/bap.c:stream_io_free() fd 26
bluetoothd[487726]: profiles/audio/transport.c:transport_bap_update_links_uc() stream 0x50e00000a5a0 linked true
bluetoothd[487726]: profiles/audio/transport.c:transport_bap_update_links_uc() stream 0x50e00000a680 linked true
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x5060000659c0 (op 0x08) queue 0x503000083d40
bluetoothd[487726]: [signal] org.freedesktop.DBus.ObjectManager.InterfacesRemoved
bluetoothd[487726]: profiles/audio/bap.c:ep_unregister() ep 0x506000061d00 path /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0
bluetoothd[487726]: profiles/audio/bap.c:setup_free() 0x50f000005680
bluetoothd[487726]: profiles/audio/bap.c:setup_io_close() setup 0x50f000005680
bluetoothd[487726]: src/shared/bap.c:bap_queue_req() req 0x506000065b40 (op 0x08) queue 0x5030000a0a20
bluetoothd[487726]: [signal] org.freedesktop.DBus.ObjectManager.InterfacesRemoved
bluetoothd[487726]: src/shared/bap.c:bt_bap_detach() 0x510000003c40
bluetoothd[487726]: src/shared/bap.c:bap_ucast_detach() stream 0x50e00000a5a0 ep 0x50400003eb10
bluetoothd[487726]: profiles/audio/media.c:pac_clear() endpoint 0x50f0000035b0 stream 0x50e00000a5a0
bluetoothd[487726]: [signal] org.freedesktop.DBus.Properties.PropertiesChanged
bluetoothd[487726]: [signal] org.freedesktop.DBus.Properties.PropertiesChanged
bluetoothd[487726]: [:1.5289:method_call] < org.bluez.MediaEndpoint1.ClearConfiguration
bluetoothd[487726]: profiles/audio/transport.c:media_transport_remove_owner() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1 Owner :1.5289
bluetoothd[487726]: profiles/audio/transport.c:media_request_reply() Request Acquire Reply Input/output error
bluetoothd[487726]: [:1.5289:error] < org.bluez.Error.Failed [#212]
bluetoothd[487726]: profiles/audio/transport.c:linked_transport_remove_owner() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_sink0/fd0 Owner :1.5289
bluetoothd[487726]: profiles/audio/transport.c:media_owner_free() Owner :1.5289
bluetoothd[487726]: profiles/audio/transport.c:media_owner_remove() Owner :1.5289 Request Acquire
bluetoothd[487726]: profiles/audio/transport.c:media_transport_suspend() Transport /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1 Owner
bluetoothd[487726]: profiles/audio/transport.c:transport_set_state() State changed /org/bluez/hci0/dev_9C_47_2A_39_56_FE/pac_source0/fd1: TRANSPORT_STATE_REQUESTING -> TRANSPORT_STATE_IDLE
bluetoothd[487726]: [signal] org.freedesktop.DBus.ObjectManager.InterfacesRemoved
bluetoothd[487726]: src/shared/bap.c:bap_ucast_detach() stream 0x50e00000a680 ep 0x50400003ea10
bluetoothd[487726]: profiles/audio/media.c:pac_clear() endpoint 0x50f0000034c0 stream 0x50e00000a680
bluetoothd[487726]: [:1.5289:method_call] < org.bluez.MediaEndpoint1.ClearConfiguration
bluetoothd[487726]: [signal] org.freedesktop.DBus.ObjectManager.InterfacesRemoved
bluetoothd[487726]: profiles/audio/bass.c:bap_detached() 0x510000003c40
bluetoothd[487726]: profiles/audio/bap.c:bap_detached() 0x510000003c40
bluetoothd[487726]: src/service.c:change_state() 0x506000051ce0: device 9C:47:2A:39:56:FE profile bap state changed: disconnecting -> disconnected (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000052b20: device 9C:47:2A:39:56:FE profile bass state changed: connected -> disconnecting (0)
bluetoothd[487726]: profiles/audio/bass.c:bass_disconnect() 9C:47:2A:39:56:FE
bluetoothd[487726]: profiles/audio/bass.c:bass_detached() 0x50b00000b930
bluetoothd[487726]: src/service.c:change_state() 0x506000052b20: device 9C:47:2A:39:56:FE profile bass state changed: disconnecting -> disconnected (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000052fa0: device 9C:47:2A:39:56:FE profile gap-profile state changed: connected -> disconnecting (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000052fa0: device 9C:47:2A:39:56:FE profile gap-profile state changed: disconnecting -> disconnected (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000053240: device 9C:47:2A:39:56:FE profile deviceinfo state changed: connected -> disconnecting (0)
bluetoothd[487726]: src/service.c:change_state() 0x506000053240: device 9C:47:2A:39:56:FE profile deviceinfo state changed: disconnecting -> disconnected (0)
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-04-23 20:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 7:53 [PATCH BlueZ v2 1/3] audio: Add ability to force CIS transport Links property Frédéric Danis
2026-04-23 7:53 ` [PATCH BlueZ v2 2/3] doc: Add documentation for readwrite " Frédéric Danis
2026-04-23 7:53 ` [PATCH BlueZ v2 3/3] client/player: Add support to unlink transports Frédéric Danis
2026-04-23 9:11 ` [BlueZ,v2,1/3] audio: Add ability to force CIS transport Links property bluez.test.bot
2026-04-23 17:08 ` [PATCH BlueZ v2 1/3] " Luiz Augusto von Dentz
2026-04-23 20:32 ` Frédéric Danis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.