diff mbox series

[BlueZ,v1,1/4] client/player: Add support for entering metadata via endpoint.presets

Message ID 20240819195102.37393-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit b35d0a45baf260a6a626c3f52b074159fdad259c
Headers show
Series [BlueZ,v1,1/4] client/player: Add support for entering metadata via endpoint.presets | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail 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/4] client/player: Add support for entering metadata via endpoint.presets"
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck fail BlueZ Make Check FAIL:
tedd_an/MakeDistcheck fail Make Distcheck FAIL: Package cups was not found in the pkg-config search path. Perhaps you should add the directory containing `cups.pc' to the PKG_CONFIG_PATH environment variable No package 'cups' found make[4]: *** [Makefile:11764: test-suite.log] Error 1 make[3]: *** [Makefile:11872: check-TESTS] Error 2 make[2]: *** [Makefile:12301: check-am] Error 2 make[1]: *** [Makefile:12303: check] Error 2 make: *** [Makefile:12224: distcheck] Error 1
tedd_an/CheckValgrind fail Check Valgrind FAIL: tools/mgmt-tester.c: In function ‘main’: tools/mgmt-tester.c:12725:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without 12725 | int main(int argc, char *argv[]) | ^~~~ make[3]: *** [Makefile:11764: test-suite.log] Error 1 make[2]: *** [Makefile:11872: check-TESTS] Error 2 make[1]: *** [Makefile:12301: check-am] Error 2 make: *** [Makefile:12303: check] Error 2
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild warning ScanBuild: client/player.c:2206:8: warning: Null pointer passed to 2nd parameter expecting 'nonnull' if (!strcmp(ep->path, pattern)) ^~~~~~~~~~~~~~~~~~~~~~~~~ client/player.c:3454:16: warning: Null pointer passed to 1st parameter expecting 'nonnull' codec->name = strdup(name); ^~~~~~~~~~~~ 2 warnings generated.

Commit Message

Luiz Augusto von Dentz Aug. 19, 2024, 7:50 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 client/player.c | 46 ++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 38 insertions(+), 8 deletions(-)

Comments

bluez.test.bot@gmail.com Aug. 19, 2024, 10:55 p.m. UTC | #1
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=881039

---Test result---

Test Summary:
CheckPatch                    PASS      2.01 seconds
GitLint                       FAIL      1.51 seconds
BuildEll                      PASS      24.39 seconds
BluezMake                     PASS      1649.05 seconds
MakeCheck                     FAIL      13.71 seconds
MakeDistcheck                 FAIL      159.68 seconds
CheckValgrind                 FAIL      251.90 seconds
CheckSmatch                   PASS      354.04 seconds
bluezmakeextell               PASS      118.51 seconds
IncrementalBuild              PASS      5957.59 seconds
ScanBuild                     WARNING   997.78 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[BlueZ,v1,1/4] client/player: Add support for entering metadata via endpoint.presets

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/4] client/player: Add support for entering metadata via endpoint.presets"
[BlueZ,v1,3/4] client/player: Make endpoint.show print local preset

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
9: B3 Line contains hard tab characters (\t): "	UUID 00002bc9-0000-1000-8000-00805f9b34fb"
10: B3 Line contains hard tab characters (\t): "	Codec 0x06 (6)"
11: B3 Line contains hard tab characters (\t): "	Capabilities.#0: len 0x03 type 0x01"
12: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequencies: 0x00ff"
13: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequency: 8 Khz (0x0001)"
14: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequency: 11.25 Khz (0x0002)"
15: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequency: 16 Khz (0x0004)"
16: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequency: 22.05 Khz (0x0008)"
17: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequency: 24 Khz (0x0010)"
18: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequency: 32 Khz (0x0020)"
19: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequency: 44.1 Khz (0x0040)"
20: B3 Line contains hard tab characters (\t): "	Capabilities.Sampling Frequency: 48 Khz (0x0080)"
21: B3 Line contains hard tab characters (\t): "	Capabilities.#1: len 0x02 type 0x02"
22: B3 Line contains hard tab characters (\t): "	Capabilities.Frame Duration: 0x03"
23: B3 Line contains hard tab characters (\t): "	Capabilities.Frame Duration: 7.5 ms (0x01)"
24: B3 Line contains hard tab characters (\t): "	Capabilities.Frame Duration: 10 ms (0x02)"
25: B3 Line contains hard tab characters (\t): "	Capabilities.#2: len 0x05 type 0x04"
26: B3 Line contains hard tab characters (\t): "	Capabilities.Frame Length: 26 (0x001a) - 240 (0x00f0)"
27: B3 Line contains hard tab characters (\t): "	Capabilities.#3: len 0x02 type 0x03"
28: B3 Line contains hard tab characters (\t): "	Capabilities.Audio Channel Count: 0x01"
29: B3 Line contains hard tab characters (\t): "	Capabilities.Audio Channel Count: 1 channel (0x01)"
30: B3 Line contains hard tab characters (\t): "	Preset 32_1_1"
31: B3 Line contains hard tab characters (\t): "	Configuration.#0: len 0x02 type 0x01"
32: B3 Line contains hard tab characters (\t): "	Configuration.Sampling Frequency: 32 Khz (0x06)"
33: B3 Line contains hard tab characters (\t): "	Configuration.#1: len 0x02 type 0x02"
34: B3 Line contains hard tab characters (\t): "	Configuration.Frame Duration: 7.5 ms (0x00)"
35: B3 Line contains hard tab characters (\t): "	Configuration.#2: len 0x03 type 0x04"
36: B3 Line contains hard tab characters (\t): "	Configuration.Frame Length: 60 (0x003c)"
37: B3 Line contains hard tab characters (\t): "	Locations 0x00000002 (2)"
[BlueZ,v1,4/4] client/player: Print endpoint preset with endpoint.presets

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
9: B3 Line contains hard tab characters (\t): "	Preset 32_1_1"
10: B3 Line contains hard tab characters (\t): "	Configuration.#0: len 0x02 type 0x01"
11: B3 Line contains hard tab characters (\t): "	Configuration.Sampling Frequency: 32 Khz (0x06)"
12: B3 Line contains hard tab characters (\t): "	Configuration.#1: len 0x02 type 0x02"
13: B3 Line contains hard tab characters (\t): "	Configuration.Frame Duration: 7.5 ms (0x00)"
14: B3 Line contains hard tab characters (\t): "	Configuration.#2: len 0x03 type 0x04"
15: B3 Line contains hard tab characters (\t): "	Configuration.Frame Length: 60 (0x003c)"
##############################
Test: MakeCheck - FAIL
Desc: Run Bluez Make Check
Output:

make[3]: *** [Makefile:11764: test-suite.log] Error 1
make[2]: *** [Makefile:11872: check-TESTS] Error 2
make[1]: *** [Makefile:12301: check-am] Error 2
make: *** [Makefile:12303: check] Error 2
##############################
Test: MakeDistcheck - FAIL
Desc: Run Bluez Make Distcheck
Output:

Package cups was not found in the pkg-config search path.
Perhaps you should add the directory containing `cups.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cups' found
make[4]: *** [Makefile:11764: test-suite.log] Error 1
make[3]: *** [Makefile:11872: check-TESTS] Error 2
make[2]: *** [Makefile:12301: check-am] Error 2
make[1]: *** [Makefile:12303: check] Error 2
make: *** [Makefile:12224: distcheck] Error 1
##############################
Test: CheckValgrind - FAIL
Desc: Run Bluez Make Check with Valgrind
Output:

tools/mgmt-tester.c: In function ‘main’:
tools/mgmt-tester.c:12725:5: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without
12725 | int main(int argc, char *argv[])
      |     ^~~~
make[3]: *** [Makefile:11764: test-suite.log] Error 1
make[2]: *** [Makefile:11872: check-TESTS] Error 2
make[1]: *** [Makefile:12301: check-am] Error 2
make: *** [Makefile:12303: check] Error 2
##############################
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:3454:16: warning: Null pointer passed to 1st parameter expecting 'nonnull'
        codec->name = strdup(name);
                      ^~~~~~~~~~~~
2 warnings generated.



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Aug. 20, 2024, 3:10 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 19 Aug 2024 15:50:59 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> ---
>  client/player.c | 46 ++++++++++++++++++++++++++++++++++++++--------
>  1 file changed, 38 insertions(+), 8 deletions(-)

Here is the summary with links:
  - [BlueZ,v1,1/4] client/player: Add support for entering metadata via endpoint.presets
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=b35d0a45baf2
  - [BlueZ,v1,2/4] client/player: Make endpoint.presets accept endpoint object
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=a59529d3bac6
  - [BlueZ,v1,3/4] client/player: Make endpoint.show print local preset
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=c909433ed23b
  - [BlueZ,v1,4/4] client/player: Print endpoint preset with endpoint.presets
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=168ea3078066

You are awesome, thank you!
diff mbox series

Patch

diff --git a/client/player.c b/client/player.c
index f1cd909663eb..a52575479299 100644
--- a/client/player.c
+++ b/client/player.c
@@ -1228,6 +1228,7 @@  static const struct capabilities {
 struct codec_preset {
 	char *name;
 	const struct iovec data;
+	const struct iovec meta;
 	struct bt_bap_qos qos;
 	uint8_t target_latency;
 	uint32_t chan_alloc;
@@ -2069,7 +2070,10 @@  static DBusMessage *endpoint_select_properties_reply(struct endpoint *ep,
 	}
 
 	/* Copy metadata */
-	cfg->meta = util_iov_dup(ep->meta, 1);
+	if (preset->meta.iov_len)
+		cfg->meta = util_iov_dup(&preset->meta, 1);
+	else
+		cfg->meta = util_iov_dup(ep->meta, 1);
 
 	if (ep->broadcast)
 		qos = &preset->qos.bcast.io_qos;
@@ -4205,7 +4209,8 @@  static void cmd_presets_endpoint(int argc, char *argv[])
 
 		if (argc > 4) {
 			struct codec_preset *alt_preset;
-			struct iovec *iov = (void *)&default_preset->data;
+			struct iovec *caps = (void *)&default_preset->data;
+			struct iovec *meta = (void *)&default_preset->meta;
 
 			/* Check if and alternative preset was given */
 			alt_preset = preset_find_name(preset, argv[4]);
@@ -4218,14 +4223,37 @@  static void cmd_presets_endpoint(int argc, char *argv[])
 				return;
 			}
 
-			iov->iov_base = str2bytearray(argv[4], &iov->iov_len);
-			if (!iov->iov_base) {
-				bt_shell_printf("Invalid configuration %s\n",
-							argv[4]);
-				return bt_shell_noninteractive_quit(
+			/* Check if Codec Configuration was entered */
+			if (strlen(argv[4])) {
+				caps->iov_base = str2bytearray(argv[4],
+							      &caps->iov_len);
+				if (!caps->iov_base) {
+					bt_shell_printf("Invalid configuration "
+								"%s\n",
+								argv[4]);
+					return bt_shell_noninteractive_quit(
 								EXIT_FAILURE);
+				}
 			}
 
+			/* Check if metadata was entered */
+			if (argc > 5) {
+				meta->iov_base = str2bytearray(argv[5],
+								&meta->iov_len);
+				if (!meta->iov_base) {
+					bt_shell_printf("Invalid metadata %s\n",
+							argv[5]);
+					return bt_shell_noninteractive_quit(
+								EXIT_FAILURE);
+				}
+			}
+
+			/* If configuration was left empty then ask the
+			 * parameters.
+			 */
+			if (!caps->iov_base || !caps->iov_len)
+				goto enter_cc;
+
 			bt_shell_prompt_input("QoS", "Enter Target Latency "
 						"(Low, Balance, High):",
 						custom_target_latency,
@@ -4236,6 +4264,7 @@  static void cmd_presets_endpoint(int argc, char *argv[])
 	} else
 		print_presets(preset);
 
+enter_cc:
 	if (default_preset && default_preset->custom) {
 		bt_shell_prompt_input("Codec", "Enter frequency (Khz):",
 					custom_frequency, default_preset);
@@ -4265,7 +4294,8 @@  static const struct bt_shell_menu endpoint_menu = {
 						cmd_config_endpoint,
 						"Configure Endpoint",
 						endpoint_generator },
-	{ "presets",      "<UUID> <codec[:company]> [preset] [config]",
+	{ "presets",      "<UUID> <codec[:company]> [preset] [codec config] "
+						"[metadata]",
 						cmd_presets_endpoint,
 						"List or add presets",
 						uuid_generator },