Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Bluetooth Audio

Bluetooth Audio . More...

Topics

 Assigned numbers to string API
 Assigned numbers to string API .
 
 Codec capability parsing APIs
 Audio codec capabilities APIs .
 
 Codec config parsing APIs
 Audio codec Config APIs .
 

Data Structures

struct  bt_audio_codec_octets_per_codec_frame
 struct to hold minimum and maximum supported codec frame sizes More...
 
struct  bt_audio_codec_cap
 Codec capability structure. More...
 
struct  bt_audio_codec_cfg
 Codec specific configuration structure. More...
 

Macros

#define BT_AUDIO_BROADCAST_ID_SIZE   3
 Size of the broadcast ID in 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_RTN_PREF_NONE   0xFFU
 Indicates that the unicast server does not have a preference for any retransmission number.
 
#define BT_AUDIO_BROADCAST_NAME_LEN_MIN   4
 The minimum size of a Broadcast Name as defined by Bluetooth Assigned Numbers.
 
#define BT_AUDIO_BROADCAST_NAME_LEN_MAX   128
 The maximum size of a Broadcast Name as defined by Bluetooth Assigned Numbers.
 
#define BT_AUDIO_LANG_SIZE   3
 Size of the stream language value, e.g.
 
#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_MIN   1
 Minimum supported channel counts.
 
#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_MAX   8
 Maximum supported channel counts.
 
#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_SUPPORT(...)
 Channel count support capability.
 
#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_CODEC_DATA(_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.
 

Enumerations

enum  bt_audio_codec_cap_type {
  BT_AUDIO_CODEC_CAP_TYPE_FREQ = 0x01 , BT_AUDIO_CODEC_CAP_TYPE_DURATION = 0x02 , BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT = 0x03 , BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN = 0x04 ,
  BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT = 0x05
}
 Codec capability types. More...
 
enum  bt_audio_codec_cap_freq {
  BT_AUDIO_CODEC_CAP_FREQ_8KHZ = BIT(0) , BT_AUDIO_CODEC_CAP_FREQ_11KHZ = BIT(1) , BT_AUDIO_CODEC_CAP_FREQ_16KHZ = BIT(2) , BT_AUDIO_CODEC_CAP_FREQ_22KHZ = BIT(3) ,
  BT_AUDIO_CODEC_CAP_FREQ_24KHZ = BIT(4) , BT_AUDIO_CODEC_CAP_FREQ_32KHZ = BIT(5) , BT_AUDIO_CODEC_CAP_FREQ_44KHZ = BIT(6) , BT_AUDIO_CODEC_CAP_FREQ_48KHZ = BIT(7) ,
  BT_AUDIO_CODEC_CAP_FREQ_88KHZ = BIT(8) , BT_AUDIO_CODEC_CAP_FREQ_96KHZ = BIT(9) , BT_AUDIO_CODEC_CAP_FREQ_176KHZ = BIT(10) , BT_AUDIO_CODEC_CAP_FREQ_192KHZ = BIT(11) ,
  BT_AUDIO_CODEC_CAP_FREQ_384KHZ = BIT(12) , BT_AUDIO_CODEC_CAP_FREQ_ANY
}
 Supported frequencies bitfield. More...
 
enum  bt_audio_codec_cap_frame_dur {
  BT_AUDIO_CODEC_CAP_DURATION_7_5 = BIT(0) , BT_AUDIO_CODEC_CAP_DURATION_10 = BIT(1) , BT_AUDIO_CODEC_CAP_DURATION_ANY , BT_AUDIO_CODEC_CAP_DURATION_PREFER_7_5 = BIT(4) ,
  BT_AUDIO_CODEC_CAP_DURATION_PREFER_10 = BIT(5)
}
 Supported frame durations bitfield. More...
 
enum  bt_audio_codec_cap_chan_count {
  BT_AUDIO_CODEC_CAP_CHAN_COUNT_1 = BIT(0) , BT_AUDIO_CODEC_CAP_CHAN_COUNT_2 = BIT(1) , BT_AUDIO_CODEC_CAP_CHAN_COUNT_3 = BIT(2) , BT_AUDIO_CODEC_CAP_CHAN_COUNT_4 = BIT(3) ,
  BT_AUDIO_CODEC_CAP_CHAN_COUNT_5 = BIT(4) , BT_AUDIO_CODEC_CAP_CHAN_COUNT_6 = BIT(5) , BT_AUDIO_CODEC_CAP_CHAN_COUNT_7 = BIT(6) , BT_AUDIO_CODEC_CAP_CHAN_COUNT_8 = BIT(7) ,
  BT_AUDIO_CODEC_CAP_CHAN_COUNT_ANY
}
 Supported audio capabilities channel count bitfield. More...
 
