Lines Matching +full:volume +full:- +full:control
3 * @brief Bluetooth Volume Control Profile (VCP) APIs.
7 * Copyright (c) 2020-2024 Nordic Semiconductor ASA
9 * SPDX-License-Identifier: Apache-2.0
16 * @brief Volume Control Profile (VCP)
18 * @defgroup bt_vcp Volume Control Profile (VCP)
26 * The Volume Control Profile (VCP) provides procedures to control the volume level and mute state
42 * Defines the maximum number of Volume Offset Control service instances for the
43 * Volume Control Profile Volume Renderer
52 * Defines the maximum number of Audio Input Control service instances for the
53 * Volume Control Profile Volume Renderer
62 * @name Volume Control Service Error codes
66 * The Change_Counter operand value does not match the Change_Counter field value of the Volume
70 /** An invalid opcode has been used in a control point procedure. */
75 * @name Volume Control Service Mute Values
78 /** The volume state is unmuted */
80 /** The volume state is muted */
84 /** @brief Opaque Volume Control Service instance. */
87 /** Register structure for Volume Control Service */
89 /** Initial step size (1-255) */
92 /** Initial mute state (0-1) */
95 /** Initial volume level (0-255) */
96 uint8_t volume; member
98 /** Register parameters for Volume Offset Control Services */
101 /** Register parameters for Audio Input Control Services */
104 /** Volume Control Service callback structure. */
109 * @brief Volume Control Service included services
111 * Used for to represent the Volume Control Service included service instances,
116 /** Number of Volume Offset Control Service instances */
118 /** Array of pointers to Volume Offset Control Service instances */
121 /** Number of Audio Input Control Service instances */
123 /** Array of pointers to Audio Input Control Service instances */
128 * @brief Get Volume Control Service included services.
131 * Volume Control Service included service instances, such as pointers to the
132 * Volume Offset Control Service (Volume Offset Control Service) or
133 * Audio Input Control Service (AICS) instances.
142 * @brief Register the Volume Control Service.
147 * @param param Volume Control Service register parameters.
154 * @brief Struct to hold the Volume Renderer callbacks
160 * @brief Callback function for Volume Control Service volume state.
164 * the Volume Renderer or a remote Volume Controller.
170 * @param volume The volume of the Volume Control Service server.
171 * @param mute The mute setting of the Volume Control Service server.
173 void (*state)(struct bt_conn *conn, int err, uint8_t volume, uint8_t mute);
176 * @brief Callback function for Volume Control Service flags.
186 * @param flags The flags of the Volume Control Service server.
192 * @brief Set the Volume Control Service volume step size.
194 * Set the value that the volume changes, when changed relatively with e.g.
199 * @param volume_step The volume step size (1-255).
206 * @brief Get the Volume Control Service volume state.
213 * @brief Get the Volume Control Service flags.
220 * @brief Turn the volume down by one step on the server.
227 * @brief Turn the volume up by one step on the server.
234 * @brief Turn the volume down and unmute the server.
241 * @brief Turn the volume up and unmute the server.
248 * @brief Set the volume on the server
250 * @param volume The absolute volume to set.
254 int bt_vcp_vol_rend_set_vol(uint8_t volume);
271 * @brief Struct to hold the Volume Controller callbacks
277 * @brief Callback function for Volume Control Profile volume state.
279 * Called when the value is remotely read as the Volume Controller.
280 * Called if the value is changed by either the Volume Renderer or
281 * Volume Controller, and notified to the to Volume Controller.
283 * @param vol_ctlr Volume Controller instance pointer.
286 * @param volume The volume of the Volume Renderer.
287 * @param mute The mute setting of the Volume Renderer.
289 void (*state)(struct bt_vcp_vol_ctlr *vol_ctlr, int err, uint8_t volume,
293 * @brief Callback function for Volume Control Profile volume flags.
295 * Called when the value is remotely read as the Volume Controller.
296 * Called if the value is changed by the Volume Renderer.
298 * A non-zero value indicates the volume has been changed on the
299 * Volume Renderer since it was booted.
301 * @param vol_ctlr Volume Controller instance pointer.
304 * @param flags The flags of the Volume Renderer.
314 * @param vol_ctlr Volume Controller instance pointer.
317 * @param vocs_count Number of Volume Offset Control Service instances
318 * on the remote Volume Renderer.
319 * @param aics_count Number of Audio Input Control Service instances
320 * the remote Volume Renderer.
328 * Called when the volume down procedure is completed.
330 * @param vol_ctlr Volume Controller instance pointer.
339 * Called when the volume up procedure is completed.
341 * @param vol_ctlr Volume Controller instance pointer.
352 * @param vol_ctlr Volume Controller instance pointer.
363 * @param vol_ctlr Volume Controller instance pointer.
372 * Called when the volume down and unmute procedure is completed.
374 * @param vol_ctlr Volume Controller instance pointer.
383 * Called when the volume up and unmute procedure is completed.
385 * @param vol_ctlr Volume Controller instance pointer.
394 * Called when the set absolute volume procedure is completed.
396 * @param vol_ctlr Volume Controller instance pointer.
402 /** Volume Offset Control Service callbacks */
405 /** Audio Input Control Service callbacks */
413 * @brief Registers the callbacks used by the Volume Controller.
418 * @retval -EINVAL if @p cb is NULL
419 * @retval -EALREADY if @p cb was already registered
424 * @brief Unregisters the callbacks used by the Volume Controller.
429 * @retval -EINVAL if @p cb is NULL
430 * @retval -EALREADY if @p cb was not registered
435 * @brief Discover Volume Control Service and included services.
445 * @param conn The connection to discover Volume Control Service for.
454 * @brief Get the volume controller from a connection pointer
456 * Get the Volume Control Profile Volume Controller pointer from a connection pointer.
457 * Only volume controllers that have been initiated via bt_vcp_vol_ctlr_discover() can be
462 * @retval Pointer to a Volume Control Profile Volume Controller instance
470 * Get the Bluetooth connection pointer of a Volume Control Service
473 * @param vol_ctlr Volume Controller instance pointer.
482 * @brief Get Volume Control Service included services.
485 * Volume Control Service included service instances, such as pointers to the
486 * Volume Offset Control Service (Volume Offset Control Service) or
487 * Audio Input Control Service (AICS) instances.
492 * @param vol_ctlr Volume Controller instance pointer.
501 * @brief Read the volume state of a remote Volume Renderer.
503 * @param vol_ctlr Volume Controller instance pointer.
510 * @brief Read the volume flags of a remote Volume Renderer.
512 * @param vol_ctlr Volume Controller instance pointer.
519 * @brief Turn the volume down one step on a remote Volume Renderer
521 * @param vol_ctlr Volume Controller instance pointer.
528 * @brief Turn the volume up one step on a remote Volume Renderer
530 * @param vol_ctlr Volume Controller instance pointer.
537 * @brief Turn the volume down one step and unmute on a remote Volume Renderer
539 * @param vol_ctlr Volume Controller instance pointer.
546 * @brief Turn the volume up one step and unmute on a remote Volume Renderer
548 * @param vol_ctlr Volume Controller instance pointer.
555 * @brief Set the absolute volume on a remote Volume Renderer
557 * @param vol_ctlr Volume Controller instance pointer.
558 * @param volume The absolute volume to set.
562 int bt_vcp_vol_ctlr_set_vol(struct bt_vcp_vol_ctlr *vol_ctlr, uint8_t volume);
565 * @brief Unmute a remote Volume Renderer.
567 * @param vol_ctlr Volume Controller instance pointer.
574 * @brief Mute a remote Volume Renderer.
576 * @param vol_ctlr Volume Controller instance pointer.