Home
last modified time | relevance | path

Searched refs:stream (Results 1 – 25 of 225) sorted by relevance

123456789

/Zephyr-latest/tests/bluetooth/audio/cap_initiator/uut/
Dbap_unicast_client.c32 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/
Dtest_ase_state_transition.c39 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 …]
Dtest_ase_state_transition_invalid.c34 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 …]
Dmain.c57 struct bt_bap_stream stream; member
170 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local
191 test_ase_control_client_config_codec(conn, ase_id, stream); in ZTEST_F()
200 expect_bt_bap_unicast_server_cb_release_called_once(stream); in ZTEST_F()
201 expect_bt_bap_stream_ops_released_called_once(stream); in ZTEST_F()
216 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local
231 test_ase_control_client_config_codec(conn, ase_id, stream); in ZTEST_F()
252 struct bt_bap_stream *stream = &fixture->stream; in ZTEST_F() local
274 test_preamble_state_streaming(conn, ase_id, stream, &chan, in ZTEST_F()
281 expect_bt_bap_stream_ops_released_called_once(stream); in ZTEST_F()
[all …]
/Zephyr-latest/subsys/bluetooth/audio/
Dbap_stream.c63 void bt_bap_stream_init(struct bt_bap_stream *stream) in bt_bap_stream_init() argument
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()
85 __ASSERT(stream->conn == NULL || stream->conn == conn, in bt_bap_stream_attach()
86 "stream->conn %p already attached", (void *)stream->conn); in bt_bap_stream_attach()
[all …]
Dbap_stream.h18 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);
Dbap_unicast_client_internal.h17 int bt_bap_unicast_client_config(struct bt_bap_stream *stream,
22 int bt_bap_unicast_client_enable(struct bt_bap_stream *stream, const uint8_t meta[],
25 int bt_bap_unicast_client_metadata(struct bt_bap_stream *stream, const uint8_t meta[],
28 int bt_bap_unicast_client_disable(struct bt_bap_stream *stream);
30 int bt_bap_unicast_client_start(struct bt_bap_stream *stream);
31 int bt_bap_unicast_client_connect(struct bt_bap_stream *stream);
33 int bt_bap_unicast_client_stop(struct bt_bap_stream *stream);
35 int bt_bap_unicast_client_release(struct bt_bap_stream *stream);
/Zephyr-latest/drivers/i2s/
Di2s_mcux_flexcomm.c33 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 …]
Di2s_esp32.c50 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 …]
Di2s_ll_stm32.c198 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 …]
Di2s_sam_ssc.c78 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/samples/bluetooth/bap_unicast_client/src/
Dstream_lc3.c42 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()
141 lc3_ret = lc3_encode(stream->lc3_tx.encoder, LC3_PCM_FORMAT_S16, audio_buf, 1, in encode_frame()
[all …]
/Zephyr-latest/lib/libc/minimal/source/stdout/
Dstdout_console.c28 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/subsys/bluetooth/host/classic/
Da2dp.c154 struct bt_a2dp_stream *stream = NULL; in a2dp_process_config_ind() local
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()
229 stream->remote_ep = NULL; in a2dp_process_config_ind()
230 stream->codec_config = *cfg.codec_config; in a2dp_process_config_ind()
[all …]
/Zephyr-latest/samples/bluetooth/hap_ha/src/
Dbap_unicast_sr.c35 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()
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
194 if (!stream->conn) { in stream_alloc()
[all …]
/Zephyr-latest/tests/bluetooth/tester/src/audio/
Dbtp_bap_unicast.c35 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 …]
/Zephyr-latest/tests/bluetooth/audio/mocks/include/
Dbap_stream_expects.h40 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()
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()
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()
98 static inline void expect_bt_bap_stream_ops_disabled_called_once(struct bt_bap_stream *stream) in expect_bt_bap_stream_ops_disabled_called_once() argument
105 zexpect_equal_ptr(stream, mock_bap_stream_disabled_cb_fake.arg0_val, in expect_bt_bap_stream_ops_disabled_called_once()
138 static inline void expect_bt_bap_stream_ops_released_called_once(const struct bt_bap_stream *stream) in expect_bt_bap_stream_ops_released_called_once() argument
140 expect_bt_bap_stream_ops_released_called(&stream, 1); in expect_bt_bap_stream_ops_released_called_once()
[all …]
/Zephyr-latest/include/zephyr/bluetooth/classic/
Da2dp.h44 .codec_cap = _capability, .stream = NULL, \
335 struct bt_a2dp_stream *stream; member
433 struct bt_a2dp_codec_cfg *codec_cfg, struct bt_a2dp_stream **stream,
447 int (*reconfig_req)(struct bt_a2dp_stream *stream, struct bt_a2dp_codec_cfg *codec_cfg,
457 void (*config_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
470 int (*establish_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
480 void (*establish_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
493 int (*release_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
503 void (*release_rsp)(struct bt_a2dp_stream *stream, uint8_t rsp_err_code);
516 int (*start_req)(struct bt_a2dp_stream *stream, uint8_t *rsp_err_code);
[all …]
/Zephyr-latest/samples/bluetooth/bap_unicast_server/src/
Dmain.c59 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()
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()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/audio/src/
Dbap_unicast_server_test.c101 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 …]
Dbap_stream_rx.c18 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()
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()
59 log_stream_rx(stream, info, buf); in bap_stream_rx_recv_cb()
[all …]
Dbap_unicast_client_test.c72 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 …]
/Zephyr-latest/tests/bluetooth/audio/ascs/uut/
Dbap_unicast_client.c14 int bt_bap_unicast_client_config(struct bt_bap_stream *stream, in bt_bap_unicast_client_config() argument
27 int bt_bap_unicast_client_enable(struct bt_bap_stream *stream, uint8_t meta[], in bt_bap_unicast_client_enable() argument
34 int bt_bap_unicast_client_metadata(struct bt_bap_stream *stream, uint8_t meta[], in bt_bap_unicast_client_metadata() argument
41 int bt_bap_unicast_client_disable(struct bt_bap_stream *stream) in bt_bap_unicast_client_disable() argument
47 int bt_bap_unicast_client_connect(struct bt_bap_stream *stream) in bt_bap_unicast_client_connect() argument
53 int bt_bap_unicast_client_start(struct bt_bap_stream *stream) in bt_bap_unicast_client_start() argument
59 int bt_bap_unicast_client_stop(struct bt_bap_stream *stream) in bt_bap_unicast_client_stop() argument
65 int bt_bap_unicast_client_release(struct bt_bap_stream *stream) in bt_bap_unicast_client_release() argument
/Zephyr-latest/samples/bluetooth/tmap_peripheral/src/
Dbap_unicast_sr.c48 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/drivers/dma/
Ddma_stm32.c92 struct dma_stm32_stream *stream; in dma_stm32_irq_handler() local
97 stream = &config->streams[id]; in dma_stm32_irq_handler()
100 if ((stream->hal_override != true) && (stream->busy == false)) { in dma_stm32_irq_handler()
109 callback_arg = stream->mux_channel; in dma_stm32_irq_handler()
117 if (!stream->hal_override) { in dma_stm32_irq_handler()
120 stream->dma_callback(dev, stream->user_data, callback_arg, DMA_STATUS_BLOCK); in dma_stm32_irq_handler()
123 if (!stream->cyclic) { in dma_stm32_irq_handler()
124 stream->busy = false; in dma_stm32_irq_handler()
127 if (!stream->hal_override) { in dma_stm32_irq_handler()
130 stream->dma_callback(dev, stream->user_data, callback_arg, DMA_STATUS_COMPLETE); in dma_stm32_irq_handler()
[all …]

123456789