Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d11442b6 authored by Francois Gaffie's avatar Francois Gaffie
Browse files

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: default avatarFrancois Gaffie <francois.gaffie@renault.com>
Change-Id: Ief1d5314b7970de78298750550320e329283ee1a
parent 8debb9f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment