Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pacs.h
Go to the documentation of this file.
1
5
6/* Copyright (c) 2021 Intel Corporation
7 * Copyright (c) 2021-2024 Nordic Semiconductor ASA
8 *
9 * SPDX-License-Identifier: Apache-2.0
10 */
11
12#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_PACS_H_
13#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_PACS_H_
14
28
29#include <stdbool.h>
30
34#include <zephyr/sys/slist.h>
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
44
47 sys_snode_t _node;
49};
50
53#if defined(CONFIG_BT_PAC_SNK) || defined(__DOXYGEN__)
57 bool snk_pac;
58#endif /* CONFIG_BT_PAC_SNK */
59
60#if defined(CONFIG_BT_PAC_SNK_LOC) || defined(__DOXYGEN__)
67 bool snk_loc;
68#endif /* CONFIG_BT_PAC_SNK_LOC */
69
70#if defined(CONFIG_BT_PAC_SRC) || defined(__DOXYGEN__)
74 bool src_pac;
75#endif /* CONFIG_BT_PAC_SRC */
76
77#if defined(CONFIG_BT_PAC_SRC_LOC) || defined(__DOXYGEN__)
84 bool src_loc;
85#endif /* CONFIG_BT_PAC_SRC_LOC */
86};
87
98typedef bool (*bt_pacs_cap_foreach_func_t)(const struct bt_pacs_cap *cap,
99 void *user_data);
100
112 void *user_data);
113
125
132
144
156
166 enum bt_audio_location location);
167
177 enum bt_audio_context contexts);
178
187
204 enum bt_audio_context *contexts);
205
220 enum bt_audio_dir dir);
221
231 enum bt_audio_context contexts);
232
233#ifdef __cplusplus
234}
235#endif
236
238
239#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_PACS_H_ */
Bluetooth Assigned Numbers, codes and identifiers.
Bluetooth Audio handling.
Bluetooth connection handling.
bt_audio_location
Location values for BT Audio.
Definition assigned_numbers.h:1361
bt_audio_context
Audio Context Type for Generic Audio.
Definition assigned_numbers.h:1151
bt_audio_dir
Audio direction from the perspective of the BAP Unicast Server / BAP Broadcast Sink.
Definition audio.h:317
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.
int bt_pacs_cap_register(enum bt_audio_dir dir, struct bt_pacs_cap *cap)
Register Published Audio Capability.
int bt_pacs_set_available_contexts(enum bt_audio_dir dir, enum bt_audio_context contexts)
Set the available contexts for an endpoint type.
void bt_pacs_cap_foreach(enum bt_audio_dir dir, bt_pacs_cap_foreach_func_t func, void *user_data)
Published Audio Capability iterator.
enum bt_audio_context bt_pacs_get_available_contexts(enum bt_audio_dir dir)
Get the available contexts for an endpoint type.
bool(* bt_pacs_cap_foreach_func_t)(const struct bt_pacs_cap *cap, void *user_data)
Published Audio Capability iterator callback.
Definition pacs.h:98
int bt_pacs_cap_unregister(enum bt_audio_dir dir, struct bt_pacs_cap *cap)
Unregister Published Audio Capability.
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.
int bt_pacs_unregister(void)
Unregister the Published Audio Capability Service instance.
int bt_pacs_register(const struct bt_pacs_register_param *param)
Register the Published Audio Capability Service instance.
int bt_pacs_set_location(enum bt_audio_dir dir, enum bt_audio_location location)
Set the location for an endpoint type.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
#define bool
Definition stdbool.h:13
Codec capability structure.
Definition audio.h:160
Opaque type representing a connection to a remote device.
Published Audio Capability structure.
Definition pacs.h:41
const struct bt_audio_codec_cap * codec_cap
Codec capability reference.
Definition pacs.h:43
Structure for registering PACS.
Definition pacs.h:52
bool snk_loc
Enables or disables registration of Sink Location Characteristic.
Definition pacs.h:67
bool snk_pac
Enables or disables registration of Sink PAC Characteristic.
Definition pacs.h:57
bool src_pac
Enables or disables registration of Source PAC Characteristic.
Definition pacs.h:74
bool src_loc
Enables or disables registration of Source Location Characteristic.
Definition pacs.h:84