Lines Matching full:stream
59 struct bt_bap_stream stream; member
90 static uint16_t get_and_incr_seq_num(const struct bt_bap_stream *stream) in get_and_incr_seq_num() argument
93 if (stream == &source_streams[i].stream) { in get_and_incr_seq_num()
109 printk("Could not find endpoint from stream %p\n", stream); in get_and_incr_seq_num()
226 * we can use `stream[i]` to select sink streams (i.e. streams with in audio_timer_timeout()
230 struct bt_bap_stream *stream = &source_streams[i].stream; in audio_timer_timeout() local
242 ret = bt_bap_stream_send(stream, buf, get_and_incr_seq_num(stream)); in audio_timer_timeout()
245 i, stream, ret); in audio_timer_timeout()
249 source_streams[i].len_to_send, i, stream); in audio_timer_timeout()
264 static enum bt_audio_dir stream_dir(const struct bt_bap_stream *stream) in stream_dir() argument
267 if (stream == &source_streams[i].stream) { in stream_dir()
273 if (stream == &sink_streams[i]) { in stream_dir()
278 __ASSERT(false, "Invalid stream %p", stream); in stream_dir()
286 struct bt_bap_stream *stream = &source_streams[i].stream; in stream_alloc() local
288 if (!stream->conn) { in stream_alloc()
289 return stream; in stream_alloc()
294 struct bt_bap_stream *stream = &sink_streams[i]; in stream_alloc() local
296 if (!stream->conn) { in stream_alloc()
297 return stream; in stream_alloc()
306 const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream, in lc3_config() argument
313 *stream = stream_alloc(dir); in lc3_config()
314 if (*stream == NULL) { in lc3_config()
321 printk("ASE Codec Config stream %p\n", *stream); in lc3_config()
337 static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir, in lc3_reconfig() argument
341 printk("ASE Codec Reconfig: stream %p\n", stream); in lc3_reconfig()
356 static int lc3_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos, in lc3_qos() argument
359 printk("QoS: stream %p qos %p\n", stream, qos); in lc3_qos()
364 if (stream == &source_streams[i].stream) { in lc3_qos()
373 static int lc3_enable(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len, in lc3_enable() argument
376 printk("Enable: stream %p meta_len %zu\n", stream, meta_len); in lc3_enable()
384 ret = bt_audio_codec_cfg_get_freq(stream->codec_cfg); in lc3_enable()
394 ret = bt_audio_codec_cfg_get_frame_dur(stream->codec_cfg); in lc3_enable()
405 bt_audio_codec_cfg_get_frame_blocks_per_sdu(stream->codec_cfg, true); in lc3_enable()
424 static int lc3_start(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp) in lc3_start() argument
426 printk("Start: stream %p\n", stream); in lc3_start()
429 if (stream == &source_streams[i].stream) { in lc3_start()
460 static int lc3_metadata(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len, in lc3_metadata() argument
463 printk("Metadata: stream %p meta_len %zu\n", stream, meta_len); in lc3_metadata()
468 static int lc3_disable(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp) in lc3_disable() argument
470 printk("Disable: stream %p\n", stream); in lc3_disable()
475 static int lc3_stop(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp) in lc3_stop() argument
477 printk("Stop: stream %p\n", stream); in lc3_stop()
482 static int lc3_release(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp) in lc3_release() argument
484 printk("Release: stream %p\n", stream); in lc3_release()
508 static void stream_recv_lc3_codec(struct bt_bap_stream *stream, in stream_recv_lc3_codec() argument
537 printk("RX stream %p len %u\n", stream, buf->len); in stream_recv_lc3_codec()
542 static void stream_recv(struct bt_bap_stream *stream, in stream_recv() argument
547 printk("Incoming audio on stream %p len %u\n", stream, buf->len); in stream_recv()
553 static void stream_stopped(struct bt_bap_stream *stream, uint8_t reason) in stream_stopped() argument
555 printk("Audio Stream %p stopped with reason 0x%02X\n", stream, reason); in stream_stopped()
561 static void stream_started(struct bt_bap_stream *stream) in stream_started() argument
563 printk("Audio Stream %p started\n", stream); in stream_started()
566 static void stream_enabled_cb(struct bt_bap_stream *stream) in stream_enabled_cb() argument
571 if (stream_dir(stream) == BT_AUDIO_DIR_SINK) { in stream_enabled_cb()
572 const int err = bt_bap_stream_start(stream); in stream_enabled_cb()
575 printk("Failed to start stream %p: %d", stream, err); in stream_enabled_cb()
748 bt_bap_stream_cb_register(&source_streams[i].stream, in main()