Merge "[owners] Remove etancohen@google.com from wifi/keystore/1.0/vts/functional/OWNERS" into main
diff --git a/keystore2/OWNERS b/keystore2/OWNERS
new file mode 100644
index 0000000..f09d658
--- /dev/null
+++ b/keystore2/OWNERS
@@ -0,0 +1 @@
+file:platform/system/security:/keystore2/OWNERS
diff --git a/keystore2/aidl/Android.bp b/keystore2/aidl/Android.bp
index a88f0a3..9119489 100644
--- a/keystore2/aidl/Android.bp
+++ b/keystore2/aidl/Android.bp
@@ -20,7 +20,7 @@
     name: "android.system.keystore2",
     vendor_available: true,
     srcs: ["android/system/keystore2/*.aidl"],
-    imports: ["android.hardware.security.keymint-V3"],
+    defaults: ["android.hardware.security.keymint-latest-defaults"],
     stability: "vintf",
     backend: {
         java: {
@@ -54,18 +54,19 @@
             version: "4",
             imports: ["android.hardware.security.keymint-V3"],
         },
+        {
+            version: "5",
+            imports: ["android.hardware.security.keymint-V4"],
+        },
 
     ],
     frozen: true,
 
 }
 
-// Note: This should always be one version ahead of the last frozen version
-latest_android_system_keystore = "android.system.keystore-V4"
-
 aidl_interface_defaults {
-    name: "latest_android_system_keystore_import_interface",
+    name: "android.system.keystore2-latest-defaults",
     imports: [
-        latest_android_system_keystore,
+        "android.system.keystore2-V5",
     ],
 }
diff --git a/keystore2/aidl/aidl_api/android.system.keystore2/5/.hash b/keystore2/aidl/aidl_api/android.system.keystore2/5/.hash
new file mode 100644
index 0000000..9832228
--- /dev/null
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/.hash
@@ -0,0 +1 @@
+98d815116c190250e9e5a1d9182cea8126fd0e97
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/AuthenticatorSpec.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/AuthenticatorSpec.aidl
index 5135bcd..49a3b2c 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/AuthenticatorSpec.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@VintfStability
+parcelable AuthenticatorSpec {
+  android.hardware.security.keymint.HardwareAuthenticatorType authenticatorType = android.hardware.security.keymint.HardwareAuthenticatorType.NONE;
+  long authenticatorId;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/Authorization.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/Authorization.aidl
index 5135bcd..3efeb68 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/Authorization.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@VintfStability
+parcelable Authorization {
+  android.hardware.security.keymint.SecurityLevel securityLevel = android.hardware.security.keymint.SecurityLevel.SOFTWARE;
+  android.hardware.security.keymint.KeyParameter keyParameter;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/CreateOperationResponse.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/CreateOperationResponse.aidl
index 5135bcd..e37facb 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/CreateOperationResponse.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,12 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@VintfStability
+parcelable CreateOperationResponse {
+  android.system.keystore2.IKeystoreOperation iOperation;
+  @nullable android.system.keystore2.OperationChallenge operationChallenge;
+  @nullable android.system.keystore2.KeyParameters parameters;
+  @nullable byte[] upgradedBlob;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/Domain.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/Domain.aidl
index 5135bcd..4fd54aa 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/Domain.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,13 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum Domain {
+  APP = 0,
+  GRANT = 1,
+  SELINUX = 2,
+  BLOB = 3,
+  KEY_ID = 4,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/EphemeralStorageKeyResponse.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/EphemeralStorageKeyResponse.aidl
index 5135bcd..963af7b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/EphemeralStorageKeyResponse.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2021, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@VintfStability
+parcelable EphemeralStorageKeyResponse {
+  byte[] ephemeralKey;
+  @nullable byte[] upgradedBlob;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreOperation.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreOperation.aidl
index 5135bcd..df911cd 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreOperation.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,12 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@SensitiveData @VintfStability
+interface IKeystoreOperation {
+  void updateAad(in byte[] aadInput);
+  @nullable byte[] update(in byte[] input);
+  @nullable byte[] finish(in @nullable byte[] input, in @nullable byte[] signature);
+  void abort();
 }
diff --git a/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreSecurityLevel.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreSecurityLevel.aidl
new file mode 100644
index 0000000..4b2eab4
--- /dev/null
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreSecurityLevel.aidl
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.system.keystore2;
+/* @hide */
+@SensitiveData @VintfStability
+interface IKeystoreSecurityLevel {
+  android.system.keystore2.CreateOperationResponse createOperation(in android.system.keystore2.KeyDescriptor key, in android.hardware.security.keymint.KeyParameter[] operationParameters, in boolean forced);
+  android.system.keystore2.KeyMetadata generateKey(in android.system.keystore2.KeyDescriptor key, in @nullable android.system.keystore2.KeyDescriptor attestationKey, in android.hardware.security.keymint.KeyParameter[] params, in int flags, in byte[] entropy);
+  android.system.keystore2.KeyMetadata importKey(in android.system.keystore2.KeyDescriptor key, in @nullable android.system.keystore2.KeyDescriptor attestationKey, in android.hardware.security.keymint.KeyParameter[] params, in int flags, in byte[] keyData);
+  android.system.keystore2.KeyMetadata importWrappedKey(in android.system.keystore2.KeyDescriptor key, in android.system.keystore2.KeyDescriptor wrappingKey, in @nullable byte[] maskingKey, in android.hardware.security.keymint.KeyParameter[] params, in android.system.keystore2.AuthenticatorSpec[] authenticators);
+  android.system.keystore2.EphemeralStorageKeyResponse convertStorageKeyToEphemeral(in android.system.keystore2.KeyDescriptor storageKey);
+  void deleteKey(in android.system.keystore2.KeyDescriptor key);
+  const int KEY_FLAG_AUTH_BOUND_WITHOUT_CRYPTOGRAPHIC_LSKF_BINDING = 0x1;
+}
diff --git a/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreService.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreService.aidl
new file mode 100644
index 0000000..0c292c8
--- /dev/null
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/IKeystoreService.aidl
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.system.keystore2;
+/* @hide */
+@VintfStability
+interface IKeystoreService {
+  android.system.keystore2.IKeystoreSecurityLevel getSecurityLevel(in android.hardware.security.keymint.SecurityLevel securityLevel);
+  android.system.keystore2.KeyEntryResponse getKeyEntry(in android.system.keystore2.KeyDescriptor key);
+  void updateSubcomponent(in android.system.keystore2.KeyDescriptor key, in @nullable byte[] publicCert, in @nullable byte[] certificateChain);
+  /**
+   * @deprecated use listEntriesBatched instead.
+   */
+  android.system.keystore2.KeyDescriptor[] listEntries(in android.system.keystore2.Domain domain, in long nspace);
+  void deleteKey(in android.system.keystore2.KeyDescriptor key);
+  android.system.keystore2.KeyDescriptor grant(in android.system.keystore2.KeyDescriptor key, in int granteeUid, in int accessVector);
+  void ungrant(in android.system.keystore2.KeyDescriptor key, in int granteeUid);
+  int getNumberOfEntries(in android.system.keystore2.Domain domain, in long nspace);
+  android.system.keystore2.KeyDescriptor[] listEntriesBatched(in android.system.keystore2.Domain domain, in long nspace, in @nullable String startingPastAlias);
+  byte[] getSupplementaryAttestationInfo(in android.hardware.security.keymint.Tag tag);
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyDescriptor.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyDescriptor.aidl
index 5135bcd..79478aa 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyDescriptor.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,12 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@RustDerive(Clone=true, Eq=true, Ord=true, PartialEq=true, PartialOrd=true) @VintfStability
+parcelable KeyDescriptor {
+  android.system.keystore2.Domain domain = android.system.keystore2.Domain.APP;
+  long nspace;
+  @nullable String alias;
+  @nullable byte[] blob;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyEntryResponse.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyEntryResponse.aidl
index 5135bcd..ea313b3 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyEntryResponse.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@VintfStability
+parcelable KeyEntryResponse {
+  @nullable android.system.keystore2.IKeystoreSecurityLevel iSecurityLevel;
+  android.system.keystore2.KeyMetadata metadata;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyMetadata.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyMetadata.aidl
index 5135bcd..fef4531 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyMetadata.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,14 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@VintfStability
+parcelable KeyMetadata {
+  android.system.keystore2.KeyDescriptor key;
+  android.hardware.security.keymint.SecurityLevel keySecurityLevel = android.hardware.security.keymint.SecurityLevel.SOFTWARE;
+  android.system.keystore2.Authorization[] authorizations;
+  @nullable byte[] certificate;
+  @nullable byte[] certificateChain;
+  long modificationTimeMs;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyParameters.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyParameters.aidl
index 5135bcd..f9c836a 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyParameters.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@VintfStability
+parcelable KeyParameters {
+  android.hardware.security.keymint.KeyParameter[] keyParameter;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyPermission.aidl
similarity index 72%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyPermission.aidl
index 5135bcd..3009fb6 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/KeyPermission.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,21 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
+@Backing(type="int") @VintfStability
+enum KeyPermission {
   NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+  DELETE = 0x1,
+  GEN_UNIQUE_ID = 0x2,
+  GET_INFO = 0x4,
+  GRANT = 0x8,
+  MANAGE_BLOB = 0x10,
+  REBIND = 0x20,
+  REQ_FORCED_OP = 0x40,
+  UPDATE = 0x80,
+  USE = 0x100,
+  USE_DEV_ID = 0x200,
+  USE_NO_LSKF_BINDING = 0x400,
+  CONVERT_STORAGE_KEY_TO_EPHEMERAL = 0x800,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/OperationChallenge.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/OperationChallenge.aidl
index 5135bcd..0a079fb 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/OperationChallenge.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@VintfStability
+parcelable OperationChallenge {
+  long challenge;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/ResponseCode.aidl
similarity index 66%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/ResponseCode.aidl
index 5135bcd..51dddf0 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/5/android/system/keystore2/ResponseCode.aidl
@@ -1,11 +1,11 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2020, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -31,25 +31,29 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.system.keystore2;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum ResponseCode {
+  LOCKED = 2,
+  UNINITIALIZED = 3,
+  SYSTEM_ERROR = 4,
+  PERMISSION_DENIED = 6,
+  KEY_NOT_FOUND = 7,
+  VALUE_CORRUPTED = 8,
+  KEY_PERMANENTLY_INVALIDATED = 17,
+  BACKEND_BUSY = 18,
+  OPERATION_BUSY = 19,
+  INVALID_ARGUMENT = 20,
+  TOO_MUCH_DATA = 21,
+  /**
+   * @deprecated replaced by other OUT_OF_KEYS_* errors below
+   */
+  OUT_OF_KEYS = 22,
+  OUT_OF_KEYS_REQUIRES_SYSTEM_UPGRADE = 23,
+  OUT_OF_KEYS_PENDING_INTERNET_CONNECTIVITY = 24,
+  OUT_OF_KEYS_TRANSIENT_ERROR = 25,
+  OUT_OF_KEYS_PERMANENT_ERROR = 26,
+  GET_ATTESTATION_APPLICATION_ID_FAILED = 27,
+  INFO_NOT_AVAILABLE = 28,
 }
diff --git a/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/IKeystoreService.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/IKeystoreService.aidl
index d2f03cf..0c292c8 100644
--- a/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/IKeystoreService.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/IKeystoreService.aidl
@@ -47,4 +47,5 @@
   void ungrant(in android.system.keystore2.KeyDescriptor key, in int granteeUid);
   int getNumberOfEntries(in android.system.keystore2.Domain domain, in long nspace);
   android.system.keystore2.KeyDescriptor[] listEntriesBatched(in android.system.keystore2.Domain domain, in long nspace, in @nullable String startingPastAlias);
+  byte[] getSupplementaryAttestationInfo(in android.hardware.security.keymint.Tag tag);
 }
diff --git a/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/ResponseCode.aidl b/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/ResponseCode.aidl
index e1ff0bb..51dddf0 100644
--- a/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/ResponseCode.aidl
+++ b/keystore2/aidl/aidl_api/android.system.keystore2/current/android/system/keystore2/ResponseCode.aidl
@@ -55,4 +55,5 @@
   OUT_OF_KEYS_TRANSIENT_ERROR = 25,
   OUT_OF_KEYS_PERMANENT_ERROR = 26,
   GET_ATTESTATION_APPLICATION_ID_FAILED = 27,
+  INFO_NOT_AVAILABLE = 28,
 }
diff --git a/keystore2/aidl/android/system/keystore2/IKeystoreService.aidl b/keystore2/aidl/android/system/keystore2/IKeystoreService.aidl
index 9beac0a..886047d 100644
--- a/keystore2/aidl/android/system/keystore2/IKeystoreService.aidl
+++ b/keystore2/aidl/android/system/keystore2/IKeystoreService.aidl
@@ -17,14 +17,15 @@
 package android.system.keystore2;
 
 import android.hardware.security.keymint.SecurityLevel;
+import android.hardware.security.keymint.Tag;
 import android.system.keystore2.Domain;
 import android.system.keystore2.IKeystoreSecurityLevel;
 import android.system.keystore2.KeyDescriptor;
 import android.system.keystore2.KeyEntryResponse;
 
 /**
- * `IKeystoreService` is the primary interface to Keystore. It provides
- * access simple database bound requests. Request that require interactions
+ * `IKeystoreService` is the primary interface to Keystore. It primarily provides
+ * access to simple database bound requests. Request that require interactions
  * with a KeyMint backend are delegated to `IKeystoreSecurityLevel` which
  * may be acquired through this interface as well.
  *
@@ -246,4 +247,21 @@
     KeyDescriptor[] listEntriesBatched(in Domain domain, in long nspace,
             in @nullable String startingPastAlias);
 
+    /**
+     * Returns tag-specific info required to interpret a tag's attested value.
+     * Attested values themselves are located in the attestation certificate.
+     *
+     * The semantics of the return value is specific to the input tag:
+     *
+     * o Tag::MODULE_HASH: returns the DER-encoded structure corresponding to the `Modules` schema
+     *   described in the KeyMint HAL's KeyCreationResult.aidl. The SHA-256 hash of this encoded
+     *   structure is what's included with the tag in attestations. To ensure the returned encoded
+     *   structure is the one attested to, clients should verify its SHA-256 hash matches the one
+     *   in the attestation. Note that the returned structure can vary between boots.
+     *
+     * ## Error conditions
+     * `ResponseCode::INVALID_ARGUMENT` if `tag` is not specified in the list above.
+     * `ResponseCode::INFO_NOT_AVAILABLE` if `IKeystoreService` does not have the requested info.
+     */
+    byte[] getSupplementaryAttestationInfo(in Tag tag);
 }
diff --git a/keystore2/aidl/android/system/keystore2/ResponseCode.aidl b/keystore2/aidl/android/system/keystore2/ResponseCode.aidl
index 4fe7db3..0424f5b 100644
--- a/keystore2/aidl/android/system/keystore2/ResponseCode.aidl
+++ b/keystore2/aidl/android/system/keystore2/ResponseCode.aidl
@@ -137,4 +137,8 @@
      */
     GET_ATTESTATION_APPLICATION_ID_FAILED = 27,
 
+    /**
+     * Indicates that some information is not available.
+     */
+    INFO_NOT_AVAILABLE = 28,
 }
diff --git a/media/Android.bp b/media/Android.bp
index 5ba8985..e32d054 100644
--- a/media/Android.bp
+++ b/media/Android.bp
@@ -68,7 +68,6 @@
         "aidl/android/media/audio/common/AudioOffloadInfo.aidl",
         "aidl/android/media/audio/common/AudioOutputFlags.aidl",
         "aidl/android/media/audio/common/AudioPlaybackRate.aidl",
-        "aidl/android/media/audio/common/AudioPolicyForcedConfig.aidl",
         "aidl/android/media/audio/common/AudioPolicyForceUse.aidl",
         "aidl/android/media/audio/common/AudioPort.aidl",
         "aidl/android/media/audio/common/AudioPortConfig.aidl",
@@ -83,6 +82,7 @@
         "aidl/android/media/audio/common/AudioStreamType.aidl",
         "aidl/android/media/audio/common/AudioUsage.aidl",
         "aidl/android/media/audio/common/AudioUuid.aidl",
+        "aidl/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl",
         "aidl/android/media/audio/common/Boolean.aidl",
         "aidl/android/media/audio/common/Byte.aidl",
         "aidl/android/media/audio/common/ExtraAudioDescriptor.aidl",
@@ -121,7 +121,7 @@
             min_sdk_version: "29",
             apex_available: [
                 "//apex_available:platform",
-                "com.android.btservices",
+                "com.android.bt",
             ],
         },
     },
@@ -138,11 +138,15 @@
             version: "3",
             imports: [],
         },
+        {
+            version: "4",
+            imports: [],
+        },
 
         // IMPORTANT: Update latest_android_media_audio_common_types every time
         // you add the latest frozen version to versions_with_info
     ],
-    frozen: false,
+    frozen: true,
 
 }
 
@@ -266,9 +270,13 @@
             version: "2",
             imports: ["android.media.audio.common.types-V3"],
         },
+        {
+            version: "3",
+            imports: ["android.media.audio.common.types-V4"],
+        },
 
     ],
-    frozen: false,
+    frozen: true,
 
 }
 
@@ -340,3 +348,117 @@
         latest_android_media_soundtrigger_types,
     ],
 }
+
+aidl_interface {
+    name: "android.media.audio.eraser.types",
+    vendor_available: true,
+    host_supported: true,
+    flags: [
+        "-Werror",
+        "-Weverything",
+    ],
+    local_include_dir: "aidl",
+    srcs: [
+        "aidl/android/media/audio/eraser/Capability.aidl",
+        "aidl/android/media/audio/eraser/Classification.aidl",
+        "aidl/android/media/audio/eraser/ClassificationConfig.aidl",
+        "aidl/android/media/audio/eraser/ClassificationMetadata.aidl",
+        "aidl/android/media/audio/eraser/ClassificationMetadataList.aidl",
+        "aidl/android/media/audio/eraser/ClassifierCapability.aidl",
+        "aidl/android/media/audio/eraser/Configuration.aidl",
+        "aidl/android/media/audio/eraser/IEraserCallback.aidl",
+        "aidl/android/media/audio/eraser/Mode.aidl",
+        "aidl/android/media/audio/eraser/RemixerCapability.aidl",
+        "aidl/android/media/audio/eraser/SeparatorCapability.aidl",
+        "aidl/android/media/audio/eraser/SoundClassification.aidl",
+    ],
+    stability: "vintf",
+    backend: {
+        cpp: {
+            enabled: true,
+        },
+        java: {
+            sdk_version: "module_current",
+        },
+    },
+    imports: [
+        latest_android_media_audio_common_types,
+    ],
+    frozen: true,
+    versions_with_info: [
+        {
+            version: "1",
+            imports: ["android.media.audio.common.types-V4"],
+        },
+    ],
+
+}
+
+// Note: This should always be one version ahead of the last frozen version
+latest_android_media_audio_eraser_types = "android.media.audio.eraser.types-V1"
+
+cc_defaults {
+    name: "latest_android_media_audio_eraser_types_cpp_shared",
+    shared_libs: [
+        latest_android_media_audio_eraser_types + "-cpp",
+    ],
+}
+
+cc_defaults {
+    name: "latest_android_media_audio_eraser_types_cpp_export_shared",
+    defaults: [
+        "latest_android_media_audio_eraser_types_cpp_shared",
+    ],
+    export_shared_lib_headers: [
+        latest_android_media_audio_eraser_types + "-cpp",
+    ],
+}
+
+cc_defaults {
+    name: "latest_android_media_audio_eraser_types_cpp_static",
+    static_libs: [
+        latest_android_media_audio_eraser_types + "-cpp",
+    ],
+}
+
+cc_defaults {
+    name: "latest_android_media_audio_eraser_types_cpp_export_static",
+    defaults: [
+        "latest_android_media_audio_eraser_types_cpp_static",
+    ],
+    export_static_lib_headers: [
+        latest_android_media_audio_eraser_types + "-cpp",
+    ],
+}
+
+cc_defaults {
+    name: "latest_android_media_audio_eraser_types_ndk_shared",
+    shared_libs: [
+        latest_android_media_audio_eraser_types + "-ndk",
+    ],
+}
+
+cc_defaults {
+    name: "latest_android_media_audio_eraser_types_ndk_static",
+    static_libs: [
+        latest_android_media_audio_eraser_types + "-ndk",
+    ],
+}
+
+cc_defaults {
+    name: "latest_android_media_audio_eraser_types_cpp_target_shared",
+    target: {
+        android: {
+            shared_libs: [
+                latest_android_media_audio_eraser_types + "-cpp",
+            ],
+        },
+    },
+}
+
+aidl_interface_defaults {
+    name: "latest_android_media_audio_eraser_types_import_interface",
+    imports: [
+        latest_android_media_audio_eraser_types,
+    ],
+}
diff --git a/media/aidl/android/media/audio/common/AudioChannelLayout.aidl b/media/aidl/android/media/audio/common/AudioChannelLayout.aidl
index 409e964..6f94823 100644
--- a/media/aidl/android/media/audio/common/AudioChannelLayout.aidl
+++ b/media/aidl/android/media/audio/common/AudioChannelLayout.aidl
@@ -153,11 +153,12 @@
             LAYOUT_7POINT1POINT4 | CHANNEL_FRONT_WIDE_LEFT | CHANNEL_FRONT_WIDE_RIGHT;
     const int LAYOUT_9POINT1POINT6 =
             LAYOUT_9POINT1POINT4 | CHANNEL_TOP_SIDE_LEFT | CHANNEL_TOP_SIDE_RIGHT;
-    const int LAYOUT_13POINT_360RA = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT | CHANNEL_FRONT_CENTER
+    const int LAYOUT_13POINT0 = CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT | CHANNEL_FRONT_CENTER
             | CHANNEL_SIDE_LEFT | CHANNEL_SIDE_RIGHT | CHANNEL_TOP_FRONT_LEFT
             | CHANNEL_TOP_FRONT_RIGHT | CHANNEL_TOP_FRONT_CENTER | CHANNEL_TOP_BACK_LEFT
             | CHANNEL_TOP_BACK_RIGHT | CHANNEL_BOTTOM_FRONT_LEFT | CHANNEL_BOTTOM_FRONT_RIGHT
             | CHANNEL_BOTTOM_FRONT_CENTER;
+    const int LAYOUT_13POINT_360RA = LAYOUT_13POINT0;
     const int LAYOUT_22POINT2 = LAYOUT_7POINT1POINT4 | CHANNEL_FRONT_LEFT_OF_CENTER
             | CHANNEL_FRONT_RIGHT_OF_CENTER | CHANNEL_BACK_CENTER | CHANNEL_TOP_CENTER
             | CHANNEL_TOP_FRONT_CENTER | CHANNEL_TOP_BACK_CENTER | CHANNEL_TOP_SIDE_LEFT
diff --git a/media/aidl/android/media/audio/common/AudioDeviceType.aidl b/media/aidl/android/media/audio/common/AudioDeviceType.aidl
index 5a75da7..79f00fa 100644
--- a/media/aidl/android/media/audio/common/AudioDeviceType.aidl
+++ b/media/aidl/android/media/audio/common/AudioDeviceType.aidl
@@ -192,4 +192,12 @@
      * See the note on `IN_BUS` for details.
      */
     OUT_BUS = OUT_DEVICE,
+    /**
+     * Output to a wireless speaker group supporting multichannel contents. The
+     * speakers in the group are connected together using local network based
+     * protocols. The speaker group requires additional input of the physical
+     * positions of each individual speaker to provide a better experience on
+     * multichannel contents.
+     */
+    OUT_MULTICHANNEL_GROUP = 147,
 }
diff --git a/media/aidl/android/media/audio/common/AudioHalCapCriterionV2.aidl b/media/aidl/android/media/audio/common/AudioHalCapCriterionV2.aidl
index 5b981f2..2416bca 100644
--- a/media/aidl/android/media/audio/common/AudioHalCapCriterionV2.aidl
+++ b/media/aidl/android/media/audio/common/AudioHalCapCriterionV2.aidl
@@ -20,7 +20,6 @@
 import android.media.audio.common.AudioDeviceDescription;
 import android.media.audio.common.AudioMode;
 import android.media.audio.common.AudioPolicyForceUse;
-import android.media.audio.common.AudioPolicyForcedConfig;
 
 /**
  * AudioHalCapCriterion is a wrapper for a CriterionType and its default value.
@@ -48,12 +47,13 @@
      */
     @VintfStability
     parcelable ForceConfigForUse {
-        /**  Force usage addressed by this criterion. */
-        AudioPolicyForceUse forceUse = AudioPolicyForceUse.MEDIA;
         /** List of supported value by this criterion. */
-        AudioPolicyForcedConfig[] values;
-        /** Default configuration applied if none is provided. */
-        AudioPolicyForcedConfig defaultValue = AudioPolicyForcedConfig.NONE;
+        AudioPolicyForceUse[] values;
+        /**
+         * Default configuration applied if none is provided. This is the default-initialized
+         * value of 'AudioPolicyForceUse' which is 'forMedia = NONE'.
+         */
+        AudioPolicyForceUse defaultValue;
         /** Logic followed by this criterion, only one value at given time. */
         LogicalDisjunction logic = LogicalDisjunction.EXCLUSIVE;
     }
@@ -70,6 +70,10 @@
         /** Logic followed by this criterion, only one value at given time. */
         LogicalDisjunction logic = LogicalDisjunction.EXCLUSIVE;
     }
+    /**
+     * Available device type criterion. It is used to force routing when an input or
+     * output device of a certain type is available.
+     */
     @VintfStability
     parcelable AvailableDevices {
         /** List if supported values (aka audio devices) by this criterion. */
@@ -77,6 +81,10 @@
         /** Logic followed by this criterion, multiple devices can be selected/available. */
         LogicalDisjunction logic = LogicalDisjunction.INCLUSIVE;
     }
+    /**
+     * Available device with a certain address criterion. It is used to force routing
+     * when an input or output device at the certain address is available.
+     */
     @VintfStability
     parcelable AvailableDevicesAddresses {
         /** List if supported values (aka audio device addresses) by this criterion. */
@@ -84,22 +92,11 @@
         /** Logic followed by this criterion, multiple device addresses can be available. */
         LogicalDisjunction logic = LogicalDisjunction.INCLUSIVE;
     }
+
     AvailableDevices availableInputDevices;
     AvailableDevices availableOutputDevices;
     AvailableDevicesAddresses availableInputDevicesAddresses;
     AvailableDevicesAddresses availableOutputDevicesAddresses;
     TelephonyMode telephonyMode;
     ForceConfigForUse forceConfigForUse;
-
-    /**
-     * Supported criterion types for Configurable Audio Policy Engine.
-     */
-    @VintfStability
-    union Type {
-        AudioDeviceDescription availableDevicesType;
-        AudioDeviceAddress availableDevicesAddressesType;
-        AudioMode telephonyModeType;
-        AudioPolicyForcedConfig forcedConfigType;
-    }
-    Type type;
 }
diff --git a/media/aidl/android/media/audio/common/AudioHalCapRule.aidl b/media/aidl/android/media/audio/common/AudioHalCapRule.aidl
index aa52796..8f98db8 100644
--- a/media/aidl/android/media/audio/common/AudioHalCapRule.aidl
+++ b/media/aidl/android/media/audio/common/AudioHalCapRule.aidl
@@ -27,9 +27,9 @@
  *      -type of criterion:
  *              -inclusive -> match rules are "Includes" or "Excludes"
  *              -exclusive -> match rules are "Is" or "IsNot" aka equal or different
- *      -Name of the criterion must match the provided name in AudioHalCapCriterion
+ *      -Name of the criterion must match the provided name in AudioHalCapCriterionV2
  *      -Value of the criterion must match the provided list of literal values from
- *         AudioHalCapCriterionType
+ *         associated AudioHalCapCriterionV2 values
  * Example of rule:
  *      ALL
  *          ANY
@@ -105,14 +105,11 @@
     parcelable CriterionRule {
         MatchingRule matchingRule = MatchingRule.INVALID;
         /*
-         * Must be one of the name defined by {@see AudioHalCapCriterionV2}.
+         * Must be one of the names defined by {@see AudioHalCapCriterionV2}.
+         * By convention, when AudioHalCapCriterionV2 is used as a rule, the rule uses
+         * the first element of the 'values' field which must be a non-empty array.
          */
-        AudioHalCapCriterionV2 criterion;
-        /*
-         * Must be one of the value defined by {@see AudioHalCapCriterionV2::Type}.
-         * Must be one of the associated {@see AudioHalCapCriterionV2} values.
-         */
-        AudioHalCapCriterionV2.Type criterionTypeValue;
+        AudioHalCapCriterionV2 criterionAndValue;
     }
     /*
      * Defines the AND or OR'ed logcal rule between provided criterion rules if any and provided
diff --git a/media/aidl/android/media/audio/common/AudioHalProductStrategy.aidl b/media/aidl/android/media/audio/common/AudioHalProductStrategy.aidl
index c3bc656..612db84 100644
--- a/media/aidl/android/media/audio/common/AudioHalProductStrategy.aidl
+++ b/media/aidl/android/media/audio/common/AudioHalProductStrategy.aidl
@@ -29,6 +29,15 @@
 @JavaDerive(equals=true, toString=true)
 @VintfStability
 parcelable AudioHalProductStrategy {
+    @VintfStability
+    @Backing(type="int")
+    enum ZoneId {
+        /**
+         * Value indicating that there is no explicit zone associated to the product strategy
+         * It is the case for non-automotive products or for default zone for automotive.
+         */
+        DEFAULT = 0,
+    }
     /**
      * Defines the start of the vendor-defined product strategies
      */
@@ -55,4 +64,16 @@
      * must not be null for any.
      */
     @nullable @utf8InCpp String name;
+     /**
+      * Audio zone id can be used to independently manage audio routing and volume for different
+      * audio device configurations.
+      * In automotive for example, audio zone id can be used to route different user id to different
+      * audio zones. Thus providing independent audio routing and volume management for each user
+      * in the car.
+      * Note:
+      * 1/ Audio zone id must begin at DEFAULT and increment respectively from DEFAULT
+      * (i.e. DEFAULT + 1...).
+      * 2/ Audio zone id can be held by one or more product strategy(ies).
+      */
+    int zoneId = ZoneId.DEFAULT;
 }
diff --git a/media/aidl/android/media/audio/common/AudioPlaybackRate.aidl b/media/aidl/android/media/audio/common/AudioPlaybackRate.aidl
index 3dd474f..45921d5 100644
--- a/media/aidl/android/media/audio/common/AudioPlaybackRate.aidl
+++ b/media/aidl/android/media/audio/common/AudioPlaybackRate.aidl
@@ -71,9 +71,15 @@
         SYS_RESERVED_CUT_REPEAT = -1,
         /** Reserved for use by the framework. */
         SYS_RESERVED_DEFAULT = 0,
-        /** Play silence for parameter values that are out of range. */
+        /**
+         * If possible, play silence for parameter values that are out of range,
+         * otherwise return an error (same as 'FAIL' would return).
+         */
         MUTE = 1,
-        /** Return an error while trying to set the parameters. */
+        /**
+         * Always return an error while trying to set the parameters that are
+         * out of range.
+         */
         FAIL = 2,
     }
     /**
diff --git a/media/aidl/android/media/audio/common/AudioPolicyForceUse.aidl b/media/aidl/android/media/audio/common/AudioPolicyForceUse.aidl
index 017fb30..4a67851 100644
--- a/media/aidl/android/media/audio/common/AudioPolicyForceUse.aidl
+++ b/media/aidl/android/media/audio/common/AudioPolicyForceUse.aidl
@@ -16,48 +16,92 @@
 package android.media.audio.common;
 
 /**
- * List of usages to be used the values from 'AudioPolicyForcedConfig' in order
- * to force audio routing.
+ * "Force Use" specifies high-level routing policies which are used
+ * in order to override the usual routing behavior.
  *
  * {@hide}
  */
-@Backing(type="int")
 @SuppressWarnings(value={"redundant-name"})
 @VintfStability
-enum AudioPolicyForceUse {
-    /**
-     * Configures the audio device used for "communication" (telephony, VoIP) use cases.
-     */
-    COMMUNICATION = 0,
+union AudioPolicyForceUse {
+    @Backing(type="byte")
+    @VintfStability
+    enum CommunicationDeviceCategory {
+        NONE = 0,
+        SPEAKER,
+        BT_SCO,
+        BT_BLE,
+        WIRED_ACCESSORY,
+    }
+    @Backing(type="byte")
+    @VintfStability
+    enum MediaDeviceCategory {
+        NONE = 0,
+        SPEAKER,
+        HEADPHONES,
+        BT_A2DP,
+        ANALOG_DOCK,
+        DIGITAL_DOCK,
+        WIRED_ACCESSORY,
+        NO_BT_A2DP,
+    }
+    @Backing(type="byte")
+    @VintfStability
+    enum DockType {
+        NONE = 0,
+        BT_CAR_DOCK,
+        BT_DESK_DOCK,
+        ANALOG_DOCK,
+        DIGITAL_DOCK,
+        WIRED_ACCESSORY,
+    }
+    @Backing(type="byte")
+    @VintfStability
+    enum EncodedSurroundConfig {
+        UNSPECIFIED = 0,
+        NEVER,
+        ALWAYS,
+        MANUAL,
+    }
+
     /**
      * Configures the audio device used for media playback.
+     * This is also the default value.
      */
-    MEDIA = 1,
+    MediaDeviceCategory forMedia = MediaDeviceCategory.NONE;
+    /**
+     * Configures the audio device used for "communication" (telephony, VoIP) use cases.
+     * Note that 'BT_BLE' and 'WIRED_ACCESSORY' can not be used in this case.
+     */
+    CommunicationDeviceCategory forCommunication = CommunicationDeviceCategory.NONE;
     /**
      * Configures the audio device used for recording.
+     * Note that 'SPEAKER' and 'BT_BLE' can not be used in this case.
      */
-    RECORD = 2,
+    CommunicationDeviceCategory forRecord = CommunicationDeviceCategory.NONE;
+    /**
+     * Configures whether in muted audio mode ringing should also be sent to a BT device.
+     * Note that 'SPEAKER' and 'WIRED_ACCESSORY' can not be used in this case.
+     */
+    CommunicationDeviceCategory forVibrateRinging = CommunicationDeviceCategory.NONE;
     /**
      * Specifies whether the phone is currently placed into a dock. The value of
-     * 'AudioPolicyForcedConfig' specifies the kind of the dock.
+     * specifies the kind of the dock. This field may also be used that sending
+     * of audio to the dock is overridden by another device.
      */
-    DOCK = 3,
+    DockType dock = DockType.NONE;
     /**
      * Specifies whether enforcing of certain sounds is enabled, for example,
      * enforcing of the camera shutter sound.
      */
-    SYSTEM = 4,
+    boolean systemSounds = false;
     /**
      * Specifies whether sending of system audio via HDMI is enabled.
      */
-    HDMI_SYSTEM_AUDIO = 5,
+    boolean hdmiSystemAudio = false;
     /**
      * Configures whether support for encoded surround formats is enabled for
      * applications.
      */
-    ENCODED_SURROUND = 6,
-    /**
-     * Configures whether in muted audio mode ringing should also be sent to a BT device.
-     */
-    VIBRATE_RINGING = 7,
+    EncodedSurroundConfig encodedSurround = EncodedSurroundConfig.UNSPECIFIED;
 }
diff --git a/media/aidl/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl/android/media/audio/common/AudioPolicyForcedConfig.aidl
deleted file mode 100644
index a9e32bc..0000000
--- a/media/aidl/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.media.audio.common;
-
-/**
- * List of forced configurations aka device categories to be used in addition to the force use
- * in order to force the audio routing. This is the "destination" for 'AudioPolicyForceUse'.
- *
- * {@hide}
- */
-@Backing(type="int")
-@SuppressWarnings(value={"redundant-name"})
-@VintfStability
-enum AudioPolicyForcedConfig {
-    /**
-     * The 'NONE' value can be used with all uses from 'AudioPolicyForceUse'.
-     */
-    NONE = 0,
-    /**
-     * The following configurations are used with 'AudioPolicyForceUse.COMMUNICATION',
-     * '.MEDIA', and '.RECORD'.
-     *
-     * BT_SCO is also used with 'AudioPolicyForceUse.VIBRATE_RINGING' to specify that
-     * in addition to vibration the ringing should be played via the BT SCO device.
-     */
-    SPEAKER = 1,
-    HEADPHONES = 2,
-    BT_SCO = 3,
-    BT_A2DP = 4,
-    WIRED_ACCESSORY = 5,
-    /**
-     * The '*_DOCK' values are for 'AudioPolicyForceUse.DOCK'.
-     */
-    BT_CAR_DOCK = 6,
-    BT_DESK_DOCK = 7,
-    ANALOG_DOCK = 8,
-    DIGITAL_DOCK = 9,
-    /**
-     * BT A2DP sink is not preferred to the speaker or a wired headset. Used for
-     * 'AudioPolicyForceUse.MEDIA'.
-     */
-    NO_BT_A2DP = 10,
-    /**
-     * Used with 'AudioPolicyForceUse.SYSTEM' to indicate that sound enforcement is enabled.
-     */
-    SYSTEM_ENFORCED = 11,
-    /**
-     * Used with 'AudioPolicyForceUse.HDMI_SYSTEM_AUDIO' to indicate that sending
-     * of system audio to HDMI is enabled.
-     */
-    HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-    /**
-     * The '*_ENCODED_SURROUND' values are for 'AudioPolicyForceUse.ENCODED_SURROUND'.
-     */
-    ENCODED_SURROUND_NEVER = 13,
-    ENCODED_SURROUND_ALWAYS = 14,
-    ENCODED_SURROUND_MANUAL = 15,
-    /**
-     * Used with 'AudioPolicyForceUse.VIBRATE_RINGING' to specify that in addition to
-     * vibration the ringing should be played via the BT BLE device.
-     */
-    BT_BLE = 16,
-}
diff --git a/media/aidl/android/media/audio/common/AudioPortDeviceExt.aidl b/media/aidl/android/media/audio/common/AudioPortDeviceExt.aidl
index 4de32c7..f04c9a7 100644
--- a/media/aidl/android/media/audio/common/AudioPortDeviceExt.aidl
+++ b/media/aidl/android/media/audio/common/AudioPortDeviceExt.aidl
@@ -16,6 +16,7 @@
 
 package android.media.audio.common;
 
+import android.media.audio.common.AudioChannelLayout;
 import android.media.audio.common.AudioDevice;
 import android.media.audio.common.AudioFormatDescription;
 
@@ -59,4 +60,16 @@
      * default device port in a HAL module in each I/O direction.
      */
     const int FLAG_INDEX_DEFAULT_DEVICE = 0;
+
+    /**
+     * A channel layout that represents the physical layout of output speakers.
+     *
+     * If set, only the `layoutMask` variant of AudioChannelLayout is valid and
+     * supported for this field.
+     *
+     * The layoutMask only indicates which speaker channels are present, the
+     * physical layout of the speakers should be informed by a standard for
+     * multi-channel sound playback systems, such as ITU-R BS.2051.
+     */
+    @nullable AudioChannelLayout speakerLayout;
 }
diff --git a/media/aidl/android/media/audio/common/AudioUsage.aidl b/media/aidl/android/media/audio/common/AudioUsage.aidl
index 34a7185..c81806c 100644
--- a/media/aidl/android/media/audio/common/AudioUsage.aidl
+++ b/media/aidl/android/media/audio/common/AudioUsage.aidl
@@ -138,4 +138,9 @@
      * Usage value to use when the usage is an announcement.
      */
     ANNOUNCEMENT = 1003,
+    /**
+     * Usage value to use when the usage is to clean up the speaker
+     * transducers and free them of deposits of dust or water
+     */
+    SPEAKER_CLEANUP = 1004,
 }
