* [PATCH BlueZ v1 1/2] client/player: Make endpoint.show print all endpoint with no argument
@ 2024-09-27 19:54 Luiz Augusto von Dentz
2024-09-27 19:54 ` [PATCH BlueZ v1 2/2] client/player: Make transport.show print all transports " Luiz Augusto von Dentz
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2024-09-27 19:54 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes endpoint.show arguments optional and in case none is given
print all (local and remote) endpoints:
[bluetooth]# endpoint.show
Endpoint /local/endpoint/a2dp_src/sbc
UUID 0000110a-0000-1000-8000-00805f9b34fb
Codec 0x00 (0)
Media Codec: SBC
Channel Modes: Mono DualChannel Stereo JointStereo
Frequencies: 16Khz 32Khz 44.1Khz 48Khz
Subbands: 4 8
Blocks: 4 8 12 16
Bitpool Range: 2-64
Endpoint /local/endpoint/a2dp_snk/sbc
UUID 0000110b-0000-1000-8000-00805f9b34fb
Codec 0x00 (0)
Media Codec: SBC
Channel Modes: Mono DualChannel Stereo JointStereo
Frequencies: 16Khz 32Khz 44.1Khz 48Khz
Subbands: 4 8
Blocks: 4 8 12 16
Bitpool Range: 2-64
---
client/player.c | 46 ++++++++++++++++++++++++++++++++++------------
1 file changed, 34 insertions(+), 12 deletions(-)
diff --git a/client/player.c b/client/player.c
index 31d6f95c292b..39c14a9434cb 100644
--- a/client/player.c
+++ b/client/player.c
@@ -2828,10 +2828,42 @@ static void print_local_endpoint(struct endpoint *ep)
ep->context);
}
+static void print_endpoint_properties(GDBusProxy *proxy)
+{
+ bt_shell_printf("Endpoint %s\n", g_dbus_proxy_get_path(proxy));
+
+ print_property(proxy, "UUID");
+ print_property(proxy, "Codec");
+ print_capabilities(proxy);
+ print_property(proxy, "Device");
+ print_property(proxy, "DelayReporting");
+ print_property(proxy, "Locations");
+ print_property(proxy, "SupportedContext");
+ print_property(proxy, "Context");
+ print_property(proxy, "QoS");
+}
+
+static void print_endpoints(void *data, void *user_data)
+{
+ print_endpoint_properties(data);
+}
+
+static void print_local_endpoints(void *data, void *user_data)
+{
+ print_local_endpoint(data);
+}
+
static void cmd_show_endpoint(int argc, char *argv[])
{
GDBusProxy *proxy;
+ /* Show all endpoints if no argument is given */
+ if (argc != 2) {
+ g_list_foreach(endpoints, print_endpoints, NULL);
+ g_list_foreach(local_endpoints, print_local_endpoints, NULL);
+ return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+ }
+
proxy = g_dbus_proxy_lookup(endpoints, NULL, argv[1],
BLUEZ_MEDIA_ENDPOINT_INTERFACE);
if (!proxy) {
@@ -2845,17 +2877,7 @@ static void cmd_show_endpoint(int argc, char *argv[])
return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}
- bt_shell_printf("Endpoint %s\n", g_dbus_proxy_get_path(proxy));
-
- print_property(proxy, "UUID");
- print_property(proxy, "Codec");
- print_capabilities(proxy);
- print_property(proxy, "Device");
- print_property(proxy, "DelayReporting");
- print_property(proxy, "Locations");
- print_property(proxy, "SupportedContext");
- print_property(proxy, "Context");
- print_property(proxy, "QoS");
+ print_endpoint_properties(proxy);
return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}
@@ -4320,7 +4342,7 @@ static const struct bt_shell_menu endpoint_menu = {
.entries = {
{ "list", "[local]", cmd_list_endpoints,
"List available endpoints" },
- { "show", "<endpoint>", cmd_show_endpoint,
+ { "show", "[endpoint]", cmd_show_endpoint,
"Endpoint information",
endpoint_generator },
{ "register", "<UUID> <codec[:company]> [capabilities...]",
--
2.46.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH BlueZ v1 2/2] client/player: Make transport.show print all transports with no argument
2024-09-27 19:54 [PATCH BlueZ v1 1/2] client/player: Make endpoint.show print all endpoint with no argument Luiz Augusto von Dentz
@ 2024-09-27 19:54 ` Luiz Augusto von Dentz
2024-09-27 22:05 ` [BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint " bluez.test.bot
2024-09-30 19:50 ` [PATCH BlueZ v1 1/2] " patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2024-09-27 19:54 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This makes transport.show arguments optional and in case none is given
print all configured transports:
[bluetooth]# transport.show
Transport /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX/sep4/fd0
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
Codec: 0x02 (2)
Media Codec: MPEG24
Object Types: MPEG-2 AAC LC
Frequencies: 48kHz
Channels: 2
Bitrate: 320000
VBR: Yes
Device: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX
State: active
Delay: 0x06a4 (1700)
Volume: 0x0059 (89)
Endpoint: /org/bluez/hci0/dev_94_XX_XX_XX_XX_XX/sep4
---
client/player.c | 38 +++++++++++++++++++++++++++-----------
1 file changed, 27 insertions(+), 11 deletions(-)
diff --git a/client/player.c b/client/player.c
index 39c14a9434cb..df22465169d5 100644
--- a/client/player.c
+++ b/client/player.c
@@ -5048,17 +5048,8 @@ static void print_configuration(GDBusProxy *proxy)
print_lc3_meta(data, len);
}
-static void cmd_show_transport(int argc, char *argv[])
+static void print_transport_properties(GDBusProxy *proxy)
{
- GDBusProxy *proxy;
-
- 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);
- }
-
bt_shell_printf("Transport %s\n", g_dbus_proxy_get_path(proxy));
print_property(proxy, "UUID");
@@ -5072,6 +5063,31 @@ static void cmd_show_transport(int argc, char *argv[])
print_property(proxy, "QoS");
print_property(proxy, "Location");
print_property(proxy, "Links");
+}
+
+static void print_transports(void *data, void *user_data)
+{
+ print_transport_properties(data);
+}
+
+static void cmd_show_transport(int argc, char *argv[])
+{
+ GDBusProxy *proxy;
+
+ /* Show all transports if no argument is given */
+ if (argc != 2) {
+ g_list_foreach(transports, print_transports, NULL);
+ return bt_shell_noninteractive_quit(EXIT_SUCCESS);
+ }
+
+ 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);
+ }
+
+ print_transport_properties(proxy);
return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}
@@ -5641,7 +5657,7 @@ static const struct bt_shell_menu transport_menu = {
.entries = {
{ "list", NULL, cmd_list_transport,
"List available transports" },
- { "show", "<transport>", cmd_show_transport,
+ { "show", "[transport]", cmd_show_transport,
"Transport information",
transport_generator },
{ "acquire", "<transport> [transport1...]", cmd_acquire_transport,
--
2.46.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint with no argument
2024-09-27 19:54 [PATCH BlueZ v1 1/2] client/player: Make endpoint.show print all endpoint with no argument Luiz Augusto von Dentz
2024-09-27 19:54 ` [PATCH BlueZ v1 2/2] client/player: Make transport.show print all transports " Luiz Augusto von Dentz
@ 2024-09-27 22:05 ` bluez.test.bot
2024-09-30 19:50 ` [PATCH BlueZ v1 1/2] " patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2024-09-27 22:05 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 4870 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=893563
---Test result---
Test Summary:
CheckPatch PASS 0.62 seconds
GitLint FAIL 0.69 seconds
BuildEll PASS 24.15 seconds
BluezMake PASS 1594.08 seconds
MakeCheck PASS 13.20 seconds
MakeDistcheck PASS 179.98 seconds
CheckValgrind PASS 252.34 seconds
CheckSmatch PASS 356.04 seconds
bluezmakeextell PASS 119.47 seconds
IncrementalBuild PASS 2854.97 seconds
ScanBuild WARNING 1035.22 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint with no argument
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
1: T1 Title exceeds max length (84>80): "[BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint with no argument"
10: B3 Line contains hard tab characters (\t): " UUID 0000110a-0000-1000-8000-00805f9b34fb"
11: B3 Line contains hard tab characters (\t): " Codec 0x00 (0)"
12: B3 Line contains hard tab characters (\t): " Media Codec: SBC"
13: B3 Line contains hard tab characters (\t): " Channel Modes: Mono DualChannel Stereo JointStereo"
14: B3 Line contains hard tab characters (\t): " Frequencies: 16Khz 32Khz 44.1Khz 48Khz"
15: B3 Line contains hard tab characters (\t): " Subbands: 4 8"
16: B3 Line contains hard tab characters (\t): " Blocks: 4 8 12 16"
17: B3 Line contains hard tab characters (\t): " Bitpool Range: 2-64"
19: B3 Line contains hard tab characters (\t): " UUID 0000110b-0000-1000-8000-00805f9b34fb"
20: B3 Line contains hard tab characters (\t): " Codec 0x00 (0)"
21: B3 Line contains hard tab characters (\t): " Media Codec: SBC"
22: B3 Line contains hard tab characters (\t): " Channel Modes: Mono DualChannel Stereo JointStereo"
23: B3 Line contains hard tab characters (\t): " Frequencies: 16Khz 32Khz 44.1Khz 48Khz"
24: B3 Line contains hard tab characters (\t): " Subbands: 4 8"
25: B3 Line contains hard tab characters (\t): " Blocks: 4 8 12 16"
26: B3 Line contains hard tab characters (\t): " Bitpool Range: 2-64"
[BlueZ,v1,2/2] client/player: Make transport.show print all transports with no argument
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
1: T1 Title exceeds max length (87>80): "[BlueZ,v1,2/2] client/player: Make transport.show print all transports with no argument"
10: B3 Line contains hard tab characters (\t): " UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)"
11: B3 Line contains hard tab characters (\t): " Codec: 0x02 (2)"
12: B3 Line contains hard tab characters (\t): " Media Codec: MPEG24"
13: B3 Line contains hard tab characters (\t): " Object Types: MPEG-2 AAC LC"
14: B3 Line contains hard tab characters (\t): " Frequencies: 48kHz"
15: B3 Line contains hard tab characters (\t): " Channels: 2"
16: B3 Line contains hard tab characters (\t): " Bitrate: 320000"
17: B3 Line contains hard tab characters (\t): " VBR: Yes"
18: B3 Line contains hard tab characters (\t): " Device: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX"
19: B3 Line contains hard tab characters (\t): " State: active"
20: B3 Line contains hard tab characters (\t): " Delay: 0x06a4 (1700)"
21: B3 Line contains hard tab characters (\t): " Volume: 0x0059 (89)"
22: B3 Line contains hard tab characters (\t): " Endpoint: /org/bluez/hci0/dev_94_XX_XX_XX_XX_XX/sep4"
##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:
client/player.c:2206:8: warning: Null pointer passed to 2nd parameter expecting 'nonnull'
if (!strcmp(ep->path, pattern))
^~~~~~~~~~~~~~~~~~~~~~~~~
client/player.c:3476:16: warning: Null pointer passed to 1st parameter expecting 'nonnull'
codec->name = strdup(name);
^~~~~~~~~~~~
2 warnings generated.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH BlueZ v1 1/2] client/player: Make endpoint.show print all endpoint with no argument
2024-09-27 19:54 [PATCH BlueZ v1 1/2] client/player: Make endpoint.show print all endpoint with no argument Luiz Augusto von Dentz
2024-09-27 19:54 ` [PATCH BlueZ v1 2/2] client/player: Make transport.show print all transports " Luiz Augusto von Dentz
2024-09-27 22:05 ` [BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint " bluez.test.bot
@ 2024-09-30 19:50 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2024-09-30 19:50 UTC (permalink / raw)
To: Luiz Augusto von Dentz; +Cc: linux-bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 27 Sep 2024 15:54:15 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> This makes endpoint.show arguments optional and in case none is given
> print all (local and remote) endpoints:
>
> [bluetooth]# endpoint.show
> Endpoint /local/endpoint/a2dp_src/sbc
> UUID 0000110a-0000-1000-8000-00805f9b34fb
> Codec 0x00 (0)
> Media Codec: SBC
> Channel Modes: Mono DualChannel Stereo JointStereo
> Frequencies: 16Khz 32Khz 44.1Khz 48Khz
> Subbands: 4 8
> Blocks: 4 8 12 16
> Bitpool Range: 2-64
> Endpoint /local/endpoint/a2dp_snk/sbc
> UUID 0000110b-0000-1000-8000-00805f9b34fb
> Codec 0x00 (0)
> Media Codec: SBC
> Channel Modes: Mono DualChannel Stereo JointStereo
> Frequencies: 16Khz 32Khz 44.1Khz 48Khz
> Subbands: 4 8
> Blocks: 4 8 12 16
> Bitpool Range: 2-64
>
> [...]
Here is the summary with links:
- [BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint with no argument
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=95c15d2ca02a
- [BlueZ,v1,2/2] client/player: Make transport.show print all transports with no argument
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=eda123dc6d8e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-30 19:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-27 19:54 [PATCH BlueZ v1 1/2] client/player: Make endpoint.show print all endpoint with no argument Luiz Augusto von Dentz
2024-09-27 19:54 ` [PATCH BlueZ v1 2/2] client/player: Make transport.show print all transports " Luiz Augusto von Dentz
2024-09-27 22:05 ` [BlueZ,v1,1/2] client/player: Make endpoint.show print all endpoint " bluez.test.bot
2024-09-30 19:50 ` [PATCH BlueZ v1 1/2] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox