Zephyr Project API 4.1.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
pacs.h
Go to the documentation of this file.
1
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
29#include <stdbool.h>
30
33#include <zephyr/sys/slist.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
43
46 sys_snode_t _node;
48};
49
52#if defined(CONFIG_BT_PAC_SNK) || defined(__DOXYGEN__)
56 bool snk_pac;
57#endif /* CONFIG_BT_PAC_SNK */
58
59#if defined(CONFIG_BT_PAC_SNK_LOC) || defined(__DOXYGEN__)
66 bool snk_loc;
67#endif /* CONFIG_BT_PAC_SNK_LOC */
68
69#if defined(CONFIG_BT_PAC_SRC) || defined(__DOXYGEN__)
73 bool src_pac;
74#endif /* CONFIG_BT_PAC_SRC */
75
76#if defined(CONFIG_BT_PAC_SRC_LOC) || defined(__DOXYGEN__)
83 bool src_loc;
84#endif /* CONFIG_BT_PAC_SRC_LOC */
85};
86
97typedef bool (*bt_pacs_cap_foreach_func_t)(const struct bt_pacs_cap *cap,
98 void *user_data);
99
111 void *user_data);
112
124
131
143
155
165 enum bt_audio_location location);
166
176 enum bt_audio_context contexts);
177
186
203 enum bt_audio_context *contexts);
204
219 enum bt_audio_dir dir);
220
230 enum bt_audio_context contexts);
231
232#ifdef __cplusplus
233}
234#endif
235
238#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_PACS_H_ */
Bluetooth Audio handling.
Bluetooth connection handling.
bt_audio_dir
Audio direction from the perspective of the BAP Unicast Server / BAP Broadcast Sink.
Definition audio.h:796
bt_audio_location
Location values for BT Audio.
Definition audio.h:590
bt_audio_context
Audio Context Type for Generic Audio.
Definition audio.h:303
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.
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.
bool(* bt_pacs_cap_foreach_func_t)(const struct bt_pacs_cap *cap, void *user_data)
Published Audio Capability iterator callback.
Definition pacs.h:97
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:684
Published Audio Capability structure.
Definition pacs.h:40
const struct bt_audio_codec_cap * codec_cap
Codec capability reference.
Definition pacs.h:42
Structure for registering PACS.
Definition pacs.h:51
bool snk_loc
Enables or disables registration of Sink Location Characteristic.
Definition pacs.h:66
bool snk_pac
Enables or disables registration of Sink PAC Characteristic.
Definition pacs.h:56
bool src_pac
Enables or disables registration of Source PAC Characteristic.
Definition pacs.h:73
bool src_loc
Enables or disables registration of Source Location Characteristic.
Definition pacs.h:83