diff --git a/media/aidl/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl b/media/aidl/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl
new file mode 100644
index 0000000..f79e6a5
--- /dev/null
+++ b/media/aidl/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.common;
+
+/**
+ * Audio Volume Group Change Event.
+ *
+ * {@hide}
+ */
+@SuppressWarnings(value={"redundant-name"}) // for VOLUME_FLAG_*
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioVolumeGroupChangeEvent {
+    /**
+     * Shall show a toast containing the current volume.
+     */
+    const int VOLUME_FLAG_SHOW_UI = 1 << 0;
+    /**
+     * Whether to include ringer modes as possible options when changing volume..
+     */
+    const int VOLUME_FLAG_ALLOW_RINGER_MODES = 1 << 1;
+    /**
+     * Whether to play a sound when changing the volume.
+     */
+    const int VOLUME_FLAG_PLAY_SOUND = 1 << 2;
+    /**
+     * Removes any sounds/vibrate that may be in the queue, or are playing.
+     */
+    const int VOLUME_FLAG_REMOVE_SOUND_AND_VIBRATE = 1 << 3;
+    /**
+     * Whether to vibrate if going into the vibrate ringer mode.
+     */
+    const int VOLUME_FLAG_VIBRATE = 1 << 4;
+    /**
+     * Indicates to VolumePanel that the volume slider should be disabled as user cannot
+     * change the volume.
+     */
+    const int VOLUME_FLAG_FIXED_VOLUME = 1 << 5;
+    /**
+     * Indicates the volume set/adjust call is for Bluetooth absolute volume.
+     */
+    const int VOLUME_FLAG_BLUETOOTH_ABS_VOLUME = 1 << 6;
+    /**
+     * Adjusting the volume was prevented due to silent mode, display a hint in the UI.
+     */
+    const int VOLUME_FLAG_SHOW_SILENT_HINT = 1 << 7;
+    /**
+     * Indicates the volume call is for Hdmi Cec system audio volume.
+     */
+    const int VOLUME_FLAG_HDMI_SYSTEM_AUDIO_VOLUME = 1 << 8;
+    /**
+     * Indicates that this should only be handled if media is actively playing.
+     */
+    const int VOLUME_FLAG_ACTIVE_MEDIA_ONLY = 1 << 9;
+    /**
+     * Like FLAG_SHOW_UI, but only dialog warnings and confirmations, no sliders.
+     */
+    const int VOLUME_FLAG_SHOW_UI_WARNINGS = 1 << 10;
+    /**
+     * Adjusting the volume down from vibrated was prevented, display a hint in the UI.
+     */
+    const int VOLUME_FLAG_SHOW_VIBRATE_HINT = 1 << 11;
+    /**
+     * Adjusting the volume due to a hardware key press.
+     */
+    const int VOLUME_FLAG_FROM_KEY = 1 << 12;
+    /**
+     * Indicates that an absolute volume controller is notifying AudioService of a change in the
+     * volume or mute status of an external audio system..
+     */
+    const int VOLUME_FLAG_ABSOLUTE_VOLUME = 1 << 13;
+
+    /** Unique identifier of the volume group. */
+    int groupId;
+    /** Index in UI applied. */
+    int volumeIndex;
+    /** Muted attribute, orthogonal to volume index. */
+    boolean muted;
+    /**
+     * Bitmask indicating a suggested UI behavior or characterising the volume event.
+     * The bit masks are defined in the constants prefixed by VOLUME_FLAG_*.
+     */
+    int flags;
+}
diff --git a/media/aidl/android/media/audio/eraser/Capability.aidl b/media/aidl/android/media/audio/eraser/Capability.aidl
new file mode 100644
index 0000000..a7627e5
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/Capability.aidl
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+import android.media.audio.common.AudioChannelLayout;
+import android.media.audio.eraser.ClassifierCapability;
+import android.media.audio.eraser.Mode;
+import android.media.audio.eraser.RemixerCapability;
+import android.media.audio.eraser.SeparatorCapability;
+
+/**
+ * Represents the capability of an audio eraser.
+ *
+ * This parcelable defines the supported input/output data formats, available work modes, and the
+ * specific capabilities of the sound classifier, separator, and remixer components within the
+ * eraser effect.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable Capability {
+    /**
+     * List of supported sample rates for the eraser.
+     *
+     * The output audio sample rate will be the same as the input.
+     */
+    int[] sampleRates;
+
+    /**
+     * List of supported channel layouts for the eraser.
+     *
+     * The output audio channel layout will be the same as the input.
+     */
+    AudioChannelLayout[] channelLayouts;
+
+    /**
+     * List of supported work modes.
+     *
+     * Defines the different operational modes (e.g., `ERASER`, `CLASSIFIER`) that the eraser can
+     * work in.
+     */
+    Mode[] modes;
+
+    /**
+     * Separator capability.
+     *
+     * Specifies the capabilities of the sound separator component within the eraser effect,
+     * including the maximum number of sound sources it can separate.
+     */
+    SeparatorCapability separator;
+
+    /**
+     * Classifier capability.
+     *
+     * Specifies the capabilities of the sound classifier component within the eraser effect,
+     * including the sound classifications it can detect.
+     */
+    ClassifierCapability classifier;
+
+    /**
+     * Remixer capability.
+     *
+     * Specifies the capabilities of the sound remixer component within the eraser effect,
+     * including the gainFactor range supported.
+     */
+    RemixerCapability remixer;
+}
diff --git a/media/aidl/android/media/audio/eraser/Classification.aidl b/media/aidl/android/media/audio/eraser/Classification.aidl
new file mode 100644
index 0000000..16aa1ce
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/Classification.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+import android.media.audio.eraser.SoundClassification;
+
+/**
+ * Represents a sound classification category.
+ *
+ * The classification includes the top-level sound category based on the AudioSet ontology.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable Classification {
+    /**
+     * The top-level sounds classification supported.
+     *
+     * This field specifies the primary sound category that this classification represents,
+     * as defined in the AudioSet ontology. It helps identify the general type of sound,
+     * such as HUMAN, ANIMAL, MUSIC, etc.
+     */
+    SoundClassification classification = SoundClassification.HUMAN;
+}
diff --git a/media/aidl/android/media/audio/eraser/ClassificationConfig.aidl b/media/aidl/android/media/audio/eraser/ClassificationConfig.aidl
new file mode 100644
index 0000000..ab5191e
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/ClassificationConfig.aidl
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+import android.media.audio.eraser.Classification;
+
+/**
+ * Configuration for the eraser to apply specific gain adjustments to certain sound classifications.
+ *
+ * Gain is applied to the audio signal by scaling the amplitude of the output audio based on the
+ * classification of the input sound.
+ * If a classification exists in the configuration list, the remixer applies the specified gain to
+ * the output audio when the confidence score is higher than `confidenceThreshold`. If a
+ * classification is not present in the configuration, it is considered to have a gain of 1.0
+ * (no gain adjustment).
+ * If a ClassificationConfig contains an empty classification list, the same threshold and gain
+ * specified in the ClassificationConfig will be applied to all classifications not explicitly
+ * configured.
+ *
+ * Examples:
+ *
+ * 1. {classifications = [{classification = SoundClassification.NATURE},
+ *                        {classification = SoundClassification.ENVIRONMENT}],
+ *     confidenceThreshold = 0.8,
+ *     gainFactor = 0.0}
+ *
+ *    - If the input audio is classified as NATURE or ENVIRONMENT, with a confidence score higher
+ *      than 0.8, the output audio will be muted.
+ *    - If the classification confidence score is 0.8 or lower, or if the audio is classified
+ *      differently, the output audio remains unchanged.
+ *
+ * 2.  {classifications = [{classification = SoundClassification.MUSIC}],
+ *      confidenceThreshold = 0.6,
+ *      gainFactor = 0.5}
+ *
+ *    - If the input audio is classified as MUSIC with a confidence score higher than 0.6, the
+ *      output audio should have a gain factor of 0.5 (reduced by half).
+ *    - If the classification confidence score is 0.6 or lower, or if the audio is classified
+ *      differently, the output audio remains unchanged.
+ *
+ * 3. When combined as a list, the eraser can be configured to apply different gainFactor to
+ *    a classifications when confideence score is higher than the corresponding threshold.
+ *    [{classifications = [{classification = SoundClassification.NATURE}],
+ *      confidenceThreshold = 0.8,
+ *      gainFactor = 0.0},
+ *     {classifications = [{classification = SoundClassification.MUSIC}],
+ *      confidenceThreshold = 0.8,
+ *      gainFactor = 0.6},
+ *     {classifications = [{classification = SoundClassification.MUSIC}],
+ *      confidenceThreshold = 0.5,
+ *      gainFactor = 0.5}]
+ *
+ *    - If the input audio is classified as NATURE, and the confidence score is higher than 0.8,
+ *      the output audio classification will be muted (gainFactor = 0.0).
+ *
+ *    - If the input audio is classified as MUSIC with a confidence score higher than 0.8, the
+ *      output audio classification will have a gain factor of 0.6. If the input audio is
+ *      classified as MUSIC with a confidence score higher than 0.5, the output audio
+ *      classification will have a gain factor of 0.5.
+ *
+ *    - For all other sound classifications, the audio signal remains unchanged (gainFactor = 1.0).
+ *
+ * 4. [{classifications = [{classification = SoundClassification.HUMAN}],
+ *      confidenceThreshold = 0.8,
+ *      gainFactor = 1.0},
+ *     {classifications = [],
+ *      confidenceThreshold = 0.0,
+ *      gainFactor = 0.5}]
+ *
+ *    - If the input audio is classified as HUMAN, and the confidence score is higher than 0.8, the
+ *      output audio classification will remains unchanged.
+ *
+ *    - For all other sound classifications, the audio signal will have a gain factor of 0.5.
+ *
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable ClassificationConfig {
+    /**
+     * List of sound classifications to which this configuration applies.
+     *
+     * Each entry specifies a sound classification (e.g., MUSIC, NATURE) targeted by this
+     * configuration.
+     */
+    Classification[] classifications;
+
+    /**
+     * Confidence threshold in the range of [0.0, 1.0], only apply the gainFactor when the
+     * classifier's confidence score for the specified classifications exceeds this threshold.
+     *
+     * Default Value is 0.0 which means apply gain regardless of confidence score.
+     */
+    float confidenceThreshold = 0f;
+
+    /**
+     * Gain factor to apply to the output audio when the specified classifications are detected.
+     * Gain factor is applied by multiplying the amplitude of the audio signal by the `gainFactor`.
+     *
+     * - A `gainFactor` of `1.0` means no gain adjustment (the original volume is preserved).
+     * - A `gainFactor` of `0.5` reduces the amplitude of the audio by half.
+     * - A `gainFactor` of `0.0` mutes the audio.
+     * - A `gainFactor` > `1.0` amplifies the audio signal, increasing its volume (useful for
+     *   compressor and amplification cases).
+     * - A `gainFactor` < `0.0` inverts the phase of the audio signal (useful for phase
+     *   cancellation or specific spatial audio manipulation).
+     *
+     * The `gainFactor` must be within the `gainFactorRange` defined in `RemixerCapability`, the
+     * default value is `1.0`.
+     */
+    float gainFactor = 1f;
+}
diff --git a/media/aidl/android/media/audio/eraser/ClassificationMetadata.aidl b/media/aidl/android/media/audio/eraser/ClassificationMetadata.aidl
new file mode 100644
index 0000000..cc79c37
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/ClassificationMetadata.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+import android.media.audio.eraser.Classification;
+
+/**
+ * Metadata generated by a sound classification task.
+ *
+ * This parcelable contains the classification result for a segment of the audio stream, along with
+ * a confidence score indicating the certainty of the classification.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable ClassificationMetadata {
+    /**
+     * Confidence score for the classification, ranging from 0.0 to 1.0.
+     *
+     * This score reflects the classifier's confidence in the result, with higher values
+     * representing greater confidence in the prediction.
+     */
+    float confidenceScore;
+
+    /**
+     * The classification result, indicating the top-level sound classification.
+     */
+    Classification classification;
+}
diff --git a/media/aidl/android/media/audio/eraser/ClassificationMetadataList.aidl b/media/aidl/android/media/audio/eraser/ClassificationMetadataList.aidl
new file mode 100644
index 0000000..3a5dd16
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/ClassificationMetadataList.aidl
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+import android.media.audio.eraser.ClassificationMetadata;
+
+/**
+ * List of active `ClassificationMetadata` aligned to a specific timestamp.
+ *
+ * A `ClassificationMetadata` is considered active when the `confidenceScore` exceeds the
+ * `ClassificationConfig.confidenceThreshold`.
+ *
+ * The classifier component in the eraser must maintain the active metadata list when an
+ * `IEraserCallback` is configured and send the list via `onClassifierUpdate` whenever a change
+ * occurs.
+ */
+
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable ClassificationMetadataList {
+    /**
+     * Timestamp in milliseconds within the audio stream that this classification result is aligned
+     * with, the timestamp is calculated with audio frames the eraser effect received, starting
+     * from the first frame processed by the eraser effect.
+     *
+     * The `timeMs` indicates the starting point in the audio stream that the classification results
+     * in this metadata list apply to.
+     * Each classifier process window produces a list of `ClassificationMetadata`. The `timeMs` in
+     * the metadata list always aligns with the start of the window (the starting point of the audio
+     * segment processed by the classifier).
+     * In rare cases where the classifier produces an identical list of classifications for
+     * consecutive windows (including confidence scores), the `onClassifierUpdate` callback will
+     * only be triggered once for the first process window, with a `timeMs` indicating the start of
+     * that window. No further `onClassifierUpdate` callbacks will be made for the subsequent
+     * windows, as there is no meaningful change in the classification results. This avoids
+     * redundant updates when the classification remains the same across windows.
+     *
+     * Client Usage:
+     * The `timeMs` allows clients to map the classification results back to a specific portion of
+     * the audio stream. Clients can use this information to synchronize classification results
+     * with the audio data or other events. Each metadata list update corresponds to one window of
+     * classified audio, and the `timeMs` will always point to the start of that window.
+     *
+     * For an example, below is an audio stream timeline with a 1 second classifier window.
+     * Audio stream:
+     * |==========>=========|============>=========|===========>==========|===========>=========|
+     * 0                   1000                  2000                   3000                   4000
+     *                       |                     |                      |                     |
+     *                       V                     V                      V                     V
+     *                [{HUMAN, 0.8}]        [{HUMAN, 0.8},        [{HUMAN, 0.8},      [{HUMAN, 0.8}]
+     *                       |               {NATURE, 0.4}]        {NATURE, 0.4}]               |
+     *                       |                     |                                            |
+     *                       V                     V                                            V
+     *             onClassifierUpdate      onClassifierUpdate                     onClassifierUpdate
+     *                  timeMs: 0             timeMs: 1000                           timeMs: 3000
+     *                [{HUMAN, 0.8}]        [{HUMAN, 0.8},                          [{HUMAN, 0.8}]
+     *                                       {NATURE, 0.4}]
+     */
+    int timeMs;
+
+    /**
+     * List of classification metadata, including the sound classification, confidence score, and
+     * a duration since when the sound class was considered active.
+     *
+     * Metadatas in the list should be ranked in descending order based on the confidence score.
+     */
+    ClassificationMetadata[] metadatas;
+}
diff --git a/media/aidl/android/media/audio/eraser/ClassifierCapability.aidl b/media/aidl/android/media/audio/eraser/ClassifierCapability.aidl
new file mode 100644
index 0000000..5348086
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/ClassifierCapability.aidl
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+import android.media.audio.eraser.Classification;
+
+/**
+ * Represents the capabilities of a sound classifier component.
+ *
+ * This parcelable contains a list of supported sound classifications that the classifier can
+ * recognize and process.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable ClassifierCapability {
+    /**
+     * The window size of the classifier model in milliseconds.
+     *
+     * Indicates the duration over which the classifier processes audio data to output a
+     * classification result.
+     *
+     * Clients can expect to receive updates at most once per window.
+     */
+    int windowSizeMs;
+
+    /**
+     * List of supported sound classifications.
+     *
+     * Each entry specifies a sound classification category that the classifier can recognize, such
+     * as `HUMAN`, `MUSIC`, `ANIMAL`, etc. This defines the types of sounds the classifier is
+     * capable of identifying in the input audio.
+     */
+    Classification[] supportedClassifications;
+}
diff --git a/media/aidl/android/media/audio/eraser/Configuration.aidl b/media/aidl/android/media/audio/eraser/Configuration.aidl
new file mode 100644
index 0000000..b693244
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/Configuration.aidl
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+import android.media.audio.eraser.ClassificationConfig;
+import android.media.audio.eraser.IEraserCallback;
+import android.media.audio.eraser.Mode;
+
+/**
+ * Eraser configurations. Configuration for eraser operation mode, sound classification behaviors,
+ * and an optional callback interface.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable Configuration {
+    /**
+     * Work mode for the eraser, specifies the current operating mode of the eraser effect.
+     */
+    Mode mode = Mode.ERASER;
+
+    /**
+     * List of eraser configurations.
+     * Each configuration defines the behavior for specific sound classifications, allowing
+     * different gain factors and confidence thresholds to be applied based on classification
+     * results.
+     */
+    ClassificationConfig[] classificationConfigs;
+
+    /**
+     * Maximum number of classification metadata generated from the sound classification.
+     *
+     * Default value set to 5.
+     */
+    int maxClassificationMetadata = 5;
+
+    /**
+     * Optional callback inerface to get the eraser effect results.
+     */
+    @nullable IEraserCallback callback;
+}
diff --git a/media/aidl/android/media/audio/eraser/IEraserCallback.aidl b/media/aidl/android/media/audio/eraser/IEraserCallback.aidl
new file mode 100644
index 0000000..4863ba5
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/IEraserCallback.aidl
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+import android.media.audio.eraser.ClassificationMetadataList;
+
+/**
+ * Callback interface for delivering results from the eraser effect.
+ */
+@VintfStability
+interface IEraserCallback {
+    /**
+     * Provides classifier updates, including sound classifications and their confidence scores,
+     * along with the associated timestamp for a given `soundSourceId`.
+     *
+     * The callback is invoked when there is a change in the list of active classification metadata
+     * for each sound source. Changes include the addition and removal of a classification, or
+     * a change in the condidence score.
+     *
+     * The number of metadata elements in the `ClassificationMetadataList.metadatas` list will not
+     * exceed the `maxClassificationMetadata` set in `android.media.audio.eraser.Configuration`.
+     *
+     * Different classifiers may have varying window sizes, regardless of the window size, the
+     * classifier updates occur at most once per window per sound source.
+     *
+     * @param soundSourceId The identifier for the sound source being classified. In ERASER mode,
+     *                      this identifies the separated sound source.
+     *        - In CLASSIFIER mode, the `soundSourceId` is always `0` as there is only one sound
+     *          source for the eraser effect.
+     *        - In ERASER mode, the `soundSourceId` range is [0, `maxSoundSources - 1`], where
+     *          `maxSoundSources` is defined in the eraser capability through `SeparatorCapability`.
+     *
+     * @param metadata The classification metadata list for the current sound source.
+     */
+    oneway void onClassifierUpdate(in int soundSourceId, in ClassificationMetadataList metadata);
+}
diff --git a/media/aidl/android/media/audio/eraser/Mode.aidl b/media/aidl/android/media/audio/eraser/Mode.aidl
new file mode 100644
index 0000000..30745c5
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/Mode.aidl
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+/**
+ * Defines the operational mode of the Eraser effect.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+@Backing(type="byte")
+enum Mode {
+    /**
+     * ERASER mode: The effect operates as an automatic sound eraser.
+     *
+     * In this mode, the Eraser effect processes the input audio using the Sound Separator,
+     * Sound Classifier, and Remixer components. The sound to be erased or retained is determined
+     * by the classifications and gain adjustments specified in eraser configuration.
+     *
+     * - The Sound Separator separates the input audio into multiple sound sources.
+     * - The Sound Classifier analyzes each separated sound to determine its sound category.
+     * - The Remixer applies gain adjustments based on the classifications and configurations, and
+     *   re-mix the processed sounds back into a single output audio stream.
+     *
+     * Requirements: To operate in this mode, the effect must support the classifier, separator,
+     * and remixer capabilities.
+     *
+     * Use Cases: Selectively suppressing or enhancing specific sounds in the audio stream,
+     * such as removing background noise or isolating desired sound sources.
+     */
+    ERASER,
+
+    /**
+     * CLASSIFIER mode: The effect operates as a sound classifier.
+     *
+     * In this mode, the Sound Classifier analyzes the input audio in real-time and emits
+     * classification results based on the sound categories detected. The input audio is directly
+     * passed through to the output without any modification.
+     *
+     * Use Cases: Useful for applications that need to detect specific sound events, monitor audio
+     * content, or provide real-time visual feedback on audio classifications, without altering the
+     * original audio stream.
+     */
+    CLASSIFIER,
+}
diff --git a/media/aidl/android/media/audio/eraser/RemixerCapability.aidl b/media/aidl/android/media/audio/eraser/RemixerCapability.aidl
new file mode 100644
index 0000000..0c89fc1
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/RemixerCapability.aidl
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+/**
+ * Represents the capabilities of a sound remixer component.
+ *
+ * This parcelable defines the supported range of gainFactors that the remixer can apply to the
+ * audio signal.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable RemixerCapability {
+    /**
+     * Indicates whether sound remixer is supported.
+     *
+     * If `supported` is true, the sound remixer can adjust the gain of the audio signal based on
+     * the provided classifications and gainFactors, and remix the separated sounds into one.
+     */
+    boolean supported;
+
+    /**
+     * Minimum gainFactor supported by the sound remixer.
+     *
+     * Specifies the lowest gainFactor that the remixer can apply. A gainFactor of `0.0`
+     * typically mutes the sound. In some less common cases, a remixer can support a negative
+     * `gainFactor`, which enables some use cases like phase inversion and noise cancellation.
+     *
+     * The minimum gainFactor must be at least `0.0`. The default minimum gainFactor for a remixer
+     * is `0.0` (the sound is muted).
+     */
+    float minGainFactor = 0f;
+
+    /**
+     * Maximum gainFactor supported by the sound remixer.
+     *
+     * Specifies the highest gainFactor that the remixer can apply. A gainFactor of `1.0` means no
+     * adjustment to the sound's original volume. In the case of gainFactor greater than `1.0`, the
+     * remixer may apply amplification to the audio signal.
+     *
+     * The maximum gainFactor must be at least `1.0`, and the default maximum gainFactor for a
+     * remixer is `1.0` (no gain adjustment to the sound).
+     */
+    float maxGainFactor = 1f;
+}
diff --git a/media/aidl/android/media/audio/eraser/SeparatorCapability.aidl b/media/aidl/android/media/audio/eraser/SeparatorCapability.aidl
new file mode 100644
index 0000000..93b959c
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/SeparatorCapability.aidl
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+/**
+ * Represents the capabilities of a sound separator component.
+ *
+ * This parcelable includes the maximum number of sound sources that can be separated
+ * simultaneously.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable SeparatorCapability {
+    /**
+     * Indicates whether sound separation is supported.
+     *
+     * Note: If sound separation is supported, the effect must also support sound remixing to
+     * handle the separated audio streams, and produce remixed audio as output.
+     */
+    boolean supported;
+
+    /**
+     * The minimum number of sound sources a sound separator must support.
+     */
+    const int MIN_SOUND_SOURCE_SUPPORTED = 2;
+
+    /**
+     * Maximum number of sound sources that can be separated.
+     *
+     * Specifies the maximum number of individual sound sources that the separator can process
+     * simultaneously.
+     *
+     * Each separated sound source have an soundSourceId, range in [0, maxSoundSources -1]. In
+     * ERASER mode, each sound source will be classified with a classifier, identified by the
+     * soundSourceId.
+     *
+     * The minimum value of `maxSoundSources` is 2 as defined by `MIN_SOUND_SOURCE_SUPPORTED`, the
+     * default value is 4.
+     */
+    int maxSoundSources = 4;
+}
diff --git a/media/aidl/android/media/audio/eraser/SoundClassification.aidl b/media/aidl/android/media/audio/eraser/SoundClassification.aidl
new file mode 100644
index 0000000..6ec9b43
--- /dev/null
+++ b/media/aidl/android/media/audio/eraser/SoundClassification.aidl
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.audio.eraser;
+
+/**
+ * The sound classification is based on the top-level categories of the "AudioSet ontology".
+ *
+ * The AudioSet ontology is a hierarchical collection of sound event classes.
+ * For more details, refer to the ICASSP 2017 paper: "AudioSet: An ontology and human-labeled
+ * dataset for audio events".
+ * https://research.google/pubs/audio-set-an-ontology-and-human-labeled-dataset-for-audio-events/
+ */
+@JavaDerive(equals=true, toString=true)
+@Backing(type="int")
+@VintfStability
+enum SoundClassification {
+    /**
+     * Sounds produced by the human body through the actions of the individual.
+     */
+    HUMAN,
+
+    /**
+     * All sound produced by the bodies and actions of nonhuman animals.
+     */
+    ANIMAL,
+
+    /**
+     * Sounds produced by natural sources in their normal soundscape, excluding animal and human
+     * sounds.
+     */
+    NATURE,
+
+    /**
+     * Music is an art form and cultural activity whose medium is sound and silence. The common
+     * elements of music are pitch, rhythm, dynamics, and the sonic qualities of timbre and texture.
+     */
+    MUSIC,
+
+    /**
+     * Set of sound classes referring to sounds that are immediately understood by listeners as
+     * arising from specific objects (rather than being heard more literally as "sounds").
+     */
+    THINGS,
+
+    /**
+     * Portmanteau class for sounds that do not immediately suggest specific source objects, but
+     * which are more likely to be perceived and described according to their acoustic properties.
+     */
+    AMBIGUOUS,
+
+    /**
+     * A class for sound categories that suggest information about attributes other than the
+     * foreground or target objects.
+     */
+    ENVIRONMENT,
+
+    /**
+     * Vendor customizable extension, for possible classifications not listed above.
+     */
+    VENDOR_EXTENSION,
+}
diff --git a/media/aidl_api/android.media.audio.common.types/4/.hash b/media/aidl_api/android.media.audio.common.types/4/.hash
new file mode 100644
index 0000000..21938ff
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/4/.hash
@@ -0,0 +1 @@
+af71e6ae2c6861fc2b09bb477e7285e6777cd41c
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioAttributes.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioAttributes.aidl
index 5135bcd..d52cbe5 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioAttributes.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,11 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioAttributes {
+  android.media.audio.common.AudioContentType contentType = android.media.audio.common.AudioContentType.UNKNOWN;
+  android.media.audio.common.AudioUsage usage = android.media.audio.common.AudioUsage.UNKNOWN;
+  android.media.audio.common.AudioSource source = android.media.audio.common.AudioSource.DEFAULT;
+  int flags = android.media.audio.common.AudioFlag.NONE /* 0 */;
+  @utf8InCpp String[] tags;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioChannelLayout.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioChannelLayout.aidl
new file mode 100644
index 0000000..c833f1c
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioChannelLayout.aidl
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@JavaDerive(equals=true, toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
+union AudioChannelLayout {
+  int none = 0;
+  int invalid = 0;
+  int indexMask;
+  int layoutMask;
+  int voiceMask;
+  const int INDEX_MASK_1 = ((1 << 1) - 1) /* 1 */;
+  const int INDEX_MASK_2 = ((1 << 2) - 1) /* 3 */;
+  const int INDEX_MASK_3 = ((1 << 3) - 1) /* 7 */;
+  const int INDEX_MASK_4 = ((1 << 4) - 1) /* 15 */;
+  const int INDEX_MASK_5 = ((1 << 5) - 1) /* 31 */;
+  const int INDEX_MASK_6 = ((1 << 6) - 1) /* 63 */;
+  const int INDEX_MASK_7 = ((1 << 7) - 1) /* 127 */;
+  const int INDEX_MASK_8 = ((1 << 8) - 1) /* 255 */;
+  const int INDEX_MASK_9 = ((1 << 9) - 1) /* 511 */;
+  const int INDEX_MASK_10 = ((1 << 10) - 1) /* 1023 */;
+  const int INDEX_MASK_11 = ((1 << 11) - 1) /* 2047 */;
+  const int INDEX_MASK_12 = ((1 << 12) - 1) /* 4095 */;
+  const int INDEX_MASK_13 = ((1 << 13) - 1) /* 8191 */;
+  const int INDEX_MASK_14 = ((1 << 14) - 1) /* 16383 */;
+  const int INDEX_MASK_15 = ((1 << 15) - 1) /* 32767 */;
+  const int INDEX_MASK_16 = ((1 << 16) - 1) /* 65535 */;
+  const int INDEX_MASK_17 = ((1 << 17) - 1) /* 131071 */;
+  const int INDEX_MASK_18 = ((1 << 18) - 1) /* 262143 */;
+  const int INDEX_MASK_19 = ((1 << 19) - 1) /* 524287 */;
+  const int INDEX_MASK_20 = ((1 << 20) - 1) /* 1048575 */;
+  const int INDEX_MASK_21 = ((1 << 21) - 1) /* 2097151 */;
+  const int INDEX_MASK_22 = ((1 << 22) - 1) /* 4194303 */;
+  const int INDEX_MASK_23 = ((1 << 23) - 1) /* 8388607 */;
+  const int INDEX_MASK_24 = ((1 << 24) - 1) /* 16777215 */;
+  const int LAYOUT_MONO = CHANNEL_FRONT_LEFT /* 1 */;
+  const int LAYOUT_STEREO = (CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) /* 3 */;
+  const int LAYOUT_2POINT1 = ((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_LOW_FREQUENCY) /* 11 */;
+  const int LAYOUT_TRI = ((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) /* 7 */;
+  const int LAYOUT_TRI_BACK = ((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_BACK_CENTER) /* 259 */;
+  const int LAYOUT_3POINT1 = (((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_LOW_FREQUENCY) /* 15 */;
+  const int LAYOUT_2POINT0POINT2 = (((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_TOP_SIDE_LEFT) | CHANNEL_TOP_SIDE_RIGHT) /* 786435 */;
+  const int LAYOUT_2POINT1POINT2 = (LAYOUT_2POINT0POINT2 | CHANNEL_LOW_FREQUENCY) /* 786443 */;
+  const int LAYOUT_3POINT0POINT2 = ((((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_TOP_SIDE_LEFT) | CHANNEL_TOP_SIDE_RIGHT) /* 786439 */;
+  const int LAYOUT_3POINT1POINT2 = (LAYOUT_3POINT0POINT2 | CHANNEL_LOW_FREQUENCY) /* 786447 */;
+  const int LAYOUT_QUAD = (((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_BACK_LEFT) | CHANNEL_BACK_RIGHT) /* 51 */;
+  const int LAYOUT_QUAD_SIDE = (((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_SIDE_LEFT) | CHANNEL_SIDE_RIGHT) /* 1539 */;
+  const int LAYOUT_SURROUND = (((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_BACK_CENTER) /* 263 */;
+  const int LAYOUT_PENTA = (LAYOUT_QUAD | CHANNEL_FRONT_CENTER) /* 55 */;
+  const int LAYOUT_5POINT1 = (((((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_LOW_FREQUENCY) | CHANNEL_BACK_LEFT) | CHANNEL_BACK_RIGHT) /* 63 */;
+  const int LAYOUT_5POINT1_SIDE = (((((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_LOW_FREQUENCY) | CHANNEL_SIDE_LEFT) | CHANNEL_SIDE_RIGHT) /* 1551 */;
+  const int LAYOUT_5POINT1POINT2 = ((LAYOUT_5POINT1 | CHANNEL_TOP_SIDE_LEFT) | CHANNEL_TOP_SIDE_RIGHT) /* 786495 */;
+  const int LAYOUT_5POINT1POINT4 = ((((LAYOUT_5POINT1 | CHANNEL_TOP_FRONT_LEFT) | CHANNEL_TOP_FRONT_RIGHT) | CHANNEL_TOP_BACK_LEFT) | CHANNEL_TOP_BACK_RIGHT) /* 184383 */;
+  const int LAYOUT_6POINT1 = ((((((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_LOW_FREQUENCY) | CHANNEL_BACK_LEFT) | CHANNEL_BACK_RIGHT) | CHANNEL_BACK_CENTER) /* 319 */;
+  const int LAYOUT_7POINT1 = ((LAYOUT_5POINT1 | CHANNEL_SIDE_LEFT) | CHANNEL_SIDE_RIGHT) /* 1599 */;
+  const int LAYOUT_7POINT1POINT2 = ((LAYOUT_7POINT1 | CHANNEL_TOP_SIDE_LEFT) | CHANNEL_TOP_SIDE_RIGHT) /* 788031 */;
+  const int LAYOUT_7POINT1POINT4 = ((((LAYOUT_7POINT1 | CHANNEL_TOP_FRONT_LEFT) | CHANNEL_TOP_FRONT_RIGHT) | CHANNEL_TOP_BACK_LEFT) | CHANNEL_TOP_BACK_RIGHT) /* 185919 */;
+  const int LAYOUT_9POINT1POINT4 = ((LAYOUT_7POINT1POINT4 | CHANNEL_FRONT_WIDE_LEFT) | CHANNEL_FRONT_WIDE_RIGHT) /* 50517567 */;
+  const int LAYOUT_9POINT1POINT6 = ((LAYOUT_9POINT1POINT4 | CHANNEL_TOP_SIDE_LEFT) | CHANNEL_TOP_SIDE_RIGHT) /* 51303999 */;
+  const int LAYOUT_13POINT0 = ((((((((((((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_SIDE_LEFT) | CHANNEL_SIDE_RIGHT) | CHANNEL_TOP_FRONT_LEFT) | CHANNEL_TOP_FRONT_RIGHT) | CHANNEL_TOP_FRONT_CENTER) | CHANNEL_TOP_BACK_LEFT) | CHANNEL_TOP_BACK_RIGHT) | CHANNEL_BOTTOM_FRONT_LEFT) | CHANNEL_BOTTOM_FRONT_RIGHT) | CHANNEL_BOTTOM_FRONT_CENTER) /* 7534087 */;
+  const int LAYOUT_13POINT_360RA = LAYOUT_13POINT0 /* 7534087 */;
+  const int LAYOUT_22POINT2 = ((((((((((((LAYOUT_7POINT1POINT4 | CHANNEL_FRONT_LEFT_OF_CENTER) | CHANNEL_FRONT_RIGHT_OF_CENTER) | CHANNEL_BACK_CENTER) | CHANNEL_TOP_CENTER) | CHANNEL_TOP_FRONT_CENTER) | CHANNEL_TOP_BACK_CENTER) | CHANNEL_TOP_SIDE_LEFT) | CHANNEL_TOP_SIDE_RIGHT) | CHANNEL_BOTTOM_FRONT_LEFT) | CHANNEL_BOTTOM_FRONT_RIGHT) | CHANNEL_BOTTOM_FRONT_CENTER) | CHANNEL_LOW_FREQUENCY_2) /* 16777215 */;
+  const int LAYOUT_MONO_HAPTIC_A = (LAYOUT_MONO | CHANNEL_HAPTIC_A) /* 1073741825 */;
+  const int LAYOUT_STEREO_HAPTIC_A = (LAYOUT_STEREO | CHANNEL_HAPTIC_A) /* 1073741827 */;
+  const int LAYOUT_HAPTIC_AB = (CHANNEL_HAPTIC_A | CHANNEL_HAPTIC_B) /* 1610612736 */;
+  const int LAYOUT_MONO_HAPTIC_AB = (LAYOUT_MONO | LAYOUT_HAPTIC_AB) /* 1610612737 */;
+  const int LAYOUT_STEREO_HAPTIC_AB = (LAYOUT_STEREO | LAYOUT_HAPTIC_AB) /* 1610612739 */;
+  const int LAYOUT_FRONT_BACK = (CHANNEL_FRONT_CENTER | CHANNEL_BACK_CENTER) /* 260 */;
+  const int INTERLEAVE_LEFT = 0;
+  const int INTERLEAVE_RIGHT = 1;
+  const int CHANNEL_FRONT_LEFT = (1 << 0) /* 1 */;
+  const int CHANNEL_FRONT_RIGHT = (1 << 1) /* 2 */;
+  const int CHANNEL_FRONT_CENTER = (1 << 2) /* 4 */;
+  const int CHANNEL_LOW_FREQUENCY = (1 << 3) /* 8 */;
+  const int CHANNEL_BACK_LEFT = (1 << 4) /* 16 */;
+  const int CHANNEL_BACK_RIGHT = (1 << 5) /* 32 */;
+  const int CHANNEL_FRONT_LEFT_OF_CENTER = (1 << 6) /* 64 */;
+  const int CHANNEL_FRONT_RIGHT_OF_CENTER = (1 << 7) /* 128 */;
+  const int CHANNEL_BACK_CENTER = (1 << 8) /* 256 */;
+  const int CHANNEL_SIDE_LEFT = (1 << 9) /* 512 */;
+  const int CHANNEL_SIDE_RIGHT = (1 << 10) /* 1024 */;
+  const int CHANNEL_TOP_CENTER = (1 << 11) /* 2048 */;
+  const int CHANNEL_TOP_FRONT_LEFT = (1 << 12) /* 4096 */;
+  const int CHANNEL_TOP_FRONT_CENTER = (1 << 13) /* 8192 */;
+  const int CHANNEL_TOP_FRONT_RIGHT = (1 << 14) /* 16384 */;
+  const int CHANNEL_TOP_BACK_LEFT = (1 << 15) /* 32768 */;
+  const int CHANNEL_TOP_BACK_CENTER = (1 << 16) /* 65536 */;
+  const int CHANNEL_TOP_BACK_RIGHT = (1 << 17) /* 131072 */;
+  const int CHANNEL_TOP_SIDE_LEFT = (1 << 18) /* 262144 */;
+  const int CHANNEL_TOP_SIDE_RIGHT = (1 << 19) /* 524288 */;
+  const int CHANNEL_BOTTOM_FRONT_LEFT = (1 << 20) /* 1048576 */;
+  const int CHANNEL_BOTTOM_FRONT_CENTER = (1 << 21) /* 2097152 */;
+  const int CHANNEL_BOTTOM_FRONT_RIGHT = (1 << 22) /* 4194304 */;
+  const int CHANNEL_LOW_FREQUENCY_2 = (1 << 23) /* 8388608 */;
+  const int CHANNEL_FRONT_WIDE_LEFT = (1 << 24) /* 16777216 */;
+  const int CHANNEL_FRONT_WIDE_RIGHT = (1 << 25) /* 33554432 */;
+  const int CHANNEL_HAPTIC_B = (1 << 29) /* 536870912 */;
+  const int CHANNEL_HAPTIC_A = (1 << 30) /* 1073741824 */;
+  const int VOICE_UPLINK_MONO = CHANNEL_VOICE_UPLINK /* 16384 */;
+  const int VOICE_DNLINK_MONO = CHANNEL_VOICE_DNLINK /* 32768 */;
+  const int VOICE_CALL_MONO = (CHANNEL_VOICE_UPLINK | CHANNEL_VOICE_DNLINK) /* 49152 */;
+  const int CHANNEL_VOICE_UPLINK = 0x4000;
+  const int CHANNEL_VOICE_DNLINK = 0x8000;
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioConfig.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioConfig.aidl
index 5135bcd..6b8686c 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioConfig.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioConfig {
+  android.media.audio.common.AudioConfigBase base;
+  android.media.audio.common.AudioOffloadInfo offloadInfo;
+  long frameCount;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioConfigBase.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioConfigBase.aidl
index 5135bcd..f3e716b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioConfigBase.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioConfigBase {
+  int sampleRate;
+  android.media.audio.common.AudioChannelLayout channelMask;
+  android.media.audio.common.AudioFormatDescription format;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioContentType.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioContentType.aidl
index 5135bcd..f9ac614 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioContentType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,12 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioContentType {
+  UNKNOWN = 0,
+  SPEECH = 1,
+  MUSIC = 2,
+  MOVIE = 3,
+  SONIFICATION = 4,
+  ULTRASOUND = 1997,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDevice.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDevice.aidl
index 5135bcd..fb5cb62 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDevice.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,8 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioDevice {
+  android.media.audio.common.AudioDeviceDescription type;
+  android.media.audio.common.AudioDeviceAddress address;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceAddress.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceAddress.aidl
index 5135bcd..905d3aa 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceAddress.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,11 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+union AudioDeviceAddress {
+  @utf8InCpp String id;
+  byte[] mac;
+  byte[] ipv4;
+  int[] ipv6;
+  int[] alsa;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceDescription.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceDescription.aidl
new file mode 100644
index 0000000..d1bcfed
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceDescription.aidl
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioDeviceDescription {
+  android.media.audio.common.AudioDeviceType type = android.media.audio.common.AudioDeviceType.NONE;
+  @utf8InCpp String connection;
+  const @utf8InCpp String CONNECTION_ANALOG = "analog";
+  const @utf8InCpp String CONNECTION_BT_A2DP = "bt-a2dp";
+  const @utf8InCpp String CONNECTION_BT_LE = "bt-le";
+  const @utf8InCpp String CONNECTION_BT_SCO = "bt-sco";
+  /**
+   * @deprecated Bus devices are attached, and must be represented using `{IN|OUT}_BUS` type + empty connection. Bus connection. Mostly used in automotive scenarios.
+   */
+  const @utf8InCpp String CONNECTION_BUS = "bus";
+  const @utf8InCpp String CONNECTION_HDMI = "hdmi";
+  const @utf8InCpp String CONNECTION_HDMI_ARC = "hdmi-arc";
+  const @utf8InCpp String CONNECTION_HDMI_EARC = "hdmi-earc";
+  const @utf8InCpp String CONNECTION_IP_V4 = "ip-v4";
+  const @utf8InCpp String CONNECTION_SPDIF = "spdif";
+  const @utf8InCpp String CONNECTION_WIRELESS = "wireless";
+  const @utf8InCpp String CONNECTION_USB = "usb";
+  const @utf8InCpp String CONNECTION_VIRTUAL = "virtual";
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceType.aidl
similarity index 67%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceType.aidl
index 5135bcd..f31a707 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDeviceType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,22 +34,41 @@
 package android.media.audio.common;
 /* @hide */
 @Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
+enum AudioDeviceType {
   NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+  IN_DEFAULT = 1,
+  IN_ACCESSORY = 2,
+  IN_AFE_PROXY = 3,
+  IN_DEVICE = 4,
+  IN_ECHO_REFERENCE = 5,
+  IN_FM_TUNER = 6,
+  IN_HEADSET = 7,
+  IN_LOOPBACK = 8,
+  IN_MICROPHONE = 9,
+  IN_MICROPHONE_BACK = 10,
+  IN_SUBMIX = 11,
+  IN_TELEPHONY_RX = 12,
+  IN_TV_TUNER = 13,
+  IN_DOCK = 14,
+  IN_BUS = IN_DEVICE /* 4 */,
+  OUT_DEFAULT = 129,
+  OUT_ACCESSORY = 130,
+  OUT_AFE_PROXY = 131,
+  OUT_CARKIT = 132,
+  OUT_DEVICE = 133,
+  OUT_ECHO_CANCELLER = 134,
+  OUT_FM = 135,
+  OUT_HEADPHONE = 136,
+  OUT_HEADSET = 137,
+  OUT_HEARING_AID = 138,
+  OUT_LINE_AUX = 139,
+  OUT_SPEAKER = 140,
+  OUT_SPEAKER_EARPIECE = 141,
+  OUT_SPEAKER_SAFE = 142,
+  OUT_SUBMIX = 143,
+  OUT_TELEPHONY_TX = 144,
+  OUT_DOCK = 145,
+  OUT_BROADCAST = 146,
+  OUT_BUS = OUT_DEVICE /* 133 */,
+  OUT_MULTICHANNEL_GROUP = 147,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDualMonoMode.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDualMonoMode.aidl
index 5135bcd..77773f0 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioDualMonoMode.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,10 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioDualMonoMode {
+  OFF = 0,
+  LR = 1,
+  LL = 2,
+  RR = 3,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationMetadataType.aidl
similarity index 76%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationMetadataType.aidl
index 5135bcd..0ee0dbb 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationMetadataType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
+@Backing(type="int") @VintfStability
+enum AudioEncapsulationMetadataType {
   NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+  FRAMEWORK_TUNER = 1,
+  DVB_AD_DESCRIPTOR = 2,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationMode.aidl
similarity index 76%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationMode.aidl
index 5135bcd..0747dba 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationMode.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,10 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
+@Backing(type="byte") @VintfStability
+enum AudioEncapsulationMode {
+  INVALID = (-1) /* -1 */,
   NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+  ELEMENTARY_STREAM = 1,
+  HANDLE = 2,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationType.aidl
similarity index 76%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationType.aidl
index 5135bcd..ed58fcf 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioEncapsulationType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
+@Backing(type="int") @VintfStability
+enum AudioEncapsulationType {
   NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+  IEC61937 = 1,
+  PCM = 2,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFlag.aidl
similarity index 68%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFlag.aidl
index 5135bcd..1c8cbf5 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFlag.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,23 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioFlag {
+  NONE = 0x0,
+  AUDIBILITY_ENFORCED = (0x1 << 0) /* 1 */,
+  SCO = (0x1 << 2) /* 4 */,
+  BEACON = (0x1 << 3) /* 8 */,
+  HW_AV_SYNC = (0x1 << 4) /* 16 */,
+  HW_HOTWORD = (0x1 << 5) /* 32 */,
+  BYPASS_INTERRUPTION_POLICY = (0x1 << 6) /* 64 */,
+  BYPASS_MUTE = (0x1 << 7) /* 128 */,
+  LOW_LATENCY = (0x1 << 8) /* 256 */,
+  DEEP_BUFFER = (0x1 << 9) /* 512 */,
+  NO_MEDIA_PROJECTION = (0x1 << 10) /* 1024 */,
+  MUTE_HAPTIC = (0x1 << 11) /* 2048 */,
+  NO_SYSTEM_CAPTURE = (0x1 << 12) /* 4096 */,
+  CAPTURE_PRIVATE = (0x1 << 13) /* 8192 */,
+  CONTENT_SPATIALIZED = (0x1 << 14) /* 16384 */,
+  NEVER_SPATIALIZE = (0x1 << 15) /* 32768 */,
+  CALL_REDIRECTION = (0x1 << 16) /* 65536 */,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFormatDescription.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFormatDescription.aidl
index 5135bcd..58c75eb 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFormatDescription.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioFormatDescription {
+  android.media.audio.common.AudioFormatType type = android.media.audio.common.AudioFormatType.DEFAULT;
+  android.media.audio.common.PcmType pcm = android.media.audio.common.PcmType.DEFAULT;
+  @utf8InCpp String encoding;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFormatType.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFormatType.aidl
index 5135bcd..e60794f 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioFormatType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,10 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="byte") @VintfStability
+enum AudioFormatType {
+  DEFAULT = 0,
+  NON_PCM = DEFAULT /* 0 */,
+  PCM = 1,
+  SYS_RESERVED_INVALID = (-1) /* -1 */,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGain.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGain.aidl
index 5135bcd..adc5b67 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGain.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,15 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioGain {
+  int mode;
+  android.media.audio.common.AudioChannelLayout channelMask;
+  int minValue;
+  int maxValue;
+  int defaultValue;
+  int stepValue;
+  int minRampMs;
+  int maxRampMs;
+  boolean useForVolume;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGainConfig.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGainConfig.aidl
index 5135bcd..01877c7 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGainConfig.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,11 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioGainConfig {
+  int index;
+  int mode;
+  android.media.audio.common.AudioChannelLayout channelMask;
+  int[] values;
+  int rampDurationMs;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGainMode.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGainMode.aidl
index 5135bcd..fddc20c 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioGainMode.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="byte") @VintfStability
+enum AudioGainMode {
+  JOINT = 0,
+  CHANNELS = 1,
+  RAMP = 2,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalAttributesGroup.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalAttributesGroup.aidl
index 5135bcd..1062bdb 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalAttributesGroup.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioHalAttributesGroup {
+  android.media.audio.common.AudioStreamType streamType = android.media.audio.common.AudioStreamType.INVALID;
+  @utf8InCpp String volumeGroupName;
+  android.media.audio.common.AudioAttributes[] attributes;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapConfiguration.aidl
similarity index 78%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapConfiguration.aidl
index 5135bcd..255b10a 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapConfiguration.aidl
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioHalCapConfiguration {
+  @utf8InCpp String name;
+  android.media.audio.common.AudioHalCapRule rule;
+  android.media.audio.common.AudioHalCapParameter[] parameterSettings;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterion.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterion.aidl
index 5135bcd..3b00031 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterion.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioHalCapCriterion {
+  @utf8InCpp String name;
+  @utf8InCpp String criterionTypeName;
+  @utf8InCpp String defaultLiteralValue;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterionType.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterionType.aidl
index 5135bcd..1245761 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterionType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioHalCapCriterionType {
+  @utf8InCpp String name;
+  boolean isInclusive;
+  @utf8InCpp String[] values;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterionV2.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterionV2.aidl
new file mode 100644
index 0000000..b5ceee3
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapCriterionV2.aidl
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@VintfStability
+union AudioHalCapCriterionV2 {
+  android.media.audio.common.AudioHalCapCriterionV2.AvailableDevices availableInputDevices;
+  android.media.audio.common.AudioHalCapCriterionV2.AvailableDevices availableOutputDevices;
+  android.media.audio.common.AudioHalCapCriterionV2.AvailableDevicesAddresses availableInputDevicesAddresses;
+  android.media.audio.common.AudioHalCapCriterionV2.AvailableDevicesAddresses availableOutputDevicesAddresses;
+  android.media.audio.common.AudioHalCapCriterionV2.TelephonyMode telephonyMode;
+  android.media.audio.common.AudioHalCapCriterionV2.ForceConfigForUse forceConfigForUse;
+  @Backing(type="byte") @VintfStability
+  enum LogicalDisjunction {
+    EXCLUSIVE = 0,
+    INCLUSIVE,
+  }
+  @VintfStability
+  parcelable ForceConfigForUse {
+    android.media.audio.common.AudioPolicyForceUse[] values;
+    android.media.audio.common.AudioPolicyForceUse defaultValue;
+    android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction logic = android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction.EXCLUSIVE;
+  }
+  @VintfStability
+  parcelable TelephonyMode {
+    android.media.audio.common.AudioMode[] values;
+    android.media.audio.common.AudioMode defaultValue = android.media.audio.common.AudioMode.NORMAL;
+    android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction logic = android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction.EXCLUSIVE;
+  }
+  @VintfStability
+  parcelable AvailableDevices {
+    android.media.audio.common.AudioDeviceDescription[] values;
+    android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction logic = android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction.INCLUSIVE;
+  }
+  @VintfStability
+  parcelable AvailableDevicesAddresses {
+    android.media.audio.common.AudioDeviceAddress[] values;
+    android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction logic = android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction.INCLUSIVE;
+  }
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapDomain.aidl
similarity index 78%
rename from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
rename to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapDomain.aidl
index 5135bcd..9c20abe 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapDomain.aidl
@@ -33,23 +33,8 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioHalCapDomain {
+  @utf8InCpp String name;
+  android.media.audio.common.AudioHalCapConfiguration[] configurations;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapParameter.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapParameter.aidl
new file mode 100644
index 0000000..c0b1a72
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapParameter.aidl
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@VintfStability
+union AudioHalCapParameter {
+  android.media.audio.common.AudioHalCapParameter.StrategyDevice selectedStrategyDevice;
+  android.media.audio.common.AudioHalCapParameter.InputSourceDevice selectedInputSourceDevice;
+  android.media.audio.common.AudioHalCapParameter.StrategyDeviceAddress strategyDeviceAddress;
+  android.media.audio.common.AudioHalCapParameter.StreamVolumeProfile streamVolumeProfile;
+  @VintfStability
+  parcelable StrategyDevice {
+    android.media.audio.common.AudioDeviceDescription device;
+    int id = android.media.audio.common.AudioProductStrategyType.SYS_RESERVED_NONE /* -1 */;
+    boolean isSelected;
+  }
+  @VintfStability
+  parcelable InputSourceDevice {
+    android.media.audio.common.AudioDeviceDescription device;
+    android.media.audio.common.AudioSource inputSource = android.media.audio.common.AudioSource.DEFAULT;
+    boolean isSelected;
+  }
+  @VintfStability
+  parcelable StrategyDeviceAddress {
+    android.media.audio.common.AudioDeviceAddress deviceAddress;
+    int id = android.media.audio.common.AudioProductStrategyType.SYS_RESERVED_NONE /* -1 */;
+  }
+  @VintfStability
+  parcelable StreamVolumeProfile {
+    android.media.audio.common.AudioStreamType stream = android.media.audio.common.AudioStreamType.INVALID;
+    android.media.audio.common.AudioStreamType profile = android.media.audio.common.AudioStreamType.INVALID;
+  }
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapRule.aidl
similarity index 67%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapRule.aidl
index 5135bcd..e106050 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalCapRule.aidl
@@ -33,23 +33,28 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioHalCapRule {
+  android.media.audio.common.AudioHalCapRule.CompoundRule compoundRule = android.media.audio.common.AudioHalCapRule.CompoundRule.INVALID;
+  android.media.audio.common.AudioHalCapRule.CriterionRule[] criterionRules;
+  android.media.audio.common.AudioHalCapRule[] nestedRules;
+  @VintfStability
+  enum CompoundRule {
+    INVALID = 0,
+    ANY,
+    ALL,
+  }
+  @VintfStability
+  enum MatchingRule {
+    INVALID = (-1) /* -1 */,
+    IS = 0,
+    IS_NOT,
+    INCLUDES,
+    EXCLUDES,
+  }
+  @VintfStability
+  parcelable CriterionRule {
+    android.media.audio.common.AudioHalCapRule.MatchingRule matchingRule = android.media.audio.common.AudioHalCapRule.MatchingRule.INVALID;
+    android.media.audio.common.AudioHalCapCriterionV2 criterionAndValue;
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalEngineConfig.aidl
similarity index 66%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalEngineConfig.aidl
index 5135bcd..bc856da 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalEngineConfig.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,17 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioHalEngineConfig {
+  int defaultProductStrategyId = android.media.audio.common.AudioProductStrategyType.SYS_RESERVED_NONE /* -1 */;
+  android.media.audio.common.AudioHalProductStrategy[] productStrategies;
+  android.media.audio.common.AudioHalVolumeGroup[] volumeGroups;
+  @nullable android.media.audio.common.AudioHalEngineConfig.CapSpecificConfig capSpecificConfig;
+  @VintfStability
+  parcelable CapSpecificConfig {
+    android.media.audio.common.AudioHalCapCriterion[] criteria;
+    android.media.audio.common.AudioHalCapCriterionType[] criterionTypes;
+    @nullable android.media.audio.common.AudioHalCapCriterionV2[] criteriaV2;
+    @nullable android.media.audio.common.AudioHalCapDomain[] domains;
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalProductStrategy.aidl
similarity index 73%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalProductStrategy.aidl
index 5135bcd..9878e37 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalProductStrategy.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,15 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
+parcelable AudioHalProductStrategy {
+  int id = android.media.audio.common.AudioProductStrategyType.SYS_RESERVED_NONE /* -1 */;
+  android.media.audio.common.AudioHalAttributesGroup[] attributesGroups;
+  @nullable @utf8InCpp String name;
+  int zoneId = android.media.audio.common.AudioHalProductStrategy.ZoneId.DEFAULT /* 0 */;
+  const int VENDOR_STRATEGY_ID_START = 1000;
+  @Backing(type="int") @VintfStability
+  enum ZoneId {
+    DEFAULT = 0,
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalVolumeCurve.aidl
similarity index 71%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalVolumeCurve.aidl
index 5135bcd..bcc7324 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalVolumeCurve.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,23 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioHalVolumeCurve {
+  android.media.audio.common.AudioHalVolumeCurve.DeviceCategory deviceCategory = android.media.audio.common.AudioHalVolumeCurve.DeviceCategory.SPEAKER;
+  android.media.audio.common.AudioHalVolumeCurve.CurvePoint[] curvePoints;
+  @Backing(type="byte") @VintfStability
+  enum DeviceCategory {
+    HEADSET = 0,
+    SPEAKER = 1,
+    EARPIECE = 2,
+    EXT_MEDIA = 3,
+    HEARING_AID = 4,
+  }
+  @VintfStability
+  parcelable CurvePoint {
+    byte index;
+    int attenuationMb;
+    const byte MIN_INDEX = 0;
+    const byte MAX_INDEX = 100;
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalVolumeGroup.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalVolumeGroup.aidl
index 5135bcd..f741e69 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioHalVolumeGroup.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,11 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
+parcelable AudioHalVolumeGroup {
+  @utf8InCpp String name;
+  int minIndex;
+  int maxIndex;
+  android.media.audio.common.AudioHalVolumeCurve[] volumeCurves;
+  const int INDEX_DEFERRED_TO_AUDIO_SERVICE = (-1) /* -1 */;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioInputFlags.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioInputFlags.aidl
index 5135bcd..e6a57e9 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioInputFlags.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,17 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioInputFlags {
+  FAST = 0,
+  HW_HOTWORD = 1,
+  RAW = 2,
+  SYNC = 3,
+  MMAP_NOIRQ = 4,
+  VOIP_TX = 5,
+  HW_AV_SYNC = 6,
+  DIRECT = 7,
+  ULTRASOUND = 8,
+  HOTWORD_TAP = 9,
+  HW_LOOKBACK = 10,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioIoFlags.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioIoFlags.aidl
index 5135bcd..4a46725 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioIoFlags.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,8 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+union AudioIoFlags {
+  int input;
+  int output;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioLatencyMode.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioLatencyMode.aidl
index 5135bcd..f6949d2 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioLatencyMode.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,10 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="byte") @SuppressWarnings(value={"redundant-name"}) @VintfStability
+enum AudioLatencyMode {
+  FREE = 0,
+  LOW = 1,
+  DYNAMIC_SPATIAL_AUDIO_SOFTWARE = 2,
+  DYNAMIC_SPATIAL_AUDIO_HARDWARE = 3,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicy.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicy.aidl
index 5135bcd..98bf0e5 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicy.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,10 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioMMapPolicy {
+  UNSPECIFIED = 0,
+  NEVER = 1,
+  AUTO = 2,
+  ALWAYS = 3,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicyInfo.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicyInfo.aidl
index 5135bcd..7c4f75e 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicyInfo.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,8 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioMMapPolicyInfo {
+  android.media.audio.common.AudioDevice device;
+  android.media.audio.common.AudioMMapPolicy mmapPolicy = android.media.audio.common.AudioMMapPolicy.UNSPECIFIED;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicyType.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicyType.aidl
index 5135bcd..efe8826 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMMapPolicyType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,8 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioMMapPolicyType {
+  DEFAULT = 1,
+  EXCLUSIVE = 2,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMode.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMode.aidl
index 5135bcd..1b4cdc4 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioMode.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,15 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioMode {
+  SYS_RESERVED_INVALID = (-2) /* -2 */,
+  SYS_RESERVED_CURRENT = (-1) /* -1 */,
+  NORMAL = 0,
+  RINGTONE = 1,
+  IN_CALL = 2,
+  IN_COMMUNICATION = 3,
+  CALL_SCREEN = 4,
+  SYS_RESERVED_CALL_REDIRECT = 5,
+  SYS_RESERVED_COMMUNICATION_REDIRECT = 6,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioOffloadInfo.aidl
similarity index 70%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioOffloadInfo.aidl
index 5135bcd..40bd53b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioOffloadInfo.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,18 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioOffloadInfo {
+  android.media.audio.common.AudioConfigBase base;
+  android.media.audio.common.AudioStreamType streamType = android.media.audio.common.AudioStreamType.INVALID;
+  int bitRatePerSecond;
+  long durationUs;
+  boolean hasVideo;
+  boolean isStreaming;
+  int bitWidth = 16;
+  int offloadBufferSize;
+  android.media.audio.common.AudioUsage usage = android.media.audio.common.AudioUsage.INVALID;
+  android.media.audio.common.AudioEncapsulationMode encapsulationMode = android.media.audio.common.AudioEncapsulationMode.INVALID;
+  int contentId;
+  int syncId;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioOutputFlags.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioOutputFlags.aidl
index 5135bcd..268e635 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioOutputFlags.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,25 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioOutputFlags {
+  DIRECT = 0,
+  PRIMARY = 1,
+  FAST = 2,
+  DEEP_BUFFER = 3,
+  COMPRESS_OFFLOAD = 4,
+  NON_BLOCKING = 5,
+  HW_AV_SYNC = 6,
+  TTS = 7,
+  RAW = 8,
+  SYNC = 9,
+  IEC958_NONAUDIO = 10,
+  DIRECT_PCM = 11,
+  MMAP_NOIRQ = 12,
+  VOIP_RX = 13,
+  INCALL_MUSIC = 14,
+  GAPLESS_OFFLOAD = 15,
+  SPATIALIZER = 16,
+  ULTRASOUND = 17,
+  BIT_PERFECT = 18,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPlaybackRate.aidl
similarity index 68%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPlaybackRate.aidl
index 5135bcd..310b2af 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPlaybackRate.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,22 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioPlaybackRate {
+  float speed;
+  float pitch;
+  android.media.audio.common.AudioPlaybackRate.TimestretchMode timestretchMode = android.media.audio.common.AudioPlaybackRate.TimestretchMode.DEFAULT;
+  android.media.audio.common.AudioPlaybackRate.TimestretchFallbackMode fallbackMode = android.media.audio.common.AudioPlaybackRate.TimestretchFallbackMode.SYS_RESERVED_DEFAULT;
+  @Backing(type="int") @VintfStability
+  enum TimestretchMode {
+    DEFAULT = 0,
+    VOICE = 1,
+  }
+  @Backing(type="int") @VintfStability
+  enum TimestretchFallbackMode {
+    SYS_RESERVED_CUT_REPEAT = (-1) /* -1 */,
+    SYS_RESERVED_DEFAULT = 0,
+    MUTE = 1,
+    FAIL = 2,
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPolicyForceUse.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPolicyForceUse.aidl
new file mode 100644
index 0000000..eb883e9
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPolicyForceUse.aidl
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@SuppressWarnings(value={"redundant-name"}) @VintfStability
+union AudioPolicyForceUse {
+  android.media.audio.common.AudioPolicyForceUse.MediaDeviceCategory forMedia = android.media.audio.common.AudioPolicyForceUse.MediaDeviceCategory.NONE;
+  android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory forCommunication = android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory.NONE;
+  android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory forRecord = android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory.NONE;
+  android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory forVibrateRinging = android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory.NONE;
+  android.media.audio.common.AudioPolicyForceUse.DockType dock = android.media.audio.common.AudioPolicyForceUse.DockType.NONE;
+  boolean systemSounds = false;
+  boolean hdmiSystemAudio = false;
+  android.media.audio.common.AudioPolicyForceUse.EncodedSurroundConfig encodedSurround = android.media.audio.common.AudioPolicyForceUse.EncodedSurroundConfig.UNSPECIFIED;
+  @Backing(type="byte") @VintfStability
+  enum CommunicationDeviceCategory {
+    NONE = 0,
+    SPEAKER,
+    BT_SCO,
+    BT_BLE,
+    WIRED_ACCESSORY,
+  }
+  @Backing(type="byte") @VintfStability
+  enum MediaDeviceCategory {
+    NONE = 0,
+    SPEAKER,
+    HEADPHONES,
+    BT_A2DP,
+    ANALOG_DOCK,
+    DIGITAL_DOCK,
+    WIRED_ACCESSORY,
+    NO_BT_A2DP,
+  }
+  @Backing(type="byte") @VintfStability
+  enum DockType {
+    NONE = 0,
+    BT_CAR_DOCK,
+    BT_DESK_DOCK,
+    ANALOG_DOCK,
+    DIGITAL_DOCK,
+    WIRED_ACCESSORY,
+  }
+  @Backing(type="byte") @VintfStability
+  enum EncodedSurroundConfig {
+    UNSPECIFIED = 0,
+    NEVER,
+    ALWAYS,
+    MANUAL,
+  }
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPort.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPort.aidl
index 5135bcd..970bbc0 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPort.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,13 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioPort {
+  int id;
+  @utf8InCpp String name;
+  android.media.audio.common.AudioProfile[] profiles;
+  android.media.audio.common.AudioIoFlags flags;
+  android.media.audio.common.ExtraAudioDescriptor[] extraAudioDescriptors;
+  android.media.audio.common.AudioGain[] gains;
+  android.media.audio.common.AudioPortExt ext;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortConfig.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortConfig.aidl
index 5135bcd..18e6406 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortConfig.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,14 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioPortConfig {
+  int id;
+  int portId;
+  @nullable android.media.audio.common.Int sampleRate;
+  @nullable android.media.audio.common.AudioChannelLayout channelMask;
+  @nullable android.media.audio.common.AudioFormatDescription format;
+  @nullable android.media.audio.common.AudioGainConfig gain;
+  @nullable android.media.audio.common.AudioIoFlags flags;
+  android.media.audio.common.AudioPortExt ext;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortDeviceExt.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortDeviceExt.aidl
index 5135bcd..2b3e72c 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortDeviceExt.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,13 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
+parcelable AudioPortDeviceExt {
+  android.media.audio.common.AudioDevice device;
+  int flags;
+  android.media.audio.common.AudioFormatDescription[] encodedFormats;
+  int encapsulationModes;
+  int encapsulationMetadataTypes;
+  @nullable android.media.audio.common.AudioChannelLayout speakerLayout;
+  const int FLAG_INDEX_DEFAULT_DEVICE = 0;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortExt.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortExt.aidl
index 5135bcd..af9d9c4 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortExt.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,10 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+union AudioPortExt {
+  boolean unspecified;
+  android.media.audio.common.AudioPortDeviceExt device;
+  android.media.audio.common.AudioPortMixExt mix;
+  int session;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortMixExt.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortMixExt.aidl
index 5135bcd..5b74c0d 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortMixExt.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,11 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioPortMixExt {
+  int handle;
+  android.media.audio.common.AudioPortMixExtUseCase usecase;
+  int maxOpenStreamCount;
+  int maxActiveStreamCount;
+  int recommendedMuteDurationMs;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortMixExtUseCase.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortMixExtUseCase.aidl
index 5135bcd..e9acb40 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioPortMixExtUseCase.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+union AudioPortMixExtUseCase {
+  boolean unspecified;
+  android.media.audio.common.AudioStreamType stream;
+  android.media.audio.common.AudioSource source;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioProductStrategyType.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioProductStrategyType.aidl
index 5135bcd..ba59d40 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioProductStrategyType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,17 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="byte") @VintfStability
+enum AudioProductStrategyType {
+  SYS_RESERVED_NONE = (-1) /* -1 */,
+  MEDIA = 0,
+  PHONE = 1,
+  SONIFICATION = 2,
+  SONIFICATION_RESPECTFUL = 3,
+  DTMF = 4,
+  ENFORCED_AUDIBLE = 5,
+  TRANSMITTED_THROUGH_SPEAKER = 6,
+  ACCESSIBILITY = 7,
+  SYS_RESERVED_REROUTING = 8,
+  SYS_RESERVED_CALL_ASSISTANT = 9,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioProfile.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioProfile.aidl
index 5135bcd..134cdd9 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioProfile.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,11 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioProfile {
+  @utf8InCpp String name;
+  android.media.audio.common.AudioFormatDescription format;
+  android.media.audio.common.AudioChannelLayout[] channelMasks;
+  int[] sampleRates;
+  android.media.audio.common.AudioEncapsulationType encapsulationType = android.media.audio.common.AudioEncapsulationType.NONE;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioSource.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioSource.aidl
index 5135bcd..522adeb 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioSource.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,22 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioSource {
+  SYS_RESERVED_INVALID = (-1) /* -1 */,
+  DEFAULT = 0,
+  MIC = 1,
+  VOICE_UPLINK = 2,
+  VOICE_DOWNLINK = 3,
+  VOICE_CALL = 4,
+  CAMCORDER = 5,
+  VOICE_RECOGNITION = 6,
+  VOICE_COMMUNICATION = 7,
+  REMOTE_SUBMIX = 8,
+  UNPROCESSED = 9,
+  VOICE_PERFORMANCE = 10,
+  ECHO_REFERENCE = 1997,
+  FM_TUNER = 1998,
+  HOTWORD = 1999,
+  ULTRASOUND = 2000,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioStandard.aidl
similarity index 76%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioStandard.aidl
index 5135bcd..704d340 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioStandard.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,10 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
+@Backing(type="int") @VintfStability
+enum AudioStandard {
   NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+  EDID = 1,
+  SADB = 2,
+  VSADB = 3,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioStreamType.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioStreamType.aidl
index 5135bcd..aa170b7 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioStreamType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,23 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioStreamType {
+  INVALID = (-2) /* -2 */,
+  SYS_RESERVED_DEFAULT = (-1) /* -1 */,
+  VOICE_CALL = 0,
+  SYSTEM = 1,
+  RING = 2,
+  MUSIC = 3,
+  ALARM = 4,
+  NOTIFICATION = 5,
+  BLUETOOTH_SCO = 6,
+  ENFORCED_AUDIBLE = 7,
+  DTMF = 8,
+  TTS = 9,
+  ACCESSIBILITY = 10,
+  ASSISTANT = 11,
+  SYS_RESERVED_REROUTING = 12,
+  SYS_RESERVED_PATCH = 13,
+  CALL_ASSISTANT = 14,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioUsage.aidl
similarity index 68%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioUsage.aidl
index 5135bcd..3074b9d 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioUsage.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,30 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioUsage {
+  INVALID = (-1) /* -1 */,
+  UNKNOWN = 0,
+  MEDIA = 1,
+  VOICE_COMMUNICATION = 2,
+  VOICE_COMMUNICATION_SIGNALLING = 3,
+  ALARM = 4,
+  NOTIFICATION = 5,
+  NOTIFICATION_TELEPHONY_RINGTONE = 6,
+  SYS_RESERVED_NOTIFICATION_COMMUNICATION_REQUEST = 7,
+  SYS_RESERVED_NOTIFICATION_COMMUNICATION_INSTANT = 8,
+  SYS_RESERVED_NOTIFICATION_COMMUNICATION_DELAYED = 9,
+  NOTIFICATION_EVENT = 10,
+  ASSISTANCE_ACCESSIBILITY = 11,
+  ASSISTANCE_NAVIGATION_GUIDANCE = 12,
+  ASSISTANCE_SONIFICATION = 13,
+  GAME = 14,
+  VIRTUAL_SOURCE = 15,
+  ASSISTANT = 16,
+  CALL_ASSISTANT = 17,
+  EMERGENCY = 1000,
+  SAFETY = 1001,
+  VEHICLE_STATUS = 1002,
+  ANNOUNCEMENT = 1003,
+  SPEAKER_CLEANUP = 1004,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioUuid.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioUuid.aidl
index 5135bcd..af307da 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioUuid.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,11 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioUuid {
+  int timeLow;
+  int timeMid;
+  int timeHiAndVersion;
+  int clockSeq;
+  byte[] node;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl
new file mode 100644
index 0000000..3a2bc5b
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@JavaDerive(equals=true, toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
+parcelable AudioVolumeGroupChangeEvent {
+  int groupId;
+  int volumeIndex;
+  boolean muted;
+  int flags;
+  const int VOLUME_FLAG_SHOW_UI = (1 << 0) /* 1 */;
+  const int VOLUME_FLAG_ALLOW_RINGER_MODES = (1 << 1) /* 2 */;
+  const int VOLUME_FLAG_PLAY_SOUND = (1 << 2) /* 4 */;
+  const int VOLUME_FLAG_REMOVE_SOUND_AND_VIBRATE = (1 << 3) /* 8 */;
+  const int VOLUME_FLAG_VIBRATE = (1 << 4) /* 16 */;
+  const int VOLUME_FLAG_FIXED_VOLUME = (1 << 5) /* 32 */;
+  const int VOLUME_FLAG_BLUETOOTH_ABS_VOLUME = (1 << 6) /* 64 */;
+  const int VOLUME_FLAG_SHOW_SILENT_HINT = (1 << 7) /* 128 */;
+  const int VOLUME_FLAG_HDMI_SYSTEM_AUDIO_VOLUME = (1 << 8) /* 256 */;
+  const int VOLUME_FLAG_ACTIVE_MEDIA_ONLY = (1 << 9) /* 512 */;
+  const int VOLUME_FLAG_SHOW_UI_WARNINGS = (1 << 10) /* 1024 */;
+  const int VOLUME_FLAG_SHOW_VIBRATE_HINT = (1 << 11) /* 2048 */;
+  const int VOLUME_FLAG_FROM_KEY = (1 << 12) /* 4096 */;
+  const int VOLUME_FLAG_ABSOLUTE_VOLUME = (1 << 13) /* 8192 */;
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Boolean.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Boolean.aidl
index 5135bcd..bc996e4 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Boolean.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,7 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Boolean {
+  boolean value;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Byte.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Byte.aidl
index 5135bcd..604e74d 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Byte.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,7 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Byte {
+  byte value;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Double.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Double.aidl
index 5135bcd..a525629 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Double.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,7 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Double {
+  double value;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/ExtraAudioDescriptor.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/ExtraAudioDescriptor.aidl
index 5135bcd..2ae2405 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/ExtraAudioDescriptor.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,9 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ExtraAudioDescriptor {
+  android.media.audio.common.AudioStandard standard = android.media.audio.common.AudioStandard.NONE;
+  byte[] audioDescriptor;
+  android.media.audio.common.AudioEncapsulationType encapsulationType = android.media.audio.common.AudioEncapsulationType.NONE;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Float.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Float.aidl
index 5135bcd..af98eab 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Float.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,7 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Float {
+  float value;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/HeadTracking.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/HeadTracking.aidl
index 5135bcd..39518cd 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/HeadTracking.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,25 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable HeadTracking {
+  /* @hide */
+  @Backing(type="byte")
+  enum Mode {
+    OTHER = 0,
+    DISABLED = 1,
+    RELATIVE_WORLD = 2,
+    RELATIVE_SCREEN = 3,
+  }
+  /* @hide */
+  @Backing(type="byte")
+  enum ConnectionMode {
+    FRAMEWORK_PROCESSED = 0,
+    DIRECT_TO_SENSOR_SW = 1,
+    DIRECT_TO_SENSOR_TUNNEL = 2,
+  }
+  /* @hide */
+  union SensorData {
+    float[6] headToStage = {0f, 0f, 0f, 0f, 0f, 0f};
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Int.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Int.aidl
index 5135bcd..b0d3c49 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Int.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,7 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Int {
+  int value;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Long.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Long.aidl
index 5135bcd..e403dd3 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Long.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2022 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,7 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Long {
+  long value;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/MicrophoneDynamicInfo.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/MicrophoneDynamicInfo.aidl
index 5135bcd..f0a9b8b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/MicrophoneDynamicInfo.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,14 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable MicrophoneDynamicInfo {
+  @utf8InCpp String id;
+  android.media.audio.common.MicrophoneDynamicInfo.ChannelMapping[] channelMapping;
+  @Backing(type="int") @VintfStability
+  enum ChannelMapping {
+    UNUSED = 0,
+    DIRECT = 1,
+    PROCESSED = 2,
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/MicrophoneInfo.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/MicrophoneInfo.aidl
new file mode 100644
index 0000000..d23031e
--- /dev/null
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/MicrophoneInfo.aidl
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2023 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+//     the interface (from the latest frozen version), the build system will
+//     prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.media.audio.common;
+/* @hide */
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable MicrophoneInfo {
+  @utf8InCpp String id;
+  android.media.audio.common.AudioDevice device;
+  android.media.audio.common.MicrophoneInfo.Location location = android.media.audio.common.MicrophoneInfo.Location.UNKNOWN;
+  int group = GROUP_UNKNOWN /* -1 */;
+  int indexInTheGroup = INDEX_IN_THE_GROUP_UNKNOWN /* -1 */;
+  @nullable android.media.audio.common.MicrophoneInfo.Sensitivity sensitivity;
+  android.media.audio.common.MicrophoneInfo.Directionality directionality = android.media.audio.common.MicrophoneInfo.Directionality.UNKNOWN;
+  android.media.audio.common.MicrophoneInfo.FrequencyResponsePoint[] frequencyResponse;
+  @nullable android.media.audio.common.MicrophoneInfo.Coordinate position;
+  @nullable android.media.audio.common.MicrophoneInfo.Coordinate orientation;
+  const int GROUP_UNKNOWN = (-1) /* -1 */;
+  const int INDEX_IN_THE_GROUP_UNKNOWN = (-1) /* -1 */;
+  @Backing(type="int") @VintfStability
+  enum Location {
+    UNKNOWN = 0,
+    MAINBODY = 1,
+    MAINBODY_MOVABLE = 2,
+    PERIPHERAL = 3,
+  }
+  @VintfStability
+  parcelable Sensitivity {
+    float leveldBFS;
+    float maxSpldB;
+    float minSpldB;
+  }
+  @Backing(type="int") @VintfStability
+  enum Directionality {
+    UNKNOWN = 0,
+    OMNI = 1,
+    BI_DIRECTIONAL = 2,
+    CARDIOID = 3,
+    HYPER_CARDIOID = 4,
+    SUPER_CARDIOID = 5,
+  }
+  @VintfStability
+  parcelable FrequencyResponsePoint {
+    float frequencyHz;
+    float leveldB;
+  }
+  @VintfStability
+  parcelable Coordinate {
+    float x;
+    float y;
+    float z;
+  }
+}
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/PcmType.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/PcmType.aidl
index 5135bcd..fbe3aea 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/PcmType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,13 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="byte") @VintfStability
+enum PcmType {
+  DEFAULT = 0,
+  UINT_8_BIT = DEFAULT /* 0 */,
+  INT_16_BIT = 1,
+  INT_32_BIT = 2,
+  FIXED_Q_8_24 = 3,
+  FLOAT_32_BIT = 4,
+  INT_24_BIT = 5,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Spatialization.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Spatialization.aidl
index 5135bcd..d916c8c 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Spatialization.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2023 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,19 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Spatialization {
+  /* @hide */
+  @Backing(type="byte")
+  enum Level {
+    NONE = 0,
+    MULTICHANNEL = 1,
+    BED_PLUS_OBJECTS = 2,
+  }
+  /* @hide */
+  @Backing(type="byte")
+  enum Mode {
+    BINAURAL = 0,
+    TRANSAURAL = 1,
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Void.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Void.aidl
index 5135bcd..2e8afd4 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/4/android/media/audio/common/Void.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2021 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,6 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@FixedSize @JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Void {
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioChannelLayout.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioChannelLayout.aidl
index 33596ea..c833f1c 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioChannelLayout.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioChannelLayout.aidl
@@ -88,7 +88,8 @@
   const int LAYOUT_7POINT1POINT4 = ((((LAYOUT_7POINT1 | CHANNEL_TOP_FRONT_LEFT) | CHANNEL_TOP_FRONT_RIGHT) | CHANNEL_TOP_BACK_LEFT) | CHANNEL_TOP_BACK_RIGHT) /* 185919 */;
   const int LAYOUT_9POINT1POINT4 = ((LAYOUT_7POINT1POINT4 | CHANNEL_FRONT_WIDE_LEFT) | CHANNEL_FRONT_WIDE_RIGHT) /* 50517567 */;
   const int LAYOUT_9POINT1POINT6 = ((LAYOUT_9POINT1POINT4 | CHANNEL_TOP_SIDE_LEFT) | CHANNEL_TOP_SIDE_RIGHT) /* 51303999 */;
-  const int LAYOUT_13POINT_360RA = ((((((((((((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_SIDE_LEFT) | CHANNEL_SIDE_RIGHT) | CHANNEL_TOP_FRONT_LEFT) | CHANNEL_TOP_FRONT_RIGHT) | CHANNEL_TOP_FRONT_CENTER) | CHANNEL_TOP_BACK_LEFT) | CHANNEL_TOP_BACK_RIGHT) | CHANNEL_BOTTOM_FRONT_LEFT) | CHANNEL_BOTTOM_FRONT_RIGHT) | CHANNEL_BOTTOM_FRONT_CENTER) /* 7534087 */;
+  const int LAYOUT_13POINT0 = ((((((((((((CHANNEL_FRONT_LEFT | CHANNEL_FRONT_RIGHT) | CHANNEL_FRONT_CENTER) | CHANNEL_SIDE_LEFT) | CHANNEL_SIDE_RIGHT) | CHANNEL_TOP_FRONT_LEFT) | CHANNEL_TOP_FRONT_RIGHT) | CHANNEL_TOP_FRONT_CENTER) | CHANNEL_TOP_BACK_LEFT) | CHANNEL_TOP_BACK_RIGHT) | CHANNEL_BOTTOM_FRONT_LEFT) | CHANNEL_BOTTOM_FRONT_RIGHT) | CHANNEL_BOTTOM_FRONT_CENTER) /* 7534087 */;
+  const int LAYOUT_13POINT_360RA = LAYOUT_13POINT0 /* 7534087 */;
   const int LAYOUT_22POINT2 = ((((((((((((LAYOUT_7POINT1POINT4 | CHANNEL_FRONT_LEFT_OF_CENTER) | CHANNEL_FRONT_RIGHT_OF_CENTER) | CHANNEL_BACK_CENTER) | CHANNEL_TOP_CENTER) | CHANNEL_TOP_FRONT_CENTER) | CHANNEL_TOP_BACK_CENTER) | CHANNEL_TOP_SIDE_LEFT) | CHANNEL_TOP_SIDE_RIGHT) | CHANNEL_BOTTOM_FRONT_LEFT) | CHANNEL_BOTTOM_FRONT_RIGHT) | CHANNEL_BOTTOM_FRONT_CENTER) | CHANNEL_LOW_FREQUENCY_2) /* 16777215 */;
   const int LAYOUT_MONO_HAPTIC_A = (LAYOUT_MONO | CHANNEL_HAPTIC_A) /* 1073741825 */;
   const int LAYOUT_STEREO_HAPTIC_A = (LAYOUT_STEREO | CHANNEL_HAPTIC_A) /* 1073741827 */;
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl
index f7d1b77..f31a707 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioDeviceType.aidl
@@ -70,4 +70,5 @@
   OUT_DOCK = 145,
   OUT_BROADCAST = 146,
   OUT_BUS = OUT_DEVICE /* 133 */,
+  OUT_MULTICHANNEL_GROUP = 147,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalCapCriterionV2.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalCapCriterionV2.aidl
index 3b23532..b5ceee3 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalCapCriterionV2.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalCapCriterionV2.aidl
@@ -41,7 +41,6 @@
   android.media.audio.common.AudioHalCapCriterionV2.AvailableDevicesAddresses availableOutputDevicesAddresses;
   android.media.audio.common.AudioHalCapCriterionV2.TelephonyMode telephonyMode;
   android.media.audio.common.AudioHalCapCriterionV2.ForceConfigForUse forceConfigForUse;
-  android.media.audio.common.AudioHalCapCriterionV2.Type type;
   @Backing(type="byte") @VintfStability
   enum LogicalDisjunction {
     EXCLUSIVE = 0,
@@ -49,9 +48,8 @@
   }
   @VintfStability
   parcelable ForceConfigForUse {
-    android.media.audio.common.AudioPolicyForceUse forceUse = android.media.audio.common.AudioPolicyForceUse.MEDIA;
-    android.media.audio.common.AudioPolicyForcedConfig[] values;
-    android.media.audio.common.AudioPolicyForcedConfig defaultValue = android.media.audio.common.AudioPolicyForcedConfig.NONE;
+    android.media.audio.common.AudioPolicyForceUse[] values;
+    android.media.audio.common.AudioPolicyForceUse defaultValue;
     android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction logic = android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction.EXCLUSIVE;
   }
   @VintfStability
@@ -70,11 +68,4 @@
     android.media.audio.common.AudioDeviceAddress[] values;
     android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction logic = android.media.audio.common.AudioHalCapCriterionV2.LogicalDisjunction.INCLUSIVE;
   }
-  @VintfStability
-  union Type {
-    android.media.audio.common.AudioDeviceDescription availableDevicesType;
-    android.media.audio.common.AudioDeviceAddress availableDevicesAddressesType;
-    android.media.audio.common.AudioMode telephonyModeType;
-    android.media.audio.common.AudioPolicyForcedConfig forcedConfigType;
-  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalCapRule.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalCapRule.aidl
index fb1719c..e106050 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalCapRule.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalCapRule.aidl
@@ -55,7 +55,6 @@
   @VintfStability
   parcelable CriterionRule {
     android.media.audio.common.AudioHalCapRule.MatchingRule matchingRule = android.media.audio.common.AudioHalCapRule.MatchingRule.INVALID;
-    android.media.audio.common.AudioHalCapCriterionV2 criterion;
-    android.media.audio.common.AudioHalCapCriterionV2.Type criterionTypeValue;
+    android.media.audio.common.AudioHalCapCriterionV2 criterionAndValue;
   }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalProductStrategy.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalProductStrategy.aidl
index 1144574..9878e37 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalProductStrategy.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioHalProductStrategy.aidl
@@ -38,5 +38,10 @@
   int id = android.media.audio.common.AudioProductStrategyType.SYS_RESERVED_NONE /* -1 */;
   android.media.audio.common.AudioHalAttributesGroup[] attributesGroups;
   @nullable @utf8InCpp String name;
+  int zoneId = android.media.audio.common.AudioHalProductStrategy.ZoneId.DEFAULT /* 0 */;
   const int VENDOR_STRATEGY_ID_START = 1000;
+  @Backing(type="int") @VintfStability
+  enum ZoneId {
+    DEFAULT = 0,
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForceUse.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForceUse.aidl
index 7e69f85..eb883e9 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForceUse.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForceUse.aidl
@@ -33,14 +33,49 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForceUse {
-  COMMUNICATION = 0,
-  MEDIA = 1,
-  RECORD = 2,
-  DOCK = 3,
-  SYSTEM = 4,
-  HDMI_SYSTEM_AUDIO = 5,
-  ENCODED_SURROUND = 6,
-  VIBRATE_RINGING = 7,
+@SuppressWarnings(value={"redundant-name"}) @VintfStability
+union AudioPolicyForceUse {
+  android.media.audio.common.AudioPolicyForceUse.MediaDeviceCategory forMedia = android.media.audio.common.AudioPolicyForceUse.MediaDeviceCategory.NONE;
+  android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory forCommunication = android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory.NONE;
+  android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory forRecord = android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory.NONE;
+  android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory forVibrateRinging = android.media.audio.common.AudioPolicyForceUse.CommunicationDeviceCategory.NONE;
+  android.media.audio.common.AudioPolicyForceUse.DockType dock = android.media.audio.common.AudioPolicyForceUse.DockType.NONE;
+  boolean systemSounds = false;
+  boolean hdmiSystemAudio = false;
+  android.media.audio.common.AudioPolicyForceUse.EncodedSurroundConfig encodedSurround = android.media.audio.common.AudioPolicyForceUse.EncodedSurroundConfig.UNSPECIFIED;
+  @Backing(type="byte") @VintfStability
+  enum CommunicationDeviceCategory {
+    NONE = 0,
+    SPEAKER,
+    BT_SCO,
+    BT_BLE,
+    WIRED_ACCESSORY,
+  }
+  @Backing(type="byte") @VintfStability
+  enum MediaDeviceCategory {
+    NONE = 0,
+    SPEAKER,
+    HEADPHONES,
+    BT_A2DP,
+    ANALOG_DOCK,
+    DIGITAL_DOCK,
+    WIRED_ACCESSORY,
+    NO_BT_A2DP,
+  }
+  @Backing(type="byte") @VintfStability
+  enum DockType {
+    NONE = 0,
+    BT_CAR_DOCK,
+    BT_DESK_DOCK,
+    ANALOG_DOCK,
+    DIGITAL_DOCK,
+    WIRED_ACCESSORY,
+  }
+  @Backing(type="byte") @VintfStability
+  enum EncodedSurroundConfig {
+    UNSPECIFIED = 0,
+    NEVER,
+    ALWAYS,
+    MANUAL,
+  }
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortDeviceExt.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortDeviceExt.aidl
index 24d9b29..2b3e72c 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortDeviceExt.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPortDeviceExt.aidl
@@ -40,5 +40,6 @@
   android.media.audio.common.AudioFormatDescription[] encodedFormats;
   int encapsulationModes;
   int encapsulationMetadataTypes;
+  @nullable android.media.audio.common.AudioChannelLayout speakerLayout;
   const int FLAG_INDEX_DEFAULT_DEVICE = 0;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioUsage.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioUsage.aidl
index 7c30cd3..3074b9d 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioUsage.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioUsage.aidl
@@ -58,4 +58,5 @@
   SAFETY = 1001,
   VEHICLE_STATUS = 1002,
   ANNOUNCEMENT = 1003,
+  SPEAKER_CLEANUP = 1004,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl
similarity index 60%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl
index 5135bcd..3a2bc5b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioVolumeGroupChangeEvent.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright 2024 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,23 +33,24 @@
 
 package android.media.audio.common;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
+parcelable AudioVolumeGroupChangeEvent {
+  int groupId;
+  int volumeIndex;
+  boolean muted;
+  int flags;
+  const int VOLUME_FLAG_SHOW_UI = (1 << 0) /* 1 */;
+  const int VOLUME_FLAG_ALLOW_RINGER_MODES = (1 << 1) /* 2 */;
+  const int VOLUME_FLAG_PLAY_SOUND = (1 << 2) /* 4 */;
+  const int VOLUME_FLAG_REMOVE_SOUND_AND_VIBRATE = (1 << 3) /* 8 */;
+  const int VOLUME_FLAG_VIBRATE = (1 << 4) /* 16 */;
+  const int VOLUME_FLAG_FIXED_VOLUME = (1 << 5) /* 32 */;
+  const int VOLUME_FLAG_BLUETOOTH_ABS_VOLUME = (1 << 6) /* 64 */;
+  const int VOLUME_FLAG_SHOW_SILENT_HINT = (1 << 7) /* 128 */;
+  const int VOLUME_FLAG_HDMI_SYSTEM_AUDIO_VOLUME = (1 << 8) /* 256 */;
+  const int VOLUME_FLAG_ACTIVE_MEDIA_ONLY = (1 << 9) /* 512 */;
+  const int VOLUME_FLAG_SHOW_UI_WARNINGS = (1 << 10) /* 1024 */;
+  const int VOLUME_FLAG_SHOW_VIBRATE_HINT = (1 << 11) /* 2048 */;
+  const int VOLUME_FLAG_FROM_KEY = (1 << 12) /* 4096 */;
+  const int VOLUME_FLAG_ABSOLUTE_VOLUME = (1 << 13) /* 8192 */;
 }
diff --git a/media/aidl_api/android.media.audio.eraser.types/1/.hash b/media/aidl_api/android.media.audio.eraser.types/1/.hash
new file mode 100644
index 0000000..62758f5
--- /dev/null
+++ b/media/aidl_api/android.media.audio.eraser.types/1/.hash
@@ -0,0 +1 @@
+d0f24b98624bc07be92c5dc38302f967c522ff14
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Capability.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Capability.aidl
index 5135bcd..a415a42 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Capability.aidl
@@ -31,25 +31,13 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Capability {
+  int[] sampleRates;
+  android.media.audio.common.AudioChannelLayout[] channelLayouts;
+  android.media.audio.eraser.Mode[] modes;
+  android.media.audio.eraser.SeparatorCapability separator;
+  android.media.audio.eraser.ClassifierCapability classifier;
+  android.media.audio.eraser.RemixerCapability remixer;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Classification.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Classification.aidl
index 5135bcd..f90f1c1 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Classification.aidl
@@ -31,25 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Classification {
+  android.media.audio.eraser.SoundClassification classification = android.media.audio.eraser.SoundClassification.HUMAN;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationConfig.aidl
similarity index 76%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationConfig.aidl
index 5135bcd..763352d 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationConfig.aidl
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ClassificationConfig {
+  android.media.audio.eraser.Classification[] classifications;
+  float confidenceThreshold = 0f;
+  float gainFactor = 1f;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationMetadata.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationMetadata.aidl
index 5135bcd..cfdbe5b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationMetadata.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ClassificationMetadata {
+  float confidenceScore;
+  android.media.audio.eraser.Classification classification;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationMetadataList.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationMetadataList.aidl
index 5135bcd..36cef59 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassificationMetadataList.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ClassificationMetadataList {
+  int timeMs;
+  android.media.audio.eraser.ClassificationMetadata[] metadatas;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassifierCapability.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassifierCapability.aidl
index 5135bcd..fadf920 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/ClassifierCapability.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ClassifierCapability {
+  int windowSizeMs;
+  android.media.audio.eraser.Classification[] supportedClassifications;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Configuration.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Configuration.aidl
index 5135bcd..8da4032 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Configuration.aidl
@@ -31,25 +31,11 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Configuration {
+  android.media.audio.eraser.Mode mode = android.media.audio.eraser.Mode.ERASER;
+  android.media.audio.eraser.ClassificationConfig[] classificationConfigs;
+  int maxClassificationMetadata = 5;
+  @nullable android.media.audio.eraser.IEraserCallback callback;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/IEraserCallback.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/IEraserCallback.aidl
index 5135bcd..8d53405 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/IEraserCallback.aidl
@@ -31,25 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@VintfStability
+interface IEraserCallback {
+  oneway void onClassifierUpdate(in int soundSourceId, in android.media.audio.eraser.ClassificationMetadataList metadata);
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Mode.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Mode.aidl
index 5135bcd..916b314 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/Mode.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@Backing(type="byte") @JavaDerive(equals=true, toString=true) @VintfStability
+enum Mode {
+  ERASER,
+  CLASSIFIER,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/RemixerCapability.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/RemixerCapability.aidl
index 5135bcd..82707b1 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/RemixerCapability.aidl
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable RemixerCapability {
+  boolean supported;
+  float minGainFactor = 0f;
+  float maxGainFactor = 1f;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/SeparatorCapability.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/SeparatorCapability.aidl
index 5135bcd..2e983ac 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/SeparatorCapability.aidl
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable SeparatorCapability {
+  boolean supported;
+  int maxSoundSources = 4;
+  const int MIN_SOUND_SOURCE_SUPPORTED = 2;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/SoundClassification.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/SoundClassification.aidl
index 5135bcd..e5483b4 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/1/android/media/audio/eraser/SoundClassification.aidl
@@ -31,25 +31,15 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@Backing(type="int") @JavaDerive(equals=true, toString=true) @VintfStability
+enum SoundClassification {
+  HUMAN,
+  ANIMAL,
+  NATURE,
+  MUSIC,
+  THINGS,
+  AMBIGUOUS,
+  ENVIRONMENT,
+  VENDOR_EXTENSION,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Capability.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Capability.aidl
index 5135bcd..a415a42 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Capability.aidl
@@ -31,25 +31,13 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Capability {
+  int[] sampleRates;
+  android.media.audio.common.AudioChannelLayout[] channelLayouts;
+  android.media.audio.eraser.Mode[] modes;
+  android.media.audio.eraser.SeparatorCapability separator;
+  android.media.audio.eraser.ClassifierCapability classifier;
+  android.media.audio.eraser.RemixerCapability remixer;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Classification.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Classification.aidl
index 5135bcd..f90f1c1 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Classification.aidl
@@ -31,25 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Classification {
+  android.media.audio.eraser.SoundClassification classification = android.media.audio.eraser.SoundClassification.HUMAN;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationConfig.aidl
similarity index 76%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationConfig.aidl
index 5135bcd..763352d 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationConfig.aidl
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ClassificationConfig {
+  android.media.audio.eraser.Classification[] classifications;
+  float confidenceThreshold = 0f;
+  float gainFactor = 1f;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationMetadata.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationMetadata.aidl
index 5135bcd..cfdbe5b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationMetadata.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ClassificationMetadata {
+  float confidenceScore;
+  android.media.audio.eraser.Classification classification;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationMetadataList.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationMetadataList.aidl
index 5135bcd..36cef59 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassificationMetadataList.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ClassificationMetadataList {
+  int timeMs;
+  android.media.audio.eraser.ClassificationMetadata[] metadatas;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassifierCapability.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassifierCapability.aidl
index 5135bcd..fadf920 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/ClassifierCapability.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ClassifierCapability {
+  int windowSizeMs;
+  android.media.audio.eraser.Classification[] supportedClassifications;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Configuration.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Configuration.aidl
index 5135bcd..8da4032 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Configuration.aidl
@@ -31,25 +31,11 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Configuration {
+  android.media.audio.eraser.Mode mode = android.media.audio.eraser.Mode.ERASER;
+  android.media.audio.eraser.ClassificationConfig[] classificationConfigs;
+  int maxClassificationMetadata = 5;
+  @nullable android.media.audio.eraser.IEraserCallback callback;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/IEraserCallback.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/IEraserCallback.aidl
index 5135bcd..8d53405 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/IEraserCallback.aidl
@@ -31,25 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@VintfStability
+interface IEraserCallback {
+  oneway void onClassifierUpdate(in int soundSourceId, in android.media.audio.eraser.ClassificationMetadataList metadata);
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Mode.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Mode.aidl
index 5135bcd..916b314 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/Mode.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@Backing(type="byte") @JavaDerive(equals=true, toString=true) @VintfStability
+enum Mode {
+  ERASER,
+  CLASSIFIER,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/RemixerCapability.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/RemixerCapability.aidl
index 5135bcd..82707b1 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/RemixerCapability.aidl
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable RemixerCapability {
+  boolean supported;
+  float minGainFactor = 0f;
+  float maxGainFactor = 1f;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/SeparatorCapability.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/SeparatorCapability.aidl
index 5135bcd..2e983ac 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/SeparatorCapability.aidl
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable SeparatorCapability {
+  boolean supported;
+  int maxSoundSources = 4;
+  const int MIN_SOUND_SOURCE_SUPPORTED = 2;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/SoundClassification.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/SoundClassification.aidl
index 5135bcd..e5483b4 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.audio.eraser.types/current/android/media/audio/eraser/SoundClassification.aidl
@@ -31,25 +31,15 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.media.audio.eraser;
+@Backing(type="int") @JavaDerive(equals=true, toString=true) @VintfStability
+enum SoundClassification {
+  HUMAN,
+  ANIMAL,
+  NATURE,
+  MUSIC,
+  THINGS,
+  AMBIGUOUS,
+  ENVIRONMENT,
+  VENDOR_EXTENSION,
 }
diff --git a/media/aidl_api/android.media.soundtrigger.types/3/.hash b/media/aidl_api/android.media.soundtrigger.types/3/.hash
new file mode 100644
index 0000000..4e2c77c
--- /dev/null
+++ b/media/aidl_api/android.media.soundtrigger.types/3/.hash
@@ -0,0 +1 @@
+4659b1a13cfc886bed9b5d1a4545ed3a25e00843
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/AudioCapabilities.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/AudioCapabilities.aidl
index 5135bcd..47119b9 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/AudioCapabilities.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum AudioCapabilities {
+  ECHO_CANCELLATION = (1 << 0) /* 1 */,
+  NOISE_SUPPRESSION = (1 << 1) /* 2 */,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ConfidenceLevel.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ConfidenceLevel.aidl
index 5135bcd..5127a11 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ConfidenceLevel.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ConfidenceLevel {
+  int userId;
+  int levelPercent;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ModelParameter.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ModelParameter.aidl
index 5135bcd..bcfe93d 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ModelParameter.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum ModelParameter {
+  INVALID = (-1) /* -1 */,
+  THRESHOLD_FACTOR = 0,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ModelParameterRange.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ModelParameterRange.aidl
index 5135bcd..f29b728 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/ModelParameterRange.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable ModelParameterRange {
+  int minInclusive;
+  int maxInclusive;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Phrase.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Phrase.aidl
index 5135bcd..11029ba 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Phrase.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,13 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Phrase {
+  int id;
+  int recognitionModes;
+  int[] users;
+  String locale;
+  String text;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseRecognitionEvent.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseRecognitionEvent.aidl
index 5135bcd..b75d1b8 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseRecognitionEvent.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable PhraseRecognitionEvent {
+  android.media.soundtrigger.RecognitionEvent common;
+  android.media.soundtrigger.PhraseRecognitionExtra[] phraseExtras;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseRecognitionExtra.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseRecognitionExtra.aidl
index 5135bcd..e417c69 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseRecognitionExtra.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,12 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable PhraseRecognitionExtra {
+  int id;
+  int recognitionModes;
+  int confidenceLevel;
+  android.media.soundtrigger.ConfidenceLevel[] levels;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseSoundModel.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseSoundModel.aidl
index 5135bcd..b4b3854 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/PhraseSoundModel.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable PhraseSoundModel {
+  android.media.soundtrigger.SoundModel common;
+  android.media.soundtrigger.Phrase[] phrases;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Properties.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Properties.aidl
index 5135bcd..068db52 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Properties.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,23 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable Properties {
+  String implementor;
+  String description;
+  int version;
+  String uuid;
+  String supportedModelArch;
+  int maxSoundModels;
+  int maxKeyPhrases;
+  int maxUsers;
+  int recognitionModes;
+  boolean captureTransition;
+  int maxBufferMs;
+  boolean concurrentCapture;
+  boolean triggerInEvent;
+  int powerConsumptionMw;
+  int audioCapabilities;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionConfig.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionConfig.aidl
index 5135bcd..63cd2cb 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionConfig.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,12 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable RecognitionConfig {
+  boolean captureRequested;
+  android.media.soundtrigger.PhraseRecognitionExtra[] phraseRecognitionExtras;
+  int audioCapabilities;
+  byte[] data;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionEvent.aidl
similarity index 72%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionEvent.aidl
index 5135bcd..0209602 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionEvent.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,17 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable RecognitionEvent {
+  android.media.soundtrigger.RecognitionStatus status = android.media.soundtrigger.RecognitionStatus.INVALID;
+  android.media.soundtrigger.SoundModelType type = android.media.soundtrigger.SoundModelType.INVALID;
+  boolean captureAvailable;
+  int captureDelayMs;
+  int capturePreambleMs;
+  boolean triggerInData;
+  @nullable android.media.audio.common.AudioConfig audioConfig;
+  byte[] data;
+  boolean recognitionStillActive;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionMode.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionMode.aidl
index 5135bcd..1899a33 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionMode.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,12 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum RecognitionMode {
+  VOICE_TRIGGER = 0x1,
+  USER_IDENTIFICATION = 0x2,
+  USER_AUTHENTICATION = 0x4,
+  GENERIC_TRIGGER = 0x8,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionStatus.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionStatus.aidl
index 5135bcd..8101ffd 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/RecognitionStatus.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,13 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum RecognitionStatus {
+  INVALID = (-1) /* -1 */,
+  SUCCESS = 0,
+  ABORTED = 1,
+  FAILURE = 2,
+  FORCED = 3,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/SoundModel.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/SoundModel.aidl
index 5135bcd..fe38264 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/SoundModel.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,13 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable SoundModel {
+  android.media.soundtrigger.SoundModelType type = android.media.soundtrigger.SoundModelType.INVALID;
+  String uuid;
+  String vendorUuid;
+  @nullable ParcelFileDescriptor data;
+  int dataSize;
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/SoundModelType.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/SoundModelType.aidl
index 5135bcd..c0927a5 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/SoundModelType.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,11 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum SoundModelType {
+  INVALID = (-1) /* -1 */,
+  KEYPHRASE = 0,
+  GENERIC = 1,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Status.aidl
similarity index 74%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Status.aidl
index 5135bcd..4cd4c8e 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/media/aidl_api/android.media.soundtrigger.types/3/android/media/soundtrigger/Status.aidl
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2024 The Android Open Source Project
+ * Copyright (C) 2019 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,25 +31,15 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
+package android.media.soundtrigger;
 /* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+@Backing(type="int") @VintfStability
+enum Status {
+  INVALID = (-1) /* -1 */,
+  SUCCESS = 0,
+  RESOURCE_CONTENTION = 1,
+  OPERATION_NOT_SUPPORTED = 2,
+  TEMPORARY_PERMISSION_DENIED = 3,
+  DEAD_OBJECT = 4,
+  INTERNAL_ERROR = 5,
 }
diff --git a/media/lint-baseline.xml b/media/lint-baseline.xml
index 82f05d2..84bab8e 100644
--- a/media/lint-baseline.xml
+++ b/media/lint-baseline.xml
@@ -45,4 +45,26 @@
             column="36"/>
     </issue>
 
-</issues>
\ No newline at end of file
+    <issue
+        id="NewApi"
+        message="Call requires API level 33 (current min is 29): `android.os.Parcel#writeFixedArray`"
+        errorLine1="        _aidl_parcel.writeFixedArray(getHeadToStage(), _aidl_flag, 6);"
+        errorLine2="                     ~~~~~~~~~~~~~~~">
+        <location
+            file="out/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.common.types-V5-java-source/gen/android/media/audio/common/HeadTracking.java"
+            line="193"
+            column="22"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 33 (current min is 29): `android.os.Parcel#createFixedArray`"
+        errorLine1="        _aidl_value = _aidl_parcel.createFixedArray(float[].class, 6);"
+        errorLine2="                                   ~~~~~~~~~~~~~~~~">
+        <location
+            file="out/soong/.intermediates/system/hardware/interfaces/media/android.media.audio.common.types-V5-java-source/gen/android/media/audio/common/HeadTracking.java"
+            line="204"
+            column="36"/>
+    </issue>
+
+</issues>
diff --git a/suspend/1.0/default/Android.bp b/suspend/1.0/default/Android.bp
index d203698..6652b6d 100644
--- a/suspend/1.0/default/Android.bp
+++ b/suspend/1.0/default/Android.bp
@@ -19,6 +19,9 @@
 
 cc_defaults {
     name: "system_suspend_defaults",
+    defaults: [
+        "aconfig_lib_cc_static_link.defaults",
+    ],
     shared_libs: [
         "libbase",
         "libbinder",
@@ -27,6 +30,10 @@
         "libhidlbase",
         "liblog",
         "libutils",
+        "server_configurable_flags",
+    ],
+    static_libs: [
+        "suspend_service_flags_c_lib",
     ],
     cflags: [
         "-Wall",
@@ -206,3 +213,15 @@
         "fuzzers/SuspendServiceInternalFuzzer.cpp",
     ],
 }
+
+aconfig_declarations {
+    name: "suspend_service_flags",
+    package: "suspend_service.flags",
+    container: "system",
+    srcs: ["flags.aconfig"],
+}
+
+cc_aconfig_library {
+    name: "suspend_service_flags_c_lib",
+    aconfig_declarations: "suspend_service_flags",
+}
diff --git a/suspend/1.0/default/OWNERS b/suspend/1.0/default/OWNERS
deleted file mode 100644
index b278c1c..0000000
--- a/suspend/1.0/default/OWNERS
+++ /dev/null
@@ -1,5 +0,0 @@
-# Bug component: 30545
-krossmo@google.com
-santoscordon@google.com
-vilasbhat@google.com
-kaleshsingh@google.com
diff --git a/suspend/1.0/default/SuspendControlService.cpp b/suspend/1.0/default/SuspendControlService.cpp
index 43f17db..3e88faf 100644
--- a/suspend/1.0/default/SuspendControlService.cpp
+++ b/suspend/1.0/default/SuspendControlService.cpp
@@ -183,7 +183,22 @@
     }
 
     suspendService->updateStatsNow();
-    suspendService->getStatsList().getWakeLockStats(_aidl_return);
+    suspendService->getStatsList().getWakeLockStats(
+        BnSuspendControlServiceInternal::WAKE_LOCK_INFO_ALL_FIELDS, _aidl_return);
+
+    return binder::Status::ok();
+}
+
+binder::Status SuspendControlServiceInternal::getWakeLockStatsFiltered(
+    int wakeLockInfoFieldBitMask, std::vector<WakeLockInfo>* _aidl_return) {
+    const auto suspendService = mSuspend.promote();
+    if (!suspendService) {
+        return binder::Status::fromExceptionCode(binder::Status::Exception::EX_NULL_POINTER,
+                                                 String8("Null reference to suspendService"));
+    }
+
+    suspendService->updateStatsNow();
+    suspendService->getStatsList().getWakeLockStats(wakeLockInfoFieldBitMask, _aidl_return);
 
     return binder::Status::ok();
 }
diff --git a/suspend/1.0/default/SuspendControlService.h b/suspend/1.0/default/SuspendControlService.h
index 7d7e0ae..b6e34ff 100644
--- a/suspend/1.0/default/SuspendControlService.h
+++ b/suspend/1.0/default/SuspendControlService.h
@@ -75,6 +75,8 @@
     binder::Status forceSuspend(bool* _aidl_return) override;
     binder::Status getSuspendStats(SuspendInfo* _aidl_return) override;
     binder::Status getWakeLockStats(std::vector<WakeLockInfo>* _aidl_return) override;
+    binder::Status getWakeLockStatsFiltered(int wakeLockInfoFieldBitMask,
+                                            std::vector<WakeLockInfo>* _aidl_return) override;
     binder::Status getWakeupStats(std::vector<WakeupInfo>* _aidl_return) override;
 
     void setSuspendService(const wp<SystemSuspend>& suspend);
diff --git a/suspend/1.0/default/SuspendSepolicyTests.sh b/suspend/1.0/default/SuspendSepolicyTests.sh
index 0dd2a3e..8bab96d 100755
--- a/suspend/1.0/default/SuspendSepolicyTests.sh
+++ b/suspend/1.0/default/SuspendSepolicyTests.sh
@@ -32,7 +32,9 @@
 }
 
 has_wakeup_attr() { #path
-    adb shell ls -dZ "$1" | grep -q "$wakeup_attr"
+    local _path="$1"
+
+    adb shell "ls -dZ $_path | grep -q $wakeup_attr"
     return $?
 }
 
diff --git a/suspend/1.0/default/SystemSuspend.cpp b/suspend/1.0/default/SystemSuspend.cpp
index 9493e85..760aea8 100644
--- a/suspend/1.0/default/SystemSuspend.cpp
+++ b/suspend/1.0/default/SystemSuspend.cpp
@@ -28,6 +28,7 @@
 #include <android-base/stringprintf.h>
 #include <android-base/strings.h>
 #include <android/binder_manager.h>
+#include <android/system/suspend/internal/ISuspendControlServiceInternal.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -50,6 +51,8 @@
 using ::android::base::WriteStringToFd;
 using ::std::string;
 
+using ISCSI = ::android::system::suspend::internal::ISuspendControlServiceInternal;
+
 namespace android {
 namespace system {
 namespace suspend {
@@ -425,7 +428,8 @@
     std::stringstream klStats;
     klStats << "Kernel wakesource stats: ";
     std::vector<WakeLockInfo> wlStats;
-    mStatsList.getWakeLockStats(&wlStats);
+    mStatsList.getWakeLockStats(
+        ISCSI::WAKE_LOCK_INFO_ACTIVE_COUNT | ISCSI::WAKE_LOCK_INFO_TOTAL_TIME, &wlStats);
 
     for (const WakeLockInfo& wake : wlStats) {
         if ((wake.isKernelWakelock) && (wake.activeCount > 0)) {
diff --git a/suspend/1.0/default/SystemSuspendUnitTest.cpp b/suspend/1.0/default/SystemSuspendUnitTest.cpp
index 03288ab..f6b6db3 100644
--- a/suspend/1.0/default/SystemSuspendUnitTest.cpp
+++ b/suspend/1.0/default/SystemSuspendUnitTest.cpp
@@ -30,6 +30,7 @@
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 #include <hidl/HidlTransportSupport.h>
+#include <suspend_service_flags.h>
 #include <sys/poll.h>
 #include <sys/socket.h>
 #include <sys/types.h>
@@ -228,7 +229,8 @@
 
     size_t getActiveWakeLockCount() {
         std::vector<WakeLockInfo> wlStats;
-        controlServiceInternal->getWakeLockStats(&wlStats);
+        controlServiceInternal->getWakeLockStatsFiltered(
+            ISuspendControlServiceInternal::WAKE_LOCK_INFO_ACTIVE_COUNT, &wlStats);
         return count_if(wlStats.begin(), wlStats.end(), [](auto entry) { return entry.isActive; });
     }
 
@@ -1199,9 +1201,10 @@
     /**
      * Returns wakelock stats.
      */
-    std::vector<WakeLockInfo> getWakelockStats() {
+    std::vector<WakeLockInfo> getWakelockStats(
+        int32_t selectBitmap = ISuspendControlServiceInternal::WAKE_LOCK_INFO_ALL_FIELDS) {
         std::vector<WakeLockInfo> wlStats;
-        controlServiceInternal->getWakeLockStats(&wlStats);
+        controlServiceInternal->getWakeLockStatsFiltered(selectBitmap, &wlStats);
         return wlStats;
     }
 
@@ -1265,6 +1268,24 @@
     };
 };
 
+class mock_flag_provider_interface : public suspend_service::flags::flag_provider_interface {
+   public:
+    MOCK_METHOD(bool, fast_kernel_wakelock_reporting, (), (override));
+};
+
+class ParameterizedSystemSuspendSameThreadTest : public SystemSuspendSameThreadTest,
+                                                 public ::testing::WithParamInterface<bool> {
+   protected:
+    void SetUp() override {
+        auto mock_flag_provider = std::make_unique<mock_flag_provider_interface>();
+        ON_CALL(*mock_flag_provider, fast_kernel_wakelock_reporting())
+            .WillByDefault(::testing::Return(GetParam()));
+        suspend_service::flags::provider_ = std::move(mock_flag_provider);
+
+        SystemSuspendSameThreadTest::SetUp();
+    }
+};
+
 // Test that getWakeLockStats has correct information about Native WakeLocks.
 TEST_F(SystemSuspendSameThreadTest, GetNativeWakeLockStats) {
     std::string fakeWlName = "FakeLock";
@@ -1311,8 +1332,11 @@
     ASSERT_EQ(nwlInfo.wakeupCount, 0);
 }
 
+INSTANTIATE_TEST_SUITE_P(ParameterizedSystemSuspendSameThreadTest,
+                         ParameterizedSystemSuspendSameThreadTest, ::testing::Bool());
+
 // Test that getWakeLockStats has correct information about Kernel WakeLocks.
-TEST_F(SystemSuspendSameThreadTest, GetKernelWakeLockStats) {
+TEST_P(ParameterizedSystemSuspendSameThreadTest, GetKernelWakeLockStats) {
     std::string fakeKwlName1 = "fakeKwl1";
     std::string fakeKwlName2 = "fakeKwl2";
     addKernelWakelock(fakeKwlName1);
@@ -1360,7 +1384,7 @@
 }
 
 // Test that getWakeLockStats has correct information about Native AND Kernel WakeLocks.
-TEST_F(SystemSuspendSameThreadTest, GetNativeAndKernelWakeLockStats) {
+TEST_P(ParameterizedSystemSuspendSameThreadTest, GetNativeAndKernelWakeLockStats) {
     std::string fakeNwlName = "fakeNwl";
     std::string fakeKwlName = "fakeKwl";
 
@@ -1825,6 +1849,42 @@
     ASSERT_EQ(wakeups[2].count, 2);
 }
 
+struct WakeLockInfoField {
+    int32_t bit = 0;
+    std::function<int(WakeLockInfo)> getter;
+    int64_t expectedValue;
+};
+
+// Test that selected fields are properly set.
+TEST_P(ParameterizedSystemSuspendSameThreadTest, GetKernelWakeLockStatsFiltered) {
+    using ISCSI = ISuspendControlServiceInternal;
+    static const WakeLockInfoField FIELDS[] = {
+        {ISCSI::WAKE_LOCK_INFO_ACTIVE_COUNT, [](WakeLockInfo wl) { return wl.activeCount; }, 1},
+        {ISCSI::WAKE_LOCK_INFO_LAST_CHANGE, [](WakeLockInfo wl) { return wl.lastChange; }, 2},
+        {ISCSI::WAKE_LOCK_INFO_MAX_TIME, [](WakeLockInfo wl) { return wl.maxTime; }, 3},
+        {ISCSI::WAKE_LOCK_INFO_TOTAL_TIME, [](WakeLockInfo wl) { return wl.totalTime; }, 4},
+        {ISCSI::WAKE_LOCK_INFO_ACTIVE_TIME, [](WakeLockInfo wl) { return wl.activeTime; }, 5},
+        {ISCSI::WAKE_LOCK_INFO_EVENT_COUNT, [](WakeLockInfo wl) { return wl.eventCount; }, 6},
+        {ISCSI::WAKE_LOCK_INFO_EXPIRE_COUNT, [](WakeLockInfo wl) { return wl.expireCount; }, 7},
+        {ISCSI::WAKE_LOCK_INFO_PREVENT_SUSPEND_TIME,
+         [](WakeLockInfo wl) { return wl.preventSuspendTime; }, 8},
+        {ISCSI::WAKE_LOCK_INFO_WAKEUP_COUNT, [](WakeLockInfo wl) { return wl.wakeupCount; }, 9},
+    };
+
+    std::string fakeKwlName1 = "fakeKwl1";
+    addKernelWakelock(fakeKwlName1, /* activeCount = */ 1, /* activeTime = */ 5,
+                      /* eventCount = */ 6,
+                      /* expireCount = */ 7, /* lastChange = */ 2, /* maxTime = */ 3,
+                      /* preventSuspendTime = */ 8, /* totalTime = */ 4, /* wakeupCount = */ 9);
+    for (auto field : FIELDS) {
+        std::vector<WakeLockInfo> infos = getWakelockStats(field.bit);
+        WakeLockInfo wli;
+        ASSERT_TRUE(findWakeLockInfoByName(infos, fakeKwlName1, &wli));
+        ASSERT_EQ(field.getter(wli), field.expectedValue)
+            << "Bit mask " << field.bit << " had unexpected value";
+    }
+}
+
 }  // namespace android
 
 int main(int argc, char** argv) {
diff --git a/suspend/1.0/default/WakeLockEntryList.cpp b/suspend/1.0/default/WakeLockEntryList.cpp
index 5a43501..f726586 100644
--- a/suspend/1.0/default/WakeLockEntryList.cpp
+++ b/suspend/1.0/default/WakeLockEntryList.cpp
@@ -20,6 +20,8 @@
 #include <android-base/logging.h>
 #include <android-base/parseint.h>
 #include <android-base/stringprintf.h>
+#include <android/system/suspend/internal/ISuspendControlServiceInternal.h>
+#include <suspend_service_flags.h>
 
 #include <iomanip>
 
@@ -27,12 +29,37 @@
 using android::base::ReadFdToString;
 using android::base::Readlink;
 using android::base::StringPrintf;
+using suspend_service::flags::fast_kernel_wakelock_reporting;
+
+using ISCSI = ::android::system::suspend::internal::ISuspendControlServiceInternal;
 
 namespace android {
 namespace system {
 namespace suspend {
 namespace V1_0 {
 
+namespace {
+
+struct BitAndFilename {
+    int32_t bit;
+    std::string filename;
+};
+
+const BitAndFilename FIELDS[] = {
+    {-1, "name"},
+    {ISCSI::WAKE_LOCK_INFO_ACTIVE_COUNT, "active_count"},
+    {ISCSI::WAKE_LOCK_INFO_LAST_CHANGE, "last_change_ms"},
+    {ISCSI::WAKE_LOCK_INFO_MAX_TIME, "max_time_ms"},
+    {ISCSI::WAKE_LOCK_INFO_TOTAL_TIME, "total_time_ms"},
+    {ISCSI::WAKE_LOCK_INFO_ACTIVE_TIME, "active_time_ms"},
+    {ISCSI::WAKE_LOCK_INFO_EVENT_COUNT, "event_count"},
+    {ISCSI::WAKE_LOCK_INFO_EXPIRE_COUNT, "expire_count"},
+    {ISCSI::WAKE_LOCK_INFO_PREVENT_SUSPEND_TIME, "prevent_suspend_time_ms"},
+    {ISCSI::WAKE_LOCK_INFO_WAKEUP_COUNT, "wakeup_count"},
+};
+
+}  // namespace
+
 static std::ostream& operator<<(std::ostream& out, const WakeLockInfo& entry) {
     const char* sep = " | ";
     const char* notApplicable = "---";
@@ -65,7 +92,7 @@
 
 std::ostream& operator<<(std::ostream& out, const WakeLockEntryList& list) {
     std::vector<WakeLockInfo> wlStats;
-    list.getWakeLockStats(&wlStats);
+    list.getWakeLockStats(ISCSI::WAKE_LOCK_INFO_ALL_FIELDS, &wlStats);
     int width = 194;
     const char* sep = " | ";
     std::stringstream ss;
@@ -324,20 +351,146 @@
     return info;
 }
 
-void WakeLockEntryList::getKernelWakelockStats(std::vector<WakeLockInfo>* aidl_return) const {
+/*
+ * Creates and returns a kernel wakelock entry with data read from mKernelWakelockStatsFd.
+ * Has been micro-optimized to reduce CPU time and wall time.
+ */
+WakeLockInfo WakeLockEntryList::createKernelEntry(ScratchSpace* ss, int wakeLockInfoFieldBitMask,
+                                                  const std::string& kwlId) const {
+    WakeLockInfo info;
+
+    info.activeCount = 0;
+    info.lastChange = 0;
+    info.maxTime = 0;
+    info.totalTime = 0;
+    info.isActive = false;
+    info.activeTime = 0;
+    info.isKernelWakelock = true;
+
+    info.pid = -1;  // N/A
+
+    info.eventCount = 0;
+    info.expireCount = 0;
+    info.preventSuspendTime = 0;
+    info.wakeupCount = 0;
+
+    for (const auto& field : FIELDS) {
+        const bool isNameField = field.bit == -1;
+        if (!isNameField && (wakeLockInfoFieldBitMask & field.bit) == 0) {
+            continue;
+        }
+
+        ss->statName = kwlId + "/" + field.filename;
+        int statFd = -1;
+
+        {
+            std::lock_guard<std::mutex> lock(mLock);
+            // Check if we have a valid cached file descriptor.
+            auto it = mFdCache.find(ss->statName);
+            if (it != mFdCache.end() && it->second >= 0) {
+                auto result = lseek(it->second, 0, SEEK_SET);
+                if (result < 0) {
+                    PLOG(ERROR) << "Could not seek to start of FD for " << ss->statName;
+                    mFdCache.erase(it);
+                    PLOG(ERROR) << "Closed the FD.";
+                } else {
+                    statFd = it->second;
+                }
+            }
+
+            if (statFd == -1) {
+                unique_fd tmpFd(TEMP_FAILURE_RETRY(
+                    openat(mKernelWakelockStatsFd, ss->statName.c_str(), O_CLOEXEC | O_RDONLY)));
+                if (tmpFd < 0) {
+                    PLOG(ERROR) << "Error opening " << ss->statName << " for " << kwlId;
+                    continue;
+                }
+                statFd = tmpFd;
+                mFdCache.insert(it, {ss->statName, std::move(tmpFd)});
+            }
+        }  // mLock is released here
+
+        ss->valStr.clear();
+        ssize_t n;
+        while ((n = TEMP_FAILURE_RETRY(read(statFd, &ss->readBuff[0], sizeof(ss->readBuff)))) > 0) {
+            ss->valStr.append(ss->readBuff, n);
+        }
+        if (n < 0) {
+            PLOG(ERROR) << "Error reading " << ss->statName;
+            {
+                std::lock_guard<std::mutex> lock(mLock);
+                mFdCache.erase(ss->statName);
+                PLOG(ERROR) << "Closed the FD.";
+            }
+            continue;
+        }
+
+        // Trim newline
+        ss->valStr.erase(std::remove(ss->valStr.begin(), ss->valStr.end(), '\n'), ss->valStr.end());
+
+        if (isNameField) {
+            info.name = ss->valStr;
+            continue;
+        }
+
+        int64_t statVal;
+        if (!ParseInt(ss->valStr, &statVal)) {
+            std::string path;
+            if (Readlink(StringPrintf("/proc/self/fd/%d", statFd), &path)) {
+                LOG(ERROR) << "Unexpected format for wakelock stat value (" << ss->valStr
+                           << ") from file: " << path;
+            } else {
+                LOG(ERROR) << "Unexpected format for wakelock stat value (" << ss->valStr << ")";
+            }
+            continue;
+        }
+
+        if (field.filename == "active_count") {
+            info.activeCount = statVal;
+        } else if (field.filename == "active_time_ms") {
+            info.activeTime = statVal;
+        } else if (field.filename == "event_count") {
+            info.eventCount = statVal;
+        } else if (field.filename == "expire_count") {
+            info.expireCount = statVal;
+        } else if (field.filename == "last_change_ms") {
+            info.lastChange = statVal;
+        } else if (field.filename == "max_time_ms") {
+            info.maxTime = statVal;
+        } else if (field.filename == "prevent_suspend_time_ms") {
+            info.preventSuspendTime = statVal;
+        } else if (field.filename == "total_time_ms") {
+            info.totalTime = statVal;
+        } else if (field.filename == "wakeup_count") {
+            info.wakeupCount = statVal;
+        }
+    }
+
+    // Derived stats
+    info.isActive = info.activeTime > 0;
+
+    return info;
+}
+
+void WakeLockEntryList::getKernelWakelockStats(int wakeLockInfoFieldBitMask,
+                                               std::vector<WakeLockInfo>* aidl_return) const {
     std::unique_ptr<DIR, decltype(&closedir)> dp(fdopendir(dup(mKernelWakelockStatsFd.get())),
                                                  &closedir);
     if (dp) {
         // rewinddir, else subsequent calls will not get any kernel wakelocks.
         rewinddir(dp.get());
 
+        ScratchSpace ss;
         struct dirent* de;
         while ((de = readdir(dp.get()))) {
             std::string kwlId(de->d_name);
             if ((kwlId == ".") || (kwlId == "..")) {
                 continue;
             }
-            WakeLockInfo entry = createKernelEntry(kwlId);
+            WakeLockInfo entry = fast_kernel_wakelock_reporting()
+                                     ? createKernelEntry(&ss, wakeLockInfoFieldBitMask, kwlId)
+                                     : createKernelEntry(kwlId);
+
             aidl_return->emplace_back(std::move(entry));
         }
     }
@@ -346,7 +499,7 @@
 void WakeLockEntryList::updateOnAcquire(const std::string& name, int pid) {
     TimestampType timeNow = getTimeNow();
 
-    std::lock_guard<std::mutex> lock(mStatsLock);
+    std::lock_guard<std::mutex> lock(mLock);
 
     auto key = std::make_pair(name, pid);
     auto it = mLookupTable.find(key);
@@ -372,7 +525,7 @@
 void WakeLockEntryList::updateOnRelease(const std::string& name, int pid) {
     TimestampType timeNow = getTimeNow();
 
-    std::lock_guard<std::mutex> lock(mStatsLock);
+    std::lock_guard<std::mutex> lock(mLock);
 
     auto key = std::make_pair(name, pid);
     auto it = mLookupTable.find(key);
@@ -406,7 +559,7 @@
  * Updates the native wakelock stats based on the current time.
  */
 void WakeLockEntryList::updateNow() {
-    std::lock_guard<std::mutex> lock(mStatsLock);
+    std::lock_guard<std::mutex> lock(mLock);
 
     TimestampType timeNow = getTimeNow();
 
@@ -421,15 +574,16 @@
     }
 }
 
-void WakeLockEntryList::getWakeLockStats(std::vector<WakeLockInfo>* aidl_return) const {
+void WakeLockEntryList::getWakeLockStats(int wakeLockInfoFieldBitMask,
+                                         std::vector<WakeLockInfo>* aidl_return) const {
     // Under no circumstances should the lock be held while getting kernel wakelock stats
     {
-        std::lock_guard<std::mutex> lock(mStatsLock);
+        std::lock_guard<std::mutex> lock(mLock);
         for (const WakeLockInfo& entry : mStats) {
             aidl_return->emplace_back(entry);
         }
     }
-    getKernelWakelockStats(aidl_return);
+    getKernelWakelockStats(wakeLockInfoFieldBitMask, aidl_return);
 }
 
 }  // namespace V1_0
diff --git a/suspend/1.0/default/WakeLockEntryList.h b/suspend/1.0/default/WakeLockEntryList.h
index 1ebc411..d81727a 100644
--- a/suspend/1.0/default/WakeLockEntryList.h
+++ b/suspend/1.0/default/WakeLockEntryList.h
@@ -49,16 +49,32 @@
     // updateNow() should be called before getWakeLockStats() to ensure stats are
     // updated wrt the current time.
     void updateNow();
-    void getWakeLockStats(std::vector<WakeLockInfo>* aidl_return) const;
+    void getWakeLockStats(int wakeLockInfoFieldBitMask,
+                          std::vector<WakeLockInfo>* aidl_return) const;
     friend std::ostream& operator<<(std::ostream& out, const WakeLockEntryList& list);
 
    private:
-    void evictIfFull() REQUIRES(mStatsLock);
-    void insertEntry(WakeLockInfo entry) REQUIRES(mStatsLock);
-    void deleteEntry(std::list<WakeLockInfo>::iterator entry) REQUIRES(mStatsLock);
+    void evictIfFull() REQUIRES(mLock);
+    void insertEntry(WakeLockInfo entry) REQUIRES(mLock);
+    void deleteEntry(std::list<WakeLockInfo>::iterator entry) REQUIRES(mLock);
     WakeLockInfo createNativeEntry(const std::string& name, int pid, TimestampType timeNow) const;
     WakeLockInfo createKernelEntry(const std::string& name) const;
-    void getKernelWakelockStats(std::vector<WakeLockInfo>* aidl_return) const;
+
+    // Used by createKernelEntry to reduce heap churn on successive calls.
+    struct ScratchSpace {
+        static constexpr const int BUFF_SIZE = 1024;
+        char readBuff[BUFF_SIZE];
+        std::string statName, valStr;
+        ScratchSpace() {
+            valStr.reserve(BUFF_SIZE);
+            statName.reserve(BUFF_SIZE);
+        }
+    };
+    WakeLockInfo createKernelEntry(ScratchSpace* ss, int wakeLockInfoFieldBitMask,
+                                   const std::string& name) const;
+
+    void getKernelWakelockStats(int wakeLockInfoFieldBitMask,
+                                std::vector<WakeLockInfo>* aidl_return) const;
 
     // Hash for WakeLockEntry key (pair<std::string, int>)
     struct LockHash {
@@ -67,17 +83,18 @@
         }
     };
 
+    mutable std::mutex mLock;
+
     size_t mCapacity;
     unique_fd mKernelWakelockStatsFd;
-
-    mutable std::mutex mStatsLock;
+    mutable std::unordered_map<std::string, unique_fd> mFdCache GUARDED_BY(mLock);
 
     // std::list and std::unordered map are used to support both inserting a stat
     // and eviction of the LRU stat in O(1) time. The LRU stat is maintained at
     // the back of the list.
-    std::list<WakeLockInfo> mStats GUARDED_BY(mStatsLock);
+    std::list<WakeLockInfo> mStats GUARDED_BY(mLock);
     std::unordered_map<std::pair<std::string, int>, std::list<WakeLockInfo>::iterator, LockHash>
-        mLookupTable GUARDED_BY(mStatsLock);
+        mLookupTable GUARDED_BY(mLock);
 };
 
 }  // namespace V1_0
diff --git a/suspend/1.0/default/flags.aconfig b/suspend/1.0/default/flags.aconfig
new file mode 100644
index 0000000..5af880d
--- /dev/null
+++ b/suspend/1.0/default/flags.aconfig
@@ -0,0 +1,9 @@
+package: "suspend_service.flags"
+container: "system"
+
+flag {
+  name: "fast_kernel_wakelock_reporting"
+  namespace: "wear_frameworks"
+  description: "Controls using new codepath to speed up polling of /sys/class/wakeup for kernel wakelocks."
+  bug: "364368163"
+}
\ No newline at end of file
diff --git a/suspend/OWNERS b/suspend/OWNERS
new file mode 100644
index 0000000..c80f587
--- /dev/null
+++ b/suspend/OWNERS
@@ -0,0 +1,8 @@
+# Bug component: 30545
+krossmo@google.com #{LAST_RESORT_SUGGESTION}
+santoscordon@google.com #{LAST_RESORT_SUGGESTION}
+
+# For any queries regarding the suspend service, please reach out to the
+# following people.
+vilasbhat@google.com
+kaleshsingh@google.com
diff --git a/suspend/aidl/Android.bp b/suspend/aidl/Android.bp
index 97e0694..599107b 100644
--- a/suspend/aidl/Android.bp
+++ b/suspend/aidl/Android.bp
@@ -29,7 +29,7 @@
         ndk: {
             apex_available: [
                 "//apex_available:platform",
-                "com.android.btservices",
+                "com.android.bt",
             ],
             min_sdk_version: "30",
         },
@@ -60,7 +60,7 @@
             apex_available: [
                 "//apex_available:platform",
                 "com.android.uwb",
-                "com.android.btservices",
+                "com.android.bt",
             ],
             min_sdk_version: "30",
         },
diff --git a/suspend/aidl/android/system/suspend/internal/ISuspendControlServiceInternal.aidl b/suspend/aidl/android/system/suspend/internal/ISuspendControlServiceInternal.aidl
index 8e0a9a2..065d486 100644
--- a/suspend/aidl/android/system/suspend/internal/ISuspendControlServiceInternal.aidl
+++ b/suspend/aidl/android/system/suspend/internal/ISuspendControlServiceInternal.aidl
@@ -46,6 +46,12 @@
     WakeLockInfo[] getWakeLockStats();
 
     /**
+     * Returns a list of wake lock stats. Fields not selected with the
+     * bit mask are in an undefined state (see WAKE_LOCK_INFO_* below).
+     */
+    WakeLockInfo[] getWakeLockStatsFiltered(int wakeLockInfoFieldBitMask);
+
+    /**
      * Returns a list of wakeup stats.
      */
     WakeupInfo[] getWakeupStats();
@@ -54,4 +60,27 @@
      * Returns stats related to suspend.
      */
     SuspendInfo getSuspendStats();
+
+    /**
+     * Used to select fields from WakeLockInfo that getWakeLockStats should return.
+     * This is in addition to the name of the wake lock, which is always returned.
+     */
+    const int WAKE_LOCK_INFO_ACTIVE_COUNT = 1 << 0;
+    const int WAKE_LOCK_INFO_LAST_CHANGE = 1 << 1;
+    const int WAKE_LOCK_INFO_MAX_TIME = 1 << 2;
+    const int WAKE_LOCK_INFO_TOTAL_TIME = 1 << 3;
+    const int WAKE_LOCK_INFO_IS_ACTIVE = 1 << 4;
+    const int WAKE_LOCK_INFO_ACTIVE_TIME = 1 << 5;
+    const int WAKE_LOCK_INFO_IS_KERNEL_WAKELOCK = 1 << 6;
+
+    // Specific to Native wake locks.
+    const int WAKE_LOCK_INFO_PID = 1 << 7;
+
+    // Specific to Kernel wake locks.
+    const int WAKE_LOCK_INFO_EVENT_COUNT = 1 << 8;
+    const int WAKE_LOCK_INFO_EXPIRE_COUNT = 1 << 9;
+    const int WAKE_LOCK_INFO_PREVENT_SUSPEND_TIME = 1 << 10;
+    const int WAKE_LOCK_INFO_WAKEUP_COUNT = 1 << 11;
+
+    const int WAKE_LOCK_INFO_ALL_FIELDS = (1 << 12) - 1;
 }
diff --git a/vold/Android.bp b/vold/Android.bp
new file mode 100644
index 0000000..f2d167a
--- /dev/null
+++ b/vold/Android.bp
@@ -0,0 +1,37 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+aidl_interface {
+    name: "android.system.vold",
+    vendor_available: true,
+    stability: "vintf",
+    host_supported: true,
+    srcs: [
+        "android/system/vold/CheckpointingState.aidl",
+        "android/system/vold/IVold.aidl",
+        "android/system/vold/IVoldCheckpointListener.aidl",
+    ],
+    backend: {
+        java: {
+            enabled: false,
+        },
+        cpp: {
+            enabled: true,
+        },
+        ndk: {
+            enabled: true,
+        },
+        rust: {
+            enabled: true,
+        },
+    },
+    frozen: true,
+    versions_with_info: [
+        {
+            version: "1",
+            imports: [],
+        },
+    ],
+
+}
diff --git a/vold/aidl_api/android.system.vold/1/.hash b/vold/aidl_api/android.system.vold/1/.hash
new file mode 100644
index 0000000..9ddffeb
--- /dev/null
+++ b/vold/aidl_api/android.system.vold/1/.hash
@@ -0,0 +1 @@
+354cd0fab35bc265a0ecc951ca7737604b164a0d
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/vold/aidl_api/android.system.vold/1/android/system/vold/CheckpointingState.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to vold/aidl_api/android.system.vold/1/android/system/vold/CheckpointingState.aidl
index 5135bcd..040b40e 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/vold/aidl_api/android.system.vold/1/android/system/vold/CheckpointingState.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.system.vold;
+@VintfStability
+enum CheckpointingState {
+  POSSIBLE_CHECKPOINTING,
+  CHECKPOINTING_COMPLETE,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/vold/aidl_api/android.system.vold/1/android/system/vold/IVold.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to vold/aidl_api/android.system.vold/1/android/system/vold/IVold.aidl
index 5135bcd..85bcd3b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/vold/aidl_api/android.system.vold/1/android/system/vold/IVold.aidl
@@ -31,25 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.system.vold;
+@VintfStability
+interface IVold {
+  android.system.vold.CheckpointingState registerCheckpointListener(android.system.vold.IVoldCheckpointListener listener);
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/vold/aidl_api/android.system.vold/1/android/system/vold/IVoldCheckpointListener.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to vold/aidl_api/android.system.vold/1/android/system/vold/IVoldCheckpointListener.aidl
index 5135bcd..434fbd2 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/vold/aidl_api/android.system.vold/1/android/system/vold/IVoldCheckpointListener.aidl
@@ -31,25 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.system.vold;
+@VintfStability
+interface IVoldCheckpointListener {
+  oneway void onCheckpointingComplete();
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/vold/aidl_api/android.system.vold/current/android/system/vold/CheckpointingState.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to vold/aidl_api/android.system.vold/current/android/system/vold/CheckpointingState.aidl
index 5135bcd..040b40e 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/vold/aidl_api/android.system.vold/current/android/system/vold/CheckpointingState.aidl
@@ -31,25 +31,9 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.system.vold;
+@VintfStability
+enum CheckpointingState {
+  POSSIBLE_CHECKPOINTING,
+  CHECKPOINTING_COMPLETE,
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/vold/aidl_api/android.system.vold/current/android/system/vold/IVold.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to vold/aidl_api/android.system.vold/current/android/system/vold/IVold.aidl
index 5135bcd..85bcd3b 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/vold/aidl_api/android.system.vold/current/android/system/vold/IVold.aidl
@@ -31,25 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.system.vold;
+@VintfStability
+interface IVold {
+  android.system.vold.CheckpointingState registerCheckpointListener(android.system.vold.IVoldCheckpointListener listener);
 }
diff --git a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl b/vold/aidl_api/android.system.vold/current/android/system/vold/IVoldCheckpointListener.aidl
similarity index 75%
copy from media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
copy to vold/aidl_api/android.system.vold/current/android/system/vold/IVoldCheckpointListener.aidl
index 5135bcd..434fbd2 100644
--- a/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/AudioPolicyForcedConfig.aidl
+++ b/vold/aidl_api/android.system.vold/current/android/system/vold/IVoldCheckpointListener.aidl
@@ -31,25 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.media.audio.common;
-/* @hide */
-@Backing(type="int") @SuppressWarnings(value={"redundant-name"}) @VintfStability
-enum AudioPolicyForcedConfig {
-  NONE = 0,
-  SPEAKER = 1,
-  HEADPHONES = 2,
-  BT_SCO = 3,
-  BT_A2DP = 4,
-  WIRED_ACCESSORY = 5,
-  BT_CAR_DOCK = 6,
-  BT_DESK_DOCK = 7,
-  ANALOG_DOCK = 8,
-  DIGITAL_DOCK = 9,
-  NO_BT_A2DP = 10,
-  SYSTEM_ENFORCED = 11,
-  HDMI_SYSTEM_AUDIO_ENFORCED = 12,
-  ENCODED_SURROUND_NEVER = 13,
-  ENCODED_SURROUND_ALWAYS = 14,
-  ENCODED_SURROUND_MANUAL = 15,
-  BT_BLE = 16,
+package android.system.vold;
+@VintfStability
+interface IVoldCheckpointListener {
+  oneway void onCheckpointingComplete();
 }
diff --git a/vold/android/system/vold/CheckpointingState.aidl b/vold/android/system/vold/CheckpointingState.aidl
new file mode 100644
index 0000000..e69bc95
--- /dev/null
+++ b/vold/android/system/vold/CheckpointingState.aidl
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.system.vold;
+
+/**
+ * Describes the IVold service's possible checkpointing states.
+ */
+@VintfStability
+enum CheckpointingState {
+    /**
+     * The service has not yet determined whether checkpointing is needed, or there is a checkpoint
+     * active.
+     */
+    POSSIBLE_CHECKPOINTING,
+    /**
+     * There is no checkpoint active and there will not be any more checkpoints before the system
+     * reboots.
+     */
+    CHECKPOINTING_COMPLETE,
+}
\ No newline at end of file
diff --git a/vold/android/system/vold/IVold.aidl b/vold/android/system/vold/IVold.aidl
new file mode 100644
index 0000000..2bcce4b
--- /dev/null
+++ b/vold/android/system/vold/IVold.aidl
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.system.vold;
+
+import android.system.vold.CheckpointingState;
+import android.system.vold.IVoldCheckpointListener;
+
+/**
+ * Vendor-available subset of android.os.IVold functionality.
+ */
+@VintfStability
+interface IVold {
+    /**
+     * Register a checkpointing listener.
+     *
+     * @listener:
+     *     listener to be added to the set of callbacks which will be invoked when checkpointing
+     * completes or when Vold service knows that checkpointing will not be necessary.
+     *
+     * Return:
+     *     CHECKPOINTING_COMPLETE when the listener will not be called in the future i.e. when
+     * checkpointing is 1) already completed or 2) not needed.
+     *     POSSIBLE_CHECKPOINTING when the listener will be called in the future, i.e. when
+     * there is an active checkpoint or when service does not yet know whether checkpointing is
+     * needed.
+     */
+    CheckpointingState registerCheckpointListener(IVoldCheckpointListener listener);
+}
diff --git a/vold/android/system/vold/IVoldCheckpointListener.aidl b/vold/android/system/vold/IVoldCheckpointListener.aidl
new file mode 100644
index 0000000..6a3511e
--- /dev/null
+++ b/vold/android/system/vold/IVoldCheckpointListener.aidl
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.system.vold;
+
+/**
+ * Listener for changes in checkpointing state.
+ */
+@VintfStability
+oneway interface IVoldCheckpointListener {
+    /**
+     * Invoked when Vold service has determined that no checkpointing is in progress, either
+     * because no checkpointing was necessary, or because the checkpoint completed.
+     */
+    oneway void onCheckpointingComplete();
+}
diff --git a/vold/vts/Android.bp b/vold/vts/Android.bp
new file mode 100644
index 0000000..37e1ab8
--- /dev/null
+++ b/vold/vts/Android.bp
@@ -0,0 +1,24 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_test {
+    name: "VtsHalVendorVoldTest",
+    defaults: [
+        "VtsHalTargetTestDefaults",
+        "use_libaidlvintf_gtest_helper_static",
+    ],
+    srcs: ["VtsHalVendorVoldTest.cpp"],
+    static_libs: [
+        "android.system.vold-V1-cpp",
+    ],
+    shared_libs: [
+        "libbinder",
+        "libbase",
+        "libutils",
+    ],
+    test_suites: [
+        "general-tests",
+        "vts",
+    ],
+}
diff --git a/vold/vts/VtsHalVendorVoldTest.cpp b/vold/vts/VtsHalVendorVoldTest.cpp
new file mode 100644
index 0000000..9e15878
--- /dev/null
+++ b/vold/vts/VtsHalVendorVoldTest.cpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "vold_aidl_hal_test"
+
+#include <aidl/Gtest.h>
+#include <aidl/Vintf.h>
+#include <android/system/vold/BnVoldCheckpointListener.h>
+#include <android/system/vold/CheckpointingState.h>
+#include <android/system/vold/IVold.h>
+#include <binder/IServiceManager.h>
+#include <gtest/gtest.h>
+#include <utils/String16.h>
+
+using ::android::defaultServiceManager;
+using ::android::sp;
+using ::android::String16;
+using ::android::binder::Status;
+using ::android::system::vold::BnVoldCheckpointListener;
+using ::android::system::vold::CheckpointingState;
+using ::android::system::vold::IVold;
+
+class VoldAidlTest : public ::testing::TestWithParam<std::string> {
+   public:
+    sp<IVold> vold_;
+
+    void SetUp() final {
+        auto manager = defaultServiceManager();
+        auto name = GetParam();
+        auto binder = manager->waitForService(String16(name.data(), name.size()));
+        vold_ = IVold::asInterface(binder);
+    }
+
+    void TearDown() final {}
+};
+
+class TestListener : public BnVoldCheckpointListener {
+   public:
+    Status onCheckpointingComplete() final {
+        ++called_;
+        return Status::ok();
+    }
+
+    int timesCalled() { return called_; }
+
+   private:
+    int called_ = 0;
+};
+
+TEST_P(VoldAidlTest, PostBootAddListener) {
+    auto listener = sp<TestListener>::make();
+
+    CheckpointingState state;
+    Status ret = vold_->registerCheckpointListener(listener, &state);
+    ASSERT_EQ(ret.isOk(), true);
+    EXPECT_EQ(state, CheckpointingState::CHECKPOINTING_COMPLETE);
+    EXPECT_EQ(listener->timesCalled(), 0);
+}
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VoldAidlTest);
+INSTANTIATE_TEST_SUITE_P(PerInstance, VoldAidlTest,
+                         testing::ValuesIn(::android::getAidlHalInstanceNames(IVold::descriptor)),
+                         android::PrintInstanceNameToString);
diff --git a/wifi/keystore/1.0/default/OWNERS b/wifi/keystore/1.0/default/OWNERS
index c7e30be..afcfb8b 100644
--- a/wifi/keystore/1.0/default/OWNERS
+++ b/wifi/keystore/1.0/default/OWNERS
@@ -1,2 +1 @@
 haishalom@google.com
-etancohen@google.com
diff --git a/wifi/keystore/1.0/default/test/WifiLegacyKeystoreIntegrationTest.cpp b/wifi/keystore/1.0/default/test/WifiLegacyKeystoreIntegrationTest.cpp
index ac801e5..68b993e 100644
--- a/wifi/keystore/1.0/default/test/WifiLegacyKeystoreIntegrationTest.cpp
+++ b/wifi/keystore/1.0/default/test/WifiLegacyKeystoreIntegrationTest.cpp
@@ -110,6 +110,9 @@
 class WifiLegacyKeystoreTest : public TestWithParam<std::string> {
    protected:
     void SetUp() override {
+        if (!isLegacyKeystoreEnabled()) {
+            GTEST_SKIP() << "Legacy Keystore is not fully supported";
+        }
         wifiKeystoreHal = IKeystore::getService(GetParam());
         ASSERT_TRUE(wifiKeystoreHal);
 
@@ -134,6 +137,11 @@
         return false;
     }
 
+    bool isLegacyKeystoreEnabled() {
+        // Legacy Keystore is partly deprecated after Android U
+        return property_get_int32("ro.board.api_level", 0) <= __ANDROID_API_U__;
+    }
+
     sp<IKeystore> wifiKeystoreHal;
     uid_t myRUid;
 };
diff --git a/wifi/keystore/1.0/vts/OWNERS b/wifi/keystore/1.0/vts/OWNERS
index c7e30be..afcfb8b 100644
--- a/wifi/keystore/1.0/vts/OWNERS
+++ b/wifi/keystore/1.0/vts/OWNERS
@@ -1,2 +1 @@
 haishalom@google.com
-etancohen@google.com
diff --git a/wifi/keystore/1.0/vts/functional/Android.bp b/wifi/keystore/1.0/vts/functional/Android.bp
index 7f13903..d4e6c03 100644
--- a/wifi/keystore/1.0/vts/functional/Android.bp
+++ b/wifi/keystore/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_fwk_wifi_hal",
     default_applicable_licenses: ["Android-Apache-2.0"],
 }