Zephyr Project API  3.3.0
A Scalable Open Source RTOS
audio.h File Reference

Bluetooth Audio handling. More...

Go to the source code of this file.

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_client_cb
 
struct  bt_audio_unicast_server_cb
 
struct  bt_audio_broadcast_sink_cb
 
struct  bt_audio_stream_ops
 Stream operation. More...
 
struct  bt_audio_discover_params
 
struct  bt_audio_unicast_group_stream_param
 
struct  bt_audio_unicast_group_stream_pair_param
 Parameter struct for the unicast group functions. More...
 
struct  bt_audio_unicast_group_param
 
struct  bt_audio_broadcast_source_stream_param
 
struct  bt_audio_broadcast_source_subgroup_param
 
struct  bt_audio_broadcast_source_create_param
 

Macros

#define BT_AUDIO_BROADCAST_ID_SIZE   3 /* octets */
 
#define BT_AUDIO_CONTEXT_TYPE_ANY
 
#define BT_AUDIO_UNICAST_ANNOUNCEMENT_GENERAL   0x00
 
#define BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED   0x01
 
#define BROADCAST_SNK_STREAM_CNT   0
 
#define BROADCAST_SNK_SUBGROUP_CNT   0
 
#define BT_CODEC_DATA(_type, _bytes...)
 Helper to declare elements of bt_codec_data arrays. More...
 
#define BT_CODEC(_id, _cid, _vid, _data, _meta)
 Helper to declare bt_codec structure. More...
 
#define BT_AUDIO_LOCATION_ANY
 
#define BT_CODEC_QOS(_interval, _framing, _phy, _sdu, _rtn, _latency, _pd)
 Helper to declare elements of bt_codec_qos. More...
 
#define BT_CODEC_QOS_UNFRAMED(_interval, _sdu, _rtn, _latency, _pd)
 Helper to declare Input Unframed bt_codec_qos. More...
 
#define BT_CODEC_QOS_FRAMED(_interval, _sdu, _rtn, _latency, _pd)
 Helper to declare Input Framed bt_codec_qos. More...
 
#define BT_CODEC_QOS_PREF(_unframed_supported, _phy, _rtn, _latency, _pd_min, _pd_max, _pref_pd_min, _pref_pd_max)
 Helper to declare elements of bt_codec_qos_pref. More...
 
#define BT_AUDIO_LC3_PRESET(_codec, _qos)
 
#define BT_AUDIO_LC3_UNICAST_PRESET_8_1_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 8_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_8_2_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 8_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_16_1_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 16_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_16_2_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 16_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_24_1_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 24_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_24_2_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 24_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_32_1_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 32_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_32_2_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 32_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_441_1_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 441_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_441_2_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 441_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_1_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_2_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_3_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_3_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_4_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_4_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_5_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 8_5_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_6_1(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_6_1 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_8_1_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 8_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_8_2_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 8_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_16_1_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 16_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_16_2_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 16_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_24_1_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 24_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_24_2_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 24_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_32_1_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 32_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_32_2_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 32_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_441_1_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 441_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_441_2_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 441_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_1_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_2_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_3_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_3_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_4_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_4_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_5_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_5_2 codec configuration. More...
 
