Skip to content

Commit

Permalink
samples: Bluetooth: Add streaming callback for unicast server
Browse files Browse the repository at this point in the history
The unicast server now prints when a steam enters the streaming
state.

This commit also slightly increases the metadata size to increase
interoperability with other devices such as Android.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
  • Loading branch information
Thalley authored and aescolar committed Aug 30, 2024
1 parent d6ef80c commit 494f880
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/bluetooth/bap_unicast_server/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ CONFIG_BT_ISO_TX_BUF_COUNT=2
# Support an ISO channel per ASE
CONFIG_BT_ISO_MAX_CHAN=4

CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE=10

# Mandatory to support at least 1 for ASCS
CONFIG_BT_ATT_PREPARE_COUNT=1

Expand Down
5 changes: 5 additions & 0 deletions samples/bluetooth/bap_unicast_server/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,10 @@ static void stream_stopped(struct bt_bap_stream *stream, uint8_t reason)
k_work_cancel_delayable(&audio_send_work);
}

static void stream_started(struct bt_bap_stream *stream)
{
printk("Audio Stream %p started\n", stream);
}

static void stream_enabled_cb(struct bt_bap_stream *stream)
{
Expand All @@ -573,6 +577,7 @@ static struct bt_bap_stream_ops stream_ops = {
.recv = stream_recv,
#endif
.stopped = stream_stopped,
.started = stream_started,
.enabled = stream_enabled_cb,
};

Expand Down

0 comments on commit 494f880

Please sign in to comment.