enum  bt_audio_codec_cfg_type {
  BT_AUDIO_CODEC_CFG_FREQ = 0x01 , BT_AUDIO_CODEC_CFG_DURATION = 0x02 , BT_AUDIO_CODEC_CFG_CHAN_ALLOC = 0x03 , BT_AUDIO_CODEC_CFG_FRAME_LEN = 0x04 ,
  BT_AUDIO_CODEC_CFG_FRAME_BLKS_PER_SDU = 0x05
}
 Codec configuration types. More...
 
enum  bt_audio_codec_cfg_freq {
  BT_AUDIO_CODEC_CFG_FREQ_8KHZ = 0x01 , BT_AUDIO_CODEC_CFG_FREQ_11KHZ = 0x02 , BT_AUDIO_CODEC_CFG_FREQ_16KHZ = 0x03 , BT_AUDIO_CODEC_CFG_FREQ_22KHZ = 0x04 ,
  BT_AUDIO_CODEC_CFG_FREQ_24KHZ = 0x05 , BT_AUDIO_CODEC_CFG_FREQ_32KHZ = 0x06 , BT_AUDIO_CODEC_CFG_FREQ_44KHZ = 0x07 , BT_AUDIO_CODEC_CFG_FREQ_48KHZ = 0x08 ,
  BT_AUDIO_CODEC_CFG_FREQ_88KHZ = 0x09 , BT_AUDIO_CODEC_CFG_FREQ_96KHZ = 0x0a , BT_AUDIO_CODEC_CFG_FREQ_176KHZ = 0x0b , BT_AUDIO_CODEC_CFG_FREQ_192KHZ = 0x0c ,
  BT_AUDIO_CODEC_CFG_FREQ_384KHZ = 0x0d
}
 Codec configuration sampling freqency. More...
 
enum  bt_audio_codec_cfg_frame_dur { BT_AUDIO_CODEC_CFG_DURATION_7_5 = 0x00 , BT_AUDIO_CODEC_CFG_DURATION_10 = 0x01 }
 Codec configuration frame duration. More...
 
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_assisted_listening_stream { BT_AUDIO_ASSISTED_LISTENING_STREAM_UNSPECIFIED = 0x00 }
 Assisted Listening Stream 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_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_ASSISTED_LISTENING_STREAM = 0x0A , BT_AUDIO_METADATA_TYPE_BROADCAST_NAME = 0x0B , BT_AUDIO_METADATA_TYPE_EXTENDED = 0xFE ,
  BT_AUDIO_METADATA_TYPE_VENDOR = 0xFF
}
 Codec metadata type IDs. More...
 
enum  bt_audio_location {
  BT_AUDIO_LOCATION_MONO_AUDIO = 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 direction from the perspective of the BAP Unicast Server / BAP Broadcast Sink. More...
 

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.
 
int bt_audio_data_get_val (const uint8_t ltv_data[], size_t size, uint8_t type, const uint8_t **data)
 Get the value of a specific data type in an length-type-value data array.
 
uint8_t bt_audio_get_chan_count (enum bt_audio_location chan_allocation)
 Function to get the number of channels from the channel allocation.
 

Unicast Announcement Type

#define BT_AUDIO_UNICAST_ANNOUNCEMENT_GENERAL   0x00
 Unicast Server is connectable and is requesting a connection.
 
#define BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED   0x01
 Unicast Server is connectable but is not requesting a connection.
 

Detailed Description

Bluetooth Audio .

Macro Definition Documentation

◆ BT_AUDIO_BROADCAST_ID_MAX

#define BT_AUDIO_BROADCAST_ID_MAX   0xFFFFFFU

#include <zephyr/bluetooth/audio/audio.h>

Maximum broadcast ID value.

◆ BT_AUDIO_BROADCAST_ID_SIZE

#define BT_AUDIO_BROADCAST_ID_SIZE   3

#include <zephyr/bluetooth/audio/audio.h>

Size of the broadcast ID in octets.

◆ BT_AUDIO_BROADCAST_NAME_LEN_MAX

#define BT_AUDIO_BROADCAST_NAME_LEN_MAX   128

#include <zephyr/bluetooth/audio/audio.h>

The maximum size of a Broadcast Name as defined by Bluetooth Assigned Numbers.

◆ BT_AUDIO_BROADCAST_NAME_LEN_MIN

#define BT_AUDIO_BROADCAST_NAME_LEN_MIN   4

#include <zephyr/bluetooth/audio/audio.h>

The minimum size of a Broadcast Name as defined by Bluetooth Assigned Numbers.

◆ BT_AUDIO_CODEC_CAP

#define BT_AUDIO_CODEC_CAP ( _id,
_cid,
_vid,
_data,
_meta )

#include <zephyr/bluetooth/audio/audio.h>

