All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/1] emulator: Add Create BIG command in emulator
@ 2021-03-16 14:41 cdwhite13
  2021-03-16 14:41 ` [PATCH BlueZ 1/1] " cdwhite13
  0 siblings, 1 reply; 5+ messages in thread
From: cdwhite13 @ 2021-03-16 14:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: chris.white, kpare

From: Chris White <chris.white@dolby.com>

This patch adds support to the emulator for the Create BIG HCI command
needed for using the emulator for LE Audio broadcast development. See
https://github.com/bluez/bluez-sig/issues/3.

kpare (1):
  emulator: Add Create BIG command in emulator

 emulator/btdev.c | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

-- 
2.21.0 (Apple Git-122.2)


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

* [PATCH BlueZ 1/1] emulator: Add Create BIG command in emulator
  2021-03-16 14:41 [PATCH BlueZ 0/1] emulator: Add Create BIG command in emulator cdwhite13
@ 2021-03-16 14:41 ` cdwhite13
  2021-03-16 15:03   ` bluez.test.bot
  0 siblings, 1 reply; 5+ messages in thread
From: cdwhite13 @ 2021-03-16 14:41 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: chris.white, kpare

From: Keyur Parekh <kpare@dolby.com>

This adds support for Create BIG command HCI
command in emulator. These changes are needed for
making the emulator useful for testing
LE Audio broadcast feature.
---
 emulator/btdev.c | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/emulator/btdev.c b/emulator/btdev.c
index c824f48ff..d78d472b1 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -4473,10 +4473,32 @@ static int cmd_reject_cis(struct btdev *dev, const void *data, uint8_t len)
 
 static int cmd_create_big(struct btdev *dev, const void *data, uint8_t len)
 {
-	/* TODO */
-	return -ENOTSUP;
+	cmd_status(dev, BT_HCI_ERR_SUCCESS, BT_HCI_CMD_LE_CREATE_BIG);
+
+	return 0;
 }
 
+static int cmd_create_big_complete(struct btdev *dev, const void *data,
+							uint8_t len)
+{
+	const struct bt_hci_cmd_le_create_big *cmd = data;
+	int i;
+
+	for (i = 0; i < cmd->num_bis; i++) {
+		const struct bt_hci_bis *bis = &cmd->bis[i];
+		struct  bt_hci_evt_le_big_complete evt;
+
+		evt.big_id = cmd->big_id;
+		evt.num_bis = cmd->num_bis;
+		evt.phy = bis->phy;
+		memcpy(&evt.latency, &(bis->latency), 3);
+
+		le_meta_event(dev, BT_HCI_EVT_LE_BIG_COMPLETE, &evt,
+					sizeof(evt));
+	}
+
+	return 0;
+}
 static int cmd_create_big_test(struct btdev *dev, const void *data, uint8_t len)
 {
 	/* TODO */
@@ -4625,7 +4647,8 @@ static int cmd_set_host_feature(struct btdev *dev, const void *data,
 	CMD(BT_HCI_CMD_LE_REMOVE_CIG, cmd_remove_cig, NULL), \
 	CMD(BT_HCI_CMD_LE_ACCEPT_CIS, cmd_accept_cis, NULL), \
 	CMD(BT_HCI_CMD_LE_REJECT_CIS, cmd_reject_cis, NULL), \
-	CMD(BT_HCI_CMD_LE_CREATE_BIG, cmd_create_big, NULL), \
+	CMD(BT_HCI_CMD_LE_CREATE_BIG, cmd_create_big, \
+			cmd_create_big_complete), \
 	CMD(BT_HCI_CMD_LE_CREATE_BIG_TEST, cmd_create_big_test, NULL), \
 	CMD(BT_HCI_CMD_LE_TERM_BIG, cmd_term_big, NULL), \
 	CMD(BT_HCI_CMD_LE_BIG_CREATE_SYNC, cmd_big_create_sync, NULL), \
-- 
2.21.0 (Apple Git-122.2)


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

* RE: emulator: Add Create BIG command in emulator
  2021-03-16 14:41 ` [PATCH BlueZ 1/1] " cdwhite13
