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
Loading
Please register or sign in to comment