Zephyr API Documentation
3.0.0
A Scalable Open Source RTOS
|
|
3.0.0 |
Bluetooth Audio. More...
Modules | |
Audio Client APIs | |
Data Structures | |
struct | bt_codec_data |
Codec configuration structure. More... | |
struct | bt_codec |
Codec structure. More... | |
struct | bt_audio_base_bis_data |
struct | bt_audio_base_subgroup |
struct | bt_audio_base |
struct | bt_codec_qos |
Codec QoS structure. More... | |
struct | bt_codec_qos_pref |
Audio Stream Quality of Service Preference structure. More... | |
struct | bt_audio_lc3_preset |
struct | bt_audio_stream |
Audio stream structure. More... | |
struct | bt_audio_unicast_server_cb |
struct | bt_audio_broadcast_sink_cb |
struct | bt_audio_stream_ops |
Stream operation. More... | |
Enumerations | |
enum | { BT_CODEC_QOS_IN , BT_CODEC_QOS_OUT , BT_CODEC_QOS_INOUT } |
Audio QoS direction. More... | |
enum | { BT_CODEC_QOS_UNFRAMED = 0x00 , BT_CODEC_QOS_FRAMED = 0x01 } |
Codec QoS Framing. More... | |
enum | { BT_CODEC_QOS_1M = BIT(0) , BT_CODEC_QOS_2M = BIT(1) , BT_CODEC_QOS_CODED = BIT(2) } |
Codec QoS Preferred PHY. More... | |
enum | bt_audio_pac_type { BT_AUDIO_SINK = 0x01 , BT_AUDIO_SOURCE = 0x02 } |
Audio Capability type. More... | |
Functions | |
void | bt_audio_stream_cb_register (struct bt_audio_stream *stream, struct bt_audio_stream_ops *ops) |
Register Audio callbacks for a stream. More... | |
int | bt_audio_unicast_server_register_cb (const struct bt_audio_unicast_server_cb *cb) |
Register unicast server callbacks. More... | |
int | bt_audio_unicast_server_unregister_cb (const struct bt_audio_unicast_server_cb *cb) |
Unregister unicast server callbacks. More... | |
Bluetooth Audio.
#define BROADCAST_SNK_STREAM_CNT 0 |
#include <include/bluetooth/audio/audio.h>
#define BROADCAST_SUBGROUP_CNT 0 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_BROADCAST_ID_SIZE 3 /* octets */ |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_ALERTS BIT(11) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL BIT(2) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_EMERGENCY_ALARM BIT(12) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_GAME BIT(4) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL BIT(5) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_LIVE BIT(7) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_MEDIA BIT(3) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_NOTIFICATIONS BIT(9) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_PROHIBITED BIT(0) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_RINGTONE BIT(10) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_SOUND_EFFECTS BIT(8) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED BIT(1) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_VOICE_ASSISTANTS BIT(6) |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1 |
#include <include/bluetooth/audio/audio.h>
Mandatory to support as both broadcast source and sink
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_2_2 |
#include <include/bluetooth/audio/audio.h>
Mandatory to support as both broadcast source and sink
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_2_1 |
#include <include/bluetooth/audio/audio.h>
Mandatory to support as broadcast sink
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_2_2 |
#include <include/bluetooth/audio/audio.h>
Mandatory to support as broadcast sink
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_2_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_2_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_2_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_3_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_3_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_4_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_4_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_5_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_5_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_6_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_6_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_2_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_PRESET | ( | _codec, | |
_qos | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare an LC3 preset structure
#define BT_AUDIO_LC3_UNICAST_PRESET_16_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_16_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_16_2_1 |
#include <include/bluetooth/audio/audio.h>
Mandatory to support as both unicast client and server
#define BT_AUDIO_LC3_UNICAST_PRESET_16_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_24_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_24_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_24_2_1 |
#include <include/bluetooth/audio/audio.h>
Mandatory to support as unicast server
#define BT_AUDIO_LC3_UNICAST_PRESET_24_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_32_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_32_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_32_2_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_32_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_441_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_441_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_441_2_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_441_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_2_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_3_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_3_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_4_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_4_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_5_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_5_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_6_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_6_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_8_1_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_8_1_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_8_2_1 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_8_2_2 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_UNICAST_ANNOUNCEMENT_GENERAL 0x00 |
#include <include/bluetooth/audio/audio.h>
#define BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED 0x01 |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC | ( | _id, | |
_cid, | |||
_vid, | |||
_data, | |||
_meta | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare bt_codec 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_CODEC_DATA | ( | _type, | |
_bytes... | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare elements of bt_codec_data arrays.
This macro is mainly for creating an array of struct bt_codec_data elements inside bt_codec which is then passed to the likes of bt_audio_stream_config or bt_audio_stream_reconfig.
_type | Type of advertising data field |
_bytes | Variable number of single-byte parameters |
#define BT_CODEC_META_BASE 0x01 |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT (BT_CODEC_META_BASE + 1) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_ALERT BIT(5) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_ANY |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_ATTENTION BIT(4) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_EMERGENCY BIT(7) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_INSTRUCTION BIT(3) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_MAN_MACHINE BIT(6) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_MEDIA BIT(2) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_NONE BIT(0) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_RINGTONE BIT(8) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_TV BIT(9) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_CONTEXT_VOICE BIT(1) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_META_PREFER_CONTEXT (BT_CODEC_META_BASE) |
#include <include/bluetooth/audio/audio.h>
#define BT_CODEC_QOS | ( | _dir, | |
_interval, | |||
_framing, | |||
_phy, | |||
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare elements of bt_codec_qos.
_dir | direction |
_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_CODEC_QOS_IN_FRAMED | ( | _interval, | |
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare Input Framed bt_codec_qos.
_interval | SDU interval (usec) |
_sdu | Maximum SDU Size |
_rtn | Retransmission number |
_latency | Maximum Transport Latency (msec) |
_pd | Presentation Delay (usec) |
#define BT_CODEC_QOS_IN_UNFRAMED | ( | _interval, | |
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare Input Unframed bt_codec_qos.
_interval | SDU interval (usec) |
_sdu | Maximum SDU Size |
_rtn | Retransmission number |
_latency | Maximum Transport Latency (msec) |
_pd | Presentation Delay (usec) |
#define BT_CODEC_QOS_INOUT_FRAMED | ( | _interval, | |
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare Output Framed bt_codec_qos.
_interval | SDU interval (usec) |
_sdu | Maximum SDU Size |
_rtn | Retransmission number |
_latency | Maximum Transport Latency (msec) |
_pd | Presentation Delay (usec) |
#define BT_CODEC_QOS_INOUT_UNFRAMED | ( | _interval, | |
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare Input/Output Unframed bt_codec_qos.
_interval | SDU interval (usec) |
_sdu | Maximum SDU Size |
_rtn | Retransmission number |
_latency | Maximum Transport Latency (msec) |
_pd | Presentation Delay (usec) |
#define BT_CODEC_QOS_OUT_FRAMED | ( | _interval, | |
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare Output Framed bt_codec_qos.
_interval | SDU interval (usec) |
_sdu | Maximum SDU Size |
_rtn | Retransmission number |
_latency | Maximum Transport Latency (msec) |
_pd | Presentation Delay (usec) |
#define BT_CODEC_QOS_OUT_UNFRAMED | ( | _interval, | |
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare Output Unframed bt_code *.
_interval | SDU interval (usec) |
_sdu | Maximum SDU Size |
_rtn | Retransmission number |
_latency | Maximum Transport Latency (msec) |
_pd | Presentation Delay (usec) |
#define BT_CODEC_QOS_PREF | ( | _unframed_supported, | |
_phy, | |||
_rtn, | |||
_latency, | |||
_pd_min, | |||
_pd_max, | |||
_pref_pd_min, | |||
_pref_pd_max | |||
) |
#include <include/bluetooth/audio/audio.h>
Helper to declare elements of bt_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) |
anonymous enum |
#include <include/bluetooth/audio/audio.h>
Audio QoS direction.
Enumerator | |
---|---|
BT_CODEC_QOS_IN | |
BT_CODEC_QOS_OUT | |
BT_CODEC_QOS_INOUT |
anonymous enum |
#include <include/bluetooth/audio/audio.h>
Codec QoS Framing.
Enumerator | |
---|---|
BT_CODEC_QOS_UNFRAMED | |
BT_CODEC_QOS_FRAMED |
anonymous enum |
#include <include/bluetooth/audio/audio.h>
Codec QoS Preferred PHY.
Enumerator | |
---|---|
BT_CODEC_QOS_1M | |
BT_CODEC_QOS_2M | |
BT_CODEC_QOS_CODED |
enum bt_audio_pac_type |
#include <include/bluetooth/audio/audio.h>
Audio Capability type.
Enumerator | |
---|---|
BT_AUDIO_SINK | |
BT_AUDIO_SOURCE |
void bt_audio_stream_cb_register | ( | struct bt_audio_stream * | stream, |
struct bt_audio_stream_ops * | ops | ||
) |
#include <include/bluetooth/audio/audio.h>
Register Audio callbacks for a stream.
Register Audio callbacks for a stream.
stream | Stream object. |
ops | Stream operations structure. |
int bt_audio_unicast_server_register_cb | ( | const struct bt_audio_unicast_server_cb * | cb | ) |
#include <include/bluetooth/audio/audio.h>
Register unicast server callbacks.
Only one callback structure can be registered, and attempting to registering more than one will result in an error.
cb | Unicast server callback structure. |
int bt_audio_unicast_server_unregister_cb | ( | const struct bt_audio_unicast_server_cb * | cb | ) |
#include <include/bluetooth/audio/audio.h>
Unregister unicast server callbacks.
May only unregister a callback structure that has previously been registered by bt_audio_unicast_server_register_cb().
cb | Unicast server callback structure. |