Skip to content

Commit 494f880

Browse files
Thalleyaescolar
authored andcommitted
samples: Bluetooth: Add streaming callback for unicast server
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 <[email protected]>
1 parent d6ef80c commit 494f880

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

samples/bluetooth/bap_unicast_server/prj.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ CONFIG_BT_ISO_TX_BUF_COUNT=2
1111
# Support an ISO channel per ASE
1212
CONFIG_BT_ISO_MAX_CHAN=4
1313

14+
CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE=10
15+
1416
# Mandatory to support at least 1 for ASCS
1517
CONFIG_BT_ATT_PREPARE_COUNT=1
1618

samples/bluetooth/bap_unicast_server/src/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,10 @@ static void stream_stopped(struct bt_bap_stream *stream, uint8_t reason)
551551
k_work_cancel_delayable(&audio_send_work);
552552
}
553553

554+
static void stream_started(struct bt_bap_stream *stream)
555+
{
556+
printk("Audio Stream %p started\n", stream);
557+
}
554558

555559
static void stream_enabled_cb(struct bt_bap_stream *stream)
556560
{
@@ -573,6 +577,7 @@ static struct bt_bap_stream_ops stream_ops = {
573577
.recv = stream_recv,
574578
#endif
575579
.stopped = stream_stopped,
580+
.started = stream_started,
576581
.enabled = stream_enabled_cb,
577582
};
578583

0 commit comments

Comments
 (0)