linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] shared/util: Add conversion function for 24 bits
@ 2021-09-13 20:13 Luiz Augusto von Dentz
  2021-09-13 20:13 ` [PATCH v2 2/2] shared/util: Update UUID database with LE Audio services Luiz Augusto von Dentz
  2021-09-13 20:36 ` [v2,1/2] shared/util: Add conversion function for 24 bits bluez.test.bot
  0 siblings, 2 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2021-09-13 20:13 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds get/put 24 bits variants.
---
 src/shared/util.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/src/shared/util.h b/src/shared/util.h
index 60908371d..ac70117ca 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -131,6 +131,20 @@ static inline uint16_t get_be16(const void *ptr)
 	return be16_to_cpu(get_unaligned((const uint16_t *) ptr));
 }
 
+static inline uint32_t get_le24(const void *ptr)
+{
+	const uint8_t *src = ptr;
+
+	return ((uint32_t)src[2] << 16) | get_le16(ptr);
+}
+
+static inline uint32_t get_be24(const void *ptr)
+{
+	const uint8_t *src = ptr;
+
+	return ((uint32_t)src[0] << 16) | get_be16(&src[1]);
+}
+
 static inline uint32_t get_le32(const void *ptr)
 {
 	return le32_to_cpu(get_unaligned((const uint32_t *) ptr));
@@ -161,6 +175,18 @@ static inline void put_be16(uint16_t val, const void *ptr)
 	put_unaligned(cpu_to_be16(val), (uint16_t *) ptr);
 }
 
+static inline void put_le24(uint32_t val, void *ptr)
+{
+	put_le16(val, ptr);
+	put_unaligned(val >> 16, (uint8_t *) ptr + 2);
+}
+
+static inline void put_be24(uint32_t val, void *ptr)
+{
+	put_unaligned(val >> 16, (uint8_t *) ptr + 2);
+	put_be16(val, ptr + 1);
+}
+
 static inline void put_le32(uint32_t val, void *dst)
 {
 	put_unaligned(cpu_to_le32(val), (uint32_t *) dst);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] shared/util: Update UUID database with LE Audio services
  2021-09-13 20:13 [PATCH v2 1/2] shared/util: Add conversion function for 24 bits Luiz Augusto von Dentz
@ 2021-09-13 20:13 ` Luiz Augusto von Dentz
  2021-10-05 16:13   ` Ahmad Fatoum
  2021-09-13 20:36 ` [v2,1/2] shared/util: Add conversion function for 24 bits bluez.test.bot
  1 sibling, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2021-09-13 20:13 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This updates UUID database with the values from assigned numbers for LE
Audio services.
---
 src/shared/util.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 83 insertions(+), 1 deletion(-)

diff --git a/src/shared/util.c b/src/shared/util.c
index 2887a3efa..81b20d86f 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -289,7 +289,21 @@ static const struct {
 	{ 0x1826, "Fitness Machine"				},
 	{ 0x1827, "Mesh Provisioning"				},
 	{ 0x1828, "Mesh Proxy"					},
-	/* 0x1829 to 0x27ff undefined */
+	{ 0x1843, "Audio Input Control"				},
+	{ 0x1844, "Volume Control"				},
+	{ 0x1845, "Volume Offset Control"			},
+	{ 0x1846, "Coordinated Set Identification"		},
+	{ 0x1848, "Media Control"				},
+	{ 0x1849, "Generic Media Control"			},
+	{ 0x184b, "Telephony Bearer"				},
+	{ 0x184c, "Generic Telephony Bearer"			},
+	{ 0x184c, "Microphone Control"				},
+	{ 0x184e, "Audio Stream Control"			},
+	{ 0x184f, "Broadcast Audio Scan"			},
+	{ 0x1850, "Published Audio Capabilities"		},
+	{ 0x1851, "Basic Audio Announcement"			},
+	{ 0x1852, "Broadcast Audio Announcement"		},
+	/* 0x1853 to 0x27ff undefined */
 	{ 0x2800, "Primary Service"				},
 	{ 0x2801, "Secondary Service"				},
 	{ 0x2802, "Include"					},
@@ -522,6 +536,74 @@ static const struct {
 	{ 0x2ade, "Mesh Proxy Data Out"				},
 	{ 0x2b29, "Client Supported Features"			},
 	{ 0x2b2A, "Database Hash"				},
+	{ 0x2b3a, "Server Supported Features"			},
+	{ 0x2b77, "Audio Input State"				},
+	{ 0x2b78, "Gain Settings Attribute"			},
+	{ 0x2b79, "Audio Input Type"				},
+	{ 0x2b7a, "Audio Input Status"				},
+	{ 0x2b7b, "Audio Input Control Point"			},
+	{ 0x2b7c, "Audio Input Description"			},
+	{ 0x2b7d, "Volume State"				},
+	{ 0x2b7e, "Volume Control Point"			},
+	{ 0x2b7f, "Volume Flags"				},
+	{ 0x2b80, "Offset State"				},
+	{ 0x2b81, "Audio Location"				},
+	{ 0x2b82, "Volume Offset Control Point"			},
+	{ 0x2b83, "Audio Output Description"			},
+	{ 0x2b84, "Set Identity Resolving Key"			},
+	{ 0x2b93, "Media Player Name"				},
+	{ 0x2b94, "Media Player Icon Object ID"			},
+	{ 0x2b95, "Media Player Icon URL"			},
+	{ 0x2b96, "Track Changed"				},
+	{ 0x2b97, "Track Title"					},
+	{ 0x2b98, "Track Duration"				},
+	{ 0x2b99, "Track Position"				},
+	{ 0x2b9a, "Playback Speed"				},
+	{ 0x2b9b, "Seeking Speed"				},
+	{ 0x2b9c, "Current Track Segments Object ID"		},
+	{ 0x2b9d, "Current Track Object ID"			},
+	{ 0x2b9e, "Next Track Object ID"			},
+	{ 0x2b9f, "Parent Group Object ID"			},
+	{ 0x2ba0, "Current Group Object ID"			},
+	{ 0x2ba1, "Playing Order"				},
+	{ 0x2ba2, "Playing Orders Supported"			},
+	{ 0x2ba3, "Media State"					},
+	{ 0x2ba4, "Media Control Point"				},
+	{ 0x2ba5, "Media Control Point Opcodes Supported"	},
+	{ 0x2ba6, "Search Results Object ID"			},
+	{ 0x2ba7, "Search Control Point"			},
+	{ 0x2ba9, "Media Player Icon Object Type"		},
+	{ 0x2baa, "Track Segments Object Type"			},
+	{ 0x2bab, "Track Object Type"				},
+	{ 0x2bac, "Group Object Type"				},
+	{ 0x2bb3, "Bearer Provider Name"			},
+	{ 0x2bb4, "Bearer UCI"					},
+	{ 0x2bb5, "Bearer Technology"				},
+	{ 0x2bb6, "Bearer URI Schemes Supported List"		},
+	{ 0x2bb7, "Bearer Signal Strength"			},
+	{ 0x2bb8, "Bearer Signal Strength Reporting Interval"	},
+	{ 0x2bb9, "Bearer List Current Calls"			},
+	{ 0x2bba, "Content Control ID"				},
+	{ 0x2bbb, "Status Flags"				},
+	{ 0x2bbc, "Incoming Call Target Bearer URI"		},
+	{ 0x2bbd, "Call State"					},
+	{ 0x2bbe, "Call Control Point"				},
+	{ 0x2bbf, "Call Control Point Optional Opcodes"		},
+	{ 0x2bc0, "Termination Reason"				},
+	{ 0x2bc1, "Incoming Call"				},
+	{ 0x2bc2, "Call Friendly Name"				},
+	{ 0x2bc3, "Mute"					},
+	{ 0x2bc4, "Sink ASE"					},
+	{ 0x2bc5, "Source ASE"					},
+	{ 0x2bc6, "ASE Control Point"				},
+	{ 0x2bc7, "Broadcast Audio Scan Control Point"		},
+	{ 0x2bc8, "Broadcast Receive State"			},
+	{ 0x2bc9, "Sink PAC"					},
+	{ 0x2bca, "Sink Audio Locations"			},
+	{ 0x2bcb, "Source PAC"					},
+	{ 0x2bcc, "Source Audio Locations"			},
+	{ 0x2bcd, "Available Audio Contexts"			},
+	{ 0x2bce, "Supported Audio Contexts"			},
 	/* vendor defined */
 	{ 0xfeff, "GN Netcom"					},
 	{ 0xfefe, "GN ReSound A/S"				},
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [v2,1/2] shared/util: Add conversion function for 24 bits
  2021-09-13 20:13 [PATCH v2 1/2] shared/util: Add conversion function for 24 bits Luiz Augusto von Dentz
  2021-09-13 20:13 ` [PATCH v2 2/2] shared/util: Update UUID database with LE Audio services Luiz Augusto von Dentz