#define BT_AUDIO_LC3_UNICAST_PRESET_48_6_2(_loc, _stream_context)
 Helper to declare LC3 Unicast 48_6_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_1_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 8_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_2_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 8_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_1_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 16_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_2_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 16_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_1_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 24_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_2_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 24_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_1_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 32_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_2_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 32_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_1_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 441_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_2_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 441_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_1_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_1_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_2_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_2_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_3_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_3_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_4_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_4_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_5_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_5_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_6_1(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_6_1 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_1_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 8_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_8_2_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 8_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_1_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 16_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_16_2_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 16_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_1_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 24_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_24_2_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 24_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_1_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 32_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_32_2_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 32_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_1_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 441_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_441_2_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 441_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_1_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_1_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_2_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_2_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_3_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_3_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_4_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_4_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_5_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_5_2 codec configuration. More...
 
#define BT_AUDIO_LC3_BROADCAST_PRESET_48_6_2(_loc, _stream_context)
 Helper to declare LC3 Broadcast 48_6_2 codec configuration. More...
 

Typedefs

typedef void(* bt_audio_discover_func_t) (struct bt_conn *conn, struct bt_codec *codec, struct bt_audio_ep *ep, struct bt_audio_discover_params *params)
 Discover Audio capabilities and endpoints callback function. More...
 

Enumerations

enum  bt_audio_context {
  BT_AUDIO_CONTEXT_TYPE_PROHIBITED = 0 , BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED = BIT(0) , BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL = BIT(1) , BT_AUDIO_CONTEXT_TYPE_MEDIA = BIT(2) ,
  BT_AUDIO_CONTEXT_TYPE_GAME = BIT(3) , BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL = BIT(4) , BT_AUDIO_CONTEXT_TYPE_VOICE_ASSISTANTS = BIT(5) , BT_AUDIO_CONTEXT_TYPE_LIVE = BIT(6) ,
  BT_AUDIO_CONTEXT_TYPE_SOUND_EFFECTS = BIT(7) , BT_AUDIO_CONTEXT_TYPE_NOTIFICATIONS = BIT(8) , BT_AUDIO_CONTEXT_TYPE_RINGTONE = BIT(9) , BT_AUDIO_CONTEXT_TYPE_ALERTS = BIT(10) ,
  BT_AUDIO_CONTEXT_TYPE_EMERGENCY_ALARM = BIT(11)
}
 Audio Context Type for Generic Audio. More...
 
enum  bt_audio_parental_rating {
  BT_AUDIO_PARENTAL_RATING_NO_RATING = 0x00 , BT_AUDIO_PARENTAL_RATING_AGE_ANY = 0x01 , BT_AUDIO_PARENTAL_RATING_AGE_5_OR_ABOVE = 0x02 , BT_AUDIO_PARENTAL_RATING_AGE_6_OR_ABOVE = 0x03 ,
  BT_AUDIO_PARENTAL_RATING_AGE_7_OR_ABOVE = 0x04 , BT_AUDIO_PARENTAL_RATING_AGE_8_OR_ABOVE = 0x05 , BT_AUDIO_PARENTAL_RATING_AGE_9_OR_ABOVE = 0x06 , BT_AUDIO_PARENTAL_RATING_AGE_10_OR_ABOVE = 0x07 ,
  BT_AUDIO_PARENTAL_RATING_AGE_11_OR_ABOVE = 0x08 , BT_AUDIO_PARENTAL_RATING_AGE_12_OR_ABOVE = 0x09 , BT_AUDIO_PARENTAL_RATING_AGE_13_OR_ABOVE = 0x0A , BT_AUDIO_PARENTAL_RATING_AGE_14_OR_ABOVE = 0x0B ,
  BT_AUDIO_PARENTAL_RATING_AGE_15_OR_ABOVE = 0x0C , BT_AUDIO_PARENTAL_RATING_AGE_16_OR_ABOVE = 0x0D , BT_AUDIO_PARENTAL_RATING_AGE_17_OR_ABOVE = 0x0E , BT_AUDIO_PARENTAL_RATING_AGE_18_OR_ABOVE = 0x0F
}
 Parental rating defined by the Generic Audio assigned numbers (bluetooth.com). More...
 
enum  bt_audio_active_state { BT_AUDIO_ACTIVE_STATE_DISABLED = 0x00 , BT_AUDIO_ACTIVE_STATE_ENABLED = 0x01 }
 Audio Active State defined by the Generic Audio assigned numbers (bluetooth.com). More...
 
enum  bt_audio_metadata_type {
  BT_AUDIO_METADATA_TYPE_PREF_CONTEXT = 0x01 , BT_AUDIO_METADATA_TYPE_STREAM_CONTEXT = 0x02 , BT_AUDIO_METADATA_TYPE_PROGRAM_INFO = 0x03 , BT_AUDIO_METADATA_TYPE_STREAM_LANG = 0x04 ,
  BT_AUDIO_METADATA_TYPE_CCID_LIST = 0x05 , BT_AUDIO_METADATA_TYPE_PARENTAL_RATING = 0x06 , BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI = 0x07 , BT_AUDIO_METADATA_TYPE_AUDIO_STATE = 0x08 ,
  BT_AUDIO_METADATA_TYPE_BROADCAST_IMMEDIATE = 0x09 , BT_AUDIO_METADATA_TYPE_EXTENDED = 0xFE , BT_AUDIO_METADATA_TYPE_VENDOR = 0xFF
}
 Codec metadata type IDs. More...
 
enum  bt_audio_location {
  BT_AUDIO_LOCATION_PROHIBITED = 0 , BT_AUDIO_LOCATION_FRONT_LEFT = BIT(0) , BT_AUDIO_LOCATION_FRONT_RIGHT = BIT(1) , BT_AUDIO_LOCATION_FRONT_CENTER = BIT(2) ,
  BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_1 = BIT(3) , BT_AUDIO_LOCATION_BACK_LEFT = BIT(4) , BT_AUDIO_LOCATION_BACK_RIGHT = BIT(5) , BT_AUDIO_LOCATION_FRONT_LEFT_OF_CENTER = BIT(6) ,
  BT_AUDIO_LOCATION_FRONT_RIGHT_OF_CENTER = BIT(7) , BT_AUDIO_LOCATION_BACK_CENTER = BIT(8) , BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_2 = BIT(9) , BT_AUDIO_LOCATION_SIDE_LEFT = BIT(10) ,
  BT_AUDIO_LOCATION_SIDE_RIGHT = BIT(11) , BT_AUDIO_LOCATION_TOP_FRONT_LEFT = BIT(12) , BT_AUDIO_LOCATION_TOP_FRONT_RIGHT = BIT(13) , BT_AUDIO_LOCATION_TOP_FRONT_CENTER = BIT(14) ,
  BT_AUDIO_LOCATION_TOP_CENTER = BIT(15) , BT_AUDIO_LOCATION_TOP_BACK_LEFT = BIT(16) , BT_AUDIO_LOCATION_TOP_BACK_RIGHT = BIT(17) , BT_AUDIO_LOCATION_TOP_SIDE_LEFT = BIT(18) ,
  BT_AUDIO_LOCATION_TOP_SIDE_RIGHT = BIT(19) , BT_AUDIO_LOCATION_TOP_BACK_CENTER = BIT(20) , BT_AUDIO_LOCATION_BOTTOM_FRONT_CENTER = BIT(21) , BT_AUDIO_LOCATION_BOTTOM_FRONT_LEFT = BIT(22) ,
  BT_AUDIO_LOCATION_BOTTOM_FRONT_RIGHT = BIT(23) , BT_AUDIO_LOCATION_FRONT_LEFT_WIDE = BIT(24) , BT_AUDIO_LOCATION_FRONT_RIGHT_WIDE = BIT(25) , BT_AUDIO_LOCATION_LEFT_SURROUND = BIT(26) ,
  BT_AUDIO_LOCATION_RIGHT_SURROUND = BIT(27)
}
 Location values for BT Audio. More...
 
enum  bt_audio_dir { BT_AUDIO_DIR_SINK = 0x01 , BT_AUDIO_DIR_SOURCE = 0x02 }
 Audio Capability type. 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_codec_parse_err { BT_AUDIO_CODEC_PARSE_ERR_SUCCESS = 0 , BT_AUDIO_CODEC_PARSE_ERR_TYPE_NOT_FOUND = -1 , BT_AUDIO_CODEC_PARSE_ERR_INVALID_VALUE_FOUND = -2 , BT_AUDIO_CODEC_PARSE_ERR_INVALID_PARAM = -3 }
 Codec parser error codes for Codec config parsing APIs. More...
 

Functions

int bt_audio_unicast_client_register_cb (const struct bt_audio_unicast_client_cb *cb)
 Register unicast client callbacks. More...
 
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...
 
int bt_audio_discover (struct bt_conn *conn, struct bt_audio_discover_params *params)
 Discover remote capabilities and endpoints. More...
 
int bt_audio_stream_config (struct bt_conn *conn, struct bt_audio_stream *stream, struct bt_audio_ep *ep, struct bt_codec *codec)
 Configure Audio Stream. More...
 
int bt_audio_stream_reconfig (struct bt_audio_stream *stream, struct bt_codec *codec)
 Reconfigure Audio Stream. More...
 
int bt_audio_stream_qos (struct bt_conn *conn, struct bt_audio_unicast_group *group)
 Configure Audio Stream QoS. More...
 
int bt_audio_stream_enable (struct bt_audio_stream *stream, struct bt_codec_data *meta, size_t meta_count)
 Enable Audio Stream. More...
 
int bt_audio_stream_metadata (struct bt_audio_stream *stream, struct bt_codec_data *meta, size_t meta_count)
 Change Audio Stream Metadata. More...
 
int bt_audio_stream_disable (struct bt_audio_stream *stream)
 Disable Audio Stream. More...
 
int bt_audio_stream_start (struct bt_audio_stream *stream)
 Start Audio Stream. More...
 
int bt_audio_stream_stop (struct bt_audio_stream *stream)
 Stop Audio Stream. More...
 
int bt_audio_stream_release (struct bt_audio_stream *stream)
 Release Audio Stream. More...
 
int bt_audio_stream_send (struct bt_audio_stream *stream, struct net_buf *buf, uint16_t seq_num, uint32_t ts)
 Send data to Audio stream. More...
 
int bt_audio_unicast_group_create (struct bt_audio_unicast_group_param *param, struct bt_audio_unicast_group **unicast_group)
 Create audio unicast group. More...
 
int bt_audio_unicast_group_add_streams (struct bt_audio_unicast_group *unicast_group, struct bt_audio_unicast_group_stream_pair_param params[], size_t num_param)
 Add streams to a unicast group as a unicast client. More...
 
int bt_audio_unicast_group_delete (struct bt_audio_unicast_group *unicast_group)
 Delete audio unicast group. More...
 
int bt_audio_broadcast_source_create (struct bt_audio_broadcast_source_create_param *param, struct bt_audio_broadcast_source **source)
 Create audio broadcast source. More...
 
int bt_audio_broadcast_source_reconfig (struct bt_audio_broadcast_source *source, struct bt_codec *codec, struct bt_codec_qos *qos)
 Reconfigure audio broadcast source. More...
 
int bt_audio_broadcast_source_update_metadata (struct bt_audio_broadcast_source *source, const struct bt_codec_data meta[], size_t meta_count)
 Modify the metadata of an audio broadcast source. More...
 
int bt_audio_broadcast_source_start (struct bt_audio_broadcast_source *source, struct bt_le_ext_adv *adv)
 Start audio broadcast source. More...
 
int bt_audio_broadcast_source_stop (struct bt_audio_broadcast_source *source)
 Stop audio broadcast source. More...
 
int bt_audio_broadcast_source_delete (struct bt_audio_broadcast_source *source)
 Delete audio broadcast source. More...
 
int bt_audio_broadcast_source_get_id (const struct bt_audio_broadcast_source *source, uint32_t *const broadcast_id)
 Get the broadcast ID of a broadcast source. More...
 
int bt_audio_broadcast_source_get_base (struct bt_audio_broadcast_source *source, struct net_buf_simple *base_buf)
 Get the Broadcast Audio Stream Endpoint of a broadcast source. More...
 
void bt_audio_broadcast_sink_register_cb (struct bt_audio_broadcast_sink_cb *cb)
 Register Broadcast sink callbacks *. More...
 
int bt_audio_broadcast_sink_scan_start (const struct bt_le_scan_param *param)
 Start scan for broadcast sources. More...
 
int bt_audio_broadcast_sink_scan_stop (void)
 Stop scan for broadcast sources. More...
 
int bt_audio_broadcast_sink_sync (struct bt_audio_broadcast_sink *sink, uint32_t indexes_bitfield, struct bt_audio_stream *streams[], const uint8_t broadcast_code[16])
 Sync to a broadcaster's audio. More...
 
int bt_audio_broadcast_sink_stop (struct bt_audio_broadcast_sink *sink)
 Stop audio broadcast sink. More...
 
int bt_audio_broadcast_sink_delete (struct bt_audio_broadcast_sink *sink)
 Release a broadcast sink. More...
 
int bt_codec_cfg_get_freq (const struct bt_codec *codec)
 Extract the frequency from a codec configuration. More...
 
int bt_codec_cfg_get_frame_duration_us (const struct bt_codec *codec)
 Extract frame duration from BT codec config. More...
 
int bt_codec_cfg_get_chan_allocation_val (const struct bt_codec *codec, uint32_t *chan_allocation)
 Extract channel allocation from BT codec config. More...
 
int bt_codec_cfg_get_octets_per_frame (const struct bt_codec *codec)
 Extract frame size in octets from BT codec config. More...
 
int bt_codec_cfg_get_frame_blocks_per_sdu (const struct bt_codec *codec, bool fallback_to_default)
 Extract number of audio frame blockss in each SDU from BT codec config. More...
 
bool bt_codec_get_val (const struct bt_codec *codec, uint8_t type, const struct bt_codec_data **data)
 Lookup a specific value based on type. More...
 

Detailed Description

Bluetooth Audio handling.