Skip to content

Commit

Permalink
[nrf fromtree] Bluetooth: Audio: Add iso_chan to bt_bap_ep_info
Browse files Browse the repository at this point in the history
By exposing the underlying iso channel, the application can retrieve
properties of the iso channel.

This can be useful in case the application wants to use the connection
handle for vendor specific HCI commands or to retrieve the particular
parameters used for the given channel.

Signed-off-by: Rubin Gerritsen <[email protected]>
(cherry picked from commit 7597385)
  • Loading branch information
rugeGerritsen authored and rlubos committed Apr 15, 2024
1 parent 70729fc commit 3ae7585
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/zephyr/bluetooth/audio/bap.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ struct bt_bap_ep_info {
/** Capabilities type */
enum bt_audio_dir dir;

/** The isochronous channel associated with the endpoint. */
struct bt_iso_chan *iso_chan;

/** @brief True if the stream associated with the endpoint is able to send data */
bool can_send;

Expand Down
2 changes: 2 additions & 0 deletions subsys/bluetooth/audio/bap_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,10 @@ int bt_bap_ep_get_info(const struct bt_bap_ep *ep, struct bt_bap_ep_info *info)

if (ep->iso == NULL) {
info->paired_ep = NULL;
info->iso_chan = NULL;
} else {
info->paired_ep = bt_bap_iso_get_paired_ep(ep);
info->iso_chan = &ep->iso->chan;
}

info->can_send = false;
Expand Down

0 comments on commit 3ae7585

Please sign in to comment.