@ 2021-09-13 20:36 ` bluez.test.bot
  2021-09-15  1:00   ` Luiz Augusto von Dentz
  1 sibling, 1 reply; 5+ messages in thread
From: bluez.test.bot @ 2021-09-13 20:36 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 1953 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=546113

---Test result---

Test Summary:
CheckPatch                    PASS      0.50 seconds
GitLint                       PASS      0.20 seconds
Prep - Setup ELL              PASS      39.88 seconds
Build - Prep                  PASS      0.09 seconds
Build - Configure             PASS      6.99 seconds
Build - Make                  PASS      173.70 seconds
Make Check                    PASS      8.77 seconds
Make Distcheck                PASS      205.84 seconds
Build w/ext ELL - Configure   PASS      7.14 seconds
Build w/ext ELL - Make        PASS      164.39 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [v2,1/2] shared/util: Add conversion function for 24 bits
  2021-09-13 20:36 ` [v2,1/2] shared/util: Add conversion function for 24 bits bluez.test.bot
@ 2021-09-15  1:00   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2021-09-15  1:00 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

On Mon, Sep 13, 2021 at 1:36 PM <bluez.test.bot@gmail.com> wrote:
>
> 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=546113
>
> ---Test result---
>
> Test Summary:
> CheckPatch                    PASS      0.50 seconds
> GitLint                       PASS      0.20 seconds
> Prep - Setup ELL              PASS      39.88 seconds
> Build - Prep                  PASS      0.09 seconds
> Build - Configure             PASS      6.99 seconds
> Build - Make                  PASS      173.70 seconds
> Make Check                    PASS      8.77 seconds
> Make Distcheck                PASS      205.84 seconds
> Build w/ext ELL - Configure   PASS      7.14 seconds
> Build w/ext ELL - Make        PASS      164.39 seconds
>
> Details
> ##############################
> Test: CheckPatch - PASS
> Desc: Run checkpatch.pl script with rule in .checkpatch.conf
>
> ##############################
> Test: GitLint - PASS
> Desc: Run gitlint with rule in .gitlint
>
> ##############################
> Test: Prep - Setup ELL - PASS
> Desc: Clone, build, and install ELL
>
> ##############################
> Test: Build - Prep - PASS
> Desc: Prepare environment for build
>
> ##############################
> Test: Build - Configure - PASS
> Desc: Configure the BlueZ source tree
>
> ##############################
> Test: Build - Make - PASS
> Desc: Build the BlueZ source tree
>
> ##############################
> Test: Make Check - PASS
> Desc: Run 'make check'
>
> ##############################
> Test: Make Distcheck - PASS
> Desc: Run distcheck to check the distribution
>
> ##############################
> Test: Build w/ext ELL - Configure - PASS
> Desc: Configure BlueZ source with '--enable-external-ell' configuration
>
> ##############################
> Test: Build w/ext ELL - Make - PASS
> Desc: Build BlueZ source with '--enable-external-ell' configuration
>
>
>
> ---
> Regards,
> Linux Bluetooth

Pushed.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/2] shared/util: Update UUID database with LE Audio services
  2021-09-13 20:13 ` [PATCH v2 2/2] shared/util: Update UUID database with LE Audio services Luiz Augusto von Dentz
