linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH BlueZ v3 0/7] Add support for multiple BISes on the bcast source
@ 2024-02-15 21:23 Silviu Florian Barbulescu
  2024-02-15 21:23 ` [PATCH BlueZ v3 1/7] bap: Remove set lpac user data at bcast ep register Silviu Florian Barbulescu
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Silviu Florian Barbulescu @ 2024-02-15 21:23 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
	andrei.istodorescu, luiz.dentz, iulia.tanasescu

This patch adds support for multiple BISes in broadcast sources.

Example commands:
Create a local endpoint and an endpoint for BIS1:
endpoint.register 00001852-0000-1000-8000-00805f9b34fb 0x06
[/local/endpoint/ep0] Auto Accept (yes/no): y
[/local/endpoint/ep0] Max Transports (auto/value): a
[/local/endpoint/ep0] Locations: 0x03
[/local/endpoint/ep0] Supported Context (value): 0

Configure BIS1, create BIS1 transport and endpoint for BIS2:
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
[/local/endpoint/ep0] BIG (auto/value): 0x01
[/local/endpoint/ep0] Enter channel location (value/no): 0x01
[/local/endpoint/ep0] Enter Metadata (value/no): n

Configure BIS2, create BIS2 transport and endpoint for BIS3:
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
[/local/endpoint/ep0] BIG (auto/value): 0x01
[/local/endpoint/ep0] Enter channel location (value/no): 0x02
[/local/endpoint/ep0] Enter Metadata (value/no): n

For multiple BISes acquire must be called on all transports
before the BIG is created:
transport.acquire /org/bluez/hci0/pac_bcast0/fd0 
transport.acquire /org/bluez/hci0/pac_bcast0/fd1
.....
transport.release /org/bluez/hci0/pac_bcast0/fd0
transport.release /org/bluez/hci0/pac_bcast0/fd1

Silviu Florian Barbulescu (7):
  bap: Remove set lpac user data at bcast ep register
  bap: Split bap_state and bap_connecting in two functions
  shared/bap: Generate single BIS BASE for a config with BIG ID 0xFF
  shared/bap: Add state in the stream struct for broadcast source
  shared/bap: Check the state of all the streams with the same BIG ID
  shared/bap: Add support to create a stream for broadcast source
  bap: Set the generated BASE on all setups from the same BIG

 profiles/audio/bap.c | 307 ++++++++++++++++++++++++++++++++++---------
 src/shared/bap.c     |  87 +++++++++---
 src/shared/bap.h     |   2 +
 3 files changed, 314 insertions(+), 82 deletions(-)


base-commit: ee880bee85864b0e691370197c9de8d2f7ba0af2
-- 
2.39.2


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH BlueZ v4 1/5] shared/bap: Fix endpoint dir for the bcast source
@ 2024-02-23 16:48 Silviu Florian Barbulescu
  2024-02-23 18:51 ` Add support for multiple BISes on " bluez.test.bot
  0 siblings, 1 reply; 14+ messages in thread
From: Silviu Florian Barbulescu @ 2024-02-23 16:48 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
	andrei.istodorescu, luiz.dentz, iulia.tanasescu

Fix endpoint direction for the broadcast source

---
 src/shared/bap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 626e8f127..fd29557b1 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -682,7 +682,7 @@ static struct bt_bap_endpoint *bap_endpoint_new_broadcast(struct bt_bap_db *bdb,
 	if (type == BT_BAP_BCAST_SINK)
 		ep->dir = BT_BAP_BCAST_SOURCE;
 	else
-		ep->dir = 0;
+		ep->dir = BT_BAP_BCAST_SINK;
 
 	return ep;
 }