Value:
((struct bt_audio_codec_cap){ \
/* Use HCI data path as default, can be overwritten by application */ \
.path_id = BT_ISO_DATA_PATH_HCI, \
.ctlr_transcode = false, \
.id = (_id), \
.cid = (_cid), \
.vid = (_vid), \
.data_len = sizeof((uint8_t[])_data), \
.data = _data, \
.meta_len = sizeof((uint8_t[])_meta), \
.meta = _meta, \
})
#define BT_ISO_DATA_PATH_HCI
Value to set the ISO data path over HCi.
Definition iso.h:68
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Codec capability structure.
Definition audio.h:684

Helper to declare Codec capability parsing APIs structure.

Parameters
_idCodec ID
_cidCompany ID
_vidVendor ID
_dataCodec Specific Data in LVT format
_metaCodec Specific Metadata in LVT format

◆ BT_AUDIO_CODEC_CAP_CHAN_COUNT_MAX

#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_MAX   8

#include <zephyr/bluetooth/audio/audio.h>

Maximum supported channel counts.

◆ BT_AUDIO_CODEC_CAP_CHAN_COUNT_MIN

#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_MIN   1

#include <zephyr/bluetooth/audio/audio.h>

Minimum supported channel counts.

◆ BT_AUDIO_CODEC_CAP_CHAN_COUNT_SUPPORT

#define BT_AUDIO_CODEC_CAP_CHAN_COUNT_SUPPORT ( ...)

#include <zephyr/bluetooth/audio/audio.h>

Value:
((enum bt_audio_codec_cap_chan_count)((FOR_EACH(BIT, (|), __VA_ARGS__)) >> 1))
bt_audio_codec_cap_chan_count
Supported audio capabilities channel count bitfield.
Definition audio.h:165
#define FOR_EACH(F, sep,...)
Call a macro F on each provided argument with a given separator between each call.
Definition util_macro.h:481
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44

Channel count support capability.

Macro accepts variable number of channel counts. The allowed channel counts are defined by specification and have to be in range from BT_AUDIO_CODEC_CAP_CHAN_COUNT_MIN to BT_AUDIO_CODEC_CAP_CHAN_COUNT_MAX inclusive.

Example to support 1 and 3 channels: BT_AUDIO_CODEC_CAP_CHAN_COUNT_SUPPORT(1, 3)

◆ BT_AUDIO_CODEC_CFG

#define BT_AUDIO_CODEC_CFG ( _id,
_cid,
_vid,
_data,
_meta )

#include <zephyr/bluetooth/audio/audio.h>

Value:
((struct bt_audio_codec_cfg){ \
/* Use HCI data path as default, can be overwritten by application */ \
.path_id = BT_ISO_DATA_PATH_HCI, \
.ctlr_transcode = false, \
.id = _id, \
.cid = _cid, \
.vid = _vid, \
.data_len = sizeof((uint8_t[])_data), \
.data = _data, \
.meta_len = sizeof((uint8_t[])_meta), \
.meta = _meta, \
})
Codec specific configuration structure.
Definition audio.h:718

Helper to declare Codec config parsing APIs.

Parameters
_idCodec ID
_cidCompany ID
_vidVendor ID
_dataCodec Specific Data in LVT format
_metaCodec Specific Metadata in LVT format

◆ BT_AUDIO_CODEC_DATA

#define BT_AUDIO_CODEC_DATA ( _type,
_bytes... )

#include <zephyr/bluetooth/audio/audio.h>

Value:
(sizeof((uint8_t)_type) + sizeof((uint8_t[]){_bytes})), (_type), _bytes

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.

Parameters
_typeType of advertising data field
_bytesVariable number of single-byte parameters

◆ BT_AUDIO_CONTEXT_TYPE_ANY

#define BT_AUDIO_CONTEXT_TYPE_ANY

#include <zephyr/bluetooth/audio/audio.h>

Value:
@ BT_AUDIO_CONTEXT_TYPE_NOTIFICATIONS
Notification and reminder sounds; attention-seeking audio, for example, in beeps signaling the arriva...
Definition audio.h:341
@ BT_AUDIO_CONTEXT_TYPE_EMERGENCY_ALARM
Emergency alarm Emergency sounds, for example, fire alarms or other urgent alerts.
Definition audio.h:353
@ BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL
Instructional audio, for example, in navigation, announcements, or user guidance.
Definition audio.h:324
@ BT_AUDIO_CONTEXT_TYPE_RINGTONE
Alerts the user to an incoming call, for example, an incoming telephony or video call,...
Definition audio.h:346
@ 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:331
@ BT_AUDIO_CONTEXT_TYPE_MEDIA
Media, for example, music playback, radio, podcast or movie soundtrack, or tv audio.
Definition audio.h:317
@ BT_AUDIO_CONTEXT_TYPE_GAME
Audio associated with video gaming, for example gaming media; gaming effects; music and in-game voice...
Definition audio.h:322
@ BT_AUDIO_CONTEXT_TYPE_SOUND_EFFECTS
Sound effects including keyboard and touch feedback; menu and user interface sounds; and other system...
Definition audio.h:336
@ BT_AUDIO_CONTEXT_TYPE_VOICE_ASSISTANTS
Man-machine communication, for example, with voice recognition or virtual assistants.
Definition audio.h:326
@ BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL
Conversation between humans, for example, in telephony or video calls, including traditional cellular...
Definition audio.h:315
@ BT_AUDIO_CONTEXT_TYPE_ALERTS
Alarms and timers; immediate alerts, for example, in a critical battery alarm, timer expiry or alarm ...
Definition audio.h:351
@ BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED
Identifies audio where the use case context does not match any other defined value,...
Definition audio.h:310

