Zephyr Project API
3.1.0
A Scalable Open Source RTOS
|
Bluetooth Audio. More...
Modules | |
Audio Broadcast APIs | |
Audio Broadcast APIs. | |
Audio Client APIs | |
Audio Server APIs | |
Codec config parsing APIs | |
Audio codec Config 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... | |
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... | |
Bluetooth Audio.
#define BROADCAST_SNK_STREAM_CNT 0 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BROADCAST_SNK_SUBGROUP_CNT 0 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_BROADCAST_ID_SIZE 3 /* octets */ |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_CONTEXT_TYPE_ALERTS BIT(10) |
#include <include/zephyr/bluetooth/audio/audio.h>
Alarms and timers.
Alarms and timers; immediate alerts, for example, in a critical battery alarm, timer expiry or alarm clock, toaster cooker, kettle, microwave, etc.
#define BT_AUDIO_CONTEXT_TYPE_ANY |
#include <include/zephyr/bluetooth/audio/audio.h>
Any known context.
#define BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL BIT(1) |
#include <include/zephyr/bluetooth/audio/audio.h>
Conversational audio.
Conversation between humans. as, for example, in telephony or video calls.
#define BT_AUDIO_CONTEXT_TYPE_EMERGENCY_ALARM BIT(11) |
#include <include/zephyr/bluetooth/audio/audio.h>
Emergency alarm.
Emergency alerts as, for example, with fire alarms or other urgent alerts.
#define BT_AUDIO_CONTEXT_TYPE_GAME BIT(3) |
#include <include/zephyr/bluetooth/audio/audio.h>
Game audio.
Audio assiociated with video gaming as, for example, gaming media, gaming effects; music and in-game voice chat between participants; or a mix of all the above.
#define BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL BIT(4) |
#include <include/zephyr/bluetooth/audio/audio.h>
Instructional audio.
Instructional audio as, for example, in navigation, traffic announcements or user guidance.
#define BT_AUDIO_CONTEXT_TYPE_LIVE BIT(6) |
#include <include/zephyr/bluetooth/audio/audio.h>
Live audio.
Live audio, for example, from a microphone where audio is perceived both through a direct acoustic path and through an LE Audio Stream.
#define BT_AUDIO_CONTEXT_TYPE_MEDIA BIT(2) |
#include <include/zephyr/bluetooth/audio/audio.h>
Media.
Media as, for example, in music, public radio, podcast or video soundtrack. Conversation between humans as, for example, in telephony or video calls.
#define BT_AUDIO_CONTEXT_TYPE_NOTIFICATIONS BIT(8) |
#include <include/zephyr/bluetooth/audio/audio.h>
Notification and reminder sounds.
Notification and reminder sounds; attention-seeking audio, for example, in beeps signaling the arrival of a message.
#define BT_AUDIO_CONTEXT_TYPE_PROHIBITED 0 |
#include <include/zephyr/bluetooth/audio/audio.h>
Audio Context Type, Generic Audio.
These values are defined by the Generic Audio Assigned Numbers
Prohibited. Excluded from usage.
#define BT_AUDIO_CONTEXT_TYPE_RINGTONE BIT(9) |
#include <include/zephyr/bluetooth/audio/audio.h>
Ringtone as in a call alert.
Alerts the user to an incoming call, for example, an incoming telephony or video call, including traditional cellular as well as VoIP and Push-to-Talk.
#define BT_AUDIO_CONTEXT_TYPE_SOUND_EFFECTS BIT(7) |
#include <include/zephyr/bluetooth/audio/audio.h>
Sound effects.
Sound effects including keyboard and touch feedback; menu and user interface sounds; and other system sounds.
#define BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED BIT(0) |
#include <include/zephyr/bluetooth/audio/audio.h>
Unspecified type.
Unspecified, matches any audio content.
#define BT_AUDIO_CONTEXT_TYPE_VOICE_ASSISTANTS BIT(5) |
#include <include/zephyr/bluetooth/audio/audio.h>
Voice assistant audio.
Man-machine communication, for example, with voice recognition or virtual assistants.
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
Mandatory to support as both broadcast source and sink
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
Mandatory to support as both broadcast source and sink
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
Mandatory to support as broadcast sink
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
Mandatory to support as broadcast sink
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_3_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_3_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_4_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_4_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_5_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_5_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_6_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_6_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_PRESET | ( | _codec, | |
_qos | |||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare an LC3 preset structure
#define BT_AUDIO_LC3_UNICAST_PRESET_16_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_16_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_16_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
Mandatory to support as both unicast client and server
#define BT_AUDIO_LC3_UNICAST_PRESET_16_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_24_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_24_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_24_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
Mandatory to support as unicast server
#define BT_AUDIO_LC3_UNICAST_PRESET_24_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_32_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_32_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_32_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_32_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_441_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_441_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_441_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_441_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_3_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_3_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_4_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_4_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_5_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_5_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_6_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_48_6_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_8_1_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_8_1_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_8_2_1 |
#include <include/zephyr/bluetooth/audio/audio.h>
#define BT_AUDIO_LC3_UNICAST_PRESET_8_2_2 |
#include <include/zephyr/bluetooth/audio/audio.h>
#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>
#define BT_CODEC | ( | _id, | |
_cid, | |||
_vid, | |||
_data, | |||
_meta | |||
) |
#include <include/zephyr/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/zephyr/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_QOS | ( | _interval, | |
_framing, | |||
_phy, | |||
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Helper to declare elements of bt_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_CODEC_QOS_FRAMED | ( | _interval, | |
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/zephyr/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_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_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_CODEC_QOS_UNFRAMED | ( | _interval, | |
_sdu, | |||
_rtn, | |||
_latency, | |||
_pd | |||
) |
#include <include/zephyr/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) |
anonymous enum |
#include <include/zephyr/bluetooth/audio/audio.h>
Codec QoS Framing.
Enumerator | |
---|---|
BT_CODEC_QOS_UNFRAMED | |
BT_CODEC_QOS_FRAMED |
anonymous enum |
#include <include/zephyr/bluetooth/audio/audio.h>
Codec QoS Preferred PHY.
Enumerator | |
---|---|
BT_CODEC_QOS_1M | |
BT_CODEC_QOS_2M | |
BT_CODEC_QOS_CODED |
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
enum bt_audio_meta_type |
#include <include/zephyr/bluetooth/audio/audio.h>
Meta data type ids used for LTV encoded metadata.
These values are defined by the Generic Audio Assigned Numbers, bluetooth.com
void bt_audio_stream_cb_register | ( | struct bt_audio_stream * | stream, |
struct bt_audio_stream_ops * | ops | ||
) |
#include <include/zephyr/bluetooth/audio/audio.h>
Register Audio callbacks for a stream.
Register Audio callbacks for a stream.
stream | Stream object. |
ops | Stream operations structure. |