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

Skip to content
Commit 11d58c51 authored by Luofan Chen's avatar Luofan Chen
Browse files

audio_amplifier: Change the enable amplifier function location



Make the call to audio_amplifier_enable_devices consistent.

The call site of the function audio_amplifier_enable_device is
inconsistent. It enables the amplifier when the spkr_prot feature
is detected and enabled, but disables the amplifier only when the
spkr_prot feature is disabled.

Normally, the amplifier should be enabled when starting a playback and
disabled when the playback stops, meaning that the enable and disable
call to the function should be under the same condition.

Furthermore, the HAL should always call this function with enough
information to let the amplifier module itself decide whether it should
proceed or just return.

Move both the call site of `amplifier_enable_devices` out of the if
guard, such that the call sites are consistent.

Signed-off-by: default avatarLuofan Chen <clfbbn@gmail.com>
Change-Id: Icb90cb6301b8dc2425561d3c1717d74733807e0e
parent eabebaa4
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