1 /* @file
2  * @brief Internal APIs for Audio Stream handling
3 
4  * Copyright (c) 2020 Intel Corporation
5  * Copyright (c) 2021-2023 Nordic Semiconductor ASA
6  *
7  * SPDX-License-Identifier: Apache-2.0
8  */
9 
10 #include <stdbool.h>
11 #include <stdint.h>
12 
13 #include <zephyr/bluetooth/audio/audio.h>
14 #include <zephyr/bluetooth/audio/bap.h>
15 #include <zephyr/bluetooth/conn.h>
16 #include <zephyr/bluetooth/iso.h>
17 
18 void bt_bap_stream_init(struct bt_bap_stream *stream);
19 
20 /* Disconnect ISO channel */
21 int bt_bap_stream_disconnect(struct bt_bap_stream *stream);
22 
23 void bt_bap_stream_reset(struct bt_bap_stream *stream);
24 
25 void bt_bap_stream_attach(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep,
26 			  struct bt_audio_codec_cfg *codec_cfg);
27 
28 void bt_bap_qos_cfg_to_iso_qos(struct bt_iso_chan_io_qos *io, const struct bt_bap_qos_cfg *qos_cfg);
29 
30 void bt_bap_stream_detach(struct bt_bap_stream *stream);
31 
32 enum bt_bap_ascs_reason bt_audio_verify_qos(const struct bt_bap_qos_cfg *qos);
33 bool bt_audio_valid_codec_cfg(const struct bt_audio_codec_cfg *codec_cfg);
34 bool bt_bap_valid_qos_pref(const struct bt_bap_qos_cfg_pref *qos_pref);
35 bool bt_bap_stream_can_disconnect(const struct bt_bap_stream *stream);
36 
37 enum bt_bap_ascs_reason bt_bap_stream_verify_qos(const struct bt_bap_stream *stream,
38 						 const struct bt_bap_qos_cfg *qos);
39 
40 struct bt_iso_chan *bt_bap_stream_iso_chan_get(struct bt_bap_stream *stream);
41