Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
|
Published Audio Capabilities Service (PACS) More...
Data Structures | |
struct | bt_pacs_cap |
Published Audio Capability structure. More... | |
Typedefs | |
typedef bool(* | bt_pacs_cap_foreach_func_t) (const struct bt_pacs_cap *cap, void *user_data) |
Published Audio Capability iterator callback. | |
Functions | |
void | bt_pacs_cap_foreach (enum bt_audio_dir dir, bt_pacs_cap_foreach_func_t func, void *user_data) |
Published Audio Capability iterator. | |
int | bt_pacs_cap_register (enum bt_audio_dir dir, struct bt_pacs_cap *cap) |
Register Published Audio Capability. | |
int | bt_pacs_cap_unregister (enum bt_audio_dir dir, struct bt_pacs_cap *cap) |
Unregister Published Audio Capability. | |
int | bt_pacs_set_location (enum bt_audio_dir dir, enum bt_audio_location location) |
Set the location for an endpoint type. | |
int | bt_pacs_set_available_contexts (enum bt_audio_dir dir, enum bt_audio_context contexts) |
Set the available contexts for an endpoint type. | |
enum bt_audio_context | bt_pacs_get_available_contexts (enum bt_audio_dir dir) |
Get the available contexts for an endpoint type. | |
int | bt_pacs_conn_set_available_contexts_for_conn (struct bt_conn *conn, enum bt_audio_dir dir, enum bt_audio_context *contexts) |
Set the available contexts for a given connection. | |
enum bt_audio_context | bt_pacs_get_available_contexts_for_conn (struct bt_conn *conn, enum bt_audio_dir dir) |
Get the available contexts for a given connection. | |
int | bt_pacs_set_supported_contexts (enum bt_audio_dir dir, enum bt_audio_context contexts) |
Set the supported contexts for an endpoint type. | |
Published Audio Capabilities Service (PACS)
The Published Audio Capabilities Service (PACS) is used to expose capabilities to remote devices.
typedef bool(* bt_pacs_cap_foreach_func_t) (const struct bt_pacs_cap *cap, void *user_data) |
#include <zephyr/bluetooth/audio/pacs.h>
Published Audio Capability iterator callback.
cap | Capability found. |
user_data | Data given. |
void bt_pacs_cap_foreach | ( | enum bt_audio_dir | dir, |
bt_pacs_cap_foreach_func_t | func, | ||
void * | user_data ) |
#include <zephyr/bluetooth/audio/pacs.h>
Published Audio Capability iterator.
Iterate capabilities with endpoint direction specified.
dir | Direction of the endpoint to look capability for. |
func | Callback function. |
user_data | Data to pass to the callback. |
int bt_pacs_cap_register | ( | enum bt_audio_dir | dir, |
struct bt_pacs_cap * | cap ) |
#include <zephyr/bluetooth/audio/pacs.h>
Register Published Audio Capability.
Register Audio Local Capability.
dir | Direction of the endpoint to register capability for. |
cap | Capability structure. |
int bt_pacs_cap_unregister | ( | enum bt_audio_dir | dir, |
struct bt_pacs_cap * | cap ) |
#include <zephyr/bluetooth/audio/pacs.h>
Unregister Published Audio Capability.
Unregister Audio Local Capability.
dir | Direction of the endpoint to unregister capability for. |
cap | Capability structure. |
int bt_pacs_conn_set_available_contexts_for_conn | ( | struct bt_conn * | conn, |
enum bt_audio_dir | dir, | ||
enum bt_audio_context * | contexts ) |
#include <zephyr/bluetooth/audio/pacs.h>
Set the available contexts for a given connection.
This function sets the available contexts value for a given conn
connection object. If the contexts
parameter is NULL the available contexts value is reset to default. The default value of the available contexts is set using bt_pacs_set_available_contexts function. The Available Context Value is reset to default on ACL disconnection.
conn | Connection object. |
dir | Direction of the endpoints to change available contexts for. |
contexts | The contexts to be set or NULL to reset to default. |
enum bt_audio_context bt_pacs_get_available_contexts | ( | enum bt_audio_dir | dir | ) |
#include <zephyr/bluetooth/audio/pacs.h>
Get the available contexts for an endpoint type.
dir | Direction of the endpoints to get contexts for. |
enum bt_audio_context bt_pacs_get_available_contexts_for_conn | ( | struct bt_conn * | conn, |
enum bt_audio_dir | dir ) |
#include <zephyr/bluetooth/audio/pacs.h>
Get the available contexts for a given connection.
This server function returns the available contexts value for a given conn
connection object. The value returned is the one set with bt_pacs_conn_set_available_contexts_for_conn function or the default value set with bt_pacs_set_available_contexts function.
conn | Connection object. |
dir | Direction of the endpoints to get contexts for. |
BT_AUDIO_CONTEXT_TYPE_PROHIBITED | if conn or dir are invalid |
int bt_pacs_set_available_contexts | ( | enum bt_audio_dir | dir, |
enum bt_audio_context | contexts ) |
#include <zephyr/bluetooth/audio/pacs.h>
Set the available contexts for an endpoint type.
dir | Direction of the endpoints to change available contexts for. |
contexts | The contexts to be set. |
int bt_pacs_set_location | ( | enum bt_audio_dir | dir, |
enum bt_audio_location | location ) |
#include <zephyr/bluetooth/audio/pacs.h>
Set the location for an endpoint type.
dir | Direction of the endpoints to change location for. |
location | The location to be set. |
int bt_pacs_set_supported_contexts | ( | enum bt_audio_dir | dir, |
enum bt_audio_context | contexts ) |
#include <zephyr/bluetooth/audio/pacs.h>
Set the supported contexts for an endpoint type.
dir | Direction of the endpoints to change available contexts for. |
contexts | The contexts to be set. |