1 /*
2  * Copyright 2023 NXP
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/types.h>
8 
9 #if defined(CONFIG_BT_ASCS_ASE_SNK)
10 #define AVAILABLE_SINK_CONTEXT                                                                     \
11 	(BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED | BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL |                \
12 	 BT_AUDIO_CONTEXT_TYPE_MEDIA | BT_AUDIO_CONTEXT_TYPE_GAME |                                \
13 	 BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL)
14 #else
15 #define AVAILABLE_SINK_CONTEXT 0x0000
16 #endif /* CONFIG_BT_ASCS_ASE_SNK */
17 
18 #if defined(CONFIG_BT_ASCS_ASE_SRC)
19 #define AVAILABLE_SOURCE_CONTEXT                                                                   \
20 	(BT_AUDIO_CONTEXT_TYPE_UNSPECIFIED | BT_AUDIO_CONTEXT_TYPE_CONVERSATIONAL |                \
21 	 BT_AUDIO_CONTEXT_TYPE_MEDIA | BT_AUDIO_CONTEXT_TYPE_GAME |                                \
22 	 BT_AUDIO_CONTEXT_TYPE_INSTRUCTIONAL)
23 #else
24 #define AVAILABLE_SOURCE_CONTEXT 0x0000
25 #endif /* CONFIG_BT_ASCS_ASE_SRC */
26 /**
27  * @brief Initialize the VCP Volume Renderer role
28  *
29  * @return 0 if success, errno on failure.
30  */
31 int vcp_vol_renderer_init(void);
32 
33 /**
34  * @brief Initialize the CSIP Set Member role
35  *
36  * @return 0 if success, errno on failure.
37  */
38 int csip_set_member_init(void);
39 
40 /**
41  * @brief Generate the Resolvable Set Identifier (RSI) value.
42  *
43  * @param rsi Pointer to place the 6-octet newly generated RSI data.
44  *
45  * @return 0 if on success, errno on error.
46  */
47 int csip_generate_rsi(uint8_t *rsi);
48 
49 /**
50  * @brief Initialize BAP Unicast Server role
51  *
52  * @return 0 if success, errno on failure.
53  */
54 int bap_unicast_sr_init(void);
55 
56 /**
57  * @brief Initialize Call Control Client
58  *
59  * @param conn Pointer to connection.
60  *
61  * @return 0 if success, errno on failure.
62  */
63 int ccp_call_ctrl_init(struct bt_conn *conn);
64 
65 /**
66  * @brief Initiate a originate call command
67  *
68  * @return 0 if success, errno on failure.
69  */
70 int ccp_originate_call(void);
71 
72 /**
73  * @brief Initiate a terminate call command
74  *
75  * @return 0 if success, errno on failure.
76  */
77 int ccp_terminate_call(void);
78 
79 /**
80  * @brief Initialize Media Controller
81  *
82  * @param conn Pointer to connection.
83  *
84  * @return 0 if success, errno on failure.
85  */
86 int mcp_ctlr_init(struct bt_conn *conn);
87 
88 /**
89  * @brief Send a command to the Media Player
90  *
91  * @param mcp_opcode Command opcode.
92  *
93  * @return 0 if on success, errno on error.
94  */
95 int mcp_send_cmd(uint8_t mcp_opcode);
96