Any known context.

◆ BT_AUDIO_LANG_SIZE

#define BT_AUDIO_LANG_SIZE   3

#include <zephyr/bluetooth/audio/audio.h>

Size of the stream language value, e.g.

"eng"

◆ BT_AUDIO_LOCATION_ANY

#define BT_AUDIO_LOCATION_ANY

#include <zephyr/bluetooth/audio/audio.h>

Value:
@ BT_AUDIO_LOCATION_FRONT_CENTER
Front Center.
Definition audio.h:598
@ BT_AUDIO_LOCATION_TOP_BACK_LEFT
Top Back Left.
Definition audio.h:626
@ BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_2
Low Frequency Effects 2.
Definition audio.h:612
@ BT_AUDIO_LOCATION_TOP_SIDE_RIGHT
Top Side Right.
Definition audio.h:632
@ BT_AUDIO_LOCATION_FRONT_RIGHT
Front Right.
Definition audio.h:596
@ BT_AUDIO_LOCATION_BOTTOM_FRONT_RIGHT
Bottom Front Right.
Definition audio.h:640
@ BT_AUDIO_LOCATION_BACK_RIGHT
Back Right.
Definition audio.h:604
@ BT_AUDIO_LOCATION_TOP_CENTER
Top Center.
Definition audio.h:624
@ BT_AUDIO_LOCATION_LEFT_SURROUND
Left Surround.
Definition audio.h:646
@ BT_AUDIO_LOCATION_TOP_FRONT_RIGHT
Top Front Right.
Definition audio.h:620
@ BT_AUDIO_LOCATION_FRONT_RIGHT_OF_CENTER
Front Right of Center.
Definition audio.h:608
@ BT_AUDIO_LOCATION_FRONT_RIGHT_WIDE
Front Right Wide.
Definition audio.h:644
@ BT_AUDIO_LOCATION_TOP_BACK_RIGHT
Top Back Right.
Definition audio.h:628
@ BT_AUDIO_LOCATION_BACK_LEFT
Back Left.
Definition audio.h:602
@ BT_AUDIO_LOCATION_RIGHT_SURROUND
Right Surround.
Definition audio.h:648
@ BT_AUDIO_LOCATION_SIDE_RIGHT
Side Right.
Definition audio.h:616
@ BT_AUDIO_LOCATION_TOP_FRONT_LEFT
Top Front Left.
Definition audio.h:618
@ BT_AUDIO_LOCATION_SIDE_LEFT
Side Left.
Definition audio.h:614
@ BT_AUDIO_LOCATION_BOTTOM_FRONT_LEFT
Bottom Front Left.
Definition audio.h:638
@ BT_AUDIO_LOCATION_TOP_FRONT_CENTER
Top Front Center.
Definition audio.h:622
@ BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_1
Low Frequency Effects 1.
Definition audio.h:600
@ BT_AUDIO_LOCATION_FRONT_LEFT
Front Left.
Definition audio.h:594
@ BT_AUDIO_LOCATION_FRONT_LEFT_WIDE
Front Left Wide.
Definition audio.h:642
@ BT_AUDIO_LOCATION_BOTTOM_FRONT_CENTER
Bottom Front Center.
Definition audio.h:636
@ BT_AUDIO_LOCATION_BACK_CENTER
Back Center.
Definition audio.h:610
@ BT_AUDIO_LOCATION_TOP_SIDE_LEFT
Top Side Left.
Definition audio.h:630
@ BT_AUDIO_LOCATION_TOP_BACK_CENTER
Top Back Center.
Definition audio.h:634
@ BT_AUDIO_LOCATION_FRONT_LEFT_OF_CENTER
Front Left of Center.
Definition audio.h:606

Any known location.

◆ BT_AUDIO_METADATA_TYPE_IS_KNOWN

#define BT_AUDIO_METADATA_TYPE_IS_KNOWN ( _type)

#include <zephyr/bluetooth/audio/audio.h>

Value:
@ BT_AUDIO_METADATA_TYPE_EXTENDED
Extended metadata.
Definition audio.h:502
@ BT_AUDIO_METADATA_TYPE_VENDOR
Vendor specific metadata.
Definition audio.h:505
@ BT_AUDIO_METADATA_TYPE_BROADCAST_IMMEDIATE
Broadcast Audio Immediate Rendering flag
Definition audio.h:489
@ BT_AUDIO_METADATA_TYPE_PREF_CONTEXT
Preferred audio context.
Definition audio.h:443
#define IN_RANGE(val, min, max)
Checks if a value is within range.
Definition util.h:431

