mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-30 21:37:53 -04:00
spa: alsa: Add a mechanism for external volume control
Currently enabled at device creation and delegated to an external entity via spa_device events.
This commit is contained in:
parent
122bfd712b
commit
ef6f5194e3
9 changed files with 867 additions and 86 deletions
|
|
@ -11,6 +11,10 @@
|
|||
#include <poll.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <spa/param/audio/volume.h>
|
||||
|
||||
#include "ext-volume.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#else
|
||||
|
|
@ -188,6 +192,8 @@ struct acp_card_events {
|
|||
|
||||
void (*volume_changed) (void *data, struct acp_device *dev);
|
||||
void (*mute_changed) (void *data, struct acp_device *dev);
|
||||
|
||||
void (*ext_vol_event_available) (void *data, struct spa_event *event);
|
||||
};
|
||||
|
||||
struct acp_port {
|
||||
|
|
@ -239,6 +245,9 @@ struct acp_device {
|
|||
int64_t latency_ns;
|
||||
uint32_t codecs[32];
|
||||
uint32_t n_codecs;
|
||||
|
||||
uint32_t ext_volume_flags;
|
||||
|
||||
};
|
||||
|
||||
struct acp_card_profile {
|
||||
|
|
@ -277,6 +286,8 @@ struct acp_card {
|
|||
struct acp_port **ports;
|
||||
uint32_t preferred_input_port_index;
|
||||
uint32_t preferred_output_port_index;
|
||||
|
||||
struct spa_acp_ext_volume ext_volume;
|
||||
};
|
||||
|
||||
struct acp_card *acp_card_new(uint32_t index, const struct acp_dict *props);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue