mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
acp: remove the soft volume/mute events
Remove the soft mute/volume events, add a new method to get the soft volume and use the volume_changed event to emit the changed soft and monitor (real) volumes event for the node. Make sure the monitor ports always uses the monitor volume, which is the real volume unaffected by the mixer volumes. This configures the soft and real volume on the sink/source in all cases and makes the monitor port follow the real volume of the sink. See #897
This commit is contained in:
parent
3bce026d67
commit
5cddd61c6c
4 changed files with 42 additions and 54 deletions
|
|
@ -177,10 +177,6 @@ struct acp_card_events {
|
|||
|
||||
void (*volume_changed) (void *data, struct acp_device *dev);
|
||||
void (*mute_changed) (void *data, struct acp_device *dev);
|
||||
|
||||
void (*set_soft_volume) (void *data, struct acp_device *dev,
|
||||
const float *volume, uint32_t n_volume);
|
||||
void (*set_soft_mute) (void *data, struct acp_device *dev, bool mute);
|
||||
};
|
||||
|
||||
struct acp_port {
|
||||
|
|
@ -282,6 +278,7 @@ uint32_t acp_device_find_best_port_index(struct acp_device *dev, const char *nam
|
|||
int acp_device_set_port(struct acp_device *dev, uint32_t port_index, uint32_t flags);
|
||||
|
||||
int acp_device_set_volume(struct acp_device *dev, const float *volume, uint32_t n_volume);
|
||||
int acp_device_get_soft_volume(struct acp_device *dev, float *volume, uint32_t n_volume);
|
||||
int acp_device_get_volume(struct acp_device *dev, float *volume, uint32_t n_volume);
|
||||
int acp_device_set_mute(struct acp_device *dev, bool mute);
|
||||
int acp_device_get_mute(struct acp_device *dev, bool *mute);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue