mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: compare the HW volume against stored HW volume
When we store the real_volume we get a hardware_volume as stored in the mixer and a residual software_volume. When we read the volume from the card, we need to compare this against the hardware_volume we stored to check if something changed, not against the real_volume that also contains the leftover software_volume.
This commit is contained in:
parent
03a4c0100a
commit
35d7ad5529
1 changed files with 2 additions and 2 deletions
|
|
@ -1047,10 +1047,10 @@ static int read_volume(pa_alsa_device *dev)
|
|||
/* Shift down by the base volume, so that 0dB becomes maximum volume */
|
||||
pa_sw_cvolume_multiply_scalar(&r, &r, dev->base_volume);
|
||||
|
||||
if (pa_cvolume_equal(&dev->real_volume, &r))
|
||||
if (pa_cvolume_equal(&dev->hardware_volume, &r))
|
||||
return 0;
|
||||
|
||||
dev->real_volume = r;
|
||||
dev->real_volume = dev->hardware_volume = r;
|
||||
|
||||
pa_log_info("New hardware volume: min:%d max:%d",
|
||||
pa_cvolume_min(&r), pa_cvolume_max(&r));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue