* RE: Broadcast source reconfiguration support
2024-03-08 16:52 [PATCH BlueZ 1/3] player: Add reconfiguration prompt for broadcast source Silviu Florian Barbulescu
@ 2024-03-08 19:33 ` bluez.test.bot
0 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2024-03-08 19:33 UTC (permalink / raw)
To: linux-bluetooth, silviu.barbulescu
[-- Attachment #1: Type: text/plain, Size: 949 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=833849
---Test result---
Test Summary:
CheckPatch PASS 1.53 seconds
GitLint PASS 1.00 seconds
BuildEll PASS 24.54 seconds
BluezMake PASS 1713.73 seconds
MakeCheck PASS 13.65 seconds
MakeDistcheck PASS 179.10 seconds
CheckValgrind PASS 249.57 seconds
CheckSmatch PASS 352.54 seconds
bluezmakeextell PASS 119.87 seconds
IncrementalBuild PASS 4739.05 seconds
ScanBuild PASS 1075.86 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support
@ 2024-03-13 17:02 Silviu Florian Barbulescu
2024-03-13 17:02 ` [PATCH BlueZ v2 1/3] player: Add reconfiguration prompt for broadcast source Silviu Florian Barbulescu
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Silviu Florian Barbulescu @ 2024-03-13 17:02 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 broadcast source to reconfigure a BIS.
endpoint.config command has a new prompt for broadcast source:
" This is a BIS Reconfiguration? (yes/no)"
Yes or y if a BIS reconfiguration is required
No or n if it is a new BIS configuration
"The BIS index is assigned in the order of the configuration
starting with 1"
"BIS Index (value):" a value representing the BIS index if this is a
BIS reconfiguration.
endpoint.register 00001852-0000-1000-8000-00805f9b34fb 0x06
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
BIS Index for reconfiguration? (value(1-31)/no): 0
[/local/endpoint/ep0] BIG (auto/value): 0
[/local/endpoint/ep0] Enter channel location (value/no): 1
[/local/endpoint/ep0] Enter Metadata (value/no): n
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
[/local/endpoint/ep0] BIS Index for reconfiguration? (value(1-31)/no): 1
[/local/endpoint/ep0] BIG (auto/value): 0
[/local/endpoint/ep0] Enter channel location (value/no): 2
[/local/endpoint/ep0] Enter Metadata (value/no): n
transport.show /org/bluez/hci0/pac_bcast0/fd0 to view the update
Transport /org/bluez/hci0/pac_bcast0/fd0
Configuration.Location: 0x00000002
Configuration.Location: Front Right (0x00000002)
Silviu Florian Barbulescu (3):
player: Add reconfiguration prompt for broadcast source
transport: Add support to update the transport configuration
bap: Broadcast source reconfiguration support added
client/player.c | 33 ++++++++++++++++-
profiles/audio/bap.c | 76 ++++++++++++++++++++++++++++++++++++++
profiles/audio/transport.c | 27 +++++++++++++-
profiles/audio/transport.h | 1 +
src/shared/bap.c | 11 +++++-
5 files changed, 144 insertions(+), 4 deletions(-)
base-commit: c9dddb642663b8bafe8998fef6132a2bb36d609d
--
2.39.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH BlueZ v2 1/3] player: Add reconfiguration prompt for broadcast source
2024-03-13 17:02 [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Silviu Florian Barbulescu
@ 2024-03-13 17:02 ` Silviu Florian Barbulescu
2024-03-13 19:31 ` Broadcast source reconfiguration support bluez.test.bot
2024-03-13 17:02 ` [PATCH BlueZ v2 2/3] transport: Add support to update the transport config Silviu Florian Barbulescu
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Silviu Florian Barbulescu @ 2024-03-13 17:02 UTC (permalink / raw)
To: linux-bluetooth
Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
andrei.istodorescu, luiz.dentz, iulia.tanasescu
endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
[/local/endpoint/ep0] BIS Index for reconfiguration? (value(1-31)/no): n
[/local/endpoint/ep0] BIG (auto/value): 0
[/local/endpoint/ep0] Enter channel location (value/no): 1
[/local/endpoint/ep0] Enter Metadata (value/no): n
---
client/player.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/client/player.c b/client/player.c
index a40bf66e3..688ad02ab 100644
--- a/client/player.c
+++ b/client/player.c
@@ -3809,6 +3809,35 @@ static void config_endpoint_iso_group(const char *input, void *user_data)
}
}
+static void endpoint_is_reconfigure_cfg(const char *input, void *user_data)
+{
+ struct endpoint_config *cfg = user_data;
+ int value;
+ char *endptr = NULL;
+
+ if (!strcasecmp(input, "n") || !strcasecmp(input, "no")) {
+ cfg->ep->iso_stream = BT_ISO_QOS_STREAM_UNSET;
+ goto done;
+ } else {
+ value = strtol(input, &endptr, 0);
+
+ if (!endptr || *endptr != '\0' || value > UINT8_MAX) {
+ bt_shell_printf("Invalid argument: %s\n", input);
+ return bt_shell_noninteractive_quit(EXIT_FAILURE);
+ }
+
+ if (value == 0x0)
+ cfg->ep->iso_stream = BT_ISO_QOS_STREAM_UNSET;
+ else
+ cfg->ep->iso_stream = value;
+ }
+
+done:
+ bt_shell_prompt_input(cfg->ep->path,
+ "BIG (auto/value):",
+ config_endpoint_iso_group, cfg);
+}
+
static void endpoint_set_config_bcast(struct endpoint_config *cfg)
{
cfg->ep->bcode = g_new0(struct iovec, 1);
@@ -3835,8 +3864,8 @@ static void endpoint_set_config_bcast(struct endpoint_config *cfg)
}
bt_shell_prompt_input(cfg->ep->path,
- "BIG (auto/value):",
- config_endpoint_iso_group, cfg);
+ "BIS Index for reconfiguration? (value(1-31)/no):",
+ endpoint_is_reconfigure_cfg, cfg);
}
static void cmd_config_endpoint(int argc, char *argv[])
--
2.39.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH BlueZ v2 2/3] transport: Add support to update the transport config
2024-03-13 17:02 [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Silviu Florian Barbulescu
2024-03-13 17:02 ` [PATCH BlueZ v2 1/3] player: Add reconfiguration prompt for broadcast source Silviu Florian Barbulescu
@ 2024-03-13 17:02 ` Silviu Florian Barbulescu
2024-03-13 17:03 ` [PATCH BlueZ v2 3/3] bap: Broadcast source reconfiguration support added Silviu Florian Barbulescu
2024-03-13 20:04 ` [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Luiz Augusto von Dentz
3 siblings, 0 replies; 8+ messages in thread
From: Silviu Florian Barbulescu @ 2024-03-13 17:02 UTC (permalink / raw)
To: linux-bluetooth
Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
andrei.istodorescu, luiz.dentz, iulia.tanasescu
Add support to update the transport configuration
---
profiles/audio/transport.c | 21 +++++++++++++++++++++
profiles/audio/transport.h | 1 +
2 files changed, 22 insertions(+)
diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 159fbd575..122c3339e 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -1483,6 +1483,27 @@ static void bap_update_bcast_qos(const struct media_transport *transport)
"Configuration");
}
+void bap_update_bcast_config(struct media_transport *transport)
+{
+ struct bap_transport *bap = transport->data;
+ struct iovec *cc;
+
+ cc = bt_bap_stream_get_config(bap->stream);
+
+ if (((int)cc->iov_len != transport->size) ||
+ (memcmp(cc->iov_base, transport->configuration,
+ transport->size) != 0)) {
+ free(transport->configuration);
+ transport->configuration = util_memdup(cc->iov_base,
+ cc->iov_len);
+ transport->size = cc->iov_len;
+
+ g_dbus_emit_property_changed(btd_get_dbus_connection(),
+ transport->path, MEDIA_TRANSPORT_INTERFACE,
+ "Configuration");
+ }
+}
+
static guint transport_bap_resume(struct media_transport *transport,
struct media_owner *owner)
{
diff --git a/profiles/audio/transport.h b/profiles/audio/transport.h
index b46bc8025..6df419a67 100644
--- a/profiles/audio/transport.h
+++ b/profiles/audio/transport.h
@@ -16,6 +16,7 @@ struct media_transport *media_transport_create(struct btd_device *device,
uint8_t *configuration,
size_t size, void *data,
void *stream);
+void bap_update_bcast_config(struct media_transport *transport);
void media_transport_destroy(struct media_transport *transport);
const char *media_transport_get_path(struct media_transport *transport);
--
2.39.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH BlueZ v2 3/3] bap: Broadcast source reconfiguration support added
2024-03-13 17:02 [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Silviu Florian Barbulescu
2024-03-13 17:02 ` [PATCH BlueZ v2 1/3] player: Add reconfiguration prompt for broadcast source Silviu Florian Barbulescu
2024-03-13 17:02 ` [PATCH BlueZ v2 2/3] transport: Add support to update the transport config Silviu Florian Barbulescu
@ 2024-03-13 17:03 ` Silviu Florian Barbulescu
2024-03-13 20:04 ` [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Luiz Augusto von Dentz
3 siblings, 0 replies; 8+ messages in thread
From: Silviu Florian Barbulescu @ 2024-03-13 17:03 UTC (permalink / raw)
To: linux-bluetooth
Cc: mihai-octavian.urzica, silviu.barbulescu, vlad.pruteanu,
andrei.istodorescu, luiz.dentz, iulia.tanasescu
Broadcast source reconfiguration BIS support added
---
profiles/audio/bap.c | 76 ++++++++++++++++++++++++++++++++++++++
profiles/audio/transport.c | 6 ++-
src/shared/bap.c | 11 +++++-
3 files changed, 91 insertions(+), 2 deletions(-)
diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index 1034202cb..a67e0ee94 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -580,6 +580,11 @@ static int setup_parse_bcast_qos(struct bap_setup *setup, const char *key,
return -EINVAL;
dbus_message_iter_get_basic(iter, &qos->bcast.big);
+ } else if (!strcasecmp(key, "BIS")) {
+ if (var != DBUS_TYPE_BYTE)
+ return -EINVAL;
+
+ dbus_message_iter_get_basic(iter, &qos->bcast.bis);
} else if (!strcasecmp(key, "Options")) {
if (var != DBUS_TYPE_BYTE)
return -EINVAL;
@@ -881,6 +886,53 @@ static void setup_free(void *data)
free(setup);
}
+static void iterate_setups(struct bap_setup *setup)
+{
+ const struct queue_entry *entry;
+ struct bap_setup *ent_setup;
+ uint8_t bis_cnt = 1;
+
+ for (entry = queue_get_entries(setup->ep->setups);
+ entry; entry = entry->next) {
+ ent_setup = entry->data;
+
+ if (setup->qos.bcast.big != ent_setup->qos.bcast.big)
+ continue;
+
+ util_iov_free(setup->base, 1);
+ setup->base = NULL;
+
+ if (setup->qos.bcast.bis == bis_cnt) {
+ bt_bap_stream_config(ent_setup->stream, &setup->qos,
+ setup->caps, NULL, NULL);
+ bt_bap_stream_metadata(ent_setup->stream,
+ setup->metadata, NULL, NULL);
+ }
+
+ bis_cnt++;
+ }
+}
+
+static bool verify_state(struct bap_setup *setup)
+{
+ const struct queue_entry *entry;
+ struct bap_setup *ent_setup;
+
+ for (entry = queue_get_entries(setup->ep->setups);
+ entry; entry = entry->next) {
+ ent_setup = entry->data;
+
+ if (setup->qos.bcast.big != ent_setup->qos.bcast.big)
+ continue;
+
+ if (bt_bap_stream_get_state(ent_setup->stream) ==
+ BT_BAP_STREAM_STATE_STREAMING)
+ return false;
+ }
+
+ return true;
+}
+
static DBusMessage *set_configuration(DBusConnection *conn, DBusMessage *msg,
void *data)
{
@@ -922,6 +974,30 @@ static DBusMessage *set_configuration(DBusConnection *conn, DBusMessage *msg,
util_iov_free(setup->metadata, 1);
setup->metadata = util_iov_dup(
bt_bap_pac_get_metadata(ep->rpac), 1);
+ } else if (bt_bap_pac_get_type(ep->lpac) == BT_BAP_BCAST_SOURCE) {
+ if (setup->qos.bcast.bis != BT_ISO_QOS_BIS_UNSET) {
+ if ((setup->qos.bcast.bis > queue_length(ep->setups)) ||
+ (setup->qos.bcast.bis == 0)) {
+ setup_free(setup);
+ return btd_error_invalid_args(msg);
+ }
+
+ /* Verify that no BIS in the BIG is in streaming state
+ */
+ if (!verify_state(setup)) {
+ setup_free(setup);
+ return btd_error_not_permitted(msg,
+ "Broadcast Audio Stream state is invalid");
+ }
+
+ /* Find and updated the BIS specified in
+ * set_configuration command
+ */
+ iterate_setups(setup);
+
+ setup_free(setup);
+ return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
+ }
}
setup->stream = bt_bap_stream_new(ep->data->bap, ep->lpac, ep->rpac,
diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c
index 122c3339e..a060f8c61 100644
--- a/profiles/audio/transport.c
+++ b/profiles/audio/transport.c
@@ -1643,8 +1643,12 @@ static void bap_state_changed(struct bt_bap_stream *stream, uint8_t old_state,
bap_update_links(transport);
if (!media_endpoint_is_broadcast(transport->endpoint))
bap_update_qos(transport);
- else if (bt_bap_stream_io_dir(stream) != BT_BAP_BCAST_SOURCE)
+ else if (bt_bap_stream_io_dir(stream) != BT_BAP_BCAST_SOURCE) {
bap_update_bcast_qos(transport);
+ if (old_state == BT_BAP_STREAM_STATE_QOS)
+ bap_update_bcast_config(transport);
+ }
+
transport_update_playing(transport, FALSE);
return;
case BT_BAP_STREAM_STATE_DISABLING:
diff --git a/src/shared/bap.c b/src/shared/bap.c
index fd99cbbca..603d6d646 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -1701,7 +1701,16 @@ static unsigned int bap_bcast_config(struct bt_bap_stream *stream,
struct bt_bap_qos *qos, struct iovec *data,
bt_bap_stream_func_t func, void *user_data)
{
- stream->qos = *qos;
+ if (qos) {
+ stream->qos = *qos;
+ stream->qos.bcast.bcode = util_iov_dup(qos->bcast.bcode, 1);
+ }
+
+ if (data) {
+ util_iov_free(stream->cc, 1);
+ stream->cc = util_iov_dup(data, 1);
+ }
+
stream->lpac->ops->config(stream, stream->cc, &stream->qos,
ep_config_cb, stream->lpac->user_data);
--
2.39.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: Broadcast source reconfiguration support
2024-03-13 17:02 ` [PATCH BlueZ v2 1/3] player: Add reconfiguration prompt for broadcast source Silviu Florian Barbulescu
@ 2024-03-13 19:31 ` bluez.test.bot
0 siblings, 0 replies; 8+ messages in thread
From: bluez.test.bot @ 2024-03-13 19:31 UTC (permalink / raw)
To: linux-bluetooth, silviu.barbulescu
[-- Attachment #1: Type: text/plain, Size: 948 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=835028
---Test result---
Test Summary:
CheckPatch PASS 1.52 seconds
GitLint PASS 0.95 seconds
BuildEll PASS 24.41 seconds
BluezMake PASS 1710.09 seconds
MakeCheck PASS 13.16 seconds
MakeDistcheck PASS 178.16 seconds
CheckValgrind PASS 246.37 seconds
CheckSmatch PASS 349.25 seconds
bluezmakeextell PASS 118.39 seconds
IncrementalBuild PASS 4599.11 seconds
ScanBuild PASS 991.87 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support
2024-03-13 17:02 [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Silviu Florian Barbulescu
` (2 preceding siblings ...)
2024-03-13 17:03 ` [PATCH BlueZ v2 3/3] bap: Broadcast source reconfiguration support added Silviu Florian Barbulescu
@ 2024-03-13 20:04 ` Luiz Augusto von Dentz
2024-03-13 20:49 ` Luiz Augusto von Dentz
3 siblings, 1 reply; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2024-03-13 20:04 UTC (permalink / raw)
To: Silviu Florian Barbulescu
Cc: linux-bluetooth, mihai-octavian.urzica, vlad.pruteanu,
andrei.istodorescu, iulia.tanasescu
Hi Silviu,
On Wed, Mar 13, 2024 at 1:03 PM Silviu Florian Barbulescu
<silviu.barbulescu@nxp.com> wrote:
>
> This patch adds support for broadcast source to reconfigure a BIS.
> endpoint.config command has a new prompt for broadcast source:
> " This is a BIS Reconfiguration? (yes/no)"
> Yes or y if a BIS reconfiguration is required
> No or n if it is a new BIS configuration
> "The BIS index is assigned in the order of the configuration
> starting with 1"
> "BIS Index (value):" a value representing the BIS index if this is a
> BIS reconfiguration.
> endpoint.register 00001852-0000-1000-8000-00805f9b34fb 0x06
> endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
> BIS Index for reconfiguration? (value(1-31)/no): 0
> [/local/endpoint/ep0] BIG (auto/value): 0
> [/local/endpoint/ep0] Enter channel location (value/no): 1
> [/local/endpoint/ep0] Enter Metadata (value/no): n
> endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
> [/local/endpoint/ep0] BIS Index for reconfiguration? (value(1-31)/no): 1
> [/local/endpoint/ep0] BIG (auto/value): 0
> [/local/endpoint/ep0] Enter channel location (value/no): 2
> [/local/endpoint/ep0] Enter Metadata (value/no): n
> transport.show /org/bluez/hci0/pac_bcast0/fd0 to view the update
> Transport /org/bluez/hci0/pac_bcast0/fd0
>
> Configuration.Location: 0x00000002
> Configuration.Location: Front Right (0x00000002)
>
>
> Silviu Florian Barbulescu (3):
> player: Add reconfiguration prompt for broadcast source
> transport: Add support to update the transport configuration
> bap: Broadcast source reconfiguration support added
>
> client/player.c | 33 ++++++++++++++++-
> profiles/audio/bap.c | 76 ++++++++++++++++++++++++++++++++++++++
> profiles/audio/transport.c | 27 +++++++++++++-
> profiles/audio/transport.h | 1 +
> src/shared/bap.c | 11 +++++-
> 5 files changed, 144 insertions(+), 4 deletions(-)
>
>
> base-commit: c9dddb642663b8bafe8998fef6132a2bb36d609d
> --
> 2.39.2
Something's not quite right, although it seems it does update the
configuration at D-Bus level:
transport.show /org/bluez/hci0/pac_bcast0/fd0
Transport /org/bluez/hci0/pac_bcast0/fd0
UUID: 00001852-0000-1000-8000-00805f9b34fb
Codec: 0x06 (6)
Configuration.#0: len 0x02 type 0x01
Configuration.Sampling Frequency: 48 Khz (0x08)
Configuration.#1: len 0x02 type 0x02
Configuration.Frame Duration: 10 ms (0x01)
Configuration.#2: len 0x03 type 0x04
Configuration.Frame Length: 120 (0x0078)
Configuration.#3: len 0x05 type 0x03
Configuration.Location: 0x00000001
Configuration.Location: Front Left (0x00000001)
Device: /org/bluez/hci0
State: active
Endpoint: /org/bluez/hci0/pac_bcast0
QoS.BIG: 0x00 (0)
QoS.BIS: 0x01 (1)
QoS.SyncFactor: 0x01 (1)
QoS.Packing: 0x00 (0)
QoS.Framing: 0x00 (0)
QoS.BCode:
01 02 68 05 53 f1 41 5a a2 65 bb af c6 ea 03 b8 ..h.S.AZ.e......
QoS.Options: 0x00 (0)
QoS.Skip: 0x0000 (0)
QoS.SyncTimeout: 0x07d0 (2000)
QoS.SyncType: 0x00 (0)
QoS.MSE: 0x00 (0)
QoS.Timeout: 0x07d0 (2000)
QoS.Interval: 0x00002710 (10000)
QoS.Latency: 0x0014 (20)
QoS.SDU: 0x0078 (120)
QoS.PHY: 0x02 (2)
QoS.Retransmissions: 0x04 (4)
Location: 0x00000000 (0)
It doesn't do that at HCI level so it still uses the old configuration
for some reason:
< HCI Command: LE Set Periodic Advertising Data (0x08|0x003f) plen 41
#2839 [hci2] 16:00:16.948281
Handle: 1
Operation: Complete ext advertising data (0x03)
Data length: 0x26
Service Data: Basic Audio Announcement (0x1851)
Presetation Delay: 40000
Number of Subgroups: 1
Subgroup #0:
Number of BIS(s): 1
Codec: LC3 (0x06)
Codec Specific Configuration: #0: len 0x02 type 0x01
Codec Specific Configuration: Sampling Frequency: 16 Khz (0x03)
Codec Specific Configuration: #1: len 0x02 type 0x02
Codec Specific Configuration: Frame Duration: 10 ms (0x01)
Codec Specific Configuration: #2: len 0x03 type 0x04
Codec Specific Configuration: Frame Length: 40 (0x0028)
Codec Specific Configuration: #3: len 0x05 type 0x03
Codec Specific Configuration: Location: 0x00000003
Codec Specific Configuration: Location: Front Left (0x00000001)
Codec Specific Configuration: Location: Front Right (0x00000002)
Metadata: #0: len 0x03 type 0x02
Metadata: Context: 0x0004
Metadata: Context Media (0x0004)
BIS #0:
Index: 1
Perhaps this is a kernel bug though, but it needs to be fixed anyway.
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support
2024-03-13 20:04 ` [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Luiz Augusto von Dentz
@ 2024-03-13 20:49 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 8+ messages in thread
From: Luiz Augusto von Dentz @ 2024-03-13 20:49 UTC (permalink / raw)
To: Silviu Florian Barbulescu
Cc: linux-bluetooth, mihai-octavian.urzica, vlad.pruteanu,
andrei.istodorescu, iulia.tanasescu
Hi Silviu,
On Wed, Mar 13, 2024 at 4:04 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> Hi Silviu,
>
> On Wed, Mar 13, 2024 at 1:03 PM Silviu Florian Barbulescu
> <silviu.barbulescu@nxp.com> wrote:
> >
> > This patch adds support for broadcast source to reconfigure a BIS.
> > endpoint.config command has a new prompt for broadcast source:
> > " This is a BIS Reconfiguration? (yes/no)"
> > Yes or y if a BIS reconfiguration is required
> > No or n if it is a new BIS configuration
> > "The BIS index is assigned in the order of the configuration
> > starting with 1"
> > "BIS Index (value):" a value representing the BIS index if this is a
> > BIS reconfiguration.
> > endpoint.register 00001852-0000-1000-8000-00805f9b34fb 0x06
> > endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
> > BIS Index for reconfiguration? (value(1-31)/no): 0
> > [/local/endpoint/ep0] BIG (auto/value): 0
> > [/local/endpoint/ep0] Enter channel location (value/no): 1
> > [/local/endpoint/ep0] Enter Metadata (value/no): n
> > endpoint.config /org/bluez/hci0/pac_bcast0 /local/endpoint/ep0 48_4_1
> > [/local/endpoint/ep0] BIS Index for reconfiguration? (value(1-31)/no): 1
> > [/local/endpoint/ep0] BIG (auto/value): 0
> > [/local/endpoint/ep0] Enter channel location (value/no): 2
> > [/local/endpoint/ep0] Enter Metadata (value/no): n
> > transport.show /org/bluez/hci0/pac_bcast0/fd0 to view the update
> > Transport /org/bluez/hci0/pac_bcast0/fd0
> >
> > Configuration.Location: 0x00000002
> > Configuration.Location: Front Right (0x00000002)
> >
> >
> > Silviu Florian Barbulescu (3):
> > player: Add reconfiguration prompt for broadcast source
> > transport: Add support to update the transport configuration
> > bap: Broadcast source reconfiguration support added
> >
> > client/player.c | 33 ++++++++++++++++-
> > profiles/audio/bap.c | 76 ++++++++++++++++++++++++++++++++++++++
> > profiles/audio/transport.c | 27 +++++++++++++-
> > profiles/audio/transport.h | 1 +
> > src/shared/bap.c | 11 +++++-
> > 5 files changed, 144 insertions(+), 4 deletions(-)
> >
> >
> > base-commit: c9dddb642663b8bafe8998fef6132a2bb36d609d
> > --
> > 2.39.2
>
> Something's not quite right, although it seems it does update the
> configuration at D-Bus level:
>
> transport.show /org/bluez/hci0/pac_bcast0/fd0
> Transport /org/bluez/hci0/pac_bcast0/fd0
> UUID: 00001852-0000-1000-8000-00805f9b34fb
> Codec: 0x06 (6)
> Configuration.#0: len 0x02 type 0x01
> Configuration.Sampling Frequency: 48 Khz (0x08)
> Configuration.#1: len 0x02 type 0x02
> Configuration.Frame Duration: 10 ms (0x01)
> Configuration.#2: len 0x03 type 0x04
> Configuration.Frame Length: 120 (0x0078)
> Configuration.#3: len 0x05 type 0x03
> Configuration.Location: 0x00000001
> Configuration.Location: Front Left (0x00000001)
> Device: /org/bluez/hci0
> State: active
> Endpoint: /org/bluez/hci0/pac_bcast0
> QoS.BIG: 0x00 (0)
> QoS.BIS: 0x01 (1)
> QoS.SyncFactor: 0x01 (1)
> QoS.Packing: 0x00 (0)
> QoS.Framing: 0x00 (0)
> QoS.BCode:
> 01 02 68 05 53 f1 41 5a a2 65 bb af c6 ea 03 b8 ..h.S.AZ.e......
> QoS.Options: 0x00 (0)
> QoS.Skip: 0x0000 (0)
> QoS.SyncTimeout: 0x07d0 (2000)
> QoS.SyncType: 0x00 (0)
> QoS.MSE: 0x00 (0)
> QoS.Timeout: 0x07d0 (2000)
> QoS.Interval: 0x00002710 (10000)
> QoS.Latency: 0x0014 (20)
> QoS.SDU: 0x0078 (120)
> QoS.PHY: 0x02 (2)
> QoS.Retransmissions: 0x04 (4)
> Location: 0x00000000 (0)
>
> It doesn't do that at HCI level so it still uses the old configuration
> for some reason:
>
> < HCI Command: LE Set Periodic Advertising Data (0x08|0x003f) plen 41
> #2839 [hci2] 16:00:16.948281
> Handle: 1
> Operation: Complete ext advertising data (0x03)
> Data length: 0x26
> Service Data: Basic Audio Announcement (0x1851)
> Presetation Delay: 40000
> Number of Subgroups: 1
> Subgroup #0:
> Number of BIS(s): 1
> Codec: LC3 (0x06)
> Codec Specific Configuration: #0: len 0x02 type 0x01
> Codec Specific Configuration: Sampling Frequency: 16 Khz (0x03)
> Codec Specific Configuration: #1: len 0x02 type 0x02
> Codec Specific Configuration: Frame Duration: 10 ms (0x01)
> Codec Specific Configuration: #2: len 0x03 type 0x04
> Codec Specific Configuration: Frame Length: 40 (0x0028)
> Codec Specific Configuration: #3: len 0x05 type 0x03
> Codec Specific Configuration: Location: 0x00000003
> Codec Specific Configuration: Location: Front Left (0x00000001)
> Codec Specific Configuration: Location: Front Right (0x00000002)
> Metadata: #0: len 0x03 type 0x02
> Metadata: Context: 0x0004
> Metadata: Context Media (0x0004)
> BIS #0:
> Index: 1
>
> Perhaps this is a kernel bug though, but it needs to be fixed anyway.
Looks like the setup->base is not being updated, in fact I don't know
why we stop the base like that instead of just doing:
https://gist.github.com/Vudentz/ab241cd1a373f5d0f7182355f23227c7
Anyway, the fact that the configuration over HCI doesn't update tells
me that perhaps we need some extra steps to validate these changes,
having to test everything you send to the list is not really practical
so I will start requiring evidence that things really work end-to-end,
also it doesn't seem you had made changes to the existing scripts at
client/scripts since you had changed endpoint.config to require
entering the bis index it broke the likes of
client/scripts/broadcast-source.bt.
>
> --
> Luiz Augusto von Dentz
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-13 20:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-13 17:02 [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Silviu Florian Barbulescu
2024-03-13 17:02 ` [PATCH BlueZ v2 1/3] player: Add reconfiguration prompt for broadcast source Silviu Florian Barbulescu
2024-03-13 19:31 ` Broadcast source reconfiguration support bluez.test.bot
2024-03-13 17:02 ` [PATCH BlueZ v2 2/3] transport: Add support to update the transport config Silviu Florian Barbulescu
2024-03-13 17:03 ` [PATCH BlueZ v2 3/3] bap: Broadcast source reconfiguration support added Silviu Florian Barbulescu
2024-03-13 20:04 ` [PATCH BlueZ v2 0/3] Broadcast source reconfiguration support Luiz Augusto von Dentz
2024-03-13 20:49 ` Luiz Augusto von Dentz
-- strict thread matches above, loose matches on Subject: below --
2024-03-08 16:52 [PATCH BlueZ 1/3] player: Add reconfiguration prompt for broadcast source Silviu Florian Barbulescu
2024-03-08 19:33 ` Broadcast source reconfiguration support 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).