@ 2021-10-05 16:13   ` Ahmad Fatoum
  0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2021-10-05 16:13 UTC (permalink / raw)
  To: Luiz Augusto von Dentz, linux-bluetooth; +Cc: Pengutronix Kernel Team

Hello Luiz,

On 13.09.21 22:13, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> This updates UUID database with the values from assigned numbers for LE
> Audio services.

Do you know if there is work underway to add LE Audio support to the
BlueZ stack?

Thanks,
Ahmad

> ---
>  src/shared/util.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 83 insertions(+), 1 deletion(-)
> 
> diff --git a/src/shared/util.c b/src/shared/util.c
> index 2887a3efa..81b20d86f 100644
> --- a/src/shared/util.c
> +++ b/src/shared/util.c
> @@ -289,7 +289,21 @@ static const struct {
>  	{ 0x1826, "Fitness Machine"				},
>  	{ 0x1827, "Mesh Provisioning"				},
>  	{ 0x1828, "Mesh Proxy"					},
> -	/* 0x1829 to 0x27ff undefined */
> +	{ 0x1843, "Audio Input Control"				},
> +	{ 0x1844, "Volume Control"				},
> +	{ 0x1845, "Volume Offset Control"			},
> +	{ 0x1846, "Coordinated Set Identification"		},
> +	{ 0x1848, "Media Control"				},
> +	{ 0x1849, "Generic Media Control"			},
> +	{ 0x184b, "Telephony Bearer"				},
> +	{ 0x184c, "Generic Telephony Bearer"			},
> +	{ 0x184c, "Microphone Control"				},
> +	{ 0x184e, "Audio Stream Control"			},
> +	{ 0x184f, "Broadcast Audio Scan"			},
> +	{ 0x1850, "Published Audio Capabilities"		},
> +	{ 0x1851, "Basic Audio Announcement"			},
> +	{ 0x1852, "Broadcast Audio Announcement"		},
> +	/* 0x1853 to 0x27ff undefined */
>  	{ 0x2800, "Primary Service"				},
>  	{ 0x2801, "Secondary Service"				},
>  	{ 0x2802, "Include"					},
> @@ -522,6 +536,74 @@ static const struct {
>  	{ 0x2ade, "Mesh Proxy Data Out"				},
>  	{ 0x2b29, "Client Supported Features"			},
>  	{ 0x2b2A, "Database Hash"				},
> +	{ 0x2b3a, "Server Supported Features"			},
> +	{ 0x2b77, "Audio Input State"				},
> +	{ 0x2b78, "Gain Settings Attribute"			},
> +	{ 0x2b79, "Audio Input Type"				},
> +	{ 0x2b7a, "Audio Input Status"				},
> +	{ 0x2b7b, "Audio Input Control Point"			},
> +	{ 0x2b7c, "Audio Input Description"			},
> +	{ 0x2b7d, "Volume State"				},
> +	{ 0x2b7e, "Volume Control Point"			},
> +	{ 0x2b7f, "Volume Flags"				},
> +	{ 0x2b80, "Offset State"				},
> +	{ 0x2b81, "Audio Location"				},
> +	{ 0x2b82, "Volume Offset Control Point"			},
> +	{ 0x2b83, "Audio Output Description"			},
> +	{ 0x2b84, "Set Identity Resolving Key"			},
> +	{ 0x2b93, "Media Player Name"				},
> +	{ 0x2b94, "Media Player Icon Object ID"			},
> +	{ 0x2b95, "Media Player Icon URL"			},
> +	{ 0x2b96, "Track Changed"				},
> +	{ 0x2b97, "Track Title"					},
> +	{ 0x2b98, "Track Duration"				},
> +	{ 0x2b99, "Track Position"				},
> +	{ 0x2b9a, "Playback Speed"				},
> +	{ 0x2b9b, "Seeking Speed"				},
> +	{ 0x2b9c, "Current Track Segments Object ID"		},
> +	{ 0x2b9d, "Current Track Object ID"			},
> +	{ 0x2b9e, "Next Track Object ID"			},
> +	{ 0x2b9f, "Parent Group Object ID"			},
> +	{ 0x2ba0, "Current Group Object ID"			},
> +	{ 0x2ba1, "Playing Order"				},
> +	{ 0x2ba2, "Playing Orders Supported"			},
> +	{ 0x2ba3, "Media State"					},
> +	{ 0x2ba4, "Media Control Point"				},
> +	{ 0x2ba5, "Media Control Point Opcodes Supported"	},
> +	{ 0x2ba6, "Search Results Object ID"			},
> +	{ 0x2ba7, "Search Control Point"			},
> +	{ 0x2ba9, "Media Player Icon Object Type"		},
> +	{ 0x2baa, "Track Segments Object Type"			},
> +	{ 0x2bab, "Track Object Type"				},
> +	{ 0x2bac, "Group Object Type"				},
> +	{ 0x2bb3, "Bearer Provider Name"			},
> +	{ 0x2bb4, "Bearer UCI"					},
> +	{ 0x2bb5, "Bearer Technology"				},
> +	{ 0x2bb6, "Bearer URI Schemes Supported List"		},
> +	{ 0x2bb7, "Bearer Signal Strength"			},
> +	{ 0x2bb8, "Bearer Signal Strength Reporting Interval"	},
> +	{ 0x2bb9, "Bearer List Current Calls"			},
> +	{ 0x2bba, "Content Control ID"				},
> +	{ 0x2bbb, "Status Flags"				},
> +	{ 0x2bbc, "Incoming Call Target Bearer URI"		},
> +	{ 0x2bbd, "Call State"					},
> +	{ 0x2bbe, "Call Control Point"				},
> +	{ 0x2bbf, "Call Control Point Optional Opcodes"		},
> +	{ 0x2bc0, "Termination Reason"				},
> +	{ 0x2bc1, "Incoming Call"				},
> +	{ 0x2bc2, "Call Friendly Name"				},
> +	{ 0x2bc3, "Mute"					},
> +	{ 0x2bc4, "Sink ASE"					},
> +	{ 0x2bc5, "Source ASE"					},
> +	{ 0x2bc6, "ASE Control Point"				},
> +	{ 0x2bc7, "Broadcast Audio Scan Control Point"		},
> +	{ 0x2bc8, "Broadcast Receive State"			},
> +	{ 0x2bc9, "Sink PAC"					},
> +	{ 0x2bca, "Sink Audio Locations"			},
> +	{ 0x2bcb, "Source PAC"					},
> +	{ 0x2bcc, "Source Audio Locations"			},
> +	{ 0x2bcd, "Available Audio Contexts"			},
> +	{ 0x2bce, "Supported Audio Contexts"			},
>  	/* vendor defined */
>  	{ 0xfeff, "GN Netcom"					},
>  	{ 0xfefe, "GN ReSound A/S"				},
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-05 16:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 20:13 [PATCH v2 1/2] shared/util: Add conversion function for 24 bits Luiz Augusto von Dentz
2021-09-13 20:13 ` [PATCH v2 2/2] shared/util: Update UUID database with LE Audio services Luiz Augusto von Dentz
2021-10-05 16:13   ` Ahmad Fatoum
2021-09-13 20:36 ` [v2,1/2] shared/util: Add conversion function for 24 bits bluez.test.bot
2021-09-15  1:00   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).