* [PATCH BlueZ v1 1/2] shared/util: Add GMAP related UUIDs
@ 2023-11-21 20:14 Luiz Augusto von Dentz
2023-11-21 20:14 ` [PATCH BlueZ v1 2/2] monitor/att: Add GMAS attribute decoders Luiz Augusto von Dentz
2023-11-21 21:32 ` [BlueZ,v1,1/2] shared/util: Add GMAP related UUIDs bluez.test.bot
0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2023-11-21 20:14 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds GMAP 1.0[1] UUIDs following the assigned numbers[2].
[1] https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=576496
[2] https://www.bluetooth.com/wp-content/uploads/Files/Specification/Assigned_Numbers.pdf?id=3
---
src/shared/util.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/shared/util.c b/src/shared/util.c
index bf37fce364ed..47efff750e30 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -773,6 +773,7 @@ static const struct {
{ 0x1854, "Hearing Aid" },
{ 0x1855, "Telephony and Media Audio" },
{ 0x1856, "Public Broadcast Announcement" },
+ { 0x1858, "Gaming Audio" },
/* 0x1857 to 0x27ff undefined */
{ 0x2800, "Primary Service" },
{ 0x2801, "Secondary Service" },
@@ -1081,6 +1082,11 @@ static const struct {
{ 0x2bda, "Hearing Aid Features" },
{ 0x2bdb, "Hearing Aid Preset Control Point" },
{ 0x2bdc, "Active Preset Index" },
+ { 0x2c00, "GMAP Role" },
+ { 0x2c01, "UGG Features" },
+ { 0x2c02, "UGT Features" },
+ { 0x2c03, "BGS Features" },
+ { 0x2c03, "BGR Features" },
/* vendor defined */
{ 0xfeff, "GN Netcom" },
{ 0xfefe, "GN ReSound A/S" },
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH BlueZ v1 2/2] monitor/att: Add GMAS attribute decoders
2023-11-21 20:14 [PATCH BlueZ v1 1/2] shared/util: Add GMAP related UUIDs Luiz Augusto von Dentz
@ 2023-11-21 20:14 ` Luiz Augusto von Dentz
2023-11-21 21:32 ` [BlueZ,v1,1/2] shared/util: Add GMAP related UUIDs bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2023-11-21 20:14 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds GMAS attribute decoders.
---
monitor/att.c | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 135 insertions(+)
diff --git a/monitor/att.c b/monitor/att.c
index 39ea5d6dac5a..9db273223352 100644
--- a/monitor/att.c
+++ b/monitor/att.c
@@ -3195,6 +3195,140 @@ static void bcast_audio_scan_cp_write(const struct l2cap_frame *frame)
print_bcast_audio_scan_cp_cmd(frame);
}
+static const struct bitfield_data gmap_role_table[] = {
+ { 0, "Unicast Game Gateway (UGG) (0x0001)" },
+ { 1, "Unicast Game Terminal (UGT) (0x0002)" },
+ { 2, "Broadcast Game Sender (BGS) (0x0004)" },
+ { 3, "Broadcast Game Receiver (BGR) (0x0008)" },
+ { }
+};
+
+static void gmap_role_read(const struct l2cap_frame *frame)
+{
+ uint8_t role;
+ uint8_t mask;
+
+ if (!l2cap_frame_get_u8((void *)frame, &role)) {
+ print_text(COLOR_ERROR, " invalid size");
+ return;
+ }
+
+ print_field(" Role: 0x%2.2x", role);
+
+ mask = print_bitfield(6, role, gmap_role_table);
+ if (mask)
+ print_text(COLOR_WHITE_BG, " Unknown fields (0x%2.2x)",
+ mask);
+}
+
+static const struct bitfield_data ugg_features_table[] = {
+ { 0, "UGG Multiplex (0x0001)" },
+ { 1, "UGG 96 kbps Source (0x0002)" },
+ { 2, "UGG Multilink (0x0004)" },
+ { }
+};
+
+static void ugg_features_read(const struct l2cap_frame *frame)
+{
+ uint8_t value;
+ uint8_t mask;
+
+ if (!l2cap_frame_get_u8((void *)frame, &value)) {
+ print_text(COLOR_ERROR, " invalid size");
+ return;
+ }
+
+ print_field(" Value: 0x%2.2x", value);
+
+ mask = print_bitfield(6, value, ugg_features_table);
+ if (mask)
+ print_text(COLOR_WHITE_BG, " Unknown fields (0x%2.2x)",
+ mask);
+}
+
+static const struct bitfield_data ugt_features_table[] = {
+ { 0, "UGT Source (0x0001)" },
+ { 1, "UGT 80 kbps Source (0x0002)" },
+ { 2, "UGT Sink (0x0004)" },
+ { 3, "UGT 64 kbps Sink (0x0008)" },
+ { 4, "UGT Multiplex (0x0010)" },
+ { 5, "UGT Multisink (0x0020)" },
+ { 6, "UGT Multisource (0x0040)" },
+ { }
+};
+
+static void ugt_features_read(const struct l2cap_frame *frame)
+{
+ uint8_t value;
+ uint8_t mask;
+
+ if (!l2cap_frame_get_u8((void *)frame, &value)) {
+ print_text(COLOR_ERROR, " invalid size");
+ return;
+ }
+
+ print_field(" Value: 0x%2.2x", value);
+
+ mask = print_bitfield(6, value, ugt_features_table);
+ if (mask)
+ print_text(COLOR_WHITE_BG, " Unknown fields (0x%2.2x)",
+ mask);
+}
+
+static const struct bitfield_data bgs_features_table[] = {
+ { 0, "BGS 96 kbps (0x0001)" },
+ { }
+};
+
+static void bgs_features_read(const struct l2cap_frame *frame)
+{
+ uint8_t value;
+ uint8_t mask;
+
+ if (!l2cap_frame_get_u8((void *)frame, &value)) {
+ print_text(COLOR_ERROR, " invalid size");
+ return;
+ }
+
+ print_field(" Value: 0x%2.2x", value);
+
+ mask = print_bitfield(6, value, bgs_features_table);
+ if (mask)
+ print_text(COLOR_WHITE_BG, " Unknown fields (0x%2.2x)",
+ mask);
+}
+
+static const struct bitfield_data bgr_features_table[] = {
+ { 0, "BGR Multisink (0x0001)" },
+ { 1, "BGR Multiplex (0x0002)" },
+ { }
+};
+
+static void bgr_features_read(const struct l2cap_frame *frame)
+{
+ uint8_t value;
+ uint8_t mask;
+
+ if (!l2cap_frame_get_u8((void *)frame, &value)) {
+ print_text(COLOR_ERROR, " invalid size");
+ return;
+ }
+
+ print_field(" Value: 0x%2.2x", value);
+
+ mask = print_bitfield(6, value, bgr_features_table);
+ if (mask)
+ print_text(COLOR_WHITE_BG, " Unknown fields (0x%2.2x)",
+ mask);
+}
+
+#define GMAS \
+ GATT_HANDLER(0x2c00, gmap_role_read, NULL, NULL), \
+ GATT_HANDLER(0x2c01, ugg_features_read, NULL, NULL), \
+ GATT_HANDLER(0x2c02, ugt_features_read, NULL, NULL), \
+ GATT_HANDLER(0x2c02, bgs_features_read, NULL, NULL), \
+ GATT_HANDLER(0x2c03, bgr_features_read, NULL, NULL)
+
#define GATT_HANDLER(_uuid, _read, _write, _notify) \
{ \
.uuid = { \
@@ -3255,6 +3389,7 @@ struct gatt_handler {
GATT_HANDLER(0x2bc7, NULL, bcast_audio_scan_cp_write, NULL),
GATT_HANDLER(0x2bc8, bcast_recv_state_read, NULL,
bcast_recv_state_notify),
+ GMAS
};
static struct gatt_handler *get_handler_uuid(const bt_uuid_t *uuid)
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [BlueZ,v1,1/2] shared/util: Add GMAP related UUIDs
2023-11-21 20:14 [PATCH BlueZ v1 1/2] shared/util: Add GMAP related UUIDs Luiz Augusto von Dentz
2023-11-21 20:14 ` [PATCH BlueZ v1 2/2] monitor/att: Add GMAS attribute decoders Luiz Augusto von Dentz
@ 2023-11-21 21:32 ` bluez.test.bot
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2023-11-21 21:32 UTC (permalink / raw)
To: linux-bluetooth, luiz.dentz
[-- Attachment #1: Type: text/plain, Size: 2721 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=802985
---Test result---
Test Summary:
CheckPatch FAIL 1.23 seconds
GitLint FAIL 0.88 seconds
BuildEll PASS 23.95 seconds
BluezMake PASS 576.11 seconds
MakeCheck PASS 10.52 seconds
MakeDistcheck PASS 150.93 seconds
CheckValgrind PASS 210.30 seconds
CheckSmatch WARNING 316.02 seconds
bluezmakeextell PASS 97.47 seconds
IncrementalBuild PASS 1035.37 seconds
ScanBuild PASS 939.35 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[BlueZ,v1,1/2] shared/util: Add GMAP related UUIDs
WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#72:
[1] https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=576496
/github/workspace/src/src/13463536.patch total: 0 errors, 1 warnings, 18 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/src/13463536.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,v1,1/2] shared/util: Add GMAP related UUIDs
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
8: B1 Line exceeds max length (94>80): "[2] https://www.bluetooth.com/wp-content/uploads/Files/Specification/Assigned_Numbers.pdf?id=3"
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/att.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-21 21:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-21 20:14 [PATCH BlueZ v1 1/2] shared/util: Add GMAP related UUIDs Luiz Augusto von Dentz
2023-11-21 20:14 ` [PATCH BlueZ v1 2/2] monitor/att: Add GMAS attribute decoders Luiz Augusto von Dentz
2023-11-21 21:32 ` [BlueZ,v1,1/2] shared/util: Add GMAP related UUIDs bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox