Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bap.h
Go to the documentation of this file.
1
11#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_
12#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_
13
27#include <stdbool.h>
28#include <stddef.h>
29#include <stdint.h>
30
36#include <zephyr/net/buf.h>
37#include <zephyr/sys/slist.h>
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
47
50
53
56
59};
60
65
68
71
74};
75
80
83};
84
86#define BT_BAP_PA_INTERVAL_UNKNOWN 0xFFFF
87
94#define BT_BAP_BIS_SYNC_NO_PREF 0xFFFFFFFF
95
100
103
106
109
112
115
118};
119
157};
158
189};
190
207
213 union {
230
240 };
241};
242
250#define BT_BAP_ASCS_RSP(c, r) (struct bt_bap_ascs_rsp) { .code = c, .reason = r }
251
253struct bt_bap_broadcast_source;
254
256struct bt_bap_broadcast_sink;
257
259struct bt_bap_unicast_group;
260
262struct bt_bap_ep;
263
268
271
272#if defined(CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE) || defined(__DOXYGEN__)
274 uint8_t metadata[CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE];
275#endif /* CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE */
276};
277
282
285
288
291
294
297
304
307
309 struct bt_bap_bass_subgroup subgroups[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS];
310};
311
327 void (*recv_state_updated)(struct bt_conn *conn,
328 const struct bt_bap_scan_delegator_recv_state *recv_state);
329
346 int (*pa_sync_req)(struct bt_conn *conn,
347 const struct bt_bap_scan_delegator_recv_state *recv_state,
348 bool past_avail, uint16_t pa_interval);
349
363 int (*pa_sync_term_req)(struct bt_conn *conn,
364 const struct bt_bap_scan_delegator_recv_state *recv_state);
365
377 void (*broadcast_code)(struct bt_conn *conn,
378 const struct bt_bap_scan_delegator_recv_state *recv_state,
401 int (*bis_sync_req)(struct bt_conn *conn,
402 const struct bt_bap_scan_delegator_recv_state *recv_state,
403 const uint32_t bis_sync_req[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS]);
404};
405
410
413
416
419
422
425
429 struct bt_bap_ep *paired_ep;
430
433};
434
444int bt_bap_ep_get_info(const struct bt_bap_ep *ep, struct bt_bap_ep_info *info);
445
456 struct bt_conn *conn;
457
459 struct bt_bap_ep *ep;
460
463
466
469
470#if defined(CONFIG_BT_BAP_UNICAST_CLIENT) || defined(__DOXYGEN__)
476 struct bt_bap_iso *bap_iso;
477#endif /* CONFIG_BT_BAP_UNICAST_CLIENT */
478
480 void *group;
481
484
485#if defined(CONFIG_BT_BAP_DEBUG_STREAM_SEQ_NUM) || defined(__DOXYGEN__)
487 uint16_t _prev_seq_num;
488#endif /* CONFIG_BT_BAP_DEBUG_STREAM_SEQ_NUM */
489
491 sys_snode_t _node;
492};
493
496#if defined(CONFIG_BT_BAP_UNICAST) || defined(__DOXYGEN__)
505 void (*configured)(struct bt_bap_stream *stream,
506 const struct bt_audio_codec_qos_pref *pref);
507
516 void (*qos_set)(struct bt_bap_stream *stream);
517
525 void (*enabled)(struct bt_bap_stream *stream);
526
535 void (*metadata_updated)(struct bt_bap_stream *stream);
536
544 void (*disabled)(struct bt_bap_stream *stream);
545
554 void (*released)(struct bt_bap_stream *stream);
555#endif /* CONFIG_BT_BAP_UNICAST */
556
565 void (*started)(struct bt_bap_stream *stream);
566
575 void (*stopped)(struct bt_bap_stream *stream, uint8_t reason);
576
577#if defined(CONFIG_BT_AUDIO_RX) || defined(__DOXYGEN__)
589 void (*recv)(struct bt_bap_stream *stream, const struct bt_iso_recv_info *info,
590 struct net_buf *buf);
591#endif /* CONFIG_BT_AUDIO_RX */
592
593#if defined(CONFIG_BT_AUDIO_TX) || defined(__DOXYGEN__)
606 void (*sent)(struct bt_bap_stream *stream);
607#endif /* CONFIG_BT_AUDIO_TX */
608
621 void (*connected)(struct bt_bap_stream *stream);
622
635 void (*disconnected)(struct bt_bap_stream *stream, uint8_t reason);
636};
637
647
661int bt_bap_stream_config(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep,
663
678
691int bt_bap_stream_qos(struct bt_conn *conn, struct bt_bap_unicast_group *group);
692
707int bt_bap_stream_enable(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len);
708
720int bt_bap_stream_metadata(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len);
721
735
760
784
799
814
829int bt_bap_stream_send(struct bt_bap_stream *stream, struct net_buf *buf, uint16_t seq_num);
830
847int bt_bap_stream_send_ts(struct bt_bap_stream *stream, struct net_buf *buf, uint16_t seq_num,
848 uint32_t ts);
849
869
896 int (*config)(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir,
897 const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream,
898 struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp);
899
916 int (*reconfig)(struct bt_bap_stream *stream, enum bt_audio_dir dir,
917 const struct bt_audio_codec_cfg *codec_cfg,
918 struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp);
919
933 int (*qos)(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos,
934 struct bt_bap_ascs_rsp *rsp);
935
949 int (*enable)(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len,
950 struct bt_bap_ascs_rsp *rsp);
951
963 int (*start)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp);
964
978 int (*metadata)(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len,
979 struct bt_bap_ascs_rsp *rsp);
980
992 int (*disable)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp);
993
1005 int (*stop)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp);
1006
1019 int (*release)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp);
1020};
1021
1033
1045
1053typedef void (*bt_bap_ep_func_t)(struct bt_bap_ep *ep, void *user_data);
1054
1062void bt_bap_unicast_server_foreach_ep(struct bt_conn *conn, bt_bap_ep_func_t func, void *user_data);
1063
1074int bt_bap_unicast_server_config_ase(struct bt_conn *conn, struct bt_bap_stream *stream,
1075 struct bt_audio_codec_cfg *codec_cfg,
1076 const struct bt_audio_codec_qos_pref *qos_pref);
1077 /* End of group bt_bap_unicast_server */
1079
1090
1093};
1094
1104
1107};
1108
1113
1116
1125
1126#if defined(CONFIG_BT_ISO_TEST_PARAMS) || defined(__DOXYGEN__)
1136
1146
1155#endif /* CONFIG_BT_ISO_TEST_PARAMS */
1156};
1157
1170 struct bt_bap_unicast_group **unicast_group);
1171
1191int bt_bap_unicast_group_add_streams(struct bt_bap_unicast_group *unicast_group,
1193 size_t num_param);
1194
1205int bt_bap_unicast_group_delete(struct bt_bap_unicast_group *unicast_group);
1206
1221 void (*location)(struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_location loc);
1222
1235 void (*available_contexts)(struct bt_conn *conn, enum bt_audio_context snk_ctx,
1236 enum bt_audio_context src_ctx);
1237
1247 void (*config)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code,
1248 enum bt_bap_ascs_reason reason);
1249
1262 void (*qos)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code,
1263 enum bt_bap_ascs_reason reason);
1264
1275 void (*enable)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code,
1276 enum bt_bap_ascs_reason reason);
1277
1290 void (*start)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code,
1291 enum bt_bap_ascs_reason reason);
1292
1305 void (*stop)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code,
1306 enum bt_bap_ascs_reason reason);
1307
1318 void (*disable)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code,
1319 enum bt_bap_ascs_reason reason);
1320
1331 void (*metadata)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code,
1332 enum bt_bap_ascs_reason reason);
1333
1344 void (*release)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code,
1345 enum bt_bap_ascs_reason reason);
1346
1361 void (*pac_record)(struct bt_conn *conn, enum bt_audio_dir dir,
1362 const struct bt_audio_codec_cap *codec_cap);
1363
1375 void (*endpoint)(struct bt_conn *conn, enum bt_audio_dir dir, struct bt_bap_ep *ep);
1376
1389 void (*discover)(struct bt_conn *conn, int err, enum bt_audio_dir dir);
1390};
1391
1403
1413int bt_bap_unicast_client_discover(struct bt_conn *conn, enum bt_audio_dir dir);
1414 /* End of group bt_bap_unicast_client */
1424struct bt_bap_base_subgroup;
1426struct bt_bap_base;
1427
1436};
1437
1446};
1447
1456const struct bt_bap_base *bt_bap_base_get_base_from_ad(const struct bt_data *ad);
1457
1466int bt_bap_base_get_size(const struct bt_bap_base *base);
1467
1476int bt_bap_base_get_pres_delay(const struct bt_bap_base *base);
1477
1486int bt_bap_base_get_subgroup_count(const struct bt_bap_base *base);
1487
1497int bt_bap_base_get_bis_indexes(const struct bt_bap_base *base, uint32_t *bis_indexes);
1498
1510int bt_bap_base_foreach_subgroup(const struct bt_bap_base *base,
1511 bool (*func)(const struct bt_bap_base_subgroup *subgroup,
1512 void *user_data),
1513 void *user_data);
1514
1524int bt_bap_base_get_subgroup_codec_id(const struct bt_bap_base_subgroup *subgroup,
1525 struct bt_bap_base_codec_id *codec_id);
1526
1536int bt_bap_base_get_subgroup_codec_data(const struct bt_bap_base_subgroup *subgroup,
1537 uint8_t **data);
1538
1548int bt_bap_base_get_subgroup_codec_meta(const struct bt_bap_base_subgroup *subgroup,
1549 uint8_t **meta);
1550
1561int bt_bap_base_subgroup_codec_to_codec_cfg(const struct bt_bap_base_subgroup *subgroup,
1562 struct bt_audio_codec_cfg *codec_cfg);
1563
1572int bt_bap_base_get_subgroup_bis_count(const struct bt_bap_base_subgroup *subgroup);
1573
1583int bt_bap_base_subgroup_get_bis_indexes(const struct bt_bap_base_subgroup *subgroup,
1584 uint32_t *bis_indexes);
1585
1597int bt_bap_base_subgroup_foreach_bis(const struct bt_bap_base_subgroup *subgroup,
1598 bool (*func)(const struct bt_bap_base_subgroup_bis *bis,
1599 void *user_data),
1600 void *user_data);
1601
1616 struct bt_audio_codec_cfg *codec_cfg);
1617 /* End of group bt_bap_broadcast */
1619
1631
1632#if CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE > 0 || defined(__DOXYGEN__)
1638 size_t data_len;
1639
1642#endif /* CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE > 0 */
1643};
1644
1649
1652
1655};
1656
1661
1664
1667
1676
1679
1691
1692#if defined(CONFIG_BT_ISO_TEST_PARAMS) || defined(__DOXYGEN__)
1701
1710
1719#endif /* CONFIG_BT_ISO_TEST_PARAMS */
1720};
1721
1739 struct bt_bap_broadcast_source **source);
1740
1760int bt_bap_broadcast_source_reconfig(struct bt_bap_broadcast_source *source,
1761 struct bt_bap_broadcast_source_param *param);
1762
1775int bt_bap_broadcast_source_update_metadata(struct bt_bap_broadcast_source *source,
1776 const uint8_t meta[], size_t meta_len);
1777
1789int bt_bap_broadcast_source_start(struct bt_bap_broadcast_source *source,
1790 struct bt_le_ext_adv *adv);
1791
1802int bt_bap_broadcast_source_stop(struct bt_bap_broadcast_source *source);
1803
1814int bt_bap_broadcast_source_delete(struct bt_bap_broadcast_source *source);
1815
1829int bt_bap_broadcast_source_get_id(struct bt_bap_broadcast_source *source,
1830 uint32_t *const broadcast_id);
1831
1846int bt_bap_broadcast_source_get_base(struct bt_bap_broadcast_source *source,
1847 struct net_buf_simple *base_buf);
1848 /* End of bt_bap_broadcast_source */
1850
1870 void (*base_recv)(struct bt_bap_broadcast_sink *sink, const struct bt_bap_base *base,
1871 size_t base_size);
1872
1885 void (*syncable)(struct bt_bap_broadcast_sink *sink, const struct bt_iso_biginfo *biginfo);
1886
1888 sys_snode_t _node;
1889};
1890
1904
1923int bt_bap_broadcast_sink_create(struct bt_le_per_adv_sync *pa_sync, uint32_t broadcast_id,
1924 struct bt_bap_broadcast_sink **sink);
1925
1945int bt_bap_broadcast_sink_sync(struct bt_bap_broadcast_sink *sink, uint32_t indexes_bitfield,
1946 struct bt_bap_stream *streams[], const uint8_t broadcast_code[16]);
1947
1958int bt_bap_broadcast_sink_stop(struct bt_bap_broadcast_sink *sink);
1959
1971int bt_bap_broadcast_sink_delete(struct bt_bap_broadcast_sink *sink);
1972 /* End of group bt_bap_broadcast_sink */
1974
1984
1999 enum bt_bap_pa_state pa_state);
2000
2010 uint8_t src_id,
2011 uint32_t bis_synced[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS]);
2012
2016 struct bt_le_per_adv_sync *pa_sync;
2017
2020
2023
2026
2028 struct bt_bap_bass_subgroup subgroups[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS];
2029};
2030
2045
2050
2053
2056
2059
2066 struct bt_bap_bass_subgroup subgroups[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS];
2067};
2068
2083
2098
2110 const struct bt_bap_scan_delegator_recv_state *recv_state, void *user_data);
2111
2119 void *user_data);
2120
2130 bt_bap_scan_delegator_state_func_t func, void *user_data);
2131
2132/******************************** CLIENT API ********************************/
2133
2140typedef void (*bt_bap_broadcast_assistant_write_cb)(struct bt_conn *conn,
2141 int err);
2142
2158 void (*discover)(struct bt_conn *conn, int err,
2159 uint8_t recv_state_count);
2160
2170 void (*scan)(const struct bt_le_scan_recv_info *info,
2171 uint32_t broadcast_id);
2172
2182 void (*recv_state)(struct bt_conn *conn, int err,
2184
2191 void (*recv_state_removed)(struct bt_conn *conn, uint8_t src_id);
2192
2199 void (*scan_start)(struct bt_conn *conn, int err);
2200
2207 void (*scan_stop)(struct bt_conn *conn, int err);
2208
2215 void (*add_src)(struct bt_conn *conn, int err);
2216
2223 void (*mod_src)(struct bt_conn *conn, int err);
2224
2231 void (*broadcast_code)(struct bt_conn *conn, int err);
2232
2239 void (*rem_src)(struct bt_conn *conn, int err);
2240
2242 sys_snode_t _node;
2243};
2244
2254int bt_bap_broadcast_assistant_discover(struct bt_conn *conn);
2255
2274 bool start_scan);
2275
2283
2294
2305
2306
2311
2314
2317
2320
2327
2330
2333};
2334
2344 struct bt_conn *conn, const struct bt_bap_broadcast_assistant_add_src_param *param);
2345
2350
2353
2360
2363
2366};
2367
2377 struct bt_conn *conn, const struct bt_bap_broadcast_assistant_mod_src_param *param);
2378
2389 struct bt_conn *conn, uint8_t src_id,
2390 const uint8_t broadcast_code[BT_AUDIO_BROADCAST_CODE_SIZE]);
2391
2400int bt_bap_broadcast_assistant_rem_src(struct bt_conn *conn, uint8_t src_id);
2401
2412 /* end of bt_bap */
2414
2415#ifdef __cplusplus
2416}
2417#endif
2418
2419#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_BAP_ */
Bluetooth device address definitions and utilities.
Bluetooth Audio handling.
Bluetooth subsystem core APIs.
Bluetooth connection handling.
bt_audio_dir
Audio direction from the perspective of the BAP Unicast Server / BAP Broadcast Sink.
Definition: audio.h:763
bt_audio_location
Location values for BT Audio.
Definition: audio.h:575
#define BT_AUDIO_BROADCAST_CODE_SIZE
Maximum size of the broadcast code in octets.
Definition: audio.h:51
bt_audio_metadata_type
Codec metadata type IDs.
Definition: audio.h:427
bt_audio_context
Audio Context Type for Generic Audio.
Definition: audio.h:304
int bt_bap_broadcast_sink_create(struct bt_le_per_adv_sync *pa_sync, uint32_t broadcast_id, struct bt_bap_broadcast_sink **sink)
Create a Broadcast Sink from a periodic advertising sync.
int bt_bap_broadcast_sink_stop(struct bt_bap_broadcast_sink *sink)
Stop audio broadcast sink.
int bt_bap_broadcast_sink_register_cb(struct bt_bap_broadcast_sink_cb *cb)
Register Broadcast sink callbacks.
int bt_bap_broadcast_sink_sync(struct bt_bap_broadcast_sink *sink, uint32_t indexes_bitfield, struct bt_bap_stream *streams[], const uint8_t broadcast_code[16])
Sync to a broadcaster's audio.
int bt_bap_broadcast_sink_delete(struct bt_bap_broadcast_sink *sink)
Release a broadcast sink.
int bt_bap_broadcast_source_get_id(struct bt_bap_broadcast_source *source, uint32_t *const broadcast_id)
Get the broadcast ID of a broadcast source.
int bt_bap_broadcast_source_delete(struct bt_bap_broadcast_source *source)
Delete audio broadcast source.
int bt_bap_broadcast_source_stop(struct bt_bap_broadcast_source *source)
Stop audio broadcast source.
int bt_bap_broadcast_source_reconfig(struct bt_bap_broadcast_source *source, struct bt_bap_broadcast_source_param *param)
Reconfigure audio broadcast source.
int bt_bap_broadcast_source_start(struct bt_bap_broadcast_source *source, struct bt_le_ext_adv *adv)
Start audio broadcast source.
int bt_bap_broadcast_source_create(struct bt_bap_broadcast_source_param *param, struct bt_bap_broadcast_source **source)
Create audio broadcast source.
int bt_bap_broadcast_source_get_base(struct bt_bap_broadcast_source *source, struct net_buf_simple *base_buf)
Get the Broadcast Audio Stream Endpoint of a broadcast source.
int bt_bap_broadcast_source_update_metadata(struct bt_bap_broadcast_source *source, const uint8_t meta[], size_t meta_len)
Modify the metadata of an audio broadcast source.
int bt_bap_base_get_subgroup_bis_count(const struct bt_bap_base_subgroup *subgroup)
Get the BIS count of a subgroup.
int bt_bap_base_get_subgroup_codec_data(const struct bt_bap_base_subgroup *subgroup, uint8_t **data)
Get the codec configuration data of a subgroup.
const struct bt_bap_base * bt_bap_base_get_base_from_ad(const struct bt_data *ad)
Generate a pointer to a BASE from periodic advertising data.
int bt_bap_base_subgroup_get_bis_indexes(const struct bt_bap_base_subgroup *subgroup, uint32_t *bis_indexes)
Get all BIS indexes of a subgroup.
int bt_bap_base_subgroup_foreach_bis(const struct bt_bap_base_subgroup *subgroup, bool(*func)(const struct bt_bap_base_subgroup_bis *bis, void *user_data), void *user_data)
Iterate on all BIS in the subgroup.
int bt_bap_base_get_size(const struct bt_bap_base *base)
Get the size of a BASE.
int bt_bap_base_foreach_subgroup(const struct bt_bap_base *base, bool(*func)(const struct bt_bap_base_subgroup *subgroup, void *user_data), void *user_data)
Iterate on all subgroups in the BASE.
int bt_bap_base_get_bis_indexes(const struct bt_bap_base *base, uint32_t *bis_indexes)
Get all BIS indexes of a BASE.
int bt_bap_base_subgroup_codec_to_codec_cfg(const struct bt_bap_base_subgroup *subgroup, struct bt_audio_codec_cfg *codec_cfg)
Store subgroup codec data in a Codec config parsing APIs.
int bt_bap_base_subgroup_bis_codec_to_codec_cfg(const struct bt_bap_base_subgroup_bis *bis, struct bt_audio_codec_cfg *codec_cfg)
Store BIS codec configuration data in a Codec config parsing APIs.
int bt_bap_base_get_subgroup_count(const struct bt_bap_base *base)
Get the subgroup count of a BASE.
int bt_bap_base_get_subgroup_codec_id(const struct bt_bap_base_subgroup *subgroup, struct bt_bap_base_codec_id *codec_id)
Get the codec ID of a subgroup.
int bt_bap_base_get_pres_delay(const struct bt_bap_base *base)
Get the presentation delay value of a BASE.
int bt_bap_base_get_subgroup_codec_meta(const struct bt_bap_base_subgroup *subgroup, uint8_t **meta)
Get the codec metadata of a subgroup.
int bt_bap_unicast_group_delete(struct bt_bap_unicast_group *unicast_group)
Delete audio unicast group.
int bt_bap_unicast_group_add_streams(struct bt_bap_unicast_group *unicast_group, struct bt_bap_unicast_group_stream_pair_param params[], size_t num_param)
Add streams to a unicast group as a unicast client.
int bt_bap_unicast_group_create(struct bt_bap_unicast_group_param *param, struct bt_bap_unicast_group **unicast_group)
Create audio unicast group.
int bt_bap_unicast_client_discover(struct bt_conn *conn, enum bt_audio_dir dir)
Discover remote capabilities and endpoints.
int bt_bap_unicast_client_register_cb(const struct bt_bap_unicast_client_cb *cb)
Register unicast client callbacks.
void bt_bap_unicast_server_foreach_ep(struct bt_conn *conn, bt_bap_ep_func_t func, void *user_data)
Iterate through all endpoints of the given connection.
int bt_bap_unicast_server_register_cb(const struct bt_bap_unicast_server_cb *cb)
Register unicast server callbacks.
int bt_bap_unicast_server_unregister_cb(const struct bt_bap_unicast_server_cb *cb)
Unregister unicast server callbacks.
void(* bt_bap_ep_func_t)(struct bt_bap_ep *ep, void *user_data)
The callback function called for each endpoint.
Definition: bap.h:1053
int bt_bap_unicast_server_config_ase(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_audio_codec_cfg *codec_cfg, const struct bt_audio_codec_qos_pref *qos_pref)
Initialize and configure a new ASE.
int bt_bap_broadcast_assistant_rem_src(struct bt_conn *conn, uint8_t src_id)
Remove a source from the server.
int bt_bap_stream_metadata(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len)
Change Audio Stream Metadata.
int bt_bap_stream_disable(struct bt_bap_stream *stream)
Disable Audio Stream.
int bt_bap_stream_enable(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len)
Enable Audio Stream.
bt_bap_bass_att_err
Broadcast Audio Scan Service (BASS) specific ATT error codes.
Definition: bap.h:77
int bt_bap_stream_config(struct bt_conn *conn, struct bt_bap_stream *stream, struct bt_bap_ep *ep, struct bt_audio_codec_cfg *codec_cfg)
Configure Audio Stream.
int bt_bap_scan_delegator_set_pa_state(uint8_t src_id, enum bt_bap_pa_state pa_state)
Set the periodic advertising sync state to syncing.
int bt_bap_stream_get_tx_sync(struct bt_bap_stream *stream, struct bt_iso_tx_info *info)
Get ISO transmission timing info for a Basic Audio Profile stream.
void(* bt_bap_broadcast_assistant_write_cb)(struct bt_conn *conn, int err)
Callback function for writes.
Definition: bap.h:2140
void bt_bap_scan_delegator_register_cb(struct bt_bap_scan_delegator_cb *cb)
Register the callbacks for the Basic Audio Profile Scan Delegator.
bt_bap_big_enc_state
Broadcast Isochronous Group encryption state reported by the Scan Delegator.
Definition: bap.h:62
int bt_bap_stream_send(struct bt_bap_stream *stream, struct net_buf *buf, uint16_t seq_num)
Send data to Audio stream without timestamp.
int bt_bap_broadcast_assistant_unregister_cb(struct bt_bap_broadcast_assistant_cb *cb)
Unregisters the callbacks used by the Broadcast Audio Scan Service client.
int bt_bap_scan_delegator_rem_src(uint8_t src_id)
Remove a receive state source.
int bt_bap_scan_delegator_add_src(const struct bt_bap_scan_delegator_add_src_param *param)
Add a receive state source locally.
int bt_bap_broadcast_assistant_scan_stop(struct bt_conn *conn)
Stop remote scanning for BISes for a server.
int bt_bap_scan_delegator_set_bis_sync_state(uint8_t src_id, uint32_t bis_synced[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS])
Set the sync state of a receive state in the server.
int bt_bap_stream_start(struct bt_bap_stream *stream)
Start Audio Stream.
int bt_bap_broadcast_assistant_read_recv_state(struct bt_conn *conn, uint8_t idx)
Read the specified receive state from the server.
int bt_bap_broadcast_assistant_scan_start(struct bt_conn *conn, bool start_scan)
Scan start for BISes for a remote server.
bt_bap_ascs_reason
Response Reasons.
Definition: bap.h:166
bt_bap_ascs_rsp_code
Response Status Code.
Definition: bap.h:126
int bt_bap_stream_send_ts(struct bt_bap_stream *stream, struct net_buf *buf, uint16_t seq_num, uint32_t ts)
Send data to Audio stream with timestamp.
int bt_bap_stream_connect(struct bt_bap_stream *stream)
Connect unicast audio stream.
int bt_bap_broadcast_assistant_mod_src(struct bt_conn *conn, const struct bt_bap_broadcast_assistant_mod_src_param *param)
Modify a source on the server.
int bt_bap_stream_reconfig(struct bt_bap_stream *stream, struct bt_audio_codec_cfg *codec_cfg)
Reconfigure Audio Stream.
int bt_bap_stream_release(struct bt_bap_stream *stream)
Release Audio Stream.
void bt_bap_stream_cb_register(struct bt_bap_stream *stream, struct bt_bap_stream_ops *ops)
Register Audio callbacks for a stream.
int bt_bap_broadcast_assistant_discover(struct bt_conn *conn)
Discover Broadcast Audio Scan Service on the server.
void bt_bap_scan_delegator_foreach_state(bt_bap_scan_delegator_state_func_t func, void *user_data)
Iterate through all existing receive states.
int bt_bap_broadcast_assistant_register_cb(struct bt_bap_broadcast_assistant_cb *cb)
Registers the callbacks used by Broadcast Audio Scan Service client.
const struct bt_bap_scan_delegator_recv_state * bt_bap_scan_delegator_find_state(bt_bap_scan_delegator_state_func_t func, void *user_data)
Find and return a receive state based on a compare function.
int bt_bap_scan_delegator_mod_src(const struct bt_bap_scan_delegator_mod_src_param *param)
Add a receive state source locally.
bt_bap_pa_state
Periodic advertising state reported by the Scan Delegator.
Definition: bap.h:44
int bt_bap_stream_qos(struct bt_conn *conn, struct bt_bap_unicast_group *group)
Configure Audio Stream QoS.
int bt_bap_broadcast_assistant_add_src(struct bt_conn *conn, const struct bt_bap_broadcast_assistant_add_src_param *param)
Add a source on the server.
int bt_bap_broadcast_assistant_set_broadcast_code(struct bt_conn *conn, uint8_t src_id, const uint8_t broadcast_code[BT_AUDIO_BROADCAST_CODE_SIZE])
Set a broadcast code to the specified receive state.
int bt_bap_stream_stop(struct bt_bap_stream *stream)
Stop Audio Stream.
int bt_bap_ep_get_info(const struct bt_bap_ep *ep, struct bt_bap_ep_info *info)
Return structure holding information of audio stream endpoint.
bt_bap_ep_state
Endpoint states.
Definition: bap.h:97
bool(* bt_bap_scan_delegator_state_func_t)(const struct bt_bap_scan_delegator_recv_state *recv_state, void *user_data)
Callback function for Scan Delegator receive state search functions.
Definition: bap.h:2109
@ BT_BAP_BASS_ERR_OPCODE_NOT_SUPPORTED
Opcode not supported.
Definition: bap.h:79
@ BT_BAP_BASS_ERR_INVALID_SRC_ID
Invalid source ID supplied.
Definition: bap.h:82
@ BT_BAP_BIG_ENC_STATE_BCODE_REQ
The Broadcast Isochronous Group broadcast code requested.
Definition: bap.h:67
@ BT_BAP_BIG_ENC_STATE_NO_ENC
The Broadcast Isochronous Group not encrypted.
Definition: bap.h:64
@ BT_BAP_BIG_ENC_STATE_BAD_CODE
The Broadcast Isochronous Group bad broadcast code.
Definition: bap.h:73
@ BT_BAP_BIG_ENC_STATE_DEC
The Broadcast Isochronous Group decrypted.
Definition: bap.h:70
@ BT_BAP_ASCS_REASON_NONE
No reason.
Definition: bap.h:168
@ BT_BAP_ASCS_REASON_PD
Presendation delay.
Definition: bap.h:186
@ BT_BAP_ASCS_REASON_FRAMING
Framing.
Definition: bap.h:176
@ BT_BAP_ASCS_REASON_CODEC_DATA
Codec configuration.
Definition: bap.h:172
@ BT_BAP_ASCS_REASON_SDU
Maximum SDU size.
Definition: bap.h:180
@ BT_BAP_ASCS_REASON_CODEC
Codec ID.
Definition: bap.h:170
@ BT_BAP_ASCS_REASON_PHY
PHY.
Definition: bap.h:178
@ BT_BAP_ASCS_REASON_LATENCY
Max transport latency.
Definition: bap.h:184
@ BT_BAP_ASCS_REASON_CIS
Invalid CIS mapping.
Definition: bap.h:188
@ BT_BAP_ASCS_REASON_RTN
RTN.
Definition: bap.h:182
@ BT_BAP_ASCS_REASON_INTERVAL
SDU interval.
Definition: bap.h:174
@ BT_BAP_ASCS_RSP_CODE_INVALID_ASE_STATE
Invalid ASE state.
Definition: bap.h:136
@ BT_BAP_ASCS_RSP_CODE_METADATA_INVALID
Invalid metadata.
Definition: bap.h:152
@ BT_BAP_ASCS_RSP_CODE_NOT_SUPPORTED
Server did not support operation by client.
Definition: bap.h:130
@ BT_BAP_ASCS_RSP_CODE_CONF_UNSUPPORTED
Configuration parameters not supported by server.
Definition: bap.h:142
@ BT_BAP_ASCS_RSP_CODE_INVALID_ASE
Invalid ASE ID.
Definition: bap.h:134
@ BT_BAP_ASCS_RSP_CODE_INVALID_DIR
Invalid operation for direction.
Definition: bap.h:138
@ BT_BAP_ASCS_RSP_CODE_CONF_INVALID
Invalid Configuration parameters.
Definition: bap.h:146
@ BT_BAP_ASCS_RSP_CODE_CAP_UNSUPPORTED
Capabilities not supported by server.
Definition: bap.h:140
@ BT_BAP_ASCS_RSP_CODE_NO_MEM
Server has insufficient resources.
Definition: bap.h:154
@ BT_BAP_ASCS_RSP_CODE_METADATA_REJECTED
Metadata rejected by server.
Definition: bap.h:150
@ BT_BAP_ASCS_RSP_CODE_UNSPECIFIED
Unspecified error.
Definition: bap.h:156
@ BT_BAP_ASCS_RSP_CODE_INVALID_LENGTH
Server rejected due to invalid operation length.
Definition: bap.h:132
@ BT_BAP_ASCS_RSP_CODE_METADATA_UNSUPPORTED
Unsupported metadata.
Definition: bap.h:148
@ BT_BAP_ASCS_RSP_CODE_SUCCESS
Server completed operation successfully.
Definition: bap.h:128
@ BT_BAP_ASCS_RSP_CODE_CONF_REJECTED
Configuration parameters rejected by server.
Definition: bap.h:144
@ BT_BAP_PA_STATE_NOT_SYNCED
The periodic advertising has not been synchronized.
Definition: bap.h:46
@ BT_BAP_PA_STATE_FAILED
Failed to synchronized to periodic advertising.
Definition: bap.h:55
@ BT_BAP_PA_STATE_SYNCED
Synchronized to periodic advertising.
Definition: bap.h:52
@ BT_BAP_PA_STATE_INFO_REQ
Waiting for SyncInfo from Broadcast Assistant.
Definition: bap.h:49
@ BT_BAP_PA_STATE_NO_PAST
No periodic advertising sync transfer receiver from Broadcast Assistant.
Definition: bap.h:58
@ BT_BAP_EP_STATE_ENABLING
Audio Stream Endpoint Enabling state.
Definition: bap.h:108
@ BT_BAP_EP_STATE_IDLE
Audio Stream Endpoint Idle state.
Definition: bap.h:99
@ BT_BAP_EP_STATE_CODEC_CONFIGURED
Audio Stream Endpoint Codec Configured state.
Definition: bap.h:102
@ BT_BAP_EP_STATE_RELEASING
Audio Stream Endpoint Streaming state.
Definition: bap.h:117
@ BT_BAP_EP_STATE_QOS_CONFIGURED
Audio Stream Endpoint QoS Configured state.
Definition: bap.h:105
@ BT_BAP_EP_STATE_DISABLING
Audio Stream Endpoint Disabling state.
Definition: bap.h:114
@ BT_BAP_EP_STATE_STREAMING
Audio Stream Endpoint Streaming state.
Definition: bap.h:111
struct _snode sys_snode_t
Single-linked list node structure.
Definition: slist.h:39
Bluetooth ISO handling.
Buffer management.
state
Definition: parser_state.h:29
#define bool
Definition: stdbool.h:13
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Bluetooth LE Device Address.
Definition: addr.h:49
Codec capability structure.
Definition: audio.h:669
Codec specific configuration structure.
Definition: audio.h:703
Audio Stream Quality of Service Preference structure.
Definition: audio.h:972
Codec QoS structure.
Definition: audio.h:849
Structure storing values of fields of ASE Control Point notification.
Definition: bap.h:192
enum bt_bap_ascs_reason reason
Response reason.
Definition: bap.h:229
enum bt_audio_metadata_type metadata_type
Response metadata type.
Definition: bap.h:239
enum bt_bap_ascs_rsp_code code
Value of the Response Code field.
Definition: bap.h:206
Codec ID structure for a Broadcast Audio Source Endpoint (BASE)
Definition: bap.h:1429
uint16_t cid
Codec Company ID.
Definition: bap.h:1433
uint16_t vid
Codec Company Vendor ID.
Definition: bap.h:1435
uint8_t id
Codec ID.
Definition: bap.h:1431
BIS structure for each BIS in a Broadcast Audio Source Endpoint (BASE) subgroup.
Definition: bap.h:1439
uint8_t * data
Codec Specific Data.
Definition: bap.h:1445
uint8_t data_len
Codec Specific Data length.
Definition: bap.h:1443
uint8_t index
Unique index of the BIS.
Definition: bap.h:1441
Struct to hold subgroup specific information for the receive state.
Definition: bap.h:265
uint8_t metadata[CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE]
The metadata.
Definition: bap.h:274
uint32_t bis_sync
BIS synced bitfield.
Definition: bap.h:267
uint8_t metadata_len
Length of the metadata.
Definition: bap.h:270
Parameters for adding a source to a Broadcast Audio Scan Service server.
Definition: bap.h:2308
uint8_t num_subgroups
Number of subgroups.
Definition: bap.h:2329
bt_addr_le_t addr
Address of the advertiser.
Definition: bap.h:2310
uint8_t adv_sid
SID of the advertising set.
Definition: bap.h:2313
struct bt_bap_bass_subgroup * subgroups
Pointer to array of subgroups.
Definition: bap.h:2332
uint16_t pa_interval
Periodic advertising interval in milliseconds.
Definition: bap.h:2326
bool pa_sync
Whether to sync to periodic advertisements.
Definition: bap.h:2316
uint32_t broadcast_id
24-bit broadcast ID
Definition: bap.h:2319
Struct to hold the Basic Audio Profile Broadcast Assistant callbacks.
Definition: bap.h:2148
void(* discover)(struct bt_conn *conn, int err, uint8_t recv_state_count)
Callback function for bt_bap_broadcast_assistant_discover.
Definition: bap.h:2158
void(* broadcast_code)(struct bt_conn *conn, int err)
Callback function for bt_bap_broadcast_assistant_broadcast_code().
Definition: bap.h:2231
void(* recv_state)(struct bt_conn *conn, int err, const struct bt_bap_scan_delegator_recv_state *state)
Callback function for when a receive state is read or updated.
Definition: bap.h:2182
void(* scan_stop)(struct bt_conn *conn, int err)
Callback function for bt_bap_broadcast_assistant_scan_stop().
Definition: bap.h:2207
void(* mod_src)(struct bt_conn *conn, int err)
Callback function for bt_bap_broadcast_assistant_mod_src().
Definition: bap.h:2223
void(* scan)(const struct bt_le_scan_recv_info *info, uint32_t broadcast_id)
Callback function for Broadcast Audio Scan Service client scan results.
Definition: bap.h:2170
void(* scan_start)(struct bt_conn *conn, int err)
Callback function for bt_bap_broadcast_assistant_scan_start().
Definition: bap.h:2199
void(* add_src)(struct bt_conn *conn, int err)
Callback function for bt_bap_broadcast_assistant_add_src().
Definition: bap.h:2215
void(* rem_src)(struct bt_conn *conn, int err)
Callback function for bt_bap_broadcast_assistant_rem_src().
Definition: bap.h:2239
void(* recv_state_removed)(struct bt_conn *conn, uint8_t src_id)
Callback function for when a receive state is removed.
Definition: bap.h:2191
Parameters for modifying a source.
Definition: bap.h:2347
struct bt_bap_bass_subgroup * subgroups
Pointer to array of subgroups.
Definition: bap.h:2365
uint8_t num_subgroups
Number of subgroups.
Definition: bap.h:2362
uint8_t src_id
Source ID of the receive state.
Definition: bap.h:2349
bool pa_sync
Whether to sync to periodic advertisements.
Definition: bap.h:2352
uint16_t pa_interval
Periodic advertising interval.
Definition: bap.h:2359
Broadcast Audio Sink callback structure.
Definition: bap.h:1859
void(* base_recv)(struct bt_bap_broadcast_sink *sink, const struct bt_bap_base *base, size_t base_size)
Broadcast Audio Source Endpoint (BASE) received.
Definition: bap.h:1870
void(* syncable)(struct bt_bap_broadcast_sink *sink, const struct bt_iso_biginfo *biginfo)
Broadcast sink is syncable.
Definition: bap.h:1885
Broadcast Source create parameters.
Definition: bap.h:1658
uint16_t iso_interval
ISO interval.
Definition: bap.h:1718
uint8_t packing
Broadcast Source packing mode.
Definition: bap.h:1675
uint8_t broadcast_code[BT_AUDIO_BROADCAST_CODE_SIZE]
Broadcast code.
Definition: bap.h:1690
uint8_t pto
Pre-transmission offset.
Definition: bap.h:1709
size_t params_count
The number of parameters in subgroup_params.
Definition: bap.h:1660
struct bt_bap_broadcast_source_subgroup_param * params
Array of stream parameters.
Definition: bap.h:1663
bool encryption
Whether or not to encrypt the streams.
Definition: bap.h:1678
uint8_t irc
Immediate Repetition Count.
Definition: bap.h:1700
struct bt_audio_codec_qos * qos
Quality of Service configuration.
Definition: bap.h:1666
Broadcast Source stream parameters.
Definition: bap.h:1628
uint8_t * data
BIS Codec Specific Configuration.
Definition: bap.h:1641
struct bt_bap_stream * stream
Audio stream.
Definition: bap.h:1630
size_t data_len
The number of elements in the data array.
Definition: bap.h:1638
Broadcast Source subgroup parameters.
Definition: bap.h:1646
struct bt_audio_codec_cfg * codec_cfg
Subgroup Codec configuration.
Definition: bap.h:1654
size_t params_count
The number of parameters in stream_params.
Definition: bap.h:1648
struct bt_bap_broadcast_source_stream_param * params
Array of stream parameters.
Definition: bap.h:1651
Structure holding information of audio stream endpoint.
Definition: bap.h:407
uint8_t id
The ID of the endpoint.
Definition: bap.h:409
bool can_recv
True if the stream associated with the endpoint is able to receive data.
Definition: bap.h:424
const struct bt_audio_codec_qos_pref * qos_pref
Pointer to the preferred QoS settings associated with the endpoint.
Definition: bap.h:432
struct bt_iso_chan * iso_chan
The isochronous channel associated with the endpoint.
Definition: bap.h:418
enum bt_bap_ep_state state
The state of the endpoint.
Definition: bap.h:412
struct bt_bap_ep * paired_ep
Pointer to paired endpoint if the endpoint is part of a bidirectional CIS, otherwise NULL.
Definition: bap.h:429
enum bt_audio_dir dir
Capabilities type.
Definition: bap.h:415
bool can_send
True if the stream associated with the endpoint is able to send data.
Definition: bap.h:421
Parameters for bt_bap_scan_delegator_add_src()
Definition: bap.h:2014
uint8_t num_subgroups
Number of subgroups.
Definition: bap.h:2025
enum bt_bap_big_enc_state encrypt_state
The broadcast isochronous group encryption state.
Definition: bap.h:2019
struct bt_le_per_adv_sync * pa_sync
The periodic adverting sync.
Definition: bap.h:2016
uint32_t broadcast_id
The 24-bit broadcast ID.
Definition: bap.h:2022
struct bt_bap_bass_subgroup subgroups[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS]
Subgroup specific information.
Definition: bap.h:2028
Struct to hold the Basic Audio Profile Scan Delegator callbacks.
Definition: bap.h:317
int(* pa_sync_req)(struct bt_conn *conn, const struct bt_bap_scan_delegator_recv_state *recv_state, bool past_avail, uint16_t pa_interval)
Periodic advertising sync request.
Definition: bap.h:346
void(* broadcast_code)(struct bt_conn *conn, const struct bt_bap_scan_delegator_recv_state *recv_state, const uint8_t broadcast_code[BT_AUDIO_BROADCAST_CODE_SIZE])
Broadcast code received.
Definition: bap.h:377
int(* pa_sync_term_req)(struct bt_conn *conn, const struct bt_bap_scan_delegator_recv_state *recv_state)
Periodic advertising sync termination request.
Definition: bap.h:363
void(* recv_state_updated)(struct bt_conn *conn, const struct bt_bap_scan_delegator_recv_state *recv_state)
Receive state updated.
Definition: bap.h:327
int(* bis_sync_req)(struct bt_conn *conn, const struct bt_bap_scan_delegator_recv_state *recv_state, const uint32_t bis_sync_req[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS])
Broadcast Isochronous Stream synchronize request.
Definition: bap.h:401
Parameters for bt_bap_scan_delegator_mod_src()
Definition: bap.h:2047
uint32_t broadcast_id
The 24-bit broadcast ID.
Definition: bap.h:2055
struct bt_bap_bass_subgroup subgroups[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS]
Subgroup specific information.
Definition: bap.h:2066
uint8_t num_subgroups
Number of subgroups.
Definition: bap.h:2058
uint8_t src_id
The periodic adverting sync.
Definition: bap.h:2049
enum bt_bap_big_enc_state encrypt_state
The broadcast isochronous group encryption state.
Definition: bap.h:2052
Represents the Broadcast Audio Scan Service receive state.
Definition: bap.h:279
uint8_t bad_code[BT_AUDIO_BROADCAST_CODE_SIZE]
The bad broadcast code.
Definition: bap.h:303
uint8_t src_id
The source ID
Definition: bap.h:281
enum bt_bap_pa_state pa_sync_state
The periodic adverting sync state.
Definition: bap.h:290
bt_addr_le_t addr
The Bluetooth address.
Definition: bap.h:284
uint8_t adv_sid
The advertising set ID.
Definition: bap.h:287
uint8_t num_subgroups
Number of subgroups.
Definition: bap.h:306
uint32_t broadcast_id
The 24-bit broadcast ID.
Definition: bap.h:296
enum bt_bap_big_enc_state encrypt_state
The broadcast isochronous group encryption state.
Definition: bap.h:293
struct bt_bap_bass_subgroup subgroups[CONFIG_BT_BAP_BASS_MAX_SUBGROUPS]
Subgroup specific information.
Definition: bap.h:309
Stream operation.
Definition: bap.h:495
void(* recv)(struct bt_bap_stream *stream, const struct bt_iso_recv_info *info, struct net_buf *buf)
Stream audio HCI receive callback.
Definition: bap.h:589
void(* enabled)(struct bt_bap_stream *stream)
Stream enabled callback.
Definition: bap.h:525
void(* sent)(struct bt_bap_stream *stream)
Stream audio HCI sent callback.
Definition: bap.h:606
void(* released)(struct bt_bap_stream *stream)
Stream released callback.
Definition: bap.h:554
void(* disabled)(struct bt_bap_stream *stream)
Stream disabled callback.
Definition: bap.h:544
void(* connected)(struct bt_bap_stream *stream)
Isochronous channel connected callback.
Definition: bap.h:621
void(* metadata_updated)(struct bt_bap_stream *stream)
Stream metadata updated callback.
Definition: bap.h:535
void(* started)(struct bt_bap_stream *stream)
Stream started callback.
Definition: bap.h:565
void(* configured)(struct bt_bap_stream *stream, const struct bt_audio_codec_qos_pref *pref)
Stream configured callback.
Definition: bap.h:505
void(* disconnected)(struct bt_bap_stream *stream, uint8_t reason)
Isochronous channel disconnected callback.
Definition: bap.h:635
void(* stopped)(struct bt_bap_stream *stream, uint8_t reason)
Stream stopped callback.
Definition: bap.h:575
void(* qos_set)(struct bt_bap_stream *stream)
Stream QoS set callback.
Definition: bap.h:516
Basic Audio Profile stream structure.
Definition: bap.h:454
void * group
Definition: bap.h:480
struct bt_audio_codec_cfg * codec_cfg
Codec Configuration.
Definition: bap.h:462
struct bt_bap_stream_ops * ops
Audio stream operations.
Definition: bap.h:468
struct bt_audio_codec_qos * qos
QoS Configuration.
Definition: bap.h:465
struct bt_conn * conn
Connection reference.
Definition: bap.h:456
struct bt_bap_iso * bap_iso
Definition: bap.h:476
struct bt_bap_ep * ep
Endpoint reference.
Definition: bap.h:459
void * user_data
Stream user data.
Definition: bap.h:483
Unicast Client callback structure.
Definition: bap.h:1208
void(* enable)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
Callback function for bt_bap_stream_enable().
Definition: bap.h:1275
void(* discover)(struct bt_conn *conn, int err, enum bt_audio_dir dir)
BAP discovery callback function.
Definition: bap.h:1389
void(* qos)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
Callback function for bt_bap_stream_qos().
Definition: bap.h:1262
void(* pac_record)(struct bt_conn *conn, enum bt_audio_dir dir, const struct bt_audio_codec_cap *codec_cap)
Remote Published Audio Capability (PAC) record discovered.
Definition: bap.h:1361
void(* disable)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
Callback function for bt_bap_stream_disable().
Definition: bap.h:1318
void(* start)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
Callback function for bt_bap_stream_start().
Definition: bap.h:1290
void(* location)(struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_location loc)
Remote Unicast Server Audio Locations.
Definition: bap.h:1221
void(* metadata)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
Callback function for bt_bap_stream_metadata().
Definition: bap.h:1331
void(* release)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
Callback function for bt_bap_stream_release().
Definition: bap.h:1344
void(* stop)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
Callback function for bt_bap_stream_stop().
Definition: bap.h:1305
void(* available_contexts)(struct bt_conn *conn, enum bt_audio_context snk_ctx, enum bt_audio_context src_ctx)
Remote Unicast Server Available Contexts.
Definition: bap.h:1235
void(* endpoint)(struct bt_conn *conn, enum bt_audio_dir dir, struct bt_bap_ep *ep)
Remote Audio Stream Endpoint (ASE) discovered.
Definition: bap.h:1375
void(* config)(struct bt_bap_stream *stream, enum bt_bap_ascs_rsp_code rsp_code, enum bt_bap_ascs_reason reason)
Callback function for bt_bap_stream_config() and bt_bap_stream_reconfig().
Definition: bap.h:1247
Parameters for the creating unicast groups with bt_bap_unicast_group_create()
Definition: bap.h:1110
uint16_t iso_interval
ISO interval.
Definition: bap.h:1154
uint8_t packing
Unicast Group packing mode.
Definition: bap.h:1124
uint8_t p_to_c_ft
Peripheral to Central flush timeout.
Definition: bap.h:1145
uint8_t c_to_p_ft
Central to Peripheral flush timeout.
Definition: bap.h:1135
size_t params_count
The number of parameters in params.
Definition: bap.h:1112
struct bt_bap_unicast_group_stream_pair_param * params
Array of stream parameters.
Definition: bap.h:1115
Parameter struct for the unicast group functions.
Definition: bap.h:1101
struct bt_bap_unicast_group_stream_param * rx_param
Pointer to a receiving stream parameters.
Definition: bap.h:1103
struct bt_bap_unicast_group_stream_param * tx_param
Pointer to a transmitting stream parameters.
Definition: bap.h:1106
Parameter struct for each stream in the unicast group.
Definition: bap.h:1087
struct bt_audio_codec_qos * qos
The QoS settings for the stream object.
Definition: bap.h:1092
struct bt_bap_stream * stream
Pointer to a stream object.
Definition: bap.h:1089
Unicast Server callback structure.
Definition: bap.h:877
int(* reconfig)(struct bt_bap_stream *stream, enum bt_audio_dir dir, const struct bt_audio_codec_cfg *codec_cfg, struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
Stream reconfig request callback.
Definition: bap.h:916
int(* disable)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
Stream Disable request callback.
Definition: bap.h:992
int(* start)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
Stream Start request callback.
Definition: bap.h:963
int(* metadata)(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len, struct bt_bap_ascs_rsp *rsp)
Stream Metadata update request callback.
Definition: bap.h:978
int(* enable)(struct bt_bap_stream *stream, const uint8_t meta[], size_t meta_len, struct bt_bap_ascs_rsp *rsp)
Stream Enable request callback.
Definition: bap.h:949
int(* qos)(struct bt_bap_stream *stream, const struct bt_audio_codec_qos *qos, struct bt_bap_ascs_rsp *rsp)
Stream QoS request callback.
Definition: bap.h:933
int(* stop)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
Stream Stop callback.
Definition: bap.h:1005
int(* release)(struct bt_bap_stream *stream, struct bt_bap_ascs_rsp *rsp)
Stream release callback.
Definition: bap.h:1019
int(* config)(struct bt_conn *conn, const struct bt_bap_ep *ep, enum bt_audio_dir dir, const struct bt_audio_codec_cfg *codec_cfg, struct bt_bap_stream **stream, struct bt_audio_codec_qos_pref *const pref, struct bt_bap_ascs_rsp *rsp)
Endpoint config request callback.
Definition: bap.h:896
Bluetooth data.
Definition: bluetooth.h:454
Broadcast Isochronous Group (BIG) information.
Definition: iso.h:595
ISO Channel structure.
Definition: iso.h:155
ISO Meta Data structure for received ISO packets.
Definition: iso.h:305
ISO Meta Data structure for transmitted ISO packets.
Definition: iso.h:321
LE advertisement and scan response packet information.
Definition: bluetooth.h:2100
Simple network buffer representation.
Definition: buf.h:87
Network buffer representation.
Definition: buf.h:1004