mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-25 09:05:57 -04:00
Currently enabled at device creation and delegated to an external entity via a varlink protocol.
47 lines
1.5 KiB
C
47 lines
1.5 KiB
C
/* External Volume Control */
|
|
/* SPDX-FileCopyrightText: Copyright © 2026 Arun Raghavan */
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef ACP_EXT_VOLUME_H
|
|
#define ACP_EXT_VOLUME_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <spa/param/audio/volume.h>
|
|
#include <spa/support/varlink.h>
|
|
|
|
typedef struct pa_cvolume pa_cvolume;
|
|
|
|
struct acp_card;
|
|
|
|
struct spa_acp_ext_volume {
|
|
struct spa_varlink_client *client;
|
|
struct spa_hook listener;
|
|
|
|
enum spa_audio_volume_control_flags flags;
|
|
};
|
|
|
|
int spa_acp_ext_volume_init(struct spa_acp_ext_volume *ext_volume, struct spa_varlink *varlink,
|
|
const char *path, const char *device, const char *route);
|
|
|
|
void spa_acp_ext_volume_destroy(struct spa_acp_ext_volume *ext_volume);
|
|
|
|
int spa_acp_ext_volume_read_volume(struct spa_acp_ext_volume *ext_volume,
|
|
const char *device, const char *route, pa_cvolume *cvol);
|
|
|
|
int spa_acp_ext_volume_write_volume_absolute(struct spa_acp_ext_volume *ext_volume,
|
|
const char *device, const char *route, pa_cvolume *cvol);
|
|
|
|
int spa_acp_ext_volume_write_volume_relative(struct spa_acp_ext_volume *ext_volume,
|
|
const char *device, const char *route, float step);
|
|
|
|
int spa_acp_ext_volume_read_mute(struct spa_acp_ext_volume *ext_volume,
|
|
const char *device, const char *route, bool *mute);
|
|
|
|
int spa_acp_ext_volume_write_mute_value(struct spa_acp_ext_volume *ext_volume,
|
|
const char *device, const char *route, bool mute);
|
|
|
|
int spa_acp_ext_volume_write_mute_toggle(struct spa_acp_ext_volume *ext_volume,
|
|
const char *device, const char *route);
|
|
|
|
#endif /* ACP_EXT_VOLUME_H */
|