Audio codec capabilities APIs.
More...
|
| uint8_t | bt_audio_codec_cap_get_val (const struct bt_audio_codec_cap *codec_cap, uint8_t type, const uint8_t **data) |
| | Lookup a specific value based on type.
|
| |
| 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_get_frame_duration (const struct bt_audio_codec_cap *codec_cap) |
| | Extract the frequency from 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_get_octets_per_frame (const struct bt_audio_codec_cap *codec_cap, struct bt_audio_codec_octets_per_codec_frame *codec_frame) |
| | Extract the frequency from a codec capability.
|
| |
| int | bt_audio_codec_cap_get_max_codec_frames_per_sdu (const struct bt_audio_codec_cap *codec_cap) |
| | Extract the frequency from 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_get_pref_context (const struct bt_audio_codec_cap *codec_cap) |
| | Extract preferred contexts.
|
| |
| 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_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_get_stream_lang (const struct bt_audio_codec_cap *codec_cap) |
| | Extract stream language.
|
| |
| 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_get_parental_rating (const struct bt_audio_codec_cap *codec_cap) |
| | Extract parental rating.
|
| |
| 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_get_audio_active_state (const struct bt_audio_codec_cap *codec_cap) |
| | Extract audio active state.
|
| |
| 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_get_extended (const struct bt_audio_codec_cap *codec_cap, const uint8_t **extended_meta) |
| | Extract extended 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.
|
| |
Audio codec capabilities APIs.
Functions to parse codec capability data when formatted as LTV wrapped into Codec capability parsing APIs.
◆ bt_audio_codec_cap_get_frame_duration()
#include <include/zephyr/bluetooth/audio/audio.h>
Extract the frequency from a codec capability.
- Parameters
-
| codec_cap | The codec configuration to extract data from. |
- Return values
-
| 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 |
◆ bt_audio_codec_cap_get_freq()
#include <include/zephyr/bluetooth/audio/audio.h>
Extract the frequency from a codec capability.
- Parameters
-
| codec_cap | The codec configuration to extract data from. |
- Return values
-
| Bitfield | of supported frequencies if 0 or positive |
| -EINVAL | if arguments are invalid |
| -ENODATA | if not found |
| -EBADMSG | if found value has invalid size or value |
◆ bt_audio_codec_cap_get_max_codec_frames_per_sdu()
| int bt_audio_codec_cap_get_max_codec_frames_per_sdu |
( |
const struct bt_audio_codec_cap * |
codec_cap | ) |
|
#include <include/zephyr/bluetooth/audio/audio.h>
Extract the frequency from a codec capability.
- Parameters
-
| codec_cap | The codec configuration to extract data from. |
- Return values
-
| 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 |
◆ bt_audio_codec_cap_get_octets_per_frame()
#include <include/zephyr/bluetooth/audio/audio.h>
Extract the frequency from a codec capability.
- Parameters
-
| [in] | codec_cap | The codec configuration to extract data from. |
| [out] | codec_frame | Struct to place the resulting values in |
- Return values
-
| 0 | on success |
| -EINVAL | if arguments are invalid |
| -ENODATA | if not found |
| -EBADMSG | if found value has invalid size or value |
◆ bt_audio_codec_cap_get_supported_audio_chan_counts()
| int bt_audio_codec_cap_get_supported_audio_chan_counts |
( |
const struct bt_audio_codec_cap * |
codec_cap | ) |
|
#include <include/zephyr/bluetooth/audio/audio.h>
Extract the frequency from a codec capability.
- Parameters
-
| codec_cap | The codec configuration to extract data from. |
- Return values
-
| 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 |
◆ bt_audio_codec_cap_get_val()
#include <include/zephyr/bluetooth/audio/audio.h>
Lookup a specific value based on type.
- Parameters
-
| [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 |
- Returns
- Length of found
data or 0 if not found
◆ bt_audio_codec_cap_meta_get_audio_active_state()
| int bt_audio_codec_cap_meta_get_audio_active_state |
( |
const struct bt_audio_codec_cap * |
codec_cap | ) |
|
◆ bt_audio_codec_cap_meta_get_bcast_audio_immediate_rend_flag()
| int bt_audio_codec_cap_meta_get_bcast_audio_immediate_rend_flag |
( |
const struct bt_audio_codec_cap * |
codec_cap | ) |
|
◆ bt_audio_codec_cap_meta_get_ccid_list()
#include <include/zephyr/bluetooth/audio/audio.h>
Extract CCID list.
See BT_AUDIO_METADATA_TYPE_CCID_LIST for more information about this value.
- Parameters
-
| [in] | codec_cap | The codec data to search in. |
| [out] | ccid_list | Pointer to the array containing 8-bit CCIDs. |
- Return values
-
| The | length of the ccid_list (may be 0) |
| -EINVAL | if arguments are invalid |
| -ENODATA | if not found |
◆ bt_audio_codec_cap_meta_get_extended()
#include <include/zephyr/bluetooth/audio/audio.h>
Extract extended metadata.
See BT_AUDIO_METADATA_TYPE_EXTENDED for more information about this value.
- Parameters
-
| [in] | codec_cap | The codec data to search in. |
| [out] | extended_meta | Pointer to the extended metadata. |
- Return values
-
| The | length of the ccid_list (may be 0) |
| -EINVAL | if arguments are invalid |
| -ENODATA | if not found |
◆ bt_audio_codec_cap_meta_get_parental_rating()
| int bt_audio_codec_cap_meta_get_parental_rating |
( |
const struct bt_audio_codec_cap * |
codec_cap | ) |
|
◆ bt_audio_codec_cap_meta_get_pref_context()
| int bt_audio_codec_cap_meta_get_pref_context |
( |
const struct bt_audio_codec_cap * |
codec_cap | ) |
|
◆ bt_audio_codec_cap_meta_get_program_info()
#include <include/zephyr/bluetooth/audio/audio.h>
Extract program info.
See BT_AUDIO_METADATA_TYPE_PROGRAM_INFO for more information about this value.
- Parameters
-
| [in] | codec_cap | The codec data to search in. |
| [out] | program_info | Pointer to the UTF-8 formatted program info. |
- Return values
-
| The | length of the program_info (may be 0) |
| -EINVAL | if arguments are invalid |
| -ENODATA | if not found |
◆ bt_audio_codec_cap_meta_get_program_info_uri()
| 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 <include/zephyr/bluetooth/audio/audio.h>
Extract program info URI.
See BT_AUDIO_METADATA_TYPE_PROGRAM_INFO_URI for more information about this value.
- Parameters
-
| [in] | codec_cap | The codec data to search in. |
| [out] | program_info_uri | Pointer to the UTF-8 formatted program info URI. |
- Return values
-
| The | length of the ccid_list (may be 0) |
| -EINVAL | if arguments are invalid |
| -ENODATA | if not found |
◆ bt_audio_codec_cap_meta_get_stream_context()
| int bt_audio_codec_cap_meta_get_stream_context |
( |
const struct bt_audio_codec_cap * |
codec_cap | ) |
|
◆ bt_audio_codec_cap_meta_get_stream_lang()
| int bt_audio_codec_cap_meta_get_stream_lang |
( |
const struct bt_audio_codec_cap * |
codec_cap | ) |
|
◆ bt_audio_codec_cap_meta_get_val()
#include <include/zephyr/bluetooth/audio/audio.h>
Lookup a specific metadata value based on type.
- Parameters
-
| [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 |
- Return values
-
| Length | of found data (may be 0) |
| -EINVAL | if arguments are invalid |
| -ENODATA | if not found |
◆ bt_audio_codec_cap_meta_get_vendor()
#include <include/zephyr/bluetooth/audio/audio.h>
Extract vendor specific metadata.
See BT_AUDIO_METADATA_TYPE_VENDOR for more information about this value.
- Parameters
-
| [in] | codec_cap | The codec data to search in. |
| [out] | vendor_meta | Pointer to the vendor specific metadata. |
- Return values
-
| The | length of the ccid_list (may be 0) |
| -EINVAL | if arguments are invalid |
| -ENODATA | if not found |