Helper to check whether metadata type is known by the stack.

Note
_type is evaluated thrice.

◆ BT_AUDIO_PD_MAX

#define BT_AUDIO_PD_MAX   0xFFFFFFU

#include <zephyr/bluetooth/audio/audio.h>

Maximum presentation delay in microseconds.

◆ BT_AUDIO_PD_PREF_NONE

#define BT_AUDIO_PD_PREF_NONE   0x000000U

#include <zephyr/bluetooth/audio/audio.h>

Indicates that the server have no preference for the presentation delay.

◆ BT_AUDIO_RTN_PREF_NONE

#define BT_AUDIO_RTN_PREF_NONE   0xFFU

#include <zephyr/bluetooth/audio/audio.h>

Indicates that the unicast server does not have a preference for any retransmission number.

◆ BT_AUDIO_UNICAST_ANNOUNCEMENT_GENERAL

#define BT_AUDIO_UNICAST_ANNOUNCEMENT_GENERAL   0x00

#include <zephyr/bluetooth/audio/audio.h>

Unicast Server is connectable and is requesting a connection.

◆ BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED

#define BT_AUDIO_UNICAST_ANNOUNCEMENT_TARGETED   0x01

#include <zephyr/bluetooth/audio/audio.h>

Unicast Server is connectable but is not requesting a connection.

Enumeration Type Documentation

◆ bt_audio_active_state

#include <zephyr/bluetooth/audio/audio.h>

Audio Active State defined by the Generic Audio assigned numbers (bluetooth.com).

Enumerator
BT_AUDIO_ACTIVE_STATE_DISABLED 

No audio data is being transmitted.

BT_AUDIO_ACTIVE_STATE_ENABLED 

Audio data is being transmitted.

◆ bt_audio_assisted_listening_stream

#include <zephyr/bluetooth/audio/audio.h>

Assisted Listening Stream defined by the Generic Audio assigned numbers (bluetooth.com).

Enumerator
BT_AUDIO_ASSISTED_LISTENING_STREAM_UNSPECIFIED 

Unspecified audio enhancement.

◆ bt_audio_codec_cap_chan_count

#include <zephyr/bluetooth/audio/audio.h>

Supported audio capabilities channel count bitfield.

Enumerator
BT_AUDIO_CODEC_CAP_CHAN_COUNT_1 

Supporting 1 channel.

BT_AUDIO_CODEC_CAP_CHAN_COUNT_2 

Supporting 2 channel.

BT_AUDIO_CODEC_CAP_CHAN_COUNT_3 

Supporting 3 channel.

BT_AUDIO_CODEC_CAP_CHAN_COUNT_4 

Supporting 4 channel.

BT_AUDIO_CODEC_CAP_CHAN_COUNT_5 

Supporting 5 channel.

BT_AUDIO_CODEC_CAP_CHAN_COUNT_6 

Supporting 6 channel.

BT_AUDIO_CODEC_CAP_CHAN_COUNT_7 

Supporting 7 channel.

BT_AUDIO_CODEC_CAP_CHAN_COUNT_8 

Supporting 8 channel.

BT_AUDIO_CODEC_CAP_CHAN_COUNT_ANY 

Supporting all channels.

◆ bt_audio_codec_cap_frame_dur

#include <zephyr/bluetooth/audio/audio.h>

Supported frame durations bitfield.

Enumerator
BT_AUDIO_CODEC_CAP_DURATION_7_5 

7.5 msec frame duration capability

BT_AUDIO_CODEC_CAP_DURATION_10 

10 msec frame duration capability

BT_AUDIO_CODEC_CAP_DURATION_ANY 

Any frame duration capability.

BT_AUDIO_CODEC_CAP_DURATION_PREFER_7_5 

7.5 msec preferred frame duration capability.

This shall only be set if BT_AUDIO_CODEC_CAP_DURATION_7_5 is also set, and if BT_AUDIO_CODEC_CAP_DURATION_PREFER_10 is not set.

BT_AUDIO_CODEC_CAP_DURATION_PREFER_10 

10 msec preferred frame duration capability

This shall only be set if BT_AUDIO_CODEC_CAP_DURATION_10 is also set, and if BT_AUDIO_CODEC_CAP_DURATION_PREFER_7_5 is not set.

◆ bt_audio_codec_cap_freq

#include <zephyr/bluetooth/audio/audio.h>

Supported frequencies bitfield.

Enumerator
BT_AUDIO_CODEC_CAP_FREQ_8KHZ 

8 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_11KHZ 

11.025 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_16KHZ 

16 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_22KHZ 

