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

Skip to content
Commit f4f2ff39 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

audiohal: Fix volume changes handling

Some legacy implementations of the effects HAL use the condition
of the reply buffer being NULL as an indication that they shouldn't
apply attenuation to the input audio data. Therefore, separate
methods are needed to distinguish the use cases of delegating the
volume control to the effect, and just informing the effect of the
volume changes.

A new method added to IEffect: volumeChangeNotification that implements
the second use case. The contract of setAndGetVolume method has been
updated to indicate that it is only called in the first use case.

Also updated the wrapper for a generic IEffect commands to pass NULL
pointers to the command and reply buffers in case when the size
of the input or output data is 0, to preserve compatibility with
direct calls from the framework.

Bug: 34368451
Test: volume control works when both Bass Boost and Equalizer are
      enabled in the NXP implementation of the effects

Change-Id: I3c9a5bbdff561802bc94080c51703385a8903282
parent 6fdbe863
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