Zephyr API Documentation
3.6.99
A Scalable Open Source RTOS
|
Audio codec capabilities APIs. More...
Functions | |
int | bt_audio_codec_cap_get_val (const struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_type type, const uint8_t **data) |
Lookup a specific value based on type. | |
int | bt_audio_codec_cap_set_val (struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_type type, const uint8_t *data, size_t data_len) |
Set or add a specific codec capability value. | |
int | bt_audio_codec_cap_unset_val (struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_type type) |
Unset a specific codec capability value. | |
int | bt_audio_codec_cap_get_freq (const struct bt_audio_codec_cap *codec_cap) |
Extract the frequency from a codec capability. | |
int | bt_audio_codec_cap_set_freq (struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_freq freq) |
Set the supported frequencies of a codec capability. | |
int | bt_audio_codec_cap_get_frame_dur (const struct bt_audio_codec_cap *codec_cap) |
Extract the frequency from a codec capability. | |
int | bt_audio_codec_cap_set_frame_dur (struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_frame_dur frame_dur) |
Set the frame duration of a codec capability. | |
int | bt_audio_codec_cap_get_supported_audio_chan_counts (const struct bt_audio_codec_cap *codec_cap) |
Extract the frequency from a codec capability. | |
int | bt_audio_codec_cap_set_supported_audio_chan_counts (struct bt_audio_codec_cap *codec_cap, enum bt_audio_codec_cap_chan_count chan_count) |
Set the channel count of a codec capability. | |
int | bt_audio_codec_cap_get_octets_per_frame (const struct bt_audio_codec_cap *codec_cap, struct bt_audio_codec_octets_per_codec_frame *codec_frame) |
Extract the supported octets per codec frame from a codec capability. | |
int | bt_audio_codec_cap_set_octets_per_frame (struct bt_audio_codec_cap *codec_cap, const struct bt_audio_codec_octets_per_codec_frame *codec_frame) |
Set the octets per codec frame of a codec capability. | |
int | bt_audio_codec_cap_get_max_codec_frames_per_sdu (const struct bt_audio_codec_cap *codec_cap) |
Extract the maximum codec frames per SDU from a codec capability. | |
int | bt_audio_codec_cap_set_max_codec_frames_per_sdu (struct bt_audio_codec_cap *codec_cap, uint8_t codec_frames_per_sdu) |
Set the maximum codec frames per SDU of a codec capability. | |
int | bt_audio_codec_cap_meta_get_val (const struct bt_audio_codec_cap *codec_cap, uint8_t type, const uint8_t **data) |
Lookup a specific metadata value based on type. | |
int | bt_audio_codec_cap_meta_set_val (struct bt_audio_codec_cap *codec_cap, enum bt_audio_metadata_type type, const uint8_t *data, size_t data_len) |
Set or add a specific codec capability metadata value. | |
int | bt_audio_codec_cap_meta_unset_val (struct bt_audio_codec_cap *codec_cap, enum bt_audio_metadata_type type) |
Unset a specific codec capability metadata value. | |
int | bt_audio_codec_cap_meta_get_pref_context (const struct bt_audio_codec_cap *codec_cap) |
Extract preferred contexts. | |
int | bt_audio_codec_cap_meta_set_pref_context (struct bt_audio_codec_cap *codec_cap, enum bt_audio_context ctx) |
Set the preferred context of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_stream_context (const struct bt_audio_codec_cap *codec_cap) |
Extract stream contexts. | |
int | bt_audio_codec_cap_meta_set_stream_context (struct bt_audio_codec_cap *codec_cap, enum bt_audio_context ctx) |
Set the stream context of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_program_info (const struct bt_audio_codec_cap *codec_cap, const uint8_t **program_info) |
Extract program info. | |
int | bt_audio_codec_cap_meta_set_program_info (struct bt_audio_codec_cap *codec_cap, const uint8_t *program_info, size_t program_info_len) |
Set the program info of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_stream_lang (const struct bt_audio_codec_cap *codec_cap) |
Extract stream language. | |
int | bt_audio_codec_cap_meta_set_stream_lang (struct bt_audio_codec_cap *codec_cap, uint32_t stream_lang) |
Set the stream language of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_ccid_list (const struct bt_audio_codec_cap *codec_cap, const uint8_t **ccid_list) |
Extract CCID list. | |
int | bt_audio_codec_cap_meta_set_ccid_list (struct bt_audio_codec_cap *codec_cap, const uint8_t *ccid_list, size_t ccid_list_len) |
Set the CCID list of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_parental_rating (const struct bt_audio_codec_cap *codec_cap) |
Extract parental rating. | |
int | bt_audio_codec_cap_meta_set_parental_rating (struct bt_audio_codec_cap *codec_cap, enum bt_audio_parental_rating parental_rating) |
Set the parental rating of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_program_info_uri (const struct bt_audio_codec_cap *codec_cap, const uint8_t **program_info_uri) |
Extract program info URI. | |
int | bt_audio_codec_cap_meta_set_program_info_uri (struct bt_audio_codec_cap *codec_cap, const uint8_t *program_info_uri, size_t program_info_uri_len) |
Set the program info URI of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_audio_active_state (const struct bt_audio_codec_cap *codec_cap) |
Extract audio active state. | |
int | bt_audio_codec_cap_meta_set_audio_active_state (struct bt_audio_codec_cap *codec_cap, enum bt_audio_active_state state) |
Set the audio active state of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_bcast_audio_immediate_rend_flag (const struct bt_audio_codec_cap *codec_cap) |
Extract broadcast audio immediate rendering flag. | |
int | bt_audio_codec_cap_meta_set_bcast_audio_immediate_rend_flag (struct bt_audio_codec_cap *codec_cap) |
Set the broadcast audio immediate rendering flag of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_extended (const struct bt_audio_codec_cap *codec_cap, const uint8_t **extended_meta) |
Extract extended metadata. | |
int | bt_audio_codec_cap_meta_set_extended (struct bt_audio_codec_cap *codec_cap, const uint8_t *extended_meta, size_t extended_meta_len) |
Set the extended metadata of a codec capability metadata. | |
int | bt_audio_codec_cap_meta_get_vendor (const struct bt_audio_codec_cap *codec_cap, const uint8_t **vendor_meta) |
Extract vendor specific metadata. | |
int | bt_audio_codec_cap_meta_set_vendor (struct bt_audio_codec_cap *codec_cap, const uint8_t *vendor_meta, size_t vendor_meta_len) |
Set the vendor specific metadata of a codec capability metadata. | |
Audio codec capabilities APIs.
Functions to parse codec capability data when formatted as LTV wrapped into Codec capability parsing APIs.
int bt_audio_codec_cap_get_frame_dur | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract the frequency from a codec capability.
codec_cap | The codec capabilities to extract data from. |
Bitfield | of supported frame durations if 0 or positive |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size or value |
int bt_audio_codec_cap_get_freq | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract the frequency from a codec capability.
codec_cap | The codec capabilities to extract data from. |
Bitfield | of supported frequencies (bt_audio_codec_cap_freq) if 0 or positive |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size or value |
int bt_audio_codec_cap_get_max_codec_frames_per_sdu | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract the maximum codec frames per SDU from a codec capability.
codec_cap | The codec capabilities to extract data from. |
Maximum | number of codec frames per SDU supported |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size or value |
int bt_audio_codec_cap_get_octets_per_frame | ( | const struct bt_audio_codec_cap * | codec_cap, |
struct bt_audio_codec_octets_per_codec_frame * | codec_frame | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Extract the supported octets per codec frame from a codec capability.
[in] | codec_cap | The codec capabilities to extract data from. |
[out] | codec_frame | Struct to place the resulting values in |
0 | on success |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size or value |
int bt_audio_codec_cap_get_supported_audio_chan_counts | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract the frequency from a codec capability.
codec_cap | The codec capabilities to extract data from. |
Bitfield | of supported channel counts if 0 or positive |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size or value |
int bt_audio_codec_cap_get_val | ( | const struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_codec_cap_type | type, | ||
const uint8_t ** | data | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Lookup a specific value based on type.
[in] | codec_cap | The codec data to search in. |
[in] | type | The type id to look for |
[out] | data | Pointer to the data-pointer to update when item is found |
Length | of found data (may be 0) |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
int bt_audio_codec_cap_meta_get_audio_active_state | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract audio active state.
See BT_AUDIO_METADATA_TYPE_AUDIO_STATE for more information about this value.
codec_cap | The codec data to search in. |
The | preferred context type if positive or 0 |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size |
int bt_audio_codec_cap_meta_get_bcast_audio_immediate_rend_flag | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract broadcast audio immediate rendering flag.
See BT_AUDIO_METADATA_TYPE_BROADCAST_IMMEDIATE for more information about this value.
codec_cap | The codec data to search in. |
0 | if the flag was found |
-EINVAL | if arguments are invalid |
-ENODATA | if not the flag was not found |
int bt_audio_codec_cap_meta_get_ccid_list | ( | const struct bt_audio_codec_cap * | codec_cap, |
const uint8_t ** | ccid_list | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Extract CCID list.
See BT_AUDIO_METADATA_TYPE_CCID_LIST for more information about this value.
[in] | codec_cap | The codec data to search in. |
[out] | ccid_list | Pointer to the array containing 8-bit CCIDs. |
The | length of the ccid_list (may be 0) |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
int bt_audio_codec_cap_meta_get_extended | ( | const struct bt_audio_codec_cap * | codec_cap, |
const uint8_t ** | extended_meta | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Extract extended metadata.
See BT_AUDIO_METADATA_TYPE_EXTENDED for more information about this value.
[in] | codec_cap | The codec data to search in. |
[out] | extended_meta | Pointer to the extended metadata. |
The | length of the ccid_list (may be 0) |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
int bt_audio_codec_cap_meta_get_parental_rating | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract parental rating.
See BT_AUDIO_METADATA_TYPE_PARENTAL_RATING for more information about this value.
codec_cap | The codec data to search in. |
The | parental rating if positive or 0 |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size |
int bt_audio_codec_cap_meta_get_pref_context | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract preferred contexts.
See BT_AUDIO_METADATA_TYPE_PREF_CONTEXT for more information about this value.
codec_cap | The codec data to search in. |
The | preferred context type if positive or 0 |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size |
int bt_audio_codec_cap_meta_get_program_info | ( | const struct bt_audio_codec_cap * | codec_cap, |
const uint8_t ** | program_info | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Extract program info.
See BT_AUDIO_METADATA_TYPE_PROGRAM_INFO for more information about this value.
[in] | codec_cap | The codec data to search in. |
[out] | program_info | Pointer to the UTF-8 formatted program info. |
The | length of the program_info (may be 0) |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
int bt_audio_codec_cap_meta_get_program_info_uri | ( | const struct bt_audio_codec_cap * | codec_cap, |
const uint8_t ** | program_info_uri | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Extract program info URI.
See BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI for more information about this value.
[in] | codec_cap | The codec data to search in. |
[out] | program_info_uri | Pointer to the UTF-8 formatted program info URI. |
The | length of the ccid_list (may be 0) |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
int bt_audio_codec_cap_meta_get_stream_context | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract stream contexts.
See BT_AUDIO_METADATA_TYPE_STREAM_CONTEXT for more information about this value.
codec_cap | The codec data to search in. |
The | stream context type if positive or 0 |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size |
int bt_audio_codec_cap_meta_get_stream_lang | ( | const struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Extract stream language.
See BT_AUDIO_METADATA_TYPE_STREAM_LANG for more information about this value.
codec_cap | The codec data to search in. |
The | stream language if positive or 0 |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
-EBADMSG | if found value has invalid size |
int bt_audio_codec_cap_meta_get_val | ( | const struct bt_audio_codec_cap * | codec_cap, |
uint8_t | type, | ||
const uint8_t ** | data | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Lookup a specific metadata value based on type.
[in] | codec_cap | The codec data to search in. |
[in] | type | The type id to look for |
[out] | data | Pointer to the data-pointer to update when item is found |
Length | of found data (may be 0) |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
int bt_audio_codec_cap_meta_get_vendor | ( | const struct bt_audio_codec_cap * | codec_cap, |
const uint8_t ** | vendor_meta | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Extract vendor specific metadata.
See BT_AUDIO_METADATA_TYPE_VENDOR for more information about this value.
[in] | codec_cap | The codec data to search in. |
[out] | vendor_meta | Pointer to the vendor specific metadata. |
The | length of the ccid_list (may be 0) |
-EINVAL | if arguments are invalid |
-ENODATA | if not found |
int bt_audio_codec_cap_meta_set_audio_active_state | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_active_state | state | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the audio active state of a codec capability metadata.
codec_cap | The codec capability to set data for. |
state | The audio active state to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_bcast_audio_immediate_rend_flag | ( | struct bt_audio_codec_cap * | codec_cap | ) |
#include <zephyr/bluetooth/audio/audio.h>
Set the broadcast audio immediate rendering flag of a codec capability metadata.
codec_cap | The codec capability to set data for. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_ccid_list | ( | struct bt_audio_codec_cap * | codec_cap, |
const uint8_t * | ccid_list, | ||
size_t | ccid_list_len | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the CCID list of a codec capability metadata.
codec_cap | The codec capability to set data for. |
ccid_list | The program info to set. |
ccid_list_len | The length of ccid_list . |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_extended | ( | struct bt_audio_codec_cap * | codec_cap, |
const uint8_t * | extended_meta, | ||
size_t | extended_meta_len | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the extended metadata of a codec capability metadata.
codec_cap | The codec capability to set data for. |
extended_meta | The extended metadata to set. |
extended_meta_len | The length of extended_meta . |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_parental_rating | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_parental_rating | parental_rating | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the parental rating of a codec capability metadata.
codec_cap | The codec capability to set data for. |
parental_rating | The parental rating to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_pref_context | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_context | ctx | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the preferred context of a codec capability metadata.
codec_cap | The codec capability to set data for. |
ctx | The preferred context to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_program_info | ( | struct bt_audio_codec_cap * | codec_cap, |
const uint8_t * | program_info, | ||
size_t | program_info_len | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the program info of a codec capability metadata.
codec_cap | The codec capability to set data for. |
program_info | The program info to set. |
program_info_len | The length of program_info . |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_program_info_uri | ( | struct bt_audio_codec_cap * | codec_cap, |
const uint8_t * | program_info_uri, | ||
size_t | program_info_uri_len | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the program info URI of a codec capability metadata.
codec_cap | The codec capability to set data for. |
program_info_uri | The program info URI to set. |
program_info_uri_len | The length of program_info_uri . |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_stream_context | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_context | ctx | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the stream context of a codec capability metadata.
codec_cap | The codec capability to set data for. |
ctx | The stream context to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_stream_lang | ( | struct bt_audio_codec_cap * | codec_cap, |
uint32_t | stream_lang | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the stream language of a codec capability metadata.
codec_cap | The codec capability to set data for. |
stream_lang | The 24-bit stream language to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_val | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_metadata_type | type, | ||
const uint8_t * | data, | ||
size_t | data_len | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set or add a specific codec capability metadata value.
codec_cap | The codec capability to set the value in. |
type | The type id to set. |
data | Pointer to the data-pointer to set. |
data_len | Length of data . |
The | meta_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_set_vendor | ( | struct bt_audio_codec_cap * | codec_cap, |
const uint8_t * | vendor_meta, | ||
size_t | vendor_meta_len | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the vendor specific metadata of a codec capability metadata.
codec_cap | The codec capability to set data for. |
vendor_meta | The vendor specific metadata to set. |
vendor_meta_len | The length of vendor_meta . |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_meta_unset_val | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_metadata_type | type | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Unset a specific codec capability metadata value.
The type and the value will be removed from the codec capability metadata.
codec_cap | The codec data to set the value in. |
type | The type id to unset. |
The | meta_len of codec_cap on success |
-EINVAL | if arguments are invalid |
int bt_audio_codec_cap_set_frame_dur | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_codec_cap_frame_dur | frame_dur | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the frame duration of a codec capability.
codec_cap | The codec capabilities to set data for. |
frame_dur | The frame duration to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_set_freq | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_codec_cap_freq | freq | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the supported frequencies of a codec capability.
codec_cap | The codec capabilities to set data for. |
freq | The supported frequencies to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_set_max_codec_frames_per_sdu | ( | struct bt_audio_codec_cap * | codec_cap, |
uint8_t | codec_frames_per_sdu | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the maximum codec frames per SDU of a codec capability.
codec_cap | The codec capabilities to set data for. |
codec_frames_per_sdu | The maximum codec frames per SDU to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_set_octets_per_frame | ( | struct bt_audio_codec_cap * | codec_cap, |
const struct bt_audio_codec_octets_per_codec_frame * | codec_frame | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the octets per codec frame of a codec capability.
codec_cap | The codec capabilities to set data for. |
codec_frame | The octets per codec frame to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_set_supported_audio_chan_counts | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_codec_cap_chan_count | chan_count | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set the channel count of a codec capability.
codec_cap | The codec capabilities to set data for. |
chan_count | The channel count frequency to set. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_set_val | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_codec_cap_type | type, | ||
const uint8_t * | data, | ||
size_t | data_len | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Set or add a specific codec capability value.
codec_cap | The codec data to set the value in. |
type | The type id to set |
data | Pointer to the data-pointer to set |
data_len | Length of data |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |
-ENOMEM | if the new value could not set or added due to memory |
int bt_audio_codec_cap_unset_val | ( | struct bt_audio_codec_cap * | codec_cap, |
enum bt_audio_codec_cap_type | type | ||
) |
#include <zephyr/bluetooth/audio/audio.h>
Unset a specific codec capability value.
The type and the value will be removed from the codec capability.
codec_cap | The codec data to set the value in. |
type | The type id to unset. |
The | data_len of codec_cap on success |
-EINVAL | if arguments are invalid |