shared/bap: Fix handling of codec fields
Luiz Augusto von Dentz
maintainerPATCH 1/1 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(+)
src/shared/bap.c +11 -0
@@ -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);
Signature · 1 line
2.40.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=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
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 7 lines · 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
0xffas 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html