Loading
AudioPolicy: manager: force gain on startSource when using HW Gain
When a setVolume is called for a given volume source on a SwOutput,
and if the SwOutput is connected to a device using HW Gain, the sync
of the gain on AudioHAL is guarded by the activity of this volume source.
When a new index is applied on a given volume source, if this source is
not active, the new index is cached but is not synced on AudioHAL.
Hence, once a client (aka a source) starts on a SwOutput,
SwAudioOutputDescriptor::setVolume is called, but as index has not changed,
setVolume will bail out before applying the gain to the AudioHAL.
This CL forces to sync the volume upon startSource event if the SwOutput
involved is connected to a device with HW Gain enabled.
Test: build & basic audio tests.
Signed-off-by:
Francois Gaffie <francois.gaffie@renault.com>
Change-Id: Ief1d5314b7970de78298750550320e329283ee1a