22.05 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_24KHZ 

24 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_32KHZ 

32 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_44KHZ 

44.1 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_48KHZ 

48 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_88KHZ 

88.2 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_96KHZ 

96 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_176KHZ 

176.4 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_192KHZ 

192 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_384KHZ 

384 Khz sampling frequency

BT_AUDIO_CODEC_CAP_FREQ_ANY 

Any frequency capability.

◆ bt_audio_codec_cap_type

#include <zephyr/bluetooth/audio/audio.h>

Codec capability types.

Used to build and parse codec capabilities as specified in the PAC specification. Source is assigned numbers for Generic Audio, bluetooth.com.

Enumerator
BT_AUDIO_CODEC_CAP_TYPE_FREQ 

Supported sampling frequencies.

BT_AUDIO_CODEC_CAP_TYPE_DURATION 

Supported frame durations.

BT_AUDIO_CODEC_CAP_TYPE_CHAN_COUNT 

Supported audio channel counts.

BT_AUDIO_CODEC_CAP_TYPE_FRAME_LEN 

Supported octets per codec frame.

BT_AUDIO_CODEC_CAP_TYPE_FRAME_COUNT 

Supported maximum codec frames per SDU

◆ bt_audio_codec_cfg_frame_dur

#include <zephyr/bluetooth/audio/audio.h>

Codec configuration frame duration.

Enumerator
BT_AUDIO_CODEC_CFG_DURATION_7_5 

7.5 msec Frame Duration configuration

BT_AUDIO_CODEC_CFG_DURATION_10 

10 msec Frame Duration configuration

◆ bt_audio_codec_cfg_freq

#include <zephyr/bluetooth/audio/audio.h>

Codec configuration sampling freqency.

Enumerator
BT_AUDIO_CODEC_CFG_FREQ_8KHZ 

8 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_11KHZ 

11.025 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_16KHZ 

16 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_22KHZ 

22.05 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_24KHZ 

24 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_32KHZ 

32 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_44KHZ 

44.1 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_48KHZ 

48 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_88KHZ 

88.2 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_96KHZ 

96 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_176KHZ 

176.4 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_192KHZ 

192 Khz codec sampling frequency

BT_AUDIO_CODEC_CFG_FREQ_384KHZ 

384 Khz codec sampling frequency

◆ bt_audio_codec_cfg_type

#include <zephyr/bluetooth/audio/audio.h>

Codec configuration types.

Used to build and parse codec configurations as specified in the ASCS and BAP specifications. Source is assigned numbers for Generic Audio, bluetooth.com.

Enumerator
BT_AUDIO_CODEC_CFG_FREQ 

Sampling frequency.

BT_AUDIO_CODEC_CFG_DURATION 

Frame duration.

BT_AUDIO_CODEC_CFG_CHAN_ALLOC 

Audio channel allocation.

BT_AUDIO_CODEC_CFG_FRAME_LEN 

Octets per codec frame.

BT_AUDIO_CODEC_CFG_FRAME_BLKS_PER_SDU 

Codec frame blocks per SDU.

◆ bt_audio_context

#include <zephyr/bluetooth/audio/audio.h>

Audio Context Type for Generic Audio.

These values are defined by the Generic Audio Assigned Numbers, bluetooth.com

Enumerator
BT_AUDIO_CONTEXT_TYPE_PROHIBITED 

Prohibited.

BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED 

Identifies audio where the use case context does not match any other defined value, or where the context is unknown or cannot be determined.

BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL 

Conversation between humans, for example, in telephony or video calls, including traditional cellular as well as VoIP and Push-to-Talk.

BT_AUDIO_CONTEXT_TYPE_MEDIA 

Media, for example, music playback, radio, podcast or movie soundtrack, or tv audio.

BT_AUDIO_CONTEXT_TYPE_GAME 

Audio associated with video gaming, for example gaming media; gaming effects; music and in-game voice chat between participants; or a mix of all the above.

BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL 

Instructional audio, for example, in navigation, announcements, or user guidance.

BT_AUDIO_CONTEXT_TYPE_VOICE_ASSISTANTS 

Man-machine communication, for example, with voice recognition or virtual assistants.

BT_AUDIO_CONTEXT_TYPE_LIVE 

Live audio, for example, from a microphone where audio is perceived both through a direct acoustic path and through an LE Audio Stream.

BT_AUDIO_CONTEXT_TYPE_SOUND_EFFECTS 

Sound effects including keyboard and touch feedback; menu and user interface sounds; and other system sounds.

BT_AUDIO_CONTEXT_TYPE_NOTIFICATIONS 

Notification and reminder sounds; attention-seeking audio, for example, in beeps signaling the arrival of a message.

BT_AUDIO_CONTEXT_TYPE_RINGTONE 

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.

BT_AUDIO_CONTEXT_TYPE_ALERTS 

