Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Published Audio Capabilities Service (PACS)

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.
 

Detailed Description

Published Audio Capabilities Service (PACS)

Since
3.0
Version
0.8.0

The Published Audio Capabilities Service (PACS) is used to expose capabilities to remote devices.

Typedef Documentation

◆ bt_pacs_cap_foreach_func_t

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.

Parameters
capCapability found.
user_dataData given.
Returns
true to continue to the next capability
false to stop the iteration

Function Documentation

◆ bt_pacs_cap_foreach()

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.

Parameters
dirDirection of the endpoint to look capability for.
funcCallback function.
user_dataData to pass to the callback.

◆ bt_pacs_cap_register()

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.

Parameters
dirDirection of the endpoint to register capability for.
capCapability structure.
Returns
0 in case of success or negative value in case of error.

◆ bt_pacs_cap_unregister()

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.

Parameters
dirDirection of the endpoint to unregister capability for.
capCapability structure.
Returns
0 in case of success or negative value in case of error.

◆ bt_pacs_conn_set_available_contexts_for_conn()

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.

Parameters
connConnection object.
dirDirection of the endpoints to change available contexts for.
contextsThe contexts to be set or NULL to reset to default.
Returns
0 in case of success or negative value in case of error.

◆ bt_pacs_get_available_contexts()

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.

Parameters
dirDirection of the endpoints to get contexts for.
Returns
Bitmask of available contexts.

◆ bt_pacs_get_available_contexts_for_conn()

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.

Parameters
connConnection object.
dirDirection of the endpoints to get contexts for.
Returns
Bitmask of available contexts.
Return values
BT_AUDIO_CONTEXT_TYPE_PROHIBITEDif conn or dir are invalid

◆ bt_pacs_set_available_contexts()

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.

Parameters
dirDirection of the endpoints to change available contexts for.
contextsThe contexts to be set.
Returns
0 in case of success or negative value in case of error.

◆ bt_pacs_set_location()

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.

Parameters
dirDirection of the endpoints to change location for.
locationThe location to be set.
Returns
0 in case of success or negative value in case of error.

◆ bt_pacs_set_supported_contexts()

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.

Parameters
dirDirection of the endpoints to change available contexts for.
contextsThe contexts to be set.
Returns
0 in case of success or negative value in case of error.