This patch series adds 3 additional iso-tester tests, based on
the BAP Broadcast Audio Configurations.
Since Audio configuration 13 requires a Broadcast Source to
create a BIG with 2 BISes, this support has been added in
btdev. This implementation also depends on the kernel support
for multiple BISes, introduced by the following patch:
https://patchwork.kernel.org/project/bluetooth/patch/[email protected]/
Iulia Tanasescu (2):
btdev: Support multiple BIS
iso-tester: Add BAP Broadcast AC tests
emulator/btdev.c | 52 +++++++-----
tools/iso-tester.c | 193 ++++++++++++++++++++++++++++++++++++---------
2 files changed, 190 insertions(+), 55 deletions(-)
base-commit: 7002ecc8914ab1f22e36bd98c4d46eb760edf767
--
2.34.1
This adds support for creating a BIG with multiple BISes.
---
emulator/btdev.c | 52 ++++++++++++++++++++++++++++++------------------
1 file changed, 33 insertions(+), 19 deletions(-)
diff --git a/emulator/btdev.c b/emulator/btdev.c
index f9260511a..2e15d5af2 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -6101,35 +6101,49 @@ static int cmd_create_big_complete(struct btdev *dev, const void *data,
const struct bt_hci_cmd_le_create_big *cmd = data;
const struct bt_hci_bis *bis = &cmd->bis;
int i;
+ struct bt_hci_evt_le_big_complete evt;
+ uint16_t *bis_handle;
+ uint8_t *pdu;
+ uint8_t pdu_len;
+
+ pdu_len = sizeof(evt) + cmd->num_bis * sizeof(*bis_handle);
+
+ pdu = malloc(pdu_len);
+ if (!pdu)
+ return -ENOMEM;
+
+ bis_handle = (uint16_t *)(pdu + sizeof(evt));
+
+ memset(&evt, 0, sizeof(evt));
for (i = 0; i < cmd->num_bis; i++) {
struct btdev_conn *conn;
- struct {
- struct bt_hci_evt_le_big_complete evt;
- uint16_t handle;
- } pdu;
-
- memset(&pdu, 0, sizeof(pdu));
- conn = conn_add_bis(dev, ISO_HANDLE, bis);
+ conn = conn_add_bis(dev, ISO_HANDLE + i, bis);
if (!conn) {
- pdu.evt.status = BT_HCI_ERR_MEM_CAPACITY_EXCEEDED;
+ evt.status = BT_HCI_ERR_MEM_CAPACITY_EXCEEDED;
goto done;
}
- pdu.evt.handle = cmd->handle;
- pdu.evt.num_bis++;
- pdu.evt.phy = bis->phy;
- pdu.evt.max_pdu = bis->sdu;
- memcpy(pdu.evt.sync_delay, bis->sdu_interval, 3);
- memcpy(pdu.evt.latency, bis->sdu_interval, 3);
- pdu.evt.interval = bis->latency / 1.25;
- pdu.handle = cpu_to_le16(conn->handle);
+ *bis_handle = cpu_to_le16(conn->handle);
+ bis_handle++;
+ }
+
+ evt.handle = cmd->handle;
+ evt.phy = bis->phy;
+ evt.max_pdu = bis->sdu;
+ memcpy(evt.sync_delay, bis->sdu_interval, 3);
+ memcpy(evt.latency, bis->sdu_interval, 3);
+ evt.interval = bis->latency / 1.25;
+ evt.num_bis = cmd->num_bis;
done:
- le_meta_event(dev, BT_HCI_EVT_LE_BIG_COMPLETE, &pdu,
- sizeof(pdu));
- }
+ memcpy(pdu, &evt, sizeof(evt));
+
+ le_meta_event(dev, BT_HCI_EVT_LE_BIG_COMPLETE, pdu,
+ pdu_len);
+
+ free(pdu);
return 0;
}
--
2.34.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=751751
---Test result---
Test Summary:
CheckPatch PASS 1.19 seconds
GitLint PASS 0.70 seconds
BuildEll PASS 27.73 seconds
BluezMake PASS 1133.60 seconds
MakeCheck PASS 11.93 seconds
MakeDistcheck PASS 165.18 seconds
CheckValgrind PASS 267.18 seconds
CheckSmatch WARNING 362.33 seconds
bluezmakeextell PASS 109.58 seconds
IncrementalBuild PASS 1875.52 seconds
ScanBuild PASS 1087.08 seconds
Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
emulator/btdev.c:416:29: warning: Variable length array is used.
---
Regards,
Linux Bluetooth
Hello:
This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:
On Mon, 29 May 2023 09:24:56 +0300 you wrote:
> This patch series adds 3 additional iso-tester tests, based on
> the BAP Broadcast Audio Configurations.
>
> Since Audio configuration 13 requires a Broadcast Source to
> create a BIG with 2 BISes, this support has been added in
> btdev. This implementation also depends on the kernel support
> for multiple BISes, introduced by the following patch:
>
> [...]
Here is the summary with links:
- [BlueZ,1/2] btdev: Support multiple BIS
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=97edc78bd81f
- [BlueZ,2/2] iso-tester: Add BAP Broadcast AC tests
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html