Implement audio effects HAL delegating to legacy HAL
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
diff --git a/audio/effect/2.0/IVisualizerEffect.hal b/audio/effect/2.0/IVisualizerEffect.hal
index 2a7ddb8..70dabf9 100644
--- a/audio/effect/2.0/IVisualizerEffect.hal
+++ b/audio/effect/2.0/IVisualizerEffect.hal
@@ -36,10 +36,10 @@
getCaptureSize() generates (Result retval, uint16_t captureSize);
enum ScalingMode {
- // Keep in sync with
+ // Keep in sync with SCALING_MODE_... in
// frameworks/base/media/java/android/media/audiofx/Visualizer.java
- SCALING_MODE_NORMALIZED = 0,
- SCALING_MODE_AS_PLAYED = 1
+ NORMALIZED = 0,
+ AS_PLAYED = 1
};
/*
@@ -63,10 +63,10 @@
getLatency() generates (Result retval, uint32_t latencyMs);
enum MeasurementMode {
- // Keep in sync with
+ // Keep in sync with MEASUREMENT_MODE_... in
// frameworks/base/media/java/android/media/audiofx/Visualizer.java
- MEASUREMENT_MODE_NONE = 0x0,
- MEASUREMENT_MODE_PEAK_RMS = 0x1
+ NONE = 0x0,
+ PEAK_RMS = 0x1
};
/*
@@ -97,7 +97,7 @@
int32_t peakMb; // millibels
int32_t rmsMb; // millibels
} peakAndRms;
- };
+ } value;
};
/*
* Retrieves the lastest measurements. The measurements to be made