Alarms and timers; immediate alerts, for example, in a critical battery alarm, timer expiry or alarm clock, toaster, cooker, kettle, microwave, etc.

BT_AUDIO_CONTEXT_TYPE_EMERGENCY_ALARM 

Emergency alarm Emergency sounds, for example, fire alarms or other urgent alerts.

◆ bt_audio_dir

#include <zephyr/bluetooth/audio/audio.h>

Audio direction from the perspective of the BAP Unicast Server / BAP Broadcast Sink.

Enumerator
BT_AUDIO_DIR_SINK 

Audio direction sink.

For a BAP Unicast Client or Broadcast Source this is considered outgoing audio (TX). For a BAP Unicast Server or Broadcast Sink this is considered incoming audio (RX).

BT_AUDIO_DIR_SOURCE 

Audio direction source.

For a BAP Unicast Client or Broadcast Source this is considered incoming audio (RX). For a BAP Unicast Server or Broadcast Sink this is considered outgoing audio (TX).

◆ bt_audio_location

#include <zephyr/bluetooth/audio/audio.h>

Location values for BT Audio.

These values are defined by the Generic Audio Assigned Numbers, bluetooth.com

Enumerator
BT_AUDIO_LOCATION_MONO_AUDIO 

Mono Audio (no specified Audio Location)

BT_AUDIO_LOCATION_FRONT_LEFT 

Front Left.

BT_AUDIO_LOCATION_FRONT_RIGHT 

Front Right.

BT_AUDIO_LOCATION_FRONT_CENTER 

Front Center.

BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_1 

Low Frequency Effects 1.

BT_AUDIO_LOCATION_BACK_LEFT 

Back Left.

BT_AUDIO_LOCATION_BACK_RIGHT 

Back Right.

BT_AUDIO_LOCATION_FRONT_LEFT_OF_CENTER 

Front Left of Center.

BT_AUDIO_LOCATION_FRONT_RIGHT_OF_CENTER 

Front Right of Center.

BT_AUDIO_LOCATION_BACK_CENTER 

Back Center.

BT_AUDIO_LOCATION_LOW_FREQ_EFFECTS_2 

Low Frequency Effects 2.

BT_AUDIO_LOCATION_SIDE_LEFT 

Side Left.

BT_AUDIO_LOCATION_SIDE_RIGHT 

Side Right.

BT_AUDIO_LOCATION_TOP_FRONT_LEFT 

Top Front Left.

BT_AUDIO_LOCATION_TOP_FRONT_RIGHT 

Top Front Right.

BT_AUDIO_LOCATION_TOP_FRONT_CENTER 

Top Front Center.

BT_AUDIO_LOCATION_TOP_CENTER 

Top Center.

BT_AUDIO_LOCATION_TOP_BACK_LEFT 

Top Back Left.

BT_AUDIO_LOCATION_TOP_BACK_RIGHT 

Top Back Right.

BT_AUDIO_LOCATION_TOP_SIDE_LEFT 

Top Side Left.

BT_AUDIO_LOCATION_TOP_SIDE_RIGHT 

Top Side Right.

BT_AUDIO_LOCATION_TOP_BACK_CENTER 

Top Back Center.

BT_AUDIO_LOCATION_BOTTOM_FRONT_CENTER 

Bottom Front Center.

BT_AUDIO_LOCATION_BOTTOM_FRONT_LEFT 

Bottom Front Left.

BT_AUDIO_LOCATION_BOTTOM_FRONT_RIGHT 

Bottom Front Right.

BT_AUDIO_LOCATION_FRONT_LEFT_WIDE 

Front Left Wide.

BT_AUDIO_LOCATION_FRONT_RIGHT_WIDE 

Front Right Wide.

BT_AUDIO_LOCATION_LEFT_SURROUND 

Left Surround.

BT_AUDIO_LOCATION_RIGHT_SURROUND 

Right Surround.

◆ bt_audio_metadata_type

#include <zephyr/bluetooth/audio/audio.h>

Codec metadata type IDs.

Metadata types defined by the Generic Audio assigned numbers (bluetooth.com).

Enumerator
BT_AUDIO_METADATA_TYPE_PREF_CONTEXT 

Preferred audio context.

Bitfield of preferred audio contexts.

If 0, the context type is not a preferred use case for this codec configuration.

See the BT_AUDIO_CONTEXT_* for valid values.

BT_AUDIO_METADATA_TYPE_STREAM_CONTEXT 

Streaming audio context.

Bitfield of streaming audio contexts.

If 0, the context type is not a preferred use case for this codec configuration.

See the BT_AUDIO_CONTEXT_* for valid values.

BT_AUDIO_METADATA_TYPE_PROGRAM_INFO 

UTF-8 encoded title or summary of stream content.

BT_AUDIO_METADATA_TYPE_LANG 

Language.

3 octet lower case language code defined by ISO 639-3 Possible values can be found at https://iso639-3.sil.org/code_tables/639/data

