Skip to contentSkip to conversation

adapter: Fix exposing coordinate sets if LE Audio is disabled

PATCH Applied Luiz Augusto von Dentz 3 participants 5 messages Jun 5, 2025 – Jun 6, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/3 adapter: Fix exposing coordinate sets if LE Audio is disabled

From: Luiz Augusto von Dentz <[email protected]>

This fixes exposing non-discoverable coordinate set members if LE Audio is disabled since it may lead system device setting showing them to user that may attempt to pair them and end up not working.

---
 src/adapter.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
src/adapter.c +5 -4
index 2417e3cea960..70141e1542d7 100644
@@ -7356,11 +7356,12 @@ void btd_adapter_device_found(struct btd_adapter *adapter,
 				MGMT_SETTING_ISO_SYNC_RECEIVER))
 			monitoring = true;
 
-		/* Monitor Devices advertising RSI since those can be
-		 * coordinated sets not marked as visible but their object are
-		 * needed.
+		/* If ISO  Socket is enabled, monitor Devices advertising RSI
+		 * since those can be coordinated sets not marked as visible but
+		 * their object are needed.
 		 */
-		if (eir_data.rsi)
+		if (btd_adapter_has_exp_feature(adapter, EXP_FEAT_ISO_SOCKET) &&
+						eir_data.rsi)
 			monitoring = true;
 
 		if (!discoverable && !monitoring) {
Signature · 1 line
2.49.0
author maintainer
#1 lore raw

PATCH 2/3 client: Add assistant.list

From: Luiz Augusto von Dentz <[email protected]>

This adds assistant.list command:

assistant.list --help
List available assistants
Usage:
list

---
 client/assistant.c                | 14 ++++++++++++++
 client/bluetoothctl-assistant.rst |  7 +++++++
 2 files changed, 21 insertions(+)
client/assistant.c +14 -0
index 19d9faac57e5..ffefa25baf9b 100644
@@ -383,11 +383,25 @@ fail:
 	return bt_shell_noninteractive_quit(EXIT_FAILURE);
 }
 
+static void cmd_list_assistant(int argc, char *argv[])
+{
+	GList *l;
+
+	for (l = assistants; l; l = g_list_next(l)) {
+		GDBusProxy *proxy = l->data;
+		print_assistant(proxy, NULL);
+	}
+
+	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+}
+
 static const struct bt_shell_menu assistant_menu = {
 	.name = "assistant",
 	.desc = "Media Assistant Submenu",
 	.pre_run = assistant_menu_pre_run,
 	.entries = {
+	{ "list",         NULL,    cmd_list_assistant,
+						"List available assistants" },
 	{ "push", "<assistant>", cmd_push_assistant,
 					"Send stream information to peer" },
 	{} },
client/bluetoothctl-assistant.rst +7 -0
index ea094f444425..75166a6e7928 100644
@@ -21,6 +21,13 @@ SYNOPSIS
 Assistant Commands
 ==================
 
+list
+----
+
+List available assistants.
+
+:Usage: **> list**
+
 push
 ----
 
Signature · 1 line
2.49.0
author maintainer
#2 lore raw

PATCH 3/3 client: Add assistant.show

In reply to Luiz Augusto von Dentz

From: Luiz Augusto von Dentz <[email protected]>

This adds assistant.show command:

assistant.show --help
Assistant information
Usage:
show [assistant]

---
 client/assistant.c                | 63 +++++++++++++++++++++++++++++--
 client/bluetoothctl-assistant.rst |  7 ++++
 2 files changed, 67 insertions(+), 3 deletions(-)
client/assistant.c +60 -3
index ffefa25baf9b..88795cdd3cd3 100644
@@ -395,15 +395,72 @@ static void cmd_list_assistant(int argc, char *argv[])
 	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
 }
 
+static void print_assistant_properties(GDBusProxy *proxy)
+{
+	bt_shell_printf("Transport %s\n", g_dbus_proxy_get_path(proxy));
+
+	print_property(proxy, "State");
+	print_property(proxy, "Metadata");
+	print_property(proxy, "QoS");
+}
+
+static void print_assistants(void *data, void *user_data)
+{
+	print_assistant_properties(data);
+}
+
+static char *generic_generator(const char *text, int state, GList *source)
+{
+	static int index = 0;
+
+	if (!source)
+		return NULL;
+
+	if (!state)
+		index = 0;
+
+	return g_dbus_proxy_path_lookup(source, &index, text);
+}
+
+static char *assistant_generator(const char *text, int state)
+{
+	return generic_generator(text, state, assistants);
+}
+
+static void cmd_show_assistant(int argc, char *argv[])
+{
+	GDBusProxy *proxy;
+
+	/* Show all transports if no argument is given */
+	if (argc != 2) {
+		g_list_foreach(assistants, print_assistants, NULL);
+		return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+	}
+
+	proxy = g_dbus_proxy_lookup(assistants, NULL, argv[1],
+					MEDIA_ASSISTANT_INTERFACE);
+	if (!proxy) {
+		bt_shell_printf("Assistant %s not found\n", argv[1]);
+		return bt_shell_noninteractive_quit(EXIT_FAILURE);
+	}
+
+	print_assistant_properties(proxy);
+
+	return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+}
+
 static const struct bt_shell_menu assistant_menu = {
 	.name = "assistant",
 	.desc = "Media Assistant Submenu",
 	.pre_run = assistant_menu_pre_run,
 	.entries = {
-	{ "list",         NULL,    cmd_list_assistant,
-						"List available assistants" },
+	{ "list", NULL, cmd_list_assistant, "List available assistants" },
+	{ "show", "[assistant]", cmd_show_assistant,
+					"Assistant information",
+					assistant_generator },
 	{ "push", "<assistant>", cmd_push_assistant,
-					"Send stream information to peer" },
+					"Send stream information to peer",
+					assistant_generator },
 	{} },
 };
 
client/bluetoothctl-assistant.rst +7 -0
index 75166a6e7928..33fbcbc764cf 100644
@@ -28,6 +28,13 @@ List available assistants.
 
 :Usage: **> list**
 
+show
+----
+
+Show assistant information.
+
+:Usage: **> show [assistant]**
+
 push
 ----
 
Signature · 1 line
2.49.0
#3 lore raw
In reply to Luiz Augusto von Dentz

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=969025

---Test result---

Test Summary:

CheckPatch                    PENDING   0.26 seconds
GitLint                       PENDING   0.30 seconds
BuildEll                      PASS      20.34 seconds
BluezMake                     PASS      2621.01 seconds
MakeCheck                     PASS      20.28 seconds
MakeDistcheck                 PASS      195.62 seconds
CheckValgrind                 PASS      272.16 seconds
CheckSmatch                   PASS      299.16 seconds
bluezmakeextell               PASS      126.99 seconds
IncrementalBuild              PENDING   0.23 seconds
ScanBuild                     PASS      898.08 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:

---
Regards,
Linux Bluetooth

#4 lore raw
In reply to Luiz Augusto von Dentz
This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This series was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 9 lines · On Thu, 5 Jun 2025 14:12:54 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

This fixes exposing non-discoverable coordinate set members if LE Audio is disabled since it may lead system device setting showing them to user that may attempt to pair them and end up not working.

[...]

Here is the summary with links:
- [BlueZ,v1,1/3] adapter: Fix exposing coordinate sets if LE Audio is disabled

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=4a7ee30978da
  - [BlueZ,v1,2/3] client: Add assistant.list
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=04c32f3d3129
  - [BlueZ,v1,3/3] client: Add assistant.show
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=f09f33199858

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html