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:
Wim Taymans 2021-03-21 16:19:57 +01:00
parent 3bce026d67
commit 5cddd61c6c
4 changed files with 42 additions and 54 deletions

View file

@ -1344,7 +1344,7 @@ impl_init(const struct spa_handle_factory *factory,
if (this->cpu)
this->cpu_flags = spa_cpu_get_flags(this->cpu);
this->monitor_channel_volumes = true;
this->monitor_channel_volumes = false;
if (info) {
if ((str = spa_dict_lookup(info, "monitor.channel-volumes")) != NULL)
this->monitor_channel_volumes = strcmp(str, "true") == 0 || atoi(str) == 1;