acp: add min and max volume properties

This way, the min/max volume can be updated and saved in the same way as
the volume is updated.

Also add support for this in audioconvert channelmix.
This commit is contained in:
Wim Taymans 2026-06-08 16:23:10 +02:00
parent fb74ab9054
commit 1a534cd907
6 changed files with 71 additions and 0 deletions

View file

@ -710,6 +710,20 @@ static int apply_device_props(struct impl *this, struct acp_device *dev, struct
changed++;
}
break;
case SPA_PROP_volumeMin:
acp_device_get_volume_limit(dev, &volumes[0], &volumes[1]);
if (spa_pod_get_float(&prop->value, &volumes[0]) == 0) {
acp_device_set_volume_limit(dev, volumes[0], volumes[1]);
changed++;
}
break;
case SPA_PROP_volumeMax:
acp_device_get_volume_limit(dev, &volumes[0], &volumes[1]);
if (spa_pod_get_float(&prop->value, &volumes[1]) == 0) {
acp_device_set_volume_limit(dev, volumes[0], volumes[1]);
changed++;
}
break;
case SPA_PROP_latencyOffsetNsec:
{
int64_t latency_ns;