@ 2021-03-16 15:03   ` bluez.test.bot
  2021-03-17  1:18     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: bluez.test.bot @ 2021-03-16 15:03 UTC (permalink / raw)
  To: linux-bluetooth, cdwhite13

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

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild - FAIL
Output:
emulator/btdev.c: In function ‘cmd_create_big_complete’:
emulator/btdev.c:4529:6: error: ‘struct bt_hci_evt_le_big_complete’ has no member named ‘big_id’
 4529 |   evt.big_id = cmd->big_id;
      |      ^
emulator/btdev.c:4529:19: error: ‘const struct bt_hci_cmd_le_create_big’ has no member named ‘big_id’
 4529 |   evt.big_id = cmd->big_id;
      |                   ^~
make[1]: *** [Makefile:6794: emulator/btdev.o] Error 1
make: *** [Makefile:4023: all] Error 2


##############################
Test: MakeCheck - SKIPPED
Output:
checkbuild not success



---
Regards,
Linux Bluetooth


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

* Re: emulator: Add Create BIG command in emulator
  2021-03-16 15:03   ` bluez.test.bot
@ 2021-03-17  1:18     ` Luiz Augusto von Dentz
  2021-04-07  0:14       ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2021-03-17  1:18 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: cdwhite13

Hi Chris,

On Tue, Mar 16, 2021 at 3:46 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=449125
>
> ---Test result---
>
> ##############################
> Test: CheckPatch - PASS
>
> ##############################
> Test: CheckGitLint - PASS
>
> ##############################
> Test: CheckBuild - FAIL
> Output:
> emulator/btdev.c: In function ‘cmd_create_big_complete’:
> emulator/btdev.c:4529:6: error: ‘struct bt_hci_evt_le_big_complete’ has no member named ‘big_id’
>  4529 |   evt.big_id = cmd->big_id;
>       |      ^
> emulator/btdev.c:4529:19: error: ‘const struct bt_hci_cmd_le_create_big’ has no member named ‘big_id’
>  4529 |   evt.big_id = cmd->big_id;
>       |                   ^~
> make[1]: *** [Makefile:6794: emulator/btdev.o] Error 1
> make: *** [Makefile:4023: all] Error 2

There is some build errors, big_id has been renamed to handle at some
point, you should always rebase on top to master before submitting
upstream otherwise these errors could happen.

>
> ##############################
> Test: MakeCheck - SKIPPED
> Output:
> checkbuild not success
>
>
>
> ---
> Regards,
> Linux Bluetooth
>


-- 
Luiz Augusto von Dentz

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

* Re: emulator: Add Create BIG command in emulator
  2021-03-17  1:18     ` Luiz Augusto von Dentz
@ 2021-04-07  0:14       ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2021-04-07  0:14 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: cdwhite13

Hi Chris,

On Tue, Mar 16, 2021 at 6:18 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Chris,
>
> On Tue, Mar 16, 2021 at 3:46 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=449125
> >
> > ---Test result---
> >
> > ##############################
> > Test: CheckPatch - PASS
> >
> > ##############################
> > Test: CheckGitLint - PASS
> >
> > ##############################
> > Test: CheckBuild - FAIL
> > Output:
> > emulator/btdev.c: In function ‘cmd_create_big_complete’:
> > emulator/btdev.c:4529:6: error: ‘struct bt_hci_evt_le_big_complete’ has no member named ‘big_id’
> >  4529 |   evt.big_id = cmd->big_id;
> >       |      ^
> > emulator/btdev.c:4529:19: error: ‘const struct bt_hci_cmd_le_create_big’ has no member named ‘big_id’
> >  4529 |   evt.big_id = cmd->big_id;
> >       |                   ^~
> > make[1]: *** [Makefile:6794: emulator/btdev.o] Error 1
> > make: *** [Makefile:4023: all] Error 2
>
> There is some build errors, big_id has been renamed to handle at some
> point, you should always rebase on top to master before submitting
> upstream otherwise these errors could happen.

Ive fixed these myself, they are not applied.

>
> >
> > ##############################
> > Test: MakeCheck - SKIPPED
> > Output:
> > checkbuild not success
> >
> >
> >
> > ---
> > Regards,
> > Linux Bluetooth
> >
>
>
> --
> Luiz Augusto von Dentz



-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2021-04-07  0:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 14:41 [PATCH BlueZ 0/1] emulator: Add Create BIG command in emulator cdwhite13
2021-03-16 14:41 ` [PATCH BlueZ 1/1] " cdwhite13
2021-03-16 15:03   ` bluez.test.bot
2021-03-17  1:18     ` Luiz Augusto von Dentz
2021-04-07  0:14       ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.