Skip to content

Commit a32ba62

Browse files
Thalleycarlescufi
authored andcommitted
Bluetooth: BAP: Shell: Improve printing of the BASE
Add offsets for each layer in the BASE and add printing of the presentation delay. Signed-off-by: Emil Gydesen <[email protected]>
1 parent 7b94d57 commit a32ba62

File tree

1 file changed

+5
-7
lines changed
  • subsys/bluetooth/audio/shell

1 file changed

+5
-7
lines changed

subsys/bluetooth/audio/shell/bap.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,33 +1566,31 @@ static void base_recv(struct bt_bap_broadcast_sink *sink, const struct bt_bap_ba
15661566
}
15671567

15681568
shell_print(ctx_shell, "Received BASE from sink %p:", sink);
1569+
shell_print(ctx_shell, "Presentation delay: %u", base->pd);
15691570

15701571
for (int i = 0; i < base->subgroup_count; i++) {
15711572
const struct bt_bap_base_subgroup *subgroup;
15721573

15731574
subgroup = &base->subgroups[i];
15741575

1575-
shell_print(ctx_shell, "Subgroup[%d]:", i);
1576+
shell_print(ctx_shell, "%2sSubgroup[%d]:", "", i);
15761577
print_codec(ctx_shell, &subgroup->codec);
15771578

15781579
for (int j = 0; j < subgroup->bis_count; j++) {
15791580
const struct bt_bap_base_bis_data *bis_data;
15801581

15811582
bis_data = &subgroup->bis_data[j];
15821583

1583-
shell_print(ctx_shell, "BIS[%d] index 0x%02x",
1584-
i, bis_data->index);
1584+
shell_print(ctx_shell, "%4sBIS[%d] index 0x%02x", "", i, bis_data->index);
15851585
bis_indexes[index_count++] = bis_data->index;
15861586

15871587
for (int k = 0; k < bis_data->data_count; k++) {
15881588
const struct bt_codec_data *codec_data;
15891589

15901590
codec_data = &bis_data->data[k];
15911591

1592-
shell_print(ctx_shell,
1593-
"data #%u: type 0x%02x len %u",
1594-
i, codec_data->data.type,
1595-
codec_data->data.data_len);
1592+
shell_print(ctx_shell, "%6sdata #%u: type 0x%02x len %u", "", i,
1593+
codec_data->data.type, codec_data->data.data_len);
15961594
shell_hexdump(ctx_shell, codec_data->data.data,
15971595
codec_data->data.data_len -
15981596
sizeof(codec_data->data.type));

0 commit comments

Comments
 (0)