audio: Update default effect HAL wrapper to support V7
During this conversion, the functionality of the V7 wrapper
hasn't been tested yet. This will be done in a separate CL
that will also include required updates to the VTS tests.
Since the changes were made to the code shared with pre-V7
versions, verified that V6 HAL didn't regress.
Bug: 142480271
Test: atest VtsHalAudioEffectV6_0TargetTest
Test: m VtsHalAudioEffectV7_0TargetTest
Test: m android.hardware.audio@7.0-service.example
Change-Id: I72389c8d564596bef22b47dfdcb2e77d636ef0a3
diff --git a/audio/effect/7.0/IVirtualizerEffect.hal b/audio/effect/7.0/IVirtualizerEffect.hal
index 141b4e6..5d11435 100644
--- a/audio/effect/7.0/IVirtualizerEffect.hal
+++ b/audio/effect/7.0/IVirtualizerEffect.hal
@@ -46,23 +46,38 @@
*/
getStrength() generates (Result retval, uint16_t strength);
- struct SpeakerAngle {
+ struct SpeakerAngles {
/** Speaker channel mask */
- vec<AudioChannelMask> mask;
- // all angles are expressed in degrees and
- // are relative to the listener.
- int16_t azimuth; // 0 is the direction the listener faces
- // 180 is behind the listener
- // -90 is to their left
- int16_t elevation; // 0 is the horizontal plane
- // +90 is above the listener, -90 is below
+ AudioChannelMask mask;
+ /**
+ * Horizontal speaker position angles for each channel ordered from LSb
+ * to MSb in the channel mask. The number of values is the number of
+ * channels in the channel mask.
+ *
+ * All angles are expressed in degrees and are relative to the listener.
+ * - 0 is the direction the listener faces;
+ * - 180 is behind the listener;
+ * - -90 is to their left.
+ */
+ vec<int16_t> azimuth;
+ /**
+ * Vertical speaker position angles for each channel ordered from LSb
+ * to MSb in the channel mask. The number of values is the number of
+ * channels in the channel mask.
+ *
+ * All angles are expressed in degrees and are relative to the listener.
+ * - 0 is the horizontal plane of the listener;
+ * - +90 is above the listener;
+ * - -90 is below the listener.
+ */
+ vec<int16_t> elevation;
};
/**
* Retrieves virtual speaker angles for the given channel mask on the
* specified device.
*/
- getVirtualSpeakerAngles(vec<AudioChannelMask> mask, DeviceAddress device)
- generates (Result retval, vec<SpeakerAngle> speakerAngles);
+ getVirtualSpeakerAngles(AudioChannelMask mask, DeviceAddress device)
+ generates (Result retval, SpeakerAngles speakerAngles);
/**
* Forces the virtualizer effect for the given output device.