Skip to content

Commit

Permalink
shared/bap: Add debug helpers
Browse files Browse the repository at this point in the history
This adds bap-debug.{c.h} that implements function helpers that can be
used to print BAP/ASCS/PACS TLV entries.
  • Loading branch information
Vudentz committed Oct 20, 2023
1 parent e1ec086 commit 6d44916
Show file tree
Hide file tree
Showing 6 changed files with 564 additions and 60 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ shared_sources = src/shared/io.h src/shared/timeout.h \
src/shared/gap.h src/shared/gap.c \
src/shared/log.h src/shared/log.c \
src/shared/bap.h src/shared/bap.c src/shared/ascs.h \
src/shared/bap-debug.h src/shared/bap-debug.c \
src/shared/mcs.h src/shared/mcp.h src/shared/mcp.c \
src/shared/vcp.c src/shared/vcp.h \
src/shared/micp.c src/shared/micp.h \
Expand Down
7 changes: 4 additions & 3 deletions profiles/audio/media.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "src/shared/queue.h"
#include "src/shared/att.h"
#include "src/shared/bap.h"
#include "src/shared/bap-debug.h"

#include "avdtp.h"
#include "media.h"
Expand Down Expand Up @@ -1217,13 +1218,13 @@ static bool endpoint_init_pac(struct media_endpoint *endpoint, uint8_t type,
return false;
}

if (!bap_print_cc(endpoint->capabilities, endpoint->size, bap_debug,
NULL)) {
if (!bt_bap_debug_caps(endpoint->capabilities, endpoint->size,
bap_debug, NULL)) {
error("Unable to parse endpoint capabilities");
return false;
}

if (!bap_print_cc(endpoint->metadata, endpoint->metadata_size,
if (!bt_bap_debug_metadata(endpoint->metadata, endpoint->metadata_size,
bap_debug, NULL)) {
error("Unable to parse endpoint metadata");
return false;
Expand Down

0 comments on commit 6d44916

Please sign in to comment.