mbox series

[BlueZ,v3,0/4] Add initial support for BAP broadcast source

Message ID 20230530141339.100733-1-silviu.barbulescu@nxp.com
Headers show
Series Add initial support for BAP broadcast source | expand

Message

Silviu Florian Barbulescu May 30, 2023, 2:13 p.m. UTC
This patch adds initial support for BAP broadcast source.

The current implementation allows BAP source endpoint registration,
media transport creation, transport acquiring and sending broadcast ISO data.

Currently, one BIG containing one BIS is supported.

To test the current implementation use bluetoothctl with the following commands:
# endpoint.register 00001852-0000-1000-8000-00805f9b34fb 0x06
# transport.acquire /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0
# transport.send /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0 <file.wav>

The curent implementation checks that ISO_BROADCASTER is suported on the board so
"Check for ISO support in controller" patch is required
(https://patchwork.kernel.org/project/bluetooth/patch/20230510134557.11486-2-claudia.rosu@nxp.com/)

Silviu Florian Barbulescu (4):
  Split bt_bap_qos structure into unicast and broadcast structures
  Update bluetoothctl with support for broadcast source
  This adds the initial code for BAP broadcast source
  Update BAP plugin with broadcast source support

 client/player.c            | 223 +++++++++++++++--
 profiles/audio/bap.c       | 478 ++++++++++++++++++++++++++++++++-----
 profiles/audio/media.c     | 142 +++++++++--
 profiles/audio/transport.c |  57 +++--
 src/shared/bap.c           | 370 ++++++++++++++++++++++------
 src/shared/bap.h           |  80 +++++--
 unit/test-bap.c            |  75 +++---
 7 files changed, 1168 insertions(+), 257 deletions(-)


base-commit: 7002ecc8914ab1f22e36bd98c4d46eb760edf767

Comments

Luiz Augusto von Dentz May 31, 2023, 12:22 a.m. UTC | #1
Hi Silviu,

On Tue, May 30, 2023 at 7:15 AM Silviu Florian Barbulescu
<silviu.barbulescu@nxp.com> wrote:
>
> This patch adds initial support for BAP broadcast source.
>
> The current implementation allows BAP source endpoint registration,
> media transport creation, transport acquiring and sending broadcast ISO data.
>
> Currently, one BIG containing one BIS is supported.
>
> To test the current implementation use bluetoothctl with the following commands:
> # endpoint.register 00001852-0000-1000-8000-00805f9b34fb 0x06
> # transport.acquire /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0
> # transport.send /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0 <file.wav>

I was trying to test this but it doesn't work for me:

transport.acquire /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0
Transport /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0 not found

Anyway I would suggest not to create the endpoint at
device_00_00_00_00_00_00 as that is sort of overkill just to be able
to broadcast, instead we can probably expose it at adapter level e.g:
/org/bluez/hci0/pac_bcast0, and we configure it like:

endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep3 [preset]

> The curent implementation checks that ISO_BROADCASTER is suported on the board so
> "Check for ISO support in controller" patch is required
> (https://patchwork.kernel.org/project/bluetooth/patch/20230510134557.11486-2-claudia.rosu@nxp.com/)
>
> Silviu Florian Barbulescu (4):
>   Split bt_bap_qos structure into unicast and broadcast structures
>   Update bluetoothctl with support for broadcast source
>   This adds the initial code for BAP broadcast source
>   Update BAP plugin with broadcast source support

Btw, please use proper prefix e.g. shared/bap, client/player, etc, and
there are still some lines that are over 80 columns that need fixing.

>
>  client/player.c            | 223 +++++++++++++++--
>  profiles/audio/bap.c       | 478 ++++++++++++++++++++++++++++++++-----
>  profiles/audio/media.c     | 142 +++++++++--
>  profiles/audio/transport.c |  57 +++--
>  src/shared/bap.c           | 370 ++++++++++++++++++++++------
>  src/shared/bap.h           |  80 +++++--
>  unit/test-bap.c            |  75 +++---
>  7 files changed, 1168 insertions(+), 257 deletions(-)
>
>
> base-commit: 7002ecc8914ab1f22e36bd98c4d46eb760edf767
> --
> 2.34.1
>
Luiz Augusto von Dentz June 3, 2023, 12:23 a.m. UTC | #2
Hi Silviu,

On Tue, May 30, 2023 at 5:22 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Silviu,
>
> On Tue, May 30, 2023 at 7:15 AM Silviu Florian Barbulescu
> <silviu.barbulescu@nxp.com> wrote:
> >
> > This patch adds initial support for BAP broadcast source.
> >
> > The current implementation allows BAP source endpoint registration,
> > media transport creation, transport acquiring and sending broadcast ISO data.
> >
> > Currently, one BIG containing one BIS is supported.
> >
> > To test the current implementation use bluetoothctl with the following commands:
> > # endpoint.register 00001852-0000-1000-8000-00805f9b34fb 0x06
> > # transport.acquire /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0
> > # transport.send /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0 <file.wav>
>
> I was trying to test this but it doesn't work for me:
>
> transport.acquire /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0
> Transport /org/bluez/hci0/dev_00_00_00_00_00_00/pac_broadcast0/fd0 not found
>
> Anyway I would suggest not to create the endpoint at
> device_00_00_00_00_00_00 as that is sort of overkill just to be able
> to broadcast, instead we can probably expose it at adapter level e.g:
> /org/bluez/hci0/pac_bcast0, and we configure it like:
>
> endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep3 [preset]

Are you planning to continue working on this set? Or are you waiting
for some more feedback?

> > The curent implementation checks that ISO_BROADCASTER is suported on the board so
> > "Check for ISO support in controller" patch is required
> > (https://patchwork.kernel.org/project/bluetooth/patch/20230510134557.11486-2-claudia.rosu@nxp.com/)
> >
> > Silviu Florian Barbulescu (4):
> >   Split bt_bap_qos structure into unicast and broadcast structures
> >   Update bluetoothctl with support for broadcast source
> >   This adds the initial code for BAP broadcast source
> >   Update BAP plugin with broadcast source support
>
> Btw, please use proper prefix e.g. shared/bap, client/player, etc, and
> there are still some lines that are over 80 columns that need fixing.
>
> >
> >  client/player.c            | 223 +++++++++++++++--
> >  profiles/audio/bap.c       | 478 ++++++++++++++++++++++++++++++++-----
> >  profiles/audio/media.c     | 142 +++++++++--
> >  profiles/audio/transport.c |  57 +++--
> >  src/shared/bap.c           | 370 ++++++++++++++++++++++------
> >  src/shared/bap.h           |  80 +++++--
> >  unit/test-bap.c            |  75 +++---
> >  7 files changed, 1168 insertions(+), 257 deletions(-)
> >
> >
> > base-commit: 7002ecc8914ab1f22e36bd98c4d46eb760edf767
> > --
> > 2.34.1
> >
>
>
> --
> Luiz Augusto von Dentz