/Zephyr-latest/tests/bluetooth/audio/cap_initiator/uut/ |
D | bap_unicast_client.c | 32 int bt_bap_unicast_client_config(struct bt_bap_stream *stream, in bt_bap_unicast_client_config() argument 35 if (stream == NULL || stream->ep == NULL || codec_cfg == NULL) { in bt_bap_unicast_client_config() 39 switch (stream->ep->status.state) { in bt_bap_unicast_client_config() 48 unicast_client_cb->config(stream, BT_BAP_ASCS_RSP_CODE_SUCCESS, in bt_bap_unicast_client_config() 52 stream->ep->status.state = BT_BAP_EP_STATE_CODEC_CONFIGURED; in bt_bap_unicast_client_config() 54 if (stream->ops != NULL && stream->ops->configured != NULL) { in bt_bap_unicast_client_config() 57 stream->ops->configured(stream, &pref); in bt_bap_unicast_client_config() 65 struct bt_bap_stream *stream; in bt_bap_unicast_client_qos() local 71 SYS_SLIST_FOR_EACH_CONTAINER(&group->streams, stream, _node) { in bt_bap_unicast_client_qos() 72 if (stream->conn == conn) { in bt_bap_unicast_client_qos() [all …]
|
/Zephyr-latest/tests/bluetooth/audio/ascs/src/ |
D | test_ase_state_transition.c | 39 struct bt_bap_stream stream; member 79 bt_bap_stream_cb_register(&fixture->stream, &mock_bap_stream_ops); in test_ase_snk_state_transition_before() 105 bt_bap_stream_cb_register(&fixture->stream, &mock_bap_stream_ops); in test_ase_src_state_transition_before() 133 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local 139 test_ase_control_client_config_codec(conn, ase_id, stream); in ZTEST_F() 143 expect_bt_bap_stream_ops_configured_called_once(stream, EMPTY); in ZTEST_F() 147 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local 153 test_preamble_state_codec_configured(conn, ase_id, stream); in ZTEST_F() 158 expect_bt_bap_unicast_server_cb_qos_called_once(stream, EMPTY); in ZTEST_F() 159 expect_bt_bap_stream_ops_qos_set_called_once(stream); in ZTEST_F() [all …]
|
D | test_ase_state_transition_invalid.c | 34 struct bt_bap_stream stream; member 287 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local 294 test_preamble_state_codec_configured(conn, ase_id, stream); in ZTEST_F() 306 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local 313 test_preamble_state_qos_configured(conn, ase_id, stream); in ZTEST_F() 324 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local 331 test_preamble_state_enabling(conn, ase_id, stream); in ZTEST_F() 343 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local 351 test_preamble_state_streaming(conn, ase_id, stream, &chan, false); in ZTEST_F() 377 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local [all …]
|
/Zephyr-latest/subsys/bluetooth/audio/ |
D | bap_stream.c | 1 /* Bluetooth Audio Stream */ 63 void bt_bap_stream_init(struct bt_bap_stream *stream) in bt_bap_stream_init() argument 68 /* Save the stream->ops and stream->user_data owned by API user */ in bt_bap_stream_init() 69 ops = stream->ops; in bt_bap_stream_init() 70 user_data = stream->user_data; in bt_bap_stream_init() 72 memset(stream, 0, sizeof(*stream)); in bt_bap_stream_init() 75 stream->ops = ops; in bt_bap_stream_init() 76 stream->user_data = user_data; in bt_bap_stream_init() 79 void bt_bap_stream_attach(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep, in bt_bap_stream_attach() argument 82 LOG_DBG("conn %p stream %p ep %p codec_cfg %p", (void *)conn, stream, ep, codec_cfg); in bt_bap_stream_attach() [all …]
|
D | bap_stream.h | 2 * @brief Internal APIs for Audio Stream handling 18 void bt_bap_stream_init(struct bt_bap_stream *stream); 21 int bt_bap_stream_disconnect(struct bt_bap_stream *stream); 23 void bt_bap_stream_reset(struct bt_bap_stream *stream); 25 void bt_bap_stream_attach(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep, 30 void bt_bap_stream_detach(struct bt_bap_stream *stream); 35 bool bt_bap_stream_can_disconnect(const struct bt_bap_stream *stream); 37 enum bt_bap_ascs_reason bt_bap_stream_verify_qos(const struct bt_bap_stream *stream, 40 struct bt_iso_chan *bt_bap_stream_iso_chan_get(struct bt_bap_stream *stream);
|
/Zephyr-latest/drivers/i2s/ |
D | i2s_esp32.c | 50 void (*queue_drop)(struct i2s_esp32_stream *stream); 120 static void i2s_esp32_queue_drop(struct i2s_esp32_stream *stream) in i2s_esp32_queue_drop() argument 124 while (k_msgq_get(&stream->queue, &item, K_NO_WAIT) == 0) { in i2s_esp32_queue_drop() 125 k_mem_slab_free(stream->i2s_cfg.mem_slab, item.buffer); in i2s_esp32_queue_drop() 138 struct i2s_esp32_stream *stream; in i2s_esp32_restart_dma() local 143 stream = &dev_data->rx; in i2s_esp32_restart_dma() 144 dst = stream->mem_block; in i2s_esp32_restart_dma() 146 stream = &dev_data->tx; in i2s_esp32_restart_dma() 147 src = stream->mem_block; in i2s_esp32_restart_dma() 153 err = dma_reload(stream->dma_dev, stream->dma_channel, (uint32_t)src, (uint32_t)dst, in i2s_esp32_restart_dma() [all …]
|
D | i2s_ll_stm32.c | 198 struct stream *stream; in i2s_stm32_configure() local 204 stream = &dev_data->rx; in i2s_stm32_configure() 206 stream = &dev_data->tx; in i2s_stm32_configure() 214 if (stream->state != I2S_STATE_NOT_READY && in i2s_stm32_configure() 215 stream->state != I2S_STATE_READY) { in i2s_stm32_configure() 220 stream->master = true; in i2s_stm32_configure() 223 stream->master = false; in i2s_stm32_configure() 227 stream->queue_drop(stream); in i2s_stm32_configure() 228 memset(&stream->cfg, 0, sizeof(struct i2s_config)); in i2s_stm32_configure() 229 stream->state = I2S_STATE_NOT_READY; in i2s_stm32_configure() [all …]
|
D | i2s_mcux_flexcomm.c | 33 struct stream { struct 50 struct stream rx; argument 55 struct stream tx; 173 struct stream *stream; in i2s_mcux_config_get() local 176 stream = &dev_data->rx; in i2s_mcux_config_get() 178 stream = &dev_data->tx; in i2s_mcux_config_get() 181 if (stream->state == I2S_STATE_NOT_READY) { in i2s_mcux_config_get() 185 return &stream->cfg; in i2s_mcux_config_get() 193 struct stream *stream; in i2s_mcux_configure() local 199 stream = &dev_data->rx; in i2s_mcux_configure() [all …]
|
D | i2s_sam_ssc.c | 78 struct stream { struct 88 int (*stream_start)(struct stream *, Ssc *const, argument 90 void (*stream_disable)(struct stream *, Ssc *const, argument 92 void (*queue_drop)(struct stream *); argument 99 struct stream rx; argument 100 struct stream tx; 108 static void rx_stream_disable(struct stream *, Ssc *const, 110 static void tx_stream_disable(struct stream *, Ssc *const, 212 struct stream *stream = &dev_data->rx; in dma_rx_callback() local 216 __ASSERT_NO_MSG(stream->mem_block != NULL); in dma_rx_callback() [all …]
|
/Zephyr-latest/include/zephyr/bluetooth/classic/ |
D | a2dp.h | 44 .codec_cap = _capability, .stream = NULL, \ 326 /** @brief Stream End Point */ 332 /** AVDTP Stream End Point Identifier */ 334 /* Internally used stream object pointer */ 335 struct bt_a2dp_stream *stream; member 343 /** Stream End Point Information */ 357 * @brief Called when a stream endpoint is discovered. 360 * object. It'll be called on each valid stream endpoint discovery completion. 392 /** The max count of seps (stream endpoint) that can be got in this call route */ 426 * @param[out] stream Pointer to stream that will be configured for the endpoint. [all …]
|
/Zephyr-latest/samples/bluetooth/bap_unicast_client/src/ |
D | stream_lc3.c | 40 * @param stream The TX stream to generate and fill the sine wave for 42 static void fill_audio_buf_sin(struct tx_stream *stream) in fill_audio_buf_sin() argument 45 (stream->lc3_tx.frame_duration_us * stream->lc3_tx.freq_hz) / USEC_PER_SEC; in fill_audio_buf_sin() 46 const int sine_period_samples = stream->lc3_tx.freq_hz / AUDIO_TONE_FREQUENCY_HZ; in fill_audio_buf_sin() 56 static int extract_lc3_config(struct tx_stream *stream) in extract_lc3_config() argument 58 const struct bt_audio_codec_cfg *codec_cfg = stream->bap_stream->codec_cfg; in extract_lc3_config() 59 struct stream_lc3_tx *lc3_tx = &stream->lc3_tx; in extract_lc3_config() 133 static bool encode_frame(struct tx_stream *stream, uint8_t index, struct net_buf *out_buf) in encode_frame() argument 135 const uint16_t octets_per_frame = stream->lc3_tx.octets_per_frame; in encode_frame() 139 fill_audio_buf_sin(stream); in encode_frame() [all …]
|
/Zephyr-latest/tests/bluetooth/tester/src/audio/ |
D | btp_bap_unicast.c | 35 static inline struct btp_bap_unicast_stream *stream_bap_to_unicast(struct bt_bap_stream *stream) in stream_bap_to_unicast() argument 37 return CONTAINER_OF(CONTAINER_OF(CONTAINER_OF(stream, struct bt_cap_stream, bap_stream), in stream_bap_to_unicast() 42 static inline struct bt_bap_stream *stream_unicast_to_bap(struct btp_bap_unicast_stream *stream) in stream_unicast_to_bap() argument 44 return &stream->audio_stream.cap_stream.bap_stream; in stream_unicast_to_bap() 111 void btp_bap_unicast_stream_free(struct btp_bap_unicast_stream *stream) in btp_bap_unicast_stream_free() argument 113 (void)memset(stream, 0, sizeof(*stream)); in btp_bap_unicast_stream_free() 120 struct bt_bap_stream *stream = stream_unicast_to_bap(&conn->streams[i]); in btp_bap_unicast_stream_find() local 123 if (stream->ep == NULL) { in btp_bap_unicast_stream_find() 127 (void)bt_bap_ep_get_info(stream->ep, &info); in btp_bap_unicast_stream_find() 326 const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream, in lc3_config() argument [all …]
|
D | btp_bap_audio_stream.h | 34 * @brief Register a stream for TX 38 * @param bap_stream The stream to register 46 int btp_bap_audio_stream_tx_register(struct btp_bap_audio_stream *stream); 49 * @brief Unregister a stream for TX 53 * @param bap_stream The stream to unregister 60 int btp_bap_audio_stream_tx_unregister(struct btp_bap_audio_stream *stream); 63 * @brief Test if the provided stream has been configured for TX 65 * @param bap_stream The stream to test for TX support 69 bool btp_bap_audio_stream_can_send(struct btp_bap_audio_stream *stream); 74 * @param stream The stream that completed TX [all …]
|
/Zephyr-latest/subsys/bluetooth/host/classic/ |
D | a2dp.c | 154 struct bt_a2dp_stream *stream = NULL; in a2dp_process_config_ind() local 200 /* For reconfig, ep->stream must already be valid, callback can be NULL as default accept. in a2dp_process_config_ind() 201 * For !reconfig, config_req must be set to get stream from upper layer in a2dp_process_config_ind() 204 stream = ep->stream; in a2dp_process_config_ind() 205 if (stream == NULL) { in a2dp_process_config_ind() 224 err = a2dp_cb->config_req(a2dp, ep, &cfg, &stream, &rsp_err_code); in a2dp_process_config_ind() 225 if (!err && stream) { in a2dp_process_config_ind() 226 stream->a2dp = a2dp; in a2dp_process_config_ind() 227 stream->local_ep = ep; in a2dp_process_config_ind() 228 stream->remote_ep_id = int_seid; in a2dp_process_config_ind() [all …]
|
/Zephyr-latest/tests/bluetooth/audio/mocks/include/ |
D | bap_stream_expects.h | 25 func_name, "stream");)) \ 40 static inline void expect_bt_bap_stream_ops_qos_set_called_once(struct bt_bap_stream *stream) in expect_bt_bap_stream_ops_qos_set_called_once() argument 47 zexpect_equal_ptr(stream, mock_bap_stream_qos_set_cb_fake.arg0_val, in expect_bt_bap_stream_ops_qos_set_called_once() 48 "'%s()' was called with incorrect '%s'", func_name, "stream"); in expect_bt_bap_stream_ops_qos_set_called_once() 59 static inline void expect_bt_bap_stream_ops_enabled_called_once(struct bt_bap_stream *stream) in expect_bt_bap_stream_ops_enabled_called_once() argument 66 zexpect_equal_ptr(stream, mock_bap_stream_enabled_cb_fake.arg0_val, in expect_bt_bap_stream_ops_enabled_called_once() 67 "'%s()' was called with incorrect '%s'", func_name, "stream"); in expect_bt_bap_stream_ops_enabled_called_once() 79 struct bt_bap_stream *stream) in expect_bt_bap_stream_ops_metadata_updated_called_once() argument 86 zexpect_equal_ptr(stream, mock_bap_stream_metadata_updated_cb_fake.arg0_val, in expect_bt_bap_stream_ops_metadata_updated_called_once() 87 "'%s()' was called with incorrect '%s'", func_name, "stream"); in expect_bt_bap_stream_ops_metadata_updated_called_once() [all …]
|
/Zephyr-latest/lib/libc/minimal/source/stdout/ |
D | stdout_console.c | 28 int z_impl_zephyr_fputc(int c, FILE *stream) in z_impl_zephyr_fputc() argument 30 return ((stream == stdout) || (stream == stderr)) ? _stdout_hook(c) : EOF; in z_impl_zephyr_fputc() 34 static inline int z_vrfy_zephyr_fputc(int c, FILE *stream) in z_vrfy_zephyr_fputc() argument 36 return z_impl_zephyr_fputc(c, stream); in z_vrfy_zephyr_fputc() 41 int fputc(int c, FILE *stream) in fputc() argument 43 return zephyr_fputc(c, stream); in fputc() 46 int fputs(const char *ZRESTRICT s, FILE *ZRESTRICT stream) in fputs() argument 51 ret = fwrite(s, 1, len, stream); in fputs() 57 int putc(int c, FILE *stream) in putc() argument 59 return zephyr_fputc(c, stream); in putc() [all …]
|
/Zephyr-latest/samples/bluetooth/hap_ha/src/ |
D | bap_unicast_sr.c | 35 struct bt_bap_stream *stream; member 43 static uint16_t get_and_incr_seq_num(const struct bt_bap_stream *stream) in get_and_incr_seq_num() argument 46 if (stream == source_streams[i].stream) { in get_and_incr_seq_num() 51 printk("Could not find endpoint from stream %p\n", stream); in get_and_incr_seq_num() 154 * we can use `stream[i]` to select sink streams (i.e. streams with in audio_timer_timeout() 158 struct bt_bap_stream *stream = source_streams[i].stream; in audio_timer_timeout() local 170 ret = bt_bap_stream_send(stream, buf, get_and_incr_seq_num(stream)); in audio_timer_timeout() 173 i, stream, ret); in audio_timer_timeout() 177 len_to_send, i, stream); in audio_timer_timeout() 192 struct bt_bap_stream *stream = &streams[i]; in stream_alloc() local [all …]
|
/Zephyr-latest/samples/bluetooth/tmap_peripheral/src/ |
D | bap_unicast_sr.c | 48 struct bt_bap_stream *stream; member 125 struct bt_bap_stream *stream = &streams[i]; in stream_alloc() local 127 if (!stream->conn) { in stream_alloc() 128 return stream; in stream_alloc() 136 const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream, in lc3_config() argument 144 *stream = stream_alloc(); in lc3_config() 145 if (*stream == NULL) { in lc3_config() 152 printk("ASE Codec Config stream %p\n", *stream); in lc3_config() 155 source_streams[configured_source_stream_count++].stream = *stream; in lc3_config() 163 static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir, in lc3_reconfig() argument [all …]
|
/Zephyr-latest/doc/services/storage/stream/ |
D | stream_flash.rst | 3 Stream Flash 5 The Stream Flash module takes contiguous fragments of a stream of data (e.g. 7 buffer fills (or stream ends) writes it to a raw flash partition. It supports 9 stream content. 11 One typical use of a stream write operation is when receiving a new firmware 20 Persistent stream write progress 22 Some stream write operations, such as DFU operations, may run for a long time. 24 the stream write progress to persistent storage so that the operation can resume 27 The Stream Flash module offers an API for loading, saving and clearing stream
|
/Zephyr-latest/samples/bluetooth/bap_unicast_server/src/ |
D | main.c | 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 [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/audio/src/ |
D | bap_unicast_client_test.c | 72 static void stream_configured(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg_pref *pref) in stream_configured() argument 74 printk("Configured stream %p\n", stream); in stream_configured() 83 static void stream_qos_set(struct bt_bap_stream *stream) in stream_qos_set() argument 85 struct audio_test_stream *test_stream = audio_test_stream_from_bap_stream(stream); in stream_qos_set() 87 printk("QoS set stream %p\n", stream); in stream_qos_set() 89 test_stream->tx_sdu_size = stream->qos->sdu; in stream_qos_set() 94 static void stream_enabled(struct bt_bap_stream *stream) in stream_enabled() argument 96 printk("Enabled stream %p\n", stream); in stream_enabled() 101 static void stream_started(struct bt_bap_stream *stream) in stream_started() argument 103 printk("Started stream %p\n", stream); in stream_started() [all …]
|
D | bap_unicast_server_test.c | 101 struct bt_bap_stream *stream = bap_stream_from_audio_test_stream(&test_streams[i]); in stream_alloc() local 103 if (!stream->conn) { in stream_alloc() 104 return stream; in stream_alloc() 112 const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream, in lc3_config() argument 119 *stream = stream_alloc(); in lc3_config() 120 if (*stream == NULL) { in lc3_config() 126 printk("ASE Codec Config stream %p\n", *stream); in lc3_config() 137 static int lc3_reconfig(struct bt_bap_stream *stream, enum bt_audio_dir dir, in lc3_reconfig() argument 141 printk("ASE Codec Reconfig: stream %p\n", stream); in lc3_reconfig() 150 static int lc3_qos(struct bt_bap_stream *stream, const struct bt_bap_qos_cfg *qos, in lc3_qos() argument [all …]
|
D | bap_stream_rx.c | 18 static void log_stream_rx(struct bt_bap_stream *stream, const struct bt_iso_recv_info *info, in log_stream_rx() argument 21 struct audio_test_stream *test_stream = audio_test_stream_from_bap_stream(stream); in log_stream_rx() 23 LOG_INF("[%zu]: Incoming audio on stream %p len %u, flags 0x%02X, seq_num %u and ts %u", in log_stream_rx() 24 test_stream->rx_cnt, stream, buf->len, info->flags, info->seq_num, info->ts); in log_stream_rx() 27 void bap_stream_rx_recv_cb(struct bt_bap_stream *stream, const struct bt_iso_recv_info *info, in bap_stream_rx_recv_cb() argument 30 struct audio_test_stream *test_stream = audio_test_stream_from_bap_stream(stream); in bap_stream_rx_recv_cb() 33 log_stream_rx(stream, info, buf); in bap_stream_rx_recv_cb() 37 log_stream_rx(stream, info, buf); in bap_stream_rx_recv_cb() 43 log_stream_rx(stream, info, buf); in bap_stream_rx_recv_cb() 51 log_stream_rx(stream, info, buf); in bap_stream_rx_recv_cb() [all …]
|
/Zephyr-latest/soc/intel/intel_adsp/common/include/ |
D | intel_adsp_hda.h | 17 * @brief HDA stream functionality for Intel ADSP 23 * addresses, the stream count, and the size of the ip blocks. 35 /* Calculate base address of the stream registers */ 36 #define HDA_ADDR(base, regblock_size, stream) ((base) + (stream)*(regblock_size)) argument 39 #define DGCS(base, regblock_size, stream) \ argument 40 ((volatile uint32_t *)HDA_ADDR(base, regblock_size, stream)) 57 #define DGBBA(base, regblock_size, stream) \ argument 58 ((volatile uint32_t *)(HDA_ADDR(base, regblock_size, stream) + 0x04)) 61 #define DGBS(base, regblock_size, stream) \ argument 62 ((volatile uint32_t *)(HDA_ADDR(base, regblock_size, stream) + 0x08)) [all …]
|
/Zephyr-latest/doc/connectivity/bluetooth/shell/classic/ |
D | a2dp.rst | 10 …* Source and Sink sides register stream endpoints. using :code:`a2dp register_ep source sbc` and :… 12 …* Source and Sink side can discover remote device's stream endpoints. using :code:`a2dp discover_p… 13 …* Source or Sink configure the stream to create the stream after discover remote's endpoints. usin… 14 * Source or Sink establish the stream. using :code:`a2dp establish`. 53 stream configured 56 stream established 59 stream started 65 stream suspended 68 stream released 86 stream configured [all …]
|