audiopolicy: optimize set volume call sequence
This CL simplifies call flow to set volume from stream or attributes.
It also removes unused parameter from mute setter and fix a volume
source comparison.
Also refactor logic in setVolumeIndexForAttributes() by removing the
loop on all volume sources on a given output given it was ignoring all
sources not equal to current source anyway.
Bug: 124767636
Test: AudioPolicyTests --gtest_filter=StreamTypeVolumeTest.*
AudioPolicyTests --gtest_filter=AttributeVolume/AttributeVolumeTest.*
AudioPolicyTests --gtest_filter=AudioProductStrategiesPlaybackVolume/AudioProductStrategiesPlaybackVolumeTest.*
Change-Id: Id816de023e917b0c0e34bb0888c8b0ad29029f8b
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
Loading
Please register or sign in to comment