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

Commit bbefdc5d authored by Shunkai Yao's avatar Shunkai Yao Committed by Gerrit Code Review
Browse files

Merge changes from topic "aidl_audio_effect_5"

* changes:
  AIDL effect: Add Equalizer parameters implementation and vts
  AIDL effect: Add Equalizer parameters definition
parents 9fbde6a0 a4ab38ca
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -59,5 +59,9 @@ parcelable Descriptor {
  @VintfStability
  parcelable Common {
    android.hardware.audio.effect.Descriptor.Identity id;
    int cpuLoad;
    int memoryUsage;
    @utf8InCpp String name;
    @utf8InCpp String implementor;
  }
}
+22 −2
Original line number Diff line number Diff line
@@ -35,12 +35,32 @@ package android.hardware.audio.effect;
@VintfStability
union Equalizer {
  android.hardware.audio.effect.Equalizer.VendorExtension vendor;
  android.hardware.audio.effect.Equalizer.BandLevel[] bandLevels;
  int preset;
  @VintfStability
  parcelable Capability {
  parcelable VendorExtension {
    ParcelableHolder extension;
  }
  @VintfStability
  parcelable VendorExtension {
  parcelable Capability {
    ParcelableHolder extension;
    android.hardware.audio.effect.Equalizer.BandFrequency[] bandFrequencies;
    android.hardware.audio.effect.Equalizer.Preset[] presets;
  }
  @VintfStability
  parcelable BandLevel {
    int index;
    int level;
  }
  @VintfStability
  parcelable BandFrequency {
    int index;
    int min;
    int max;
  }
  @VintfStability
  parcelable Preset {
    int index;
    @utf8InCpp String name;
  }
}
+37 −0
Original line number Diff line number Diff line
@@ -34,4 +34,41 @@
package android.hardware.audio.effect;
@VintfStability
parcelable Flags {
  android.hardware.audio.effect.Flags.Type type = android.hardware.audio.effect.Flags.Type.INSERT;
  android.hardware.audio.effect.Flags.Insert insert = android.hardware.audio.effect.Flags.Insert.ANY;
  android.hardware.audio.effect.Flags.Volume volume = android.hardware.audio.effect.Flags.Volume.NONE;
  android.hardware.audio.effect.Flags.HardwareAccelerator hwAcceleratorMode = android.hardware.audio.effect.Flags.HardwareAccelerator.NONE;
  boolean offloadIndication;
  boolean deviceIndication;
  boolean audioModeIndication;
  boolean audioSourceIndication;
  boolean noProcessing;
  @Backing(type="byte") @VintfStability
  enum Type {
    INSERT = 0,
    AUXILIARY = 1,
    REPLACE = 2,
    PRE_PROC = 3,
    POST_PROC = 4,
  }
  @Backing(type="byte") @VintfStability
  enum Insert {
    ANY = 0,
    FIRST = 1,
    LAST = 2,
    EXCLUSIVE = 3,
  }
  @Backing(type="byte") @VintfStability
  enum Volume {
    NONE = 0,
    CTRL = 1,
    IND = 2,
    MONITOR = 3,
  }
  @Backing(type="byte") @VintfStability
  enum HardwareAccelerator {
    NONE = 0,
    SIMPLE = 1,
    TUNNEL = 2,
  }
}
+16 −2
Original line number Diff line number Diff line
@@ -35,28 +35,42 @@ package android.hardware.audio.effect;
@VintfStability
union Parameter {
  android.hardware.audio.effect.Parameter.Common common;
  android.media.audio.common.AudioDeviceType device;
  android.media.audio.common.AudioMode mode;
  android.media.audio.common.AudioSource source;
  android.hardware.audio.effect.Parameter.Volume volume;
  boolean offload;
  android.hardware.audio.effect.Parameter.VendorEffectParameter vendorEffect;
  android.hardware.audio.effect.Parameter.Specific specific;
  @VintfStability
  union Id {
    int commonTag;
    int vendorTag;
    android.hardware.audio.effect.Parameter.Specific.Tag specificTag;
    android.hardware.audio.effect.Parameter.Specific.Id specificId;
  }
  @VintfStability
  parcelable Common {
    int session;
    int ioHandle;
    android.media.audio.common.AudioDeviceDescription device;
    android.media.audio.common.AudioConfig input;
    android.media.audio.common.AudioConfig output;
  }
  @VintfStability
  parcelable Volume {
    float left;
    float right;
  }
  @VintfStability
  parcelable VendorEffectParameter {
    ParcelableHolder extension;
  }
  @VintfStability
  union Specific {
    android.hardware.audio.effect.Parameter.Specific.Id id;
    android.hardware.audio.effect.Equalizer equalizer;
    @VintfStability
    union Id {
      android.hardware.audio.effect.Equalizer.Tag equalizerTag = android.hardware.audio.effect.Equalizer.Tag.vendor;
    }
  }
}
+9 −4
Original line number Diff line number Diff line
@@ -27,7 +27,9 @@ package android.hardware.audio.effect;
@VintfStability
@Backing(type="int")
enum CommandId {
    /// MUST be supported by all effects
    /**
     * Commands MUST be supported by all effects.
     */
    /**
     * Start effect engine processing.
     * An effect instance must start processing data and transfer to PROCESSING state if it is in
@@ -53,10 +55,13 @@ enum CommandId {
     */
    RESET = 2,

    /// MUST be supported by a specific type of effect.
    // Commands must supported by Equalizer.
    /**
     * Commands MUST be supported by a specific type of effect.
     */

    /// Extension commands for vendor.
    /**
     * Extension commands for vendor.
     */
    VENDOR_COMMAND_0 = 0x100,
    VENDOR_COMMAND_1,
    VENDOR_COMMAND_2,
Loading