Home
last modified time | relevance | path

Searched refs:bap_stream (Results 1 – 25 of 41) sorted by relevance

12

/Zephyr-latest/subsys/bluetooth/audio/
Dcap_stream.c30 static bool stream_is_central(struct bt_bap_stream *bap_stream) in stream_is_central() argument
36 if (bap_stream->conn == NULL) { in stream_is_central()
40 err = bt_conn_get_info(bap_stream->conn, &info); in stream_is_central()
50 static void cap_stream_configured_cb(struct bt_bap_stream *bap_stream, in cap_stream_configured_cb() argument
53 struct bt_cap_stream *cap_stream = CONTAINER_OF(bap_stream, in cap_stream_configured_cb()
55 bap_stream); in cap_stream_configured_cb()
61 ops->configured(bap_stream, pref); in cap_stream_configured_cb()
65 stream_is_central(bap_stream)) { in cap_stream_configured_cb()
70 static void cap_stream_qos_set_cb(struct bt_bap_stream *bap_stream) in cap_stream_qos_set_cb() argument
72 struct bt_cap_stream *cap_stream = CONTAINER_OF(bap_stream, in cap_stream_qos_set_cb()
[all …]
Dcap_initiator.c210 bap_stream_param->stream = &cap_stream_param->stream->bap_stream; in cap_initiator_broadcast_to_bap_broadcast_param()
400 static enum bt_bap_ep_state stream_get_state(const struct bt_bap_stream *bap_stream) in stream_get_state() argument
405 if (bap_stream->ep == NULL) { in stream_get_state()
409 err = bt_bap_ep_get_info(bap_stream->ep, &ep_info); in stream_get_state()
411 LOG_DBG("Failed to get endpoint info %p: %d", bap_stream, err); in stream_get_state()
419 static bool stream_is_in_state(const struct bt_bap_stream *bap_stream, enum bt_bap_ep_state state) in stream_is_in_state() argument
421 if (bap_stream->conn == NULL) { in stream_is_in_state()
425 return stream_get_state(bap_stream) == state; in stream_is_in_state()
428 static bool stream_is_dir(const struct bt_bap_stream *bap_stream, enum bt_audio_dir dir) in stream_is_dir() argument
433 if (bap_stream->conn == NULL) { in stream_is_dir()
[all …]
/Zephyr-latest/samples/bluetooth/bap_unicast_client/src/
Dstream_tx.c35 static bool stream_is_streaming(const struct bt_bap_stream *bap_stream) in stream_is_streaming() argument
40 if (bap_stream == NULL) { in stream_is_streaming()
45 if (bap_stream->ep == NULL) { in stream_is_streaming()
49 err = bt_bap_ep_get_info(bap_stream->ep, &ep_info); in stream_is_streaming()
79 struct bt_bap_stream *bap_stream = tx_streams[i].bap_stream; in tx_thread_func() local
81 if (stream_is_streaming(bap_stream)) { in tx_thread_func()
88 bap_stream->codec_cfg->id == BT_HCI_CODING_FORMAT_LC3) { in tx_thread_func()
91 net_buf_add_mem(buf, mock_data, bap_stream->qos->sdu); in tx_thread_func()
94 err = bt_bap_stream_send(bap_stream, buf, tx_streams[i].seq_num); in tx_thread_func()
111 int stream_tx_register(struct bt_bap_stream *bap_stream) in stream_tx_register() argument
[all …]
Dstream_tx.h20 struct bt_bap_stream *bap_stream; member
47 int stream_tx_register(struct bt_bap_stream *bap_stream);
58 int stream_tx_unregister(struct bt_bap_stream *bap_stream);
/Zephyr-latest/tests/bsim/bluetooth/audio/src/
Dbap_stream_tx.c39 struct bt_bap_stream *bap_stream; member
46 static bool stream_is_streaming(const struct bt_bap_stream *bap_stream) in stream_is_streaming() argument
51 if (bap_stream == NULL) { in stream_is_streaming()
56 if (bap_stream->ep == NULL) { in stream_is_streaming()
60 err = bt_bap_ep_get_info(bap_stream->ep, &ep_info); in stream_is_streaming()
89 struct bt_bap_stream *bap_stream = tx_streams[i].bap_stream; in tx_thread_func() local
91 if (stream_is_streaming(bap_stream) && in tx_thread_func()
98 net_buf_add_mem(buf, mock_iso_data, bap_stream->qos->sdu); in tx_thread_func()
100 err = bt_bap_stream_send(bap_stream, buf, tx_streams[i].seq_num); in tx_thread_func()
105 if (!stream_is_streaming(bap_stream)) { in tx_thread_func()
[all …]
Dcommon.h145 static inline struct bt_cap_stream *cap_stream_from_bap_stream(struct bt_bap_stream *bap_stream) in cap_stream_from_bap_stream() argument
147 return CONTAINER_OF(bap_stream, struct bt_cap_stream, bap_stream); in cap_stream_from_bap_stream()
152 return &cap_stream->bap_stream; in bap_stream_from_cap_stream()
162 audio_test_stream_from_bap_stream(struct bt_bap_stream *bap_stream) in audio_test_stream_from_bap_stream() argument
164 return audio_test_stream_from_cap_stream(cap_stream_from_bap_stream(bap_stream)); in audio_test_stream_from_bap_stream()
Dbap_stream_tx.h38 int bap_stream_tx_register(struct bt_bap_stream *bap_stream);
52 int bap_stream_tx_unregister(struct bt_bap_stream *bap_stream);
/Zephyr-latest/samples/bluetooth/cap_acceptor/src/
Dcap_acceptor_unicast.c111 struct bt_bap_stream **bap_stream, in unicast_server_config_cb() argument
129 *bap_stream = &cap_stream->bap_stream; in unicast_server_config_cb()
131 LOG_INF("ASE Codec Config bap_stream %p", *bap_stream); in unicast_server_config_cb()
138 static int unicast_server_reconfig_cb(struct bt_bap_stream *bap_stream, enum bt_audio_dir dir, in unicast_server_reconfig_cb() argument
143 LOG_INF("ASE Codec Reconfig: bap_stream %p", bap_stream); in unicast_server_reconfig_cb()
150 static int unicast_server_qos_cb(struct bt_bap_stream *bap_stream, const struct bt_bap_qos_cfg *qos, in unicast_server_qos_cb() argument
153 LOG_INF("QoS: bap_stream %p qos %p", bap_stream, qos); in unicast_server_qos_cb()
160 static int unicast_server_enable_cb(struct bt_bap_stream *bap_stream, const uint8_t meta[], in unicast_server_enable_cb() argument
163 LOG_INF("Enable: bap_stream %p meta_len %zu", bap_stream, meta_len); in unicast_server_enable_cb()
168 static int unicast_server_start_cb(struct bt_bap_stream *bap_stream, struct bt_bap_ascs_rsp *rsp) in unicast_server_start_cb() argument
[all …]
Dmain.c143 if (dir == BT_AUDIO_DIR_SINK && peer.sink_stream.bap_stream.ep == NULL) { in stream_alloc()
145 } else if (dir == BT_AUDIO_DIR_SOURCE && peer.source_stream.bap_stream.ep == NULL) { in stream_alloc()
196 if (peer.source_stream.bap_stream.ep != NULL) { in reset_cap_acceptor()
204 if (peer.sink_stream.bap_stream.ep != NULL) { in reset_cap_acceptor()
Dcap_acceptor_broadcast.c97 static void broadcast_stream_started_cb(struct bt_bap_stream *bap_stream) in broadcast_stream_started_cb() argument
99 LOG_INF("Started bap_stream %p", bap_stream); in broadcast_stream_started_cb()
106 static void broadcast_stream_stopped_cb(struct bt_bap_stream *bap_stream, uint8_t reason) in broadcast_stream_stopped_cb() argument
108 LOG_INF("Stopped bap_stream %p with reason 0x%02X", bap_stream, reason); in broadcast_stream_stopped_cb()
118 static void broadcast_stream_recv_cb(struct bt_bap_stream *bap_stream, in broadcast_stream_recv_cb() argument
157 struct bt_bap_stream *sync_stream = &broadcast_sink.broadcast_stream.bap_stream; in check_sync_broadcast()
/Zephyr-latest/tests/bluetooth/tester/src/audio/
Dbtp_bap_audio_stream.c45 return &stream->cap_stream.bap_stream; in audio_stream_to_bap_stream()
48 struct bt_bap_stream *bap_stream; member
54 static bool stream_is_streaming(const struct bt_bap_stream *bap_stream) in stream_is_streaming() argument
59 if (bap_stream == NULL) { in stream_is_streaming()
64 if (bap_stream->ep == NULL) { in stream_is_streaming()
68 err = bt_bap_ep_get_info(bap_stream->ep, &ep_info); in stream_is_streaming()
95 struct bt_bap_stream *bap_stream = tx_streams[i].bap_stream; in tx_thread_func() local
98 if (!stream_is_streaming(bap_stream) || in tx_thread_func()
108 net_buf_add_mem(buf, btp_bap_audio_stream_mock_data, bap_stream->qos->sdu); in tx_thread_func()
110 err = bt_bap_stream_send(bap_stream, buf, tx_streams[i].seq_num); in tx_thread_func()
[all …]
/Zephyr-latest/tests/bluetooth/audio/cap_initiator/src/
Dtest_common.c48 struct bt_bap_stream *bap_stream = &cap_stream->bap_stream; in test_unicast_set_state() local
50 printk("Setting stream %p to state %d\n", bap_stream, state); in test_unicast_set_state()
61 bap_stream->conn = conn; in test_unicast_set_state()
62 bap_stream->ep = ep; in test_unicast_set_state()
63 bap_stream->qos = &preset->qos; in test_unicast_set_state()
64 bap_stream->codec_cfg = &preset->codec_cfg; in test_unicast_set_state()
65 bap_stream->ep->status.state = state; in test_unicast_set_state()
Dtest_unicast_stop.c58 struct bt_bap_stream *bap_stream = &cap_stream->bap_stream; in cap_initiator_test_unicast_stop_fixture_init() local
60 sys_slist_append(&fixture->unicast_group.streams, &bap_stream->_node); in cap_initiator_test_unicast_stop_fixture_init()
61 bap_stream->group = &fixture->unicast_group; in cap_initiator_test_unicast_stop_fixture_init()
136 const struct bt_bap_stream *bap_stream = &fixture->cap_streams[i].bap_stream; in ZTEST_F() local
137 const enum bt_bap_ep_state state = bap_stream->ep->status.state; in ZTEST_F()
140 "[%zu]: Stream %p unexpected state: %d", i, bap_stream, state); in ZTEST_F()
171 const struct bt_bap_stream *bap_stream = &fixture->cap_streams[i].bap_stream; in ZTEST_F() local
172 const enum bt_bap_ep_state state = bap_stream->ep->status.state; in ZTEST_F()
175 "[%zu]: Stream %p unexpected state: %d", i, bap_stream, state); in ZTEST_F()
205 const struct bt_bap_stream *bap_stream = &fixture->cap_streams[i].bap_stream; in ZTEST_F() local
[all …]
Dtest_unicast_start.c52 struct bt_bap_stream *bap_stream = &fixture->cap_streams[i].bap_stream; in cap_initiator_test_unicast_start_fixture_init() local
54 sys_slist_append(&fixture->unicast_group.streams, &bap_stream->_node); in cap_initiator_test_unicast_start_fixture_init()
55 bap_stream->group = &fixture->unicast_group; in cap_initiator_test_unicast_start_fixture_init()
133 const struct bt_bap_stream *bap_stream = &fixture->cap_streams[i].bap_stream; in ZTEST_F() local
134 const enum bt_bap_ep_state state = bap_stream->ep->status.state; in ZTEST_F()
137 "[%zu]: Stream %p unexpected state: %d", i, bap_stream, state); in ZTEST_F()
420 const struct bt_bap_stream *bap_stream = &fixture->cap_streams[i].bap_stream; in ZTEST_F() local
421 const enum bt_bap_ep_state state = bap_stream->ep->status.state; in ZTEST_F()
424 "[%zu]: Stream %p unexpected state: %d", i, bap_stream, state); in ZTEST_F()
457 const struct bt_bap_stream *bap_stream = &fixture->cap_streams[i].bap_stream; in ZTEST_F() local
[all …]
/Zephyr-latest/samples/bluetooth/cap_initiator/src/
Dcap_initiator_tx.c49 const struct bt_bap_stream *bap_stream; in tx_thread_func() local
56 bap_stream = &cap_stream->bap_stream; in tx_thread_func()
59 if (bap_stream->ep == NULL) { in tx_thread_func()
63 err = bt_bap_ep_get_info(bap_stream->ep, &ep_info); in tx_thread_func()
74 net_buf_add_mem(buf, data, bap_stream->qos->sdu); in tx_thread_func()
Dcap_initiator_unicast.c127 CONTAINER_OF(stream, struct bt_cap_stream, bap_stream); in unicast_stream_started_cb()
153 CONTAINER_OF(stream, struct bt_cap_stream, bap_stream); in unicast_stream_stopped_cb()
167 if (stream == &peer.source_stream.bap_stream) { in unicast_stream_released_cb()
169 } else if (stream == &peer.sink_stream.bap_stream) { in unicast_stream_released_cb()
341 .stream = &peer.source_stream.bap_stream, in unicast_group_create()
345 .stream = &peer.sink_stream.bap_stream, in unicast_group_create()
771 if (peer.source_stream.bap_stream.ep != NULL) { in reset_cap_initiator()
779 if (peer.sink_stream.bap_stream.ep != NULL) { in reset_cap_initiator()
Dcap_initiator_broadcast.c34 struct bt_cap_stream *cap_stream = CONTAINER_OF(stream, struct bt_cap_stream, bap_stream); in broadcast_stream_started_cb()
48 struct bt_cap_stream *cap_stream = CONTAINER_OF(stream, struct bt_cap_stream, bap_stream); in broadcast_stream_stopped_cb()
/Zephyr-latest/tests/bluetooth/audio/bap_broadcast_source/uut/
DCMakeLists.txt12 ${ZEPHYR_BASE}/subsys/bluetooth/audio/bap_stream.c
/Zephyr-latest/samples/bluetooth/tmap_bms/src/
Dcap_initiator.c121 broadcast_sent_cb(&broadcast_stream->bap_stream); in audio_timer_timeout()
275 bt_bap_stream_cb_register(&broadcast_stream->bap_stream, &broadcast_stream_ops); in cap_initiator_init()
340 broadcast_sent_cb(&broadcast_stream->bap_stream); in cap_initiator_setup()
/Zephyr-latest/subsys/bluetooth/audio/shell/
Dbap.c174 struct shell_stream *shell_stream_from_bap_stream(struct bt_bap_stream *bap_stream) in shell_stream_from_bap_stream() argument
177 CONTAINER_OF(bap_stream, struct bt_cap_stream, bap_stream); in shell_stream_from_bap_stream()
185 return &sh_stream->stream.bap_stream; in bap_stream_from_shell_stream()
253 uint16_t get_next_seq_num(struct bt_bap_stream *bap_stream) in get_next_seq_num() argument
255 struct shell_stream *sh_stream = shell_stream_from_bap_stream(bap_stream); in get_next_seq_num()
256 const uint32_t interval_us = bap_stream->qos->interval; in get_next_seq_num()
447 struct bt_bap_stream *bap_stream = bap_stream_from_shell_stream(sh_stream); in lc3_audio_send_data() local
463 if (bap_stream == NULL || bap_stream->qos == NULL) { in lc3_audio_send_data()
488 err = bt_bap_stream_send(bap_stream, buf, sh_stream->tx.seq_num); in lc3_audio_send_data()
498 sh_stream->tx.lc3_sdu_cnt, bap_stream, tx_sdu_len, in lc3_audio_send_data()
[all …]
Dcap_initiator.c268 &stream_param[start_param.count].stream->bap_stream; in cmd_cap_initiator_unicast_start()
299 &stream_param[start_param.count].stream->bap_stream; in cmd_cap_initiator_unicast_start()
349 if (unicast_streams[i].stream.bap_stream.conn == NULL) { in cmd_cap_initiator_unicast_list()
378 if (stream->bap_stream.conn == NULL) { in cmd_cap_initiator_unicast_update()
382 err = bt_bap_ep_get_info(stream->bap_stream.ep, &ep_info); in cmd_cap_initiator_unicast_update()
424 err = bt_bap_ep_get_info(stream->bap_stream.ep, &ep_info); in cmd_cap_initiator_unicast_update()
482 if (stream->bap_stream.conn == NULL) { in cmd_cap_initiator_unicast_stop()
486 err = bt_bap_ep_get_info(stream->bap_stream.ep, &ep_info); in cmd_cap_initiator_unicast_stop()
515 err = bt_bap_ep_get_info(stream->bap_stream.ep, &ep_info); in cmd_cap_initiator_unicast_stop()
/Zephyr-latest/tests/bluetooth/audio/ascs/uut/
DCMakeLists.txt13 ${ZEPHYR_BASE}/subsys/bluetooth/audio/bap_stream.c
/Zephyr-latest/samples/bluetooth/pbp_public_broadcast_source/src/
Dmain.c138 broadcast_sent_cb(&broadcast_stream->bap_stream); in audio_timer_timeout()
332 bt_bap_stream_cb_register(&broadcast_stream->bap_stream, &broadcast_stream_ops); in cap_initiator_init()
404 broadcast_sent_cb(&broadcast_stream->bap_stream); in cap_initiator_setup()
/Zephyr-latest/tests/bluetooth/audio/cap_initiator/uut/
DCMakeLists.txt12 ${ZEPHYR_BASE}/subsys/bluetooth/audio/bap_stream.c
/Zephyr-latest/tests/bluetooth/audio/mocks/
DCMakeLists.txt12 src/bap_stream.c

12