Implement Native Volume Ramping in SPA Audio Adapter.
This MR added the below volume ramp parameters to audiocoverter.c
- volumeRampSamples
- volumeRampStepSamples
- volumeRampTime
- volumeRampStepTime
- volumeRampScale
Below is an example command that ramps the volume to 0.7(from what ever is the previous value).
pw-cli s <node-id> Props '{volumeRampTime=2000 volumeRampStepTime=5000 volume=0.7}'
pw-cli s <node-id> Props '{volumeRampSamples=70000 volumeRampStepSamples=200 volume=0.0}
adapter-control is enhanced to use and demo these new params. It now takes these params at command line. Options are added to branch to either native path(use the native params added above) or the non-native path(use the control port).
for example the cmds would look like
adapter-control
adapter-control --alsa-device=hw:1,0 --ramp-samples=70000 --mode=native
adapter-control --alsa-device=hw:1,0 --ramp-time=2000 --ramp-step-time=5000 --mode=native
adapter-control --alsa-device=hw:1,0 --ramp-time=3000 --scale=cubic
The support for SPA_PROP_channelVolumes is not yet added.
The design was initially discussed here
Edited by Ashok Sidipotu