@@ -1303,7 +1303,7 @@ static void ep_config_cb(struct bt_bap_stream *stream, int err)
 		return;
 
 	if (bt_bap_stream_get_type(stream) == BT_BAP_STREAM_TYPE_BCAST) {
-		if (!bt_bap_stream_io_dir(stream))
+		if (bt_bap_stream_io_dir(stream) == BT_BAP_BCAST_SINK)
 			stream_set_state(stream, BT_BAP_STREAM_STATE_QOS);
 		else if (bt_bap_stream_io_dir(stream) == BT_BAP_BCAST_SOURCE)
 			stream_set_state(stream, BT_BAP_STREAM_STATE_CONFIG);
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH BlueZ v2 1/7] bap: Remove set lpac user data at bcast ep register
@ 2024-02-12 15:32 Silviu Florian Barbulescu
  2024-02-12 17:39 ` Add support for multiple BISes on the bcast source bluez.test.bot
  0 siblings, 1 reply; 14+ messages in thread
From: Silviu Florian Barbulescu @ 2024-02-12 15:32 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
	andrei.istodorescu, luiz.dentz, iulia.tanasescu

Remove set lpac user data at bcast ep register

---
 profiles/audio/bap.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 88c93127b..38ee42894 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1207,8 +1207,6 @@ static struct bap_ep *ep_register_bcast(struct bap_data *data,
 	 */
 	if (rpac)
 		bt_bap_pac_set_user_data(rpac, ep->path);
-	else
-		bt_bap_pac_set_user_data(lpac, ep->path);
 
 	DBG("ep %p lpac %p rpac %p path %s", ep, ep->lpac, ep->rpac, ep->path);
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH BlueZ 1/7] bap: Remove set lpac user data at bcast ep register
@ 2024-02-01 15:28 Silviu Florian Barbulescu
  2024-02-01 17:37 ` Add support for multiple BISes on the bcast source bluez.test.bot
  0 siblings, 1 reply; 14+ messages in thread
From: Silviu Florian Barbulescu @ 2024-02-01 15:28 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
	andrei.istodorescu, luiz.dentz, iulia.tanasescu

Fix a wrongful set of user data with endpoint pat for the local PAC.
Local pac user data is set endpoint_init_pac form media.c
with the media_endpoint

---
 profiles/audio/bap.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 7faa6be7f..209f21471 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -1195,8 +1195,6 @@ static struct bap_ep *ep_register_bcast(struct bap_data *data,
 	 */
 	if (rpac)
 		bt_bap_pac_set_user_data(rpac, ep->path);
-	else
-		bt_bap_pac_set_user_data(lpac, ep->path);
 
 	DBG("ep %p lpac %p rpac %p path %s", ep, ep->lpac, ep->rpac, ep->path);
 
-- 
2.39.2


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

end of thread, other threads:[~2024-02-23 18:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 21:23 [PATCH BlueZ v3 0/7] Add support for multiple BISes on the bcast source Silviu Florian Barbulescu
2024-02-15 21:23 ` [PATCH BlueZ v3 1/7] bap: Remove set lpac user data at bcast ep register Silviu Florian Barbulescu
2024-02-15 23:49   ` Add support for multiple BISes on the bcast source bluez.test.bot
2024-02-15 21:23 ` [PATCH BlueZ v3 2/7] bap: Split bap_state and bap_connecting in two functions Silviu Florian Barbulescu
2024-02-15 21:23 ` [PATCH BlueZ v3 3/7] shared/bap: Generate one BIS BASE for Silviu Florian Barbulescu
2024-02-15 21:23 ` [PATCH BlueZ v3 4/7] shared/bap: Add state in stream struct for bcast source Silviu Florian Barbulescu
2024-02-20 19:10   ` Luiz Augusto von Dentz
2024-02-15 21:23 ` [PATCH BlueZ v3 5/7] shared/bap: Check state of all streams with same BIG ID Silviu Florian Barbulescu
2024-02-15 21:23 ` [PATCH BlueZ v3 6/7] shared/bap: Add support to create stream for bcast source Silviu Florian Barbulescu
2024-02-15 21:23 ` [PATCH BlueZ v3 7/7] bap: Set generated BASE on all setups from the same BIG Silviu Florian Barbulescu
2024-02-21 19:40 ` [PATCH BlueZ v3 0/7] Add support for multiple BISes on the bcast source patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2024-02-23 16:48 [PATCH BlueZ v4 1/5] shared/bap: Fix endpoint dir for " Silviu Florian Barbulescu
2024-02-23 18:51 ` Add support for multiple BISes on " bluez.test.bot
2024-02-12 15:32 [PATCH BlueZ v2 1/7] bap: Remove set lpac user data at bcast ep register Silviu Florian Barbulescu
2024-02-12 17:39 ` Add support for multiple BISes on the bcast source bluez.test.bot
2024-02-01 15:28 [PATCH BlueZ 1/7] bap: Remove set lpac user data at bcast ep register Silviu Florian Barbulescu
2024-02-01 17:37 ` Add support for multiple BISes on the bcast source bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).