Fraunhofer's downmixer has additional buffering, this is incompatible
with how DownmixerBufferProvider used to process incomplete buffers.
Now the effects HIDL wrapper delivers frameCount updates in
audiobuffers to the server side. This fixes playback of multichannel
sound streams.
Bug: 36181621
Test: play 5.1 track from Play Music
Change-Id: Iffe3327c6eedef85151eec2b41e0aedfb7ffa6dc
Add checks for validity of the passed in native handle.
Bug: 37590777
Change-Id: If906f0086c3442819e1844cc521215d5b74af015
Test: VTS
(cherry picked from commit 7bae6a0b63)
Added tests covering IEffect, IEqualizerEffect, and
ILoudnessEnhancer interfaces.
Minor corrections in the interface definitions and implementations:
- fixed descriptions and @callflow annotations in IEffect;
- fixed type used for band levels in IEqualizerEffect;
- fixed specification of frequencies in IEqualizerEffect;
- fixed some bugs in previously non-execrices Effects code;
- warning messages changed to error messages.
Test: this is a test
Bug: 32022706
Change-Id: I0e0bc111b07d944ad8a0321e8b1ec703f8d1a73e
We need google shims on the vendor partition because they are providing
an implementation of a vendor defined interface. They were written by
google just as a courtesy/to make the transition easier. They're
basically a set for vendors to assemble their hal implementations
from.
Bug: 34135607
Test: marlin persist.hal.binderization on/off
Change-Id: I2e2af5af39264cf290259755bb9b2eb9827a21f5
This fixes a power regression caused by periodic wakeups of
the driver threads even when the device is idle.
The timeout is really not needed, it used to be there to ensure that
the thread exits its loop, but then an explicit wake-up call before
closing the thread had been added for this purpose.
Bug: 34682579
Test: Follow repro steps from the bug, compare power consumption
to the legacy version of the audio HAL.
Change-Id: I0bfc2079a449894c5d0bd6ef19b53ca425795a9e
There were two problems:
1. Joining of reader / writer / process threads (the threads that
interact with HAL) was taking up to 1 second because the thread
was usually waiting for an event flag to be toggled, or a 1s
timeout.
2. Calling IStream.close or IEffect.close shouldn't tax the caller.
Changed the code so a call to close only signals the thread that
it's time to exit, and then the thread is only joined in the
effect or stream destructor.
Bug: 34800063
Bug: 34499806
Test: see repro steps in the bugs
Change-Id: Ife20524a1eba4ec9a78152e89862526e8cd5c960
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
Result: no hwbinder calls due music processing.
Added IEffect.close method for explicitly freeing up of resources
consumed by the effect before automatic server objects reaping
gets to it.
Added IEffect.setProcessBuffers method for updating the input /
output buffers on the go.
Test: make, use Play Music with effects, check traces
Bug: 30222631
Change-Id: Ia1e1bc7098fab59aa970e0ce4acdb48007409644
Several issues addressed:
-- added IDevice.supportsAudioPatches to query whether
create/removeAudioPatch is actually supported by HAL;
-- IStreamOutCallback proxy needs to be owned by IStreamOut
implementation. In order for the client to reset the reference,
added method IStreamOut.clearCallback;
-- IDevice.open{Input|Output}Stream need to return a "suggested" audio
config from HAL;
-- code for converting between system/audio.h and HIDL
data structures has been moved to
android.hardware.audio.common@2.0-util library for reuse;
-- added a workaround for the issue with QC effects HAL trying to write
into the input parameters buffer, which is r/o by Binder design.
Bug: 30222631
Change-Id: I64af24d79c12d6ac3b0f87d085a821913e29237b
Test: tried using with WIP HIDL client on N5X
find . -name "*.h" -exec sed -i 's/HIDL_GENERATED_\(.*\)_H_/\U\1_H/g' {}
+
They now match what would be generated by -Lc++-impl. This prevents
confusion over whether or not the files are autogenerated.
Change-Id: I4aa89a39907024aa9525df71ff3715979f431357
Similar commit: https://android-review.googlesource.com/#/c/305996/
Test: pass
Changes made to the .hal definition:
- introduce Effect ID returned by the IEffectsFactory that
needs to be passed to IStream.{add|remove}Effect; otherwise
it's impossible to retrieve the underlying HAL effect handle;
- change "bus address" in DeviceAddress to "string" type;
- fix signature of some methods w.r.t. returning Result;
- remove unused "struct AudioPatch".
Bug: 30222631
Test: make
Change-Id: Icb51729ef57bb2a5b0b78609735e7481bc04f95c
Changes made to the .hal definition:
- added missing generated Result for methods implemented via legacy
"command" function;
- fixed Aux Channels feature definition;
- added "size" parameter for reply data in cases where the wrapper
needs to allocate a reply buffer;
- added method for generic support of feature configs;
- added new Result type;
- use arrays instead of strings in effect descriptor to ease
conversion from / to legacy HAL;
- added missing method to the Preset Reverb interface;
- fixed names of the Visualizer enums to avoid clashes with defines
from the legacy HAL file.
The implementation isn't hooked up to the server yet. Need to implement
devices and streams first.
Bug: 30222631
Change-Id: I75bb42f19ac3303759e918b6d6a91646b1555f8c
Test: make