BT_AUDIO_METADATA_TYPE_CCID_LIST 

Array of 8-bit CCID values.

BT_AUDIO_METADATA_TYPE_PARENTAL_RATING 

Parental rating.

See bt_audio_parental_rating for valid values.

BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI 

UTF-8 encoded URI for additional Program information.

BT_AUDIO_METADATA_TYPE_AUDIO_STATE 

Audio active state.

See bt_audio_active_state for valid values.

BT_AUDIO_METADATA_TYPE_BROADCAST_IMMEDIATE 

Broadcast Audio Immediate Rendering flag

BT_AUDIO_METADATA_TYPE_ASSISTED_LISTENING_STREAM 

Assisted listening stream.

See bt_audio_assisted_listening_stream for valid values.

BT_AUDIO_METADATA_TYPE_BROADCAST_NAME 

UTF-8 encoded Broadcast name.

BT_AUDIO_METADATA_TYPE_EXTENDED 

Extended metadata.

BT_AUDIO_METADATA_TYPE_VENDOR 

Vendor specific metadata.

◆ bt_audio_parental_rating

#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.

Enumerator
BT_AUDIO_PARENTAL_RATING_NO_RATING 

No rating.

BT_AUDIO_PARENTAL_RATING_AGE_ANY 

For all ages.

BT_AUDIO_PARENTAL_RATING_AGE_5_OR_ABOVE 

Recommended for listeners of age 5 and above.

BT_AUDIO_PARENTAL_RATING_AGE_6_OR_ABOVE 

Recommended for listeners of age 6 and above.

BT_AUDIO_PARENTAL_RATING_AGE_7_OR_ABOVE 

Recommended for listeners of age 7 and above.

BT_AUDIO_PARENTAL_RATING_AGE_8_OR_ABOVE 

Recommended for listeners of age 8 and above.

BT_AUDIO_PARENTAL_RATING_AGE_9_OR_ABOVE 

Recommended for listeners of age 9 and above.

BT_AUDIO_PARENTAL_RATING_AGE_10_OR_ABOVE 

Recommended for listeners of age 10 and above.

BT_AUDIO_PARENTAL_RATING_AGE_11_OR_ABOVE 

Recommended for listeners of age 11 and above.

BT_AUDIO_PARENTAL_RATING_AGE_12_OR_ABOVE 

Recommended for listeners of age 12 and above.

BT_AUDIO_PARENTAL_RATING_AGE_13_OR_ABOVE 

Recommended for listeners of age 13 and above.

BT_AUDIO_PARENTAL_RATING_AGE_14_OR_ABOVE 

Recommended for listeners of age 14 and above.

BT_AUDIO_PARENTAL_RATING_AGE_15_OR_ABOVE 

Recommended for listeners of age 15 and above.

BT_AUDIO_PARENTAL_RATING_AGE_16_OR_ABOVE 

Recommended for listeners of age 16 and above.

BT_AUDIO_PARENTAL_RATING_AGE_17_OR_ABOVE 

Recommended for listeners of age 17 and above.

BT_AUDIO_PARENTAL_RATING_AGE_18_OR_ABOVE 

Recommended for listeners of age 18 and above.

Function Documentation

◆ bt_audio_data_get_val()

int bt_audio_data_get_val ( const uint8_t ltv_data[],
size_t size,
uint8_t type,
const uint8_t ** data )

#include <zephyr/bluetooth/audio/audio.h>

Get the value of a specific data type in an length-type-value data array.

Parameters
[in]ltv_dataThe array containing the length-type-value tuples
[in]sizeThe size of ltv_data
[in]typeThe type to get the value for. May be any type, but typically either bt_audio_codec_cap_type, bt_audio_codec_cfg_type or bt_audio_metadata_type.
[out]dataPointer to the data-pointer to update when item is found. Any found data will be little endian.
Return values
LengthThe length of found data (may be 0).
-EINVALif arguments are invalid
-ENODATAif not found

◆ bt_audio_data_parse()

int bt_audio_data_parse ( const uint8_t ltv[],
size_t size,
bool(* func )(struct bt_data *data, void *user_data),
void * user_data )

#include <zephyr/bluetooth/audio/audio.h>

Helper for parsing length-type-value data.

Parameters
ltvLength-type-value (LTV) encoded data.
sizeSize of the ltv data.
funcCallback 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_dataUser data to be passed to the callback.
Return values
0if all entries were parsed.
-EINVALif the data is incorrectly encoded
-ECANCELEDif parsing was prematurely cancelled by the callback

◆ bt_audio_get_chan_count()

uint8_t bt_audio_get_chan_count ( enum bt_audio_location chan_allocation)

#include <zephyr/bluetooth/audio/audio.h>

Function to get the number of channels from the channel allocation.

Parameters
chan_allocationThe channel allocation
Returns
The number of channels