|
Zephyr Project API 3.5.0
A Scalable Open Source RTOS
|
Bluetooth Audio. More...
Modules | |
| Codec capability parsing APIs | |
| Audio codec capabilities APIs. | |
| Codec config parsing APIs | |
| Audio codec Config APIs. | |
Data Structures | |
| struct | bt_audio_codec_cap |
| Codec capability structure. More... | |
| struct | bt_audio_codec_cfg |
| Codec specific configuration structure. More... | |
| struct | bt_audio_codec_qos |
| Codec QoS structure. More... | |
| struct | bt_audio_codec_qos_pref |
| Audio Stream Quality of Service Preference structure. More... | |
Macros | |
| #define | BT_AUDIO_BROADCAST_ID_SIZE 3 /* octets */ |
| #define | BT_AUDIO_BROADCAST_ID_MAX 0xFFFFFFU |
| Maximum broadcast ID value. | |
| #define | BT_AUDIO_PD_PREF_NONE 0x000000U |
| Indicates that the server have no preference for the presentation delay. | |
| #define | BT_AUDIO_PD_MAX 0xFFFFFFU |
| Maximum presentation delay in microseconds. | |
| #define | BT_AUDIO_BROADCAST_CODE_SIZE 16 |
| #define | BT_AUDIO_CONTEXT_TYPE_ANY |
| Any known context. | |
| #define | BT_AUDIO_METADATA_TYPE_IS_KNOWN(_type) |
| Helper to check whether metadata type is known by the stack. | |
| #define | BT_AUDIO_UNICAST_ANNOUNCEMENT_GENERAL 0x00 |
| #define | BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED 0x01 |
| #define | BT_AUDIO_CODEC_DATA(_type, _bytes...) (sizeof((uint8_t)_type) + sizeof((uint8_t[]){_bytes})), (_type), _bytes |
| Helper to declare elements of bt_audio_codec_cap arrays. | |
| #define | BT_AUDIO_CODEC_CFG(_id, _cid, _vid, _data, _meta) |
| Helper to declare Codec config parsing APIs. | |
| #define | BT_AUDIO_CODEC_CAP(_id, _cid, _vid, _data, _meta) |
| Helper to declare Codec capability parsing APIs structure. | |
| #define | BT_AUDIO_LOCATION_ANY |
| Any known location. | |
| #define | BT_AUDIO_CODEC_QOS(_interval, _framing, _phy, _sdu, _rtn, _latency, _pd) |
| Helper to declare elements of bt_audio_codec_qos. | |
| #define | BT_AUDIO_CODEC_QOS_UNFRAMED(_interval, _sdu, _rtn, _latency, _pd) |
| Helper to declare Input Unframed bt_audio_codec_qos. | |
| #define | BT_AUDIO_CODEC_QOS_FRAMED(_interval, _sdu, _rtn, _latency, _pd) |
| Helper to declare Input Framed bt_audio_codec_qos. | |
| #define | BT_AUDIO_CODEC_QOS_PREF(_unframed_supported, _phy, _rtn, _latency, _pd_min, _pd_max, _pref_pd_min, _pref_pd_max) |
| Helper to declare elements of bt_audio_codec_qos_pref. | |
Functions | |
| 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. | |
Bluetooth Audio.
| #define BT_AUDIO_BROADCAST_CODE_SIZE 16 |
#include <include/zephyr/bluetooth/audio/audio.h>
| #define BT_AUDIO_BROADCAST_ID_MAX 0xFFFFFFU |
#include <include/zephyr/bluetooth/audio/audio.h>
Maximum broadcast ID value.
| #define BT_AUDIO_BROADCAST_ID_SIZE 3 /* octets */ |
#include <include/zephyr/bluetooth/audio/audio.h>
| #define BT_AUDIO_CODEC_CAP | ( | _id, | |
| _cid, | |||
| _vid, | |||
| _data, | |||
| _meta | |||
| ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare Codec capability parsing APIs structure.
| _id | Codec ID |
| _cid | Company ID |
| _vid | Vendor ID |
| _data | Codec Specific Data in LVT format |
| _meta | Codec Specific Metadata in LVT format |
| #define BT_AUDIO_CODEC_CFG | ( | _id, | |
| _cid, | |||
| _vid, | |||
| _data, | |||
| _meta | |||
| ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare Codec config parsing APIs.
| _id | Codec ID |
| _cid | Company ID |
| _vid | Vendor ID |
| _data | Codec Specific Data in LVT format |
| _meta | Codec Specific Metadata in LVT format |
| #define BT_AUDIO_CODEC_DATA | ( | _type, | |
| _bytes... | |||
| ) | (sizeof((uint8_t)_type) + sizeof((uint8_t[]){_bytes})), (_type), _bytes |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare elements of bt_audio_codec_cap arrays.
This macro is mainly for creating an array of struct bt_audio_codec_cap data arrays.
| _type | Type of advertising data field |
| _bytes | Variable number of single-byte parameters |
| #define BT_AUDIO_CODEC_QOS | ( | _interval, | |
| _framing, | |||
| _phy, | |||
| _sdu, | |||
| _rtn, | |||
| _latency, | |||
| _pd | |||
| ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare elements of bt_audio_codec_qos.
| _interval | SDU interval (usec) |
| _framing | Framing |
| _phy | Target PHY |
| _sdu | Maximum SDU Size |
| _rtn | Retransmission number |
| _latency | Maximum Transport Latency (msec) |
| _pd | Presentation Delay (usec) |
| #define BT_AUDIO_CODEC_QOS_FRAMED | ( | _interval, | |
| _sdu, | |||
| _rtn, | |||
| _latency, | |||
| _pd | |||
| ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare Input Framed bt_audio_codec_qos.
| _interval | SDU interval (usec) |
| _sdu | Maximum SDU Size |
| _rtn | Retransmission number |
| _latency | Maximum Transport Latency (msec) |
| _pd | Presentation Delay (usec) |
| #define BT_AUDIO_CODEC_QOS_PREF | ( | _unframed_supported, | |
| _phy, | |||
| _rtn, | |||
| _latency, | |||
| _pd_min, | |||
| _pd_max, | |||
| _pref_pd_min, | |||
| _pref_pd_max | |||
| ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare elements of bt_audio_codec_qos_pref.
| _unframed_supported | Unframed PDUs supported |
| _phy | Preferred Target PHY |
| _rtn | Preferred Retransmission number |
| _latency | Preferred Maximum Transport Latency (msec) |
| _pd_min | Minimum Presentation Delay (usec) |
| _pd_max | Maximum Presentation Delay (usec) |
| _pref_pd_min | Preferred Minimum Presentation Delay (usec) |
| _pref_pd_max | Preferred Maximum Presentation Delay (usec) |
| #define BT_AUDIO_CODEC_QOS_UNFRAMED | ( | _interval, | |
| _sdu, | |||
| _rtn, | |||
| _latency, | |||
| _pd | |||
| ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare Input Unframed bt_audio_codec_qos.
| _interval | SDU interval (usec) |
| _sdu | Maximum SDU Size |
| _rtn | Retransmission number |
| _latency | Maximum Transport Latency (msec) |
| _pd | Presentation Delay (usec) |
| #define BT_AUDIO_CONTEXT_TYPE_ANY |
| #define BT_AUDIO_LOCATION_ANY |
#include <include/zephyr/bluetooth/audio/audio.h>
Any known location.
| #define BT_AUDIO_METADATA_TYPE_IS_KNOWN | ( | _type | ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to check whether metadata type is known by the stack.
| #define BT_AUDIO_PD_MAX 0xFFFFFFU |
#include <include/zephyr/bluetooth/audio/audio.h>
Maximum presentation delay in microseconds.
| #define BT_AUDIO_PD_PREF_NONE 0x000000U |
#include <include/zephyr/bluetooth/audio/audio.h>
Indicates that the server have no preference for the presentation delay.
| #define BT_AUDIO_UNICAST_ANNOUNCEMENT_GENERAL 0x00 |
#include <include/zephyr/bluetooth/audio/audio.h>
| #define BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED 0x01 |
#include <include/zephyr/bluetooth/audio/audio.h>
| anonymous enum |
#include <include/zephyr/bluetooth/audio/audio.h>
Codec QoS Preferred PHY.
| Enumerator | |
|---|---|
| BT_AUDIO_CODEC_QOS_1M | |
| BT_AUDIO_CODEC_QOS_2M | |
| BT_AUDIO_CODEC_QOS_CODED | |
#include <include/zephyr/bluetooth/audio/audio.h>
Audio Active State defined by the Generic Audio assigned numbers (bluetooth.com).
| Enumerator | |
|---|---|
| BT_AUDIO_ACTIVE_STATE_DISABLED | |
| BT_AUDIO_ACTIVE_STATE_ENABLED | |
#include <include/zephyr/bluetooth/audio/audio.h>
Codec QoS Framing.
| Enumerator | |
|---|---|
| BT_AUDIO_CODEC_QOS_FRAMING_UNFRAMED | |
| BT_AUDIO_CODEC_QOS_FRAMING_FRAMED | |
| enum bt_audio_context |
#include <include/zephyr/bluetooth/audio/audio.h>
Audio Context Type for Generic Audio.
These values are defined by the Generic Audio Assigned Numbers, bluetooth.com
| enum bt_audio_dir |
#include <include/zephyr/bluetooth/audio/audio.h>
Audio Capability type.
| Enumerator | |
|---|---|
| BT_AUDIO_DIR_SINK | |
| BT_AUDIO_DIR_SOURCE | |
| enum bt_audio_location |
#include <include/zephyr/bluetooth/audio/audio.h>
Location values for BT Audio.
These values are defined by the Generic Audio Assigned Numbers, bluetooth.com
#include <include/zephyr/bluetooth/audio/audio.h>
Codec metadata type IDs.
Metadata types defined by the Generic Audio assigned numbers (bluetooth.com).
#include <include/zephyr/bluetooth/audio/audio.h>
Parental rating defined by the Generic Audio assigned numbers (bluetooth.com).
The numbering scheme is aligned with Annex F of EN 300 707 v1.2.1 which defined parental rating for viewing.
| int bt_audio_data_parse | ( | const uint8_t | ltv[], |
| size_t | size, | ||
| bool(*)(struct bt_data *data, void *user_data) | func, | ||
| void * | user_data | ||
| ) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper for parsing length-type-value data.
| ltv | Length-type-value (LTV) encoded data. |
| size | Size of the ltv data. |
| func | Callback function which will be called for each element that's found in the data. The callback should return true to continue parsing, or false to stop parsing. |
| user_data | User data to be passed to the callback. |
| 0 | if all entries were parsed. |
| -EINVAL | if the data is incorrectly encoded |
| -ECANCELED | if parsing was prematurely cancelled by the callback |