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

Commit d30ff8fb authored by Shunkai Yao's avatar Shunkai Yao
Browse files

Add some Effect type UUID and offload indicater in common parameter

Bug: 271500140
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Change-Id: I61ebf268600564cb5abddc90979070b675a85541
parent e5a56100
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -36,20 +36,22 @@ package android.hardware.audio.effect;
parcelable Descriptor {
  android.hardware.audio.effect.Descriptor.Common common;
  android.hardware.audio.effect.Capability capability;
  const String EFFECT_TYPE_UUID_ENV_REVERB = "c2e5d5f0-94bd-4763-9cac-4e234d06839e";
  const String EFFECT_TYPE_UUID_PRESET_REVERB = "47382d60-ddd8-11db-bf3a-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_EQUALIZER = "0bed4300-ddd6-11db-8f34-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_BASS_BOOST = "0634f220-ddd4-11db-a0fc-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_VIRTUALIZER = "37cc2c00-dddd-11db-8577-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_AEC = "7b491460-8d4d-11e0-bd61-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_AGC1 = "0a8abfe0-654c-11e0-ba26-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_AGC2 = "ae3c653b-be18-4ab8-8938-418f0a7f06ac";
  const String EFFECT_TYPE_UUID_AEC = "7b491460-8d4d-11e0-bd61-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_NS = "58b4b260-8e06-11e0-aa8e-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_LOUDNESS_ENHANCER = "fe3199be-aed0-413f-87bb-11260eb63cf1";
  const String EFFECT_TYPE_UUID_BASS_BOOST = "0634f220-ddd4-11db-a0fc-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_DOWNMIX = "381e49cc-a858-4aa2-87f6-e8388e7601b2";
  const String EFFECT_TYPE_UUID_DYNAMICS_PROCESSING = "7261676f-6d75-7369-6364-28e2fd3ac39e";
  const String EFFECT_TYPE_UUID_ENV_REVERB = "c2e5d5f0-94bd-4763-9cac-4e234d06839e";
  const String EFFECT_TYPE_UUID_EQUALIZER = "0bed4300-ddd6-11db-8f34-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_HAPTIC_GENERATOR = "1411e6d6-aecd-4021-a1cf-a6aceb0d71e5";
  const String EFFECT_TYPE_UUID_LOUDNESS_ENHANCER = "fe3199be-aed0-413f-87bb-11260eb63cf1";
  const String EFFECT_TYPE_UUID_NS = "58b4b260-8e06-11e0-aa8e-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_PRESET_REVERB = "47382d60-ddd8-11db-bf3a-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_SPATIALIZER = "ccd4cf09-a79d-46c2-9aae-06a1698d6c8f";
  const String EFFECT_TYPE_UUID_VOLUME = "09e8ede0-ddde-11db-b4f6-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_VIRTUALIZER = "37cc2c00-dddd-11db-8577-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_VISUALIZER = "d069d9e0-8329-11df-9168-0002a5d5c51b";
  const String EFFECT_TYPE_UUID_VOLUME = "fa81a2b8-588b-11ed-9b6a-0242ac120002";
  @VintfStability
  parcelable Identity {
    android.media.audio.common.AudioUuid type;
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ union Parameter {
  android.media.audio.common.AudioDeviceDescription[] deviceDescription;
  android.media.audio.common.AudioMode mode;
  android.media.audio.common.AudioSource source;
  boolean offload;
  android.hardware.audio.effect.Parameter.VolumeStereo volumeStereo;
  android.hardware.audio.effect.Parameter.Specific specific;
  @VintfStability
+31 −22
Original line number Diff line number Diff line
@@ -37,61 +37,70 @@ parcelable Descriptor {
     * UUID for effect types, these definitions are in sync with SDK, see @c AudioEffect.java.
     */
    /**
     * UUID for environmental reverberation effect type.
     * UUID for Acoustic Echo Canceler (AEC) type.
     */
    const String EFFECT_TYPE_UUID_ENV_REVERB = "c2e5d5f0-94bd-4763-9cac-4e234d06839e";
    const String EFFECT_TYPE_UUID_AEC = "7b491460-8d4d-11e0-bd61-0002a5d5c51b";

    /**
     * UUID for preset reverberation effect type.
     * UUID for Automatic Gain Control V1 (AGC1) type.
     */
    const String EFFECT_TYPE_UUID_PRESET_REVERB = "47382d60-ddd8-11db-bf3a-0002a5d5c51b";
    const String EFFECT_TYPE_UUID_AGC1 = "0a8abfe0-654c-11e0-ba26-0002a5d5c51b";
    /**
     * UUID for equalizer effect type.
     * UUID for Automatic Gain Control V2 (AGC2) type.
     */
    const String EFFECT_TYPE_UUID_EQUALIZER = "0bed4300-ddd6-11db-8f34-0002a5d5c51b";
    const String EFFECT_TYPE_UUID_AGC2 = "ae3c653b-be18-4ab8-8938-418f0a7f06ac";
    /**
     * UUID for bass boost effect type.
     */
    const String EFFECT_TYPE_UUID_BASS_BOOST = "0634f220-ddd4-11db-a0fc-0002a5d5c51b";
    /**
     * UUID for virtualizer effect type.
     * UUID for downmix effect type.
     */
    const String EFFECT_TYPE_UUID_VIRTUALIZER = "37cc2c00-dddd-11db-8577-0002a5d5c51b";
    const String EFFECT_TYPE_UUID_DOWNMIX = "381e49cc-a858-4aa2-87f6-e8388e7601b2";
    /**
     * UUID for Automatic Gain Control V1 (AGC1) type.
     * UUID for Dynamics Processing type.
     */
    const String EFFECT_TYPE_UUID_AGC1 = "0a8abfe0-654c-11e0-ba26-0002a5d5c51b";
    const String EFFECT_TYPE_UUID_DYNAMICS_PROCESSING = "7261676f-6d75-7369-6364-28e2fd3ac39e";
    /**
     * UUID for Automatic Gain Control V2 (AGC2) type.
     * UUID for environmental reverberation effect type.
     */
    const String EFFECT_TYPE_UUID_AGC2 = "ae3c653b-be18-4ab8-8938-418f0a7f06ac";
    const String EFFECT_TYPE_UUID_ENV_REVERB = "c2e5d5f0-94bd-4763-9cac-4e234d06839e";
    /**
     * UUID for Acoustic Echo Canceler (AEC) type.
     * UUID for equalizer effect type.
     */
    const String EFFECT_TYPE_UUID_AEC = "7b491460-8d4d-11e0-bd61-0002a5d5c51b";
    const String EFFECT_TYPE_UUID_EQUALIZER = "0bed4300-ddd6-11db-8f34-0002a5d5c51b";
    /**
     * UUID for Noise Suppressor (NS) type.
     * UUID for Haptic Generator type.
     */
    const String EFFECT_TYPE_UUID_NS = "58b4b260-8e06-11e0-aa8e-0002a5d5c51b";
    const String EFFECT_TYPE_UUID_HAPTIC_GENERATOR = "1411e6d6-aecd-4021-a1cf-a6aceb0d71e5";
    /**
     * UUID for Loudness Enhancer type.
     */
    const String EFFECT_TYPE_UUID_LOUDNESS_ENHANCER = "fe3199be-aed0-413f-87bb-11260eb63cf1";
    /**
     * UUID for Dynamics Processing type.
     * UUID for Noise Suppressor (NS) type.
     */
    const String EFFECT_TYPE_UUID_DYNAMICS_PROCESSING = "7261676f-6d75-7369-6364-28e2fd3ac39e";
    const String EFFECT_TYPE_UUID_NS = "58b4b260-8e06-11e0-aa8e-0002a5d5c51b";
    /**
     * UUID for Haptic Generator type.
     * UUID for preset reverberation effect type.
     */
    const String EFFECT_TYPE_UUID_HAPTIC_GENERATOR = "1411e6d6-aecd-4021-a1cf-a6aceb0d71e5";
    const String EFFECT_TYPE_UUID_PRESET_REVERB = "47382d60-ddd8-11db-bf3a-0002a5d5c51b";
    /**
     * UUID for Spatializer type.
     */
    const String EFFECT_TYPE_UUID_SPATIALIZER = "ccd4cf09-a79d-46c2-9aae-06a1698d6c8f";
    /**
     * UUID for Volume type. The volume effect is used for automated tests only.
     * UUID for virtualizer effect type.
     */
    const String EFFECT_TYPE_UUID_VIRTUALIZER = "37cc2c00-dddd-11db-8577-0002a5d5c51b";
    /**
     * UUID for visualizer effect type.
     */
    const String EFFECT_TYPE_UUID_VISUALIZER = "d069d9e0-8329-11df-9168-0002a5d5c51b";
    /**
     * UUID for Volume effect type.
     */
    const String EFFECT_TYPE_UUID_VOLUME = "09e8ede0-ddde-11db-b4f6-0002a5d5c51b";
    const String EFFECT_TYPE_UUID_VOLUME = "fa81a2b8-588b-11ed-9b6a-0242ac120002";

    /**
     * This structure completely identifies an effect implementation.
+7 −7
Original line number Diff line number Diff line
@@ -112,31 +112,31 @@ parcelable Flags {
    HardwareAccelerator hwAcceleratorMode = HardwareAccelerator.NONE;

    /**
     * Effect instance set this flag to true if it requires update on if the playback thread the
     * effect attached to is offloaded or not. In this case the framework must call
     * Effect instance sets this flag to true if it requires updates on whether the playback thread
     * the effect is attached to is offloaded or not.  In this case the framework must call
     * IEffect.setParameter(Parameter.offload) to notify effect instance when playback thread
     * offload changes.
     */
    boolean offloadIndication;

    /**
     * Effect instance set this flag to true if it requires device change update. In this case the
     * Effect instance sets this flag to true if it requires device change update. In this case the
     * framework must call IEffect.setParameter(Parameter.device) to notify effect instance when the
     * device changes.
     */
    boolean deviceIndication;

    /**
     * Effect instance set this flag to true if it requires audio mode change update. In this case
     * Effect instance sets this flag to true if it requires audio mode change update. In this case
     * the framework must call IEffect.setParameter(Parameter.mode) to notify effect instance when
     * the audio mode changes.
     */
    boolean audioModeIndication;

    /**
     * Effect instance set this flag to true if it requires audio source change update. In this case
     * the framework must call IEffect.setParameter(Parameter.source) to notify effect instance when
     * the audio source changes.
     * Effect instance sets this flag to true if it requires audio source change update. In this
     * case the framework must call IEffect.setParameter(Parameter.source) to notify effect instance
     * when the audio source changes.
     */
    boolean audioSourceIndication;

+8 −0
Original line number Diff line number Diff line
@@ -135,17 +135,25 @@ union Parameter {
     * Effect must implement setParameter(deviceDescription) if Flags.deviceIndication set to true.
     */
    AudioDeviceDescription[] deviceDescription;

    /**
     * Used by audio framework to set the audio mode to effect engine.
     * Effect must implement setParameter(mode) if Flags.audioModeIndication set to true.
     */
    AudioMode mode;

    /**
     * Used by audio framework to set the audio source to effect engine.
     * Effect must implement setParameter(source) if Flags.audioSourceIndication set to true.
     */
    AudioSource source;

    /**
     * Used by audio framework to indicate whether the playback thread the effect is attached to is
     * offloaded or not.
     */
    boolean offload;

    /**
     * The volume gain for left and right channel, left and right equals to same value if it's mono.
     */