2023-06-28 00:01:14

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: [PATCH BlueZ] shared/bap: Fix handling of codec fields

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

Codec fields needs to be converted when codec.id is 0xff as the host
endian may not always be little endian.
---
src/shared/bap.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 55f61d91a3aa..cf5d810bbaf0 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -882,6 +882,12 @@ static void stream_notify_config(struct bt_bap_stream *stream)
put_le24(lpac->qos.ppd_min, config->ppd_min);
put_le24(lpac->qos.ppd_max, config->ppd_max);
config->codec = lpac->codec;
+
+ if (config->codec.id == 0x0ff) {
+ config->codec.vid = cpu_to_le16(config->codec.vid);
+ config->codec.cid = cpu_to_le16(config->codec.cid);
+ }
+
config->cc_len = stream->cc->iov_len;
memcpy(config->cc, stream->cc->iov_base, stream->cc->iov_len);

@@ -4347,6 +4353,11 @@ unsigned int bt_bap_stream_config(struct bt_bap_stream *stream,
config.phy = qos->ucast.io_qos.phy;
config.codec = stream->rpac->codec;

+ if (config.codec.id == 0xff) {
+ config.codec.cid = cpu_to_le16(config.codec.cid);
+ config.codec.vid = cpu_to_le16(config.codec.vid);
+ }
+
iov[0].iov_base = &config;
iov[0].iov_len = sizeof(config);

--
2.40.1



2023-06-28 02:46:26

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ] shared/bap: Fix handling of codec fields

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

---Test result---

Test Summary:
CheckPatch PASS 0.49 seconds
GitLint PASS 0.31 seconds
BuildEll PASS 33.79 seconds
BluezMake PASS 1171.04 seconds
MakeCheck PASS 12.83 seconds
MakeDistcheck PASS 193.63 seconds
CheckValgrind PASS 310.84 seconds
CheckSmatch PASS 432.82 seconds
bluezmakeextell PASS 130.24 seconds
IncrementalBuild PASS 1001.08 seconds
ScanBuild PASS 1376.85 seconds



---
Regards,
Linux Bluetooth

2023-06-28 18:46:23

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ] shared/bap: Fix handling of codec fields

Hello:

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

On Tue, 27 Jun 2023 16:48:40 -0700 you wrote:
> From: Luiz Augusto von Dentz <[email protected]>
>
> Codec fields needs to be converted when codec.id is 0xff as the host
> endian may not always be little endian.
> ---
> src/shared/bap.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)

Here is the summary with links:
- [BlueZ] shared/bap: Fix handling of codec fields
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=ddfa40977c7e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html