Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
audio.h
Go to the documentation of this file.
1
6/*
7 * Copyright (c) 2020 Intel Corporation
8 * Copyright (c) 2020-2024 Nordic Semiconductor ASA
9 *
10 * SPDX-License-Identifier: Apache-2.0
11 */
12#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_AUDIO_H_
13#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_AUDIO_H_
14
22#include <stdbool.h>
23#include <stddef.h>
24#include <stdint.h>
25
26#include <zephyr/autoconf.h>
34#include <zephyr/sys/atomic.h>
35#include <zephyr/sys/util.h>
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
43#define BT_AUDIO_BROADCAST_ID_SIZE 3
45#define BT_AUDIO_BROADCAST_ID_MAX 0xFFFFFFU
47#define BT_AUDIO_PD_PREF_NONE 0x000000U
49#define BT_AUDIO_PD_MAX 0xFFFFFFU
51#define BT_AUDIO_BROADCAST_CODE_SIZE 16
52
54#define BT_AUDIO_BROADCAST_NAME_LEN_MIN 4
56#define BT_AUDIO_BROADCAST_NAME_LEN_MAX 128
57
59#define BT_AUDIO_LANG_SIZE 3
60
70
73
76
79
82};
83
88
91
94
97
100
103
106
109
112
115
118
121
124
134};
135
140
143
147
155
163};
164
169
172
175
178
181
184
187
190
197};
198
200#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_MIN 1
202#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_MAX 8
203
214#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_SUPPORT(...) \
215 ((enum bt_audio_codec_cap_chan_count)((FOR_EACH(BIT, (|), __VA_ARGS__)) >> 1))
216
223};
224
234
237
240
243
246};
247
252
255
258
261
264
267
270
273
276
279
282
285
288};
289
294
297};
298
355};
356
360#define BT_AUDIO_CONTEXT_TYPE_ANY (BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED | \
361 BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL | \
362 BT_AUDIO_CONTEXT_TYPE_MEDIA | \
363 BT_AUDIO_CONTEXT_TYPE_GAME | \
364 BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL | \
365 BT_AUDIO_CONTEXT_TYPE_VOICE_ASSISTANTS | \
366 BT_AUDIO_CONTEXT_TYPE_LIVE | \
367 BT_AUDIO_CONTEXT_TYPE_SOUND_EFFECTS | \
368 BT_AUDIO_CONTEXT_TYPE_NOTIFICATIONS | \
369 BT_AUDIO_CONTEXT_TYPE_RINGTONE | \
370 BT_AUDIO_CONTEXT_TYPE_ALERTS | \
371 BT_AUDIO_CONTEXT_TYPE_EMERGENCY_ALARM)
372
413
420};
421
439
451
454
462
465
472
475
482
485
488
491};
492
498#define BT_AUDIO_METADATA_TYPE_IS_KNOWN(_type) \
499 (IN_RANGE((_type), BT_AUDIO_METADATA_TYPE_PREF_CONTEXT, \
500 BT_AUDIO_METADATA_TYPE_BROADCAST_IMMEDIATE) || \
501 (_type) == BT_AUDIO_METADATA_TYPE_EXTENDED || (_type) == BT_AUDIO_METADATA_TYPE_VENDOR)
502
508#define BT_AUDIO_UNICAST_ANNOUNCEMENT_GENERAL 0x00
510#define BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED 0x01
521#define BT_AUDIO_CODEC_DATA(_type, _bytes...) \
522 (sizeof((uint8_t)_type) + sizeof((uint8_t[]){_bytes})), (_type), _bytes
523
533#define BT_AUDIO_CODEC_CFG(_id, _cid, _vid, _data, _meta) \
534 ((struct bt_audio_codec_cfg){ \
535 /* Use HCI data path as default, can be overwritten by application */ \
536 .path_id = BT_ISO_DATA_PATH_HCI, \
537 .ctlr_transcode = false, \
538 .id = _id, \
539 .cid = _cid, \
540 .vid = _vid, \
541 .data_len = sizeof((uint8_t[])_data), \
542 .data = _data, \
543 .meta_len = sizeof((uint8_t[])_meta), \
544 .meta = _meta, \
545 })
546
556#define BT_AUDIO_CODEC_CAP(_id, _cid, _vid, _data, _meta) \
557 ((struct bt_audio_codec_cap){ \
558 /* Use HCI data path as default, can be overwritten by application */ \
559 .path_id = BT_ISO_DATA_PATH_HCI, \
560 .ctlr_transcode = false, \
561 .id = (_id), \
562 .cid = (_cid), \
563 .vid = (_vid), \
564 .data_len = sizeof((uint8_t[])_data), \
565 .data = _data, \
566 .meta_len = sizeof((uint8_t[])_meta), \
567 .meta = _meta, \
568 })
569
634};
635
639#define BT_AUDIO_LOCATION_ANY (BT_AUDIO_LOCATION_FRONT_LEFT | \
640 BT_AUDIO_LOCATION_FRONT_RIGHT | \
641 BT_AUDIO_LOCATION_FRONT_CENTER | \
642 BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_1 | \
643 BT_AUDIO_LOCATION_BACK_LEFT | \
644 BT_AUDIO_LOCATION_BACK_RIGHT | \
645 BT_AUDIO_LOCATION_FRONT_LEFT_OF_CENTER | \
646 BT_AUDIO_LOCATION_FRONT_RIGHT_OF_CENTER | \
647 BT_AUDIO_LOCATION_BACK_CENTER | \
648 BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_2 | \
649 BT_AUDIO_LOCATION_SIDE_LEFT | \
650 BT_AUDIO_LOCATION_SIDE_RIGHT | \
651 BT_AUDIO_LOCATION_TOP_FRONT_LEFT | \
652 BT_AUDIO_LOCATION_TOP_FRONT_RIGHT | \
653 BT_AUDIO_LOCATION_TOP_FRONT_CENTER | \
654 BT_AUDIO_LOCATION_TOP_CENTER | \
655 BT_AUDIO_LOCATION_TOP_BACK_LEFT | \
656 BT_AUDIO_LOCATION_TOP_BACK_RIGHT | \
657 BT_AUDIO_LOCATION_TOP_SIDE_LEFT | \
658 BT_AUDIO_LOCATION_TOP_SIDE_RIGHT | \
659 BT_AUDIO_LOCATION_TOP_BACK_CENTER | \
660 BT_AUDIO_LOCATION_BOTTOM_FRONT_CENTER | \
661 BT_AUDIO_LOCATION_BOTTOM_FRONT_LEFT | \
662 BT_AUDIO_LOCATION_BOTTOM_FRONT_RIGHT | \
663 BT_AUDIO_LOCATION_FRONT_LEFT_WIDE | \
664 BT_AUDIO_LOCATION_FRONT_RIGHT_WIDE | \
665 BT_AUDIO_LOCATION_LEFT_SURROUND | \
666 BT_AUDIO_LOCATION_RIGHT_SURROUND)
667
688#if CONFIG_BT_AUDIO_CODEC_CAP_MAX_DATA_SIZE > 0 || defined(__DOXYGEN__)
690 size_t data_len;
692 uint8_t data[CONFIG_BT_AUDIO_CODEC_CAP_MAX_DATA_SIZE];
693#endif /* CONFIG_BT_AUDIO_CODEC_CAP_MAX_DATA_SIZE > 0 */
694#if defined(CONFIG_BT_AUDIO_CODEC_CAP_MAX_METADATA_SIZE) || defined(__DOXYGEN__)
696 size_t meta_len;
698 uint8_t meta[CONFIG_BT_AUDIO_CODEC_CAP_MAX_METADATA_SIZE];
699#endif /* CONFIG_BT_AUDIO_CODEC_CAP_MAX_METADATA_SIZE */
700};
701
722#if CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE > 0 || defined(__DOXYGEN__)
724 size_t data_len;
726 uint8_t data[CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE];
727#endif /* CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE > 0 */
728#if CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE > 0 || defined(__DOXYGEN__)
730 size_t meta_len;
732 uint8_t meta[CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE];
733#endif /* CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE > 0 */
734};
735
750int bt_audio_data_parse(const uint8_t ltv[], size_t size,
751 bool (*func)(struct bt_data *data, void *user_data), void *user_data);
752
761
778};
779
791#define BT_AUDIO_CODEC_QOS(_interval, _framing, _phy, _sdu, _rtn, _latency, _pd) \
792 ((struct bt_audio_codec_qos){ \
793 .interval = _interval, \
794 .framing = _framing, \
795 .phy = _phy, \
796 .sdu = _sdu, \
797 .rtn = _rtn, \
798 IF_ENABLED(UTIL_OR(IS_ENABLED(CONFIG_BT_BAP_BROADCAST_SOURCE), \
799 IS_ENABLED(CONFIG_BT_BAP_UNICAST)), \
800 (.latency = _latency,)) \
801 .pd = _pd, \
802 })
803
810};
811
813enum {
820};
821
831#define BT_AUDIO_CODEC_QOS_UNFRAMED(_interval, _sdu, _rtn, _latency, _pd) \
832 BT_AUDIO_CODEC_QOS(_interval, BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED, BT_AUDIO_CODEC_QOS_2M, \
833 _sdu, _rtn, _latency, _pd)
834
844#define BT_AUDIO_CODEC_QOS_FRAMED(_interval, _sdu, _rtn, _latency, _pd) \
845 BT_AUDIO_CODEC_QOS(_interval, BT_AUDIO_CODEC_QOS_FRAMING_FRAMED, BT_AUDIO_CODEC_QOS_2M, \
846 _sdu, _rtn, _latency, _pd)
847
861
869 struct {
872
880
888
895
896#if defined(CONFIG_BT_BAP_BROADCAST_SOURCE) || defined(CONFIG_BT_BAP_UNICAST) || \
897 defined(__DOXYGEN__)
904#endif /* CONFIG_BT_BAP_BROADCAST_SOURCE || CONFIG_BT_BAP_UNICAST */
905
912
913#if defined(CONFIG_BT_ISO_TEST_PARAMS) || defined(__DOXYGEN__)
926
933
942#endif /* CONFIG_BT_ISO_TEST_PARAMS */
943 };
944};
945
958#define BT_AUDIO_CODEC_QOS_PREF(_unframed_supported, _phy, _rtn, _latency, _pd_min, _pd_max, \
959 _pref_pd_min, _pref_pd_max) \
960 { \
961 .unframed_supported = _unframed_supported, \
962 .phy = _phy, \
963 .rtn = _rtn, \
964 .latency = _latency, \
965 .pd_min = _pd_min, \
966 .pd_max = _pd_max, \
967 .pref_pd_min = _pref_pd_min, \
968 .pref_pd_max = _pref_pd_max, \
969 }
970
980
983
986
989
999
1009
1016
1023};
1024
1043
1053
1065
1077 enum bt_audio_codec_cfg_freq freq);
1078
1088
1098
1110
1122 enum bt_audio_codec_cfg_frame_dur frame_dur);
1123
1145 enum bt_audio_location *chan_allocation,
1146 bool fallback_to_default);
1147
1159 enum bt_audio_location chan_allocation);
1160
1181
1193 uint16_t octets_per_frame);
1194
1216 bool fallback_to_default);
1217
1229 uint8_t frame_blocks);
1230
1243 enum bt_audio_codec_cfg_type type, const uint8_t **data);
1244
1258 enum bt_audio_codec_cfg_type type, const uint8_t *data,
1259 size_t data_len);
1260
1273 enum bt_audio_codec_cfg_type type);
1274
1288 const uint8_t **data);
1289
1303 enum bt_audio_metadata_type type, const uint8_t *data,
1304 size_t data_len);
1305
1318 enum bt_audio_metadata_type type);
1335 bool fallback_to_default);
1336
1348 enum bt_audio_context ctx);
1349
1363
1375 enum bt_audio_context ctx);
1376
1390 const uint8_t **program_info);
1391
1404 const uint8_t *program_info, size_t program_info_len);
1405
1420 const uint8_t **lang);
1421
1433 const uint8_t lang[BT_AUDIO_LANG_SIZE]);
1434
1448 const uint8_t **ccid_list);
1449
1462 const uint8_t *ccid_list, size_t ccid_list_len);
1463
1477
1489 enum bt_audio_parental_rating parental_rating);
1490
1504 const uint8_t **program_info_uri);
1505
1518 const uint8_t *program_info_uri,
1519 size_t program_info_uri_len);
1520
1534
1547
1560 const struct bt_audio_codec_cfg *codec_cfg);
1561
1572 struct bt_audio_codec_cfg *codec_cfg);
1573
1587 const uint8_t **extended_meta);
1588
1601 const uint8_t *extended_meta, size_t extended_meta_len);
1602
1616 const uint8_t **vendor_meta);
1617
1630 const uint8_t *vendor_meta, size_t vendor_meta_len); /* End of bt_audio_codec_cfg */
1632
1655 enum bt_audio_codec_cap_type type, const uint8_t **data);
1656
1670 enum bt_audio_codec_cap_type type, const uint8_t *data,
1671 size_t data_len);
1672
1685 enum bt_audio_codec_cap_type type);
1686
1698
1710 enum bt_audio_codec_cap_freq freq);
1711
1723
1735 enum bt_audio_codec_cap_frame_dur frame_dur);
1736
1750 bool fallback_to_default);
1751
1763 struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_chan_count chan_count);
1764
1777 const struct bt_audio_codec_cap *codec_cap,
1778 struct bt_audio_codec_octets_per_codec_frame *codec_frame);
1779
1791 struct bt_audio_codec_cap *codec_cap,
1792 const struct bt_audio_codec_octets_per_codec_frame *codec_frame);
1793
1807 bool fallback_to_default);
1808
1820 uint8_t codec_frames_per_sdu);
1821
1834 const uint8_t **data);
1835
1849 enum bt_audio_metadata_type type, const uint8_t *data,
1850 size_t data_len);
1851
1864 enum bt_audio_metadata_type type);
1865
1879
1891 enum bt_audio_context ctx);
1892
1906
1918 enum bt_audio_context ctx);
1919
1933 const uint8_t **program_info);
1934
1947 const uint8_t *program_info, size_t program_info_len);
1948
1963 const uint8_t **lang);
1964
1976 const uint8_t lang[BT_AUDIO_LANG_SIZE]);
1977
1991 const uint8_t **ccid_list);
1992
2005 const uint8_t *ccid_list, size_t ccid_list_len);
2006
2020
2032 enum bt_audio_parental_rating parental_rating);
2033
2047 const uint8_t **program_info_uri);
2048
2061 const uint8_t *program_info_uri,
2062 size_t program_info_uri_len);
2063
2077
2090
2103 const struct bt_audio_codec_cap *codec_cap);
2104
2115 struct bt_audio_codec_cap *codec_cap);
2116
2130 const uint8_t **extended_meta);
2131
2144 const uint8_t *extended_meta, size_t extended_meta_len);
2145
2159 const uint8_t **vendor_meta);
2160
2173 const uint8_t *vendor_meta, size_t vendor_meta_len);
2174 /* End of bt_audio_codec_cap */
2176
2177#ifdef __cplusplus
2178}
2179#endif
2180 /* end of bt_audio */
2182
2183#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_H_ */
Bluetooth subsystem core APIs.
Bluetooth data buffer API.
Bluetooth connection handling.
Generic Attribute Profile handling.
int bt_audio_codec_cap_meta_set_ccid_list(struct bt_audio_codec_cap *codec_cap, const uint8_t *ccid_list, size_t ccid_list_len)
Set the CCID list of a codec capability metadata.
int bt_audio_codec_cap_set_val(struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_type type, const uint8_t *data, size_t data_len)
Set or add a specific codec capability value.
int bt_audio_codec_cap_get_frame_dur(const struct bt_audio_codec_cap *codec_cap)
Extract the frequency from a codec capability.
int bt_audio_codec_cap_get_max_codec_frames_per_sdu(const struct bt_audio_codec_cap *codec_cap, bool fallback_to_default)
Extract the maximum codec frames per SDU from a codec capability.
int bt_audio_codec_cap_meta_set_vendor(struct bt_audio_codec_cap *codec_cap, const uint8_t *vendor_meta, size_t vendor_meta_len)
Set the vendor specific metadata of a codec capability metadata.
int bt_audio_codec_cap_meta_set_val(struct bt_audio_codec_cap *codec_cap, enum bt_audio_metadata_type type, const uint8_t *data, size_t data_len)
Set or add a specific codec capability metadata value.
int bt_audio_codec_cap_meta_get_ccid_list(const struct bt_audio_codec_cap *codec_cap, const uint8_t **ccid_list)
Extract CCID list.
int bt_audio_codec_cap_meta_get_program_info(const struct bt_audio_codec_cap *codec_cap, const uint8_t **program_info)
Extract program info.
int bt_audio_codec_cap_set_max_codec_frames_per_sdu(struct bt_audio_codec_cap *codec_cap, uint8_t codec_frames_per_sdu)
Set the maximum codec frames per SDU of a codec capability.
int bt_audio_codec_cap_meta_unset_val(struct bt_audio_codec_cap *codec_cap, enum bt_audio_metadata_type type)
Unset a specific codec capability metadata value.
int bt_audio_codec_cap_meta_set_program_info(struct bt_audio_codec_cap *codec_cap, const uint8_t *program_info, size_t program_info_len)
Set the program info of a codec capability metadata.
int bt_audio_codec_cap_set_frame_dur(struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_frame_dur frame_dur)
Set the frame duration of a codec capability.
int bt_audio_codec_cap_meta_get_val(const struct bt_audio_codec_cap *codec_cap, uint8_t type, const uint8_t **data)
Lookup a specific metadata value based on type.
int bt_audio_codec_cap_meta_set_stream_context(struct bt_audio_codec_cap *codec_cap, enum bt_audio_context ctx)
Set the stream context of a codec capability metadata.
int bt_audio_codec_cap_meta_set_parental_rating(struct bt_audio_codec_cap *codec_cap, enum bt_audio_parental_rating parental_rating)
Set the parental rating of a codec capability metadata.
int bt_audio_codec_cap_get_supported_audio_chan_counts(const struct bt_audio_codec_cap *codec_cap, bool fallback_to_default)
Extract the frequency from a codec capability.
int bt_audio_codec_cap_meta_get_extended(const struct bt_audio_codec_cap *codec_cap, const uint8_t **extended_meta)
Extract extended metadata.
int bt_audio_codec_cap_meta_set_pref_context(struct bt_audio_codec_cap *codec_cap, enum bt_audio_context ctx)
Set the preferred context of a codec capability metadata.
int bt_audio_codec_cap_meta_set_lang(struct bt_audio_codec_cap *codec_cap, const uint8_t lang[3])
Set the language of a codec capability metadata.
int bt_audio_codec_cap_meta_get_audio_active_state(const struct bt_audio_codec_cap *codec_cap)
Extract audio active state.
int bt_audio_codec_cap_meta_get_stream_context(const struct bt_audio_codec_cap *codec_cap)
Extract stream contexts.
int bt_audio_codec_cap_meta_set_bcast_audio_immediate_rend_flag(struct bt_audio_codec_cap *codec_cap)
Set the broadcast audio immediate rendering flag of a codec capability metadata.
int bt_audio_codec_cap_get_freq(const struct bt_audio_codec_cap *codec_cap)
Extract the frequency from a codec capability.
int bt_audio_codec_cap_get_octets_per_frame(const struct bt_audio_codec_cap *codec_cap, struct bt_audio_codec_octets_per_codec_frame *codec_frame)
Extract the supported octets per codec frame from a codec capability.
int bt_audio_codec_cap_meta_get_pref_context(const struct bt_audio_codec_cap *codec_cap)
Extract preferred contexts.
int bt_audio_codec_cap_meta_get_parental_rating(const struct bt_audio_codec_cap *codec_cap)
Extract parental rating.
int bt_audio_codec_cap_meta_get_bcast_audio_immediate_rend_flag(const struct bt_audio_codec_cap *codec_cap)
Extract broadcast audio immediate rendering flag.
int bt_audio_codec_cap_meta_get_vendor(const struct bt_audio_codec_cap *codec_cap, const uint8_t **vendor_meta)
Extract vendor specific metadata.
int bt_audio_codec_cap_unset_val(struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_type type)
Unset a specific codec capability value.
int bt_audio_codec_cap_meta_set_extended(struct bt_audio_codec_cap *codec_cap, const uint8_t *extended_meta, size_t extended_meta_len)
Set the extended metadata of a codec capability metadata.
int bt_audio_codec_cap_set_freq(struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_freq freq)
Set the supported frequencies of a codec capability.
int bt_audio_codec_cap_set_octets_per_frame(struct bt_audio_codec_cap *codec_cap, const struct bt_audio_codec_octets_per_codec_frame *codec_frame)
Set the octets per codec frame of a codec capability.
int bt_audio_codec_cap_get_val(const struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_type type, const uint8_t **data)
Lookup a specific value based on type.
int bt_audio_codec_cap_meta_set_audio_active_state(struct bt_audio_codec_cap *codec_cap, enum bt_audio_active_state state)
Set the audio active state of a codec capability metadata.
int bt_audio_codec_cap_meta_get_program_info_uri(const struct bt_audio_codec_cap *codec_cap, const uint8_t **program_info_uri)
Extract program info URI.
int bt_audio_codec_cap_set_supported_audio_chan_counts(struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_chan_count chan_count)
Set the channel count of a codec capability.
int bt_audio_codec_cap_meta_get_lang(const struct bt_audio_codec_cap *codec_cap, const uint8_t **lang)
Extract language.
int bt_audio_codec_cap_meta_set_program_info_uri(struct bt_audio_codec_cap *codec_cap, const uint8_t *program_info_uri, size_t program_info_uri_len)
Set the program info URI of a codec capability metadata.
int bt_audio_codec_cfg_meta_get_program_info(const struct bt_audio_codec_cfg *codec_cfg, const uint8_t **program_info)
Extract program info.
int bt_audio_codec_cfg_frame_dur_us_to_frame_dur(uint32_t frame_dur_us)
Convert frame duration in microseconds to assigned numbers frame duration.
int bt_audio_codec_cfg_meta_get_audio_active_state(const struct bt_audio_codec_cfg *codec_cfg)
Extract audio active state.
int bt_audio_codec_cfg_meta_get_extended(const struct bt_audio_codec_cfg *codec_cfg, const uint8_t **extended_meta)
Extract extended metadata.
int bt_audio_codec_cfg_frame_dur_to_frame_dur_us(enum bt_audio_codec_cfg_frame_dur frame_dur)
Convert assigned numbers frame duration to duration in microseconds.
int bt_audio_codec_cfg_meta_set_program_info(struct bt_audio_codec_cfg *codec_cfg, const uint8_t *program_info, size_t program_info_len)
Set the program info of a codec configuration metadata.
int bt_audio_codec_cfg_get_frame_dur(const struct bt_audio_codec_cfg *codec_cfg)
Extract frame duration from BT codec config.
int bt_audio_codec_cfg_freq_to_freq_hz(enum bt_audio_codec_cfg_freq freq)
Convert assigned numbers frequency to frequency value.
int bt_audio_codec_cfg_meta_set_val(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_metadata_type type, const uint8_t *data, size_t data_len)
Set or add a specific codec configuration metadata value.
int bt_audio_codec_cfg_meta_get_vendor(const struct bt_audio_codec_cfg *codec_cfg, const uint8_t **vendor_meta)
Extract vendor specific metadata.
int bt_audio_codec_cfg_meta_get_stream_context(const struct bt_audio_codec_cfg *codec_cfg)
Extract stream contexts.
int bt_audio_codec_cfg_get_octets_per_frame(const struct bt_audio_codec_cfg *codec_cfg)
Extract frame size in octets from BT codec config.
int bt_audio_codec_cfg_meta_set_lang(struct bt_audio_codec_cfg *codec_cfg, const uint8_t lang[3])
Set the language of a codec configuration metadata.
int bt_audio_codec_cfg_meta_get_lang(const struct bt_audio_codec_cfg *codec_cfg, const uint8_t **lang)
Extract language.
int bt_audio_codec_cfg_meta_set_ccid_list(struct bt_audio_codec_cfg *codec_cfg, const uint8_t *ccid_list, size_t ccid_list_len)
Set the CCID list of a codec configuration metadata.
int bt_audio_codec_cfg_meta_set_stream_context(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_context ctx)
Set the stream context of a codec configuration metadata.
int bt_audio_codec_cfg_meta_get_bcast_audio_immediate_rend_flag(const struct bt_audio_codec_cfg *codec_cfg)
Extract broadcast audio immediate rendering flag.
int bt_audio_codec_cfg_meta_set_vendor(struct bt_audio_codec_cfg *codec_cfg, const uint8_t *vendor_meta, size_t vendor_meta_len)
Set the vendor specific metadata of a codec configuration metadata.
int bt_audio_codec_cfg_meta_get_program_info_uri(const struct bt_audio_codec_cfg *codec_cfg, const uint8_t **program_info_uri)
Extract program info URI.
int bt_audio_codec_cfg_get_val(const struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_codec_cfg_type type, const uint8_t **data)
Lookup a specific codec configuration value.
int bt_audio_codec_cfg_set_frame_dur(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_codec_cfg_frame_dur frame_dur)
Set the frame duration of a codec configuration.
int bt_audio_codec_cfg_set_octets_per_frame(struct bt_audio_codec_cfg *codec_cfg, uint16_t octets_per_frame)
Set the octets per codec frame of a codec configuration.
int bt_audio_codec_cfg_meta_set_program_info_uri(struct bt_audio_codec_cfg *codec_cfg, const uint8_t *program_info_uri, size_t program_info_uri_len)
Set the program info URI of a codec configuration metadata.
int bt_audio_codec_cfg_freq_hz_to_freq(uint32_t freq_hz)
Convert frequency value to assigned numbers frequency.
int bt_audio_codec_cfg_meta_get_ccid_list(const struct bt_audio_codec_cfg *codec_cfg, const uint8_t **ccid_list)
Extract CCID list.
int bt_audio_codec_cfg_set_val(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_codec_cfg_type type, const uint8_t *data, size_t data_len)
Set or add a specific codec configuration value.
int bt_audio_codec_cfg_meta_set_pref_context(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_context ctx)
Set the preferred context of a codec configuration metadata.
int bt_audio_codec_cfg_meta_unset_val(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_metadata_type type)
Unset a specific codec configuration metadata value.
int bt_audio_codec_cfg_meta_set_parental_rating(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_parental_rating parental_rating)
Set the parental rating of a codec configuration metadata.
int bt_audio_codec_cfg_set_freq(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_codec_cfg_freq freq)
Set the frequency of a codec configuration.
int bt_audio_codec_cfg_set_frame_blocks_per_sdu(struct bt_audio_codec_cfg *codec_cfg, uint8_t frame_blocks)
Set the frame blocks per SDU of a codec configuration.
int bt_audio_codec_cfg_unset_val(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_codec_cfg_type type)
Unset a specific codec configuration value.
int bt_audio_codec_cfg_get_freq(const struct bt_audio_codec_cfg *codec_cfg)
Extract the frequency from a codec configuration.
int bt_audio_codec_cfg_get_frame_blocks_per_sdu(const struct bt_audio_codec_cfg *codec_cfg, bool fallback_to_default)
Extract number of audio frame blocks in each SDU from BT codec config.
int bt_audio_codec_cfg_meta_set_extended(struct bt_audio_codec_cfg *codec_cfg, const uint8_t *extended_meta, size_t extended_meta_len)
Set the extended metadata of a codec configuration metadata.
int bt_audio_codec_cfg_get_chan_allocation(const struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_location *chan_allocation, bool fallback_to_default)
Extract channel allocation from BT codec config.
int bt_audio_codec_cfg_meta_get_val(const struct bt_audio_codec_cfg *codec_cfg, uint8_t type, const uint8_t **data)
Lookup a specific metadata value based on type.
int bt_audio_codec_cfg_meta_get_pref_context(const struct bt_audio_codec_cfg *codec_cfg, bool fallback_to_default)
Extract preferred contexts.
int bt_audio_codec_cfg_meta_set_bcast_audio_immediate_rend_flag(struct bt_audio_codec_cfg *codec_cfg)
Set the broadcast audio immediate rendering flag of a codec configuration metadata.
int bt_audio_codec_cfg_meta_get_parental_rating(const struct bt_audio_codec_cfg *codec_cfg)
Extract parental rating.
int bt_audio_codec_cfg_meta_set_audio_active_state(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_active_state state)
Set the audio active state of a codec configuration metadata.
int bt_audio_codec_cfg_set_chan_allocation(struct bt_audio_codec_cfg *codec_cfg, enum bt_audio_location chan_allocation)
Set the channel allocation of a codec configuration.
bt_audio_active_state
Audio Active State defined by the Generic Audio assigned numbers (bluetooth.com).
Definition: audio.h:415
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
bt_audio_parental_rating
Parental rating defined by the Generic Audio assigned numbers (bluetooth.com).
Definition: audio.h:379
bt_audio_codec_cfg_frame_dur
Codec configuration frame duration.
Definition: audio.h:291
uint8_t bt_audio_get_chan_count(enum bt_audio_location chan_allocation)
Function to get the number of channels from the channel allocation.
bt_audio_codec_qos_framing
Codec QoS Framing.
Definition: audio.h:805
bt_audio_codec_cfg_freq
Codec configuration sampling freqency.
Definition: audio.h:249
bt_audio_codec_cfg_type
Codec configuration types.
Definition: audio.h:231
bt_audio_codec_cap_freq
Supported frequencies bitfield.
Definition: audio.h:85
bt_audio_metadata_type
Codec metadata type IDs.
Definition: audio.h:427
#define BT_AUDIO_LANG_SIZE
Size of the stream language value, e.g.
Definition: audio.h:59
bt_audio_codec_cap_chan_count
Supported audio capabilities channel count bitfield.
Definition: audio.h:166
bt_audio_codec_cap_frame_dur
Supported frame durations bitfield.
Definition: audio.h:137
bt_audio_codec_cap_type
Codec capability types.
Definition: audio.h:67
bt_audio_context
Audio Context Type for Generic Audio.
Definition: audio.h:304
int bt_audio_data_parse(const uint8_t ltv[], size_t size, bool(*func)(struct bt_data *data, void *user_data), void *user_data)
Helper for parsing length-type-value data.
@ BT_AUDIO_ACTIVE_STATE_ENABLED
Audio data is being transmitted.
Definition: audio.h:419
@ BT_AUDIO_ACTIVE_STATE_DISABLED
No audio data is being transmitted.
Definition: audio.h:417
@ BT_AUDIO_CODEC_QOS_CODED
LE Coded PHY.
Definition: audio.h:819
@ BT_AUDIO_CODEC_QOS_1M
LE 1M PHY.
Definition: audio.h:815
@ BT_AUDIO_CODEC_QOS_2M
LE 2M PHY.
Definition: audio.h:817
@ BT_AUDIO_DIR_SINK
Audio direction sink.
Definition: audio.h:770
@ BT_AUDIO_DIR_SOURCE
Audio direction source.
Definition: audio.h:777
@ BT_AUDIO_LOCATION_FRONT_CENTER
Front Center.
Definition: audio.h:583
@ BT_AUDIO_LOCATION_TOP_BACK_LEFT
Top Back Left.
Definition: audio.h:611
@ BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_2
Low Frequency Effects 2.
Definition: audio.h:597
@ BT_AUDIO_LOCATION_TOP_SIDE_RIGHT
Top Side Right.
Definition: audio.h:617
@ BT_AUDIO_LOCATION_FRONT_RIGHT
Front Right.
Definition: audio.h:581
@ BT_AUDIO_LOCATION_BOTTOM_FRONT_RIGHT
Bottom Front Right.
Definition: audio.h:625
@ BT_AUDIO_LOCATION_BACK_RIGHT
Back Right.
Definition: audio.h:589
@ BT_AUDIO_LOCATION_TOP_CENTER
Top Center.
Definition: audio.h:609
@ BT_AUDIO_LOCATION_LEFT_SURROUND
Left Surround.
Definition: audio.h:631
@ BT_AUDIO_LOCATION_TOP_FRONT_RIGHT
Top Front Right.
Definition: audio.h:605
@ BT_AUDIO_LOCATION_FRONT_RIGHT_OF_CENTER
Front Right of Center.
Definition: audio.h:593
@ BT_AUDIO_LOCATION_FRONT_RIGHT_WIDE
Front Right Wide.
Definition: audio.h:629
@ BT_AUDIO_LOCATION_TOP_BACK_RIGHT
Top Back Right.
Definition: audio.h:613
@ BT_AUDIO_LOCATION_MONO_AUDIO
Mono Audio (no specified Audio Location)
Definition: audio.h:577
@ BT_AUDIO_LOCATION_BACK_LEFT
Back Left.
Definition: audio.h:587
@ BT_AUDIO_LOCATION_RIGHT_SURROUND
Right Surround.
Definition: audio.h:633
@ BT_AUDIO_LOCATION_SIDE_RIGHT
Side Right.
Definition: audio.h:601
@ BT_AUDIO_LOCATION_TOP_FRONT_LEFT
Top Front Left.
Definition: audio.h:603
@ BT_AUDIO_LOCATION_SIDE_LEFT
Side Left.
Definition: audio.h:599
@ BT_AUDIO_LOCATION_BOTTOM_FRONT_LEFT
Bottom Front Left.
Definition: audio.h:623
@ BT_AUDIO_LOCATION_TOP_FRONT_CENTER
Top Front Center.
Definition: audio.h:607
@ BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_1
Low Frequency Effects 1.
Definition: audio.h:585
@ BT_AUDIO_LOCATION_FRONT_LEFT
Front Left.
Definition: audio.h:579
@ BT_AUDIO_LOCATION_FRONT_LEFT_WIDE
Front Left Wide.
Definition: audio.h:627
@ BT_AUDIO_LOCATION_BOTTOM_FRONT_CENTER
Bottom Front Center.
Definition: audio.h:621
@ BT_AUDIO_LOCATION_BACK_CENTER
Back Center.
Definition: audio.h:595
@ BT_AUDIO_LOCATION_TOP_SIDE_LEFT
Top Side Left.
Definition: audio.h:615
@ BT_AUDIO_LOCATION_TOP_BACK_CENTER
Top Back Center.
Definition: audio.h:619
@ BT_AUDIO_LOCATION_FRONT_LEFT_OF_CENTER
Front Left of Center.
Definition: audio.h:591
@ BT_AUDIO_PARENTAL_RATING_AGE_18_OR_ABOVE
Recommended for listeners of age 18 and above.
Definition: audio.h:411
@ BT_AUDIO_PARENTAL_RATING_AGE_15_OR_ABOVE
Recommended for listeners of age 15 and above.
Definition: audio.h:405
@ BT_AUDIO_PARENTAL_RATING_AGE_10_OR_ABOVE
Recommended for listeners of age 10 and above.
Definition: audio.h:395
@ BT_AUDIO_PARENTAL_RATING_AGE_7_OR_ABOVE
Recommended for listeners of age 7 and above.
Definition: audio.h:389
@ BT_AUDIO_PARENTAL_RATING_AGE_16_OR_ABOVE
Recommended for listeners of age 16 and above.
Definition: audio.h:407
@ BT_AUDIO_PARENTAL_RATING_AGE_17_OR_ABOVE
Recommended for listeners of age 17 and above.
Definition: audio.h:409
@ BT_AUDIO_PARENTAL_RATING_AGE_5_OR_ABOVE
Recommended for listeners of age 5 and above.
Definition: audio.h:385
@ BT_AUDIO_PARENTAL_RATING_AGE_8_OR_ABOVE
Recommended for listeners of age 8 and above.
Definition: audio.h:391
@ BT_AUDIO_PARENTAL_RATING_AGE_13_OR_ABOVE
Recommended for listeners of age 13 and above.
Definition: audio.h:401
@ BT_AUDIO_PARENTAL_RATING_AGE_9_OR_ABOVE
Recommended for listeners of age 9 and above.
Definition: audio.h:393
@ BT_AUDIO_PARENTAL_RATING_AGE_11_OR_ABOVE
Recommended for listeners of age 11 and above.
Definition: audio.h:397
@ BT_AUDIO_PARENTAL_RATING_AGE_12_OR_ABOVE
Recommended for listeners of age 12 and above.
Definition: audio.h:399
@ BT_AUDIO_PARENTAL_RATING_AGE_6_OR_ABOVE
Recommended for listeners of age 6 and above.
Definition: audio.h:387
@ BT_AUDIO_PARENTAL_RATING_AGE_ANY
For all ages.
Definition: audio.h:383
@ BT_AUDIO_PARENTAL_RATING_NO_RATING
No rating.
Definition: audio.h:381
@ BT_AUDIO_PARENTAL_RATING_AGE_14_OR_ABOVE
Recommended for listeners of age 14 and above.
Definition: audio.h:403
@ BT_AUDIO_CODEC_CFG_DURATION_10
10 msec Frame Duration configuration
Definition: audio.h:296
@ BT_AUDIO_CODEC_CFG_DURATION_7_5
7.5 msec Frame Duration configuration
Definition: audio.h:293
@ BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED
Packets may be framed or unframed.
Definition: audio.h:807
@ BT_AUDIO_CODEC_QOS_FRAMING_FRAMED
Packets are always framed.
Definition: audio.h:809
@ BT_AUDIO_CODEC_CFG_FREQ_24KHZ
24 Khz codec sampling frequency
Definition: audio.h:263
@ BT_AUDIO_CODEC_CFG_FREQ_48KHZ
48 Khz codec sampling frequency
Definition: audio.h:272
@ BT_AUDIO_CODEC_CFG_FREQ_32KHZ
32 Khz codec sampling frequency
Definition: audio.h:266
@ BT_AUDIO_CODEC_CFG_FREQ_384KHZ
384 Khz codec sampling frequency
Definition: audio.h:287
@ BT_AUDIO_CODEC_CFG_FREQ_22KHZ
22.05 Khz codec sampling frequency
Definition: audio.h:260
@ BT_AUDIO_CODEC_CFG_FREQ_8KHZ
8 Khz codec sampling frequency
Definition: audio.h:251
@ BT_AUDIO_CODEC_CFG_FREQ_96KHZ
96 Khz codec sampling frequency
Definition: audio.h:278
@ BT_AUDIO_CODEC_CFG_FREQ_176KHZ
176.4 Khz codec sampling frequency
Definition: audio.h:281
@ BT_AUDIO_CODEC_CFG_FREQ_44KHZ
44.1 Khz codec sampling frequency
Definition: audio.h:269
@ BT_AUDIO_CODEC_CFG_FREQ_192KHZ
192 Khz codec sampling frequency
Definition: audio.h:284
@ BT_AUDIO_CODEC_CFG_FREQ_11KHZ
11.025 Khz codec sampling frequency
Definition: audio.h:254
@ BT_AUDIO_CODEC_CFG_FREQ_16KHZ
16 Khz codec sampling frequency
Definition: audio.h:257
@ BT_AUDIO_CODEC_CFG_FREQ_88KHZ
88.2 Khz codec sampling frequency
Definition: audio.h:275
@ BT_AUDIO_CODEC_CFG_FREQ
Sampling frequency.
Definition: audio.h:233
@ BT_AUDIO_CODEC_CFG_FRAME_LEN
Octets per codec frame.
Definition: audio.h:242
@ BT_AUDIO_CODEC_CFG_DURATION
Frame duration.
Definition: audio.h:236
@ BT_AUDIO_CODEC_CFG_FRAME_BLKS_PER_SDU
Codec frame blocks per SDU.
Definition: audio.h:245
@ BT_AUDIO_CODEC_CFG_CHAN_ALLOC
Audio channel allocation.
Definition: audio.h:239
@ BT_AUDIO_CODEC_CAP_FREQ_176KHZ
176.4 Khz sampling frequency
Definition: audio.h:117
@ BT_AUDIO_CODEC_CAP_FREQ_192KHZ
192 Khz sampling frequency
Definition: audio.h:120
@ BT_AUDIO_CODEC_CAP_FREQ_88KHZ
88.2 Khz sampling frequency
Definition: audio.h:111
@ BT_AUDIO_CODEC_CAP_FREQ_8KHZ
8 Khz sampling frequency
Definition: audio.h:87
@ BT_AUDIO_CODEC_CAP_FREQ_11KHZ
11.025 Khz sampling frequency
Definition: audio.h:90
@ BT_AUDIO_CODEC_CAP_FREQ_32KHZ
32 Khz sampling frequency
Definition: audio.h:102
@ BT_AUDIO_CODEC_CAP_FREQ_48KHZ
48 Khz sampling frequency
Definition: audio.h:108
@ BT_AUDIO_CODEC_CAP_FREQ_24KHZ
24 Khz sampling frequency
Definition: audio.h:99
@ BT_AUDIO_CODEC_CAP_FREQ_16KHZ
16 Khz sampling frequency
Definition: audio.h:93
@ BT_AUDIO_CODEC_CAP_FREQ_44KHZ
44.1 Khz sampling frequency
Definition: audio.h:105
@ BT_AUDIO_CODEC_CAP_FREQ_22KHZ
22.05 Khz sampling frequency
Definition: audio.h:96
@ BT_AUDIO_CODEC_CAP_FREQ_ANY
Any frequency capability.
Definition: audio.h:126
@ BT_AUDIO_CODEC_CAP_FREQ_384KHZ
384 Khz sampling frequency
Definition: audio.h:123
@ BT_AUDIO_CODEC_CAP_FREQ_96KHZ
96 Khz sampling frequency
Definition: audio.h:114
@ BT_AUDIO_METADATA_TYPE_PROGRAM_INFO
UTF-8 encoded title or summary of stream content.
Definition: audio.h:453
@ BT_AUDIO_METADATA_TYPE_EXTENDED
Extended metadata.
Definition: audio.h:487
@ BT_AUDIO_METADATA_TYPE_VENDOR
Vendor specific metadata.
Definition: audio.h:490
@ BT_AUDIO_METADATA_TYPE_CCID_LIST
Array of 8-bit CCID values.
Definition: audio.h:464
@ BT_AUDIO_METADATA_TYPE_BROADCAST_IMMEDIATE
Broadcast Audio Immediate Rendering flag
Definition: audio.h:484
@ BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI
UTF-8 encoded URI for additional Program information.
Definition: audio.h:474
@ BT_AUDIO_METADATA_TYPE_PARENTAL_RATING
Parental rating.
Definition: audio.h:471
@ BT_AUDIO_METADATA_TYPE_STREAM_CONTEXT
Streaming audio context.
Definition: audio.h:450
@ BT_AUDIO_METADATA_TYPE_PREF_CONTEXT
Preferred audio context.
Definition: audio.h:438
@ BT_AUDIO_METADATA_TYPE_AUDIO_STATE
Audio active state.
Definition: audio.h:481
@ BT_AUDIO_METADATA_TYPE_LANG
Language.
Definition: audio.h:461
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_4
Supporting 4 channel.
Definition: audio.h:177
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_2
Supporting 2 channel.
Definition: audio.h:171
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_1
Supporting 1 channel.
Definition: audio.h:168
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_3
Supporting 3 channel.
Definition: audio.h:174
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_8
Supporting 8 channel.
Definition: audio.h:189
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_7
Supporting 7 channel.
Definition: audio.h:186
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_ANY
Supporting all channels.
Definition: audio.h:192
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_5
Supporting 5 channel.
Definition: audio.h:180
@ BT_AUDIO_CODEC_CAP_CHAN_COUNT_6
Supporting 6 channel.
Definition: audio.h:183
@ BT_AUDIO_CODEC_CAP_DURATION_7_5
7.5 msec frame duration capability
Definition: audio.h:139
@ BT_AUDIO_CODEC_CAP_DURATION_PREFER_7_5
7.5 msec preferred frame duration capability.
Definition: audio.h:154
@ BT_AUDIO_CODEC_CAP_DURATION_ANY
Any frame duration capability.
Definition: audio.h:145
@ BT_AUDIO_CODEC_CAP_DURATION_PREFER_10
10 msec preferred frame duration capability
Definition: audio.h:162
@ BT_AUDIO_CODEC_CAP_DURATION_10
10 msec frame duration capability
Definition: audio.h:142
@ BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT
Supported audio channel counts.
Definition: audio.h:75
@ BT_AUDIO_CODEC_CAP_TYPE_DURATION
Supported frame durations.
Definition: audio.h:72
@ BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT
Supported maximum codec frames per SDU
Definition: audio.h:81
@ BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN
Supported octets per codec frame.
Definition: audio.h:78
@ BT_AUDIO_CODEC_CAP_TYPE_FREQ
Supported sampling frequencies.
Definition: audio.h:69
@ BT_AUDIO_CONTEXT_TYPE_NOTIFICATIONS
Notification and reminder sounds; attention-seeking audio, for example, in beeps signaling the arriva...
Definition: audio.h:342
@ BT_AUDIO_CONTEXT_TYPE_EMERGENCY_ALARM
Emergency alarm Emergency sounds, for example, fire alarms or other urgent alerts.
Definition: audio.h:354
@ BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL
Instructional audio, for example, in navigation, announcements, or user guidance.
Definition: audio.h:325
@ BT_AUDIO_CONTEXT_TYPE_PROHIBITED
Prohibited.
Definition: audio.h:306
@ BT_AUDIO_CONTEXT_TYPE_RINGTONE
Alerts the user to an incoming call, for example, an incoming telephony or video call,...
Definition: audio.h:347
@ BT_AUDIO_CONTEXT_TYPE_LIVE
Live audio, for example, from a microphone where audio is perceived both through a direct acoustic pa...
Definition: audio.h:332
@ BT_AUDIO_CONTEXT_TYPE_MEDIA
Media, for example, music playback, radio, podcast or movie soundtrack, or tv audio.
Definition: audio.h:318
@ BT_AUDIO_CONTEXT_TYPE_GAME
Audio associated with video gaming, for example gaming media; gaming effects; music and in-game voice...
Definition: audio.h:323
@ BT_AUDIO_CONTEXT_TYPE_SOUND_EFFECTS
Sound effects including keyboard and touch feedback; menu and user interface sounds; and other system...
Definition: audio.h:337
@ BT_AUDIO_CONTEXT_TYPE_VOICE_ASSISTANTS
Man-machine communication, for example, with voice recognition or virtual assistants.
Definition: audio.h:327
@ BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL
Conversation between humans, for example, in telephony or video calls, including traditional cellular...
Definition: audio.h:316
@ BT_AUDIO_CONTEXT_TYPE_ALERTS
Alarms and timers; immediate alerts, for example, in a critical battery alarm, timer expiry or alarm ...
Definition: audio.h:352
@ BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED
Identifies audio where the use case context does not match any other defined value,...
Definition: audio.h:311
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition: util_macro.h:44
Bluetooth ISO handling.
Bluetooth LC3 codec handling.
state
Definition: parser_state.h:29
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
Codec capability structure.
Definition: audio.h:669
uint16_t vid
Codec Company Vendor ID.
Definition: audio.h:687
uint8_t data[CONFIG_BT_AUDIO_CODEC_CAP_MAX_DATA_SIZE]
Codec Specific Capabilities Data.
Definition: audio.h:692
uint16_t cid
Codec Company ID.
Definition: audio.h:685
uint8_t path_id
Data path ID.
Definition: audio.h:675
bool ctlr_transcode
Whether or not the local controller should transcode.
Definition: audio.h:681
uint8_t meta[CONFIG_BT_AUDIO_CODEC_CAP_MAX_METADATA_SIZE]
Codec Specific Capabilities Metadata.
Definition: audio.h:698
size_t data_len
Codec Specific Capabilities Data count.
Definition: audio.h:690
uint8_t id
Codec ID.
Definition: audio.h:683
size_t meta_len
Codec Specific Capabilities Metadata count.
Definition: audio.h:696
Codec specific configuration structure.
Definition: audio.h:703
size_t meta_len
Codec Specific Capabilities Metadata count.
Definition: audio.h:730
uint16_t vid
Codec Company Vendor ID.
Definition: audio.h:721
uint8_t meta[CONFIG_BT_AUDIO_CODEC_CFG_MAX_METADATA_SIZE]
Codec Specific Capabilities Metadata.
Definition: audio.h:732
uint16_t cid
Codec Company ID.
Definition: audio.h:719
size_t data_len
Codec Specific Capabilities Data count.
Definition: audio.h:724
uint8_t path_id
Data path ID.
Definition: audio.h:709
bool ctlr_transcode
Whether or not the local controller should transcode.
Definition: audio.h:715
uint8_t id
Codec ID.
Definition: audio.h:717
uint8_t data[CONFIG_BT_AUDIO_CODEC_CFG_MAX_DATA_SIZE]
Codec Specific Capabilities Data.
Definition: audio.h:726
struct to hold minimum and maximum supported codec frame sizes
Definition: audio.h:218
uint16_t min
Minimum number of octets supported per codec frame.
Definition: audio.h:220
uint16_t max
Maximum number of octets supported per codec frame.
Definition: audio.h:222
Audio Stream Quality of Service Preference structure.
Definition: audio.h:972
uint16_t latency
Preferred Transport Latency.
Definition: audio.h:988
uint8_t phy
Preferred PHY.
Definition: audio.h:982
bool unframed_supported
Unframed PDUs supported.
Definition: audio.h:979
uint32_t pref_pd_max
Preferred maximum Presentation Delay.
Definition: audio.h:1022
uint32_t pd_min
Minimum Presentation Delay in microseconds.
Definition: audio.h:998
uint32_t pd_max
Maximum Presentation Delay.
Definition: audio.h:1008
uint32_t pref_pd_min
Preferred minimum Presentation Delay.
Definition: audio.h:1015
uint8_t rtn
Preferred Retransmission Number.
Definition: audio.h:985
Codec QoS structure.
Definition: audio.h:849
uint32_t pd
Presentation Delay in microseconds.
Definition: audio.h:860
enum bt_audio_codec_qos_framing framing
QoS Framing.
Definition: audio.h:871
uint8_t burst_number
Burst number.
Definition: audio.h:932
uint8_t num_subevents
Number of subevents.
Definition: audio.h:941
uint8_t phy
PHY.
Definition: audio.h:879
uint16_t max_pdu
Maximum PDU size.
Definition: audio.h:925
uint8_t rtn
Retransmission Number.
Definition: audio.h:887
uint16_t latency
Maximum Transport Latency.
Definition: audio.h:903
uint32_t interval
SDU Interval.
Definition: audio.h:911
uint16_t sdu
Maximum SDU size.
Definition: audio.h:894
Bluetooth data.
Definition: bluetooth.h:454
Misc utilities.
Macro utilities.