Merge "Add CPU and GPU headroom HAL APIs" into main
diff --git a/audio/aidl/default/CapEngineConfigXmlConverter.cpp b/audio/aidl/default/CapEngineConfigXmlConverter.cpp
index 8210664..a6e78b9 100644
--- a/audio/aidl/default/CapEngineConfigXmlConverter.cpp
+++ b/audio/aidl/default/CapEngineConfigXmlConverter.cpp
@@ -69,29 +69,36 @@
     std::string criterionName = xsdcRule.getSelectionCriterion();
     std::string criterionValue = xsdcRule.getValue();
     if (iequals(criterionName, toString(Tag::availableInputDevices))) {
-        rule.criterion = AudioHalCapCriterionV2::make<Tag::availableInputDevices>();
-        rule.criterionTypeValue =
-                VALUE_OR_RETURN(convertDeviceTypeToAidl(gLegacyInputDevicePrefix + criterionValue));
+        AudioHalCapCriterionV2::AvailableDevices value;
+        value.values.emplace_back(VALUE_OR_RETURN(
+                convertDeviceTypeToAidl(gLegacyInputDevicePrefix + criterionValue)));
+        rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::availableInputDevices>(value);
+
     } else if (iequals(criterionName, toString(Tag::availableOutputDevices))) {
-        rule.criterion = AudioHalCapCriterionV2::make<Tag::availableOutputDevices>();
-        rule.criterionTypeValue = VALUE_OR_RETURN(
-                convertDeviceTypeToAidl(gLegacyOutputDevicePrefix + criterionValue));
+        AudioHalCapCriterionV2::AvailableDevices value;
+        value.values.emplace_back(VALUE_OR_RETURN(
+                convertDeviceTypeToAidl(gLegacyOutputDevicePrefix + criterionValue)));
+        rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::availableOutputDevices>(value);
     } else if (iequals(criterionName, toString(Tag::availableInputDevicesAddresses))) {
-        rule.criterion = AudioHalCapCriterionV2::make<Tag::availableInputDevicesAddresses>();
-        rule.criterionTypeValue =
-                AudioDeviceAddress::make<AudioDeviceAddress::Tag::id>(criterionValue);
+        AudioHalCapCriterionV2::AvailableDevicesAddresses value;
+        value.values.emplace_back(criterionValue);
+        rule.criterionAndValue =
+                AudioHalCapCriterionV2::make<Tag::availableInputDevicesAddresses>(value);
     } else if (iequals(criterionName, toString(Tag::availableOutputDevicesAddresses))) {
-        rule.criterion = AudioHalCapCriterionV2::make<Tag::availableOutputDevicesAddresses>();
-        rule.criterionTypeValue =
-                AudioDeviceAddress::make<AudioDeviceAddress::Tag::id>(criterionValue);
+        AudioHalCapCriterionV2::AvailableDevicesAddresses value;
+        value.values.emplace_back(criterionValue);
+        rule.criterionAndValue =
+                AudioHalCapCriterionV2::make<Tag::availableOutputDevicesAddresses>(value);
     } else if (iequals(criterionName, toString(Tag::telephonyMode))) {
-        rule.criterion = AudioHalCapCriterionV2::make<Tag::telephonyMode>();
-        rule.criterionTypeValue = VALUE_OR_RETURN(convertTelephonyModeToAidl(criterionValue));
+        AudioHalCapCriterionV2::TelephonyMode value;
+        value.values.emplace_back(VALUE_OR_RETURN(convertTelephonyModeToAidl(criterionValue)));
+        rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::telephonyMode>(value);
     } else if (!fastcmp<strncmp>(criterionName.c_str(), kXsdcForceConfigForUse,
             strlen(kXsdcForceConfigForUse))) {
-        rule.criterion = AudioHalCapCriterionV2::make<Tag::forceConfigForUse>(
-                VALUE_OR_RETURN(convertForceUseCriterionToAidl(criterionName)));
-        rule.criterionTypeValue = VALUE_OR_RETURN(convertForcedConfigToAidl(criterionValue));
+        AudioHalCapCriterionV2::ForceConfigForUse value;
+        value.forceUse = VALUE_OR_RETURN(convertForceUseCriterionToAidl(criterionName));
+        value.values.emplace_back(VALUE_OR_RETURN(convertForcedConfigToAidl(criterionValue)));
+        rule.criterionAndValue = AudioHalCapCriterionV2::make<Tag::forceConfigForUse>(value);
     } else {
         LOG(ERROR) << __func__ << " unrecognized criterion " << criterionName;
         return unexpected(BAD_VALUE);
diff --git a/audio/aidl/default/Module.cpp b/audio/aidl/default/Module.cpp
index 45ce5ef..51b6085 100644
--- a/audio/aidl/default/Module.cpp
+++ b/audio/aidl/default/Module.cpp
@@ -236,19 +236,26 @@
     return ndk::ScopedAStatus::ok();
 }
 
-std::vector<AudioDevice> Module::findConnectedDevices(int32_t portConfigId) {
+std::vector<AudioDevice> Module::getDevicesFromDevicePortConfigIds(
+        const std::set<int32_t>& devicePortConfigIds) {
     std::vector<AudioDevice> result;
-    auto& ports = getConfig().ports;
-    auto portIds = portIdsFromPortConfigIds(findConnectedPortConfigIds(portConfigId));
-    for (auto it = portIds.begin(); it != portIds.end(); ++it) {
-        auto portIt = findById<AudioPort>(ports, *it);
-        if (portIt != ports.end() && portIt->ext.getTag() == AudioPortExt::Tag::device) {
-            result.push_back(portIt->ext.template get<AudioPortExt::Tag::device>().device);
+    auto& configs = getConfig().portConfigs;
+    for (const auto& id : devicePortConfigIds) {
+        auto it = findById<AudioPortConfig>(configs, id);
+        if (it != configs.end() && it->ext.getTag() == AudioPortExt::Tag::device) {
+            result.push_back(it->ext.template get<AudioPortExt::Tag::device>().device);
+        } else {
+            LOG(FATAL) << __func__ << ": " << mType
+                       << ": failed to find device for id" << id;
         }
     }
     return result;
 }
 
+std::vector<AudioDevice> Module::findConnectedDevices(int32_t portConfigId) {
+    return getDevicesFromDevicePortConfigIds(findConnectedPortConfigIds(portConfigId));
+}
+
 std::set<int32_t> Module::findConnectedPortConfigIds(int32_t portConfigId) {
     std::set<int32_t> result;
     auto patchIdsRange = mPatches.equal_range(portConfigId);
@@ -460,58 +467,132 @@
             fillConnectionsHelper(connections, patch.sinkPortConfigIds, patch.sourcePortConfigIds);
         }  // Otherwise, there are no streams to notify.
     };
-    fillConnections(oldConnections, oldPatch);
-    fillConnections(newConnections, newPatch);
-
-    std::for_each(oldConnections.begin(), oldConnections.end(), [&](const auto& connectionPair) {
-        const int32_t mixPortConfigId = connectionPair.first;
-        if (auto it = newConnections.find(mixPortConfigId);
-            it == newConnections.end() || it->second != connectionPair.second) {
-            if (auto status = mStreams.setStreamConnectedDevices(mixPortConfigId, {});
-                status.isOk()) {
-                LOG(DEBUG) << "updateStreamsConnectedState: The stream on port config id "
-                           << mixPortConfigId << " has been disconnected";
-            } else {
-                // Disconnection is tricky to roll back, just register a failure.
-                maybeFailure = std::move(status);
+    auto restoreOldConnections = [&](const std::set<int32_t>& mixPortIds,
+                                     const bool continueWithEmptyDevices) {
+        for (const auto mixPort : mixPortIds) {
+            if (auto it = oldConnections.find(mixPort);
+                continueWithEmptyDevices || it != oldConnections.end()) {
+                const std::vector<AudioDevice> d =
+                        it != oldConnections.end() ? getDevicesFromDevicePortConfigIds(it->second)
+                                                   : std::vector<AudioDevice>();
+                if (auto status = mStreams.setStreamConnectedDevices(mixPort, d); status.isOk()) {
+                    LOG(WARNING) << ":updateStreamsConnectedState: rollback: mix port config:"
+                                 << mixPort
+                                 << (d.empty() ? "; not connected"
+                                               : std::string("; connected to ") +
+                                                         ::android::internal::ToString(d));
+                } else {
+                    // can't do much about rollback failures
+                    LOG(ERROR)
+                            << ":updateStreamsConnectedState: rollback: failed for mix port config:"
+                            << mixPort;
+                }
             }
         }
-    });
-    if (!maybeFailure.isOk()) return maybeFailure;
-    std::set<int32_t> idsToDisconnectOnFailure;
-    std::for_each(newConnections.begin(), newConnections.end(), [&](const auto& connectionPair) {
-        const int32_t mixPortConfigId = connectionPair.first;
-        if (auto it = oldConnections.find(mixPortConfigId);
-            it == oldConnections.end() || it->second != connectionPair.second) {
-            const auto connectedDevices = findConnectedDevices(mixPortConfigId);
+    };
+    fillConnections(oldConnections, oldPatch);
+    fillConnections(newConnections, newPatch);
+    /**
+     * Illustration of oldConnections and newConnections
+     *
+     * oldConnections {
+     * a : {A,B,C},
+     * b : {D},
+     * d : {H,I,J},
+     * e : {N,O,P},
+     * f : {Q,R},
+     * g : {T,U,V},
+     * }
+     *
+     * newConnections {
+     * a : {A,B,C},
+     * c : {E,F,G},
+     * d : {K,L,M},
+     * e : {N,P},
+     * f : {Q,R,S},
+     * g : {U,V,W},
+     * }
+     *
+     * Expected routings:
+     *      'a': is ignored both in disconnect step and connect step,
+     *           due to same devices both in oldConnections and newConnections.
+     *      'b': handled only in disconnect step with empty devices because 'b' is only present
+     *           in oldConnections.
+     *      'c': handled only in connect step with {E,F,G} devices because 'c' is only present
+     *           in newConnections.
+     *      'd': handled only in connect step with {K,L,M} devices because 'd' is also present
+     *           in newConnections and it is ignored in disconnected step.
+     *      'e': handled only in connect step with {N,P} devices because 'e' is also present
+     *           in newConnections and it is ignored in disconnect step. please note that there
+     *           is no exclusive disconnection for device {O}.
+     *      'f': handled only in connect step with {Q,R,S} devices because 'f' is also present
+     *           in newConnections and it is ignored in disconnect step. Even though stream is
+     *           already connected with {Q,R} devices and connection happens with {Q,R,S}.
+     *      'g': handled only in connect step with {U,V,W} devices because 'g' is also present
+     *           in newConnections and it is ignored in disconnect step. There is no exclusive
+     *           disconnection with devices {T,U,V}.
+     *
+     *       If, any failure, will lead to restoreOldConnections (rollback).
+     *       The aim of the restoreOldConnections is to make connections back to oldConnections.
+     *       Failures in restoreOldConnections aren't handled.
+     */
+
+    std::set<int32_t> idsToConnectBackOnFailure;
+    // disconnection step
+    for (const auto& [oldMixPortConfigId, oldDevicePortConfigIds] : oldConnections) {
+        if (auto it = newConnections.find(oldMixPortConfigId); it == newConnections.end()) {
+            idsToConnectBackOnFailure.insert(oldMixPortConfigId);
+            if (auto status = mStreams.setStreamConnectedDevices(oldMixPortConfigId, {});
+                status.isOk()) {
+                LOG(DEBUG) << __func__ << ": The stream on port config id " << oldMixPortConfigId
+                           << " has been disconnected";
+            } else {
+                maybeFailure = std::move(status);
+                // proceed to rollback even on one failure
+                break;
+            }
+        }
+    }
+
+    if (!maybeFailure.isOk()) {
+        restoreOldConnections(idsToConnectBackOnFailure, false /*continueWithEmptyDevices*/);
+        LOG(WARNING) << __func__ << ": failed to disconnect from old patch. attempted rollback";
+        return maybeFailure;
+    }
+
+    std::set<int32_t> idsToRollbackOnFailure;
+    // connection step
+    for (const auto& [newMixPortConfigId, newDevicePortConfigIds] : newConnections) {
+        if (auto it = oldConnections.find(newMixPortConfigId);
+            it == oldConnections.end() || it->second != newDevicePortConfigIds) {
+            const auto connectedDevices = getDevicesFromDevicePortConfigIds(newDevicePortConfigIds);
+            idsToRollbackOnFailure.insert(newMixPortConfigId);
             if (connectedDevices.empty()) {
                 // This is important as workers use the vector size to derive the connection status.
-                LOG(FATAL) << "updateStreamsConnectedState: No connected devices found for port "
-                              "config id "
-                           << mixPortConfigId;
+                LOG(FATAL) << __func__ << ": No connected devices found for port config id "
+                           << newMixPortConfigId;
             }
-            if (auto status = mStreams.setStreamConnectedDevices(mixPortConfigId, connectedDevices);
+            if (auto status =
+                        mStreams.setStreamConnectedDevices(newMixPortConfigId, connectedDevices);
                 status.isOk()) {
-                LOG(DEBUG) << "updateStreamsConnectedState: The stream on port config id "
-                           << mixPortConfigId << " has been connected to: "
+                LOG(DEBUG) << __func__ << ": The stream on port config id " << newMixPortConfigId
+                           << " has been connected to: "
                            << ::android::internal::ToString(connectedDevices);
             } else {
                 maybeFailure = std::move(status);
-                idsToDisconnectOnFailure.insert(mixPortConfigId);
+                // proceed to rollback even on one failure
+                break;
             }
         }
-    });
+    }
+
     if (!maybeFailure.isOk()) {
-        LOG(WARNING) << __func__ << ": " << mType
-                     << ": Due to a failure, disconnecting streams on port config ids "
-                     << ::android::internal::ToString(idsToDisconnectOnFailure);
-        std::for_each(idsToDisconnectOnFailure.begin(), idsToDisconnectOnFailure.end(),
-                      [&](const auto& portConfigId) {
-                          auto status = mStreams.setStreamConnectedDevices(portConfigId, {});
-                          (void)status.isOk();  // Can't do much about a failure here.
-                      });
+        restoreOldConnections(idsToConnectBackOnFailure, false /*continueWithEmptyDevices*/);
+        restoreOldConnections(idsToRollbackOnFailure, true /*continueWithEmptyDevices*/);
+        LOG(WARNING) << __func__ << ": failed to connect for new patch. attempted rollback";
         return maybeFailure;
     }
+
     return ndk::ScopedAStatus::ok();
 }
 
diff --git a/audio/aidl/default/apex/com.android.hardware.audio/Android.bp b/audio/aidl/default/apex/com.android.hardware.audio/Android.bp
index ee92512..8fa429a 100644
--- a/audio/aidl/default/apex/com.android.hardware.audio/Android.bp
+++ b/audio/aidl/default/apex/com.android.hardware.audio/Android.bp
@@ -48,4 +48,11 @@
         "android.hardware.audio.service-aidl.xml",
         "android.hardware.bluetooth.audio.xml",
     ],
+    required: [
+        "aidl_audio_set_configurations_bfbs",
+        "aidl_default_audio_set_configurations_json",
+        "aidl_audio_set_scenarios_bfbs",
+        "aidl_default_audio_set_scenarios_json",
+        "hfp_codec_capabilities_xml",
+    ],
 }
diff --git a/audio/aidl/default/config/audioPolicy/api/current.txt b/audio/aidl/default/config/audioPolicy/api/current.txt
index e57c108..7fce8fb 100644
--- a/audio/aidl/default/config/audioPolicy/api/current.txt
+++ b/audio/aidl/default/config/audioPolicy/api/current.txt
@@ -144,6 +144,7 @@
     enum_constant public static final android.audio.policy.configuration.AudioDevice AUDIO_DEVICE_OUT_HEARING_AID;
     enum_constant public static final android.audio.policy.configuration.AudioDevice AUDIO_DEVICE_OUT_IP;
     enum_constant public static final android.audio.policy.configuration.AudioDevice AUDIO_DEVICE_OUT_LINE;
+    enum_constant public static final android.audio.policy.configuration.AudioDevice AUDIO_DEVICE_OUT_MULTICHANNEL_GROUP;
     enum_constant public static final android.audio.policy.configuration.AudioDevice AUDIO_DEVICE_OUT_PROXY;
     enum_constant public static final android.audio.policy.configuration.AudioDevice AUDIO_DEVICE_OUT_REMOTE_SUBMIX;
     enum_constant public static final android.audio.policy.configuration.AudioDevice AUDIO_DEVICE_OUT_SPDIF;
diff --git a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
index 108a6a3..1f90313 100644
--- a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
+++ b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
@@ -262,6 +262,7 @@
             <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_LINE"/>
             <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER_SAFE"/>
             <xs:enumeration value="AUDIO_DEVICE_OUT_IP"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_MULTICHANNEL_GROUP"/>
             <xs:enumeration value="AUDIO_DEVICE_OUT_BUS"/>
             <xs:enumeration value="AUDIO_DEVICE_OUT_PROXY"/>
             <xs:enumeration value="AUDIO_DEVICE_OUT_USB_HEADSET"/>
diff --git a/audio/aidl/default/config/audioPolicy/engine/api/current.txt b/audio/aidl/default/config/audioPolicy/engine/api/current.txt
index 8e0e9a2..1ba91e6 100644
--- a/audio/aidl/default/config/audioPolicy/engine/api/current.txt
+++ b/audio/aidl/default/config/audioPolicy/engine/api/current.txt
@@ -227,6 +227,7 @@
     enum_constant public static final android.audio.policy.engine.configuration.UsageEnumType AUDIO_USAGE_NOTIFICATION_EVENT;
     enum_constant public static final android.audio.policy.engine.configuration.UsageEnumType AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE;
     enum_constant public static final android.audio.policy.engine.configuration.UsageEnumType AUDIO_USAGE_SAFETY;
+    enum_constant public static final android.audio.policy.engine.configuration.UsageEnumType AUDIO_USAGE_SPEAKER_CLEANUP;
     enum_constant public static final android.audio.policy.engine.configuration.UsageEnumType AUDIO_USAGE_UNKNOWN;
     enum_constant public static final android.audio.policy.engine.configuration.UsageEnumType AUDIO_USAGE_VEHICLE_STATUS;
     enum_constant public static final android.audio.policy.engine.configuration.UsageEnumType AUDIO_USAGE_VIRTUAL_SOURCE;
diff --git a/audio/aidl/default/config/audioPolicy/engine/audio_policy_engine_configuration.xsd b/audio/aidl/default/config/audioPolicy/engine/audio_policy_engine_configuration.xsd
index e2508ea..6422277 100644
--- a/audio/aidl/default/config/audioPolicy/engine/audio_policy_engine_configuration.xsd
+++ b/audio/aidl/default/config/audioPolicy/engine/audio_policy_engine_configuration.xsd
@@ -377,6 +377,7 @@
             <xs:enumeration value="AUDIO_USAGE_SAFETY" />
             <xs:enumeration value="AUDIO_USAGE_VEHICLE_STATUS" />
             <xs:enumeration value="AUDIO_USAGE_ANNOUNCEMENT" />
+            <xs:enumeration value="AUDIO_USAGE_SPEAKER_CLEANUP" />
         </xs:restriction>
     </xs:simpleType>
 
diff --git a/audio/aidl/default/include/core-impl/Module.h b/audio/aidl/default/include/core-impl/Module.h
index 8548aff..7e32cf2 100644
--- a/audio/aidl/default/include/core-impl/Module.h
+++ b/audio/aidl/default/include/core-impl/Module.h
@@ -241,6 +241,8 @@
     std::vector<AudioRoute*> getAudioRoutesForAudioPortImpl(int32_t portId);
     Configuration& getConfig();
     const ConnectedDevicePorts& getConnectedDevicePorts() const { return mConnectedDevicePorts; }
+    std::vector<::aidl::android::media::audio::common::AudioDevice>
+    getDevicesFromDevicePortConfigIds(const std::set<int32_t>& devicePortConfigIds);
     bool getMasterMute() const { return mMasterMute; }
     bool getMasterVolume() const { return mMasterVolume; }
     bool getMicMute() const { return mMicMute; }
diff --git a/audio/aidl/vts/Android.bp b/audio/aidl/vts/Android.bp
index 9ebe518..b025637 100644
--- a/audio/aidl/vts/Android.bp
+++ b/audio/aidl/vts/Android.bp
@@ -31,6 +31,7 @@
     ],
     header_libs: [
         "libaudioaidl_headers",
+        "libaudioutils_headers",
         "libexpectedutils_headers",
     ],
     cflags: [
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index 01f73fc..e073ece 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -84,6 +84,7 @@
 }
 
 static constexpr float kMaxAudioSampleValue = 1;
+static constexpr int kSamplingFrequency = 44100;
 
 class EffectHelper {
   public:
@@ -428,19 +429,28 @@
         }
     }
 
-    // Generate multitone input between -1 to +1 using testFrequencies
-    void generateMultiTone(const std::vector<int>& testFrequencies, std::vector<float>& input,
-                           const int samplingFrequency) {
+    // Generate multitone input between -amplitude to +amplitude using testFrequencies
+    // All test frequencies are considered having the same amplitude
+    void generateSineWave(const std::vector<int>& testFrequencies, std::vector<float>& input,
+                          const float amplitude = 1.0,
+                          const int samplingFrequency = kSamplingFrequency) {
         for (size_t i = 0; i < input.size(); i++) {
             input[i] = 0;
 
             for (size_t j = 0; j < testFrequencies.size(); j++) {
                 input[i] += sin(2 * M_PI * testFrequencies[j] * i / samplingFrequency);
             }
-            input[i] /= testFrequencies.size();
+            input[i] *= amplitude / testFrequencies.size();
         }
     }
 
+    // Generate single tone input between -amplitude to +amplitude using testFrequency
+    void generateSineWave(const int testFrequency, std::vector<float>& input,
+                          const float amplitude = 1.0,
+                          const int samplingFrequency = kSamplingFrequency) {
+        generateSineWave(std::vector<int>{testFrequency}, input, amplitude, samplingFrequency);
+    }
+
     // Use FFT transform to convert the buffer to frequency domain
     // Compute its magnitude at binOffsets
     std::vector<float> calculateMagnitude(const std::vector<float>& buffer,
diff --git a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
index 25fcd46..583143c 100644
--- a/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreConfigTargetTest.cpp
@@ -355,7 +355,6 @@
             const AudioHalCapRule& rule,
             const std::vector<std::optional<AudioHalCapCriterionV2>>& criteria) {
         const auto& compoundRule = rule.compoundRule;
-        using TypeTag = AudioHalCapCriterionV2::Type::Tag;
         if (rule.nestedRules.empty() && rule.criterionRules.empty()) {
             EXPECT_EQ(compoundRule, AudioHalCapRule::CompoundRule::ALL);
         }
@@ -365,8 +364,8 @@
             ValidateAudioHalConfigurationRule(nestedRule, criteria);
         }
         for (const auto& criterionRule : rule.criterionRules) {
-            auto selectionCriterion = criterionRule.criterion;
-            auto criterionValue = criterionRule.criterionTypeValue;
+            auto selectionCriterion = criterionRule.criterionAndValue;
+            auto criterionValue = criterionRule.criterionAndValue;
             auto matchesWhen = criterionRule.matchingRule;
             auto criteriaIt = find_if(criteria.begin(), criteria.end(), [&](const auto& criterion) {
                 return criterion.has_value() &&
@@ -377,50 +376,65 @@
             AudioHalCapCriterionV2 matchingCriterion = (*criteriaIt).value();
             switch (selectionCriterion.getTag()) {
                 case AudioHalCapCriterionV2::availableInputDevices: {
-                    EXPECT_EQ(criterionValue.getTag(), TypeTag::availableDevicesType);
+                    const auto& values =
+                            criterionValue.get<AudioHalCapCriterionV2::availableInputDevices>()
+                                    .values;
+                    ASSERT_FALSE(values.empty());
                     validateAudioHalCapRule(
                             matchingCriterion.get<AudioHalCapCriterionV2::availableInputDevices>(),
-                            criterionValue.get<TypeTag::availableDevicesType>(), matchesWhen);
+                            values[0], matchesWhen);
                     break;
                 }
                 case AudioHalCapCriterionV2::availableOutputDevices: {
-                    EXPECT_EQ(criterionValue.getTag(), TypeTag::availableDevicesType);
+                    const auto& values =
+                            criterionValue.get<AudioHalCapCriterionV2::availableOutputDevices>()
+                                    .values;
+                    ASSERT_FALSE(values.empty());
                     validateAudioHalCapRule(
                             matchingCriterion.get<AudioHalCapCriterionV2::availableOutputDevices>(),
-                            criterionValue.get<TypeTag::availableDevicesType>(), matchesWhen);
+                            values[0], matchesWhen);
                     break;
                 }
                 case AudioHalCapCriterionV2::availableInputDevicesAddresses: {
-                    EXPECT_EQ(criterionValue.getTag(), TypeTag::availableDevicesAddressesType);
+                    const auto& values =
+                            criterionValue
+                                    .get<AudioHalCapCriterionV2::availableInputDevicesAddresses>()
+                                    .values;
+                    ASSERT_FALSE(values.empty());
                     validateAudioHalCapRule(
                             matchingCriterion
                                     .get<AudioHalCapCriterionV2::availableInputDevicesAddresses>(),
-                            criterionValue.get<TypeTag::availableDevicesAddressesType>(),
-                            matchesWhen);
+                            values[0], matchesWhen);
                     break;
                 }
                 case AudioHalCapCriterionV2::availableOutputDevicesAddresses: {
-                    EXPECT_EQ(criterionValue.getTag(), TypeTag::availableDevicesAddressesType);
+                    const auto& values =
+                            criterionValue
+                                    .get<AudioHalCapCriterionV2::availableOutputDevicesAddresses>()
+                                    .values;
+                    ASSERT_FALSE(values.empty());
                     validateAudioHalCapRule(
                             matchingCriterion
                                     .get<AudioHalCapCriterionV2::availableOutputDevicesAddresses>(),
-                            criterionValue.get<TypeTag::availableDevicesAddressesType>(),
-                            matchesWhen);
+                            values[0], matchesWhen);
                     break;
                 }
                 case AudioHalCapCriterionV2::telephonyMode: {
-                    EXPECT_EQ(criterionValue.getTag(), TypeTag::telephonyModeType);
+                    const auto& values =
+                            criterionValue.get<AudioHalCapCriterionV2::telephonyMode>().values;
+                    ASSERT_FALSE(values.empty());
                     validateAudioHalCapRule(
                             matchingCriterion.get<AudioHalCapCriterionV2::telephonyMode>(),
-                            criterionValue.get<TypeTag::telephonyModeType>(), matchesWhen);
+                            values[0], matchesWhen);
                     break;
                 }
                 case AudioHalCapCriterionV2::forceConfigForUse: {
-                    EXPECT_EQ(criterionValue.getTag(), TypeTag::forcedConfigType);
+                    const auto& values =
+                            criterionValue.get<AudioHalCapCriterionV2::forceConfigForUse>().values;
+                    ASSERT_FALSE(values.empty());
                     validateAudioHalCapRule(
-                            matchingCriterion
-                                    .get<AudioHalCapCriterionV2::forceConfigForUse>(),
-                            criterionValue.get<TypeTag::forcedConfigType>(), matchesWhen);
+                            matchingCriterion.get<AudioHalCapCriterionV2::forceConfigForUse>(),
+                            values[0], matchesWhen);
                     break;
                 }
                 default:
diff --git a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
index 9fe5801..6bfba65 100644
--- a/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalAudioCoreModuleTargetTest.cpp
@@ -80,6 +80,7 @@
 using aidl::android::hardware::audio::core::VendorParameter;
 using aidl::android::hardware::audio::core::sounddose::ISoundDose;
 using aidl::android::hardware::common::fmq::SynchronizedReadWrite;
+using aidl::android::media::audio::common::AudioChannelLayout;
 using aidl::android::media::audio::common::AudioContentType;
 using aidl::android::media::audio::common::AudioDevice;
 using aidl::android::media::audio::common::AudioDeviceAddress;
@@ -1514,7 +1515,7 @@
     const int defaultDeviceFlag = 1 << AudioPortDeviceExt::FLAG_INDEX_DEFAULT_DEVICE;
     for (const auto& port : ports) {
         if (port.ext.getTag() != AudioPortExt::Tag::device) continue;
-        const auto& devicePort = port.ext.get<AudioPortExt::Tag::device>();
+        const AudioPortDeviceExt& devicePort = port.ext.get<AudioPortExt::Tag::device>();
         EXPECT_NE(AudioDeviceType::NONE, devicePort.device.type.type);
         EXPECT_NE(AudioDeviceType::IN_DEFAULT, devicePort.device.type.type);
         EXPECT_NE(AudioDeviceType::OUT_DEFAULT, devicePort.device.type.type);
@@ -1549,6 +1550,15 @@
                 FAIL() << "Invalid AudioIoFlags Tag: " << toString(port.flags.getTag());
             }
         }
+        // Speaker layout can be null or layoutMask variant.
+        if (devicePort.speakerLayout.has_value()) {
+            // Should only be set for output ports.
+            EXPECT_EQ(AudioIoFlags::Tag::output, port.flags.getTag());
+            const auto speakerLayoutTag = devicePort.speakerLayout.value().getTag();
+            EXPECT_EQ(AudioChannelLayout::Tag::layoutMask, speakerLayoutTag)
+                    << "If set, speaker layout must be layoutMask.  Received: "
+                    << toString(speakerLayoutTag);
+        }
     }
 }
 
diff --git a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
index 5ce2a20..5a24be7 100644
--- a/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalBassBoostTargetTest.cpp
@@ -113,7 +113,6 @@
         }
     }
 
-    static constexpr int kSamplingFrequency = 44100;
     static constexpr int kDurationMilliSec = 720;
     static constexpr int kInputSize = kSamplingFrequency * kDurationMilliSec / 1000;
     long mInputFrameCount, mOutputFrameCount;
@@ -188,18 +187,6 @@
         }
     }
 
-    // Generate multitone input between -1 to +1 using testFrequencies
-    void generateMultiTone(const std::vector<int>& testFrequencies, std::vector<float>& input) {
-        for (auto i = 0; i < kInputSize; i++) {
-            input[i] = 0;
-
-            for (size_t j = 0; j < testFrequencies.size(); j++) {
-                input[i] += sin(2 * M_PI * testFrequencies[j] * i / kSamplingFrequency);
-            }
-            input[i] /= testFrequencies.size();
-        }
-    }
-
     // Use FFT transform to convert the buffer to frequency domain
     // Compute its magnitude at binOffsets
     std::vector<float> calculateMagnitude(const std::vector<float>& buffer,
@@ -252,7 +239,8 @@
 
     roundToFreqCenteredToFftBin(testFrequencies, binOffsets);
 
-    generateMultiTone(testFrequencies, input);
+    // Generate multitone input
+    generateSineWave(testFrequencies, input);
 
     inputMag = calculateMagnitude(input, binOffsets);
 
diff --git a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
index e31aae6..a29920e 100644
--- a/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalEnvironmentalReverbTargetTest.cpp
@@ -224,13 +224,6 @@
                                                output.size());
     }
 
-    void generateSineWaveInput(std::vector<float>& input) {
-        int frequency = 1000;
-        size_t kSamplingFrequency = 44100;
-        for (size_t i = 0; i < input.size(); i++) {
-            input[i] = sin(2 * M_PI * frequency * i / kSamplingFrequency);
-        }
-    }
     using Maker = EnvironmentalReverb (*)(int);
 
     static constexpr std::array<Maker, static_cast<int>(EnvironmentalReverb::bypass) + 1>
@@ -286,9 +279,9 @@
         }
     }
 
-    static constexpr int kSamplingFrequency = 44100;
     static constexpr int kDurationMilliSec = 500;
     static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
+    static constexpr int kInputFrequency = 1000;
 
     int mStereoChannelCount =
             getChannelCount(AudioChannelLayout::make<AudioChannelLayout::layoutMask>(
@@ -351,7 +344,7 @@
         : EnvironmentalReverbHelper(std::get<DESCRIPTOR_INDEX>(GetParam())) {
         std::tie(mTag, mParamValues) = std::get<TAG_VALUE_PAIR>(GetParam());
         mInput.resize(kBufferSize);
-        generateSineWaveInput(mInput);
+        generateSineWave(kInputFrequency, mInput);
     }
     void SetUp() override {
         SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
@@ -441,7 +434,7 @@
 
 TEST_P(EnvironmentalReverbMinimumParamTest, MinimumValueTest) {
     std::vector<float> input(kBufferSize);
-    generateSineWaveInput(input);
+    generateSineWave(kInputFrequency, input);
     std::vector<float> output(kBufferSize);
     setParameterAndProcess(input, output, mValue, mTag);
     float energy = computeOutputEnergy(input, output);
@@ -477,7 +470,7 @@
         : EnvironmentalReverbHelper(std::get<DESCRIPTOR_INDEX>(GetParam())) {
         std::tie(mTag, mParamValues) = std::get<TAG_VALUE_PAIR>(GetParam());
         mInput.resize(kBufferSize);
-        generateSineWaveInput(mInput);
+        generateSineWave(kInputFrequency, mInput);
     }
     void SetUp() override {
         SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
@@ -556,7 +549,7 @@
         if (mIsInputMute) {
             std::fill(mInput.begin(), mInput.end(), 0);
         } else {
-            generateSineWaveInput(mInput);
+            generateSineWave(kInputFrequency, mInput);
         }
     }
     void SetUp() override {
diff --git a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
index 542f0d8..3ce9e53 100644
--- a/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalPresetReverbTargetTest.cpp
@@ -81,7 +81,6 @@
                                            << "\ngetParam:" << getParam.toString();
     }
 
-    static constexpr int kSamplingFrequency = 44100;
     static constexpr int kDurationMilliSec = 500;
     static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
     int mStereoChannelCount =
@@ -133,7 +132,8 @@
   public:
     PresetReverbProcessTest() {
         std::tie(mFactory, mDescriptor) = GetParam();
-        generateSineWaveInput();
+        mInput.resize(kBufferSize);
+        generateSineWave(1000 /*Input Frequency*/, mInput);
     }
 
     void SetUp() override {
@@ -145,13 +145,6 @@
         ASSERT_NO_FATAL_FAILURE(TearDownPresetReverb());
     }
 
-    void generateSineWaveInput() {
-        int frequency = 1000;
-        for (size_t i = 0; i < kBufferSize; i++) {
-            mInput.push_back(sin(2 * M_PI * frequency * i / kSamplingFrequency));
-        }
-    }
-
     bool isAuxiliary() {
         return mDescriptor.common.flags.type ==
                aidl::android::hardware::audio::effect::Flags::Type::AUXILIARY;
diff --git a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
index b449f3c..3021370 100644
--- a/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVirtualizerTargetTest.cpp
@@ -94,7 +94,6 @@
         }
     }
 
-    static constexpr int kSamplingFrequency = 44100;
     static constexpr int kDefaultChannelLayout = AudioChannelLayout::LAYOUT_STEREO;
     static constexpr int kDurationMilliSec = 720;
     static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
@@ -164,10 +163,7 @@
         if (mZeroInput) {
             std::fill(buffer.begin(), buffer.end(), 0);
         } else {
-            int frequency = 100;
-            for (size_t i = 0; i < buffer.size(); i++) {
-                buffer[i] = sin(2 * M_PI * frequency * i / kSamplingFrequency);
-            }
+            generateSineWave(1000 /*Input Frequency*/, buffer);
         }
     }
 
diff --git a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
index 4300801..b58c1c6 100644
--- a/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
+++ b/audio/aidl/vts/VtsHalVolumeTargetTest.cpp
@@ -93,7 +93,6 @@
         }
     }
 
-    static constexpr int kSamplingFrequency = 44100;
     static constexpr int kDurationMilliSec = 720;
     static constexpr int kBufferSize = kSamplingFrequency * kDurationMilliSec / 1000;
     static constexpr int kMinLevel = -96;
@@ -163,7 +162,7 @@
         mInputMag.resize(mTestFrequencies.size());
         mBinOffsets.resize(mTestFrequencies.size());
         roundToFreqCenteredToFftBin(mTestFrequencies, mBinOffsets, kBinWidth);
-        generateMultiTone(mTestFrequencies, mInput, kSamplingFrequency);
+        generateSineWave(mTestFrequencies, mInput);
         mInputMag = calculateMagnitude(mInput, mBinOffsets, kNPointFFT);
     }
 
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.aidl
new file mode 100644
index 0000000..2685f58
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.aidl
@@ -0,0 +1,41 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioDeviceConfiguration {
+  android.hardware.automotive.audiocontrol.RoutingDeviceConfiguration routingConfig;
+  boolean useCoreAudioVolume;
+  boolean useHalDuckingSignals;
+  boolean useCarVolumeGroupMuting;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl
new file mode 100644
index 0000000..0a3c677
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioFadeConfiguration {
+  String name;
+  android.hardware.automotive.audiocontrol.FadeState fadeState;
+  long fadeInDurationMs = DEFAULT_FADE_IN_DURATION_MS /* 1000 */;
+  long fadeOutDurationMs = DEFAULT_FADE_OUT_DURATION_MS /* 2000 */;
+  long fadeInDelayedForOffendersMs = DEFAULT_DELAY_FADE_IN_OFFENDERS_MS /* 2000 */;
+  android.media.audio.common.AudioUsage[] fadeableUsages;
+  @nullable android.media.audio.common.AudioContentType[] unfadeableContentTypes;
+  List<android.media.audio.common.AudioAttributes> unfadableAudioAttributes;
+  List<android.hardware.automotive.audiocontrol.FadeConfiguration> fadeOutConfigurations;
+  List<android.hardware.automotive.audiocontrol.FadeConfiguration> fadeInConfigurations;
+  const long DEFAULT_FADE_IN_DURATION_MS = 1000;
+  const long DEFAULT_FADE_OUT_DURATION_MS = 2000;
+  const long DEFAULT_DELAY_FADE_IN_OFFENDERS_MS = 2000;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioFocusChange.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioFocusChange.aidl
index 58a3667..8eab521 100644
--- a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioFocusChange.aidl
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioFocusChange.aidl
@@ -39,7 +39,7 @@
   GAIN_TRANSIENT = 2,
   GAIN_TRANSIENT_MAY_DUCK = 3,
   GAIN_TRANSIENT_EXCLUSIVE = 4,
-  LOSS = -1,
-  LOSS_TRANSIENT = -2,
-  LOSS_TRANSIENT_CAN_DUCK = -3,
+  LOSS = ((-1) * GAIN) /* -1 */,
+  LOSS_TRANSIENT = ((-1) * GAIN_TRANSIENT) /* -2 */,
+  LOSS_TRANSIENT_CAN_DUCK = ((-1) * GAIN_TRANSIENT_MAY_DUCK) /* -3 */,
 }
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZone.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZone.aidl
new file mode 100644
index 0000000..2cb1760
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZone.aidl
@@ -0,0 +1,45 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioZone {
+  String name;
+  int id;
+  int occupantZoneId = UNASSIGNED_OCCUPANT /* -1 */;
+  android.hardware.automotive.audiocontrol.AudioZoneContext audioZoneContext;
+  List<android.hardware.automotive.audiocontrol.AudioZoneConfig> audioZoneConfigs;
+  List<android.media.audio.common.AudioPort> inputAudioDevices;
+  const int PRIMARY_AUDIO_ZONE = 0;
+  const int UNASSIGNED_OCCUPANT = (-1) /* -1 */;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneConfig.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneConfig.aidl
new file mode 100644
index 0000000..3fd37bc
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneConfig.aidl
@@ -0,0 +1,41 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioZoneConfig {
+  String name;
+  boolean isDefault;
+  List<android.hardware.automotive.audiocontrol.VolumeGroupConfig> volumeGroups;
+  @nullable android.hardware.automotive.audiocontrol.AudioZoneFadeConfiguration fadeConfiguration;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneContext.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneContext.aidl
new file mode 100644
index 0000000..0f8b946
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneContext.aidl
@@ -0,0 +1,38 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioZoneContext {
+  List<android.hardware.automotive.audiocontrol.AudioZoneContextInfo> audioContextInfos;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneContextInfo.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneContextInfo.aidl
new file mode 100644
index 0000000..01ab1be
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneContextInfo.aidl
@@ -0,0 +1,41 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioZoneContextInfo {
+  String name;
+  int id = UNASSIGNED_CONTEXT_ID /* -1 */;
+  List<android.media.audio.common.AudioAttributes> audioAttributes;
+  const int UNASSIGNED_CONTEXT_ID = (-1) /* -1 */;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneFadeConfiguration.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneFadeConfiguration.aidl
new file mode 100644
index 0000000..f3f32bf
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/AudioZoneFadeConfiguration.aidl
@@ -0,0 +1,39 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable AudioZoneFadeConfiguration {
+  android.hardware.automotive.audiocontrol.AudioFadeConfiguration defaultConfiguration;
+  List<android.hardware.automotive.audiocontrol.TransientFadeConfigurationEntry> transientConfiguration;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/DeviceToContextEntry.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/DeviceToContextEntry.aidl
new file mode 100644
index 0000000..923b0bd
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/DeviceToContextEntry.aidl
@@ -0,0 +1,39 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable DeviceToContextEntry {
+  List<String> contextNames;
+  android.media.audio.common.AudioPort device;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/FadeConfiguration.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/FadeConfiguration.aidl
new file mode 100644
index 0000000..2c978e7
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/FadeConfiguration.aidl
@@ -0,0 +1,44 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable FadeConfiguration {
+  long fadeDurationMillis;
+  android.hardware.automotive.audiocontrol.FadeConfiguration.AudioAttributesOrUsage audioAttributesOrUsage;
+  @JavaDerive(equals=true, toString=true) @VintfStability
+  union AudioAttributesOrUsage {
+    android.media.audio.common.AudioAttributes fadeAttribute;
+    android.media.audio.common.AudioUsage usage;
+  }
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/FadeState.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/FadeState.aidl
new file mode 100644
index 0000000..9b25dfb
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/FadeState.aidl
@@ -0,0 +1,39 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+enum FadeState {
+  FADE_STATE_DISABLED,
+  FADE_STATE_ENABLED_DEFAULT,
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/IAudioControl.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/IAudioControl.aidl
index ffd575d..fe39f92 100644
--- a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/IAudioControl.aidl
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/IAudioControl.aidl
@@ -12,6 +12,34 @@
  * 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.
+ *//**
+ * Important note on Metadata:
+ * Metadata qualifies a playback track for an output stream.
+ * This is highly closed to {@link android.media.AudioAttributes}.
+ * It allows to identify the audio stream rendered / requesting / abandonning the focus.
+ *
+ * AudioControl 1.0 was limited to identification through {@code AttributeUsage} listed as
+ * {@code audioUsage} in audio_policy_configuration.xsd.
+ *
+ * Any new OEM needs would not be possible without extension.
+ *
+ * Relying on {@link android.hardware.automotive.audiocontrol.PlaybackTrackMetadata} allows
+ * to use a combination of {@code AttributeUsage}, {@code AttributeContentType} and
+ * {@code AttributeTags} to identify the use case / routing thanks to
+ * {@link android.media.audiopolicy.AudioProductStrategy}.
+ * The belonging to a strategy is deduced by an AOSP logic (in sync at native and java layer).
+ *
+ * IMPORTANT NOTE ON TAGS:
+ * To limit the possibilies and prevent from confusion, we expect the String to follow
+ * a given formalism that will be enforced.
+ *
+ * 1 / By convention, tags shall be a "key=value" pair.
+ * Vendor must namespace their tag's key (for example com.google.strategy=VR) to avoid conflicts.
+ * vendor specific applications and must be prefixed by "VX_". Vendor must
+ *
+ * 2 / Tags reported here shall be the same as the tags used to define a given
+ * {@link android.media.audiopolicy.AudioProductStrategy} and so in
+ * audio_policy_engine_configuration.xml file.
  */
 ///////////////////////////////////////////////////////////////////////////////
 // THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
@@ -48,4 +76,7 @@
   oneway void registerGainCallback(in android.hardware.automotive.audiocontrol.IAudioGainCallback callback);
   void setModuleChangeCallback(in android.hardware.automotive.audiocontrol.IModuleChangeCallback callback);
   void clearModuleChangeCallback();
+  android.hardware.automotive.audiocontrol.AudioDeviceConfiguration getAudioDeviceConfiguration();
+  List<android.media.audio.common.AudioPort> getOutputMirroringDevices();
+  List<android.hardware.automotive.audiocontrol.AudioZone> getCarAudioZones();
 }
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/Reasons.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/Reasons.aidl
index c1e22d4..8d66985 100644
--- a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/Reasons.aidl
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/Reasons.aidl
@@ -34,14 +34,14 @@
 package android.hardware.automotive.audiocontrol;
 @Backing(type="int") @VintfStability
 enum Reasons {
-  FORCED_MASTER_MUTE = 1,
-  REMOTE_MUTE = 2,
-  TCU_MUTE = 4,
-  ADAS_DUCKING = 8,
-  NAV_DUCKING = 16,
-  PROJECTION_DUCKING = 32,
-  THERMAL_LIMITATION = 64,
-  SUSPEND_EXIT_VOL_LIMITATION = 128,
-  EXTERNAL_AMP_VOL_FEEDBACK = 256,
-  OTHER = -2147483648,
+  FORCED_MASTER_MUTE = 0x1,
+  REMOTE_MUTE = 0x2,
+  TCU_MUTE = 0x4,
+  ADAS_DUCKING = 0x8,
+  NAV_DUCKING = 0x10,
+  PROJECTION_DUCKING = 0x20,
+  THERMAL_LIMITATION = 0x40,
+  SUSPEND_EXIT_VOL_LIMITATION = 0x80,
+  EXTERNAL_AMP_VOL_FEEDBACK = 0x100,
+  OTHER = 0x80000000,
 }
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/RoutingDeviceConfiguration.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/RoutingDeviceConfiguration.aidl
new file mode 100644
index 0000000..901078c
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/RoutingDeviceConfiguration.aidl
@@ -0,0 +1,40 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+enum RoutingDeviceConfiguration {
+  DEFAULT_AUDIO_ROUTING,
+  DYNAMIC_AUDIO_ROUTING,
+  CONFIGURABLE_AUDIO_ENGINE_ROUTING,
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/TransientFadeConfigurationEntry.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/TransientFadeConfigurationEntry.aidl
new file mode 100644
index 0000000..72b247b
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/TransientFadeConfigurationEntry.aidl
@@ -0,0 +1,39 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable TransientFadeConfigurationEntry {
+  android.media.audio.common.AudioUsage[] transientUsages;
+  android.hardware.automotive.audiocontrol.AudioFadeConfiguration transientFadeConfiguration;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeActivationConfiguration.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeActivationConfiguration.aidl
new file mode 100644
index 0000000..50b76a1
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeActivationConfiguration.aidl
@@ -0,0 +1,39 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable VolumeActivationConfiguration {
+  @nullable String name;
+  List<android.hardware.automotive.audiocontrol.VolumeActivationConfigurationEntry> volumeActivationEntries;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeActivationConfigurationEntry.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeActivationConfigurationEntry.aidl
new file mode 100644
index 0000000..d457e57
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeActivationConfigurationEntry.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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable VolumeActivationConfigurationEntry {
+  android.hardware.automotive.audiocontrol.VolumeInvocationType type = android.hardware.automotive.audiocontrol.VolumeInvocationType.ON_PLAYBACK_CHANGED;
+  int maxActivationVolumePercentage = DEFAULT_MAX_ACTIVATION_VALUE /* 100 */;
+  int minActivationVolumePercentage = DEFAULT_MIN_ACTIVATION_VALUE /* 0 */;
+  const int DEFAULT_MAX_ACTIVATION_VALUE = 100;
+  const int DEFAULT_MIN_ACTIVATION_VALUE = 0;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeGroupConfig.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeGroupConfig.aidl
new file mode 100644
index 0000000..cc90bbe
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeGroupConfig.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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.hardware.automotive.audiocontrol;
+@JavaDerive(equals=true, toString=true) @VintfStability
+parcelable VolumeGroupConfig {
+  String name;
+  int id = UNASSIGNED_ID /* -1 */;
+  List<android.hardware.automotive.audiocontrol.DeviceToContextEntry> carAudioRoutes;
+  @nullable android.hardware.automotive.audiocontrol.VolumeActivationConfiguration activationConfiguration;
+  const int UNASSIGNED_ID = (-1) /* -1 */;
+}
diff --git a/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeInvocationType.aidl b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeInvocationType.aidl
new file mode 100644
index 0000000..8ce8491
--- /dev/null
+++ b/automotive/audiocontrol/aidl/aidl_api/android.hardware.automotive.audiocontrol/current/android/hardware/automotive/audiocontrol/VolumeInvocationType.aidl
@@ -0,0 +1,40 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+enum VolumeInvocationType {
+  ON_PLAYBACK_CHANGED,
+  ON_SOURCE_CHANGED,
+  ON_BOOT,
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.aidl
new file mode 100644
index 0000000..9b5e724
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.RoutingDeviceConfiguration;
+
+/**
+ * Use to configure audio configurations at boot up time.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioDeviceConfiguration {
+    /**
+     * Use to configure audio device routing mechanism
+     */
+    RoutingDeviceConfiguration routingConfig;
+
+    /**
+     * Use to configure core audio volume usage in car audio service
+     */
+    boolean useCoreAudioVolume;
+
+    /**
+     * Use to determine if HAL ducking signal should be sent to audio control HAL from car audio
+     * service
+     */
+    boolean useHalDuckingSignals;
+
+    /**
+     * Use to determine if HAL volume signal should be sent to audio control HAL from car audio
+     * service
+     */
+    boolean useCarVolumeGroupMuting;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl
new file mode 100644
index 0000000..d3181da
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioFadeConfiguration.aidl
@@ -0,0 +1,118 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.FadeConfiguration;
+import android.hardware.automotive.audiocontrol.FadeState;
+import android.media.audio.common.AudioAttributes;
+import android.media.audio.common.AudioContentType;
+import android.media.audio.common.AudioUsage;
+
+/**
+ * Encapsulates the audio fade configuration info
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioFadeConfiguration {
+    /**
+     * Default fade in duration
+     */
+    const long DEFAULT_FADE_IN_DURATION_MS = 1000;
+
+    /**
+     * Default fade out duration
+     */
+    const long DEFAULT_FADE_OUT_DURATION_MS = 2000;
+
+    /**
+     * Default delay for fade in offenders
+     */
+    const long DEFAULT_DELAY_FADE_IN_OFFENDERS_MS = 2000;
+
+    /**
+     * Audio configuration name, use for debugging purposes
+     */
+    String name;
+
+    /**
+     * Audio configuration state
+     */
+    FadeState fadeState;
+
+    /**
+     * Fade in duration in milliseconds
+     *
+     * <p>Use to construct the default fade in configuration. This can be overwritten for different
+     * attributes/usages by passing a list of fade-in configuration,
+     * see {@code #fadeInConfigurations}
+     */
+    long fadeInDurationMs = DEFAULT_FADE_IN_DURATION_MS;
+
+    /**
+     * Fade out duration in milliseconds
+     *
+     * <p>Use to construct the default fade out configuration. This can be overwritten for different
+     * attributes/usages by passing a list of fade-out configuration,
+     * see {@code #fadeOutConfigurations}
+     */
+    long fadeOutDurationMs = DEFAULT_FADE_OUT_DURATION_MS;
+
+    /**
+     * Fade in delayed duration for audio focus offender in milliseconds
+     */
+    long fadeInDelayedForOffendersMs = DEFAULT_DELAY_FADE_IN_OFFENDERS_MS;
+
+    /**
+     * List of audio attribute usage that should be faded using the parameters in
+     * this configuration.
+     *
+     *<p>If the list is empty car audio service will overwrite the list for the confgiruation with
+     * default usages, e.g. {AudioUsage#MEDIA, AudioUsage#GAME}
+     */
+    AudioUsage[] fadeableUsages;
+
+    /**
+     * Optional list of audio attribute content types that should not be faded.
+     *
+     **<p>The list can be empty in cases where there are no unfadeable content types.
+     *
+     *<p>If the list is not set car audio service will overwrite the list for the confgiruation
+     * with default content type, e.g. {AudioContentType#SPEECH}.
+     */
+    @nullable AudioContentType[] unfadeableContentTypes;
+
+    /**
+     * List of audio attribute that should not be faded.
+     *
+     *<p>The list can be empty in cases where there are no unfadeable attributes
+     */
+    List<AudioAttributes> unfadableAudioAttributes;
+
+    /**
+     * List of fade out configutions which should apply to this audio fade configurations
+     *
+     *<p>The list can be empty in cases where there are no fade out configurations.
+     */
+    List<FadeConfiguration> fadeOutConfigurations;
+
+    /**
+     * List of fade in configutions which should apply to this audio fade configurations
+     *
+     *<p>The list can be empty in cases where there are no fade out configurations
+     */
+    List<FadeConfiguration> fadeInConfigurations;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZone.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZone.aidl
new file mode 100644
index 0000000..c90bcfd
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZone.aidl
@@ -0,0 +1,74 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.AudioZoneConfig;
+import android.hardware.automotive.audiocontrol.AudioZoneContext;
+import android.media.audio.common.AudioPort;
+
+/**
+ * Encapsulates the audio configurations for each audio zone
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioZone {
+    /**
+     * Value indicating the primary audio zone
+     */
+    const int PRIMARY_AUDIO_ZONE = 0;
+
+    /**
+     * Value indicating the occupant zone is not assigned.
+     */
+    const int UNASSIGNED_OCCUPANT = -1;
+
+    /**
+     * Audio zone name, only use for debug purposes.
+     *
+     * <p>If present it must be non-empty otherwise car audio service will construct a name
+     * based on audio zone id.
+     */
+    String name;
+
+    /**
+     * Audio zone id use to distiguish between the different audio zones for
+     * volume management, fade, and min/max activation management.
+     */
+    int id;
+
+    /**
+     * Occupant zone id that should be mapped to this audio zone.
+     *
+     * <p>For audio zones not mapped to an occupant zone use UNASSIGNED_OCCUPANT
+     */
+    int occupantZoneId = UNASSIGNED_OCCUPANT;
+
+    /**
+     * Car audio context which can be used in the audio zone
+     */
+    AudioZoneContext audioZoneContext;
+
+    /**
+     * List of car audio configurations
+     */
+    List<AudioZoneConfig> audioZoneConfigs;
+
+    /**
+     * List of input audio devices used for this zone
+     */
+    List<AudioPort> inputAudioDevices;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneConfig.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneConfig.aidl
new file mode 100644
index 0000000..6822da5
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneConfig.aidl
@@ -0,0 +1,51 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.AudioZoneFadeConfiguration;
+import android.hardware.automotive.audiocontrol.VolumeGroupConfig;
+
+/**
+ * Encapsulates the audio zone config information
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioZoneConfig {
+    /**
+     * Audio zone config name
+     *
+     * <p>Must be non-empty and unique among the configurations within a zone.
+     */
+    String name;
+
+    /**
+     * Determines if the audio configuration is the default configuration.
+     *
+     * <p>There can only be a single default configuration per zone.
+     */
+    boolean isDefault;
+
+    /**
+     * List car volume group that should be managed within this configuration
+     */
+    List<VolumeGroupConfig> volumeGroups;
+
+    /**
+     * Car audio zone fade configuration
+     */
+    @nullable AudioZoneFadeConfiguration fadeConfiguration;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneContext.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneContext.aidl
new file mode 100644
index 0000000..390cb09
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneContext.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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.AudioZoneContextInfo;
+
+/**
+ * Encapsulates the list of car audio context info definitions
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioZoneContext {
+    /**
+     * List of car audio context info.
+     *
+     * <p>The list must include all audio attributes usages currently supported so that all audio
+     * attribute usages can be routed for each car audio configuration.
+     */
+    List<AudioZoneContextInfo> audioContextInfos;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneContextInfo.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneContextInfo.aidl
new file mode 100644
index 0000000..0ca425c
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneContextInfo.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.hardware.automotive.audiocontrol;
+
+import android.media.audio.common.AudioAttributes;
+
+/**
+ * Encapsulates groups of audio attributes which should be managed together.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioZoneContextInfo {
+    /**
+     * Value indicating the context info id is not assigned.
+     */
+    const int UNASSIGNED_CONTEXT_ID = -1;
+
+    /**
+     * Context name which can be used to map the info to an audio route
+     * management as described in each audio configuration.
+     *
+     * <P>Name must be non-empty and unique among all audio context info within the same
+     * {@link android.hardware.automotive.audiocontrol.AudioZoneContext} container.
+     */
+    String name;
+
+    /**
+     * Used in car audio service to manage the info
+     *
+     * <P>Must be non-negative integer if assigned, or UNASSIGNED_CONTEXT_ID otherwise. If using
+     * configurable audio policy engine audio routing with multi-zone configurations the value must
+     * be assigned.
+     */
+    int id = UNASSIGNED_CONTEXT_ID;
+
+    /**
+     * List of audio attributes that belong to the context
+     */
+    List<AudioAttributes> audioAttributes;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneFadeConfiguration.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneFadeConfiguration.aidl
new file mode 100644
index 0000000..a604214
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/AudioZoneFadeConfiguration.aidl
@@ -0,0 +1,40 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.AudioFadeConfiguration;
+import android.hardware.automotive.audiocontrol.TransientFadeConfigurationEntry;
+
+/**
+ * Encapsulates the audio zone fade configuration
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable AudioZoneFadeConfiguration {
+    /**
+     * Defines the default fade configuration
+     */
+    AudioFadeConfiguration defaultConfiguration;
+
+    /**
+     * List of transient fade configurations.
+     *
+     * <p>The list can be empty if the fade configuration for the zone does not have transient fade
+     * configurations.
+     */
+    List<TransientFadeConfigurationEntry> transientConfiguration;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/DeviceToContextEntry.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/DeviceToContextEntry.aidl
new file mode 100644
index 0000000..bcb5ee7
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/DeviceToContextEntry.aidl
@@ -0,0 +1,47 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+import android.media.audio.common.AudioPort;
+
+/**
+ * Encapsulates the audio context that should be route to particular device
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable DeviceToContextEntry {
+    /**
+     * List of audio context names that should be routed to the audio device.
+     *
+     * <p>The names must match a {@link AudioZoneContextInfo#name} in the corresponding
+     * {@link AudioZone#audioZoneContext).
+     *
+     * <p>Within a {@link AudioZoneConfig} a context name must not repeat among the different
+     * {@link VolumeGroupConfig}. The value can repeat among different {@link AudioZoneConfig}
+     * within a {@link AudioZone}.
+     */
+    List<String> contextNames;
+
+    /**
+     * Audio port where contexts should be routed.
+     *
+     * <p>For dynamic devices (OUT_HEADSET, OUT_HEADPHONE, etc.) , the audio device address can be
+     * omitted since the information will be obtained at run time when the device is
+     * connected/enabled.
+     */
+    AudioPort device;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/FadeConfiguration.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/FadeConfiguration.aidl
new file mode 100644
index 0000000..e700d6c
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/FadeConfiguration.aidl
@@ -0,0 +1,45 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+import android.media.audio.common.AudioAttributes;
+import android.media.audio.common.AudioUsage;
+
+/**
+ * Encapsulates the in/out fade configuration
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable FadeConfiguration {
+    /**
+     * Fade duration in milliseconds
+     */
+    long fadeDurationMillis;
+
+    @JavaDerive(equals=true, toString=true)
+    @VintfStability
+    union AudioAttributesOrUsage {
+        AudioAttributes fadeAttribute;
+        AudioUsage usage;
+    }
+
+    /**
+     * Audio attribute or usage that should be impacted by the fade out duration
+     * {@code #fadeDurationMillis}
+     */
+    AudioAttributesOrUsage audioAttributesOrUsage;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/FadeState.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/FadeState.aidl
new file mode 100644
index 0000000..346caae
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/FadeState.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.hardware.automotive.audiocontrol;
+
+/**
+ * Encapsulates the audio fade configuration state
+ */
+@VintfStability
+@Backing(type="int")
+@JavaDerive(toString=true)
+enum FadeState {
+    /**
+     * Fade configuration should be disabled
+     */
+    FADE_STATE_DISABLED,
+    /**
+     * Fade configuration should be enabled by default
+     */
+    FADE_STATE_ENABLED_DEFAULT,
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/IAudioControl.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/IAudioControl.aidl
index 9564efc..1202b4c 100644
--- a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/IAudioControl.aidl
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/IAudioControl.aidl
@@ -46,14 +46,17 @@
  * audio_policy_engine_configuration.xml file.
  */
 import android.hardware.audio.common.PlaybackTrackMetadata;
+import android.hardware.automotive.audiocontrol.AudioDeviceConfiguration;
 import android.hardware.automotive.audiocontrol.AudioFocusChange;
 import android.hardware.automotive.audiocontrol.AudioGainConfigInfo;
+import android.hardware.automotive.audiocontrol.AudioZone;
 import android.hardware.automotive.audiocontrol.DuckingInfo;
 import android.hardware.automotive.audiocontrol.IAudioGainCallback;
 import android.hardware.automotive.audiocontrol.IFocusListener;
 import android.hardware.automotive.audiocontrol.IModuleChangeCallback;
 import android.hardware.automotive.audiocontrol.MutingInfo;
 import android.hardware.automotive.audiocontrol.Reasons;
+import android.media.audio.common.AudioPort;
 
 /**
  * Interacts with the car's audio subsystem to manage audio sources and volumes
@@ -206,4 +209,41 @@
      * @throws EX_UNSUPPORTED_OPERATION if dynamic audio configs are not supported.
      */
     void clearModuleChangeCallback();
+
+    /**
+     * Returns the audio device configurations that should be used to configure
+     * the car audio service audio management.
+     *
+     * <p>If this method is not supported, car audio service will attempt to configure the car audio
+     * service properties based on previously supported mechanisms.
+     *
+     * <p>If the returned value contains the
+     * {@link RoutingDeviceConfiguration#DEFAULT_AUDIO_ROUTING} value, the car audio service will
+     * attempt to configure audio routing based on the mechanism previously supported by car audio
+     * service (e.g. car audio configuration file). Otherwise, the {@link #getCarAudioZones()}
+     * API must return valid audio zone(s) configuration(s) for the device.
+     *
+     */
+    AudioDeviceConfiguration getAudioDeviceConfiguration();
+
+    /**
+     * Returns the list of audio devices that can be used for mirroring between different audio
+     * zones.
+     *
+     * @throws EX_UNSUPPORTED_OPERATION if mirroring devices are not supported.
+     */
+    List<AudioPort> getOutputMirroringDevices();
+
+    /**
+     * List of audio zones used to configure car audio service at bootup.
+     *
+     * <p>If the returned value from {@link #getAudioDeviceConfiguration()} contains
+     * {@link RoutingDeviceConfiguration#DEFAULT_AUDIO_ROUTING} value, the car audio service will
+     * attempt to configure the audio routing based on the mechanism previously supported by
+     * car audio service (e.g. car audio configuration file). Otherwise, this method must return
+     * valid audio zone(s) configuration(s) for the device.
+     *
+     * @throws EX_UNSUPPORTED_OPERATION if audio zone configuration are not supported.
+     */
+    List<AudioZone> getCarAudioZones();
 }
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/RoutingDeviceConfiguration.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/RoutingDeviceConfiguration.aidl
new file mode 100644
index 0000000..2d17540
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/RoutingDeviceConfiguration.aidl
@@ -0,0 +1,52 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+/**
+ * Use to configure audio device routing mechanism
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+enum RoutingDeviceConfiguration {
+    /**
+     * Use to indicate that audio should be managed based on previously supportec mechamisms in
+     * car audio service.
+     *
+     * <p>If this used then the API to setup the audio zones can just throw
+     * {@code EX_UNSUPPORTED_OPERATION} if called.
+     */
+    DEFAULT_AUDIO_ROUTING,
+    /**
+     * Use to indicate that audio should be managed using the dynamic audio
+     * policy as setup by car audio service using the setup configuration from
+     * the {@Link android.hardware.automotive.audiocontrol.AudioZone}'s info from audio control HAL.
+     *
+     * <p>If this used then the APIs to setup the audio zones must return a valid audio zone
+     * configuration for the device.
+     */
+    DYNAMIC_AUDIO_ROUTING,
+    /**
+     * Use to indicate that audio should be managed using the core audio
+     * routing as setup by car audio service using the setup configuration from
+     * the {@Link android.hardware.automotive.audiocontrol.AudioZone}'s info from audio control HAL
+     * and the information contained within the configurable audio policy engine.
+     *
+     * <p>If this used then the APIs to setup the audio zone(s) must return valid audio zone
+     * configuration(s) for the device.
+     */
+    CONFIGURABLE_AUDIO_ENGINE_ROUTING,
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/TransientFadeConfigurationEntry.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/TransientFadeConfigurationEntry.aidl
new file mode 100644
index 0000000..1984236
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/TransientFadeConfigurationEntry.aidl
@@ -0,0 +1,38 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.AudioFadeConfiguration;
+import android.media.audio.common.AudioUsage;
+
+/**
+ * Encapsulates the transient audio fade configuration entry.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable TransientFadeConfigurationEntry {
+    /**
+     * List of audio usages gainers that should be used for this configuration entry.
+     */
+    AudioUsage[] transientUsages;
+
+    /**
+     * Defines the transient fade configuration that should be used for the focus interaction with
+     * the usages defined in {@link #transientUsages}
+     */
+    AudioFadeConfiguration transientFadeConfiguration;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeActivationConfiguration.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeActivationConfiguration.aidl
new file mode 100644
index 0000000..edc5f60
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeActivationConfiguration.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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.VolumeActivationConfigurationEntry;
+
+/**
+ * Use to configure audio activiations, only used at boot up time.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable VolumeActivationConfiguration {
+    /**
+     * Configuration name used for debugging purposes to identify config used.
+     *
+     * <p>Is present, it must be non-empty and unique for all volume acvitations, otherwise
+     * car audio service will construct one based on audio zone, configuration and volume group
+     * info.
+     */
+    @nullable String name;
+
+    /**
+     * List of activation configurations.
+     *
+     * <P>Car audio service currently only  uses the first activation config on the list.
+     */
+    List<VolumeActivationConfigurationEntry> volumeActivationEntries;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeActivationConfigurationEntry.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeActivationConfigurationEntry.aidl
new file mode 100644
index 0000000..7072a2c
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeActivationConfigurationEntry.aidl
@@ -0,0 +1,63 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.VolumeInvocationType;
+
+/**
+ * Audio activiation volume configuration entry.
+ *
+ * <p> The entry can defined both the minimum and maximum activation values or only one. The latter
+ * allows activations to occur only on the minimum value or maximum value as configured.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable VolumeActivationConfigurationEntry {
+    /**
+     * Default maximum activation value.
+     */
+    const int DEFAULT_MAX_ACTIVATION_VALUE = 100;
+
+    /**
+     * Default minimum activation value.
+     */
+    const int DEFAULT_MIN_ACTIVATION_VALUE = 0;
+
+    /**
+     * Activation type, should be one of:
+     *  ON_PLAYBACK_CHANGED, ON_SOURCE_CHANGED, ON_BOOT
+     */
+    VolumeInvocationType type = VolumeInvocationType.ON_PLAYBACK_CHANGED;
+
+    /**
+     * Max activation percentage between {@code DEFAULT_MIN_ACTIVATION_VALUE} to
+     * {@code DEFAULT_MAX_ACTIVATION_VALUE} percen.
+     *
+     * <p>The value should be {@code DEFAULT_MAX_ACTIVATION_VALUE} if max activation should not
+     * apply.
+     */
+    int maxActivationVolumePercentage = DEFAULT_MAX_ACTIVATION_VALUE;
+
+    /**
+     * Min activation percentage between {@code DEFAULT_MIN_ACTIVATION_VALUE} to
+     * {@code DEFAULT_MAX_ACTIVATION_VALUE} percent.
+     *
+     * <p>The value should be {@code DEFAULT_MIN_ACTIVATION_VALUE} if min activation should not
+     * apply.
+     */
+    int minActivationVolumePercentage = DEFAULT_MIN_ACTIVATION_VALUE;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeGroupConfig.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeGroupConfig.aidl
new file mode 100644
index 0000000..7e3bc60
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeGroupConfig.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.hardware.automotive.audiocontrol;
+
+import android.hardware.automotive.audiocontrol.DeviceToContextEntry;
+import android.hardware.automotive.audiocontrol.VolumeActivationConfiguration;
+
+/**
+ * Encapsulates the audio volume grouping for audio zone config.
+ */
+@JavaDerive(equals=true, toString=true)
+@VintfStability
+parcelable VolumeGroupConfig {
+    /**
+     * Value indicating the volume group is not assigned an ID.
+     */
+    const int UNASSIGNED_ID = -1;
+
+    /**
+     * Audio zone group name.
+     *
+     * <p>Must be non-empty if using configurable audio policy engine volume management, see
+     * {@code AudioDeviceConfiguration#useCoreAudioVolume} for details.
+     */
+    String name;
+
+    /**
+     * Audio zone group id.
+     *
+     * <p>Must be set if using configurable audio policy engine volume management, can be
+     * {@code #UNASSIGNED_ID} otherwise. See {@code AudioDeviceConfiguration#useCoreAudioVolume}
+     * for details.
+     */
+    int id = UNASSIGNED_ID;
+
+    /**
+     * Entries of audio device to audio context that are managed similarly for this volume group.
+     */
+    List<DeviceToContextEntry> carAudioRoutes;
+
+    /**
+     * Optional volume activation configuration that should be used for this volume group.
+     */
+    @nullable VolumeActivationConfiguration activationConfiguration;
+}
diff --git a/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeInvocationType.aidl b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeInvocationType.aidl
new file mode 100644
index 0000000..0323505
--- /dev/null
+++ b/automotive/audiocontrol/aidl/android/hardware/automotive/audiocontrol/VolumeInvocationType.aidl
@@ -0,0 +1,40 @@
+/*
+ * 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.hardware.automotive.audiocontrol;
+
+/**
+ * Audio activiation type which can be used to activate the min/max
+ * volume changes.
+ */
+@VintfStability
+@Backing(type="int")
+@JavaDerive(toString=true)
+enum VolumeInvocationType {
+    /**
+     * Invocation of volume group activation performed at every playback change.
+     */
+    ON_PLAYBACK_CHANGED,
+    /**
+     * Invocation of volume group activation performed only once at playback after first playback
+     * for a client (app/service UID).
+     */
+    ON_SOURCE_CHANGED,
+    /**
+     * Invocation of volume group activation in perform only at playback once after boot up.
+     */
+    ON_BOOT,
+}
diff --git a/automotive/audiocontrol/aidl/default/Android.bp b/automotive/audiocontrol/aidl/default/Android.bp
index fd7e167..1c11c989 100644
--- a/automotive/audiocontrol/aidl/default/Android.bp
+++ b/automotive/audiocontrol/aidl/default/Android.bp
@@ -31,13 +31,19 @@
         "latest_android_hardware_audio_common_ndk_shared",
         "latest_android_hardware_automotive_audiocontrol_ndk_shared",
         "powerpolicyclient_defaults",
+        "car.audio.configuration.xsd.default",
+        "car.fade.configuration.xsd.default",
     ],
     shared_libs: [
         "android.hardware.audio.common@7.0-enums",
-        "libbase",
         "libbinder_ndk",
         "libcutils",
         "liblog",
+        "libbase",
+        "libxml2",
+        "libutils",
+        "android.hardware.audiocontrol.internal",
+        "libaudio_aidl_conversion_common_ndk",
     ],
     srcs: [
         "AudioControl.cpp",
diff --git a/automotive/audiocontrol/aidl/default/AudioControl.cpp b/automotive/audiocontrol/aidl/default/AudioControl.cpp
index 7e7e145..9ae422b 100644
--- a/automotive/audiocontrol/aidl/default/AudioControl.cpp
+++ b/automotive/audiocontrol/aidl/default/AudioControl.cpp
@@ -19,6 +19,7 @@
 
 #include "AudioControl.h"
 
+#include <aidl/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.h>
 #include <aidl/android/hardware/automotive/audiocontrol/AudioFocusChange.h>
 #include <aidl/android/hardware/automotive/audiocontrol/DuckingInfo.h>
 #include <aidl/android/hardware/automotive/audiocontrol/IFocusListener.h>
@@ -27,8 +28,8 @@
 #include <android-base/parsebool.h>
 #include <android-base/parseint.h>
 #include <android-base/strings.h>
-
 #include <android_audio_policy_configuration_V7_0-enums.h>
+
 #include <private/android_filesystem_config.h>
 
 #include <numeric>
@@ -41,16 +42,18 @@
 using ::android::base::ParseBool;
 using ::android::base::ParseBoolResult;
 using ::android::base::ParseInt;
+using ::android::hardware::audiocontrol::internal::CarAudioConfigurationXmlConverter;
 using ::std::shared_ptr;
 using ::std::string;
 
-namespace xsd {
-using namespace ::android::audio::policy::configuration::V7_0;
+namespace converter {
+using namespace ::android::hardware::audiocontrol::internal;
 }
 
+namespace api = aidl::android::hardware::automotive::audiocontrol;
+namespace xsd = ::android::audio::policy::configuration::V7_0;
+
 namespace {
-const float kLowerBound = -1.0f;
-const float kUpperBound = 1.0f;
 bool checkCallerHasWritePermissions(int fd) {
     // Double check that's only called by root - it should be be blocked at debug() level,
     // but it doesn't hurt to make sure...
@@ -62,7 +65,7 @@
 }
 
 bool isValidValue(float value) {
-    return (value >= kLowerBound) && (value <= kUpperBound);
+    return (value >= -1.0f) && (value <= 1.0f);
 }
 
 bool safelyParseInt(string s, int* out) {
@@ -71,6 +74,53 @@
     }
     return true;
 }
+
+std::string formatDump(const std::string& input) {
+    const char kSpacer = ' ';
+    std::string output;
+    int indentLevel = 0;
+    bool newLine = false;
+
+    for (char c : input) {
+        switch (c) {
+            case '{':
+                if (!newLine) {
+                    output += '\n';
+                }
+                newLine = true;
+                indentLevel++;
+                for (int i = 0; i < indentLevel; ++i) {
+                    output += kSpacer;
+                }
+                break;
+            case '}':
+                if (!newLine) {
+                    output += '\n';
+                }
+                newLine = true;
+                indentLevel--;
+                for (int i = 0; i < indentLevel; ++i) {
+                    output += kSpacer;
+                }
+                break;
+            case ',':
+                if (!newLine) {
+                    output += '\n';
+                }
+                newLine = true;
+                for (int i = 0; i < indentLevel; ++i) {
+                    output += kSpacer;
+                }
+                break;
+            default:
+                newLine = false;
+                output += c;
+        }
+    }
+
+    return output;
+}
+
 }  // namespace
 
 namespace {
@@ -90,6 +140,9 @@
 using ::aidl::android::media::audio::common::AudioProfile;
 using ::aidl::android::media::audio::common::PcmType;
 
+const static std::string kAudioConfigFile = "/vendor/etc/car_audio_configuration.xml";
+const static std::string kFadeConfigFile = "/vendor/etc/car_audio_fade_configuration.xml";
+
 // reuse common code artifacts
 void fillProfile(const std::vector<int32_t>& channelLayouts,
                  const std::vector<int32_t>& sampleRates, AudioProfile* profile) {
@@ -162,6 +215,12 @@
 }
 }  // namespace
 
+AudioControl::AudioControl() : AudioControl(kAudioConfigFile, kFadeConfigFile) {}
+
+AudioControl::AudioControl(const std::string& carAudioConfig, const std::string& audioFadeConfig)
+    : mCarAudioConfigurationConverter(std::make_shared<CarAudioConfigurationXmlConverter>(
+              carAudioConfig, audioFadeConfig)) {}
+
 ndk::ScopedAStatus AudioControl::registerFocusListener(
         const shared_ptr<IFocusListener>& in_listener) {
     LOG(DEBUG) << "registering focus listener";
@@ -245,14 +304,23 @@
 static inline std::string toString(const std::vector<aidl_type>& in_values) {
     return std::accumulate(std::begin(in_values), std::end(in_values), std::string{},
                            [](const std::string& ls, const aidl_type& rs) {
-                               return ls + (ls.empty() ? "" : ",") + rs.toString();
+                               return ls + (ls.empty() ? "" : ", ") + rs.toString();
                            });
 }
 template <typename aidl_enum_type>
 static inline std::string toEnumString(const std::vector<aidl_enum_type>& in_values) {
     return std::accumulate(std::begin(in_values), std::end(in_values), std::string{},
                            [](const std::string& ls, const aidl_enum_type& rs) {
-                               return ls + (ls.empty() ? "" : ",") + toString(rs);
+                               return ls + (ls.empty() ? "" : ", ") + toString(rs);
+                           });
+}
+
+template <typename aidl_type>
+static inline std::string toString(const std::vector<std::optional<aidl_type>>& in_values) {
+    return std::accumulate(std::begin(in_values), std::end(in_values), std::string{},
+                           [](const std::string& ls, const std::optional<aidl_type>& rs) {
+                               return ls + (ls.empty() ? "" : ", ") +
+                                      (rs.has_value() ? rs.value().toString() : "empty");
                            });
 }
 
@@ -309,6 +377,50 @@
     return ndk::ScopedAStatus::ok();
 }
 
+ndk::ScopedAStatus AudioControl::getAudioDeviceConfiguration(
+        AudioDeviceConfiguration* audioDeviceConfig) {
+    if (!audioDeviceConfig) {
+        LOG(ERROR) << __func__ << "Audio device configuration must not be null";
+        return ndk::ScopedAStatus::fromStatus(STATUS_UNEXPECTED_NULL);
+    }
+    if (!mCarAudioConfigurationConverter) {
+        return ndk::ScopedAStatus::ok();
+    }
+    const auto& innerDeviceConfig = mCarAudioConfigurationConverter->getAudioDeviceConfiguration();
+    audioDeviceConfig->routingConfig = innerDeviceConfig.routingConfig;
+    audioDeviceConfig->useCoreAudioVolume = innerDeviceConfig.useCoreAudioVolume;
+    audioDeviceConfig->useCarVolumeGroupMuting = innerDeviceConfig.useCarVolumeGroupMuting;
+    audioDeviceConfig->useHalDuckingSignals = innerDeviceConfig.useHalDuckingSignals;
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus AudioControl::getOutputMirroringDevices(
+        std::vector<AudioPort>* mirroringDevices) {
+    if (!mirroringDevices) {
+        LOG(ERROR) << __func__ << "Mirroring devices must not be null";
+        return ndk::ScopedAStatus::fromStatus(STATUS_UNEXPECTED_NULL);
+    }
+    if (!mCarAudioConfigurationConverter || !mCarAudioConfigurationConverter->getErrors().empty()) {
+        return ndk::ScopedAStatus::ok();
+    }
+    const auto& innerDevice = mCarAudioConfigurationConverter->getOutputMirroringDevices();
+    mirroringDevices->insert(mirroringDevices->end(), innerDevice.begin(), innerDevice.end());
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus AudioControl::getCarAudioZones(std::vector<AudioZone>* audioZones) {
+    if (!audioZones) {
+        LOG(ERROR) << __func__ << "Audio zones must not be null";
+        return ndk::ScopedAStatus::fromStatus(STATUS_UNEXPECTED_NULL);
+    }
+    if (!mCarAudioConfigurationConverter || !mCarAudioConfigurationConverter->getErrors().empty()) {
+        return ndk::ScopedAStatus::ok();
+    }
+    const auto& innerZones = mCarAudioConfigurationConverter->getAudioZones();
+    audioZones->insert(audioZones->end(), innerZones.begin(), innerZones.end());
+    return ndk::ScopedAStatus::ok();
+}
+
 binder_status_t AudioControl::dump(int fd, const char** args, uint32_t numArgs) {
     if (numArgs == 0) {
         return dumpsys(fd);
@@ -342,6 +454,25 @@
         dprintf(fd, "Focus listener registered\n");
     }
     dprintf(fd, "AudioGainCallback %sregistered\n", (mAudioGainCallback == nullptr ? "NOT " : ""));
+
+    AudioDeviceConfiguration configuration;
+    if (getAudioDeviceConfiguration(&configuration).isOk()) {
+        dprintf(fd, "AudioDeviceConfiguration: %s\n", configuration.toString().c_str());
+    }
+    std::vector<AudioZone> audioZones;
+    if (getCarAudioZones(&audioZones).isOk()) {
+        dprintf(fd, "Audio zones count: %zu\n", audioZones.size());
+        for (const auto& zone : audioZones) {
+            dprintf(fd, "AudioZone: %s\n", formatDump(zone.toString()).c_str());
+        }
+    }
+    std::vector<AudioPort> mirroringDevices;
+    if (getOutputMirroringDevices(&mirroringDevices).isOk()) {
+        dprintf(fd, "Mirroring devices count: %zu\n", mirroringDevices.size());
+        for (const auto& device : mirroringDevices) {
+            dprintf(fd, "Mirroring device: %s\n", formatDump(device.toString()).c_str());
+        }
+    }
     return STATUS_OK;
 }
 
diff --git a/automotive/audiocontrol/aidl/default/AudioControl.h b/automotive/audiocontrol/aidl/default/AudioControl.h
index 7eca446..0425570 100644
--- a/automotive/audiocontrol/aidl/default/AudioControl.h
+++ b/automotive/audiocontrol/aidl/default/AudioControl.h
@@ -35,13 +35,17 @@
 #include <aidl/android/media/audio/common/AudioIoFlags.h>
 #include <aidl/android/media/audio/common/AudioOutputFlags.h>
 
+#include "converter/include/CarAudioConfigurationXmlConverter.h"
+
 namespace aidl::android::hardware::automotive::audiocontrol {
 
-namespace audiohalcommon = ::aidl::android::hardware::audio::common;
 namespace audiomediacommon = ::aidl::android::media::audio::common;
+namespace audiohalcommon = ::aidl::android::hardware::audio::common;
 
 class AudioControl : public BnAudioControl {
   public:
+    AudioControl();
+    AudioControl(const std::string& carAudioConfig, const std::string& audioFadeConfig);
     ndk::ScopedAStatus onAudioFocusChange(const std::string& in_usage, int32_t in_zoneId,
                                           AudioFocusChange in_focusChange) override;
     ndk::ScopedAStatus onDevicesToDuckChange(
@@ -63,6 +67,11 @@
     ndk::ScopedAStatus setModuleChangeCallback(
             const std::shared_ptr<IModuleChangeCallback>& in_callback) override;
     ndk::ScopedAStatus clearModuleChangeCallback() override;
+    ndk::ScopedAStatus getAudioDeviceConfiguration(
+            AudioDeviceConfiguration* audioDeviceConfig) override;
+    ndk::ScopedAStatus getOutputMirroringDevices(
+            std::vector<::aidl::android::media::audio::common::AudioPort>* mirrorDevices) override;
+    ndk::ScopedAStatus getCarAudioZones(std::vector<AudioZone>* audioZones) override;
 
     binder_status_t dump(int fd, const char** args, uint32_t numArgs) override;
 
@@ -81,6 +90,9 @@
 
     std::shared_ptr<IModuleChangeCallback> mModuleChangeCallback = nullptr;
 
+    std::shared_ptr<::android::hardware::audiocontrol::internal::CarAudioConfigurationXmlConverter>
+            mCarAudioConfigurationConverter = nullptr;
+
     binder_status_t cmdHelp(int fd) const;
     binder_status_t cmdRequestFocus(int fd, const char** args, uint32_t numArgs);
     binder_status_t cmdAbandonFocus(int fd, const char** args, uint32_t numArgs);
diff --git a/automotive/audiocontrol/aidl/default/audiocontrol-default.xml b/automotive/audiocontrol/aidl/default/audiocontrol-default.xml
index bcb5669..ffef7fc 100644
--- a/automotive/audiocontrol/aidl/default/audiocontrol-default.xml
+++ b/automotive/audiocontrol/aidl/default/audiocontrol-default.xml
@@ -1,7 +1,7 @@
 <manifest version="2.0" type="device">
     <hal format="aidl">
         <name>android.hardware.automotive.audiocontrol</name>
-        <version>4</version>
+        <version>5</version>
         <fqname>IAudioControl/default</fqname>
     </hal>
 </manifest>
diff --git a/automotive/audiocontrol/aidl/default/converter/Android.bp b/automotive/audiocontrol/aidl/default/converter/Android.bp
new file mode 100644
index 0000000..c00afa2
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/Android.bp
@@ -0,0 +1,56 @@
+// 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 {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_interfaces_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+cc_library {
+    name: "android.hardware.audiocontrol.internal",
+    vendor: true,
+    srcs: [
+        "src/CarAudioConfigurationXmlConverter.cpp",
+        "src/CarAudioConfigurationUtils.cpp",
+    ],
+    export_include_dirs: [
+        "include",
+    ],
+    defaults: [
+        "latest_android_hardware_audio_common_ndk_static",
+        "latest_android_hardware_automotive_audiocontrol_ndk_shared",
+        "car.audio.configuration.xsd.default",
+        "car.fade.configuration.xsd.default",
+        "aidlaudioservice_defaults",
+        "latest_android_media_audio_common_types_ndk_static",
+    ],
+    shared_libs: [
+        "libbase",
+        "libutils",
+        "libmedia_helper",
+        "car.audio.configuration.xsd.default",
+        "car.fade.configuration.xsd.default",
+        "liblog",
+    ],
+    static_libs: [
+        "libaudio_aidl_conversion_common_ndk_cpp",
+    ],
+    header_libs: [
+        "libaudio_system_headers",
+    ],
+}
diff --git a/automotive/audiocontrol/aidl/default/converter/include/CarAudioConfigurationUtils.h b/automotive/audiocontrol/aidl/default/converter/include/CarAudioConfigurationUtils.h
new file mode 100644
index 0000000..29fec0b
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/include/CarAudioConfigurationUtils.h
@@ -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.
+ */
+
+#ifndef ANDROID_HARDWARE_AUDIOCONTROL_INTERNAL_CONFIGURATION_UTILS_H
+#define ANDROID_HARDWARE_AUDIOCONTROL_INTERNAL_CONFIGURATION_UTILS_H
+
+#include <string>
+
+#include <aidl/android/hardware/automotive/audiocontrol/AudioZoneContext.h>
+#include <aidl/android/hardware/automotive/audiocontrol/AudioZoneContextInfo.h>
+
+namespace android {
+namespace hardware {
+namespace audiocontrol {
+namespace internal {
+
+::aidl::android::hardware::automotive::audiocontrol::AudioZoneContext getDefaultCarAudioContext();
+
+}  // namespace internal
+}  // namespace audiocontrol
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_AUDIOCONTROL_INTERNAL_CONFIGURATION_UTILS_H
diff --git a/automotive/audiocontrol/aidl/default/converter/include/CarAudioConfigurationXmlConverter.h b/automotive/audiocontrol/aidl/default/converter/include/CarAudioConfigurationXmlConverter.h
new file mode 100644
index 0000000..ed29172
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/include/CarAudioConfigurationXmlConverter.h
@@ -0,0 +1,87 @@
+/*
+ * 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.
+ */
+
+#ifndef MAIN8_CARAUDIOCONFIGURATIONXMLCONVERTER_H
+#define MAIN8_CARAUDIOCONFIGURATIONXMLCONVERTER_H
+
+#include <string>
+
+#include "../include/CarAudioConfigurationUtils.h"
+
+#include <aidl/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.h>
+#include <aidl/android/hardware/automotive/audiocontrol/AudioZone.h>
+#include <aidl/android/hardware/automotive/audiocontrol/AudioZoneContext.h>
+
+namespace android::hardware::automotive::audiocontrol {
+class CarAudioConfigurationType;
+}
+
+namespace android {
+namespace hardware {
+namespace audiocontrol {
+namespace internal {
+
+class CarAudioConfigurationXmlConverter {
+  public:
+    explicit CarAudioConfigurationXmlConverter(const std::string& audioConfigFile,
+                                               const std::string& fadeConfigFile)
+        : mAudioConfigFile(audioConfigFile), mFadeConfigFile(fadeConfigFile) {
+        init();
+    }
+
+    ::aidl::android::hardware::automotive::audiocontrol::AudioDeviceConfiguration
+    getAudioDeviceConfiguration() const;
+
+    std::vector<::aidl::android::hardware::automotive::audiocontrol::AudioZone> getAudioZones()
+            const;
+    std::vector<::aidl::android::media::audio::common::AudioPort> getOutputMirroringDevices() const;
+
+    const std::string getErrors() const { return mParseErrors; }
+
+  private:
+    void init();
+    void initNonDynamicRouting();
+    void initFadeConfigurations();
+    void initAudioDeviceConfiguration(
+            const ::android::hardware::automotive::audiocontrol::CarAudioConfigurationType&
+                    carAudioConfigurationType);
+    void initCarAudioConfigurations(
+            const ::android::hardware::automotive::audiocontrol::CarAudioConfigurationType&
+                    carAudioConfigurationType);
+    void parseAudioDeviceConfigurations(
+            const ::android::hardware::automotive::audiocontrol::CarAudioConfigurationType&
+                    carAudioConfigurationType);
+
+    const std::string mAudioConfigFile;
+    const std::string mFadeConfigFile;
+    ::aidl::android::hardware::automotive::audiocontrol::AudioDeviceConfiguration
+            mAudioDeviceConfiguration;
+    std::optional<::aidl::android::hardware::automotive::audiocontrol::AudioZoneContext>
+            mAudioZoneContext;
+    std::vector<::aidl::android::hardware::automotive::audiocontrol::AudioZone> mAudioZones;
+    std::vector<::aidl::android::media::audio::common::AudioPort> mOutputMirroringDevices;
+    std::string mParseErrors;
+    std::unordered_map<std::string,
+                       ::aidl::android::hardware::automotive::audiocontrol::AudioFadeConfiguration>
+            mFadeConfigurations;
+};
+
+}  // namespace internal
+}  // namespace audiocontrol
+}  // namespace hardware
+}  // namespace android
+
+#endif  // MAIN8_CARAUDIOCONFIGURATIONXMLCONVERTER_H
diff --git a/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationUtils.cpp b/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationUtils.cpp
new file mode 100644
index 0000000..e2f8191
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationUtils.cpp
@@ -0,0 +1,104 @@
+/*
+ * 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.
+ */
+
+#include <android-base/logging.h>
+
+#include "../include/CarAudioConfigurationUtils.h"
+
+#include <aidl/android/media/audio/common/AudioAttributes.h>
+#include <aidl/android/media/audio/common/AudioUsage.h>
+
+#include <tuple>
+#include <vector>
+
+using ::aidl::android::hardware::automotive::audiocontrol::AudioZoneContext;
+using ::aidl::android::hardware::automotive::audiocontrol::AudioZoneContextInfo;
+
+using aidl::android::media::audio::common::AudioAttributes;
+using aidl::android::media::audio::common::AudioUsage;
+using aidl::android::media::audio::common::AudioUsage::ALARM;
+using aidl::android::media::audio::common::AudioUsage::ANNOUNCEMENT;
+using aidl::android::media::audio::common::AudioUsage::ASSISTANCE_ACCESSIBILITY;
+using aidl::android::media::audio::common::AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE;
+using aidl::android::media::audio::common::AudioUsage::ASSISTANCE_SONIFICATION;
+using aidl::android::media::audio::common::AudioUsage::ASSISTANT;
+using aidl::android::media::audio::common::AudioUsage::CALL_ASSISTANT;
+using aidl::android::media::audio::common::AudioUsage::EMERGENCY;
+using aidl::android::media::audio::common::AudioUsage::GAME;
+using aidl::android::media::audio::common::AudioUsage::MEDIA;
+using aidl::android::media::audio::common::AudioUsage::NOTIFICATION;
+using aidl::android::media::audio::common::AudioUsage::NOTIFICATION_EVENT;
+using aidl::android::media::audio::common::AudioUsage::NOTIFICATION_TELEPHONY_RINGTONE;
+using aidl::android::media::audio::common::AudioUsage::SAFETY;
+using aidl::android::media::audio::common::AudioUsage::UNKNOWN;
+using aidl::android::media::audio::common::AudioUsage::VEHICLE_STATUS;
+using aidl::android::media::audio::common::AudioUsage::VOICE_COMMUNICATION;
+using aidl::android::media::audio::common::AudioUsage::VOICE_COMMUNICATION_SIGNALLING;
+
+namespace android {
+namespace hardware {
+namespace audiocontrol {
+namespace internal {
+
+std::vector<AudioAttributes> createAudioAttributes(const std::vector<AudioUsage>& usages) {
+    std::vector<AudioAttributes> audioAttributes;
+    for (const auto& usage : usages) {
+        AudioAttributes attributes;
+        attributes.usage = usage;
+        audioAttributes.push_back(attributes);
+    }
+    return audioAttributes;
+}
+
+AudioZoneContextInfo createAudioZoneContextInfo(const std::string& name, int id,
+                                                const std::vector<AudioUsage>& usages) {
+    AudioZoneContextInfo info;
+    info.name = name;
+    info.id = id;
+    info.audioAttributes = createAudioAttributes(usages);
+    return info;
+}
+
+AudioZoneContext createAudioZoneContextInfo(const std::vector<AudioZoneContextInfo>& info) {
+    AudioZoneContext context;
+    context.audioContextInfos.insert(context.audioContextInfos.begin(), info.begin(), info.end());
+    return context;
+}
+
+AudioZoneContext getDefaultCarAudioContext() {
+    // For legacy reasons, context names are lower case here.
+    static const AudioZoneContext kDefaultContext = createAudioZoneContextInfo(
+            {createAudioZoneContextInfo("music", 1, {UNKNOWN, MEDIA, GAME}),
+             createAudioZoneContextInfo("navigation", 2, {ASSISTANCE_NAVIGATION_GUIDANCE}),
+             createAudioZoneContextInfo("voice_command", 3, {ASSISTANCE_ACCESSIBILITY, ASSISTANT}),
+             createAudioZoneContextInfo("call_ring", 4, {NOTIFICATION_TELEPHONY_RINGTONE}),
+             createAudioZoneContextInfo(
+                     "call", 5,
+                     {VOICE_COMMUNICATION, CALL_ASSISTANT, VOICE_COMMUNICATION_SIGNALLING}),
+             createAudioZoneContextInfo("alarm", 6, {ALARM}),
+             createAudioZoneContextInfo("notification", 7, {NOTIFICATION, NOTIFICATION_EVENT}),
+             createAudioZoneContextInfo("system_sound", 8, {ASSISTANCE_SONIFICATION}),
+             createAudioZoneContextInfo("emergency", 9, {EMERGENCY}),
+             createAudioZoneContextInfo("safety", 10, {SAFETY}),
+             createAudioZoneContextInfo("vehicle_status", 11, {VEHICLE_STATUS}),
+             createAudioZoneContextInfo("announcement", 12, {ANNOUNCEMENT})});
+    return kDefaultContext;
+}
+
+}  // namespace internal
+}  // namespace audiocontrol
+}  // namespace hardware
+}  // namespace android
diff --git a/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp b/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp
new file mode 100644
index 0000000..d43b595
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp
@@ -0,0 +1,1134 @@
+/*
+ * 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 "AudioControl::XSD_Converter"
+
+#define LOG_NDEBUG 0
+#include <android-base/logging.h>
+
+#include "../include/CarAudioConfigurationXmlConverter.h"
+
+#include <aidl/android/hardware/automotive/audiocontrol/RoutingDeviceConfiguration.h>
+#include <android-base/parsebool.h>
+#include <android_hardware_automotive_audiocontrol.h>
+#include <android_hardware_automotive_audiocontrol_fade.h>
+
+#include <android-base/parseint.h>
+#include <android-base/strings.h>
+#include <media/AidlConversionCppNdk.h>
+#include <media/TypeConverter.h>
+#include <media/convert.h>
+#include <system/audio.h>
+#include <unistd.h>
+#include <unordered_map>
+
+namespace android {
+namespace hardware {
+namespace audiocontrol {
+namespace internal {
+namespace xsd = ::android::hardware::automotive::audiocontrol;
+namespace fade = android::hardware::automotive::audiocontrol::fade;
+namespace api = ::aidl::android::hardware::automotive::audiocontrol;
+
+using aidl::android::media::audio::common::AudioAttributes;
+using aidl::android::media::audio::common::AudioContentType;
+using aidl::android::media::audio::common::AudioDevice;
+using aidl::android::media::audio::common::AudioDeviceAddress;
+using aidl::android::media::audio::common::AudioDeviceDescription;
+using aidl::android::media::audio::common::AudioDeviceType;
+using aidl::android::media::audio::common::AudioPort;
+using aidl::android::media::audio::common::AudioPortDeviceExt;
+using aidl::android::media::audio::common::AudioPortExt;
+using aidl::android::media::audio::common::AudioUsage;
+
+using namespace ::android::base;
+
+namespace {
+
+static const std::string kUseCoreRouting{"useCoreAudioRouting"};
+static const std::string kUseCoreVolume{"useCoreAudioVolume"};
+static const std::string kUseHalDuckingSignals{"useHalDuckingSignals"};
+static const std::string kUseCarVolumeGroupMuting{"useCarVolumeGroupMuting"};
+
+static constexpr char kOutBusType[] = "AUDIO_DEVICE_OUT_BUS";
+static constexpr char kInBusType[] = "AUDIO_DEVICE_IN_BUS";
+
+using ActivationMap = std::unordered_map<std::string, api::VolumeActivationConfiguration>;
+using FadeConfigurationMap = std::unordered_map<
+        std::string, ::aidl::android::hardware::automotive::audiocontrol::AudioFadeConfiguration>;
+
+inline bool isReadableConfigurationFile(const std::string& filePath) {
+    return !filePath.empty() && filePath.ends_with(".xml") && (access(filePath.c_str(), R_OK) == 0);
+}
+
+inline bool parseBoolOrDefaultIfFailed(const std::string& value, bool defaultValue) {
+    ParseBoolResult results = ParseBool(value);
+    return results == ParseBoolResult::kError ? defaultValue : results == ParseBoolResult::kTrue;
+}
+
+void parseCoreRoutingInfo(const std::string& value, api::AudioDeviceConfiguration& config) {
+    if (!parseBoolOrDefaultIfFailed(value, /* defaultValue= */ false)) {
+        return;
+    }
+    config.routingConfig = api::RoutingDeviceConfiguration::CONFIGURABLE_AUDIO_ENGINE_ROUTING;
+}
+
+void parseCoreVolumeInfo(const std::string& value, api::AudioDeviceConfiguration& config) {
+    config.useCoreAudioVolume = parseBoolOrDefaultIfFailed(value, config.useCoreAudioVolume);
+}
+
+void parseHalDuckingInfo(const std::string& value, api::AudioDeviceConfiguration& config) {
+    config.useHalDuckingSignals = parseBoolOrDefaultIfFailed(value, config.useHalDuckingSignals);
+}
+
+void parseHalMutingInfo(const std::string& value, api::AudioDeviceConfiguration& config) {
+    config.useCarVolumeGroupMuting =
+            parseBoolOrDefaultIfFailed(value, config.useCarVolumeGroupMuting);
+}
+
+bool parseAudioAttributeUsageString(const std::string& usageString, AudioUsage& usage) {
+    audio_usage_t legacyUsage;
+    if (!::android::UsageTypeConverter::fromString(usageString, legacyUsage)) {
+        LOG(ERROR) << __func__ << " could not parse usage from string " << usageString;
+        return false;
+    }
+    ConversionResult<AudioUsage> result =
+            ::aidl::android::legacy2aidl_audio_usage_t_AudioUsage(legacyUsage);
+    if (!result.ok()) {
+        LOG(ERROR) << __func__ << " could not parse usage legacy type " << legacyUsage;
+        return false;
+    }
+    usage = result.value();
+    return true;
+}
+
+bool parseAudioAttributeUsage(const xsd::UsageType& usageType, AudioAttributes& attributes) {
+    if (!usageType.hasValue()) {
+        LOG(ERROR) << __func__ << " usage does not have value";
+        return false;
+    }
+    if (!parseAudioAttributeUsageString(xsd::toString(usageType.getValue()), attributes.usage)) {
+        return false;
+    }
+    return true;
+}
+
+bool parseAudioAttributesUsages(const std::vector<xsd::UsageType>& usages,
+                                std::vector<AudioAttributes>& audioAttributes) {
+    for (const auto& xsdUsage : usages) {
+        AudioAttributes attributes;
+        if (!parseAudioAttributeUsage(xsdUsage, attributes)) {
+            return false;
+        }
+        audioAttributes.push_back(attributes);
+    }
+    return true;
+}
+
+bool parseContentTypeString(const std::string& typeString, AudioContentType& type) {
+    audio_content_type_t legacyContentType;
+    if (!::android::AudioContentTypeConverter::fromString(typeString, legacyContentType)) {
+        LOG(ERROR) << __func__ << " could not parse content type from string " << typeString;
+        return false;
+    }
+    ConversionResult<AudioContentType> result =
+            ::aidl::android::legacy2aidl_audio_content_type_t_AudioContentType(legacyContentType);
+    if (!result.ok()) {
+        LOG(ERROR) << __func__ << " could not convert legacy content type " << legacyContentType;
+        return false;
+    }
+    type = result.value();
+    return true;
+}
+
+bool parseAudioAttribute(const xsd::AttributesType& attributesType, AudioAttributes& attributes) {
+    if (attributesType.hasUsage()) {
+        if (!parseAudioAttributeUsageString(xsd::toString(attributesType.getUsage()),
+                                            attributes.usage)) {
+            LOG(ERROR) << __func__ << " could not parse audio usage: "
+                       << xsd::toString(attributesType.getUsage());
+            return false;
+        }
+    }
+
+    if (attributesType.hasContentType()) {
+        if (!parseContentTypeString(xsd::toString(attributesType.getContentType()),
+                                    attributes.contentType)) {
+            return false;
+        }
+    }
+
+    if (attributesType.hasTags()) {
+        attributes.tags.push_back(attributesType.getTags());
+    }
+    return true;
+}
+
+bool parseAudioAttributes(const std::vector<xsd::AttributesType>& xsdAttributes,
+                          std::vector<AudioAttributes>& audioAttributes) {
+    for (const auto& xsdAttribute : xsdAttributes) {
+        AudioAttributes attribute;
+        if (!parseAudioAttribute(xsdAttribute, attribute)) {
+            return false;
+        }
+        audioAttributes.push_back(attribute);
+    }
+    return true;
+}
+
+bool parseAudioAttributes(const xsd::AudioAttributesUsagesType& xsdAttributeOrUsages,
+                          std::vector<AudioAttributes>& audioAttributes) {
+    if (xsdAttributeOrUsages.hasUsage_optional()) {
+        if (!parseAudioAttributesUsages(xsdAttributeOrUsages.getUsage_optional(),
+                                        audioAttributes)) {
+            LOG(ERROR) << __func__ << " could not parse audio usages";
+            return false;
+        }
+    }
+
+    if (xsdAttributeOrUsages.hasAudioAttribute_optional()) {
+        if (!parseAudioAttributes(xsdAttributeOrUsages.getAudioAttribute_optional(),
+                                  audioAttributes)) {
+            LOG(ERROR) << __func__ << " could not parse audio attributes";
+            return false;
+        }
+    }
+    return true;
+}
+
+bool parseAudioContext(const xsd::OemContextType& xsdContextInfo,
+                       api::AudioZoneContextInfo& contextInfo) {
+    if (!xsdContextInfo.hasName()) {
+        LOG(ERROR) << __func__ << " Audio context info missing name";
+        return false;
+    }
+
+    contextInfo.name = xsdContextInfo.getName();
+
+    if (xsdContextInfo.hasId()) {
+        ParseInt(xsdContextInfo.getId().c_str(), &contextInfo.id);
+    }
+
+    if (xsdContextInfo.hasAudioAttributes()) {
+        if (!parseAudioAttributes(*xsdContextInfo.getFirstAudioAttributes(),
+                                  contextInfo.audioAttributes)) {
+            return false;
+        }
+    }
+
+    return true;
+}
+
+bool parseAudioContexts(const xsd::OemContextsType* xsdContexts, api::AudioZoneContext& context) {
+    if (!xsdContexts->hasOemContext()) {
+        return false;
+    }
+    const auto xsdContextInfos = xsdContexts->getOemContext();
+    for (const auto& xsdContextInfo : xsdContextInfos) {
+        api::AudioZoneContextInfo info;
+        if (!parseAudioContext(xsdContextInfo, info)) {
+            continue;
+        }
+        context.audioContextInfos.push_back(info);
+    }
+    return true;
+}
+
+bool createAudioDevice(const std::string& address, const std::string& type, AudioPort& port) {
+    audio_devices_t legacyDeviceType = AUDIO_DEVICE_NONE;
+    ::android::DeviceConverter::fromString(type, legacyDeviceType);
+    std::string tempString;
+    ::android::DeviceConverter::toString(legacyDeviceType, tempString);
+    ConversionResult<AudioDeviceDescription> result =
+            ::aidl::android::legacy2aidl_audio_devices_t_AudioDeviceDescription(legacyDeviceType);
+    if (legacyDeviceType == AUDIO_DEVICE_NONE || !result.ok()) {
+        LOG(ERROR) << __func__ << " could not parse legacy device type";
+        return false;
+    }
+    AudioDevice device;
+    if (!address.empty()) {
+        device.address = AudioDeviceAddress::make<AudioDeviceAddress::Tag::id>(address);
+    }
+    device.type = result.value();
+
+    port.ext = AudioPortExt::make<AudioPortExt::Tag::device>(device);
+
+    return true;
+}
+
+std::string outTypeToOutAudioDevice(const std::string& device) {
+    const static std::unordered_map<std::string, std::string> typeToOutDevice{
+            {"TYPE_BUILTIN_SPEAKER", "AUDIO_DEVICE_OUT_SPEAKER"},
+            {"TYPE_WIRED_HEADSET", "AUDIO_DEVICE_OUT_WIRED_HEADSET"},
+            {"TYPE_WIRED_HEADPHONES", "AUDIO_DEVICE_OUT_WIRED_HEADPHONE,"},
+            {"TYPE_BLUETOOTH_A2DP", "AUDIO_DEVICE_OUT_BLUETOOTH_A2DP"},
+            {"TYPE_HDMI", "AUDIO_DEVICE_OUT_HDMI"},
+            {"TYPE_USB_ACCESSORY", "AUDIO_DEVICE_OUT_USB_ACCESSORY"},
+            {"TYPE_USB_DEVICE", "AUDIO_DEVICE_OUT_USB_DEVICE,"},
+            {"TYPE_USB_HEADSET", "AUDIO_DEVICE_OUT_USB_HEADSET"},
+            {"TYPE_AUX_LINE", "AUDIO_DEVICE_OUT_AUX_LINE"},
+            {"TYPE_BUS", "AUDIO_DEVICE_OUT_BUS"},
+            {"TYPE_BLE_HEADSET", "AUDIO_DEVICE_OUT_BLE_HEADSET"},
+            {"TYPE_BLE_SPEAKER", "AUDIO_DEVICE_OUT_BLE_SPEAKER"},
+            {"TYPE_BLE_BROADCAST", "AUDIO_DEVICE_OUT_BLE_BROADCAST"},
+    };
+
+    if (!device.starts_with("TYPE_")) {
+        return device;
+    }
+
+    const auto it = typeToOutDevice.find(device);
+    return it != typeToOutDevice.end() ? it->second : device;
+}
+
+bool parseAudioDeviceToContexts(const xsd::DeviceRoutesType& deviceRoutesType,
+                                api::DeviceToContextEntry& route) {
+    std::string address = deviceRoutesType.hasAddress() ? deviceRoutesType.getAddress() : "";
+    // Default type is bus for schema
+    std::string type = outTypeToOutAudioDevice(deviceRoutesType.hasType()
+                                                       ? xsd::toString(deviceRoutesType.getType())
+                                                       : std::string(kOutBusType));
+    // Address must be present for audio device bus
+    if (address.empty() && type == std::string(kOutBusType)) {
+        LOG(ERROR) << __func__ << " empty device address for bus device type";
+        return false;
+    }
+    if (!createAudioDevice(address, type, route.device)) {
+        return false;
+    }
+
+    if (!deviceRoutesType.hasContext()) {
+        LOG(ERROR) << __func__ << " empty device context mapping";
+        return false;
+    }
+
+    for (const auto& xsdContext : deviceRoutesType.getContext()) {
+        if (!xsdContext.hasContext()) {
+            LOG(ERROR) << __func__ << " audio device route missing context info";
+            return false;
+        }
+        route.contextNames.push_back(xsdContext.getContext());
+    }
+
+    return true;
+}
+
+bool parseAudioDeviceRoutes(const std::vector<xsd::DeviceRoutesType> deviceRoutesTypes,
+                            std::vector<api::DeviceToContextEntry>& routes) {
+    for (const auto& deviceRouteType : deviceRoutesTypes) {
+        api::DeviceToContextEntry entry;
+        if (!parseAudioDeviceToContexts(deviceRouteType, entry)) {
+            return false;
+        }
+        routes.push_back(entry);
+    }
+    return true;
+}
+
+void parseVolumeGroupActivation(const std::string& activationConfigName,
+                                const ActivationMap& activations,
+                                api::VolumeGroupConfig& volumeGroup) {
+    if (activationConfigName.empty()) {
+        LOG(ERROR) << __func__ << " Volume group " << volumeGroup.name
+                   << " has empty volume group activation name";
+        return;
+    }
+    const auto& it = activations.find(activationConfigName);
+    if (it == activations.end()) {
+        LOG(ERROR) << __func__ << " Volume group " << volumeGroup.name
+                   << " has non-existing volume group activation name " << activationConfigName;
+        return;
+    }
+    volumeGroup.activationConfiguration = it->second;
+}
+
+bool parseVolumeGroup(const xsd::VolumeGroupType& volumeGroupType, const ActivationMap& activations,
+                      api::VolumeGroupConfig& volumeGroup) {
+    if (!volumeGroupType.hasDevice()) {
+        LOG(ERROR) << __func__ << " no device found";
+        return false;
+    }
+
+    if (volumeGroupType.hasName()) {
+        volumeGroup.name = volumeGroupType.getName();
+    }
+
+    if (!parseAudioDeviceRoutes(volumeGroupType.getDevice(), volumeGroup.carAudioRoutes)) {
+        return false;
+    }
+
+    if (volumeGroupType.hasActivationConfig()) {
+        parseVolumeGroupActivation(volumeGroupType.getActivationConfig(), activations, volumeGroup);
+    }
+
+    return true;
+}
+
+bool parseVolumeGroups(const xsd::VolumeGroupsType* volumeGroupsType,
+                       const ActivationMap& activations,
+                       std::vector<api::VolumeGroupConfig>& volumeGroups) {
+    if (!volumeGroupsType->hasGroup()) {
+        LOG(ERROR) << __func__ << " no volume groups found";
+        return false;
+    }
+    for (const auto& volumeGroupType : volumeGroupsType->getGroup()) {
+        api::VolumeGroupConfig volumeGroup;
+        if (!parseVolumeGroup(volumeGroupType, activations, volumeGroup)) {
+            return false;
+        }
+        volumeGroups.push_back(volumeGroup);
+    }
+    return true;
+}
+
+void parseFadeConfigurationUsages(const xsd::ApplyFadeConfigType& fadeConfigType,
+                                  std::vector<AudioUsage>& usages) {
+    if (!fadeConfigType.hasAudioAttributes()) {
+        return;
+    }
+    const xsd::AudioAttributeUsagesType* attributesOrUsagesType =
+            fadeConfigType.getFirstAudioAttributes();
+    if (!attributesOrUsagesType->hasUsage()) {
+        return;
+    }
+    for (const auto& usageType : attributesOrUsagesType->getUsage()) {
+        AudioUsage usage;
+        if (!usageType.hasValue() ||
+            !parseAudioAttributeUsageString(xsd::toString(usageType.getValue()), usage)) {
+            continue;
+        }
+        usages.push_back(usage);
+    }
+}
+
+void parseZoneFadeConfiguration(const xsd::ApplyFadeConfigType& fadeConfigType,
+                                const FadeConfigurationMap& fadeConfigurations,
+                                api::AudioZoneFadeConfiguration& zoneFadeConfiguration) {
+    if (!fadeConfigType.hasName()) {
+        LOG(ERROR) << __func__ << " Found a fade config without a name, skipping assignment";
+        return;
+    }
+
+    const auto it = fadeConfigurations.find(fadeConfigType.getName());
+    if (it == fadeConfigurations.end()) {
+        LOG(ERROR) << __func__ << " Config name " << fadeConfigType.getName()
+                   << " not found, skipping assignment";
+        return;
+    }
+    // Return for default since default configurations do not have any audio attributes mapping
+    if (fadeConfigType.hasIsDefault()) {
+        zoneFadeConfiguration.defaultConfiguration = it->second;
+        return;
+    }
+
+    api::TransientFadeConfigurationEntry entry;
+    entry.transientFadeConfiguration = it->second;
+    parseFadeConfigurationUsages(fadeConfigType, entry.transientUsages);
+    zoneFadeConfiguration.transientConfiguration.push_back(entry);
+}
+
+void parseZoneFadeConfigurations(const xsd::ZoneConfigType& zoneConfigType,
+                                 const FadeConfigurationMap& fadeConfigurations,
+                                 std::optional<api::AudioZoneFadeConfiguration>& zoneFadeConfig) {
+    if (!zoneConfigType.hasApplyFadeConfigs()) {
+        return;
+    }
+    const xsd::ApplyFadeConfigsType* applyFadeConfigs = zoneConfigType.getFirstApplyFadeConfigs();
+    if (!applyFadeConfigs->hasFadeConfig()) {
+        return;
+    }
+    api::AudioZoneFadeConfiguration zoneFadeConfiguration;
+    for (const auto& fadeConfigType : applyFadeConfigs->getFadeConfig()) {
+        parseZoneFadeConfiguration(fadeConfigType, fadeConfigurations, zoneFadeConfiguration);
+    }
+    zoneFadeConfig = zoneFadeConfiguration;
+}
+
+bool parseAudioZoneConfig(const xsd::ZoneConfigType& zoneConfigType,
+                          const ActivationMap& activations,
+                          const FadeConfigurationMap& fadeConfigurations,
+                          api::AudioZoneConfig& config) {
+    if (!zoneConfigType.hasVolumeGroups()) {
+        LOG(ERROR) << __func__ << " no volume groups found";
+        return false;
+    }
+
+    if (zoneConfigType.hasName()) {
+        config.name = zoneConfigType.getName();
+    }
+    if (!parseVolumeGroups(zoneConfigType.getFirstVolumeGroups(), activations,
+                           config.volumeGroups)) {
+        return false;
+    }
+
+    parseZoneFadeConfigurations(zoneConfigType, fadeConfigurations, config.fadeConfiguration);
+
+    config.isDefault = zoneConfigType.hasIsDefault() && zoneConfigType.getIsDefault();
+
+    return true;
+}
+
+bool parseAudioZoneConfigs(const xsd::ZoneConfigsType* zoneConfigsType,
+                           const ActivationMap& activations,
+                           const FadeConfigurationMap& fadeConfigurations,
+                           std::vector<api::AudioZoneConfig>& configs) {
+    if (!zoneConfigsType->hasZoneConfig()) {
+        LOG(ERROR) << __func__ << " No zone configs found";
+        return false;
+    }
+
+    if (zoneConfigsType->getZoneConfig().empty()) {
+        LOG(ERROR) << __func__ << " Empty list of audio configurations";
+        return false;
+    }
+
+    for (const auto& zoneConfigType : zoneConfigsType->getZoneConfig()) {
+        api::AudioZoneConfig config;
+        if (!parseAudioZoneConfig(zoneConfigType, activations, fadeConfigurations, config)) {
+            return false;
+        }
+        configs.push_back(config);
+    }
+
+    return true;
+}
+
+bool parseInputDevice(const xsd::InputDeviceType& xsdInputDevice, AudioPort& inputDevice) {
+    // Input device must have a non-empty address
+    if (!xsdInputDevice.hasAddress() || xsdInputDevice.getAddress().empty()) {
+        LOG(ERROR) << __func__ << " missing device address";
+        return false;
+    }
+    // By default a device is bus type, unless specified
+    std::string inputDeviceType =
+            xsdInputDevice.hasType() ? xsd::toString(xsdInputDevice.getType()) : kInBusType;
+    if (!createAudioDevice(xsdInputDevice.getAddress(), inputDeviceType, inputDevice)) {
+        return false;
+    }
+    return true;
+}
+
+void parseInputDevices(const xsd::InputDevicesType* xsdInputDevices,
+                       std::vector<AudioPort>& inputDevices) {
+    if (!xsdInputDevices->hasInputDevice()) {
+        return;
+    }
+    for (const auto& xsdInputDevice : xsdInputDevices->getInputDevice()) {
+        AudioPort inputDevice;
+        if (!parseInputDevice(xsdInputDevice, inputDevice)) {
+            continue;
+        }
+        inputDevices.push_back(inputDevice);
+    }
+}
+
+bool parseAudioZone(const xsd::ZoneType& zone, const ActivationMap& activations,
+                    const FadeConfigurationMap& fadeConfigurations, api::AudioZone& audioZone) {
+    if (zone.hasName()) {
+        audioZone.name = zone.getName();
+    }
+
+    if (zone.hasOccupantZoneId()) {
+        ParseInt(zone.getOccupantZoneId().c_str(), &audioZone.occupantZoneId);
+    }
+
+    if (zone.hasInputDevices()) {
+        parseInputDevices(zone.getFirstInputDevices(), audioZone.inputAudioDevices);
+    }
+
+    // Audio zone id is required
+    if (!zone.hasAudioZoneId()) {
+        LOG(ERROR) << __func__ << " Audio zone id required for each zone";
+        return false;
+    }
+
+    bool isPrimary = zone.hasIsPrimary() && zone.getIsPrimary();
+
+    if (isPrimary) {
+        audioZone.id = api::AudioZone::PRIMARY_AUDIO_ZONE;
+    }
+
+    // ID not required in XML for primary zone
+    if (!ParseInt(zone.getAudioZoneId().c_str(), &audioZone.id) && !isPrimary) {
+        LOG(ERROR) << __func__
+                   << " Could not parse audio zone id, must be a non-negative integer or isPrimary "
+                      "must be specify as true for primary zone";
+        return false;
+    }
+
+    if (isPrimary && audioZone.id != api::AudioZone::PRIMARY_AUDIO_ZONE) {
+        LOG(ERROR) << __func__ << " Audio zone is primary but has zone id "
+                   << std::to_string(audioZone.id) << " instead of primary zone id "
+                   << std::to_string(api::AudioZone::PRIMARY_AUDIO_ZONE);
+        return false;
+    }
+
+    if (!zone.hasZoneConfigs()) {
+        LOG(ERROR) << __func__ << " Missing audio zone configs for audio zone id " << audioZone.id;
+        return false;
+    }
+    if (!parseAudioZoneConfigs(zone.getFirstZoneConfigs(), activations, fadeConfigurations,
+                               audioZone.audioZoneConfigs)) {
+        LOG(ERROR) << __func__ << " Could not parse zone configs for audio zone id " << audioZone.id
+                   << ", name " << audioZone.name;
+        return false;
+    }
+
+    return true;
+}
+
+std::string parseAudioZones(const xsd::ZonesType* zones, const api::AudioZoneContext& context,
+                            const ActivationMap& activations,
+                            const FadeConfigurationMap& fadeConfigurations,
+                            std::vector<api::AudioZone>& audioZones) {
+    if (!zones->hasZone()) {
+        return "audio zones are missing";
+    }
+    const auto& xsdZones = zones->getZone();
+    for (const auto& xsdZone : xsdZones) {
+        api::AudioZone audioZone;
+        audioZone.audioZoneContext = context;
+        if (!parseAudioZone(xsdZone, activations, fadeConfigurations, audioZone)) {
+            continue;
+        }
+        audioZones.push_back(audioZone);
+    }
+    return "";
+}
+
+std::unordered_map<std::string,
+                   std::function<void(const std::string&, api::AudioDeviceConfiguration&)>>
+getConfigsParsers() {
+    static const std::unordered_map<
+            std::string, std::function<void(const std::string&, api::AudioDeviceConfiguration&)>>
+            parsers{
+                    {kUseCoreRouting, parseCoreRoutingInfo},
+                    {kUseCoreVolume, parseCoreVolumeInfo},
+                    {kUseHalDuckingSignals, parseHalDuckingInfo},
+                    {kUseCarVolumeGroupMuting, parseHalMutingInfo},
+            };
+
+    return parsers;
+}
+
+bool parseVolumeActivationType(const xsd::ActivationType& xsdType,
+                               api::VolumeInvocationType& activationType) {
+    switch (xsdType) {
+        case xsd::ActivationType::onBoot:
+            activationType = api::VolumeInvocationType::ON_BOOT;
+            break;
+        case xsd::ActivationType::onSourceChanged:
+            activationType = api::VolumeInvocationType::ON_SOURCE_CHANGED;
+            break;
+        case xsd::ActivationType::onPlaybackChanged:
+            activationType = api::VolumeInvocationType::ON_PLAYBACK_CHANGED;
+            break;
+        default:
+            return false;
+    }
+    return true;
+}
+
+bool parseVolumeGroupActivationEntry(const xsd::ActivationVolumeConfigEntryType& xsdEntry,
+                                     api::VolumeActivationConfigurationEntry& entry) {
+    if (!xsdEntry.hasInvocationType()) {
+        LOG(ERROR) << __func__ << " Activation config entry missing invocation type";
+        return false;
+    }
+
+    if (!parseVolumeActivationType(xsdEntry.getInvocationType(), entry.type)) {
+        LOG(ERROR) << __func__ << " Could not parse configuration entry type";
+        return false;
+    }
+
+    if (xsdEntry.hasMaxActivationVolumePercentage()) {
+        // Parse int ranges are not inclusive
+        ParseInt(xsdEntry.getMaxActivationVolumePercentage().c_str(),
+                 &entry.maxActivationVolumePercentage,
+                 api::VolumeActivationConfigurationEntry::DEFAULT_MIN_ACTIVATION_VALUE - 1,
+                 api::VolumeActivationConfigurationEntry::DEFAULT_MAX_ACTIVATION_VALUE + 1);
+    }
+
+    if (xsdEntry.hasMinActivationVolumePercentage()) {
+        // Parse int ranges are not inclusive
+        ParseInt(xsdEntry.getMinActivationVolumePercentage().c_str(),
+                 &entry.minActivationVolumePercentage,
+                 api::VolumeActivationConfigurationEntry::DEFAULT_MIN_ACTIVATION_VALUE - 1,
+                 api::VolumeActivationConfigurationEntry::DEFAULT_MAX_ACTIVATION_VALUE + 1);
+    }
+
+    return true;
+}
+
+bool parseVolumeGroupActivationEntries(
+        const std::vector<xsd::ActivationVolumeConfigEntryType>& xsdEntries,
+        std::vector<api::VolumeActivationConfigurationEntry>& entries) {
+    for (const auto& xsdEntry : xsdEntries) {
+        api::VolumeActivationConfigurationEntry entry;
+        if (!parseVolumeGroupActivationEntry(xsdEntry, entry)) {
+            LOG(ERROR) << __func__ << " Could not parse volume group activation entries";
+            return false;
+        }
+        entries.push_back(entry);
+    }
+    return true;
+}
+
+bool parseVolumeGroupActivation(const xsd::ActivationVolumeConfigType& xsdActivationConfig,
+                                api::VolumeActivationConfiguration& activation) {
+    if (!xsdActivationConfig.hasName()) {
+        LOG(ERROR) << __func__ << " Activation config missing volume activation name";
+        return false;
+    }
+    if (!xsdActivationConfig.hasActivationVolumeConfigEntry()) {
+        LOG(ERROR) << __func__ << " Activation config missing volume activation entries";
+        return false;
+    }
+    if (!parseVolumeGroupActivationEntries(xsdActivationConfig.getActivationVolumeConfigEntry(),
+                                           activation.volumeActivationEntries)) {
+        LOG(ERROR) << __func__ << " Could not parse volume activation name";
+        return false;
+    }
+    activation.name = xsdActivationConfig.getName();
+    return true;
+}
+
+void parseVolumeGroupActivations(const xsd::ActivationVolumeConfigsType* xsdActivationConfigs,
+                                 ActivationMap& activations) {
+    if (!xsdActivationConfigs->hasActivationVolumeConfig()) {
+        LOG(ERROR) << __func__ << " No volume group activations found";
+        return;
+    }
+    for (const auto& xsdActivationConfig : xsdActivationConfigs->getActivationVolumeConfig()) {
+        api::VolumeActivationConfiguration activationConfiguration;
+        if (!parseVolumeGroupActivation(xsdActivationConfig, activationConfiguration)) {
+            continue;
+        }
+        std::string name = xsdActivationConfig.getName();
+        activations.emplace(name, activationConfiguration);
+    }
+}
+
+void parseOutputMirroringDevices(const xsd::MirroringDevicesType* mirroringDevicesType,
+                                 std::vector<AudioPort>& mirroringDevices) {
+    if (!mirroringDevicesType->hasMirroringDevice()) {
+        LOG(ERROR) << __func__ << " Missing audio mirroring devices";
+        return;
+    }
+    for (const auto& xsdMirrorDevice : mirroringDevicesType->getMirroringDevice()) {
+        AudioPort mirrorDevicePort;
+        if (!xsdMirrorDevice.hasAddress()) {
+            LOG(ERROR) << __func__ << " Missing audio mirroring device address";
+            continue;
+        }
+        if (!createAudioDevice(xsdMirrorDevice.getAddress(), kOutBusType, mirrorDevicePort)) {
+            LOG(ERROR) << __func__ << " Could not create mirror device with address "
+                       << xsdMirrorDevice.getAddress();
+            continue;
+        }
+        mirroringDevices.push_back(mirrorDevicePort);
+    }
+}
+
+api::FadeState getFadeState(const fade::FadeStateType& xsdFadeState) {
+    // Return default value if missing
+    if (!xsdFadeState.hasValue()) {
+        return api::FadeState::FADE_STATE_ENABLED_DEFAULT;
+    }
+    // For legacy files, "0" and "1 " need to be supported.
+    switch (xsdFadeState.getValue()) {
+        case fade::FadeStateEnumType::_0:
+            // Fallthrough
+        case fade::FadeStateEnumType::FADE_STATE_DISABLED:
+            return api::FadeState::FADE_STATE_DISABLED;
+        case fade::FadeStateEnumType::_1:
+            // Fallthrough
+        case fade::FadeStateEnumType::FADE_STATE_ENABLED_DEFAULT:
+            // Fallthrough
+        default:
+            return api::FadeState::FADE_STATE_ENABLED_DEFAULT;
+    }
+}
+
+void parseFadeableUsages(const fade::FadeableUsagesType& fadeUsages,
+                         std::vector<AudioUsage>& usages) {
+    if (!fadeUsages.hasUsage()) {
+        return;
+    }
+    for (const auto& fadeUsage : fadeUsages.getUsage()) {
+        AudioUsage audioUsage;
+        if (!fadeUsage.hasValue() ||
+            !parseAudioAttributeUsageString(fade::toString(fadeUsage.getValue()), audioUsage)) {
+            continue;
+        }
+        usages.push_back(audioUsage);
+    }
+}
+
+void parseFadeAudioAttribute(const fade::AttributesType& fadeAttributes,
+                             AudioAttributes& attributes) {
+    if (fadeAttributes.hasUsage()) {
+        parseAudioAttributeUsageString(fade::toString(fadeAttributes.getUsage()), attributes.usage);
+    }
+    if (fadeAttributes.hasContentType()) {
+        parseContentTypeString(fade::toString(fadeAttributes.getContentType()),
+                               attributes.contentType);
+    }
+    if (fadeAttributes.hasTags()) {
+        attributes.tags.push_back(fadeAttributes.getTags());
+    }
+}
+
+bool parseFadeAudioAttribute(const fade::AudioAttributesUsagesType& fadeAttributes,
+                             std::vector<AudioAttributes>& audioAttributes) {
+    if (fadeAttributes.hasUsage_optional()) {
+        for (const auto& usage : fadeAttributes.getUsage_optional()) {
+            AudioAttributes attributes;
+            if (!usage.hasValue() || !parseAudioAttributeUsageString(
+                                             fade::toString(usage.getValue()), attributes.usage)) {
+                continue;
+            }
+            audioAttributes.push_back(attributes);
+        }
+    }
+    if (fadeAttributes.hasAudioAttribute_optional()) {
+        for (const auto& fadeAttribute : fadeAttributes.getAudioAttribute_optional()) {
+            AudioAttributes attribute;
+            parseFadeAudioAttribute(fadeAttribute, attribute);
+            audioAttributes.push_back(attribute);
+        }
+    }
+    return true;
+}
+
+void parseUnfadeableAudioAttributes(const fade::UnfadeableAudioAttributesType& fadeAttributes,
+                                    std::vector<AudioAttributes>& audioAttributes) {
+    if (!fadeAttributes.hasAudioAttributes()) {
+        return;
+    }
+    parseFadeAudioAttribute(*fadeAttributes.getFirstAudioAttributes(), audioAttributes);
+}
+
+void parseUnfadeableContentType(const fade::UnfadeableContentTypesType& fadeTypes,
+                                std::optional<std::vector<AudioContentType>>& contentTypes) {
+    if (!fadeTypes.hasContentType()) {
+        return;
+    }
+    std::vector<AudioContentType> contents;
+    for (const auto& fadeContentType : fadeTypes.getContentType()) {
+        AudioContentType contentType;
+        if (!fadeContentType.hasValue() ||
+            !parseContentTypeString(fade::toString(fadeContentType.getValue()), contentType)) {
+            continue;
+        }
+        contents.push_back(contentType);
+    }
+    contentTypes = contents;
+}
+
+void parseFadeConfigAudioAttributes(const fade::AudioAttributesUsagesType& fadeAudioAttributesType,
+                                    const int64_t fadeDurationMillins,
+                                    std::vector<api::FadeConfiguration>& fadeInConfigurations) {
+    if (fadeAudioAttributesType.hasAudioAttribute_optional()) {
+        for (const auto& fadeAudioAttribute :
+             fadeAudioAttributesType.getAudioAttribute_optional()) {
+            api::FadeConfiguration fadeConfiguration;
+            AudioAttributes attributes;
+            parseFadeAudioAttribute(fadeAudioAttribute, attributes);
+            fadeConfiguration.fadeDurationMillis = fadeDurationMillins;
+            fadeConfiguration.audioAttributesOrUsage
+                    .set<api::FadeConfiguration::AudioAttributesOrUsage::fadeAttribute>(attributes);
+            fadeInConfigurations.push_back(fadeConfiguration);
+        }
+    }
+
+    if (fadeAudioAttributesType.hasUsage_optional()) {
+        for (const auto& fadeAudioUsage : fadeAudioAttributesType.getUsage_optional()) {
+            api::FadeConfiguration fadeConfiguration;
+            AudioUsage usage;
+            if (!fadeAudioUsage.hasValue() ||
+                !parseAudioAttributeUsageString(fade::toString(fadeAudioUsage.getValue()), usage)) {
+                continue;
+            }
+            fadeConfiguration.fadeDurationMillis = fadeDurationMillins;
+            fadeConfiguration.audioAttributesOrUsage
+                    .set<api::FadeConfiguration::AudioAttributesOrUsage::usage>(usage);
+            fadeInConfigurations.push_back(fadeConfiguration);
+        }
+    }
+}
+void parseFadeConfiguration(const fade::FadeConfigurationType& fadeConfigurationType,
+                            std::vector<api::FadeConfiguration>& fadeConfigurations) {
+    if (!fadeConfigurationType.hasFadeDurationMillis() ||
+        !fadeConfigurationType.hasAudioAttributes() ||
+        fadeConfigurationType.getAudioAttributes().empty()) {
+        return;
+    }
+
+    int64_t fadeDurationMillis = 0L;
+
+    if (!ParseInt(fadeConfigurationType.getFadeDurationMillis().c_str(), &fadeDurationMillis,
+                  static_cast<int64_t>(0))) {
+        return;
+    }
+    parseFadeConfigAudioAttributes(*fadeConfigurationType.getFirstAudioAttributes(),
+                                   fadeDurationMillis, fadeConfigurations);
+}
+
+void parseFadeInConfigurations(const fade::FadeInConfigurationsType& fadeInConfigurationsType,
+                               std::vector<api::FadeConfiguration>& fadeInConfigurations) {
+    if (!fadeInConfigurationsType.hasFadeConfiguration()) {
+        return;
+    }
+    for (const auto& fadeConfigurationType : fadeInConfigurationsType.getFadeConfiguration()) {
+        parseFadeConfiguration(fadeConfigurationType, fadeInConfigurations);
+    }
+}
+
+void parseFadeOutConfigurations(const fade::FadeOutConfigurationsType& fadeOutConfigurationsType,
+                                std::vector<api::FadeConfiguration>& fadeOutConfigurations) {
+    if (!fadeOutConfigurationsType.hasFadeConfiguration()) {
+        return;
+    }
+    for (const auto& fadeConfigurationType : fadeOutConfigurationsType.getFadeConfiguration()) {
+        parseFadeConfiguration(fadeConfigurationType, fadeOutConfigurations);
+    }
+}
+
+bool parseFadeConfig(const fade::FadeConfigurationConfig& fadeConfig,
+                     api::AudioFadeConfiguration& configuration) {
+    // Fade configuration must have a name for zone association. Fade state is also needed to
+    // determine accurate usage.
+    if (!fadeConfig.hasName()) {
+        LOG(ERROR) << __func__ << " Fade configuration missing name";
+        return false;
+    }
+    if (!fadeConfig.hasFadeState()) {
+        LOG(ERROR) << __func__ << " Fade configuration missing fade state";
+        return false;
+    }
+    configuration.name = fadeConfig.getName();
+    configuration.fadeState = getFadeState(*fadeConfig.getFirstFadeState());
+    if (fadeConfig.hasDefaultFadeOutDurationInMillis()) {
+        ParseInt(fadeConfig.getDefaultFadeOutDurationInMillis().c_str(),
+                 &configuration.fadeOutDurationMs, static_cast<int64_t>(0));
+    }
+    if (fadeConfig.hasDefaultFadeInDurationInMillis()) {
+        ParseInt(fadeConfig.getDefaultFadeInDurationInMillis().c_str(),
+                 &configuration.fadeInDurationMs, static_cast<int64_t>(0));
+    }
+    if (fadeConfig.hasDefaultFadeInDelayForOffenders()) {
+        ParseInt(fadeConfig.getDefaultFadeInDelayForOffenders().c_str(),
+                 &configuration.fadeInDelayedForOffendersMs, static_cast<int64_t>(0));
+    }
+
+    if (fadeConfig.hasFadeableUsages()) {
+        parseFadeableUsages(*fadeConfig.getFirstFadeableUsages(), configuration.fadeableUsages);
+    }
+
+    if (fadeConfig.hasUnfadeableContentTypes()) {
+        parseUnfadeableContentType(*fadeConfig.getFirstUnfadeableContentTypes(),
+                                   configuration.unfadeableContentTypes);
+    }
+
+    if (fadeConfig.hasUnfadeableAudioAttributes()) {
+        parseUnfadeableAudioAttributes(*fadeConfig.getFirstUnfadeableAudioAttributes(),
+                                       configuration.unfadableAudioAttributes);
+    }
+    if (fadeConfig.hasFadeInConfigurations()) {
+        parseFadeInConfigurations(*fadeConfig.getFirstFadeInConfigurations(),
+                                  configuration.fadeInConfigurations);
+    }
+    if (fadeConfig.hasFadeOutConfigurations()) {
+        parseFadeOutConfigurations(*fadeConfig.getFirstFadeOutConfigurations(),
+                                   configuration.fadeOutConfigurations);
+    }
+
+    return true;
+}
+
+void parseFadeConfigs(const std::vector<fade::FadeConfigurationConfig>& fadeConfigTypes,
+                      std::vector<api::AudioFadeConfiguration>& fadeConfigs) {
+    for (const auto& fadeConfig : fadeConfigTypes) {
+        api::AudioFadeConfiguration configuration;
+        if (!parseFadeConfig(fadeConfig, configuration)) {
+            continue;
+        }
+        fadeConfigs.push_back(configuration);
+    }
+}
+
+void parseFadeConfigs(const fade::FadeConfigurationConfigs& fadeConfigsType,
+                      std::vector<api::AudioFadeConfiguration>& fadeConfigs) {
+    if (!fadeConfigsType.hasConfig()) {
+        LOG(ERROR) << __func__ << " Fade config file does not contains any fade configs";
+        return;
+    }
+    parseFadeConfigs(fadeConfigsType.getConfig(), fadeConfigs);
+}
+}  // namespace
+
+void CarAudioConfigurationXmlConverter::init() {
+    if (!isReadableConfigurationFile(mAudioConfigFile)) {
+        mParseErrors = "Configuration file " + mAudioConfigFile + " is not readable";
+        initNonDynamicRouting();
+        return;
+    }
+
+    // Supports loading legacy fade configurations from a different file
+    if (isReadableConfigurationFile(mFadeConfigFile)) {
+        initFadeConfigurations();
+    }
+
+    const auto& configOptional = xsd::read(mAudioConfigFile.c_str());
+
+    if (!configOptional.has_value()) {
+        mParseErrors =
+                "Configuration file " + mAudioConfigFile + " , does not have any configurations";
+        initNonDynamicRouting();
+        return;
+    }
+
+    const auto& configurations = configOptional.value();
+    initAudioDeviceConfiguration(configurations);
+    initCarAudioConfigurations(configurations);
+}
+
+void CarAudioConfigurationXmlConverter::initFadeConfigurations() {
+    const auto& fadeConfigOptional = fade::read(mFadeConfigFile.c_str());
+    if (!fadeConfigOptional.has_value() || !fadeConfigOptional.value().hasConfigs()) {
+        LOG(ERROR) << __func__ << " Fade config file " << mFadeConfigFile.c_str()
+                   << " does not contains fade configuration";
+        return;
+    }
+
+    const auto& fadeConfigs = fadeConfigOptional.value().getConfigs();
+
+    if (fadeConfigs.empty()) {
+        LOG(ERROR) << __func__ << " Fade config file " << mFadeConfigFile.c_str()
+                   << " does not contains fade configs";
+    }
+    std::vector<api::AudioFadeConfiguration> fadeConfigurations;
+    parseFadeConfigs(fadeConfigs.front(), fadeConfigurations);
+    for (const auto& fadeConfiguration : fadeConfigurations) {
+        mFadeConfigurations.emplace(fadeConfiguration.name, fadeConfiguration);
+    }
+}
+
+void CarAudioConfigurationXmlConverter::initNonDynamicRouting() {
+    mAudioDeviceConfiguration.routingConfig =
+            api::RoutingDeviceConfiguration::DEFAULT_AUDIO_ROUTING;
+}
+
+void CarAudioConfigurationXmlConverter::initAudioDeviceConfiguration(
+        const xsd::CarAudioConfigurationType& carAudioConfigurationType) {
+    parseAudioDeviceConfigurations(carAudioConfigurationType);
+}
+
+void CarAudioConfigurationXmlConverter::parseAudioDeviceConfigurations(
+        const xsd::CarAudioConfigurationType& carAudioConfigurationType) {
+    if (!carAudioConfigurationType.hasDeviceConfigurations()) {
+        return;
+    }
+
+    mAudioDeviceConfiguration.routingConfig =
+            api::RoutingDeviceConfiguration::DYNAMIC_AUDIO_ROUTING;
+
+    const auto deviceConfigs = carAudioConfigurationType.getFirstDeviceConfigurations();
+    if (!deviceConfigs->hasDeviceConfiguration()) {
+        return;
+    }
+
+    std::vector<::android::hardware::automotive::audiocontrol::DeviceConfigurationType> configs =
+            deviceConfigs->getDeviceConfiguration();
+    const auto& parsers = getConfigsParsers();
+    for (const auto& deviceConfig : configs) {
+        if (!deviceConfig.hasName() || !deviceConfig.hasValue()) {
+            continue;
+        }
+        const auto& parser = parsers.find(deviceConfig.getName());
+        if (parser == parsers.end()) {
+            continue;
+        }
+        const auto& method = parser->second;
+        method(deviceConfig.getValue(), mAudioDeviceConfiguration);
+    }
+}
+
+void CarAudioConfigurationXmlConverter::initCarAudioConfigurations(
+        const automotive::audiocontrol::CarAudioConfigurationType& carAudioConfigurationType) {
+    if (!carAudioConfigurationType.hasZones()) {
+        mParseErrors = "Audio zones not found in file " + mAudioConfigFile;
+        initNonDynamicRouting();
+        return;
+    }
+
+    api::AudioZoneContext context;
+    if (!carAudioConfigurationType.hasOemContexts() ||
+        !parseAudioContexts(carAudioConfigurationType.getFirstOemContexts(), context)) {
+        context = getDefaultCarAudioContext();
+    }
+
+    ActivationMap activations;
+    if (carAudioConfigurationType.hasActivationVolumeConfigs()) {
+        parseVolumeGroupActivations(carAudioConfigurationType.getFirstActivationVolumeConfigs(),
+                                    activations);
+    }
+
+    if (carAudioConfigurationType.hasMirroringDevices()) {
+        parseOutputMirroringDevices(carAudioConfigurationType.getFirstMirroringDevices(),
+                                    mOutputMirroringDevices);
+    }
+
+    const auto audioZones = carAudioConfigurationType.getFirstZones();
+
+    std::string message =
+            parseAudioZones(audioZones, context, activations, mFadeConfigurations, mAudioZones);
+
+    // Assign dynamic configuration if not assigned
+    if (!mAudioZones.empty() && mAudioDeviceConfiguration.routingConfig ==
+                                        api::RoutingDeviceConfiguration::DEFAULT_AUDIO_ROUTING) {
+        mAudioDeviceConfiguration.routingConfig =
+                api::RoutingDeviceConfiguration::DYNAMIC_AUDIO_ROUTING;
+    }
+
+    if (message.empty()) {
+        return;
+    }
+    mParseErrors =
+            "Error parsing audio zone(s) in file " + mAudioConfigFile + ", message: " + message;
+    LOG(ERROR) << __func__ << " Error parsing zones: " << message;
+    initNonDynamicRouting();
+}
+
+api::AudioDeviceConfiguration CarAudioConfigurationXmlConverter::getAudioDeviceConfiguration()
+        const {
+    return mAudioDeviceConfiguration;
+}
+
+std::vector<api::AudioZone> CarAudioConfigurationXmlConverter::getAudioZones() const {
+    return mAudioZones;
+}
+
+std::vector<::aidl::android::media::audio::common::AudioPort>
+CarAudioConfigurationXmlConverter::getOutputMirroringDevices() const {
+    return mOutputMirroringDevices;
+}
+
+}  // namespace internal
+}  // namespace audiocontrol
+}  // namespace hardware
+}  // namespace android
\ No newline at end of file
diff --git a/automotive/audiocontrol/aidl/default/converter/test/Android.bp b/automotive/audiocontrol/aidl/default/converter/test/Android.bp
new file mode 100644
index 0000000..70d4a20
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/Android.bp
@@ -0,0 +1,63 @@
+// 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 {
+    default_team: "trendy_team_aaos_framework",
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+filegroup {
+    name: "simple_car_audio_configuration_xml",
+    srcs: [
+        "simple_car_audio_configuration.xml",
+        "simple_car_audio_configuration_with_device_type.xml",
+        "multi_zone_car_audio_configuration.xml",
+        "car_audio_configuration_without_configuration.xml",
+        "car_audio_configuration_with_default_context.xml",
+        "car_audio_configuration_with_missing_zones.xml",
+        "car_audio_configuration_without_audio_zone.xml",
+        "car_audio_fade_configuration.xml",
+    ],
+}
+
+cc_test {
+    name: "AudioControlConverterUnitTest",
+    vendor: true,
+    require_root: true,
+    srcs: ["*.cpp"],
+    stl: "libc++_static",
+    static_libs: [
+        "libbase",
+        "android.hardware.audiocontrol.internal",
+        "libgtest",
+        "libgmock",
+        "libutils",
+        "libaudio_aidl_conversion_common_ndk",
+    ],
+    shared_libs: ["liblog"],
+    defaults: [
+        "latest_android_hardware_audio_common_ndk_static",
+        "car.audio.configuration.xsd.default",
+        "car.fade.configuration.xsd.default",
+        "latest_android_hardware_automotive_audiocontrol_ndk_static",
+        "latest_android_media_audio_common_types_ndk_static",
+    ],
+    data: [
+        ":simple_car_audio_configuration_xml",
+    ],
+    test_suites: ["device-tests"],
+    exclude_shared_libs: [
+        "android.hardware.automotive.audiocontrol-V5-ndk",
+    ],
+}
diff --git a/automotive/audiocontrol/aidl/default/converter/test/AudioControlConverterUnitTest.cpp b/automotive/audiocontrol/aidl/default/converter/test/AudioControlConverterUnitTest.cpp
new file mode 100644
index 0000000..b6bebe5
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/AudioControlConverterUnitTest.cpp
@@ -0,0 +1,834 @@
+/*
+ * 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.
+ */
+
+#include <android-base/file.h>
+#include <gmock/gmock.h>
+#include <gtest/gtest.h>
+#include <memory>
+#include <string>
+#include <utility>
+
+#include <CarAudioConfigurationXmlConverter.h>
+#include <aidl/android/hardware/automotive/audiocontrol/AudioDeviceConfiguration.h>
+
+namespace converter = ::android::hardware::audiocontrol::internal;
+namespace api = ::aidl::android::hardware::automotive::audiocontrol;
+
+using ::testing::ContainsRegex;
+using ::testing::UnorderedElementsAreArray;
+
+namespace {
+
+using ::aidl::android::media::audio::common::AudioAttributes;
+using ::aidl::android::media::audio::common::AudioContentType;
+using ::aidl::android::media::audio::common::AudioDevice;
+using ::aidl::android::media::audio::common::AudioDeviceAddress;
+using ::aidl::android::media::audio::common::AudioDeviceDescription;
+using ::aidl::android::media::audio::common::AudioDeviceType;
+using ::aidl::android::media::audio::common::AudioPort;
+using ::aidl::android::media::audio::common::AudioPortDeviceExt;
+using ::aidl::android::media::audio::common::AudioPortExt;
+using ::aidl::android::media::audio::common::AudioUsage;
+
+std::string getTestFilePath(const std::string& filename) {
+    static std::string baseDir = android::base::GetExecutableDirectory();
+    return baseDir + "/" + filename;
+}
+
+AudioAttributes createAudioAttributes(const AudioUsage& usage,
+                                      const AudioContentType& type = AudioContentType::UNKNOWN,
+                                      const std::string tags = "") {
+    AudioAttributes attributes;
+    attributes.usage = usage;
+    attributes.contentType = type;
+    if (!tags.empty()) {
+        attributes.tags.push_back(tags);
+    }
+    return attributes;
+}
+
+api::AudioZoneContextInfo createContextInfo(const std::string& name,
+                                            const std::vector<AudioAttributes>& attributes,
+                                            const int id = -1) {
+    api::AudioZoneContextInfo info;
+    info.name = name;
+    if (id != -1) {
+        info.id = id;
+    }
+    for (const auto& attribute : attributes) {
+        info.audioAttributes.push_back(attribute);
+    }
+    return info;
+}
+
+api::AudioZoneContextInfo createContextInfo(const std::string& name,
+                                            const std::vector<AudioUsage>& usages,
+                                            const int id = -1) {
+    std::vector<AudioAttributes> attributes;
+    attributes.reserve(usages.size());
+    for (const auto& usage : usages) {
+        attributes.push_back(createAudioAttributes(usage));
+    }
+    return createContextInfo(name, attributes, id);
+}
+
+AudioPort createAudioPort(const std::string& address, const AudioDeviceType& type,
+                          const std::string& connection = "") {
+    AudioPort port;
+    AudioDevice device;
+    device.address = AudioDeviceAddress::make<AudioDeviceAddress::Tag::id>(address);
+
+    AudioDeviceDescription description;
+    description.type = type;
+    description.connection = connection;
+    device.type = description;
+
+    port.ext = AudioPortExt::make<AudioPortExt::Tag::device>(device);
+
+    return port;
+}
+
+api::DeviceToContextEntry createRoutes(const AudioPort& port,
+                                       const std::vector<std::string>& contexts) {
+    api::DeviceToContextEntry entry;
+    entry.device = port;
+    entry.contextNames = contexts;
+    return entry;
+}
+
+api::VolumeGroupConfig createVolumeGroup(const std::string& name,
+                                         const api::VolumeActivationConfiguration& activation,
+                                         const std::vector<api::DeviceToContextEntry>& routes) {
+    api::VolumeGroupConfig config;
+    config.name = name;
+    config.activationConfiguration = activation;
+    config.carAudioRoutes = routes;
+    return config;
+}
+
+api::AudioZoneConfig createAudioZoneConfig(const std::string& name,
+                                           const api::AudioZoneFadeConfiguration& fadeConfiguration,
+                                           const std::vector<api::VolumeGroupConfig>& groups,
+                                           bool isDefault = false) {
+    api::AudioZoneConfig config;
+    config.name = name;
+    config.isDefault = isDefault;
+    config.volumeGroups = groups;
+    config.fadeConfiguration = fadeConfiguration;
+    return config;
+}
+
+api::VolumeActivationConfiguration createVolumeActivation(const std::string& name,
+                                                          const api::VolumeInvocationType& type,
+                                                          int minVolume, int maxVolume) {
+    api::VolumeActivationConfiguration activation;
+    activation.name = name;
+    api::VolumeActivationConfigurationEntry entry;
+    entry.maxActivationVolumePercentage = maxVolume;
+    entry.minActivationVolumePercentage = minVolume;
+    entry.type = type;
+    activation.volumeActivationEntries.push_back(entry);
+
+    return activation;
+}
+
+api::FadeConfiguration createFadeConfiguration(const long& fadeDurationsMillis,
+                                               const AudioAttributes& audioAttributes) {
+    api::FadeConfiguration configuration;
+    configuration.fadeDurationMillis = fadeDurationsMillis;
+    configuration.audioAttributesOrUsage
+            .set<api::FadeConfiguration::AudioAttributesOrUsage::Tag::fadeAttribute>(
+                    audioAttributes);
+    return configuration;
+}
+
+api::FadeConfiguration createFadeConfiguration(const long& fadeDurationsMillis,
+                                               const AudioUsage& audioUsage) {
+    api::FadeConfiguration configuration;
+    configuration.fadeDurationMillis = fadeDurationsMillis;
+    configuration.audioAttributesOrUsage
+            .set<api::FadeConfiguration::AudioAttributesOrUsage::Tag::usage>(audioUsage);
+    return configuration;
+}
+
+api::AudioFadeConfiguration createAudioFadeConfiguration(
+        const std::string& name, const api::FadeState& state,
+        const std::vector<AudioUsage>& fadeableUsages = std::vector<AudioUsage>(),
+        const std::optional<std::vector<AudioContentType>>& unfadeableContentTypes = std::nullopt,
+        const std::vector<AudioAttributes> unfadeableAudioAttributes =
+                std::vector<AudioAttributes>(),
+        const std::vector<api::FadeConfiguration> fadeOutConfigurations =
+                std::vector<api::FadeConfiguration>(),
+        const std::vector<api::FadeConfiguration> fadeInConfigurations =
+                std::vector<api::FadeConfiguration>(),
+        const long& fadeOutDurationMs = api::AudioFadeConfiguration::DEFAULT_FADE_OUT_DURATION_MS,
+        const long& fadeInDurationMs = api::AudioFadeConfiguration::DEFAULT_FADE_IN_DURATION_MS,
+        const long& fadeInDelayedForOffendersMs =
+                api::AudioFadeConfiguration::DEFAULT_DELAY_FADE_IN_OFFENDERS_MS) {
+    api::AudioFadeConfiguration audioZoneFadeConfiguration;
+    audioZoneFadeConfiguration.name = name;
+    audioZoneFadeConfiguration.fadeInDurationMs = fadeInDurationMs;
+    audioZoneFadeConfiguration.fadeOutDurationMs = fadeOutDurationMs;
+    audioZoneFadeConfiguration.fadeInDelayedForOffendersMs = fadeInDelayedForOffendersMs;
+    audioZoneFadeConfiguration.fadeState = state;
+    audioZoneFadeConfiguration.fadeableUsages = fadeableUsages;
+    audioZoneFadeConfiguration.unfadeableContentTypes = unfadeableContentTypes;
+    audioZoneFadeConfiguration.unfadableAudioAttributes = unfadeableAudioAttributes;
+    audioZoneFadeConfiguration.fadeOutConfigurations = fadeOutConfigurations;
+    audioZoneFadeConfiguration.fadeInConfigurations = fadeInConfigurations;
+
+    return audioZoneFadeConfiguration;
+}
+
+api::TransientFadeConfigurationEntry createTransientFadeConfiguration(
+        const api::AudioFadeConfiguration& fadeConfig, const std::vector<AudioUsage>& usages) {
+    api::TransientFadeConfigurationEntry entry;
+    entry.transientFadeConfiguration = fadeConfig;
+    entry.transientUsages = usages;
+    return entry;
+}
+
+api::AudioZoneFadeConfiguration createAudioZoneFadeConfiguration(
+        const api::AudioFadeConfiguration& defaultConfig,
+        const std::vector<api::TransientFadeConfigurationEntry>& transientConfigs) {
+    api::AudioZoneFadeConfiguration zoneFadeConfiguration;
+    zoneFadeConfiguration.defaultConfiguration = defaultConfig;
+    zoneFadeConfiguration.transientConfiguration = transientConfigs;
+    return zoneFadeConfiguration;
+}
+
+api::AudioZone createAudioZone(const std::string& name, const int zoneId,
+                               const std::vector<api::AudioZoneContextInfo>& contexts,
+                               const std::vector<api::AudioZoneConfig>& configs) {
+    api::AudioZone zone;
+    zone.name = name;
+    zone.id = zoneId;
+    zone.occupantZoneId = zoneId;
+    zone.audioZoneContext.audioContextInfos = contexts;
+    zone.audioZoneConfigs = configs;
+    return zone;
+}
+
+const std::vector<AudioUsage> kFadeableUsages = {AudioUsage::MEDIA,
+                                                 AudioUsage::GAME,
+                                                 AudioUsage::ASSISTANCE_SONIFICATION,
+                                                 AudioUsage::ASSISTANCE_ACCESSIBILITY,
+                                                 AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE,
+                                                 AudioUsage::ASSISTANT,
+                                                 AudioUsage::NOTIFICATION,
+                                                 AudioUsage::ANNOUNCEMENT};
+
+const std::vector<AudioAttributes> kUnfadeableAudioAttributes = {
+        createAudioAttributes(AudioUsage::MEDIA, AudioContentType::UNKNOWN, "oem_specific_tag1")};
+
+const std::vector<api::FadeConfiguration> kFadeOutConfigurations = {
+        createFadeConfiguration(
+                500, createAudioAttributes(AudioUsage::ASSISTANT, AudioContentType::UNKNOWN,
+                                           "oem_specific_tag2")),
+        createFadeConfiguration(500, AudioUsage::MEDIA),
+        createFadeConfiguration(500, AudioUsage::GAME),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_SONIFICATION),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_ACCESSIBILITY),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE),
+        createFadeConfiguration(800, AudioUsage::ASSISTANT),
+        createFadeConfiguration(800, AudioUsage::ANNOUNCEMENT),
+};
+
+const std::vector<api::FadeConfiguration> kFadeInConfigurations = {
+        createFadeConfiguration(
+                1000, createAudioAttributes(AudioUsage::ASSISTANT, AudioContentType::UNKNOWN,
+                                            "oem_specific_tag2")),
+        createFadeConfiguration(1000, AudioUsage::MEDIA),
+        createFadeConfiguration(1000, AudioUsage::GAME),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_SONIFICATION),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_ACCESSIBILITY),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE),
+        createFadeConfiguration(800, AudioUsage::ASSISTANT),
+        createFadeConfiguration(800, AudioUsage::ANNOUNCEMENT),
+};
+
+const api::AudioFadeConfiguration kRelaxedFading = createAudioFadeConfiguration(
+        "relaxed fading", api::FadeState::FADE_STATE_ENABLED_DEFAULT, kFadeableUsages,
+        std::optional<std::vector<AudioContentType>>(
+                {AudioContentType::SPEECH, AudioContentType::SONIFICATION}),
+        kUnfadeableAudioAttributes, kFadeOutConfigurations, kFadeInConfigurations, 800, 500, 10000);
+
+const std::vector<AudioAttributes> kAggressiveUnfadeableAudioAttributes = {
+        createAudioAttributes(AudioUsage::MEDIA, AudioContentType::UNKNOWN, "oem_specific_tag1"),
+        createAudioAttributes(AudioUsage::ASSISTANT, AudioContentType::UNKNOWN,
+                              "oem_projection_service"),
+};
+
+const std::vector<api::FadeConfiguration> kAggressiveFadeOutConfigurations = {
+        createFadeConfiguration(150, AudioUsage::MEDIA),
+        createFadeConfiguration(150, AudioUsage::GAME),
+        createFadeConfiguration(400, AudioUsage::ASSISTANCE_SONIFICATION),
+        createFadeConfiguration(400, AudioUsage::ASSISTANCE_ACCESSIBILITY),
+        createFadeConfiguration(400, AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE),
+        createFadeConfiguration(400, AudioUsage::ASSISTANT),
+        createFadeConfiguration(400, AudioUsage::ANNOUNCEMENT),
+};
+
+const std::vector<api::FadeConfiguration> kAggressiveFadeInConfigurations = {
+        createFadeConfiguration(300, AudioUsage::MEDIA),
+        createFadeConfiguration(300, AudioUsage::GAME),
+        createFadeConfiguration(550, AudioUsage::ASSISTANCE_SONIFICATION),
+        createFadeConfiguration(550, AudioUsage::ASSISTANCE_ACCESSIBILITY),
+        createFadeConfiguration(550, AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE),
+        createFadeConfiguration(550, AudioUsage::ASSISTANT),
+        createFadeConfiguration(550, AudioUsage::ANNOUNCEMENT),
+};
+
+const api::AudioFadeConfiguration kAggressiveFading = createAudioFadeConfiguration(
+        "aggressive fading", api::FadeState::FADE_STATE_ENABLED_DEFAULT, kFadeableUsages,
+        std::optional<std::vector<AudioContentType>>(
+                {AudioContentType::SPEECH, AudioContentType::MUSIC}),
+        kAggressiveUnfadeableAudioAttributes, kAggressiveFadeOutConfigurations,
+        kAggressiveFadeInConfigurations);
+
+const api::AudioFadeConfiguration kDisabledFading =
+        createAudioFadeConfiguration("disabled fading", api::FadeState::FADE_STATE_DISABLED);
+
+const std::vector<api::FadeConfiguration> kDynamicFadeOutConfigurations = {
+        createFadeConfiguration(
+                500, createAudioAttributes(AudioUsage::ASSISTANT, AudioContentType::UNKNOWN,
+                                           "oem_specific_tag2")),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_SONIFICATION),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_ACCESSIBILITY),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE),
+        createFadeConfiguration(800, AudioUsage::ASSISTANT),
+        createFadeConfiguration(800, AudioUsage::ANNOUNCEMENT),
+};
+
+const std::vector<api::FadeConfiguration> kDynamicFadeInConfigurations = {
+        createFadeConfiguration(
+                1000, createAudioAttributes(AudioUsage::ASSISTANT, AudioContentType::UNKNOWN,
+                                            "oem_specific_tag2")),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_SONIFICATION),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_ACCESSIBILITY),
+        createFadeConfiguration(800, AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE),
+        createFadeConfiguration(800, AudioUsage::ASSISTANT),
+        createFadeConfiguration(800, AudioUsage::ANNOUNCEMENT),
+};
+
+const api::AudioFadeConfiguration kDynamicFading = createAudioFadeConfiguration(
+        "dynamic fading", api::FadeState::FADE_STATE_ENABLED_DEFAULT, kFadeableUsages,
+        std::optional<std::vector<AudioContentType>>(
+                {AudioContentType::SPEECH, AudioContentType::MOVIE}),
+        kUnfadeableAudioAttributes, kDynamicFadeOutConfigurations, kDynamicFadeInConfigurations,
+        800, 500);
+
+const api::AudioZoneFadeConfiguration kDefaultAudioConfigFading = createAudioZoneFadeConfiguration(
+        kRelaxedFading,
+        {createTransientFadeConfiguration(
+                 kAggressiveFading, {AudioUsage::VOICE_COMMUNICATION, AudioUsage::ANNOUNCEMENT,
+                                     AudioUsage::VEHICLE_STATUS, AudioUsage::SAFETY}),
+         createTransientFadeConfiguration(kDisabledFading, {AudioUsage::EMERGENCY})});
+
+const api::AudioZoneFadeConfiguration kDynamicDeviceAudioConfigFading =
+        createAudioZoneFadeConfiguration(
+                kDynamicFading,
+                {createTransientFadeConfiguration(
+                         kAggressiveFading,
+                         {AudioUsage::VOICE_COMMUNICATION, AudioUsage::ANNOUNCEMENT,
+                          AudioUsage::VEHICLE_STATUS, AudioUsage::SAFETY}),
+                 createTransientFadeConfiguration(kDisabledFading, {AudioUsage::EMERGENCY})});
+
+const api::AudioZoneContextInfo kMusicContextInfo =
+        createContextInfo("oem_music", {AudioUsage::MEDIA, AudioUsage::GAME, AudioUsage::UNKNOWN});
+const api::AudioZoneContextInfo kNotificationContextInfo = createContextInfo(
+        "oem_notification", {AudioUsage::NOTIFICATION, AudioUsage::NOTIFICATION_EVENT});
+const api::AudioZoneContextInfo kVoiceContextInfo = createContextInfo(
+        "oem_voice_command", {AudioUsage::ASSISTANT, AudioUsage::ASSISTANCE_ACCESSIBILITY,
+                              AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE});
+const api::AudioZoneContextInfo kCallContextInfo =
+        createContextInfo("oem_call", {AudioUsage::VOICE_COMMUNICATION, AudioUsage::CALL_ASSISTANT,
+                                       AudioUsage::VOICE_COMMUNICATION_SIGNALLING});
+const api::AudioZoneContextInfo kRingContextInfo =
+        createContextInfo("oem_call_ring", {AudioUsage::NOTIFICATION_TELEPHONY_RINGTONE});
+const api::AudioZoneContextInfo kAlarmContextInfo =
+        createContextInfo("oem_alarm", {AudioUsage::ALARM});
+const api::AudioZoneContextInfo kSystemContextInfo = createContextInfo(
+        "oem_system_sound",
+        {AudioUsage::ASSISTANCE_SONIFICATION, AudioUsage::EMERGENCY, AudioUsage::SAFETY,
+         AudioUsage::VEHICLE_STATUS, AudioUsage::ANNOUNCEMENT});
+const api::AudioZoneContextInfo kOemContextInfo = createContextInfo(
+        "oem_context", {createAudioAttributes(AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE,
+                                              AudioContentType::SPEECH, "oem=extension_8675309")});
+
+const std::vector<api::AudioZoneContextInfo> kSimpleCarAudioConfigurationContext = {
+        kOemContextInfo,  kMusicContextInfo, kNotificationContextInfo, kVoiceContextInfo,
+        kCallContextInfo, kRingContextInfo,  kAlarmContextInfo,        kSystemContextInfo};
+
+const api::AudioZoneContextInfo kDefaultMusicContextInfo =
+        createContextInfo("music", {AudioUsage::UNKNOWN, AudioUsage::MEDIA, AudioUsage::GAME}, 1);
+const api::AudioZoneContextInfo kDefaultNavContextInfo =
+        createContextInfo("navigation", {AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE}, 2);
+const api::AudioZoneContextInfo kDefaultVoiceContextInfo = createContextInfo(
+        "voice_command", {AudioUsage::ASSISTANCE_ACCESSIBILITY, AudioUsage::ASSISTANT}, 3);
+const api::AudioZoneContextInfo kDefaultRingContextInfo =
+        createContextInfo("call_ring", {AudioUsage::NOTIFICATION_TELEPHONY_RINGTONE}, 4);
+const api::AudioZoneContextInfo kDefaultCallContextInfo =
+        createContextInfo("call",
+                          {AudioUsage::VOICE_COMMUNICATION, AudioUsage::CALL_ASSISTANT,
+                           AudioUsage::VOICE_COMMUNICATION_SIGNALLING},
+                          5);
+const api::AudioZoneContextInfo kDefaultAlarmContextInfo =
+        createContextInfo("alarm", {AudioUsage::ALARM}, 6);
+const api::AudioZoneContextInfo kDefaultNotificationContextInfo = createContextInfo(
+        "notification", {AudioUsage::NOTIFICATION, AudioUsage::NOTIFICATION_EVENT}, 7);
+const api::AudioZoneContextInfo kDefaultSystemContextInfo =
+        createContextInfo("system_sound", {AudioUsage::ASSISTANCE_SONIFICATION}, 8);
+const api::AudioZoneContextInfo kDefaultEmergencyContextInfo =
+        createContextInfo("emergency", {AudioUsage::EMERGENCY}, 9);
+const api::AudioZoneContextInfo kDefaultSafetyContextInfo =
+        createContextInfo("safety", {AudioUsage::SAFETY}, 10);
+const api::AudioZoneContextInfo kDefaultVehicleStatusContextInfo =
+        createContextInfo("vehicle_status", {AudioUsage::VEHICLE_STATUS}, 11);
+const api::AudioZoneContextInfo kDefaultAnnouncementContextInfo =
+        createContextInfo("announcement", {AudioUsage::ANNOUNCEMENT}, 12);
+
+const std::vector<api::AudioZoneContextInfo> kDefaultCarAudioConfigurationContext = {
+        kDefaultMusicContextInfo,         kDefaultNavContextInfo,
+        kDefaultVoiceContextInfo,         kDefaultRingContextInfo,
+        kDefaultCallContextInfo,          kDefaultAlarmContextInfo,
+        kDefaultNotificationContextInfo,  kDefaultSystemContextInfo,
+        kDefaultEmergencyContextInfo,     kDefaultSafetyContextInfo,
+        kDefaultVehicleStatusContextInfo, kDefaultAnnouncementContextInfo};
+
+const api::VolumeActivationConfiguration kOnBootVolumeActivation =
+        createVolumeActivation("on_boot_config", api::VolumeInvocationType::ON_BOOT, 0, 80);
+const api::VolumeActivationConfiguration kOnSourceVolumeActivation = createVolumeActivation(
+        "on_source_changed_config", api::VolumeInvocationType::ON_SOURCE_CHANGED, 20, 80);
+const api::VolumeActivationConfiguration kOnPlayVolumeActivation = createVolumeActivation(
+        "on_playback_changed_config", api::VolumeInvocationType::ON_PLAYBACK_CHANGED, 10, 90);
+
+const AudioPort kBusMediaDevice = createAudioPort("BUS00_MEDIA", AudioDeviceType::OUT_BUS);
+const AudioPort kBTMediaDevice = createAudioPort("temp", AudioDeviceType::OUT_DEVICE, "bt-a2dp");
+const AudioPort kUSBMediaDevice = createAudioPort("", AudioDeviceType::OUT_HEADSET, "usb");
+
+const AudioPort kBusNavDevice = createAudioPort("BUS02_NAV_GUIDANCE", AudioDeviceType::OUT_BUS);
+const AudioPort kBusPhoneDevice = createAudioPort("BUS03_PHONE", AudioDeviceType::OUT_BUS);
+const AudioPort kBusSysDevice = createAudioPort("BUS01_SYS_NOTIFICATION", AudioDeviceType::OUT_BUS);
+
+const AudioPort kMirrorDevice1 = createAudioPort("mirror_bus_device_1", AudioDeviceType::OUT_BUS);
+const AudioPort kMirrorDevice2 = createAudioPort("mirror_bus_device_2", AudioDeviceType::OUT_BUS);
+const std::vector<AudioPort> kMirroringDevices = {kMirrorDevice1, kMirrorDevice2};
+
+const AudioPort kMirrorDeviceThree =
+        createAudioPort("mirror_bus_device_three", AudioDeviceType::OUT_BUS);
+const AudioPort kMirrorDeviceFour =
+        createAudioPort("mirror_bus_device_four", AudioDeviceType::OUT_BUS);
+const std::vector<AudioPort> kMultiZoneMirroringDevices = {kMirrorDeviceThree, kMirrorDeviceFour};
+
+const AudioPort kInFMTunerDevice = createAudioPort("fm_tuner", AudioDeviceType::IN_FM_TUNER);
+const AudioPort kInMicDevice = createAudioPort("built_in_mic", AudioDeviceType::IN_MICROPHONE);
+const AudioPort kInBusDevice = createAudioPort("in_bus_device", AudioDeviceType::IN_BUS);
+const std::vector<AudioPort> kInputDevices{kInFMTunerDevice, kInMicDevice, kInBusDevice};
+
+const api::VolumeGroupConfig kBusMediaVolumeGroup = createVolumeGroup(
+        "entertainment", kOnBootVolumeActivation, {createRoutes(kBusMediaDevice, {"oem_music"})});
+const api::VolumeGroupConfig kUSBMediaVolumeGroup = createVolumeGroup(
+        "entertainment", kOnBootVolumeActivation, {createRoutes(kUSBMediaDevice, {"oem_music"})});
+const api::VolumeGroupConfig kBTMediaVolumeGroup = createVolumeGroup(
+        "entertainment", kOnBootVolumeActivation, {createRoutes(kBTMediaDevice, {"oem_music"})});
+const api::VolumeGroupConfig kBusNavVolumeGroup =
+        createVolumeGroup("navvoicecommand", kOnSourceVolumeActivation,
+                          {createRoutes(kBusNavDevice, {"oem_voice_command"})});
+const api::VolumeGroupConfig kBusCallVolumeGroup =
+        createVolumeGroup("telringvol", kOnPlayVolumeActivation,
+                          {createRoutes(kBusPhoneDevice, {"oem_call", "oem_call_ring"})});
+const api::VolumeGroupConfig kBusSysVolumeGroup = createVolumeGroup(
+        "systemalarm", kOnSourceVolumeActivation,
+        {createRoutes(kBusSysDevice, {"oem_alarm", "oem_system_sound", "oem_notification"})});
+
+const api::AudioZoneConfig kAllBusZoneConfig = createAudioZoneConfig(
+        "primary zone config 0", kDefaultAudioConfigFading,
+        {kBusMediaVolumeGroup, kBusNavVolumeGroup, kBusCallVolumeGroup, kBusSysVolumeGroup}, true);
+const api::AudioZoneConfig kBTMediaZoneConfig = createAudioZoneConfig(
+        "primary zone BT media", kDynamicDeviceAudioConfigFading,
+        {kBTMediaVolumeGroup, kBusNavVolumeGroup, kBusCallVolumeGroup, kBusSysVolumeGroup});
+const api::AudioZoneConfig kUsBMediaZoneConfig = createAudioZoneConfig(
+        "primary zone USB media", kDynamicDeviceAudioConfigFading,
+        {kUSBMediaVolumeGroup, kBusNavVolumeGroup, kBusCallVolumeGroup, kBusSysVolumeGroup});
+
+const std::unordered_map<std::string, api::AudioZoneConfig> kConfigNameToZoneConfig = {
+        {kAllBusZoneConfig.name, kAllBusZoneConfig},
+        {kBTMediaZoneConfig.name, kBTMediaZoneConfig},
+        {kUsBMediaZoneConfig.name, kUsBMediaZoneConfig},
+};
+
+const api::AudioZoneConfig kDriverZoneConfig = createAudioZoneConfig(
+        "driver zone config 0", kDefaultAudioConfigFading,
+        {kBusMediaVolumeGroup, kBusNavVolumeGroup, kBusCallVolumeGroup, kBusSysVolumeGroup}, true);
+
+const api::AudioZone kDriverZone =
+        createAudioZone("driver zone", api::AudioZone::PRIMARY_AUDIO_ZONE,
+                        kSimpleCarAudioConfigurationContext, {kDriverZoneConfig});
+
+const api::AudioZoneFadeConfiguration kZoneAudioConfigFading = createAudioZoneFadeConfiguration(
+        kRelaxedFading,
+        {createTransientFadeConfiguration(kDisabledFading, {AudioUsage::EMERGENCY})});
+
+const AudioPort kBusFrontDevice = createAudioPort("BUS_FRONT", AudioDeviceType::OUT_BUS);
+const api::VolumeGroupConfig kFrontVolumeGroup = createVolumeGroup(
+        "entertainment", kOnBootVolumeActivation,
+        {createRoutes(kBusFrontDevice,
+                      {"oem_music", "oem_voice_command", "oem_call", "oem_call_ring", "oem_alarm",
+                       "oem_system_sound", "oem_notification"})});
+const api::AudioZoneConfig kFrontZoneConfig = createAudioZoneConfig(
+        "front passenger config 0", kZoneAudioConfigFading, {kFrontVolumeGroup}, true);
+const api::AudioZone kFrontZone =
+        createAudioZone("front passenger zone", api::AudioZone::PRIMARY_AUDIO_ZONE + 1,
+                        kSimpleCarAudioConfigurationContext, {kFrontZoneConfig});
+
+const AudioPort kBusRearDevice = createAudioPort("BUS_REAR", AudioDeviceType::OUT_BUS);
+const api::VolumeGroupConfig kRearVolumeGroup =
+        createVolumeGroup("entertainment", kOnBootVolumeActivation,
+                          {createRoutes(kBusRearDevice, {"oem_music", "oem_voice_command",
+                                                         "oem_call", "oem_call_ring", "oem_alarm",
+                                                         "oem_system_sound", "oem_notification"})});
+const api::AudioZoneConfig kRearZoneConfig = createAudioZoneConfig(
+        "rear seat config 0", kZoneAudioConfigFading, {kRearVolumeGroup}, true);
+const api::AudioZone kRearZone =
+        createAudioZone("rear seat zone", api::AudioZone::PRIMARY_AUDIO_ZONE + 2,
+                        kSimpleCarAudioConfigurationContext, {kRearZoneConfig});
+
+std::vector<api::AudioZone> kMultiZones = {kDriverZone, kFrontZone, kRearZone};
+
+void expectSameFadeConfiguration(const api::AudioFadeConfiguration& actual,
+                                 const api::AudioFadeConfiguration& expected,
+                                 const std::string& configName) {
+    EXPECT_EQ(actual.name, expected.name) << "Audio fade configuration for config " << configName;
+    const std::string fadeConfigInfo =
+            "fade config " + actual.name + " in config name " + configName;
+    EXPECT_EQ(actual.fadeState, expected.fadeState)
+            << "Audio fade config state for " << fadeConfigInfo;
+    EXPECT_EQ(actual.fadeInDurationMs, expected.fadeInDurationMs)
+            << "Audio fade in duration for " << fadeConfigInfo;
+    EXPECT_EQ(actual.fadeOutDurationMs, expected.fadeOutDurationMs)
+            << "Audio fade out duration for " << fadeConfigInfo;
+    EXPECT_EQ(actual.fadeInDelayedForOffendersMs, expected.fadeInDelayedForOffendersMs)
+            << "Audio fade in delayed for offenders duration for " << fadeConfigInfo;
+    EXPECT_THAT(actual.fadeableUsages, UnorderedElementsAreArray(expected.fadeableUsages))
+            << "Fadeable usages for " << fadeConfigInfo;
+    EXPECT_TRUE(actual.unfadeableContentTypes.has_value() ==
+                expected.unfadeableContentTypes.has_value())
+            << "Optional unfadeable for " << fadeConfigInfo;
+    if (actual.unfadeableContentTypes.has_value() && expected.unfadeableContentTypes.has_value()) {
+        EXPECT_THAT(actual.unfadeableContentTypes.value(),
+                    UnorderedElementsAreArray(expected.unfadeableContentTypes.value()))
+                << "Unfadeable content type for " << fadeConfigInfo;
+    }
+    EXPECT_THAT(actual.unfadableAudioAttributes,
+                UnorderedElementsAreArray(expected.unfadableAudioAttributes))
+            << "Unfadeable audio attributes type for " << fadeConfigInfo;
+    EXPECT_THAT(actual.fadeOutConfigurations,
+                UnorderedElementsAreArray(expected.fadeOutConfigurations))
+            << "Fade-out configurations for " << fadeConfigInfo;
+    EXPECT_THAT(actual.fadeInConfigurations,
+                UnorderedElementsAreArray(expected.fadeInConfigurations))
+            << "Fade-in configurations for " << fadeConfigInfo;
+}
+
+void expectSameAudioZoneFadeConfiguration(
+        const std::optional<api::AudioZoneFadeConfiguration>& actual,
+        const std::optional<api::AudioZoneFadeConfiguration>& expected,
+        const std::string& configName) {
+    if (!actual.has_value() || !expected.has_value()) {
+        EXPECT_EQ(actual.has_value(), expected.has_value())
+                << "Audio zone config " << configName << " fade configuration missing";
+        return;
+    }
+    const api::AudioZoneFadeConfiguration& actualConfig = actual.value();
+    const api::AudioZoneFadeConfiguration& expectedConfig = expected.value();
+    expectSameFadeConfiguration(actualConfig.defaultConfiguration,
+                                expectedConfig.defaultConfiguration, configName);
+    EXPECT_THAT(actualConfig.transientConfiguration,
+                UnorderedElementsAreArray(expectedConfig.transientConfiguration))
+            << "Transient fade configuration for config " << configName;
+}
+
+void expectSameAudioZoneConfiguration(const api::AudioZoneConfig& actual,
+                                      const api::AudioZoneConfig& expected) {
+    EXPECT_EQ(actual.isDefault, expected.isDefault)
+            << "Zone default's status do not match for config " << actual.name;
+    EXPECT_THAT(actual.volumeGroups, UnorderedElementsAreArray(expected.volumeGroups))
+            << "Volume groups for config " << actual.name;
+    expectSameAudioZoneFadeConfiguration(actual.fadeConfiguration, expected.fadeConfiguration,
+                                         actual.name);
+}
+
+class CarAudioConfigurationTest : public testing::Test {
+  protected:
+    void SetUp() override;
+    void TearDown() override;
+
+    std::unique_ptr<converter::CarAudioConfigurationXmlConverter> converter;
+
+  protected:
+    virtual std::string getCarAudioConfiguration() = 0;
+    virtual std::string getCarFadeConfiguration() = 0;
+};
+
+void CarAudioConfigurationTest::SetUp() {
+    converter = std::make_unique<converter::CarAudioConfigurationXmlConverter>(
+            getTestFilePath(getCarAudioConfiguration()),
+            getTestFilePath(getCarFadeConfiguration()));
+}
+
+void CarAudioConfigurationTest::TearDown() {
+    converter.reset();
+}
+
+class SimpleCarAudioConfigurationTest : public CarAudioConfigurationTest {
+    virtual std::string getCarAudioConfiguration() { return "simple_car_audio_configuration.xml"; }
+
+    virtual std::string getCarFadeConfiguration() { return "car_audio_fade_configuration.xml"; }
+};
+
+TEST_F(SimpleCarAudioConfigurationTest, TestLoadSimpleConfiguration) {
+    EXPECT_EQ(converter->getErrors(), "");
+
+    const auto audioDeviceConfigs = converter->getAudioDeviceConfiguration();
+    EXPECT_EQ(audioDeviceConfigs.routingConfig,
+              api::RoutingDeviceConfiguration::DYNAMIC_AUDIO_ROUTING);
+    EXPECT_FALSE(audioDeviceConfigs.useCoreAudioVolume);
+    EXPECT_TRUE(audioDeviceConfigs.useHalDuckingSignals);
+    EXPECT_TRUE(audioDeviceConfigs.useCarVolumeGroupMuting);
+
+    const auto& mirroringDevices = converter->getOutputMirroringDevices();
+
+    EXPECT_EQ(mirroringDevices.size(), 2) << "Mirroring device size";
+    for (const auto& mirroringDevice : mirroringDevices) {
+        const auto& it =
+                std::find(kMirroringDevices.begin(), kMirroringDevices.end(), mirroringDevice);
+        EXPECT_TRUE(it != kMirroringDevices.end())
+                << "Mirroring device not found " << mirroringDevice.toString();
+    }
+
+    const auto zones = converter->getAudioZones();
+    EXPECT_EQ(zones.size(), 1);
+
+    const auto& zone = zones.front();
+    EXPECT_EQ(zone.id, api::AudioZone::PRIMARY_AUDIO_ZONE);
+    EXPECT_EQ(zone.occupantZoneId, 0);
+    EXPECT_EQ(zone.name, "primary zone");
+
+    EXPECT_EQ(zone.audioZoneContext.audioContextInfos.size(),
+              kSimpleCarAudioConfigurationContext.size());
+    for (const auto& info : zone.audioZoneContext.audioContextInfos) {
+        const auto iterator = std::find(kSimpleCarAudioConfigurationContext.begin(),
+                                        kSimpleCarAudioConfigurationContext.end(), info);
+        EXPECT_TRUE(iterator != kSimpleCarAudioConfigurationContext.end())
+                << "Context name " << info.toString() << kMusicContextInfo.toString();
+    }
+
+    for (const auto& config : zone.audioZoneConfigs) {
+        const auto& iterator = kConfigNameToZoneConfig.find(config.name);
+        EXPECT_TRUE(iterator != kConfigNameToZoneConfig.end())
+                << "Zone config not found " << config.name;
+        expectSameAudioZoneConfiguration(config, iterator->second);
+    }
+
+    const auto& inputDevices = zone.inputAudioDevices;
+    EXPECT_EQ(inputDevices.size(), 3) << "Input devices";
+    for (const auto& inputDevice : inputDevices) {
+        const auto& it = std::find(kInputDevices.begin(), kInputDevices.end(), inputDevice);
+        EXPECT_TRUE(it != kInputDevices.end())
+                << "Input device " << inputDevice.toString() << " not found";
+    }
+}
+
+class TypeDeviceCarAudioConfigurationTest : public CarAudioConfigurationTest {
+    virtual std::string getCarAudioConfiguration() {
+        return "simple_car_audio_configuration_with_device_type.xml";
+    }
+
+    virtual std::string getCarFadeConfiguration() { return "car_audio_fade_configuration.xml"; }
+};
+
+TEST_F(TypeDeviceCarAudioConfigurationTest, TestLoadConfigurationWithDeviceType) {
+    EXPECT_EQ(converter->getErrors(), "");
+
+    const auto audioDeviceConfigs = converter->getAudioDeviceConfiguration();
+    EXPECT_EQ(audioDeviceConfigs.routingConfig,
+              api::RoutingDeviceConfiguration::DYNAMIC_AUDIO_ROUTING);
+    EXPECT_FALSE(audioDeviceConfigs.useCoreAudioVolume);
+    EXPECT_TRUE(audioDeviceConfigs.useHalDuckingSignals);
+    EXPECT_TRUE(audioDeviceConfigs.useCarVolumeGroupMuting);
+
+    const auto& mirroringDevices = converter->getOutputMirroringDevices();
+
+    EXPECT_EQ(mirroringDevices.size(), 2) << "Mirroring device size";
+    for (const auto& mirroringDevice : mirroringDevices) {
+        const auto& it =
+                std::find(kMirroringDevices.begin(), kMirroringDevices.end(), mirroringDevice);
+        EXPECT_TRUE(it != kMirroringDevices.end())
+                << "Mirroring device not found " << mirroringDevice.toString();
+    }
+
+    const auto zones = converter->getAudioZones();
+    EXPECT_EQ(zones.size(), 1);
+
+    const auto& zone = zones.front();
+    EXPECT_EQ(zone.id, api::AudioZone::PRIMARY_AUDIO_ZONE);
+    EXPECT_EQ(zone.occupantZoneId, 0);
+    EXPECT_EQ(zone.name, "primary zone");
+
+    EXPECT_EQ(zone.audioZoneContext.audioContextInfos.size(),
+              kSimpleCarAudioConfigurationContext.size());
+    for (const auto& info : zone.audioZoneContext.audioContextInfos) {
+        const auto iterator = std::find(kSimpleCarAudioConfigurationContext.begin(),
+                                        kSimpleCarAudioConfigurationContext.end(), info);
+        EXPECT_TRUE(iterator != kSimpleCarAudioConfigurationContext.end())
+                << "Context name " << info.toString() << kMusicContextInfo.toString();
+    }
+
+    for (const auto& config : zone.audioZoneConfigs) {
+        const auto& iterator = kConfigNameToZoneConfig.find(config.name);
+        EXPECT_TRUE(iterator != kConfigNameToZoneConfig.end())
+                << "Zone config not found " << config.name;
+        expectSameAudioZoneConfiguration(config, iterator->second);
+    }
+
+    const auto& inputDevices = zone.inputAudioDevices;
+    EXPECT_EQ(inputDevices.size(), 3) << "Input devices";
+    for (const auto& inputDevice : inputDevices) {
+        const auto& it = std::find(kInputDevices.begin(), kInputDevices.end(), inputDevice);
+        EXPECT_TRUE(it != kInputDevices.end())
+                << "Input device " << inputDevice.toString() << " not found";
+    }
+}
+
+class CarAudioConfigurationWithDefaultContextTest : public CarAudioConfigurationTest {
+    virtual std::string getCarAudioConfiguration() {
+        return "car_audio_configuration_with_default_context.xml";
+    }
+
+    virtual std::string getCarFadeConfiguration() { return ""; }
+};
+
+TEST_F(CarAudioConfigurationWithDefaultContextTest, TestLoadConfiguration) {
+    EXPECT_EQ(converter->getErrors(), "");
+    const auto& zones = converter->getAudioZones();
+    EXPECT_EQ(zones.size(), 1) << "Default audio context zones";
+    const auto& zone = zones.front();
+    const auto& context = zone.audioZoneContext;
+    EXPECT_THAT(context.audioContextInfos,
+                UnorderedElementsAreArray(kDefaultCarAudioConfigurationContext))
+            << "Default audio contexts";
+}
+
+class MultiZoneCarAudioConfigurationTest : public CarAudioConfigurationTest {
+    std::string getCarAudioConfiguration() override {
+        return "multi_zone_car_audio_configuration.xml";
+    }
+
+    std::string getCarFadeConfiguration() override { return "car_audio_fade_configuration.xml"; }
+};
+
+TEST_F(MultiZoneCarAudioConfigurationTest, TestLoadMultiZoneConfiguration) {
+    EXPECT_EQ(converter->getErrors(), "");
+
+    const auto audioDeviceConfigs = converter->getAudioDeviceConfiguration();
+    EXPECT_EQ(audioDeviceConfigs.routingConfig,
+              api::RoutingDeviceConfiguration::CONFIGURABLE_AUDIO_ENGINE_ROUTING);
+    EXPECT_TRUE(audioDeviceConfigs.useCoreAudioVolume);
+    EXPECT_FALSE(audioDeviceConfigs.useHalDuckingSignals);
+    EXPECT_FALSE(audioDeviceConfigs.useCarVolumeGroupMuting);
+
+    const auto& mirroringDevices = converter->getOutputMirroringDevices();
+
+    EXPECT_THAT(mirroringDevices, UnorderedElementsAreArray(kMultiZoneMirroringDevices));
+
+    const auto zones = converter->getAudioZones();
+    EXPECT_THAT(zones, UnorderedElementsAreArray(kMultiZones));
+}
+
+class MalformedCarAudioConfigurationTest : public testing::Test {
+  protected:
+    void TearDown() override;
+
+    std::unique_ptr<converter::CarAudioConfigurationXmlConverter> converter;
+};
+
+void MalformedCarAudioConfigurationTest::TearDown() {
+    converter.reset();
+}
+
+TEST_F(MalformedCarAudioConfigurationTest, TestLoadEmptyConfiguration) {
+    converter =
+            std::make_unique<converter::CarAudioConfigurationXmlConverter>(getTestFilePath(""), "");
+    EXPECT_THAT(converter->getErrors(), ContainsRegex("Configuration file .+ is not readable"))
+            << "Empty configuration file";
+
+    const auto audioDeviceConfigs = converter->getAudioDeviceConfiguration();
+    EXPECT_EQ(audioDeviceConfigs.routingConfig,
+              api::RoutingDeviceConfiguration::DEFAULT_AUDIO_ROUTING)
+            << "Default configuration for empty file";
+}
+
+TEST_F(MalformedCarAudioConfigurationTest, TestLoadNonExistingConfiguration) {
+    converter = std::make_unique<converter::CarAudioConfigurationXmlConverter>(
+            getTestFilePath("non_existing_file.xml"), "");
+    EXPECT_THAT(converter->getErrors(), ContainsRegex("Configuration file .+ is not readable"))
+            << "Empty configuration file";
+
+    const auto audioDeviceConfigs = converter->getAudioDeviceConfiguration();
+    EXPECT_EQ(audioDeviceConfigs.routingConfig,
+              api::RoutingDeviceConfiguration::DEFAULT_AUDIO_ROUTING)
+            << "Default configuration for empty file";
+}
+
+TEST_F(MalformedCarAudioConfigurationTest, TestLoadMalforedConfiguration) {
+    converter = std::make_unique<converter::CarAudioConfigurationXmlConverter>(
+            getTestFilePath("car_audio_configuration_without_configuration.xml"), "");
+    EXPECT_THAT(converter->getErrors(),
+                ContainsRegex("Configuration file .+ does not have any configurations"))
+            << "Configuration file without configurations";
+
+    const auto audioDeviceConfigs = converter->getAudioDeviceConfiguration();
+    EXPECT_EQ(audioDeviceConfigs.routingConfig,
+              api::RoutingDeviceConfiguration::DEFAULT_AUDIO_ROUTING)
+            << "Default configuration for malformed file";
+}
+
+TEST_F(MalformedCarAudioConfigurationTest, TestLoadConfigurationWithoutZones) {
+    converter = std::make_unique<converter::CarAudioConfigurationXmlConverter>(
+            getTestFilePath("car_audio_configuration_without_audio_zone.xml"), "");
+    EXPECT_THAT(converter->getErrors(), ContainsRegex("Audio zones not found in file"))
+            << "Configuration file without zones";
+
+    const auto audioDeviceConfigs = converter->getAudioDeviceConfiguration();
+    EXPECT_EQ(audioDeviceConfigs.routingConfig,
+              api::RoutingDeviceConfiguration::DEFAULT_AUDIO_ROUTING)
+            << "Default configuration for file without zones";
+}
+
+TEST_F(MalformedCarAudioConfigurationTest, TestLoadConfigurationWithMissingZones) {
+    converter = std::make_unique<converter::CarAudioConfigurationXmlConverter>(
+            getTestFilePath("car_audio_configuration_with_missing_zones.xml"), "");
+    EXPECT_THAT(converter->getErrors(), ContainsRegex("Error parsing audio zone"))
+            << "Configuration file with missing zones";
+
+    const auto audioDeviceConfigs = converter->getAudioDeviceConfiguration();
+    EXPECT_EQ(audioDeviceConfigs.routingConfig,
+              api::RoutingDeviceConfiguration::DEFAULT_AUDIO_ROUTING)
+            << "Default configuration for file with missing zones";
+}
+
+}  // namespace
diff --git a/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_with_default_context.xml b/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_with_default_context.xml
new file mode 100644
index 0000000..80cb5cd
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_with_default_context.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<carAudioConfiguration version="4">
+    <zones>
+        <zone name="primary zone" isPrimary="true">
+            <zoneConfigs>
+                <zoneConfig name="primary zone config" isDefault="true">
+                    <volumeGroups>
+                        <group name="entertainment" >
+                            <device address="BUS00_MEDIA">
+                                <context context="MUSIC"/>
+                            </device>
+                        </group>
+                        <group name="navvoicecommand" >
+                            <device address="BUS02_NAV_GUIDANCE">
+                                <context context="NAVIGATION"/>
+                                <context context="VOICE_COMMAND"/>
+                            </device>
+                        </group>
+                        <group name="telringvol" >
+                            <device address="BUS03_PHONE">
+                                <context context="CALL"/>
+                                <context context="CALL_RING"/>
+                            </device>
+                        </group>
+                        <group name="alarm" >
+                            <device address="BUS01_NOTIFICATION">
+                                <context context="ALARM"/>
+                                <context context="NOTIFICATION"/>
+                            </device>
+                        </group>
+                        <group name="system" >
+                            <device address="BUS05_SYSTEM">
+                                <context context="SYSTEM_SOUND"/>
+                                <context context="EMERGENCY"/>
+                                <context context="SAFETY"/>
+                                <context context="VEHICLE_STATUS"/>
+                                <context context="ANNOUNCEMENT"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                </zoneConfig>
+            </zoneConfigs>
+        </zone>
+    </zones>
+</carAudioConfiguration>
diff --git a/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_with_missing_zones.xml b/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_with_missing_zones.xml
new file mode 100644
index 0000000..a5880b3
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_with_missing_zones.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<carAudioConfiguration version="4">
+    <deviceConfigurations>
+        <deviceConfiguration name="useHalDuckingSignals" value="true" />
+        <deviceConfiguration name="useCoreAudioRouting" value="false" />
+        <deviceConfiguration name="useCoreAudioVolume" value="false" />
+        <deviceConfiguration name="useCarVolumeGroupMuting" value="true" />
+    </deviceConfigurations>
+    <oemContexts>
+        <oemContext name="oem_context">
+            <audioAttributes>
+                <audioAttribute usage="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"
+                    contentType="AUDIO_CONTENT_TYPE_SPEECH"
+                    tags="oem=extension_8675309" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_music">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_MEDIA" />
+                <usage value="AUDIO_USAGE_GAME" />
+                <usage value="AUDIO_USAGE_UNKNOWN" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_notification">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION" />
+                <usage value="AUDIO_USAGE_NOTIFICATION_EVENT" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_voice_command">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANT" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                <usage value="AUDIO_USAGE_CALL_ASSISTANT" />
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call_ring">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_alarm">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ALARM" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_system_sound">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                <usage value="AUDIO_USAGE_EMERGENCY" />
+                <usage value="AUDIO_USAGE_SAFETY" />
+                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+            </audioAttributes>
+        </oemContext>
+    </oemContexts>
+    <activationVolumeConfigs>
+        <activationVolumeConfig name="on_boot_config">
+            <activationVolumeConfigEntry maxActivationVolumePercentage="80" invocationType="onBoot" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_source_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="20" maxActivationVolumePercentage="80" invocationType="onSourceChanged" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_playback_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="10" maxActivationVolumePercentage="90" invocationType="onPlaybackChanged" />
+        </activationVolumeConfig>
+    </activationVolumeConfigs>
+    <mirroringDevices>
+        <mirroringDevice address="mirror_bus_device_1"/>
+        <mirroringDevice address="mirror_bus_device_2"/>
+    </mirroringDevices>
+    <zones>
+    </zones>
+</carAudioConfiguration>
diff --git a/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_without_audio_zone.xml b/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_without_audio_zone.xml
new file mode 100644
index 0000000..1e50e6e
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_without_audio_zone.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<carAudioConfiguration version="4">
+    <deviceConfigurations>
+        <deviceConfiguration name="useHalDuckingSignals" value="true" />
+        <deviceConfiguration name="useCoreAudioRouting" value="false" />
+        <deviceConfiguration name="useCoreAudioVolume" value="false" />
+        <deviceConfiguration name="useCarVolumeGroupMuting" value="true" />
+    </deviceConfigurations>
+    <oemContexts>
+        <oemContext name="oem_context">
+            <audioAttributes>
+                <audioAttribute usage="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"
+                    contentType="AUDIO_CONTENT_TYPE_SPEECH"
+                    tags="oem=extension_8675309" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_music">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_MEDIA" />
+                <usage value="AUDIO_USAGE_GAME" />
+                <usage value="AUDIO_USAGE_UNKNOWN" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_notification">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION" />
+                <usage value="AUDIO_USAGE_NOTIFICATION_EVENT" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_voice_command">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANT" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                <usage value="AUDIO_USAGE_CALL_ASSISTANT" />
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call_ring">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_alarm">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ALARM" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_system_sound">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                <usage value="AUDIO_USAGE_EMERGENCY" />
+                <usage value="AUDIO_USAGE_SAFETY" />
+                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+            </audioAttributes>
+        </oemContext>
+    </oemContexts>
+    <activationVolumeConfigs>
+        <activationVolumeConfig name="on_boot_config">
+            <activationVolumeConfigEntry maxActivationVolumePercentage="80" invocationType="onBoot" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_source_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="20" maxActivationVolumePercentage="80" invocationType="onSourceChanged" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_playback_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="10" maxActivationVolumePercentage="90" invocationType="onPlaybackChanged" />
+        </activationVolumeConfig>
+    </activationVolumeConfigs>
+    <mirroringDevices>
+        <mirroringDevice address="mirror_bus_device_1"/>
+        <mirroringDevice address="mirror_bus_device_2"/>
+    </mirroringDevices>
+</carAudioConfiguration>
diff --git a/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_without_configuration.xml b/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_without_configuration.xml
new file mode 100644
index 0000000..4f50ca2
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/car_audio_configuration_without_configuration.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<nonCarAudioConfiguration version="4">
+
+</nonCarAudioConfiguration>
diff --git a/automotive/audiocontrol/aidl/default/converter/test/car_audio_fade_configuration.xml b/automotive/audiocontrol/aidl/default/converter/test/car_audio_fade_configuration.xml
new file mode 100644
index 0000000..249f915
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/car_audio_fade_configuration.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<carAudioFadeConfiguration version="1">
+    <configs>
+        <config name="relaxed fading" defaultFadeOutDurationInMillis="800" defaultFadeInDurationInMillis="500" defaultFadeInDelayForOffenders="10000" >
+            <fadeState value="1" />
+            <fadeableUsages>
+                <usage value="AUDIO_USAGE_MEDIA" />
+                <usage value="AUDIO_USAGE_GAME" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                <usage value="AUDIO_USAGE_ASSISTANT" />
+                <usage value="AUDIO_USAGE_NOTIFICATION" />
+                <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+            </fadeableUsages>
+            <unfadeableContentTypes>
+                <contentType value="AUDIO_CONTENT_TYPE_SPEECH" />
+                <contentType value="AUDIO_CONTENT_TYPE_SONIFICATION" />
+            </unfadeableContentTypes>
+            <unfadeableAudioAttributes>
+                <audioAttributes>
+                    <audioAttribute usage="AUDIO_USAGE_MEDIA" tags="oem_specific_tag1" />
+                </audioAttributes>
+            </unfadeableAudioAttributes>
+            <fadeOutConfigurations>
+                <fadeConfiguration fadeDurationMillis="500">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_MEDIA" />
+                        <usage value="AUDIO_USAGE_GAME" />
+                        <audioAttribute usage="AUDIO_USAGE_ASSISTANT" tags="oem_specific_tag2" />
+                    </audioAttributes>
+                </fadeConfiguration>
+                <fadeConfiguration fadeDurationMillis="800">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                        <usage value="AUDIO_USAGE_ASSISTANT" />
+                        <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+                    </audioAttributes>
+                </fadeConfiguration>
+            </fadeOutConfigurations>
+            <fadeInConfigurations>
+                <fadeConfiguration fadeDurationMillis="1000">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_MEDIA" />
+                        <usage value="AUDIO_USAGE_GAME" />
+                        <audioAttribute usage="AUDIO_USAGE_ASSISTANT" tags="oem_specific_tag2" />
+                    </audioAttributes>
+                </fadeConfiguration>
+                <fadeConfiguration fadeDurationMillis="800">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                        <usage value="AUDIO_USAGE_ASSISTANT" />
+                        <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+                    </audioAttributes>
+                </fadeConfiguration>
+            </fadeInConfigurations>
+        </config>
+        <config name="aggressive fading">
+            <fadeState value="FADE_STATE_ENABLED_DEFAULT" />
+            <fadeableUsages>
+                <usage value="AUDIO_USAGE_MEDIA" />
+                <usage value="AUDIO_USAGE_GAME" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                <usage value="AUDIO_USAGE_ASSISTANT" />
+                <usage value="AUDIO_USAGE_NOTIFICATION" />
+                <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+            </fadeableUsages>
+            <unfadeableContentTypes>
+                <contentType value="AUDIO_CONTENT_TYPE_SPEECH" />
+                <contentType value="AUDIO_CONTENT_TYPE_MUSIC" />
+            </unfadeableContentTypes>
+            <unfadeableAudioAttributes>
+                <audioAttributes>
+                    <audioAttribute usage="AUDIO_USAGE_MEDIA" tags="oem_specific_tag1" />
+                    <audioAttribute usage="AUDIO_USAGE_ASSISTANT" tags="oem_projection_service" />
+                </audioAttributes>
+            </unfadeableAudioAttributes>
+            <fadeOutConfigurations>
+                <fadeConfiguration fadeDurationMillis="150">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_MEDIA" />
+                        <usage value="AUDIO_USAGE_GAME" />
+                    </audioAttributes>
+                </fadeConfiguration>
+                <fadeConfiguration fadeDurationMillis="400">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                        <usage value="AUDIO_USAGE_ASSISTANT" />
+                        <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+                    </audioAttributes>
+                </fadeConfiguration>
+            </fadeOutConfigurations>
+            <fadeInConfigurations>
+                <fadeConfiguration fadeDurationMillis="300">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_MEDIA" />
+                        <usage value="AUDIO_USAGE_GAME" />
+                    </audioAttributes>
+                </fadeConfiguration>
+                <fadeConfiguration fadeDurationMillis="550">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                        <usage value="AUDIO_USAGE_ASSISTANT" />
+                        <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+                    </audioAttributes>
+                </fadeConfiguration>
+            </fadeInConfigurations>
+        </config>
+        <config name="disabled fading">
+            <fadeState value="0" />
+        </config>
+        <config name="dynamic fading" defaultFadeOutDurationInMillis="800" defaultFadeInDurationInMillis="500">
+            <fadeState value="1" />
+            <fadeableUsages>
+                <usage value="AUDIO_USAGE_MEDIA" />
+                <usage value="AUDIO_USAGE_GAME" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                <usage value="AUDIO_USAGE_ASSISTANT" />
+                <usage value="AUDIO_USAGE_NOTIFICATION" />
+                <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+            </fadeableUsages>
+            <unfadeableContentTypes>
+                <contentType value="AUDIO_CONTENT_TYPE_SPEECH" />
+                <contentType value="AUDIO_CONTENT_TYPE_MOVIE" />
+            </unfadeableContentTypes>
+            <unfadeableAudioAttributes>
+                <audioAttributes>
+                    <audioAttribute usage="AUDIO_USAGE_MEDIA" tags="oem_specific_tag1" />
+                </audioAttributes>
+            </unfadeableAudioAttributes>
+            <fadeOutConfigurations>
+                <fadeConfiguration fadeDurationMillis="500">
+                    <audioAttributes>
+                        <audioAttribute usage="AUDIO_USAGE_ASSISTANT" tags="oem_specific_tag2" />
+                    </audioAttributes>
+                </fadeConfiguration>
+                <fadeConfiguration fadeDurationMillis="800">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                        <usage value="AUDIO_USAGE_ASSISTANT" />
+                        <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+                    </audioAttributes>
+                </fadeConfiguration>
+            </fadeOutConfigurations>
+            <fadeInConfigurations>
+                <fadeConfiguration fadeDurationMillis="1000">
+                    <audioAttributes>
+                        <audioAttribute usage="AUDIO_USAGE_ASSISTANT" tags="oem_specific_tag2" />
+                    </audioAttributes>
+                </fadeConfiguration>
+                <fadeConfiguration fadeDurationMillis="800">
+                    <audioAttributes>
+                        <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                        <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+                        <usage value="AUDIO_USAGE_ASSISTANT" />
+                        <usage value="AUDIO_USAGE_ANNOUNCEMENT"/>
+                    </audioAttributes>
+                </fadeConfiguration>
+            </fadeInConfigurations>
+        </config>
+    </configs>
+</carAudioFadeConfiguration>
diff --git a/automotive/audiocontrol/aidl/default/converter/test/multi_zone_car_audio_configuration.xml b/automotive/audiocontrol/aidl/default/converter/test/multi_zone_car_audio_configuration.xml
new file mode 100644
index 0000000..f0c9081
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/multi_zone_car_audio_configuration.xml
@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<carAudioConfiguration version="4">
+    <deviceConfigurations>
+        <deviceConfiguration name="useHalDuckingSignals" value="false" />
+        <deviceConfiguration name="useCoreAudioRouting" value="true" />
+        <deviceConfiguration name="useCoreAudioVolume" value="true" />
+        <deviceConfiguration name="useCarVolumeGroupMuting" value="false" />
+    </deviceConfigurations>
+    <oemContexts>
+        <oemContext name="oem_context">
+            <audioAttributes>
+                <audioAttribute usage="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"
+                    contentType="AUDIO_CONTENT_TYPE_SPEECH"
+                    tags="oem=extension_8675309" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_music">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_MEDIA" />
+                <usage value="AUDIO_USAGE_GAME" />
+                <usage value="AUDIO_USAGE_UNKNOWN" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_notification">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION" />
+                <usage value="AUDIO_USAGE_NOTIFICATION_EVENT" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_voice_command">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANT" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                <usage value="AUDIO_USAGE_CALL_ASSISTANT" />
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call_ring">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_alarm">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ALARM" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_system_sound">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                <usage value="AUDIO_USAGE_EMERGENCY" />
+                <usage value="AUDIO_USAGE_SAFETY" />
+                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+            </audioAttributes>
+        </oemContext>
+    </oemContexts>
+    <activationVolumeConfigs>
+        <activationVolumeConfig name="on_boot_config">
+            <activationVolumeConfigEntry maxActivationVolumePercentage="80" invocationType="onBoot" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_source_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="20" maxActivationVolumePercentage="80" invocationType="onSourceChanged" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_playback_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="10" maxActivationVolumePercentage="90" invocationType="onPlaybackChanged" />
+        </activationVolumeConfig>
+    </activationVolumeConfigs>
+    <mirroringDevices>
+        <mirroringDevice address="mirror_bus_device_three"/>
+        <mirroringDevice address="mirror_bus_device_four"/>
+    </mirroringDevices>
+    <zones>
+        <zone name="driver zone" isPrimary="true" audioZoneId="0" occupantZoneId="0">
+            <zoneConfigs>
+                <zoneConfig name="driver zone config 0" isDefault="true">
+                    <volumeGroups>
+                        <group name="entertainment" activationConfig="on_boot_config">
+                            <device address="BUS00_MEDIA">
+                                <context context="oem_music"/>
+                            </device>
+                        </group>
+                        <group name="navvoicecommand" activationConfig="on_source_changed_config">
+                            <device address="BUS02_NAV_GUIDANCE">
+                                <context context="oem_voice_command"/>
+                            </device>
+                        </group>
+                        <group name="telringvol" activationConfig="on_playback_changed_config">
+                            <device address="BUS03_PHONE">
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                            </device>
+                        </group>
+                        <group name="systemalarm" activationConfig="on_source_changed_config">
+                            <device address="BUS01_SYS_NOTIFICATION">
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="relaxed fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="aggressive fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+                                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                                <usage value="AUDIO_USAGE_SAFETY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+            </zoneConfigs>
+        </zone>
+        <zone name="front passenger zone" audioZoneId="1" occupantZoneId="1">
+            <zoneConfigs>
+                <zoneConfig name="front passenger config 0" isDefault="true">
+                    <volumeGroups>
+                        <group  name="entertainment" activationConfig="on_boot_config">
+                            <device address="BUS_FRONT">
+                                <context context="oem_music"/>
+                                <context context="oem_voice_command"/>
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="relaxed fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+            </zoneConfigs>
+        </zone>
+        <zone name="rear seat zone" audioZoneId="2" occupantZoneId="2">
+            <zoneConfigs>
+                <zoneConfig name="rear seat config 0" isDefault="true">
+                    <volumeGroups>
+                        <group  name="entertainment" activationConfig="on_boot_config">
+                            <device address="BUS_REAR">
+                                <context context="oem_music"/>
+                                <context context="oem_voice_command"/>
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="relaxed fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+            </zoneConfigs>
+        </zone>
+    </zones>
+</carAudioConfiguration>
diff --git a/automotive/audiocontrol/aidl/default/converter/test/simple_car_audio_configuration.xml b/automotive/audiocontrol/aidl/default/converter/test/simple_car_audio_configuration.xml
new file mode 100644
index 0000000..a6f5317
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/simple_car_audio_configuration.xml
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<carAudioConfiguration version="4">
+    <deviceConfigurations>
+        <deviceConfiguration name="useHalDuckingSignals" value="true" />
+        <deviceConfiguration name="useCoreAudioRouting" value="false" />
+        <deviceConfiguration name="useCoreAudioVolume" value="false" />
+        <deviceConfiguration name="useCarVolumeGroupMuting" value="true" />
+    </deviceConfigurations>
+    <oemContexts>
+        <oemContext name="oem_context">
+            <audioAttributes>
+                <audioAttribute usage="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"
+                    contentType="AUDIO_CONTENT_TYPE_SPEECH"
+                    tags="oem=extension_8675309" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_music">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_MEDIA" />
+                <usage value="AUDIO_USAGE_GAME" />
+                <usage value="AUDIO_USAGE_UNKNOWN" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_notification">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION" />
+                <usage value="AUDIO_USAGE_NOTIFICATION_EVENT" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_voice_command">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANT" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                <usage value="AUDIO_USAGE_CALL_ASSISTANT" />
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call_ring">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_alarm">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ALARM" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_system_sound">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                <usage value="AUDIO_USAGE_EMERGENCY" />
+                <usage value="AUDIO_USAGE_SAFETY" />
+                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+            </audioAttributes>
+        </oemContext>
+    </oemContexts>
+    <activationVolumeConfigs>
+        <activationVolumeConfig name="on_boot_config">
+            <activationVolumeConfigEntry maxActivationVolumePercentage="80" invocationType="onBoot" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_source_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="20" maxActivationVolumePercentage="80" invocationType="onSourceChanged" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_playback_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="10" maxActivationVolumePercentage="90" invocationType="onPlaybackChanged" />
+        </activationVolumeConfig>
+    </activationVolumeConfigs>
+    <mirroringDevices>
+        <mirroringDevice address="mirror_bus_device_1"/>
+        <mirroringDevice address="mirror_bus_device_2"/>
+    </mirroringDevices>
+    <zones>
+        <zone name="primary zone" isPrimary="true" audioZoneId="0" occupantZoneId="0">
+            <inputDevices>
+                <inputDevice address="fm_tuner" type="AUDIO_DEVICE_IN_FM_TUNER" />
+                <inputDevice address="built_in_mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" />
+                <inputDevice address="in_bus_device" type="AUDIO_DEVICE_IN_BUS" />
+            </inputDevices>
+            <zoneConfigs>
+                <zoneConfig name="primary zone config 0" isDefault="true">
+                    <volumeGroups>
+                        <group name="entertainment" activationConfig="on_boot_config">
+                            <device address="BUS00_MEDIA">
+                                <context context="oem_music"/>
+                            </device>
+                        </group>
+                        <group name="navvoicecommand" activationConfig="on_source_changed_config">
+                            <device address="BUS02_NAV_GUIDANCE">
+                                <context context="oem_voice_command"/>
+                            </device>
+                        </group>
+                        <group name="telringvol" activationConfig="on_playback_changed_config">
+                            <device address="BUS03_PHONE">
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                            </device>
+                        </group>
+                        <group name="systemalarm" activationConfig="on_source_changed_config">
+                            <device address="BUS01_SYS_NOTIFICATION">
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="relaxed fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="aggressive fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+                                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                                <usage value="AUDIO_USAGE_SAFETY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+                <zoneConfig name="primary zone BT media">
+                    <volumeGroups>
+                        <group name="entertainment" activationConfig="on_boot_config">
+                            <device type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" address="temp">
+                                <context context="oem_music"/>
+                            </device>
+                        </group>
+                        <group name="navvoicecommand" activationConfig="on_source_changed_config">
+                            <device address="BUS02_NAV_GUIDANCE">
+                                <context context="oem_voice_command"/>
+                            </device>
+                        </group>
+                        <group name="telringvol" activationConfig="on_playback_changed_config">
+                            <device address="BUS03_PHONE">
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                            </device>
+                        </group>
+                        <group name="systemalarm" activationConfig="on_source_changed_config">
+                            <device address="BUS01_SYS_NOTIFICATION">
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="dynamic fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="aggressive fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+                                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                                <usage value="AUDIO_USAGE_SAFETY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+                <zoneConfig name="primary zone USB media">
+                    <volumeGroups>
+                        <group name="entertainment" activationConfig="on_boot_config">
+                            <device type="AUDIO_DEVICE_OUT_USB_HEADSET">
+                                <context context="oem_music"/>
+                            </device>
+                        </group>
+                        <group name="navvoicecommand" activationConfig="on_source_changed_config">
+                            <device address="BUS02_NAV_GUIDANCE">
+                                <context context="oem_voice_command"/>
+                            </device>
+                        </group>
+                        <group name="telringvol" activationConfig="on_playback_changed_config">
+                            <device address="BUS03_PHONE">
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                            </device>
+                        </group>
+                        <group name="systemalarm" activationConfig="on_source_changed_config">
+                            <device address="BUS01_SYS_NOTIFICATION">
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="dynamic fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="aggressive fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+                                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                                <usage value="AUDIO_USAGE_SAFETY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+            </zoneConfigs>
+        </zone>
+    </zones>
+</carAudioConfiguration>
diff --git a/automotive/audiocontrol/aidl/default/converter/test/simple_car_audio_configuration_with_device_type.xml b/automotive/audiocontrol/aidl/default/converter/test/simple_car_audio_configuration_with_device_type.xml
new file mode 100644
index 0000000..eec9db9
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/converter/test/simple_car_audio_configuration_with_device_type.xml
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<carAudioConfiguration version="4">
+    <deviceConfigurations>
+        <deviceConfiguration name="useHalDuckingSignals" value="true" />
+        <deviceConfiguration name="useCoreAudioRouting" value="false" />
+        <deviceConfiguration name="useCoreAudioVolume" value="false" />
+        <deviceConfiguration name="useCarVolumeGroupMuting" value="true" />
+    </deviceConfigurations>
+    <oemContexts>
+        <oemContext name="oem_context">
+            <audioAttributes>
+                <audioAttribute usage="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"
+                    contentType="AUDIO_CONTENT_TYPE_SPEECH"
+                    tags="oem=extension_8675309" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_music">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_MEDIA" />
+                <usage value="AUDIO_USAGE_GAME" />
+                <usage value="AUDIO_USAGE_UNKNOWN" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_notification">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION" />
+                <usage value="AUDIO_USAGE_NOTIFICATION_EVENT" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_voice_command">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANT" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
+                <usage value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                <usage value="AUDIO_USAGE_CALL_ASSISTANT" />
+                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_call_ring">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_alarm">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ALARM" />
+            </audioAttributes>
+        </oemContext>
+        <oemContext name="oem_system_sound">
+            <audioAttributes>
+                <usage value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
+                <usage value="AUDIO_USAGE_EMERGENCY" />
+                <usage value="AUDIO_USAGE_SAFETY" />
+                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+            </audioAttributes>
+        </oemContext>
+    </oemContexts>
+    <activationVolumeConfigs>
+        <activationVolumeConfig name="on_boot_config">
+            <activationVolumeConfigEntry maxActivationVolumePercentage="80" invocationType="onBoot" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_source_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="20" maxActivationVolumePercentage="80" invocationType="onSourceChanged" />
+        </activationVolumeConfig>
+        <activationVolumeConfig name="on_playback_changed_config">
+            <activationVolumeConfigEntry minActivationVolumePercentage="10" maxActivationVolumePercentage="90" invocationType="onPlaybackChanged" />
+        </activationVolumeConfig>
+    </activationVolumeConfigs>
+    <mirroringDevices>
+        <mirroringDevice address="mirror_bus_device_1"/>
+        <mirroringDevice address="mirror_bus_device_2"/>
+    </mirroringDevices>
+    <zones>
+        <zone name="primary zone" isPrimary="true" audioZoneId="0" occupantZoneId="0">
+            <inputDevices>
+                <inputDevice address="fm_tuner" type="AUDIO_DEVICE_IN_FM_TUNER" />
+                <inputDevice address="built_in_mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" />
+                <inputDevice address="in_bus_device" type="AUDIO_DEVICE_IN_BUS" />
+            </inputDevices>
+            <zoneConfigs>
+                <zoneConfig name="primary zone config 0" isDefault="true">
+                    <volumeGroups>
+                        <group name="entertainment" activationConfig="on_boot_config">
+                            <device address="BUS00_MEDIA">
+                                <context context="oem_music"/>
+                            </device>
+                        </group>
+                        <group name="navvoicecommand" activationConfig="on_source_changed_config">
+                            <device address="BUS02_NAV_GUIDANCE">
+                                <context context="oem_voice_command"/>
+                            </device>
+                        </group>
+                        <group name="telringvol" activationConfig="on_playback_changed_config">
+                            <device address="BUS03_PHONE">
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                            </device>
+                        </group>
+                        <group name="systemalarm" activationConfig="on_source_changed_config">
+                            <device address="BUS01_SYS_NOTIFICATION">
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="relaxed fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="aggressive fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+                                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                                <usage value="AUDIO_USAGE_SAFETY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+                <zoneConfig name="primary zone BT media">
+                    <volumeGroups>
+                        <group name="entertainment" activationConfig="on_boot_config">
+                            <device type="TYPE_BLUETOOTH_A2DP" address="temp">
+                                <context context="oem_music"/>
+                            </device>
+                        </group>
+                        <group name="navvoicecommand" activationConfig="on_source_changed_config">
+                            <device address="BUS02_NAV_GUIDANCE">
+                                <context context="oem_voice_command"/>
+                            </device>
+                        </group>
+                        <group name="telringvol" activationConfig="on_playback_changed_config">
+                            <device address="BUS03_PHONE">
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                            </device>
+                        </group>
+                        <group name="systemalarm" activationConfig="on_source_changed_config">
+                            <device address="BUS01_SYS_NOTIFICATION">
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="dynamic fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="aggressive fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+                                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                                <usage value="AUDIO_USAGE_SAFETY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+                <zoneConfig name="primary zone USB media">
+                    <volumeGroups>
+                        <group name="entertainment" activationConfig="on_boot_config">
+                            <device type="TYPE_USB_HEADSET">
+                                <context context="oem_music"/>
+                            </device>
+                        </group>
+                        <group name="navvoicecommand" activationConfig="on_source_changed_config">
+                            <device address="BUS02_NAV_GUIDANCE">
+                                <context context="oem_voice_command"/>
+                            </device>
+                        </group>
+                        <group name="telringvol" activationConfig="on_playback_changed_config">
+                            <device address="BUS03_PHONE">
+                                <context context="oem_call"/>
+                                <context context="oem_call_ring"/>
+                            </device>
+                        </group>
+                        <group name="systemalarm" activationConfig="on_source_changed_config">
+                            <device address="BUS01_SYS_NOTIFICATION">
+                                <context context="oem_alarm"/>
+                                <context context="oem_system_sound"/>
+                                <context context="oem_notification"/>
+                            </device>
+                        </group>
+                    </volumeGroups>
+                    <applyFadeConfigs>
+                        <fadeConfig name="dynamic fading" isDefault="true">
+                        </fadeConfig>
+                        <fadeConfig name="aggressive fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_VOICE_COMMUNICATION" />
+                                <usage value="AUDIO_USAGE_ANNOUNCEMENT" />
+                                <usage value="AUDIO_USAGE_VEHICLE_STATUS" />
+                                <usage value="AUDIO_USAGE_SAFETY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                        <fadeConfig name="disabled fading">
+                            <audioAttributes>
+                                <usage value="AUDIO_USAGE_EMERGENCY" />
+                            </audioAttributes>
+                        </fadeConfig>
+                    </applyFadeConfigs>
+                </zoneConfig>
+            </zoneConfigs>
+        </zone>
+    </zones>
+</carAudioConfiguration>
diff --git a/automotive/audiocontrol/aidl/default/loaders/config/Android.bp b/automotive/audiocontrol/aidl/default/loaders/config/Android.bp
new file mode 100644
index 0000000..0d5eb81
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/config/Android.bp
@@ -0,0 +1,45 @@
+// 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 {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_interfaces_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+xsd_config {
+    name: "car_audio_configuration_xsd",
+    srcs: ["car_audio_configuration.xsd"],
+    package_name: "android.hardware.automotive.audiocontrol",
+    nullability: true,
+}
+
+cc_defaults {
+    name: "car.audio.configuration.xsd.default",
+    static_libs: [
+        "libxml2",
+    ],
+    generated_sources: [
+        "car_audio_configuration_xsd",
+    ],
+    generated_headers: [
+        "car_audio_configuration_xsd",
+    ],
+    header_libs: [
+        "libxsdc-utils",
+    ],
+}
diff --git a/automotive/audiocontrol/aidl/default/loaders/config/api/current.txt b/automotive/audiocontrol/aidl/default/loaders/config/api/current.txt
new file mode 100644
index 0000000..c87b8c6
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/config/api/current.txt
@@ -0,0 +1,331 @@
+// Signature format: 2.0
+package android.hardware.automotive.audiocontrol {
+
+  public enum ActivationType {
+    method @NonNull public String getRawName();
+    enum_constant public static final android.hardware.automotive.audiocontrol.ActivationType onBoot;
+    enum_constant public static final android.hardware.automotive.audiocontrol.ActivationType onPlaybackChanged;
+    enum_constant public static final android.hardware.automotive.audiocontrol.ActivationType onSourceChanged;
+  }
+
+  public class ActivationVolumeConfigEntryType {
+    ctor public ActivationVolumeConfigEntryType();
+    method @Nullable public android.hardware.automotive.audiocontrol.ActivationType getInvocationType();
+    method @Nullable public String getMaxActivationVolumePercentage();
+    method @Nullable public String getMinActivationVolumePercentage();
+    method public void setInvocationType(@Nullable android.hardware.automotive.audiocontrol.ActivationType);
+    method public void setMaxActivationVolumePercentage(@Nullable String);
+    method public void setMinActivationVolumePercentage(@Nullable String);
+  }
+
+  public class ActivationVolumeConfigType {
+    ctor public ActivationVolumeConfigType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.ActivationVolumeConfigEntryType> getActivationVolumeConfigEntry();
+    method @Nullable public String getName();
+    method public void setName(@Nullable String);
+  }
+
+  public class ActivationVolumeConfigsType {
+    ctor public ActivationVolumeConfigsType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.ActivationVolumeConfigType> getActivationVolumeConfig();
+  }
+
+  public class ApplyFadeConfigType {
+    ctor public ApplyFadeConfigType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.AudioAttributeUsagesType> getAudioAttributes();
+    method @Nullable public boolean getIsDefault();
+    method @Nullable public String getName();
+    method public void setIsDefault(@Nullable boolean);
+    method public void setName(@Nullable String);
+  }
+
+  public class ApplyFadeConfigsType {
+    ctor public ApplyFadeConfigsType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.ApplyFadeConfigType> getFadeConfig();
+  }
+
+  public class AttributesType {
+    ctor public AttributesType();
+    method @Nullable public android.hardware.automotive.audiocontrol.ContentTypeEnum getContentType();
+    method @Nullable public String getTags();
+    method @Nullable public android.hardware.automotive.audiocontrol.UsageEnumType getUsage();
+    method public void setContentType(@Nullable android.hardware.automotive.audiocontrol.ContentTypeEnum);
+    method public void setTags(@Nullable String);
+    method public void setUsage(@Nullable android.hardware.automotive.audiocontrol.UsageEnumType);
+  }
+
+  public class AudioAttributeUsagesType {
+    ctor public AudioAttributeUsagesType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.UsageType> getUsage();
+  }
+
+  public class AudioAttributesUsagesType {
+    ctor public AudioAttributesUsagesType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.AttributesType> getAudioAttribute_optional();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.UsageType> getUsage_optional();
+  }
+
+  public class CarAudioConfigurationType {
+    ctor public CarAudioConfigurationType();
+    method @Nullable public android.hardware.automotive.audiocontrol.ActivationVolumeConfigsType getActivationVolumeConfigs();
+    method @Nullable public android.hardware.automotive.audiocontrol.DeviceConfigurationsType getDeviceConfigurations();
+    method @Nullable public android.hardware.automotive.audiocontrol.MirroringDevicesType getMirroringDevices();
+    method @Nullable public android.hardware.automotive.audiocontrol.OemContextsType getOemContexts();
+    method @Nullable public String getVersion();
+    method @Nullable public android.hardware.automotive.audiocontrol.ZonesType getZones();
+    method public void setActivationVolumeConfigs(@Nullable android.hardware.automotive.audiocontrol.ActivationVolumeConfigsType);
+    method public void setDeviceConfigurations(@Nullable android.hardware.automotive.audiocontrol.DeviceConfigurationsType);
+    method public void setMirroringDevices(@Nullable android.hardware.automotive.audiocontrol.MirroringDevicesType);
+    method public void setOemContexts(@Nullable android.hardware.automotive.audiocontrol.OemContextsType);
+    method public void setVersion(@Nullable String);
+    method public void setZones(@Nullable android.hardware.automotive.audiocontrol.ZonesType);
+  }
+
+  public class ContentType {
+    ctor public ContentType();
+    method @Nullable public android.hardware.automotive.audiocontrol.ContentTypeEnum getValue();
+    method public void setValue(@Nullable android.hardware.automotive.audiocontrol.ContentTypeEnum);
+  }
+
+  public enum ContentTypeEnum {
+    method @NonNull public String getRawName();
+    enum_constant public static final android.hardware.automotive.audiocontrol.ContentTypeEnum AUDIO_CONTENT_TYPE_MOVIE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.ContentTypeEnum AUDIO_CONTENT_TYPE_MUSIC;
+    enum_constant public static final android.hardware.automotive.audiocontrol.ContentTypeEnum AUDIO_CONTENT_TYPE_SONIFICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.ContentTypeEnum AUDIO_CONTENT_TYPE_SPEECH;
+    enum_constant public static final android.hardware.automotive.audiocontrol.ContentTypeEnum AUDIO_CONTENT_TYPE_UNKNOWN;
+  }
+
+  public class ContextNameType {
+    ctor public ContextNameType();
+    method @Nullable public String getContext();
+    method public void setContext(@Nullable String);
+  }
+
+  public class DeviceConfigurationType {
+    ctor public DeviceConfigurationType();
+    method @Nullable public String getName();
+    method @Nullable public String getValue();
+    method public void setName(@Nullable String);
+    method public void setValue(@Nullable String);
+  }
+
+  public class DeviceConfigurationsType {
+    ctor public DeviceConfigurationsType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.DeviceConfigurationType> getDeviceConfiguration();
+  }
+
+  public class DeviceRoutesType {
+    ctor public DeviceRoutesType();
+    method @Nullable public String getAddress();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.ContextNameType> getContext();
+    method @Nullable public android.hardware.automotive.audiocontrol.OutDeviceType getType();
+    method public void setAddress(@Nullable String);
+    method public void setType(@Nullable android.hardware.automotive.audiocontrol.OutDeviceType);
+  }
+
+  public enum InDeviceType {
+    method @NonNull public String getRawName();
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_AMBIENT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_AUX_DIGITAL;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_BACK_MIC;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_BLUETOOTH_A2DP;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_BLUETOOTH_BLE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_BUILTIN_MIC;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_BUS;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_COMMUNICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_DEFAULT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_ECHO_REFERENCE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_FM_TUNER;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_HDMI;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_HDMI_ARC;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_IP;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_LINE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_LOOPBACK;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_PROXY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_REMOTE_SUBMIX;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_SPDIF;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_STUB;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_TELEPHONY_RX;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_TV_TUNER;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_USB_ACCESSORY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_USB_DEVICE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_USB_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_VOICE_CALL;
+    enum_constant public static final android.hardware.automotive.audiocontrol.InDeviceType AUDIO_DEVICE_IN_WIRED_HEADSET;
+  }
+
+  public class InputDeviceType {
+    ctor public InputDeviceType();
+    method @Nullable public String getAddress();
+    method @Nullable public android.hardware.automotive.audiocontrol.InDeviceType getType();
+    method public void setAddress(@Nullable String);
+    method public void setType(@Nullable android.hardware.automotive.audiocontrol.InDeviceType);
+  }
+
+  public class InputDevicesType {
+    ctor public InputDevicesType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.InputDeviceType> getInputDevice();
+  }
+
+  public class MirroringDevice {
+    ctor public MirroringDevice();
+    method @Nullable public String getAddress();
+    method public void setAddress(@Nullable String);
+  }
+
+  public class MirroringDevicesType {
+    ctor public MirroringDevicesType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.MirroringDevice> getMirroringDevice();
+  }
+
+  public class OemContextType {
+    ctor public OemContextType();
+    method @Nullable public android.hardware.automotive.audiocontrol.AudioAttributesUsagesType getAudioAttributes();
+    method @Nullable public String getId();
+    method @Nullable public String getName();
+    method public void setAudioAttributes(@Nullable android.hardware.automotive.audiocontrol.AudioAttributesUsagesType);
+    method public void setId(@Nullable String);
+    method public void setName(@Nullable String);
+  }
+
+  public class OemContextsType {
+    ctor public OemContextsType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.OemContextType> getOemContext();
+  }
+
+  public enum OutDeviceType {
+    method @NonNull public String getRawName();
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_AUX_DIGITAL;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_AUX_LINE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_BLE_BROADCAST;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_BLE_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_BLE_SPEAKER;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_BLUETOOTH_A2DP;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_BUS;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_DEFAULT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_HDMI;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_HDMI_ARC;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_HDMI_EARC;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_LINE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_SPEAKER;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_SPEAKER_SAFE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_USB_ACCESSORY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_USB_DEVICE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_USB_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_WIRED_HEADPHONE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType AUDIO_DEVICE_OUT_WIRED_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_AUX_LINE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_BLE_BROADCAST;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_BLE_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_BLE_SPEAKER;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_BLUETOOTH_A2DP;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_BUILTIN_SPEAKER;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_BUS;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_HDMI;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_USB_ACCESSORY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_USB_DEVICE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_USB_HEADSET;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_WIRED_HEADPHONES;
+    enum_constant public static final android.hardware.automotive.audiocontrol.OutDeviceType TYPE_WIRED_HEADSET;
+  }
+
+  public enum UsageEnumType {
+    method @NonNull public String getRawName();
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_ALARM;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_ANNOUNCEMENT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_ASSISTANCE_SONIFICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_ASSISTANT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_CALL_ASSISTANT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_EMERGENCY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_GAME;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_MEDIA;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_NOTIFICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_NOTIFICATION_EVENT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_SAFETY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_UNKNOWN;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_VEHICLE_STATUS;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_VIRTUAL_SOURCE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_VOICE_COMMUNICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.UsageEnumType AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING;
+  }
+
+  public class UsageType {
+    ctor public UsageType();
+    method @Nullable public android.hardware.automotive.audiocontrol.UsageEnumType getValue();
+    method public void setValue(@Nullable android.hardware.automotive.audiocontrol.UsageEnumType);
+  }
+
+  public class VolumeGroupType {
+    ctor public VolumeGroupType();
+    method @Nullable public String getActivationConfig();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.DeviceRoutesType> getDevice();
+    method @Nullable public String getName();
+    method public void setActivationConfig(@Nullable String);
+    method public void setName(@Nullable String);
+  }
+
+  public class VolumeGroupsType {
+    ctor public VolumeGroupsType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.VolumeGroupType> getGroup();
+  }
+
+  public class XmlParser {
+    ctor public XmlParser();
+    method @Nullable public static android.hardware.automotive.audiocontrol.CarAudioConfigurationType read(@NonNull java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method @Nullable public static String readText(@NonNull org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method public static void skip(@NonNull org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+  }
+
+  public class ZoneConfigType {
+    ctor public ZoneConfigType();
+    method @Nullable public android.hardware.automotive.audiocontrol.ApplyFadeConfigsType getApplyFadeConfigs();
+    method @Nullable public boolean getIsDefault();
+    method @Nullable public String getName();
+    method @Nullable public android.hardware.automotive.audiocontrol.VolumeGroupsType getVolumeGroups();
+    method public void setApplyFadeConfigs(@Nullable android.hardware.automotive.audiocontrol.ApplyFadeConfigsType);
+    method public void setIsDefault(@Nullable boolean);
+    method public void setName(@Nullable String);
+    method public void setVolumeGroups(@Nullable android.hardware.automotive.audiocontrol.VolumeGroupsType);
+  }
+
+  public class ZoneConfigsType {
+    ctor public ZoneConfigsType();
+    method @Nullable public android.hardware.automotive.audiocontrol.ZoneConfigType getZoneConfig();
+    method public void setZoneConfig(@Nullable android.hardware.automotive.audiocontrol.ZoneConfigType);
+  }
+
+  public class ZoneType {
+    ctor public ZoneType();
+    method @Nullable public String getAudioZoneId();
+    method @Nullable public android.hardware.automotive.audiocontrol.InputDevicesType getInputDevices();
+    method @Nullable public boolean getIsPrimary();
+    method @Nullable public String getName();
+    method @Nullable public String getOccupantZoneId();
+    method @Nullable public android.hardware.automotive.audiocontrol.ZoneConfigsType getZoneConfigs();
+    method public void setAudioZoneId(@Nullable String);
+    method public void setInputDevices(@Nullable android.hardware.automotive.audiocontrol.InputDevicesType);
+    method public void setIsPrimary(@Nullable boolean);
+    method public void setName(@Nullable String);
+    method public void setOccupantZoneId(@Nullable String);
+    method public void setZoneConfigs(@Nullable android.hardware.automotive.audiocontrol.ZoneConfigsType);
+  }
+
+  public class ZonesType {
+    ctor public ZonesType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.ZoneType> getZone();
+  }
+
+}
+
diff --git a/automotive/audiocontrol/aidl/default/loaders/config/api/last_current.txt b/automotive/audiocontrol/aidl/default/loaders/config/api/last_current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/config/api/last_current.txt
diff --git a/automotive/audiocontrol/aidl/default/loaders/config/api/last_removed.txt b/automotive/audiocontrol/aidl/default/loaders/config/api/last_removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/config/api/last_removed.txt
diff --git a/automotive/audiocontrol/aidl/default/loaders/config/api/removed.txt b/automotive/audiocontrol/aidl/default/loaders/config/api/removed.txt
new file mode 100644
index 0000000..d802177
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/config/api/removed.txt
@@ -0,0 +1 @@
+// Signature format: 2.0
diff --git a/automotive/audiocontrol/aidl/default/loaders/config/car_audio_configuration.xsd b/automotive/audiocontrol/aidl/default/loaders/config/car_audio_configuration.xsd
new file mode 100644
index 0000000..634aeda
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/config/car_audio_configuration.xsd
@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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.
+-->
+<xs:schema version="2.0" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:element name="carAudioConfiguration" type="CarAudioConfigurationType" minOccurs="1" maxOccurs="1" />
+    <xs:complexType name="CarAudioConfigurationType">
+        <xs:attribute name="version" type="xs:string" use="required" />
+        <xs:sequence>
+            <xs:element name="mirroringDevices" type="MirroringDevicesType" minOccurs="0" />
+            <xs:element name="deviceConfigurations" type="DeviceConfigurationsType" minOccurs="0" />
+            <xs:element name="oemContexts" type="OemContextsType" />
+            <xs:element name="activationVolumeConfigs" type="ActivationVolumeConfigsType" minOccurs="0" />
+            <xs:element name="zones" type="ZonesType" />
+        </xs:sequence>
+    </xs:complexType>
+    <xs:complexType name="ZonesType">
+        <xs:element name="zone" type="ZoneType" minOccurs="1" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="ActivationVolumeConfigsType">
+        <xs:element name="activationVolumeConfig" type="ActivationVolumeConfigType" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="OemContextsType">
+        <xs:element name="oemContext" type="OemContextType" minOccurs="1" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="DeviceConfigurationsType">
+        <xs:element name="deviceConfiguration" type="DeviceConfigurationType" minOccurs="0" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="ZoneType">
+        <xs:attribute name="name" type="xs:string" />
+        <xs:attribute name="audioZoneId" type="xs:string" use="required" />
+        <xs:attribute name="isPrimary" type="xs:boolean" />
+        <xs:attribute name="occupantZoneId" type="xs:string" />
+        <xs:element name="inputDevices" type="InputDevicesType" />
+        <xs:element name="zoneConfigs" type="ZoneConfigsType" />
+    </xs:complexType>
+    <xs:complexType name="ZoneConfigsType">
+        <xs:element name="zoneConfig" type="ZoneConfigType"/>
+    </xs:complexType>
+    <xs:complexType name="ZoneConfigType">
+        <xs:attribute name="name" type="xs:string" />
+        <xs:attribute name="isDefault" type="xs:boolean" />
+        <xs:element name="volumeGroups" type="VolumeGroupsType" />
+        <xs:element name="applyFadeConfigs" type="ApplyFadeConfigsType" />
+    </xs:complexType>
+    <xs:complexType name="ApplyFadeConfigsType">
+        <xs:element name="fadeConfig" type="ApplyFadeConfigType" minOccurs="0" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="ApplyFadeConfigType">
+        <xs:attribute name="name" type="xs:string" />
+        <xs:attribute name="isDefault" type="xs:boolean" />
+        <xs:element name="audioAttributes" type="AudioAttributeUsagesType" minOccurs="0" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="AudioAttributeUsagesType">
+        <xs:element name="usage" type="UsageType" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="VolumeGroupsType">
+        <xs:element name="group"  type="VolumeGroupType" minOccurs="1" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="VolumeGroupType">
+        <xs:attribute name="name" type="xs:string" />
+        <xs:attribute name="activationConfig" type="xs:string" />
+        <xs:element name="device" type="DeviceRoutesType" minOccurts="1" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="DeviceRoutesType" >
+        <xs:attribute name="address" type="xs:string" />
+        <xs:attribute name="type" type="OutDeviceType" />
+        <xs:element name="context" type="ContextNameType" mixOccurs="1" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="ContextNameType">
+        <xs:attribute name="context" type="xs:string"/>
+    </xs:complexType>
+    <xs:complexType name="OemContextType">
+        <xs:attribute name="name" type="xs:string" />
+        <xs:attribute name="id" type="xs:string" />
+        <xs:element name="audioAttributes" type="AudioAttributesUsagesType" minOccurs="1" maxOccurs="1" />
+    </xs:complexType>
+    <xs:complexType name="AudioAttributesUsagesType" >
+        <xs:choice minOccurs="0" maxOccurs="unbounded" >
+            <xs:element name="audioAttribute" type="AttributesType" />
+            <xs:element name="usage" type="UsageType" />
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="AttributesType">
+        <xs:attribute name="contentType" type="contentTypeEnum" />
+        <xs:attribute name="usage" type="usageEnumType" />
+        <xs:attribute name="tags" type="xs:string" />
+    </xs:complexType>
+    <xs:complexType name="DeviceConfigurationType">
+        <xs:attribute name="name" type="xs:string" />
+        <xs:attribute name="value" type="xs:string" />
+    </xs:complexType>
+    <xs:complexType name="ContentType" >
+        <xs:attribute name="value" type="contentTypeEnum" use="required" />
+    </xs:complexType>
+    <xs:complexType name="UsageType">
+        <xs:attribute name="value" type="usageEnumType" use="required" />
+    </xs:complexType>
+    <xs:simpleType name="contentTypeEnum">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_UNKNOWN"/>
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_SPEECH"/>
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_MUSIC"/>
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_MOVIE"/>
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_SONIFICATION"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="usageEnumType">
+      <xs:restriction base="xs:string">
+          <xs:enumeration value="AUDIO_USAGE_UNKNOWN"/>
+          <xs:enumeration value="AUDIO_USAGE_MEDIA"/>
+          <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION"/>
+          <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING"/>
+          <xs:enumeration value="AUDIO_USAGE_ALARM"/>
+          <xs:enumeration value="AUDIO_USAGE_NOTIFICATION"/>
+          <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE"/>
+          <!-- Note: the following 3 values were deprecated in Android T (13) SDK -->
+          <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST"/>
+          <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT"/>
+          <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED"/>
+          <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_EVENT"/>
+          <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY"/>
+          <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"/>
+          <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION"/>
+          <xs:enumeration value="AUDIO_USAGE_GAME"/>
+          <xs:enumeration value="AUDIO_USAGE_VIRTUAL_SOURCE"/>
+          <xs:enumeration value="AUDIO_USAGE_ASSISTANT"/>
+          <xs:enumeration value="AUDIO_USAGE_CALL_ASSISTANT"/>
+          <xs:enumeration value="AUDIO_USAGE_EMERGENCY" />
+          <xs:enumeration value="AUDIO_USAGE_SAFETY" />
+          <xs:enumeration value="AUDIO_USAGE_VEHICLE_STATUS" />
+          <xs:enumeration value="AUDIO_USAGE_ANNOUNCEMENT" />
+      </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="ActivationVolumeConfigType">
+        <xs:attribute name="name" type="xs:string" />
+        <xs:element name="activationVolumeConfigEntry" type="ActivationVolumeConfigEntryType" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="ActivationVolumeConfigEntryType">
+          <xs:attribute name="maxActivationVolumePercentage" type="xs:string" />
+          <xs:attribute name="minActivationVolumePercentage" type="xs:string" />
+          <xs:attribute name="invocationType" type="ActivationType" />
+    </xs:complexType>
+    <xs:simpleType name="ActivationType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="onBoot"/>
+            <xs:enumeration value="onSourceChanged"/>
+            <xs:enumeration value="onPlaybackChanged"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="OutDeviceType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_WIRED_HEADSET"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_WIRED_HEADPHONE"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI_EARC"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_DIGITAL"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_USB_ACCESSORY"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_USB_DEVICE"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_LINE"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_HDMI_ARC"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_AUX_LINE"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_SPEAKER_SAFE"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_BUS"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_USB_HEADSET"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_HEADSET"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_SPEAKER"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_BLE_BROADCAST"/>
+            <xs:enumeration value="AUDIO_DEVICE_OUT_DEFAULT"/>
+            <!-- Added to support legacy files -->
+            <xs:enumeration value="TYPE_BUILTIN_SPEAKER"/>
+            <xs:enumeration value="TYPE_WIRED_HEADSET"/>
+            <xs:enumeration value="TYPE_WIRED_HEADPHONES"/>
+            <xs:enumeration value="TYPE_BLUETOOTH_A2DP"/>
+            <xs:enumeration value="TYPE_HDMI"/>
+            <xs:enumeration value="TYPE_USB_ACCESSORY"/>
+            <xs:enumeration value="TYPE_USB_DEVICE"/>
+            <xs:enumeration value="TYPE_USB_HEADSET"/>
+            <xs:enumeration value="TYPE_AUX_LINE"/>
+            <xs:enumeration value="TYPE_BUS"/>
+            <xs:enumeration value="TYPE_BLE_HEADSET"/>
+            <xs:enumeration value="TYPE_BLE_SPEAKER"/>
+            <xs:enumeration value="TYPE_BLE_BROADCAST"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="MirroringDevicesType">
+        <xs:element name="mirroringDevice" type="MirroringDevice" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="MirroringDevice">
+        <xs:attribute name="address" type="xs:string" />
+    </xs:complexType>
+    <xs:complexType name="InputDevicesType">
+        <xs:element name="inputDevice" type="InputDeviceType" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="InputDeviceType">
+        <xs:attribute name="address" type="xs:string" />
+        <xs:attribute name="type" type="InDeviceType" />
+    </xs:complexType>
+    <xs:simpleType name="InDeviceType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUDIO_DEVICE_IN_COMMUNICATION"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_AMBIENT"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_BUILTIN_MIC"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_WIRED_HEADSET"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_AUX_DIGITAL"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_HDMI"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_VOICE_CALL"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_TELEPHONY_RX"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_BACK_MIC"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_REMOTE_SUBMIX"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_USB_ACCESSORY"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_USB_DEVICE"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_FM_TUNER"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_TV_TUNER"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_LINE"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_SPDIF"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_A2DP"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_LOOPBACK"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_IP"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_BUS"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_PROXY"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_USB_HEADSET"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_BLUETOOTH_BLE"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_HDMI_ARC"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_ECHO_REFERENCE"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_DEFAULT"/>
+            <xs:enumeration value="AUDIO_DEVICE_IN_STUB"/>
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>
diff --git a/automotive/audiocontrol/aidl/default/loaders/fade/Android.bp b/automotive/audiocontrol/aidl/default/loaders/fade/Android.bp
new file mode 100644
index 0000000..3dbc2f1
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/fade/Android.bp
@@ -0,0 +1,45 @@
+// 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 {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_interfaces_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+xsd_config {
+    name: "car_fade_audio_configuration_xsd",
+    srcs: ["car_fade_audio_configuration.xsd"],
+    package_name: "android.hardware.automotive.audiocontrol.fade",
+    nullability: true,
+}
+
+cc_defaults {
+    name: "car.fade.configuration.xsd.default",
+    static_libs: [
+        "libxml2",
+    ],
+    generated_sources: [
+        "car_fade_audio_configuration_xsd",
+    ],
+    generated_headers: [
+        "car_fade_audio_configuration_xsd",
+    ],
+    header_libs: [
+        "libxsdc-utils",
+    ],
+}
diff --git a/automotive/audiocontrol/aidl/default/loaders/fade/api/current.txt b/automotive/audiocontrol/aidl/default/loaders/fade/api/current.txt
new file mode 100644
index 0000000..f40f1be
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/fade/api/current.txt
@@ -0,0 +1,160 @@
+// Signature format: 2.0
+package android.hardware.automotive.audiocontrol.fade {
+
+  public class AttributesType {
+    ctor public AttributesType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.ContentTypeEnum getContentType();
+    method @Nullable public String getTags();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.UsageEnumType getUsage();
+    method public void setContentType(@Nullable android.hardware.automotive.audiocontrol.fade.ContentTypeEnum);
+    method public void setTags(@Nullable String);
+    method public void setUsage(@Nullable android.hardware.automotive.audiocontrol.fade.UsageEnumType);
+  }
+
+  public class AudioAttributesUsagesType {
+    ctor public AudioAttributesUsagesType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.fade.AttributesType> getAudioAttribute_optional();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.fade.UsageType> getUsage_optional();
+  }
+
+  public class CarAudioFadeConfigurationType {
+    ctor public CarAudioFadeConfigurationType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.FadeConfigurationConfigs getConfigs();
+    method public void setConfigs(@Nullable android.hardware.automotive.audiocontrol.fade.FadeConfigurationConfigs);
+  }
+
+  public class ContentType {
+    ctor public ContentType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.ContentTypeEnum getValue();
+    method public void setValue(@Nullable android.hardware.automotive.audiocontrol.fade.ContentTypeEnum);
+  }
+
+  public enum ContentTypeEnum {
+    method @NonNull public String getRawName();
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.ContentTypeEnum AUDIO_CONTENT_TYPE_MOVIE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.ContentTypeEnum AUDIO_CONTENT_TYPE_MUSIC;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.ContentTypeEnum AUDIO_CONTENT_TYPE_SONIFICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.ContentTypeEnum AUDIO_CONTENT_TYPE_SPEECH;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.ContentTypeEnum AUDIO_CONTENT_TYPE_UNKNOWN;
+  }
+
+  public class FadeConfigurationConfig {
+    ctor public FadeConfigurationConfig();
+    method @Nullable public String getDefaultFadeInDelayForOffenders();
+    method @Nullable public String getDefaultFadeInDurationInMillis();
+    method @Nullable public String getDefaultFadeOutDurationInMillis();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.FadeInConfigurationsType getFadeInConfigurations();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.FadeOutConfigurationsType getFadeOutConfigurations();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.FadeStateType getFadeState();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.FadeableUsagesType getFadeableUsages();
+    method @Nullable public String getName();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.UnfadeableAudioAttributesType getUnfadeableAudioAttributes();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.UnfadeableContentTypesType getUnfadeableContentTypes();
+    method public void setDefaultFadeInDelayForOffenders(@Nullable String);
+    method public void setDefaultFadeInDurationInMillis(@Nullable String);
+    method public void setDefaultFadeOutDurationInMillis(@Nullable String);
+    method public void setFadeInConfigurations(@Nullable android.hardware.automotive.audiocontrol.fade.FadeInConfigurationsType);
+    method public void setFadeOutConfigurations(@Nullable android.hardware.automotive.audiocontrol.fade.FadeOutConfigurationsType);
+    method public void setFadeState(@Nullable android.hardware.automotive.audiocontrol.fade.FadeStateType);
+    method public void setFadeableUsages(@Nullable android.hardware.automotive.audiocontrol.fade.FadeableUsagesType);
+    method public void setName(@Nullable String);
+    method public void setUnfadeableAudioAttributes(@Nullable android.hardware.automotive.audiocontrol.fade.UnfadeableAudioAttributesType);
+    method public void setUnfadeableContentTypes(@Nullable android.hardware.automotive.audiocontrol.fade.UnfadeableContentTypesType);
+  }
+
+  public class FadeConfigurationConfigs {
+    ctor public FadeConfigurationConfigs();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.fade.FadeConfigurationConfig> getConfig();
+  }
+
+  public class FadeConfigurationType {
+    ctor public FadeConfigurationType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.AudioAttributesUsagesType getAudioAttributes();
+    method @Nullable public String getFadeDurationMillis();
+    method public void setAudioAttributes(@Nullable android.hardware.automotive.audiocontrol.fade.AudioAttributesUsagesType);
+    method public void setFadeDurationMillis(@Nullable String);
+  }
+
+  public class FadeInConfigurationsType {
+    ctor public FadeInConfigurationsType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.FadeConfigurationType getFadeConfiguration();
+    method public void setFadeConfiguration(@Nullable android.hardware.automotive.audiocontrol.fade.FadeConfigurationType);
+  }
+
+  public class FadeOutConfigurationsType {
+    ctor public FadeOutConfigurationsType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.FadeConfigurationType getFadeConfiguration();
+    method public void setFadeConfiguration(@Nullable android.hardware.automotive.audiocontrol.fade.FadeConfigurationType);
+  }
+
+  public enum FadeStateEnumType {
+    method @NonNull public String getRawName();
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.FadeStateEnumType FADE_STATE_DISABLED;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.FadeStateEnumType FADE_STATE_ENABLED_DEFAULT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.FadeStateEnumType _0;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.FadeStateEnumType _1;
+  }
+
+  public class FadeStateType {
+    ctor public FadeStateType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.FadeStateEnumType getValue();
+    method public void setValue(@Nullable android.hardware.automotive.audiocontrol.fade.FadeStateEnumType);
+  }
+
+  public class FadeableUsagesType {
+    ctor public FadeableUsagesType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.fade.UsageType> getUsage();
+  }
+
+  public class UnfadeableAudioAttributesType {
+    ctor public UnfadeableAudioAttributesType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.AudioAttributesUsagesType getAudioAttributes();
+    method public void setAudioAttributes(@Nullable android.hardware.automotive.audiocontrol.fade.AudioAttributesUsagesType);
+  }
+
+  public class UnfadeableContentTypesType {
+    ctor public UnfadeableContentTypesType();
+    method @Nullable public java.util.List<android.hardware.automotive.audiocontrol.fade.ContentType> getContentType();
+  }
+
+  public enum UsageEnumType {
+    method @NonNull public String getRawName();
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_ALARM;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_ANNOUNCEMENT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_ASSISTANCE_SONIFICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_ASSISTANT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_CALL_ASSISTANT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_EMERGENCY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_GAME;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_MEDIA;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_NOTIFICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_NOTIFICATION_EVENT;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_SAFETY;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_UNKNOWN;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_VEHICLE_STATUS;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_VIRTUAL_SOURCE;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_VOICE_COMMUNICATION;
+    enum_constant public static final android.hardware.automotive.audiocontrol.fade.UsageEnumType AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING;
+  }
+
+  public class UsageType {
+    ctor public UsageType();
+    method @Nullable public android.hardware.automotive.audiocontrol.fade.UsageEnumType getValue();
+    method public void setValue(@Nullable android.hardware.automotive.audiocontrol.fade.UsageEnumType);
+  }
+
+  public class XmlParser {
+    ctor public XmlParser();
+    method @Nullable public static android.hardware.automotive.audiocontrol.fade.CarAudioFadeConfigurationType read(@NonNull java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method @Nullable public static String readText(@NonNull org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method public static void skip(@NonNull org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+  }
+
+}
+
diff --git a/automotive/audiocontrol/aidl/default/loaders/fade/api/last_current.txt b/automotive/audiocontrol/aidl/default/loaders/fade/api/last_current.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/fade/api/last_current.txt
diff --git a/automotive/audiocontrol/aidl/default/loaders/fade/api/last_removed.txt b/automotive/audiocontrol/aidl/default/loaders/fade/api/last_removed.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/fade/api/last_removed.txt
diff --git a/automotive/audiocontrol/aidl/default/loaders/fade/api/removed.txt b/automotive/audiocontrol/aidl/default/loaders/fade/api/removed.txt
new file mode 100644
index 0000000..d802177
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/fade/api/removed.txt
@@ -0,0 +1 @@
+// Signature format: 2.0
diff --git a/automotive/audiocontrol/aidl/default/loaders/fade/car_fade_audio_configuration.xsd b/automotive/audiocontrol/aidl/default/loaders/fade/car_fade_audio_configuration.xsd
new file mode 100644
index 0000000..051be7e
--- /dev/null
+++ b/automotive/audiocontrol/aidl/default/loaders/fade/car_fade_audio_configuration.xsd
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="2.0">
+    <xs:element name="carAudioFadeConfiguration" type="CarAudioFadeConfigurationType" />
+    <xs:complexType name="CarAudioFadeConfigurationType">
+        <xs:element name="configs" type="FadeConfigurationConfigs" />
+    </xs:complexType>
+    <xs:complexType name="FadeConfigurationConfigs">
+        <xs:element name="config" type="FadeConfigurationConfig" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="FadeConfigurationConfig">
+        <xs:attribute name="name" type="xs:string" />
+        <xs:attribute name="defaultFadeOutDurationInMillis" type="xs:string" />
+        <xs:attribute name="defaultFadeInDurationInMillis" type="xs:string" />
+        <xs:attribute name="defaultFadeInDelayForOffenders" type="xs:string" />
+        <xs:element name="fadeState" type="FadeStateType" />
+        <xs:element name="fadeableUsages" type="FadeableUsagesType" />
+        <xs:element name="unfadeableContentTypes" type="UnfadeableContentTypesType" />
+        <xs:element name="unfadeableAudioAttributes" type="UnfadeableAudioAttributesType" />
+        <xs:element name="fadeOutConfigurations" type="FadeOutConfigurationsType" />
+        <xs:element name="fadeInConfigurations" type="FadeInConfigurationsType" />
+    </xs:complexType>
+    <xs:complexType name="FadeStateType">
+        <xs:attribute name="value" type="fadeStateEnumType" />
+    </xs:complexType>
+    <xs:simpleType name="fadeStateEnumType" >
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="0" />
+            <xs:enumeration value="1" />
+            <xs:enumeration value="FADE_STATE_DISABLED" />
+            <xs:enumeration value="FADE_STATE_ENABLED_DEFAULT" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="FadeableUsagesType">
+        <xs:element name="usage" type="UsageType" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="UsageType">
+        <xs:attribute name="value" type="usageEnumType" />
+    </xs:complexType>
+    <xs:simpleType name="usageEnumType">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUDIO_USAGE_UNKNOWN"/>
+            <xs:enumeration value="AUDIO_USAGE_MEDIA"/>
+            <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION"/>
+            <xs:enumeration value="AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING"/>
+            <xs:enumeration value="AUDIO_USAGE_ALARM"/>
+            <xs:enumeration value="AUDIO_USAGE_NOTIFICATION"/>
+            <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE"/>
+            <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST"/>
+            <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT"/>
+            <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED"/>
+            <xs:enumeration value="AUDIO_USAGE_NOTIFICATION_EVENT"/>
+            <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY"/>
+            <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE"/>
+            <xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION"/>
+            <xs:enumeration value="AUDIO_USAGE_GAME"/>
+            <xs:enumeration value="AUDIO_USAGE_VIRTUAL_SOURCE"/>
+            <xs:enumeration value="AUDIO_USAGE_ASSISTANT"/>
+            <xs:enumeration value="AUDIO_USAGE_CALL_ASSISTANT"/>
+            <xs:enumeration value="AUDIO_USAGE_EMERGENCY" />
+            <xs:enumeration value="AUDIO_USAGE_SAFETY" />
+            <xs:enumeration value="AUDIO_USAGE_VEHICLE_STATUS" />
+            <xs:enumeration value="AUDIO_USAGE_ANNOUNCEMENT" />
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="UnfadeableContentTypesType">
+        <xs:element name="contentType" type="ContentType" maxOccurs="unbounded" />
+    </xs:complexType>
+    <xs:complexType name="ContentType">
+        <xs:attribute name="value" type="contentTypeEnum" />
+    </xs:complexType>
+    <xs:simpleType name="contentTypeEnum">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_UNKNOWN"/>
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_SPEECH"/>
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_MUSIC"/>
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_MOVIE"/>
+            <xs:enumeration value="AUDIO_CONTENT_TYPE_SONIFICATION"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:complexType name="UnfadeableAudioAttributesType">
+        <xs:element name="audioAttributes" type="AudioAttributesUsagesType" />
+    </xs:complexType>
+    <xs:complexType name="AudioAttributesUsagesType" >
+        <xs:choice minOccurs="0" maxOccurs="unbounded" >
+            <xs:element name="audioAttribute" type="AttributesType" />
+            <xs:element name="usage" type="UsageType" />
+        </xs:choice>
+    </xs:complexType>
+    <xs:complexType name="AttributesType">
+        <xs:attribute name="contentType" type="contentTypeEnum" />
+        <xs:attribute name="usage" type="usageEnumType" />
+        <xs:attribute name="tags" type="xs:string" />
+    </xs:complexType>
+    <xs:complexType name="FadeOutConfigurationsType">
+        <xs:element name="fadeConfiguration" type="FadeConfigurationType" />
+    </xs:complexType>
+    <xs:complexType name="FadeConfigurationType">
+        <xs:attribute name="fadeDurationMillis" type="xs:string" />
+        <xs:element name="audioAttributes" type="AudioAttributesUsagesType" />
+    </xs:complexType>
+    <xs:complexType name="FadeInConfigurationsType">
+        <xs:element name="fadeConfiguration" type="FadeConfigurationType" />
+    </xs:complexType>
+</xs:schema>
diff --git a/automotive/audiocontrol/aidl/rust_impl/Android.bp b/automotive/audiocontrol/aidl/rust_impl/Android.bp
index 062d989..f9d07b2 100644
--- a/automotive/audiocontrol/aidl/rust_impl/Android.bp
+++ b/automotive/audiocontrol/aidl/rust_impl/Android.bp
@@ -15,7 +15,7 @@
  */
 
 rust_binary {
-    name: "android.hardware.automotive.audiocontrol-V4-rust-service",
+    name: "android.hardware.automotive.audiocontrol-rust-service",
     relative_install_path: "hw",
     vendor: true,
     srcs: ["src/*.rs"],
@@ -23,6 +23,7 @@
     defaults: [
         "latest_android_hardware_automotive_audiocontrol_rust",
         "latest_android_hardware_audio_common_rust",
+        "latest_android_media_audio_common_types_rust",
     ],
     vintf_fragments: ["audiocontrol-rust-service.xml"],
     init_rc: ["audiocontrol-rust-service.rc"],
diff --git a/automotive/audiocontrol/aidl/rust_impl/README.md b/automotive/audiocontrol/aidl/rust_impl/README.md
index ed22356..b68daf3 100644
--- a/automotive/audiocontrol/aidl/rust_impl/README.md
+++ b/automotive/audiocontrol/aidl/rust_impl/README.md
@@ -6,7 +6,7 @@
 This folder contains a skeleton audio control HAL implementation in Rust to
 demonstrate  how vendor may implement a Rust audio control HAL. To run this
 audio control HAL, include
-`android.hardware.automotive.audiocontrol-V4-rust-service` in your image.
+`android.hardware.automotive.audiocontrol-rust-service` in your image.
 
 This implementation returns `StatusCode::UNKNOWN_ERROR` for all operations
 and does not pass VTS/CTS. Vendor must replace the logic in
diff --git a/automotive/audiocontrol/aidl/rust_impl/src/default_audio_control_hal.rs b/automotive/audiocontrol/aidl/rust_impl/src/default_audio_control_hal.rs
index ba0ca23..8184c43 100644
--- a/automotive/audiocontrol/aidl/rust_impl/src/default_audio_control_hal.rs
+++ b/automotive/audiocontrol/aidl/rust_impl/src/default_audio_control_hal.rs
@@ -23,8 +23,15 @@
     IModuleChangeCallback::IModuleChangeCallback,
     MutingInfo::MutingInfo,
     Reasons::Reasons,
+    AudioDeviceConfiguration::AudioDeviceConfiguration,
+    AudioZone::AudioZone
 };
-use android_hardware_audio_common::aidl::android::hardware::audio::common::PlaybackTrackMetadata::PlaybackTrackMetadata;
+use android_hardware_audio_common::aidl::android::hardware::audio::common::{
+    PlaybackTrackMetadata::PlaybackTrackMetadata,
+};
+use android_media_audio_common_types::aidl::android::media::audio::common::{
+    AudioPort::AudioPort,
+};
 use binder::{Interface, Result as BinderResult, StatusCode, Strong};
 
 /// This struct is defined to implement IAudioControl AIDL interface.
@@ -81,4 +88,16 @@
     fn clearModuleChangeCallback(&self) -> BinderResult<()> {
         Err(StatusCode::UNKNOWN_ERROR.into())
     }
+
+    fn getAudioDeviceConfiguration(&self) -> std::result::Result<AudioDeviceConfiguration, binder::Status> {
+        Err(binder::StatusCode::UNKNOWN_ERROR.into())
+    }
+
+    fn getOutputMirroringDevices(&self) -> std::result::Result<std::vec::Vec<AudioPort>, binder::Status> {
+        Err(binder::StatusCode::UNKNOWN_ERROR.into())
+    }
+
+    fn getCarAudioZones(&self) -> std::result::Result<std::vec::Vec<AudioZone>, binder::Status> {
+        Err(binder::StatusCode::UNKNOWN_ERROR.into())
+    }
 }
diff --git a/automotive/audiocontrol/aidl/vts/Android.bp b/automotive/audiocontrol/aidl/vts/Android.bp
index d94ad55..57c6ae4 100644
--- a/automotive/audiocontrol/aidl/vts/Android.bp
+++ b/automotive/audiocontrol/aidl/vts/Android.bp
@@ -22,6 +22,25 @@
     default_applicable_licenses: ["hardware_interfaces_license"],
 }
 
+cc_library {
+    name: "AudioControlHalTestUtils",
+    srcs: [
+        "src/AudioControlTestUtils.cpp",
+    ],
+    export_include_dirs: [
+        "include",
+    ],
+    defaults: [
+        "latest_android_hardware_audio_common_cpp_static",
+        "latest_android_hardware_automotive_audiocontrol_cpp_static",
+        "latest_android_media_audio_common_types_cpp_static",
+    ],
+    shared_libs: [
+        "libbase",
+        "libutils",
+    ],
+}
+
 cc_test {
     name: "VtsAidlHalAudioControlTest",
     defaults: [
@@ -39,9 +58,11 @@
         "libbinder",
         "libbase",
         "libxml2",
+        "libutils",
     ],
     static_libs: [
         "libgmock",
+        "AudioControlHalTestUtils",
     ],
     test_suites: [
         "general-tests",
diff --git a/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp b/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
index 4e7e963..c01c0d6 100644
--- a/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
+++ b/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
@@ -18,6 +18,8 @@
 #include <aidl/Gtest.h>
 #include <aidl/Vintf.h>
 #include <gmock/gmock.h>
+#include <utils/String16.h>
+#include <set>
 
 #include <android/hardware/automotive/audiocontrol/BnAudioGainCallback.h>
 #include <android/hardware/automotive/audiocontrol/BnFocusListener.h>
@@ -26,24 +28,49 @@
 #include <android/log.h>
 #include <binder/IServiceManager.h>
 #include <binder/ProcessState.h>
+#include <include/AudioControlTestUtils.h>
 
 using android::ProcessState;
 using android::sp;
 using android::String16;
 using android::binder::Status;
+using android::hardware::automotive::audiocontrol::AudioDeviceConfiguration;
+using android::hardware::automotive::audiocontrol::AudioFadeConfiguration;
 using android::hardware::automotive::audiocontrol::AudioFocusChange;
 using android::hardware::automotive::audiocontrol::AudioGainConfigInfo;
+using android::hardware::automotive::audiocontrol::AudioZone;
+using android::hardware::automotive::audiocontrol::AudioZoneConfig;
+using android::hardware::automotive::audiocontrol::AudioZoneContextInfo;
+using android::hardware::automotive::audiocontrol::AudioZoneFadeConfiguration;
 using android::hardware::automotive::audiocontrol::BnAudioGainCallback;
 using android::hardware::automotive::audiocontrol::BnFocusListener;
 using android::hardware::automotive::audiocontrol::BnModuleChangeCallback;
+using android::hardware::automotive::audiocontrol::DeviceToContextEntry;
 using android::hardware::automotive::audiocontrol::DuckingInfo;
+using android::hardware::automotive::audiocontrol::FadeConfiguration;
 using android::hardware::automotive::audiocontrol::IAudioControl;
 using android::hardware::automotive::audiocontrol::IModuleChangeCallback;
 using android::hardware::automotive::audiocontrol::MutingInfo;
 using android::hardware::automotive::audiocontrol::Reasons;
+using android::hardware::automotive::audiocontrol::VolumeActivationConfiguration;
+using android::hardware::automotive::audiocontrol::VolumeActivationConfigurationEntry;
+using android::hardware::automotive::audiocontrol::VolumeGroupConfig;
+using android::hardware::automotive::audiocontrol::RoutingDeviceConfiguration::
+        CONFIGURABLE_AUDIO_ENGINE_ROUTING;
+using android::hardware::automotive::audiocontrol::RoutingDeviceConfiguration::
+        DEFAULT_AUDIO_ROUTING;
+using android::hardware::automotive::audiocontrol::VolumeActivationConfigurationEntry::
+        DEFAULT_MAX_ACTIVATION_VALUE;
+using android::hardware::automotive::audiocontrol::VolumeActivationConfigurationEntry::
+        DEFAULT_MIN_ACTIVATION_VALUE;
 using ::testing::AnyOf;
 using ::testing::Eq;
 
+using ::testing::Not;
+using ::testing::UnorderedElementsAreArray;
+
+using android::internal::ToString;
+
 #include "android_audio_policy_configuration_V7_0.h"
 
 namespace xsd {
@@ -52,11 +79,219 @@
 
 namespace audiohalcommon = android::hardware::audio::common;
 namespace audiomediacommon = android::media::audio::common;
+namespace testutils = android::hardware::audiocontrol::testutils;
 
 namespace {
 constexpr int32_t kAidlVersionThree = 3;
+constexpr int32_t kAidlVersionFive = 5;
+
+bool hasValidVolumeGroupActivation(const VolumeActivationConfiguration& activation,
+                                   std::string& message) {
+    if (activation.volumeActivationEntries.empty()) {
+        message = "Volume group activation must have at least one volume activation entry";
+        return false;
+    }
+    for (const auto& entry : activation.volumeActivationEntries) {
+        int32_t max = entry.maxActivationVolumePercentage;
+        int32_t min = entry.minActivationVolumePercentage;
+        if (min > DEFAULT_MAX_ACTIVATION_VALUE || min < DEFAULT_MIN_ACTIVATION_VALUE) {
+            message = "Invalid minActivationVolumePercentage, must be between " +
+                      std::to_string(DEFAULT_MIN_ACTIVATION_VALUE) + " and " +
+                      std::to_string(DEFAULT_MAX_ACTIVATION_VALUE);
+            return false;
+        }
+        if (max > DEFAULT_MAX_ACTIVATION_VALUE || max < DEFAULT_MIN_ACTIVATION_VALUE) {
+            message = "Invalid maxActivationVolumePercentage, must be between " +
+                      std::to_string(DEFAULT_MIN_ACTIVATION_VALUE) + " and " +
+                      std::to_string(DEFAULT_MAX_ACTIVATION_VALUE);
+            return false;
+        }
+        if (min >= max) {
+            message =
+                    "Invalid maxActivationVolumePercentage and minActivationVolumePercentage "
+                    "combination, minActivationVolumePercentage must be less than "
+                    "maxActivationVolumePercentage";
+            return false;
+        }
+    }
+    return true;
 }
 
+bool hasValidAudioRoute(const DeviceToContextEntry& entry, std::string& message,
+                        std::set<std::string>& groupDevices) {
+    if (entry.contextNames.empty()) {
+        message = " Contexts can not be empty for DeviceToContextEntry";
+        return false;
+    }
+    std::set<std::string> contextInRoute;
+    for (const auto& context : entry.contextNames) {
+        std::string contextString = ToString(context);
+        if (contextInRoute.contains(contextString)) {
+            message = " Context " + contextString + " repeats for DeviceToContextEntry";
+            return false;
+        }
+        groupDevices.insert(contextString);
+    }
+    audiomediacommon::AudioDeviceDescription description;
+    if (!testutils::getAudioPortDeviceDescriptor(entry.device, description)) {
+        message = " DeviceToContextEntry must have a valid device port";
+        return false;
+    }
+    // BUS type also has empty connection
+    // Note: OUT_BUS is also mapped to OUT_DEVICE
+    if (description.type != audiomediacommon::AudioDeviceType::OUT_BUS &&
+        !description.connection.empty()) {
+        return true;
+    }
+    std::string address;
+    if (!testutils::getAddressForAudioPort(entry.device, address) || address.empty()) {
+        message = " Address can not be empty for BUS devices";
+        return false;
+    }
+    if (groupDevices.contains(address)) {
+        message = " Audio device address can not repeat in the same volume group";
+        return false;
+    }
+    groupDevices.insert(address);
+    return true;
+}
+
+inline bool hasValidTimeout(int64_t timeout) {
+    return timeout > 0;
+}
+bool hasValidFadeConfiguration(const FadeConfiguration& fadeConfiguration,
+                               const std::string& prefix, std::string& message) {
+    if (!hasValidTimeout(fadeConfiguration.fadeDurationMillis)) {
+        message = prefix + " duration must be greater than 0";
+        return false;
+    }
+    return true;
+}
+bool hadValidAudioFadeConfiguration(const AudioFadeConfiguration& fadeConfiguration,
+                                    std::string& message) {
+    if (!hasValidTimeout(fadeConfiguration.fadeInDurationMs)) {
+        message = "Fade-in duration must be greater than 0";
+        return false;
+    }
+    if (!hasValidTimeout(fadeConfiguration.fadeOutDurationMs)) {
+        message = "Fade-out duration must be greater than 0";
+        return false;
+    }
+    if (!hasValidTimeout(fadeConfiguration.fadeInDelayedForOffendersMs)) {
+        message = "Fade-in delayed for offenders duration must be greater than 0";
+        return false;
+    }
+    for (const auto& fadeOutConfig : fadeConfiguration.fadeOutConfigurations) {
+        if (!hasValidFadeConfiguration(fadeOutConfig, "Fade-out", message)) {
+            return false;
+        }
+    }
+    for (const auto& fadeOutConfig : fadeConfiguration.fadeInConfigurations) {
+        if (!hasValidFadeConfiguration(fadeOutConfig, "Fade-in", message)) {
+            return false;
+        }
+    }
+    return true;
+}
+
+void validateVolumeGroupInfo(const AudioZoneConfig& audioZoneConfig,
+                             const VolumeGroupConfig& volumeGroupConfig,
+                             const AudioDeviceConfiguration& deviceConfig) {
+    std::string zoneConfigName = testutils::toAlphaNumeric(ToString(audioZoneConfig.name));
+    std::string volumeGroupName = testutils::toAlphaNumeric(ToString(volumeGroupConfig.name));
+    std::string volumeGroupInfo =
+            "Audio zone config " + zoneConfigName + " volume group " + volumeGroupName;
+    ALOGI("%s test", volumeGroupInfo.c_str());
+
+    EXPECT_FALSE(volumeGroupConfig.carAudioRoutes.empty())
+            << volumeGroupInfo << " must have at least one audio route";
+    if (deviceConfig.routingConfig == CONFIGURABLE_AUDIO_ENGINE_ROUTING) {
+        EXPECT_FALSE(volumeGroupConfig.name.empty())
+                << volumeGroupInfo << " must have a non-empty volume name";
+    }
+    std::set<std::string> groupDevices;
+    for (const auto& audioRoute : volumeGroupConfig.carAudioRoutes) {
+        std::string routeMessage;
+        EXPECT_TRUE(hasValidAudioRoute(audioRoute, routeMessage, groupDevices))
+                << volumeGroupInfo << " Volume route message: " << routeMessage;
+    }
+    if (volumeGroupConfig.activationConfiguration.has_value()) {
+        std::string activationMessage;
+        EXPECT_TRUE(hasValidVolumeGroupActivation(volumeGroupConfig.activationConfiguration.value(),
+                                                  activationMessage))
+                << volumeGroupInfo << " Activation message: " << activationMessage;
+    }
+}
+
+void validateAudioZoneFadeConfiguration(const AudioZoneFadeConfiguration& fadeConfiguration) {
+    ALOGI("Fade configuration test");
+    std::set<audiomediacommon::AudioUsage> usages;
+    std::string defaultValidationMessage;
+    EXPECT_TRUE(hadValidAudioFadeConfiguration(fadeConfiguration.defaultConfiguration,
+                                               defaultValidationMessage))
+            << "Default configuration validation failed: " << defaultValidationMessage;
+    for (const auto& entry : fadeConfiguration.transientConfiguration) {
+        ALOGI("Transient fade configuration test");
+        std::string transientFadeConfigurationMessage;
+        EXPECT_TRUE(hadValidAudioFadeConfiguration(entry.transientFadeConfiguration,
+                                                   transientFadeConfigurationMessage))
+                << "Transient fade configuration validation failed: "
+                << transientFadeConfigurationMessage;
+        EXPECT_FALSE(entry.transientUsages.empty())
+                << "Transient fade configuration must have at least one audio usage";
+        for (const auto& usage : entry.transientUsages) {
+            EXPECT_FALSE(usages.contains(usage)) << "Audio usages " << ToString(usage)
+                                                 << " repeat in transient fade configuration";
+        }
+    }
+}
+
+void validateAudioZoneConfiguration(const AudioZone& carAudioZone,
+                                    const AudioZoneConfig& audioZoneConfig,
+                                    const AudioDeviceConfiguration& deviceConfig) {
+    std::string zoneConfigName = testutils::toAlphaNumeric(ToString(audioZoneConfig.name));
+    ALOGI("Zone config name %s test", zoneConfigName.c_str());
+    std::set<std::string> contextInfoNames;
+    EXPECT_FALSE(audioZoneConfig.volumeGroups.empty())
+            << "Volume groups for zone config " << zoneConfigName.c_str();
+    for (const auto& volumeGroup : audioZoneConfig.volumeGroups) {
+        ALOGI("Zone config name %s volume group test %s", zoneConfigName.c_str(),
+              ToString(volumeGroup.name).c_str());
+        std::vector<std::string> groupContexts =
+                testutils::getContextInfoNamesForVolumeGroup(volumeGroup);
+        for (const auto& context : groupContexts) {
+            EXPECT_FALSE(contextInfoNames.contains(context))
+                    << "Context " << context << " repeats in zone config " << zoneConfigName;
+            contextInfoNames.insert(context);
+        }
+        validateVolumeGroupInfo(audioZoneConfig, volumeGroup, deviceConfig);
+    }
+    const auto& audioZoneContexts = carAudioZone.audioZoneContext.audioContextInfos;
+    std::map<std::string, AudioZoneContextInfo> infoNameToInfo;
+    std::transform(audioZoneContexts.begin(), audioZoneContexts.end(),
+                   std::inserter(infoNameToInfo, infoNameToInfo.end()),
+                   [&](const AudioZoneContextInfo& context) {
+                       return std::make_pair(ToString(context.name), context);
+                   });
+    std::vector<AudioZoneContextInfo> configContextInfos;
+    for (const auto& contextName : contextInfoNames) {
+        const auto& pair = infoNameToInfo.find(contextName);
+        if (pair == infoNameToInfo.end()) {
+            continue;
+        }
+        configContextInfos.push_back(pair->second);
+    }
+    std::string message;
+    EXPECT_TRUE(testutils::contextInfosContainAllAudioAttributeUsages(configContextInfos, message))
+            << "Config " << zoneConfigName << " message: " << message;
+
+    if (audioZoneConfig.fadeConfiguration.has_value()) {
+        validateAudioZoneFadeConfiguration(audioZoneConfig.fadeConfiguration.value());
+    }
+}
+
+}  // namespace
+
 class AudioControlAidl : public testing::TestWithParam<std::string> {
   public:
     virtual void SetUp() override {
@@ -292,12 +527,193 @@
                 AnyOf(Eq(Status::EX_ILLEGAL_ARGUMENT), Eq(Status::EX_UNSUPPORTED_OPERATION)));
 }
 
+class AudioControlVersionFiveAndAbove : public AudioControlAidl {
+  public:
+    virtual void SetUp() override {
+        AudioControlAidl::SetUp();
+        if (isAidlVersionAtleast(kAidlVersionFive)) {
+            return;
+        }
+        GTEST_SKIP() << " Version is lower than " << std::to_string(kAidlVersionFive);
+    }
+};
+
+class AudioControlWithAudioConfiguration : public AudioControlVersionFiveAndAbove {
+  public:
+    virtual void SetUp() override {
+        AudioControlVersionFiveAndAbove::SetUp();
+
+        if (IsSkipped()) {
+            return;
+        }
+
+        const auto& configStatus =
+                audioControl->getAudioDeviceConfiguration(&audioDeviceConfiguration);
+
+        EXPECT_THAT(configStatus.exceptionCode(),
+                    AnyOf(Eq(Status::EX_NONE), Eq(Status::EX_UNSUPPORTED_OPERATION)));
+        if (!configStatus.isOk()) {
+            GTEST_SKIP() << "Device does not support audio configurations APIs";
+        }
+        ALOGD("Audio device info: %s", audioDeviceConfiguration.toString().c_str());
+    }
+
+    AudioDeviceConfiguration audioDeviceConfiguration;
+};
+
+TEST_P(AudioControlWithAudioConfiguration, DefaultAudioRoutingConfiguration) {
+    if (audioDeviceConfiguration.routingConfig != DEFAULT_AUDIO_ROUTING) {
+        GTEST_SKIP() << "Default audio routing not supported";
+    }
+    std::vector<AudioZone> zones;
+
+    const auto& zoneStatus = audioControl->getCarAudioZones(&zones);
+
+    EXPECT_THAT(zoneStatus.exceptionCode(),
+                AnyOf(Eq(Status::EX_NONE), Eq(Status::EX_UNSUPPORTED_OPERATION)))
+            << "Default routing can be implemented or unsupported";
+    if (!zoneStatus.isOk()) return;
+    EXPECT_TRUE(zones.empty()) << "Zones must be empty for default routing";
+}
+
+class AudioControlWithDynamicConfiguration : public AudioControlWithAudioConfiguration {
+  public:
+    virtual void SetUp() override {
+        AudioControlWithAudioConfiguration::SetUp();
+        if (IsSkipped()) {
+            return;
+        }
+        if (audioDeviceConfiguration.routingConfig == DEFAULT_AUDIO_ROUTING) {
+            GTEST_SKIP() << "Dynamic/core audio routing not supported";
+        }
+        const auto& zoneStatus = audioControl->getCarAudioZones(&audioZones);
+        EXPECT_EQ(zoneStatus.exceptionCode(), Status::EX_NONE)
+                << "Zones API must be supported for core/dynamic routing";
+    }
+
+    std::vector<AudioZone> audioZones;
+};
+
+TEST_P(AudioControlWithDynamicConfiguration, DynamicAudioRoutingConfiguration) {
+    EXPECT_FALSE(audioZones.empty()) << "Zones must not be empty for core/dynamic routing";
+}
+
+class AudioControlWithAudioZoneInfo : public AudioControlWithDynamicConfiguration {
+  public:
+    virtual void SetUp() override {
+        AudioControlWithDynamicConfiguration::SetUp();
+        if (IsSkipped()) {
+            return;
+        }
+        EXPECT_TRUE(!audioZones.empty()) << "Zones must exist for core/dynamic routing";
+    }
+};
+
+TEST_P(AudioControlWithAudioZoneInfo, AudioZonesRequirements) {
+    bool primaryZoneFound = false;
+    std::set<int> zoneIds;
+    std::set<int> occupantIds;
+    std::set<android::String16> zoneNames;
+    std::set<std::string> deviceAddresses;
+    for (const auto& zone : audioZones) {
+        if (zone.id == AudioZone::PRIMARY_AUDIO_ZONE) {
+            EXPECT_FALSE(primaryZoneFound) << "There can only be one primary zone";
+            primaryZoneFound = true;
+        }
+        EXPECT_FALSE(zoneIds.contains(zone.id)) << "Zone " << std::to_string(zone.id) << " repeats";
+        zoneIds.insert(zone.id);
+        if (!zone.name.empty()) {
+            EXPECT_FALSE(zoneNames.contains(zone.name)) << "Zone " << zone.name << " repeats";
+            zoneNames.insert(zone.name);
+        }
+        if (zone.occupantZoneId != AudioZone::UNASSIGNED_OCCUPANT) {
+            EXPECT_FALSE(occupantIds.contains(zone.occupantZoneId))
+                    << "Occupant zone id " << zone.occupantZoneId << " repeats";
+            occupantIds.insert(zone.occupantZoneId);
+        }
+        const auto& zoneAddresses = testutils::getDeviceAddressesForZone(zone);
+        for (const auto& address : zoneAddresses) {
+            EXPECT_FALSE(deviceAddresses.contains(address))
+                    << "Device address " << address << " in zone " << zone.name << " repeats";
+        }
+        // Add after zone comparison is done since devices may repeat within a zone for different
+        // configurations
+        deviceAddresses.insert(zoneAddresses.begin(), zoneAddresses.end());
+    }
+    EXPECT_TRUE(primaryZoneFound) << "Primary zone must exist";
+}
+
+TEST_P(AudioControlWithAudioZoneInfo, AudioZoneInfoRequirements) {
+    for (const auto& carAudioZone : audioZones) {
+        ALOGI("Zone id %d test", carAudioZone.id);
+        std::string missingContextMessage;
+        EXPECT_TRUE(testutils::contextContainsAllAudioAttributeUsages(carAudioZone.audioZoneContext,
+                                                                      missingContextMessage))
+                << "Audio zone context for zone id " << std::to_string(carAudioZone.id)
+                << missingContextMessage;
+        EXPECT_FALSE(carAudioZone.audioZoneConfigs.empty())
+                << "Audio zone zone id " << std::to_string(carAudioZone.id)
+                << " missing zone configs";
+        std::set<android::String16> configNames;
+        bool defaultConfigFound = false;
+        for (const auto& config : carAudioZone.audioZoneConfigs) {
+            ALOGI("Zone id %d config name %s test", carAudioZone.id, ToString(config.name).c_str());
+            if (config.isDefault) {
+                EXPECT_FALSE(defaultConfigFound)
+                        << "Config name " << config.name
+                        << " repeats default config value in zone id " << carAudioZone.id;
+                defaultConfigFound = true;
+            }
+            EXPECT_FALSE(configNames.contains(config.name))
+                    << "Config name " << config.name << " repeats in " << carAudioZone.id;
+        }
+        EXPECT_TRUE(defaultConfigFound)
+                << "Audio zone " << carAudioZone.id << " must contain default config";
+        std::set<audiomediacommon::AudioPort> inputPorts;
+        ALOGI("Zone id %d input devices test", carAudioZone.id);
+        for (const auto& audioPort : carAudioZone.inputAudioDevices) {
+            std::string address;
+            const auto hasAddress = testutils::getAddressForAudioPort(audioPort, address);
+            EXPECT_FALSE(inputPorts.contains(audioPort))
+                    << "Repeating input device for " << carAudioZone.id << ", device address "
+                    << (hasAddress ? address : "empty address");
+            inputPorts.insert(audioPort);
+        }
+    }
+}
+
+TEST_P(AudioControlWithAudioZoneInfo, AudioZoneConfigInfoRequirements) {
+    for (const auto& carAudioZone : audioZones) {
+        for (const auto& audioZoneConfig : carAudioZone.audioZoneConfigs) {
+            validateAudioZoneConfiguration(carAudioZone, audioZoneConfig, audioDeviceConfiguration);
+        }
+    }
+}
+
 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioControlAidl);
 INSTANTIATE_TEST_SUITE_P(
         Audiocontrol, AudioControlAidl,
         testing::ValuesIn(android::getAidlHalInstanceNames(IAudioControl::descriptor)),
         android::PrintInstanceNameToString);
 
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioControlWithAudioConfiguration);
+INSTANTIATE_TEST_SUITE_P(
+        Audiocontrol, AudioControlWithAudioConfiguration,
+        testing::ValuesIn(android::getAidlHalInstanceNames(IAudioControl::descriptor)),
+        android::PrintInstanceNameToString);
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioControlWithDynamicConfiguration);
+INSTANTIATE_TEST_SUITE_P(
+        Audiocontrol, AudioControlWithDynamicConfiguration,
+        testing::ValuesIn(android::getAidlHalInstanceNames(IAudioControl::descriptor)),
+        android::PrintInstanceNameToString);
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AudioControlWithAudioZoneInfo);
+INSTANTIATE_TEST_SUITE_P(
+        Audiocontrol, AudioControlWithAudioZoneInfo,
+        testing::ValuesIn(android::getAidlHalInstanceNames(IAudioControl::descriptor)),
+        android::PrintInstanceNameToString);
+
 int main(int argc, char** argv) {
     ::testing::InitGoogleTest(&argc, argv);
     ProcessState::self()->setThreadPoolMaxThreadCount(1);
diff --git a/automotive/audiocontrol/aidl/vts/include/AudioControlTestUtils.h b/automotive/audiocontrol/aidl/vts/include/AudioControlTestUtils.h
new file mode 100644
index 0000000..46fdce2
--- /dev/null
+++ b/automotive/audiocontrol/aidl/vts/include/AudioControlTestUtils.h
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+#ifndef MAIN8_AUDIOCONTROLTESTUTILS_H
+#define MAIN8_AUDIOCONTROLTESTUTILS_H
+
+#include <android/hardware/automotive/audiocontrol/IAudioControl.h>
+#include <string>
+#include <vector>
+
+namespace android {
+namespace hardware {
+namespace audiocontrol {
+namespace testutils {
+
+std::string toAlphaNumeric(const std::string& info);
+
+bool getAudioPortDeviceDescriptor(
+        const android::media::audio::common::AudioPort& audioPort,
+        android::media::audio::common::AudioDeviceDescription& description);
+
+bool getAddressForAudioPort(const android::media::audio::common::AudioPort& audioPort,
+                            std::string& address);
+
+bool getAddressForAudioDevice(
+        const android::hardware::automotive::audiocontrol::DeviceToContextEntry& device,
+        std::string& address);
+
+std::vector<std::string> getDeviceAddressesForVolumeGroup(
+        const android::hardware::automotive::audiocontrol::VolumeGroupConfig& config);
+
+std::vector<std::string> getDeviceAddressesForZoneConfig(
+        const android::hardware::automotive::audiocontrol::AudioZoneConfig& config);
+
+std::vector<std::string> getDeviceAddressesForZone(
+        const android::hardware::automotive::audiocontrol::AudioZone& config);
+
+bool contextInfosContainAllAudioAttributeUsages(
+        const std::vector<android::hardware::automotive::audiocontrol::AudioZoneContextInfo>& infos,
+        std::string& message);
+
+bool contextContainsAllAudioAttributeUsages(
+        const android::hardware::automotive::audiocontrol::AudioZoneContext& context,
+        std::string& message);
+
+std::vector<std::string> getContextInfoNamesForVolumeGroup(
+        const android::hardware::automotive::audiocontrol::VolumeGroupConfig& group);
+
+}  // namespace testutils
+}  // namespace audiocontrol
+}  // namespace hardware
+}  // namespace android
+
+#endif  // MAIN8_AUDIOCONTROLTESTUTILS_H
diff --git a/automotive/audiocontrol/aidl/vts/src/AudioControlTestUtils.cpp b/automotive/audiocontrol/aidl/vts/src/AudioControlTestUtils.cpp
new file mode 100644
index 0000000..7b7c896
--- /dev/null
+++ b/automotive/audiocontrol/aidl/vts/src/AudioControlTestUtils.cpp
@@ -0,0 +1,203 @@
+/*
+ * 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.
+ */
+
+#include "../include/AudioControlTestUtils.h"
+
+#include <set>
+
+using android::hardware::automotive::audiocontrol::AudioZone;
+using android::hardware::automotive::audiocontrol::AudioZoneConfig;
+using android::hardware::automotive::audiocontrol::AudioZoneContext;
+using android::hardware::automotive::audiocontrol::AudioZoneContextInfo;
+using android::hardware::automotive::audiocontrol::DeviceToContextEntry;
+using android::hardware::automotive::audiocontrol::VolumeGroupConfig;
+
+namespace audiomediacommon = android::media::audio::common;
+
+namespace android {
+namespace hardware {
+namespace audiocontrol {
+namespace testutils {
+
+std::string toAlphaNumeric(const std::string& info) {
+    std::string name = info;
+    for (size_t i = 0; i < name.size(); i++) {
+        // gtest test names must only contain alphanumeric characters
+        if (!std::isalnum(name[i])) name[i] = '_';
+    }
+
+    return name;
+}
+
+bool getAudioPortDeviceDescriptor(const audiomediacommon::AudioPort& audioPort,
+                                  audiomediacommon::AudioDeviceDescription& description) {
+    if (audioPort.ext.getTag() != audiomediacommon::AudioPortExt::Tag::device) {
+        return false;
+    }
+    const auto& audioDevice =
+            audioPort.ext.get<audiomediacommon::AudioPortExt::Tag::device>().device;
+    description = audioDevice.type;
+    return true;
+}
+
+bool getAddressForAudioPort(const android::media::audio::common::AudioPort& audioPort,
+                            std::string& address) {
+    if (audioPort.ext.getTag() != audiomediacommon::AudioPortExt::Tag::device) {
+        return false;
+    }
+    const auto& audioDevice =
+            audioPort.ext.get<audiomediacommon::AudioPortExt::Tag::device>().device;
+
+    switch (audioDevice.address.getTag()) {
+        case audiomediacommon::AudioDeviceAddress::Tag::id:
+            address = audioDevice.address.get<audiomediacommon::AudioDeviceAddress::Tag::id>();
+            return true;
+        case audiomediacommon::AudioDeviceAddress::Tag::alsa:
+            address = android::internal::ToString(
+                    audioDevice.address.get<audiomediacommon::AudioDeviceAddress::Tag::alsa>());
+            return true;
+        case audiomediacommon::AudioDeviceAddress::Tag::mac:
+            address = android::internal::ToString(
+                    audioDevice.address.get<audiomediacommon::AudioDeviceAddress::Tag::mac>());
+            return true;
+        case audiomediacommon::AudioDeviceAddress::Tag::ipv4:
+            address = android::internal::ToString(
+                    audioDevice.address.get<audiomediacommon::AudioDeviceAddress::Tag::ipv4>());
+            return true;
+        case audiomediacommon::AudioDeviceAddress::Tag::ipv6:
+            address = android::internal::ToString(
+                    audioDevice.address.get<audiomediacommon::AudioDeviceAddress::Tag::ipv6>());
+            return true;
+        default:
+            address = audioDevice.address.toString();
+            return true;
+    }
+}
+
+bool getAddressForAudioDevice(const DeviceToContextEntry& device, std::string& address) {
+    if (device.device.flags.getTag() == audiomediacommon::AudioIoFlags::input ||
+        device.device.ext.getTag() != audiomediacommon::AudioPortExt::Tag::device) {
+        return false;
+    }
+    return getAddressForAudioPort(device.device, address);
+}
+
+std::vector<std::string> getDeviceAddressesForVolumeGroup(const VolumeGroupConfig& config) {
+    std::vector<std::string> addresses;
+    for (const auto& route : config.carAudioRoutes) {
+        std::string address;
+        if (!getAddressForAudioDevice(route, address)) {
+            continue;
+        }
+        addresses.push_back(address);
+    }
+    return addresses;
+}
+
+std::vector<std::string> getDeviceAddressesForZoneConfig(const AudioZoneConfig& config) {
+    std::vector<std::string> addresses;
+    for (const auto& volumeGroup : config.volumeGroups) {
+        const auto groupAddresses = getDeviceAddressesForVolumeGroup(volumeGroup);
+        addresses.insert(addresses.begin(), groupAddresses.begin(), groupAddresses.end());
+    }
+    return addresses;
+}
+
+std::vector<std::string> getDeviceAddressesForZone(const AudioZone& config) {
+    std::vector<std::string> addresses;
+    for (const auto& zoneConfig : config.audioZoneConfigs) {
+        const auto groupAddresses = getDeviceAddressesForZoneConfig(zoneConfig);
+        addresses.insert(addresses.begin(), groupAddresses.begin(), groupAddresses.end());
+    }
+    return addresses;
+}
+
+static void addContextUsages(const AudioZoneContextInfo& info,
+                             std::set<audiomediacommon::AudioUsage>& contextUsages) {
+    for (const auto& audioAttribute : info.audioAttributes) {
+        contextUsages.insert(audioAttribute.usage);
+    }
+}
+
+bool contextInfosContainAllAudioAttributeUsages(const std::vector<AudioZoneContextInfo>& infos,
+                                                std::string& message) {
+    static const std::vector<audiomediacommon::AudioUsage> audioUsages{
+            audiomediacommon::AudioUsage::UNKNOWN,
+            audiomediacommon::AudioUsage::MEDIA,
+            audiomediacommon::AudioUsage::VOICE_COMMUNICATION,
+            audiomediacommon::AudioUsage::VOICE_COMMUNICATION_SIGNALLING,
+            audiomediacommon::AudioUsage::ALARM,
+            audiomediacommon::AudioUsage::NOTIFICATION,
+            audiomediacommon::AudioUsage::NOTIFICATION_TELEPHONY_RINGTONE,
+            audiomediacommon::AudioUsage::NOTIFICATION_EVENT,
+            audiomediacommon::AudioUsage::ASSISTANCE_ACCESSIBILITY,
+            audiomediacommon::AudioUsage::ASSISTANCE_NAVIGATION_GUIDANCE,
+            audiomediacommon::AudioUsage::ASSISTANCE_SONIFICATION,
+            audiomediacommon::AudioUsage::GAME,
+            audiomediacommon::AudioUsage::ASSISTANT,
+            audiomediacommon::AudioUsage::CALL_ASSISTANT,
+            audiomediacommon::AudioUsage::EMERGENCY,
+            audiomediacommon::AudioUsage::SAFETY,
+            audiomediacommon::AudioUsage::VEHICLE_STATUS,
+            audiomediacommon::AudioUsage::ANNOUNCEMENT,
+    };
+
+    std::set<audiomediacommon::AudioUsage> contextUsages;
+    for (const auto& contextInfo : infos) {
+        addContextUsages(contextInfo, contextUsages);
+    }
+
+    bool allUsagesPresent = true;
+    for (const auto& usage : audioUsages) {
+        if (contextUsages.contains(usage)) {
+            continue;
+        }
+        if (message.empty()) {
+            message = " Missing usage(s): ";
+        }
+        message += audiomediacommon::toString(usage) + ", ";
+        allUsagesPresent = false;
+    }
+    return allUsagesPresent;
+}
+
+bool contextContainsAllAudioAttributeUsages(const AudioZoneContext& context, std::string& message) {
+    return contextInfosContainAllAudioAttributeUsages(context.audioContextInfos, message);
+}
+
+std::vector<std::string> getContextInfoNamesForAudioRoute(const DeviceToContextEntry& route) {
+    std::vector<std::string> contextInfoNames;
+    contextInfoNames.reserve(route.contextNames.size());
+    for (const auto& contextName : route.contextNames) {
+        contextInfoNames.push_back(android::internal::ToString(contextName));
+    }
+    return contextInfoNames;
+}
+
+std::vector<std::string> getContextInfoNamesForVolumeGroup(const VolumeGroupConfig& group) {
+    std::vector<std::string> contextInfoNames;
+    for (const auto& route : group.carAudioRoutes) {
+        std::vector<std::string> routeContexts = getContextInfoNamesForAudioRoute(route);
+        contextInfoNames.insert(contextInfoNames.begin(), routeContexts.begin(),
+                                routeContexts.end());
+    }
+    return contextInfoNames;
+}
+
+}  // namespace testutils
+}  // namespace audiocontrol
+}  // namespace hardware
+}  // namespace android
\ No newline at end of file
diff --git a/automotive/evs/aidl/impl/default/include/ConfigManager.h b/automotive/evs/aidl/impl/default/include/ConfigManager.h
index 37a17dc..f6ba2f2 100644
--- a/automotive/evs/aidl/impl/default/include/ConfigManager.h
+++ b/automotive/evs/aidl/impl/default/include/ConfigManager.h
@@ -50,6 +50,7 @@
 class ConfigManager final {
   public:
     static std::unique_ptr<ConfigManager> Create();
+    static std::unique_ptr<ConfigManager> Create(const std::string path);
     ConfigManager(const ConfigManager&) = delete;
     ConfigManager& operator=(const ConfigManager&) = delete;
 
@@ -65,6 +66,15 @@
             UNKNOWN = std::numeric_limits<std::underlying_type_t<DeviceType>>::max(),
         };
 
+        enum class PixelFormat : std::int32_t {
+            NV12 = 0,
+            NV21 = 1,
+            YV12 = 2,
+            I420 = 3,
+
+            UNKNOWN = std::numeric_limits<std::underlying_type_t<DeviceType>>::max(),
+        };
+
         CameraInfo() : characteristics(nullptr) {}
 
         virtual ~CameraInfo();
@@ -82,6 +92,8 @@
 
         static DeviceType deviceTypeFromSV(const std::string_view sv);
 
+        static PixelFormat pixelFormatFromSV(const std::string_view sv);
+
         DeviceType deviceType{DeviceType::NONE};
 
         /*
@@ -105,6 +117,11 @@
 
         /* Camera module characteristics */
         camera_metadata_t* characteristics;
+
+        /* Format of media in a given media container. This field is effective
+         * only for DeviceType::VIDEO.
+         */
+        PixelFormat format;
     };
 
     class CameraGroupInfo : public CameraInfo {
@@ -272,7 +289,7 @@
      * @return bool
      *         True if it completes parsing a file successfully.
      */
-    bool readConfigDataFromXML() noexcept;
+    bool readConfigDataFromXML(const std::string path) noexcept;
 
     /*
      * read the information of the vehicle
diff --git a/automotive/evs/aidl/impl/default/include/EvsCameraBase.h b/automotive/evs/aidl/impl/default/include/EvsCameraBase.h
index c3e9dfc..d9180e8 100644
--- a/automotive/evs/aidl/impl/default/include/EvsCameraBase.h
+++ b/automotive/evs/aidl/impl/default/include/EvsCameraBase.h
@@ -30,6 +30,7 @@
 
     ~EvsCameraBase() override = default;
 
+    virtual std::string getId() = 0;
     virtual void shutdown() = 0;
 
   protected:
diff --git a/automotive/evs/aidl/impl/default/include/EvsMockCamera.h b/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
index cd68532..67de8dc 100644
--- a/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
+++ b/automotive/evs/aidl/impl/default/include/EvsMockCamera.h
@@ -65,7 +65,9 @@
     ndk::ScopedAStatus setPrimaryClient() override;
     ndk::ScopedAStatus unsetPrimaryClient() override;
 
-    const evs::CameraDesc& getDesc() { return mDescription; }
+    std::string getId() override { return mDescription.id; }
+
+    const CameraDesc& getDesc() { return mDescription; }
 
     static std::shared_ptr<EvsMockCamera> Create(const char* deviceName);
     static std::shared_ptr<EvsMockCamera> Create(
diff --git a/automotive/evs/aidl/impl/default/include/EvsVideoEmulatedCamera.h b/automotive/evs/aidl/impl/default/include/EvsVideoEmulatedCamera.h
index 9d1610a..dc70a43 100644
--- a/automotive/evs/aidl/impl/default/include/EvsVideoEmulatedCamera.h
+++ b/automotive/evs/aidl/impl/default/include/EvsVideoEmulatedCamera.h
@@ -27,7 +27,6 @@
 #include <aidl/android/hardware/automotive/evs/ParameterRange.h>
 #include <aidl/android/hardware/automotive/evs/Stream.h>
 #include <media/NdkMediaExtractor.h>
-
 #include <ui/GraphicBuffer.h>
 
 #include <cstdint>
@@ -70,6 +69,8 @@
     // Methods from EvsCameraBase follow.
     void shutdown() override;
 
+    std::string getId() override { return mDescription.id; }
+
     const evs::CameraDesc& getDesc() { return mDescription; }
 
     static std::shared_ptr<EvsVideoEmulatedCamera> Create(const char* deviceName);
@@ -117,6 +118,10 @@
     bool postVideoStreamStop_locked(ndk::ScopedAStatus& status,
                                     std::unique_lock<std::mutex>& lck) override;
 
+    int (*mFillBuffer)(const uint8_t* src_y, int src_stride_y, const uint8_t* src_u,
+                       int src_stride_u, const uint8_t* src_v, int src_stride_v, uint8_t* dst_argb,
+                       int dst_stride_argb, int width, int height);
+
     // The properties of this camera.
     CameraDesc mDescription = {};
 
@@ -149,6 +154,10 @@
     uint64_t mUsage = 0;
     // Bytes per line in the buffers
     uint32_t mStride = 0;
+    // Bytes per line in the output buffer
+    uint32_t mDstStride = 0;
+    // Bytes per line of U/V plane
+    uint32_t mUvStride = 0;
 
     // Camera parameters.
     std::unordered_map<CameraParam, std::shared_ptr<CameraParameterDesc>> mParams;
diff --git a/automotive/evs/aidl/impl/default/src/ConfigManager.cpp b/automotive/evs/aidl/impl/default/src/ConfigManager.cpp
index d8961d0..eea80f4 100644
--- a/automotive/evs/aidl/impl/default/src/ConfigManager.cpp
+++ b/automotive/evs/aidl/impl/default/src/ConfigManager.cpp
@@ -52,6 +52,25 @@
     return search == nameToType.end() ? DeviceType::UNKNOWN : search->second;
 }
 
+ConfigManager::CameraInfo::PixelFormat ConfigManager::CameraInfo::pixelFormatFromSV(
+        const std::string_view sv) {
+    using namespace std::string_view_literals;
+    static const std::unordered_map<std::string_view, PixelFormat> nameToFormat = {
+            // Full resolution Y plane followed by 2x2 subsampled U/V
+            // interleaved plane.
+            {"NV12"sv, PixelFormat::NV12},
+            // Full resolution Y plane followed by 2x2 subsampled V/U
+            // interleaved plane.
+            {"NV21"sv, PixelFormat::NV21},
+            // Full resolution Y plane followed by 2x2 subsampled V plane and then U plane.
+            {"YV12"sv, PixelFormat::YV12},
+            // Full resolution Y plane followed by 2x2 subsampled U plane and then V plane.
+            {"I420"sv, PixelFormat::I420},
+    };
+    const auto search = nameToFormat.find(sv);
+    return search == nameToFormat.end() ? PixelFormat::UNKNOWN : search->second;
+}
+
 void ConfigManager::printElementNames(const XMLElement* rootElem, const std::string& prefix) const {
     const XMLElement* curElem = rootElem;
 
@@ -144,6 +163,10 @@
         aCamera->deviceType = CameraInfo::deviceTypeFromSV(typeAttr->Value());
     }
 
+    if (const auto formatAttr = aDeviceElem->FindAttribute("format")) {
+        aCamera->format = CameraInfo::pixelFormatFromSV(formatAttr->Value());
+    }
+
     /* size information to allocate camera_metadata_t */
     size_t totalEntries = 0;
     size_t totalDataSize = 0;
@@ -474,19 +497,16 @@
     return;
 }
 
-bool ConfigManager::readConfigDataFromXML() noexcept {
+bool ConfigManager::readConfigDataFromXML(const std::string path) noexcept {
     XMLDocument xmlDoc;
 
     const int64_t parsingStart = android::elapsedRealtimeNano();
 
     /* load and parse a configuration file */
-    xmlDoc.LoadFile(sConfigOverridePath.data());
+    xmlDoc.LoadFile(path.c_str());
     if (xmlDoc.ErrorID() != tinyxml2::XML_SUCCESS) {
-        xmlDoc.LoadFile(sConfigDefaultPath.data());
-        if (xmlDoc.ErrorID() != tinyxml2::XML_SUCCESS) {
-            LOG(ERROR) << "Failed to load and/or parse a configuration file, " << xmlDoc.ErrorStr();
-            return false;
-        }
+        LOG(ERROR) << "Failed to load and/or parse a configuration file, " << xmlDoc.ErrorStr();
+        return false;
     }
 
     /* retrieve the root element */
@@ -644,8 +664,7 @@
                     p += count * sizeof(camera_metadata_rational_t);
                     break;
                 default:
-                    LOG(WARNING) << "Type " << type << " is unknown; "
-                                 << "data may be corrupted.";
+                    LOG(WARNING) << "Type " << type << " is unknown; " << "data may be corrupted.";
                     break;
             }
         }
@@ -746,8 +765,7 @@
                     p += count * sizeof(camera_metadata_rational_t);
                     break;
                 default:
-                    LOG(WARNING) << "Type " << type << " is unknown; "
-                                 << "data may be corrupted.";
+                    LOG(WARNING) << "Type " << type << " is unknown; " << "data may be corrupted.";
                     break;
             }
         }
@@ -958,6 +976,16 @@
 }
 
 std::unique_ptr<ConfigManager> ConfigManager::Create() {
+    std::unique_ptr<ConfigManager> mgr = Create(std::string(sConfigOverridePath));
+    if (!mgr) {
+        LOG(DEBUG) << "A configuration override file does not exist. Use a default file instead.";
+        mgr = Create(std::string((sConfigDefaultPath)));
+    }
+
+    return mgr;
+}
+
+std::unique_ptr<ConfigManager> ConfigManager::Create(const std::string path) {
     std::unique_ptr<ConfigManager> cfgMgr(new ConfigManager());
 
     /*
@@ -968,7 +996,7 @@
      * to the filesystem and construct CameraInfo instead; this was
      * evaluated as 10x faster.
      */
-    if (!cfgMgr->readConfigDataFromXML()) {
+    if (!cfgMgr->readConfigDataFromXML(path)) {
         return nullptr;
     } else {
         return cfgMgr;
diff --git a/automotive/evs/aidl/impl/default/src/EvsCamera.cpp b/automotive/evs/aidl/impl/default/src/EvsCamera.cpp
index 005c71f..c28f86f 100644
--- a/automotive/evs/aidl/impl/default/src/EvsCamera.cpp
+++ b/automotive/evs/aidl/impl/default/src/EvsCamera.cpp
@@ -205,7 +205,8 @@
         }
 
         if ((!preVideoStreamStop_locked(status, lck) || !stopVideoStreamImpl_locked(status, lck) ||
-             !postVideoStreamStop_locked(status, lck)) && !status.isOk()) {
+             !postVideoStreamStop_locked(status, lck)) &&
+            !status.isOk()) {
             needShutdown = true;
         }
     }
diff --git a/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp b/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp
index 480c28d..7574a34 100644
--- a/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp
+++ b/automotive/evs/aidl/impl/default/src/EvsVideoEmulatedCamera.cpp
@@ -26,6 +26,7 @@
 #include <utils/SystemClock.h>
 
 #include <fcntl.h>
+#include <libyuv.h>
 #include <sys/types.h>
 #include <unistd.h>
 
@@ -35,12 +36,45 @@
 #include <tuple>
 #include <utility>
 
+// Uncomment below line to dump decoded frames.
+// #define DUMP_FRAMES (1)
+
 namespace aidl::android::hardware::automotive::evs::implementation {
 
 namespace {
+
 struct FormatDeleter {
     void operator()(AMediaFormat* format) const { AMediaFormat_delete(format); }
 };
+
+int fillRGBAFromNv12(const uint8_t* src_y, int src_stride_y, const uint8_t* src_uv,
+                     int src_stride_uv, const uint8_t*, int, uint8_t* dst_abgr, int dst_stride_abgr,
+                     int width, int height) {
+    return libyuv::NV12ToABGR(src_y, src_stride_y, src_uv, src_stride_uv, dst_abgr, dst_stride_abgr,
+                              width, height);
+}
+
+int fillRGBAFromNv21(const uint8_t* src_y, int src_stride_y, const uint8_t* src_vu,
+                     int src_stride_vu, const uint8_t*, int, uint8_t* dst_abgr, int dst_stride_abgr,
+                     int width, int height) {
+    return libyuv::NV21ToABGR(src_y, src_stride_y, src_vu, src_stride_vu, dst_abgr, dst_stride_abgr,
+                              width, height);
+}
+
+int fillRGBAFromYv12(const uint8_t* src_y, int src_stride_y, const uint8_t* src_u, int src_stride_u,
+                     const uint8_t* src_v, int src_stride_v, uint8_t* dst_abgr, int dst_stride_abgr,
+                     int width, int height) {
+    return libyuv::I420ToABGR(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v,
+                              dst_abgr, dst_stride_abgr, width, height);
+}
+
+int fillRGBAFromI420(const uint8_t* src_y, int src_stride_y, const uint8_t* src_u, int src_stride_u,
+                     const uint8_t* src_v, int src_stride_v, uint8_t* dst_abgr, int dst_stride_abgr,
+                     int width, int height) {
+    return libyuv::I420ToABGR(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v,
+                              dst_abgr, dst_stride_abgr, width, height);
+}
+
 }  // namespace
 
 EvsVideoEmulatedCamera::EvsVideoEmulatedCamera(Sigil, const char* deviceName,
@@ -123,7 +157,7 @@
     mDescription.vendorFlags = 0xFFFFFFFF;  // Arbitrary test value
     mUsage = GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_HW_CAMERA_WRITE |
              GRALLOC_USAGE_SW_READ_RARELY | GRALLOC_USAGE_SW_WRITE_RARELY;
-    mFormat = HAL_PIXEL_FORMAT_YCBCR_420_888;
+    mFormat = HAL_PIXEL_FORMAT_RGBA_8888;
     AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_COLOR_FORMAT, COLOR_FormatYUV420Flexible);
     {
         const media_status_t status =
@@ -137,6 +171,30 @@
     format.reset(AMediaCodec_getOutputFormat(mVideoCodec.get()));
     AMediaFormat_getInt32(format.get(), AMEDIAFORMAT_KEY_WIDTH, &mWidth);
     AMediaFormat_getInt32(format.get(), AMEDIAFORMAT_KEY_HEIGHT, &mHeight);
+
+    switch (mCameraInfo->format) {
+        default:
+        case ConfigManager::CameraInfo::PixelFormat::NV12:
+            mFillBuffer = fillRGBAFromNv12;
+            mUvStride = mWidth;
+            mDstStride = mWidth * 4;
+            break;
+        case ConfigManager::CameraInfo::PixelFormat::NV21:
+            mFillBuffer = fillRGBAFromNv21;
+            mUvStride = mWidth;
+            mDstStride = mWidth * 4;
+            break;
+        case ConfigManager::CameraInfo::PixelFormat::YV12:
+            mFillBuffer = fillRGBAFromYv12;
+            mUvStride = mWidth / 2;
+            mDstStride = mWidth * 4;
+            break;
+        case ConfigManager::CameraInfo::PixelFormat::I420:
+            mFillBuffer = fillRGBAFromI420;
+            mUvStride = mWidth / 2;
+            mDstStride = mWidth * 4;
+            break;
+    }
     return true;
 }
 
@@ -190,6 +248,28 @@
     uint8_t* const codecOutputBuffer =
             AMediaCodec_getOutputBuffer(mVideoCodec.get(), index, &decodedOutSize) + info.offset;
 
+    int color_format = 0;
+    const auto outFormat = AMediaCodec_getOutputFormat(mVideoCodec.get());
+    if (!AMediaFormat_getInt32(outFormat, AMEDIAFORMAT_KEY_COLOR_FORMAT, &color_format)) {
+        LOG(ERROR) << "Failed to get the color format.";
+        return;
+    }
+
+    int stride = 0;
+    if (!AMediaFormat_getInt32(outFormat, AMEDIAFORMAT_KEY_STRIDE, &stride)) {
+        LOG(WARNING) << "Cannot find stride in format. Set as frame width.";
+        stride = mWidth;
+    }
+
+    int slice_height = 0;
+    if (!AMediaFormat_getInt32(outFormat, AMEDIAFORMAT_KEY_SLICE_HEIGHT, &slice_height)) {
+        LOG(WARNING) << "Cannot find slice-height in format. Set as frame height.";
+        slice_height = mHeight;
+    }
+
+    LOG(DEBUG) << "COLOR FORMAT: " << color_format << " stride: " << stride
+               << " height: " << slice_height;
+
     std::size_t renderBufferId = static_cast<std::size_t>(-1);
     buffer_handle_t renderBufferHandle = nullptr;
     {
@@ -200,7 +280,7 @@
         std::tie(renderBufferId, renderBufferHandle) = useBuffer_unsafe();
     }
     if (!renderBufferHandle) {
-        LOG(ERROR) << __func__ << ": Camera failed to get an available render buffer.";
+        LOG(DEBUG) << __func__ << ": Camera failed to get an available render buffer.";
         return;
     }
     std::vector<BufferDesc> renderBufferDescs;
@@ -236,19 +316,51 @@
         return;
     }
 
-    std::size_t ySize = mHeight * mStride;
+    // Decoded output is in YUV4:2:0.
+    std::size_t ySize = mHeight * mWidth;
     std::size_t uvSize = ySize / 4;
 
-    std::memcpy(pixels, codecOutputBuffer, ySize);
-    pixels += ySize;
-
     uint8_t* u_head = codecOutputBuffer + ySize;
     uint8_t* v_head = u_head + uvSize;
 
-    for (size_t i = 0; i < uvSize; ++i) {
-        *(pixels++) = *(u_head++);
-        *(pixels++) = *(v_head++);
+#if DUMP_FRAMES
+    // TODO: We may want to keep this "dump" option.
+    static int dumpCount = 0;
+    static bool dumpData = ++dumpCount < 10;
+    if (dumpData) {
+        std::string path = "/data/vendor/dump/";
+        path += "dump_" + std::to_string(dumpCount) + ".bin";
+
+        ::android::base::unique_fd fd(
+                open(path.data(), O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP));
+        if (fd < 0) {
+            LOG(ERROR) << "Failed to open " << path;
+        } else {
+            auto len = write(fd.get(), codecOutputBuffer, info.size);
+            LOG(ERROR) << "Write " << len << " to " << path;
+        }
     }
+#endif
+    if (auto result = mFillBuffer(codecOutputBuffer, mWidth, u_head, mUvStride, v_head, mUvStride,
+                                  pixels, mDstStride, mWidth, mHeight);
+        result != 0) {
+        LOG(ERROR) << "Failed to convert I420 to BGRA";
+    }
+#if DUMP_FRAMES
+    else if (dumpData) {
+        std::string path = "/data/vendor/dump/";
+        path += "dump_" + std::to_string(dumpCount) + "_rgba.bin";
+
+        ::android::base::unique_fd fd(
+                open(path.data(), O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP));
+        if (fd < 0) {
+            LOG(ERROR) << "Failed to open " << path;
+        } else {
+            auto len = write(fd.get(), pixels, mStride * mHeight * 4);
+            LOG(ERROR) << "Write " << len << " to " << path;
+        }
+    }
+#endif
 
     // Release our output buffer
     mapper.unlock(renderBufferHandle);
@@ -332,8 +444,8 @@
 ::android::status_t EvsVideoEmulatedCamera::allocateOneFrame(buffer_handle_t* handle) {
     static auto& alloc = ::android::GraphicBufferAllocator::get();
     unsigned pixelsPerLine = 0;
-    const auto result = alloc.allocate(mWidth, mHeight, mFormat, 1, mUsage, handle, &pixelsPerLine,
-                                       0, "EvsVideoEmulatedCamera");
+    const auto result = alloc.allocate(mWidth, mHeight, HAL_PIXEL_FORMAT_RGBA_8888, 1, mUsage,
+                                       handle, &pixelsPerLine, 0, "EvsVideoEmulatedCamera");
     if (mStride == 0) {
         // Gralloc defines stride in terms of pixels per line
         mStride = pixelsPerLine;
@@ -350,7 +462,7 @@
 
     if (auto status = AMediaCodec_start(mVideoCodec.get()); status != AMEDIA_OK) {
         LOG(INFO) << __func__ << ": Received error in starting decoder. "
-                     << "Trying again after resetting this emulated device.";
+                  << "Trying again after resetting this emulated device.";
 
         if (!initializeMediaCodec()) {
             LOG(ERROR) << __func__ << ": Failed to re-configure the media codec.";
@@ -361,7 +473,7 @@
                                AMEDIAEXTRACTOR_SEEK_CLOSEST_SYNC);
         AMediaCodec_flush(mVideoCodec.get());
 
-        if(auto status = AMediaCodec_start(mVideoCodec.get()); status != AMEDIA_OK) {
+        if (auto status = AMediaCodec_start(mVideoCodec.get()); status != AMEDIA_OK) {
             LOG(ERROR) << __func__ << ": Received error again in starting decoder. "
                        << "Error code: " << status;
             return false;
@@ -389,7 +501,9 @@
         return false;
     }
 
-    EvsEventDesc event = { .aType = EvsEventType::STREAM_STOPPED, };
+    EvsEventDesc event = {
+            .aType = EvsEventType::STREAM_STOPPED,
+    };
     if (auto result = mStream->notify(event); !result.isOk()) {
         LOG(WARNING) << "Failed to notify the end of the stream.";
     }
diff --git a/automotive/evs/aidl/impl/default/tests/EvsCameraBufferTest.cpp b/automotive/evs/aidl/impl/default/tests/EvsCameraBufferTest.cpp
index 8b4676e..ce0e776 100644
--- a/automotive/evs/aidl/impl/default/tests/EvsCameraBufferTest.cpp
+++ b/automotive/evs/aidl/impl/default/tests/EvsCameraBufferTest.cpp
@@ -92,6 +92,7 @@
                 (override));
     MOCK_METHOD(bool, stopVideoStreamImpl_locked,
                 (ndk::ScopedAStatus & status, std::unique_lock<std::mutex>& lck), (override));
+    MOCK_METHOD(std::string, getId, (), (override));
 };
 
 TEST(EvsCameraBufferTest, ChangeBufferPoolSize) {
diff --git a/automotive/evs/aidl/impl/default/tests/EvsCameraStateTest.cpp b/automotive/evs/aidl/impl/default/tests/EvsCameraStateTest.cpp
index 1925c79..c517e34 100644
--- a/automotive/evs/aidl/impl/default/tests/EvsCameraStateTest.cpp
+++ b/automotive/evs/aidl/impl/default/tests/EvsCameraStateTest.cpp
@@ -141,6 +141,7 @@
                 (override));
     MOCK_METHOD(::ndk::ScopedAStatus, setPrimaryClient, (), (override));
     MOCK_METHOD(::ndk::ScopedAStatus, unsetPrimaryClient, (), (override));
+    MOCK_METHOD(std::string, getId, (), (override));
 
     bool mStreamStarted = false;
     bool mStreamStopped = false;
@@ -160,7 +161,7 @@
     MOCK_METHOD(::ndk::ScopedAStatus, notify,
                 (const ::aidl::android::hardware::automotive::evs::EvsEventDesc& in_event),
                 (override));
-    MOCK_METHOD(::ndk::ScopedAStatus, getInterfaceVersion, (int32_t * _aidl_return), (override));
+    MOCK_METHOD(::ndk::ScopedAStatus, getInterfaceVersion, (int32_t* _aidl_return), (override));
     MOCK_METHOD(::ndk::ScopedAStatus, getInterfaceHash, (std::string * _aidl_return), (override));
 };
 
diff --git a/camera/metadata/aidl/Android.bp b/camera/metadata/aidl/Android.bp
index a9c1a1a..d7303fc 100644
--- a/camera/metadata/aidl/Android.bp
+++ b/camera/metadata/aidl/Android.bp
@@ -13,7 +13,7 @@
     host_supported: true,
     vendor_available: true,
     srcs: ["android/hardware/camera/metadata/*.aidl"],
-    frozen: true,
+    frozen: false,
     stability: "vintf",
     backend: {
         cpp: {
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
index 9321ec0..2615270 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/CameraMetadataTag.aidl
@@ -43,6 +43,10 @@
   ANDROID_COLOR_CORRECTION_GAINS,
   ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
   ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES,
+  ANDROID_COLOR_CORRECTION_COLOR_TEMPERATURE,
+  ANDROID_COLOR_CORRECTION_COLOR_TINT,
+  ANDROID_COLOR_CORRECTION_COLOR_TEMPERATURE_RANGE,
+  ANDROID_COLOR_CORRECTION_AVAILABLE_MODES,
   ANDROID_CONTROL_AE_ANTIBANDING_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_CONTROL_START /* 65536 */,
   ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
   ANDROID_CONTROL_AE_LOCK,
@@ -100,6 +104,8 @@
   ANDROID_CONTROL_AUTOFRAMING_STATE,
   ANDROID_CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE,
   ANDROID_CONTROL_LOW_LIGHT_BOOST_STATE,
+  ANDROID_CONTROL_AE_PRIORITY_MODE = 65597,
+  ANDROID_CONTROL_AE_AVAILABLE_PRIORITY_MODES,
   ANDROID_DEMOSAIC_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_DEMOSAIC_START /* 131072 */,
   ANDROID_EDGE_MODE = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_EDGE_START /* 196608 */,
   ANDROID_EDGE_STRENGTH,
@@ -343,10 +349,17 @@
   ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
   ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
   ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION,
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS,
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_MIN_FRAME_DURATIONS,
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STALL_DURATIONS,
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STALL_DURATIONS_MAXIMUM_RESOLUTION,
   ANDROID_HEIC_INFO_SUPPORTED = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_HEIC_INFO_START /* 1900544 */,
   ANDROID_HEIC_INFO_MAX_JPEG_APP_SEGMENTS_COUNT,
   ANDROID_AUTOMOTIVE_LOCATION = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_AUTOMOTIVE_START /* 1966080 */,
   ANDROID_AUTOMOTIVE_LENS_FACING = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_AUTOMOTIVE_LENS_START /* 2031616 */,
+  ANDROID_EXTENSION_NIGHT_MODE_INDICATOR = 2097154,
   ANDROID_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS = android.hardware.camera.metadata.CameraMetadataSectionStart.ANDROID_JPEGR_START /* 2162688 */,
   ANDROID_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS,
   ANDROID_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS,
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionMode.aidl
index 2381605..69f0f5f 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionMode.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ColorCorrectionMode.aidl
@@ -41,4 +41,5 @@
   ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX,
   ANDROID_COLOR_CORRECTION_MODE_FAST,
   ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY,
+  ANDROID_COLOR_CORRECTION_MODE_CCT,
 }
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAePriorityMode.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAePriorityMode.aidl
new file mode 100644
index 0000000..eac2147
--- /dev/null
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ControlAePriorityMode.aidl
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ *//*
+ * Autogenerated from camera metadata definitions in
+ * /system/media/camera/docs/metadata_definitions.xml
+ * *** DO NOT EDIT BY HAND ***
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.hardware.camera.metadata;
+@Backing(type="int") @VintfStability
+enum ControlAePriorityMode {
+  ANDROID_CONTROL_AE_PRIORITY_MODE_OFF,
+  ANDROID_CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY,
+  ANDROID_CONTROL_AE_PRIORITY_MODE_SENSOR_EXPOSURE_TIME_PRIORITY,
+}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ExtensionNightModeIndicator.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ExtensionNightModeIndicator.aidl
new file mode 100644
index 0000000..6cfdc02
--- /dev/null
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/ExtensionNightModeIndicator.aidl
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ *//*
+ * Autogenerated from camera metadata definitions in
+ * /system/media/camera/docs/metadata_definitions.xml
+ * *** DO NOT EDIT BY HAND ***
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.hardware.camera.metadata;
+@Backing(type="int") @VintfStability
+enum ExtensionNightModeIndicator {
+  ANDROID_EXTENSION_NIGHT_MODE_INDICATOR_UNKNOWN,
+  ANDROID_EXTENSION_NIGHT_MODE_INDICATOR_OFF,
+  ANDROID_EXTENSION_NIGHT_MODE_INDICATOR_ON,
+}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurations.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurations.aidl
new file mode 100644
index 0000000..339d2fa
--- /dev/null
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurations.aidl
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ *//*
+ * Autogenerated from camera metadata definitions in
+ * /system/media/camera/docs/metadata_definitions.xml
+ * *** DO NOT EDIT BY HAND ***
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.hardware.camera.metadata;
+@Backing(type="int") @VintfStability
+enum HeicAvailableHeicUltraHdrStreamConfigurations {
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_OUTPUT,
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_INPUT,
+}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurationsMaximumResolution.aidl
new file mode 100644
index 0000000..7755069
--- /dev/null
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurationsMaximumResolution.aidl
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ *//*
+ * Autogenerated from camera metadata definitions in
+ * /system/media/camera/docs/metadata_definitions.xml
+ * *** DO NOT EDIT BY HAND ***
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.hardware.camera.metadata;
+@Backing(type="int") @VintfStability
+enum HeicAvailableHeicUltraHdrStreamConfigurationsMaximumResolution {
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT,
+  ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,
+}
diff --git a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorReadoutTimestamp.aidl b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorReadoutTimestamp.aidl
index 35dc1a9..11be18e 100644
--- a/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorReadoutTimestamp.aidl
+++ b/camera/metadata/aidl/aidl_api/android.hardware.camera.metadata/current/android/hardware/camera/metadata/SensorReadoutTimestamp.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.
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
index 236bcaf..66ca912 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/CameraMetadataTag.aidl
@@ -70,6 +70,38 @@
      */
     ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES,
     /**
+     * android.colorCorrection.colorTemperature [dynamic, int32, public]
+     *
+     * <p>Specifies the color temperature for CCT mode in Kelvin
+     * to adjust the white balance of the image.</p>
+     */
+    ANDROID_COLOR_CORRECTION_COLOR_TEMPERATURE,
+    /**
+     * android.colorCorrection.colorTint [dynamic, int32, public]
+     *
+     * <p>Specifies the color tint for CCT mode to adjust the white
+     * balance of the image.</p>
+     */
+    ANDROID_COLOR_CORRECTION_COLOR_TINT,
+    /**
+     * android.colorCorrection.colorTemperatureRange [static, int32[], public]
+     *
+     * <p>The range of supported color temperature values for
+     * ANDROID_COLOR_CORRECTION_COLOR_TEMPERATURE.</p>
+     *
+     * @see ANDROID_COLOR_CORRECTION_COLOR_TEMPERATURE
+     */
+    ANDROID_COLOR_CORRECTION_COLOR_TEMPERATURE_RANGE,
+    /**
+     * android.colorCorrection.availableModes [static, byte[], public]
+     *
+     * <p>List of color correction modes for ANDROID_COLOR_CORRECTION_MODE that are
+     * supported by this camera device.</p>
+     *
+     * @see ANDROID_COLOR_CORRECTION_MODE
+     */
+    ANDROID_COLOR_CORRECTION_AVAILABLE_MODES,
+    /**
      * android.control.aeAntibandingMode [dynamic, enum, public]
      *
      * <p>The desired setting for the camera device's auto-exposure
@@ -502,6 +534,21 @@
      */
     ANDROID_CONTROL_LOW_LIGHT_BOOST_STATE,
     /**
+     * android.control.aePriorityMode [dynamic, enum, public]
+     *
+     * <p>Turn on AE priority mode.</p>
+     */
+    ANDROID_CONTROL_AE_PRIORITY_MODE = 65597,
+    /**
+     * android.control.aeAvailablePriorityModes [static, byte[], public]
+     *
+     * <p>List of auto-exposure priority modes for ANDROID_CONTROL_AE_PRIORITY_MODE
+     * that are supported by this camera device.</p>
+     *
+     * @see ANDROID_CONTROL_AE_PRIORITY_MODE
+     */
+    ANDROID_CONTROL_AE_AVAILABLE_PRIORITY_MODES,
+    /**
      * android.demosaic.mode [controls, enum, system]
      *
      * <p>Controls the quality of the demosaicing
@@ -2346,6 +2393,62 @@
      */
     ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION,
     /**
+     * android.heic.availableHeicUltraHdrStreamConfigurations [static, enum[], ndk_public]
+     *
+     * <p>The available HEIC (ISO/IEC 23008-12/24) UltraHDR stream
+     * configurations that this camera device supports
+     * (i.e. format, width, height, output/input stream).</p>
+     */
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS,
+    /**
+     * android.heic.availableHeicUltraHdrMinFrameDurations [static, int64[], ndk_public]
+     *
+     * <p>This lists the minimum frame duration for each
+     * format/size combination for HEIC UltraHDR output formats.</p>
+     */
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_MIN_FRAME_DURATIONS,
+    /**
+     * android.heic.availableHeicUltraHdrStallDurations [static, int64[], ndk_public]
+     *
+     * <p>This lists the maximum stall duration for each
+     * output format/size combination for HEIC UltraHDR streams.</p>
+     */
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STALL_DURATIONS,
+    /**
+     * android.heic.availableHeicUltraHdrStreamConfigurationsMaximumResolution [static, enum[], ndk_public]
+     *
+     * <p>The available HEIC (ISO/IEC 23008-12/24) UltraHDR stream
+     * configurations that this camera device supports
+     * (i.e. format, width, height, output/input stream) for CaptureRequests where
+     * ANDROID_SENSOR_PIXEL_MODE is set to
+     * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
+     *
+     * @see ANDROID_SENSOR_PIXEL_MODE
+     */
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
+    /**
+     * android.heic.availableHeicUltraHdrMinFrameDurationsMaximumResolution [static, int64[], ndk_public]
+     *
+     * <p>This lists the minimum frame duration for each
+     * format/size combination for HEIC UltraHDR output formats for CaptureRequests where
+     * ANDROID_SENSOR_PIXEL_MODE is set to
+     * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
+     *
+     * @see ANDROID_SENSOR_PIXEL_MODE
+     */
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
+    /**
+     * android.heic.availableHeicUltraHdrStallDurationsMaximumResolution [static, int64[], ndk_public]
+     *
+     * <p>This lists the maximum stall duration for each
+     * output format/size combination for HEIC UltraHDR streams for CaptureRequests where
+     * ANDROID_SENSOR_PIXEL_MODE is set to
+     * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
+     *
+     * @see ANDROID_SENSOR_PIXEL_MODE
+     */
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STALL_DURATIONS_MAXIMUM_RESOLUTION,
+    /**
      * android.heic.info.supported [static, enum, system]
      *
      * <p>Whether this camera device can support identical set of stream combinations
@@ -2375,6 +2478,13 @@
      */
     ANDROID_AUTOMOTIVE_LENS_FACING = CameraMetadataSectionStart.ANDROID_AUTOMOTIVE_LENS_START,
     /**
+     * android.extension.nightModeIndicator [dynamic, enum, public]
+     *
+     * <p>Indicates when to activate Night Mode Camera Extension for high-quality
+     * still captures in low-light conditions.</p>
+     */
+    ANDROID_EXTENSION_NIGHT_MODE_INDICATOR = 2097154,
+    /**
      * android.jpegr.availableJpegRStreamConfigurations [static, enum[], ndk_public]
      *
      * <p>The available Jpeg/R stream
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionMode.aidl
index 2a51bfc..f12b6f6 100644
--- a/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionMode.aidl
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ColorCorrectionMode.aidl
@@ -33,4 +33,5 @@
     ANDROID_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX,
     ANDROID_COLOR_CORRECTION_MODE_FAST,
     ANDROID_COLOR_CORRECTION_MODE_HIGH_QUALITY,
+    ANDROID_COLOR_CORRECTION_MODE_CCT,
 }
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ControlAePriorityMode.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAePriorityMode.aidl
new file mode 100644
index 0000000..fd4f531
--- /dev/null
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ControlAePriorityMode.aidl
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+/*
+ * Autogenerated from camera metadata definitions in
+ * /system/media/camera/docs/metadata_definitions.xml
+ * *** DO NOT EDIT BY HAND ***
+ */
+
+package android.hardware.camera.metadata;
+
+/**
+ * android.control.aePriorityMode enumeration values
+ * @see ANDROID_CONTROL_AE_PRIORITY_MODE
+ * See system/media/camera/docs/metadata_definitions.xml for details.
+ */
+@VintfStability
+@Backing(type="int")
+enum ControlAePriorityMode {
+    ANDROID_CONTROL_AE_PRIORITY_MODE_OFF,
+    ANDROID_CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY,
+    ANDROID_CONTROL_AE_PRIORITY_MODE_SENSOR_EXPOSURE_TIME_PRIORITY,
+}
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/ExtensionNightModeIndicator.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/ExtensionNightModeIndicator.aidl
new file mode 100644
index 0000000..3c3bdf5
--- /dev/null
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/ExtensionNightModeIndicator.aidl
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+/*
+ * Autogenerated from camera metadata definitions in
+ * /system/media/camera/docs/metadata_definitions.xml
+ * *** DO NOT EDIT BY HAND ***
+ */
+
+package android.hardware.camera.metadata;
+
+/**
+ * android.extension.nightModeIndicator enumeration values
+ * @see ANDROID_EXTENSION_NIGHT_MODE_INDICATOR
+ * See system/media/camera/docs/metadata_definitions.xml for details.
+ */
+@VintfStability
+@Backing(type="int")
+enum ExtensionNightModeIndicator {
+    ANDROID_EXTENSION_NIGHT_MODE_INDICATOR_UNKNOWN,
+    ANDROID_EXTENSION_NIGHT_MODE_INDICATOR_OFF,
+    ANDROID_EXTENSION_NIGHT_MODE_INDICATOR_ON,
+}
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurations.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurations.aidl
new file mode 100644
index 0000000..56761b9
--- /dev/null
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurations.aidl
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+/*
+ * Autogenerated from camera metadata definitions in
+ * /system/media/camera/docs/metadata_definitions.xml
+ * *** DO NOT EDIT BY HAND ***
+ */
+
+package android.hardware.camera.metadata;
+
+/**
+ * android.heic.availableHeicUltraHdrStreamConfigurations enumeration values
+ * @see ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS
+ * See system/media/camera/docs/metadata_definitions.xml for details.
+ */
+@VintfStability
+@Backing(type="int")
+enum HeicAvailableHeicUltraHdrStreamConfigurations {
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_OUTPUT,
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_INPUT,
+}
diff --git a/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurationsMaximumResolution.aidl b/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurationsMaximumResolution.aidl
new file mode 100644
index 0000000..7fb19dc
--- /dev/null
+++ b/camera/metadata/aidl/android/hardware/camera/metadata/HeicAvailableHeicUltraHdrStreamConfigurationsMaximumResolution.aidl
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+/*
+ * Autogenerated from camera metadata definitions in
+ * /system/media/camera/docs/metadata_definitions.xml
+ * *** DO NOT EDIT BY HAND ***
+ */
+
+package android.hardware.camera.metadata;
+
+/**
+ * android.heic.availableHeicUltraHdrStreamConfigurationsMaximumResolution enumeration values
+ * @see ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
+ * See system/media/camera/docs/metadata_definitions.xml for details.
+ */
+@VintfStability
+@Backing(type="int")
+enum HeicAvailableHeicUltraHdrStreamConfigurationsMaximumResolution {
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT,
+    ANDROID_HEIC_AVAILABLE_HEIC_ULTRA_HDR_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT,
+}
diff --git a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
index 9fa4df2..ec61eec 100644
--- a/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
+++ b/camera/provider/aidl/vts/VtsAidlHalCameraProvider_TargetTest.cpp
@@ -118,7 +118,8 @@
     ScopedAStatus ret = mProvider->setCallback(cb);
     ASSERT_TRUE(ret.isOk());
     ret = mProvider->setCallback(nullptr);
-    ASSERT_EQ(static_cast<int32_t>(Status::ILLEGAL_ARGUMENT), ret.getServiceSpecificError());
+    ASSERT_TRUE(static_cast<int32_t>(Status::ILLEGAL_ARGUMENT) == ret.getServiceSpecificError() ||
+                EX_NULL_POINTER == ret.getExceptionCode());
 }
 
 // Test if ICameraProvider::getCameraDeviceInterface returns Status::OK and non-null device
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index 10f73f1..c92557a 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -194,7 +194,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.contexthub</name>
-        <version>3</version>
+        <version>3-4</version>
         <interface>
             <name>IContextHub</name>
             <instance>default</instance>
@@ -313,7 +313,7 @@
     </hal>
     <hal format="aidl" updatable-via-apex="true">
         <name>android.hardware.security.keymint</name>
-        <version>1-3</version>
+        <version>1-4</version>
         <interface>
             <name>IKeyMintDevice</name>
             <instance>default</instance>
@@ -388,7 +388,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.radio.config</name>
-        <version>3</version>
+        <version>3-4</version>
         <interface>
             <name>IRadioConfig</name>
             <instance>default</instance>
@@ -406,7 +406,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.radio.messaging</name>
-        <version>3</version>
+        <version>3-4</version>
         <interface>
             <name>IRadioMessaging</name>
             <instance>slot1</instance>
@@ -416,7 +416,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.radio.modem</name>
-        <version>3</version>
+        <version>3-4</version>
         <interface>
             <name>IRadioModem</name>
             <instance>slot1</instance>
@@ -426,7 +426,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.radio.network</name>
-        <version>3</version>
+        <version>3-4</version>
         <interface>
             <name>IRadioNetwork</name>
             <instance>slot1</instance>
@@ -436,7 +436,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.radio.sim</name>
-        <version>3</version>
+        <version>3-4</version>
         <interface>
             <name>IRadioSim</name>
             <instance>slot1</instance>
@@ -456,7 +456,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.radio.voice</name>
-        <version>3</version>
+        <version>3-4</version>
         <interface>
             <name>IRadioVoice</name>
             <instance>slot1</instance>
@@ -466,7 +466,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.radio.ims</name>
-        <version>2</version>
+        <version>2-3</version>
         <interface>
             <name>IRadioIms</name>
             <instance>slot1</instance>
@@ -676,6 +676,14 @@
             <instance>default</instance>
         </interface>
     </hal>
+    <hal format="aidl" optional="true">
+        <name>android.hardware.tv.mediaquality</name>
+        <version>1</version>
+        <interface>
+            <name>IMediaQuality</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
     <!-- The native mapper HAL must exist on the device -->
     <hal format="native">
         <name>mapper</name>
diff --git a/confirmationui/aidl/Android.bp b/confirmationui/aidl/Android.bp
index 51bde0a..1f17866 100644
--- a/confirmationui/aidl/Android.bp
+++ b/confirmationui/aidl/Android.bp
@@ -19,8 +19,8 @@
 aidl_interface {
     name: "android.hardware.confirmationui",
     vendor_available: true,
-    imports: [
-        "android.hardware.security.keymint-V3",
+    defaults: [
+        "android.hardware.security.keymint-latest-defaults",
     ],
     srcs: ["android/hardware/confirmationui/*.aidl"],
     stability: "vintf",
@@ -38,7 +38,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: ["android.hardware.security.keymint-V3"],
+            imports: ["android.hardware.security.keymint-V4"],
         },
     ],
     frozen: true,
diff --git a/contexthub/OWNERS b/contexthub/OWNERS
index f35961a..ccd385b 100644
--- a/contexthub/OWNERS
+++ b/contexthub/OWNERS
@@ -1,2 +1,3 @@
 # Bug component: 156070
 bduddie@google.com
+arthuri@google.com
diff --git a/contexthub/aidl/Android.bp b/contexthub/aidl/Android.bp
index 202813c..eaa47c6 100644
--- a/contexthub/aidl/Android.bp
+++ b/contexthub/aidl/Android.bp
@@ -52,8 +52,6 @@
             version: "3",
             imports: [],
         },
-
     ],
-    frozen: true,
-
+    frozen: false,
 }
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/EndpointId.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/EndpointId.aidl
new file mode 100644
index 0000000..a70065d
--- /dev/null
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/EndpointId.aidl
@@ -0,0 +1,41 @@
+/*
+ * 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.hardware.contexthub;
+@VintfStability
+parcelable EndpointId {
+  long id;
+  long hubId;
+  const long ENDPOINT_ID_INVALID = 0;
+  const long ENDPOINT_ID_RESERVED = (-1) /* -1 */;
+}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/EndpointInfo.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/EndpointInfo.aidl
new file mode 100644
index 0000000..43e5ec3
--- /dev/null
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/EndpointInfo.aidl
@@ -0,0 +1,52 @@
+/*
+ * 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.hardware.contexthub;
+@VintfStability
+parcelable EndpointInfo {
+  android.hardware.contexthub.EndpointId id;
+  android.hardware.contexthub.EndpointInfo.EndpointType type;
+  String name;
+  int version;
+  @nullable String tag;
+  String[] requiredPermissions;
+  android.hardware.contexthub.Service[] services;
+  @Backing(type="int") @VintfStability
+  enum EndpointType {
+    FRAMEWORK = 1,
+    APP = 2,
+    NATIVE = 3,
+    NANOAPP = 4,
+    GENERIC = 5,
+  }
+}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/HubInfo.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/HubInfo.aidl
new file mode 100644
index 0000000..cac441a
--- /dev/null
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/HubInfo.aidl
@@ -0,0 +1,45 @@
+/*
+ * 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.hardware.contexthub;
+@VintfStability
+parcelable HubInfo {
+  long hubId;
+  android.hardware.contexthub.HubInfo.HubDetails hubDetails;
+  const long HUB_ID_INVALID = 0;
+  const long HUB_ID_RESERVED = (-1) /* -1 */;
+  union HubDetails {
+    android.hardware.contexthub.ContextHubInfo contextHubInfo;
+    android.hardware.contexthub.VendorHubInfo vendorHubInfo;
+  }
+}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
index 7341e0e..93b8ff5 100644
--- a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl
@@ -49,5 +49,16 @@
   void onNanSessionStateChanged(in android.hardware.contexthub.NanSessionStateUpdate update);
   void setTestMode(in boolean enable);
   void sendMessageDeliveryStatusToHub(in int contextHubId, in android.hardware.contexthub.MessageDeliveryStatus messageDeliveryStatus);
+  List<android.hardware.contexthub.HubInfo> getHubs();
+  List<android.hardware.contexthub.EndpointInfo> getEndpoints();
+  void registerEndpoint(in android.hardware.contexthub.EndpointInfo endpoint);
+  void unregisterEndpoint(in android.hardware.contexthub.EndpointInfo endpoint);
+  void registerEndpointCallback(in android.hardware.contexthub.IEndpointCallback callback);
+  int[] requestSessionIdRange(int size);
+  void openEndpointSession(int sessionId, in android.hardware.contexthub.EndpointId destination, in android.hardware.contexthub.EndpointId initiator, in @nullable String serviceDescriptor);
+  void sendMessageToEndpoint(int sessionId, in android.hardware.contexthub.Message msg);
+  void sendMessageDeliveryStatusToEndpoint(int sessionId, in android.hardware.contexthub.MessageDeliveryStatus msgStatus);
+  void closeEndpointSession(int sessionId, in android.hardware.contexthub.Reason reason);
+  void endpointSessionOpenComplete(int sessionId);
   const int EX_CONTEXT_HUB_UNSPECIFIED = (-1) /* -1 */;
 }
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IEndpointCallback.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IEndpointCallback.aidl
new file mode 100644
index 0000000..c0bb744
--- /dev/null
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IEndpointCallback.aidl
@@ -0,0 +1,44 @@
+/*
+ * 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.hardware.contexthub;
+@VintfStability
+interface IEndpointCallback {
+  void onEndpointStarted(in android.hardware.contexthub.EndpointInfo[] endpointInfos);
+  void onEndpointStopped(in android.hardware.contexthub.EndpointId[] endpointIds, android.hardware.contexthub.Reason reason);
+  void onMessageReceived(int sessionId, in android.hardware.contexthub.Message msg);
+  void onMessageDeliveryStatusReceived(int sessionId, in android.hardware.contexthub.MessageDeliveryStatus msgStatus);
+  void onEndpointSessionOpenRequest(int sessionId, in android.hardware.contexthub.EndpointId destination, in android.hardware.contexthub.EndpointId initiator, in @nullable String serviceDescriptor);
+  void onCloseEndpointSession(int sessionId, in android.hardware.contexthub.Reason reason);
+  void onEndpointSessionOpenComplete(int sessionId);
+}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Message.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Message.aidl
new file mode 100644
index 0000000..ef117c3
--- /dev/null
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Message.aidl
@@ -0,0 +1,43 @@
+/*
+ * 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.hardware.contexthub;
+@VintfStability
+parcelable Message {
+  int flags;
+  int sequenceNumber;
+  String[] permissions;
+  int type;
+  byte[] content;
+  const int FLAG_REQUIRES_DELIVERY_STATUS = 1;
+}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Reason.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Reason.aidl
new file mode 100644
index 0000000..a315438
--- /dev/null
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Reason.aidl
@@ -0,0 +1,46 @@
+/*
+ * 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.hardware.contexthub;
+@Backing(type="byte") @VintfStability
+enum Reason {
+  UNSPECIFIED = 0,
+  OUT_OF_MEMORY,
+  TIMEOUT,
+  OPEN_ENDPOINT_SESSION_REQUEST_REJECTED,
+  CLOSE_ENDPOINT_SESSION_REQUESTED,
+  ENDPOINT_INVALID,
+  ENDPOINT_GONE,
+  ENDPOINT_CRASHED,
+  HUB_RESET,
+}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Service.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Service.aidl
new file mode 100644
index 0000000..e3d94c8
--- /dev/null
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/Service.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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// 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.hardware.contexthub;
+@VintfStability
+parcelable Service {
+  android.hardware.contexthub.Service.RpcFormat format;
+  String serviceDescriptor;
+  int majorVersion;
+  int minorVersion;
+  ParcelableHolder extendedInfo;
+  @Backing(type="int") @VintfStability
+  enum RpcFormat {
+    CUSTOM = 0,
+    AIDL = 1,
+    PW_RPC_PROTOBUF = 2,
+  }
+}
diff --git a/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/VendorHubInfo.aidl b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/VendorHubInfo.aidl
new file mode 100644
index 0000000..db64ec7
--- /dev/null
+++ b/contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/VendorHubInfo.aidl
@@ -0,0 +1,40 @@
+/*
+ * 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.hardware.contexthub;
+@VintfStability
+parcelable VendorHubInfo {
+  String name;
+  int version;
+  ParcelableHolder extendedInfo;
+}
diff --git a/contexthub/aidl/android/hardware/contexthub/EndpointId.aidl b/contexthub/aidl/android/hardware/contexthub/EndpointId.aidl
new file mode 100644
index 0000000..2075e73
--- /dev/null
+++ b/contexthub/aidl/android/hardware/contexthub/EndpointId.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.hardware.contexthub;
+
+/* This structure is a unique identifier for an endpoint */
+@VintfStability
+parcelable EndpointId {
+    /**
+     * Invalid endpoint ID.
+     */
+    const long ENDPOINT_ID_INVALID = 0;
+
+    /**
+     * Reserved endpoint ID.
+     */
+    const long ENDPOINT_ID_RESERVED = -1;
+
+    /**
+     * Nanoapp ID or randomly generated ID (depending on type). This value uniquely identifies the
+     * endpoint within a single hub.
+     *
+     * ENDPOINT_ID_INVALID(0) is an invalid id and should never be used.
+     * ENDPOINT_ID_RESERVED(-1) is reserved for future use.
+     * For static/compile-time-generated IDs, topmost bit should be 0.
+     * For dynamic/runtime-generated IDs, topmost bit should be 1.
+     */
+    long id;
+
+    /**
+     * Hub ID of the hub hosting this endpoint. A pair of (hubId, id) uniquely identifies the
+     * endpoint globally.
+     */
+    long hubId;
+}
diff --git a/contexthub/aidl/android/hardware/contexthub/EndpointInfo.aidl b/contexthub/aidl/android/hardware/contexthub/EndpointInfo.aidl
new file mode 100644
index 0000000..53a41fc
--- /dev/null
+++ b/contexthub/aidl/android/hardware/contexthub/EndpointInfo.aidl
@@ -0,0 +1,101 @@
+/*
+ * 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.hardware.contexthub;
+
+import android.hardware.contexthub.EndpointId;
+import android.hardware.contexthub.Service;
+
+/* This structure is a unified superset of NanoAppInfo and HostEndpointInfo. */
+@VintfStability
+parcelable EndpointInfo {
+    /** Unique identifier of this endpoint. */
+    EndpointId id;
+
+    /** Type of this endpoint. */
+    EndpointType type;
+
+    /**
+     * Name of this endpoint. Endpoint may use this field to identify the initiator of the session
+     * request.
+     *
+     * Depending on type of the endpoint, the following values are used:
+     *  - Framework: package name of the process registering this endpoint
+     *  - App: package name of the process registering this endpoint
+     *  - Native: name of the process registering this endpoint, supplied by client for debugging
+     *            purpose.
+     *  - Nanoapp: name of the nanoapp, for debugging purpose
+     *  - Generic: name of the generic endpoint, for debugging purpose
+     */
+    String name;
+
+    /**
+     * Monotonically increasing version number. The two sides of an endpoint session can use this
+     * version number to identify the other side and determine compatibility with each other.
+     * The interpretation of the version number is specific to the implementation of an endpoint.
+     * The version number should not be used to compare endpoints implementation freshness for
+     * different endpoint types.
+     *
+     * Depending on type of the endpoint, the following values are used:
+     *  - Framework: android.os.Build.VERSION.SDK_INT_FULL (populated by ContextHubService)
+     *  - App: versionCode (populated by ContextHubService)
+     *  - Native: unspecified format (supplied by endpoint code)
+     *  - Nanoapp: nanoapp version, typically following 0xMMmmpppp scheme where
+     *             MM = major version, mm = minor version, pppp = patch version
+     *  - Generic: unspecified format (supplied by endpoint code), following nanoapp versioning
+     *             scheme is recommended
+     */
+    int version;
+
+    /**
+     * Tag for this particular endpoint. Optional string that further identifies the submodule
+     * that created this endpoint.
+     */
+    @nullable String tag;
+
+    /**
+     * Represents the minimally required permissions in order to message this endpoint. Further
+     * permissions may be required on a message-by-message basis.
+     */
+    String[] requiredPermissions;
+
+    /**
+     * List of services provided by this endpoint. Service list should be fixed for the
+     * lifetime of an endpoint.
+     */
+    Service[] services;
+
+    @VintfStability
+    @Backing(type="int")
+    enum EndpointType {
+        /**
+         * This endpoint is from the Android framework
+         */
+        FRAMEWORK = 1,
+
+        /** This endpoint is an Android app. */
+        APP = 2,
+
+        /** This endpoint is from an Android native program. */
+        NATIVE = 3,
+
+        /** This endpoint is from a nanoapp. */
+        NANOAPP = 4,
+
+        /** This endpoint is a generic endpoint (not from a nanoapp). */
+        GENERIC = 5,
+    }
+}
diff --git a/contexthub/aidl/android/hardware/contexthub/HubInfo.aidl b/contexthub/aidl/android/hardware/contexthub/HubInfo.aidl
new file mode 100644
index 0000000..3d0a76e
--- /dev/null
+++ b/contexthub/aidl/android/hardware/contexthub/HubInfo.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.hardware.contexthub;
+
+import android.hardware.contexthub.ContextHubInfo;
+import android.hardware.contexthub.VendorHubInfo;
+
+@VintfStability
+parcelable HubInfo {
+    /**
+     * Invalid hub ID.
+     */
+    const long HUB_ID_INVALID = 0;
+
+    /**
+     * Reserved hub ID.
+     */
+    const long HUB_ID_RESERVED = -1;
+
+    /**
+     * Hub ID (depending on type). This is a globally unique identifier.
+     *
+     * HUB_ID_INVALID(0) is an invalid id and should never be used.
+     * HUB_ID_RESERVED(-1) is reserved for future use.
+     */
+    long hubId;
+
+    /**
+     * A hub can be either a ContextHub or a VendorHub.
+     */
+    union HubDetails {
+        ContextHubInfo contextHubInfo;
+        VendorHubInfo vendorHubInfo;
+    }
+
+    /**
+     * Detail information about the hub.
+     */
+    HubDetails hubDetails;
+}
diff --git a/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl b/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
index b146ff8..24192a1 100644
--- a/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/IContextHub.aidl
@@ -18,12 +18,19 @@
 
 import android.hardware.contexthub.ContextHubInfo;
 import android.hardware.contexthub.ContextHubMessage;
+import android.hardware.contexthub.EndpointId;
+import android.hardware.contexthub.EndpointInfo;
 import android.hardware.contexthub.HostEndpointInfo;
+import android.hardware.contexthub.HubInfo;
 import android.hardware.contexthub.IContextHubCallback;
+import android.hardware.contexthub.IEndpointCallback;
+import android.hardware.contexthub.Message;
 import android.hardware.contexthub.MessageDeliveryStatus;
 import android.hardware.contexthub.NanSessionStateUpdate;
 import android.hardware.contexthub.NanoappBinary;
 import android.hardware.contexthub.NanoappInfo;
+import android.hardware.contexthub.Reason;
+import android.hardware.contexthub.Service;
 import android.hardware.contexthub.Setting;
 
 @VintfStability
@@ -221,7 +228,7 @@
     void onNanSessionStateChanged(in NanSessionStateUpdate update);
 
     /**
-     * Puts the context hub in and out of test mode. Test mode is a clean state
+     * Puts the Context Hub in and out of test mode. Test mode is a clean state
      * where tests can be executed in the same environment. If enable is true,
      * this will enable test mode by unloading all nanoapps. If enable is false,
      * this will disable test mode and reverse the actions of enabling test mode
@@ -231,7 +238,7 @@
      * @TestApi or development tools. This should not be used in a production
      * environment.
      *
-     * @param enable If true, put the context hub in test mode. If false, disable
+     * @param enable If true, put the Context Hub in test mode. If false, disable
      *               test mode.
      */
     void setTestMode(in boolean enable);
@@ -256,4 +263,136 @@
      * value EX_SERVICE_SPECIFIC.
      */
     const int EX_CONTEXT_HUB_UNSPECIFIED = -1;
+
+    /** Lists all the hubs, including the Context Hub and generic hubs. */
+    List<HubInfo> getHubs();
+
+    /** Lists all the endpoints, including the Context Hub nanoapps and generic endpoints. */
+    List<EndpointInfo> getEndpoints();
+
+    /**
+     * Publishes an endpoint from the calling side (e.g. Android). Endpoints must be registered
+     * prior to starting a session.
+     */
+    void registerEndpoint(in EndpointInfo endpoint);
+
+    /**
+     * Teardown an endpoint from the calling side (e.g. Android). This endpoint must have already
+     * been published via registerEndpoint().
+     */
+    void unregisterEndpoint(in EndpointInfo endpoint);
+
+    /**
+     * Attaches a callback interface to receive events targeted at endpoints registered by the
+     * caller.
+     */
+    void registerEndpointCallback(in IEndpointCallback callback);
+
+    /**
+     * Request a range of session IDs for the caller to use when initiating sessions. This may be
+     * called more than once, but typical usage is to request a large enough range to accommodate
+     * the maximum expected number of concurrent sessions, but not overly large as to limit other
+     * clients.
+     *
+     * @param size The number of sessionId reserved for host-initiated sessions. This number should
+     *         be less than or equal to 1024.
+     *
+     * @return An array with two elements representing the smallest and largest possible session id
+     *         available for host.
+     *
+     * @throws EX_ILLEGAL_ARGUMENT if the size is invalid.
+     * @throws EX_SERVICE_SPECIFIC if the id range requested cannot be allocated.
+     */
+    int[] requestSessionIdRange(int size);
+
+    /**
+     * Request to open a session for communication between an endpoint previously registered by the
+     * caller and a target endpoint found in getEndpoints(), optionally scoped to a service
+     * published by the target endpoint.
+     *
+     * Upon returning from this function, the session is in pending state, and the final result will
+     * be given by an asynchronous call to onEndpointSessionOpenComplete() on success, or
+     * onCloseEndpointSession() on failure.
+     *
+     * @param sessionId Caller-allocated session identifier, which must be unique across all active
+     *         sessions, and must fall in a range allocated via requestSessionIdRange().
+     * @param destination The EndpointId representing the destination side of the session.
+     * @param initiator The EndpointId representing the initiating side of the session, which
+     *         must've already been published through registerEndpoint().
+     * @param serviceDescriptor Descriptor for the service specification for scoping this session
+     *         (nullable). Null indicates a fully custom marshalling scheme. The value should match
+     *         a published descriptor for both destination and initiator.
+     *
+     * @return An integer identifying the session, the integer can be used to present
+     *         the tuple of (destination, initiator, serviceDescriptor).
+     *
+     * @throws EX_ILLEGAL_ARGUMENT if any of the arguments are invalid, or the combination of the
+     *         arguments is invalid.
+     * @throws EX_SERVICE_SPECIFIC on other errors
+     *         - EX_CONTEXT_HUB_UNSPECIFIED if the request failed for other reasons.
+     */
+    void openEndpointSession(int sessionId, in EndpointId destination, in EndpointId initiator,
+            in @nullable String serviceDescriptor);
+
+    /**
+     * Send a message from one endpoint to another on the (currently open) session.
+     *
+     * @param sessionId The integer representing the communication session, previously set in
+     *         openEndpointSession() or onEndpointSessionOpenRequest().
+     * @param msg The Message object representing a message to endpoint from the endpoint on host.
+     *
+     * @throws EX_ILLEGAL_ARGUMENT if any of the arguments are invalid, or the combination of the
+     *         arguments is invalid.
+     * @throws EX_SERVICE_SPECIFIC on other errors
+     *         - EX_CONTEXT_HUB_UNSPECIFIED if the request failed for other reasons.
+     */
+    void sendMessageToEndpoint(int sessionId, in Message msg);
+
+    /**
+     * Sends a message delivery status to the endpoint in response to receiving a Message with flag
+     * FLAG_REQUIRES_DELIVERY_STATUS. Each message with the flag should have a MessageDeliveryStatus
+     * response. This method sends the message delivery status back to the remote endpoint for a
+     * session.
+     *
+     * @param sessionId The integer representing the communication session, previously set in
+     *         openEndpointSession() or onEndpointSessionOpenRequest().
+     * @param msgStatus The MessageDeliveryStatus object representing the delivery status for a
+     *         specific message (identified by the sequenceNumber) within the session.
+     *
+     * @throws EX_UNSUPPORTED_OPERATION if ContextHubInfo.supportsReliableMessages is false for
+     *          the hub involved in this session.
+     */
+    void sendMessageDeliveryStatusToEndpoint(int sessionId, in MessageDeliveryStatus msgStatus);
+
+    /**
+     * Closes a session previously opened by openEndpointSession() or requested via
+     * onEndpointSessionOpenRequest(). Processing of session closure must be ordered/synchronized
+     * with message delivery, such that if this session was open, any messages previously passed to
+     * sendMessageToEndpoint() that are still in-flight must still be delivered before the session
+     * is closed. Any in-flight messages to the endpoint that requested to close the session will
+     * not be delivered.
+     *
+     * @param sessionId The integer representing the communication session, previously set in
+     *         openEndpointSession() or onEndpointSessionOpenRequest().
+     * @param reason The reason for this close endpoint session request.
+     *
+     * @throws EX_ILLEGAL_ARGUMENT if any of the arguments are invalid, or the combination of the
+     *         arguments is invalid.
+     * @throws EX_SERVICE_SPECIFIC on other errors
+     *         - EX_CONTEXT_HUB_UNSPECIFIED if the request failed for other reasons.
+     */
+    void closeEndpointSession(int sessionId, in Reason reason);
+
+    /**
+     * Notifies the HAL that the session requested by onEndpointSessionOpenRequest is ready to use.
+     *
+     * @param sessionId The integer representing the communication session, previously set in
+     *         onEndpointSessionOpenRequest(). This id is assigned by the HAL.
+     *
+     * @throws EX_ILLEGAL_ARGUMENT if any of the arguments are invalid, or the combination of the
+     *         arguments is invalid.
+     * @throws EX_SERVICE_SPECIFIC on other errors
+     *         - EX_CONTEXT_HUB_UNSPECIFIED if the request failed for other reasons.
+     */
+    void endpointSessionOpenComplete(int sessionId);
 }
diff --git a/contexthub/aidl/android/hardware/contexthub/IEndpointCallback.aidl b/contexthub/aidl/android/hardware/contexthub/IEndpointCallback.aidl
new file mode 100644
index 0000000..972853b
--- /dev/null
+++ b/contexthub/aidl/android/hardware/contexthub/IEndpointCallback.aidl
@@ -0,0 +1,118 @@
+/*
+ * 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.hardware.contexthub;
+
+import android.hardware.contexthub.EndpointId;
+import android.hardware.contexthub.EndpointInfo;
+import android.hardware.contexthub.Message;
+import android.hardware.contexthub.MessageDeliveryStatus;
+import android.hardware.contexthub.Reason;
+import android.hardware.contexthub.Service;
+
+@VintfStability
+interface IEndpointCallback {
+    /**
+     * Lifecycle event notification for endpoint starting from remote side. There is no need to
+     * report already started endpoint prior to the registration of an EndpointLifecycleCallbacks
+     * object. The EndpointInfo reported here should be consistent with values from getEndpoints().
+     *
+     * Endpoints added by registerEndpoint should not be included. registerEndpoint() should not
+     * cause this call.
+     *
+     * @param endpointInfos An array of EndpointInfo representing endpoints that just started.
+     */
+    void onEndpointStarted(in EndpointInfo[] endpointInfos);
+
+    /**
+     * Lifecycle event notification for endpoint stopping from remote side. There is no need to
+     * report already stopped endpoint prior to the registration of an EndpointLifecycleCallbacks
+     * object. The EndpointId reported here should represent a previously started Endpoint.
+     *
+     * When a hub crashes or restart, events should be batched into be a single call (containing all
+     * the EndpointId that were impacted).
+     *
+     * Endpoints added by registerEndpoint should not be included. unregisterEndpoint() should not
+     * cause this call.
+     *
+     * @param endpointIds An array of EndpointId representing endpoints that just stopped.
+     * @param reason The reason for why the endpoints stopped.
+     */
+    void onEndpointStopped(in EndpointId[] endpointIds, Reason reason);
+
+    /**
+     * Invoked when an endpoint sends message to another endpoint (on host) on the (currently open)
+     * session.
+     *
+     * @param sessionId The integer representing the communication session, previously set in
+     *         openEndpointSession() or onEndpointSessionOpenRequest().
+     * @param msg The Message object representing a message from endpoint to an endpoint on host.
+     */
+    void onMessageReceived(int sessionId, in Message msg);
+
+    /**
+     * Invoked when an endpoint sends the response for a message that requires delivery status.
+     *
+     * The response is the message delivery status of a recently sent message within a session. See
+     * sendMessageDeliveryStatusToEndpoint() for more details.
+     *
+     * @param sessionId The integer representing the communication session, previously set in
+     *         openEndpointSession() or onEndpointSessionOpenRequest().
+     * @param msgStatus The MessageDeliveryStatus object representing the delivery status for a
+     *         specific message (identified by the sequenceNumber) within the session.
+     */
+    void onMessageDeliveryStatusReceived(int sessionId, in MessageDeliveryStatus msgStatus);
+
+    /**
+     * Invoked when session initiation is requested by a remote endpoint. The receiving host client
+     * must later call endpointSessionOpenComplete() to indicate successful connection and
+     * acceptance of the session, or closeEndpointSession() to indicate failure.
+     *
+     * @param sessionId Caller-allocated session identifier, which must be unique across all active
+     *         sessions, and must not fall in a range allocated via requestSessionIdRange().
+     * @param destination The EndpointId representing the destination side of the session, which
+     *         must've already been published through registerEndpoint().
+     * @param initiator The EndpointId representing the initiating side of the session.
+     * @param serviceDescriptor Descriptor for the service specification for scoping this session
+     *         (nullable). Null indicates a fully custom marshalling scheme. The value should match
+     *         a published descriptor for both endpoints.
+     *
+     * @throws EX_ILLEGAL_ARGUMENT if any of the arguments are invalid, or the combination of the
+     *         arguments is invalid.
+     */
+    void onEndpointSessionOpenRequest(int sessionId, in EndpointId destination,
+            in EndpointId initiator, in @nullable String serviceDescriptor);
+
+    /**
+     * Invoked when a session has either failed to open, or has been closed by the remote side.
+     * Upon receiving this callback, the session is closed and further messages on it will not be
+     * delivered.
+     *
+     * @param sessionId The integer representing the communication session, previously set in
+     *         openEndpointSession() or onEndpointSessionOpenRequest().
+     * @param reason The reason for this close endpoint session notification.
+     */
+    void onCloseEndpointSession(int sessionId, in Reason reason);
+
+    /**
+     * Callback when a session is opened. This callback is the status callback for a previous
+     * openEndpointSession().
+     *
+     * @param sessionId The integer representing the communication session, previously set in
+     *         onEndpointSessionOpenRequest(). This id is assigned by the host.
+     */
+    void onEndpointSessionOpenComplete(int sessionId);
+}
diff --git a/contexthub/aidl/android/hardware/contexthub/Message.aidl b/contexthub/aidl/android/hardware/contexthub/Message.aidl
new file mode 100644
index 0000000..fc81ab0
--- /dev/null
+++ b/contexthub/aidl/android/hardware/contexthub/Message.aidl
@@ -0,0 +1,51 @@
+/*
+ * 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.hardware.contexthub;
+
+@VintfStability
+parcelable Message {
+    /**
+     * Bitmask for flags field if this message requires a MessageDeliveryStatus for the
+     * sequenceNumber within 1 second.
+     */
+    const int FLAG_REQUIRES_DELIVERY_STATUS = 1;
+
+    /** Bitset of flags */
+    int flags;
+
+    /** Sequence number of this message */
+    int sequenceNumber;
+
+    /**
+     * Per message permission (used for app-op permission attribution).
+     */
+    String[] permissions;
+
+    /**
+     * The type of this message payload, following a scheme specific to the service or sending
+     * endpoint's communication protocol. This value can be used to distinguish the handling of
+     * content (e.g. for decoding). This could also be used as the complete content of the message
+     * if no additional payload is needed.
+     */
+    int type;
+
+    /**
+     * Content (payload) of the message. The format of the message is specific to the context of the
+     * message: the service or endpoints involved in the session, and the message type.
+     */
+    byte[] content;
+}
diff --git a/contexthub/aidl/android/hardware/contexthub/MessageDeliveryStatus.aidl b/contexthub/aidl/android/hardware/contexthub/MessageDeliveryStatus.aidl
index ae425b3..4129981 100644
--- a/contexthub/aidl/android/hardware/contexthub/MessageDeliveryStatus.aidl
+++ b/contexthub/aidl/android/hardware/contexthub/MessageDeliveryStatus.aidl
@@ -21,7 +21,8 @@
 @VintfStability
 parcelable MessageDeliveryStatus {
     /**
-     * The messageSequenceNumber of the ContextHubMessage to which this status applies.
+     * The messageSequenceNumber of the ContextHubMessage or Message to which this status is
+     * required.
      */
     int messageSequenceNumber;
 
diff --git a/contexthub/aidl/android/hardware/contexthub/Reason.aidl b/contexthub/aidl/android/hardware/contexthub/Reason.aidl
new file mode 100644
index 0000000..65d9f8a
--- /dev/null
+++ b/contexthub/aidl/android/hardware/contexthub/Reason.aidl
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ */
+
+package android.hardware.contexthub;
+
+@VintfStability
+@Backing(type="byte")
+enum Reason {
+    /**
+     * Unspecified reason.
+     */
+    UNSPECIFIED = 0,
+
+    /**
+     * Out of memory. There's not enough memory to perform this operation.
+     */
+    OUT_OF_MEMORY,
+
+    /**
+     * Timeout. This operation timed out.
+     */
+    TIMEOUT,
+
+    /**
+     * Endpoint rejected this openEndpointSession request.
+     */
+    OPEN_ENDPOINT_SESSION_REQUEST_REJECTED,
+
+    /**
+     * Endpoint requested closeEndpointSession.
+     */
+    CLOSE_ENDPOINT_SESSION_REQUESTED,
+
+    /**
+     * Invalid endpoint.
+     */
+    ENDPOINT_INVALID,
+
+    /**
+     * Endpoint is now stopped.
+     */
+    ENDPOINT_GONE,
+
+    /**
+     * Endpoint crashed.
+     */
+    ENDPOINT_CRASHED,
+
+    /**
+     * Hub was reset or is resetting.
+     */
+    HUB_RESET,
+}
diff --git a/contexthub/aidl/android/hardware/contexthub/Service.aidl b/contexthub/aidl/android/hardware/contexthub/Service.aidl
new file mode 100644
index 0000000..fd748c3
--- /dev/null
+++ b/contexthub/aidl/android/hardware/contexthub/Service.aidl
@@ -0,0 +1,67 @@
+/*
+ * 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.hardware.contexthub;
+
+@VintfStability
+parcelable Service {
+    /**
+     * Type of the Service. This field defines the messaging format used for this service.
+     * The format refers to how the data would be marhsalled in messages between host endpoint (on
+     * Android) and endpoint on the Context Hub or generic hub.
+     */
+    RpcFormat format;
+
+    /**
+     * Uniquely identifies the interface (scoped to type). Conventions depend on interface type.
+     * Examples:
+     *   1. AOSP-defined AIDL: android.hardware.something.IFoo/default
+     *   2. Vendor-defined AIDL: com.example.something.IBar/default
+     *   3. Pigweed RPC with Protobuf: com.example.proto.ExampleService
+     */
+    String serviceDescriptor;
+
+    /** Breaking changes should be a major version bump. */
+    int majorVersion;
+    /** Monotonically increasing minor version. */
+    int minorVersion;
+
+    /** Hook for additional detail in vendor-specific type */
+    ParcelableHolder extendedInfo;
+
+    /**
+     * Supported messaging format for the service between the host and the hubs.
+     */
+    @VintfStability
+    @Backing(type="int")
+    enum RpcFormat {
+        /**
+         * Customized format for messaging. Fully customized and opaque messaging format.
+         */
+        CUSTOM = 0,
+        /**
+         * Binder-based messaging. The host endpoint is defining this service in Stable AIDL.
+         * Messages between endpoints that uses this service will be using the binder marhsalling
+         * format.
+         */
+        AIDL = 1,
+        /**
+         * Pigweed RPC messaging with Protobuf. This endpoint is a Pigweed RPC. Messages between
+         * endpoints will use Pigweed RPC marshalling format (protobuf).
+         */
+        PW_RPC_PROTOBUF = 2,
+    }
+}
diff --git a/contexthub/aidl/android/hardware/contexthub/VendorHubInfo.aidl b/contexthub/aidl/android/hardware/contexthub/VendorHubInfo.aidl
new file mode 100644
index 0000000..524c7e8
--- /dev/null
+++ b/contexthub/aidl/android/hardware/contexthub/VendorHubInfo.aidl
@@ -0,0 +1,33 @@
+/*
+ * 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.hardware.contexthub;
+
+/**
+ * A representation of a vendor-specific hub providing endpoints (with services). The hub does not
+ * run the Context Hub Runtime Environment, but exposes a similar messaging API.
+ */
+@VintfStability
+parcelable VendorHubInfo {
+    /** Descriptive name of the basic hub */
+    String name;
+
+    /** Version of the hub */
+    int version;
+
+    /** Hook for additional detail in vendor-specific type */
+    ParcelableHolder extendedInfo;
+}
diff --git a/contexthub/aidl/default/Android.bp b/contexthub/aidl/default/Android.bp
index 2960746..da173f9 100644
--- a/contexthub/aidl/default/Android.bp
+++ b/contexthub/aidl/default/Android.bp
@@ -30,7 +30,7 @@
     shared_libs: [
         "libbase",
         "libbinder_ndk",
-        "android.hardware.contexthub-V3-ndk",
+        "android.hardware.contexthub-V4-ndk",
     ],
     export_include_dirs: ["include"],
     srcs: [
@@ -51,7 +51,7 @@
     shared_libs: [
         "libbase",
         "libbinder_ndk",
-        "android.hardware.contexthub-V3-ndk",
+        "android.hardware.contexthub-V4-ndk",
     ],
     static_libs: [
         "libcontexthubexampleimpl",
diff --git a/contexthub/aidl/default/ContextHub.cpp b/contexthub/aidl/default/ContextHub.cpp
index bd483d7..a915191 100644
--- a/contexthub/aidl/default/ContextHub.cpp
+++ b/contexthub/aidl/default/ContextHub.cpp
@@ -136,4 +136,83 @@
     return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
 }
 
+ScopedAStatus ContextHub::getHubs(std::vector<HubInfo>* _aidl_return) {
+    ContextHubInfo hub = {};
+    hub.name = "Mock Context Hub";
+    hub.vendor = "AOSP";
+    hub.toolchain = "n/a";
+    hub.id = kMockHubId;
+    hub.peakMips = 1;
+    hub.maxSupportedMessageLengthBytes = 4096;
+    hub.chrePlatformId = UINT64_C(0x476f6f6754000000);
+    hub.chreApiMajorVersion = 1;
+    hub.chreApiMinorVersion = 6;
+    hub.supportsReliableMessages = false;
+
+    HubInfo hubInfo1 = {};
+    hubInfo1.hubId = hub.chrePlatformId;
+    hubInfo1.hubDetails = HubInfo::HubDetails::make<HubInfo::HubDetails::Tag::contextHubInfo>(hub);
+
+    VendorHubInfo vendorHub = {};
+    vendorHub.name = "Mock Vendor Hub";
+    vendorHub.version = 42;
+
+    HubInfo hubInfo2 = {};
+    hubInfo2.hubId = UINT64_C(0x1234567812345678);
+    hubInfo2.hubDetails =
+            HubInfo::HubDetails::make<HubInfo::HubDetails::Tag::vendorHubInfo>(vendorHub);
+
+    _aidl_return->push_back(hubInfo1);
+    _aidl_return->push_back(hubInfo2);
+
+    return ScopedAStatus::ok();
+};
+
+ScopedAStatus ContextHub::getEndpoints(std::vector<EndpointInfo>* /* _aidl_return */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::registerEndpoint(const EndpointInfo& /* in_endpoint */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::unregisterEndpoint(const EndpointInfo& /* in_endpoint */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::registerEndpointCallback(
+        const std::shared_ptr<IEndpointCallback>& /* in_callback */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::requestSessionIdRange(int32_t /* in_size */,
+                                                std::vector<int32_t>* /* _aidl_return */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::openEndpointSession(
+        int32_t /* in_sessionId */, const EndpointId& /* in_destination */,
+        const EndpointId& /* in_initiator */,
+        const std::optional<std::string>& /* in_serviceDescriptor */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::sendMessageToEndpoint(int32_t /* in_sessionId */,
+                                                const Message& /* in_msg */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::sendMessageDeliveryStatusToEndpoint(
+        int32_t /* in_sessionId */, const MessageDeliveryStatus& /* in_msgStatus */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::closeEndpointSession(int32_t /* in_sessionId */, Reason /* in_reason */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
+ScopedAStatus ContextHub::endpointSessionOpenComplete(int32_t /* in_sessionId */) {
+    return ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+};
+
 }  // namespace aidl::android::hardware::contexthub
diff --git a/contexthub/aidl/default/contexthub-default.xml b/contexthub/aidl/default/contexthub-default.xml
index 2f8ddc8..359bb0a 100644
--- a/contexthub/aidl/default/contexthub-default.xml
+++ b/contexthub/aidl/default/contexthub-default.xml
@@ -1,7 +1,7 @@
 <manifest version="1.0" type="device">
     <hal format="aidl">
         <name>android.hardware.contexthub</name>
-        <version>3</version>
+        <version>4</version>
         <interface>
             <name>IContextHub</name>
             <instance>default</instance>
diff --git a/contexthub/aidl/default/include/contexthub-impl/ContextHub.h b/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
index 72e8b3b..5680a77 100644
--- a/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
+++ b/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
@@ -53,6 +53,24 @@
             int32_t in_contextHubId,
             const MessageDeliveryStatus& in_messageDeliveryStatus) override;
 
+    ::ndk::ScopedAStatus getHubs(std::vector<HubInfo>* _aidl_return) override;
+    ::ndk::ScopedAStatus getEndpoints(std::vector<EndpointInfo>* _aidl_return) override;
+    ::ndk::ScopedAStatus registerEndpoint(const EndpointInfo& in_endpoint) override;
+    ::ndk::ScopedAStatus unregisterEndpoint(const EndpointInfo& in_endpoint) override;
+    ::ndk::ScopedAStatus registerEndpointCallback(
+            const std::shared_ptr<IEndpointCallback>& in_callback) override;
+    ::ndk::ScopedAStatus requestSessionIdRange(int32_t in_size,
+                                               std::vector<int32_t>* _aidl_return) override;
+    ::ndk::ScopedAStatus openEndpointSession(
+            int32_t in_sessionId, const EndpointId& in_destination, const EndpointId& in_initiator,
+            const std::optional<std::string>& in_serviceDescriptor) override;
+    ::ndk::ScopedAStatus sendMessageToEndpoint(int32_t in_sessionId,
+                                               const Message& in_msg) override;
+    ::ndk::ScopedAStatus sendMessageDeliveryStatusToEndpoint(
+            int32_t in_sessionId, const MessageDeliveryStatus& in_msgStatus) override;
+    ::ndk::ScopedAStatus closeEndpointSession(int32_t in_sessionId, Reason in_reason) override;
+    ::ndk::ScopedAStatus endpointSessionOpenComplete(int32_t in_sessionId) override;
+
   private:
     static constexpr uint32_t kMockHubId = 0;
     std::shared_ptr<IContextHubCallback> mCallback;
diff --git a/gatekeeper/aidl/Android.bp b/gatekeeper/aidl/Android.bp
index 169a7d5..88c10b7 100644
--- a/gatekeeper/aidl/Android.bp
+++ b/gatekeeper/aidl/Android.bp
@@ -10,8 +10,8 @@
 aidl_interface {
     name: "android.hardware.gatekeeper",
     vendor_available: true,
-    imports: [
-        "android.hardware.security.keymint-V3",
+    defaults: [
+        "android.hardware.security.keymint-latest-defaults",
     ],
     srcs: ["android/hardware/gatekeeper/*.aidl"],
     stability: "vintf",
@@ -32,7 +32,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: ["android.hardware.security.keymint-V3"],
+            imports: ["android.hardware.security.keymint-V4"],
         },
     ],
     frozen: true,
diff --git a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/DisplayHotplugEvent.aidl b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/DisplayHotplugEvent.aidl
index 63dca0a..b18d2be 100644
--- a/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/DisplayHotplugEvent.aidl
+++ b/graphics/common/aidl/aidl_api/android.hardware.graphics.common/current/android/hardware/graphics/common/DisplayHotplugEvent.aidl
@@ -39,4 +39,5 @@
   ERROR_UNKNOWN = (-1) /* -1 */,
   ERROR_INCOMPATIBLE_CABLE = (-2) /* -2 */,
   ERROR_TOO_MANY_DISPLAYS = (-3) /* -3 */,
+  ERROR_LINK_UNSTABLE = (-4) /* -4 */,
 }
diff --git a/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl b/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
index b35ada5..c807ffd 100644
--- a/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
+++ b/graphics/common/aidl/android/hardware/graphics/common/DisplayHotplugEvent.aidl
@@ -43,4 +43,11 @@
      * displays that can be simultaneously connected
      */
     ERROR_TOO_MANY_DISPLAYS = -3,
+
+    /**
+     * Display link is unstable, e.g. link training failure (negotiation
+     * of connection speed failed), and the display needs to be
+     * reconfigured
+     */
+    ERROR_LINK_UNSTABLE = -4,
 }
diff --git a/graphics/composer/aidl/Android.bp b/graphics/composer/aidl/Android.bp
index bba41da..f4264eb 100644
--- a/graphics/composer/aidl/Android.bp
+++ b/graphics/composer/aidl/Android.bp
@@ -77,7 +77,6 @@
                 "android.hardware.common-V2",
             ],
         },
-
     ],
 
 }
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
index 0e2d72b..955ff89 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -43,4 +43,5 @@
   SUSPEND = 6,
   DISPLAY_IDLE_TIMER = 7,
   MULTI_THREADED_PRESENT = 8,
+  PICTURE_PROCESSING = 9,
 }
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
index cce35e7..9e24a26 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/DisplayCommand.aidl
@@ -46,4 +46,5 @@
   boolean presentDisplay;
   boolean presentOrValidateDisplay;
   int frameIntervalNs;
+  long pictureProfileId;
 }
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
index bc27cc7..55604a6 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -87,6 +87,7 @@
   void setRefreshRateChangedCallbackDebugEnabled(long display, boolean enabled);
   android.hardware.graphics.composer3.DisplayConfiguration[] getDisplayConfigurations(long display, int maxFrameIntervalNs);
   oneway void notifyExpectedPresent(long display, in android.hardware.graphics.composer3.ClockMonotonicTimestamp expectedPresentTime, int frameIntervalNs);
+  int getMaxLayerPictureProfiles(long display);
   const int EX_BAD_CONFIG = 1;
   const int EX_BAD_DISPLAY = 2;
   const int EX_BAD_LAYER = 3;
@@ -97,5 +98,7 @@
   const int EX_UNSUPPORTED = 8;
   const int EX_SEAMLESS_NOT_ALLOWED = 9;
   const int EX_SEAMLESS_NOT_POSSIBLE = 10;
+  const int EX_CONFIG_FAILED = 11;
+  const int EX_PICTURE_PROFILE_MAX_EXCEEDED = 12;
   const int INVALID_CONFIGURATION = 0x7fffffff;
 }
diff --git a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerCommand.aidl b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerCommand.aidl
index 87c0e1e..c26cb15 100644
--- a/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerCommand.aidl
+++ b/graphics/composer/aidl/aidl_api/android.hardware.graphics.composer3/current/android/hardware/graphics/composer3/LayerCommand.aidl
@@ -58,4 +58,5 @@
   android.hardware.graphics.composer3.LayerLifecycleBatchCommandType layerLifecycleBatchCommandType;
   int newBufferSlotCount;
   @nullable android.hardware.graphics.composer3.Luts luts;
+  long pictureProfileId;
 }
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
index 7154d74..fa58fb7 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCapability.aidl
@@ -96,4 +96,10 @@
      * @see DisplayCommand.validateDisplay
      */
     MULTI_THREADED_PRESENT = 8,
+    /**
+     * Specifies that the display supports a global picture-processing pipeline.
+     *
+     * @see DisplayCommand.pictureProfileId
+     */
+    PICTURE_PROCESSING = 9,
 }
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
index 02c1389..c3fd68e 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/DisplayCommand.aidl
@@ -185,4 +185,21 @@
      * close as possible to the cadence.
      */
     int frameIntervalNs;
+
+    /**
+     * If the display supports DisplayCapability.PICTURE_PROCESSING, then this value is used to look
+     * up a picture profile which defines the parameters used when configuring a picture-processing
+     * pipeline applied to the composition result, enhancing the quality of the entire composed
+     * image. If the server does not recognize the picture profile, it must continue composition
+     * and ignore this value. If the value is zero, then the server's default picture processing,
+     * if possible, must be applied.
+     *
+     * Note that the client will never send a DisplayCommand.pictureProfileId if
+     * IComposerClient.getMaxLayerPictureProfiles is non-zero. Picture profiles will only be
+     * specified on a per-layer basis via LayerCommand.pictureProfileId.
+     *
+     * @see IComposerClient.getMaxLayerPictureProfiles
+     * @see DisplayCommand.pictureProfileId
+     */
+    long pictureProfileId;
 }
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
index 213e8e9..edbb988 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/IComposerClient.aidl
@@ -93,6 +93,18 @@
      * Seamless requirements cannot be met Exception
      */
     const int EX_SEAMLESS_NOT_POSSIBLE = 10;
+    /**
+     * Proposed configuration failed for undisclosed reasons
+     */
+    const int EX_CONFIG_FAILED = 11;
+
+    /**
+     * The number of per-layer picture profiles in use is larger than the number of layer-specific
+     * picture-processing pipelines, as-defined by getMaxLayerPictureProfiles.
+     *
+     * @see LayerCommand.pictureProfileId
+     */
+    const int EX_PICTURE_PROFILE_MAX_EXCEEDED = 12;
 
     /**
      * Integer.MAX_VALUE is reserved for the invalid configuration.
@@ -558,6 +570,7 @@
      * @exception EX_BAD_DISPLAY when an invalid display handle was passed in.
      * @exception EX_BAD_CONFIG when the configuration handle passed in is not valid
      *                    for this display.
+     * @exception EX_CONFIG_FAILED when the config failed for undisclosed reasons.
      */
     void setActiveConfig(long display, int config);
 
@@ -583,6 +596,7 @@
      * achieve the vsync period change without a noticeable visual artifact. When the conditions
      * change and it may be possible to change the vsync period seamlessly, onSeamlessPossible
      * callback must be called to indicate that caller should retry.
+     * @exception EX_CONFIG_FAILED when the config failed for undisclosed reasons.
      *
      * @return is the timeline for the vsync period change.
      */
@@ -913,4 +927,15 @@
      */
     oneway void notifyExpectedPresent(
             long display, in ClockMonotonicTimestamp expectedPresentTime, int frameIntervalNs);
+
+    /*
+     * Returns the number of layer-specific picture-processing profiles that can be referenced from
+     * multiple LayerCommand.pictureProfileId. If the client passes in more pictureProfileIds whose
+     * values are larger than zero (indicating none) then the implementation can support, it should
+     * return EX_PICTURE_PROFILE_MAX_EXCEEDED.
+     *
+     * If the implementation only supports one display-wide picture-processing
+     * pipeline, a value of zero should be returned here.
+     */
+    int getMaxLayerPictureProfiles(long display);
 }
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/LayerCommand.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/LayerCommand.aidl
index c89887d..d7ef4c1 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/LayerCommand.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/LayerCommand.aidl
@@ -285,4 +285,20 @@
      * Sets the lut(s) for the layer.
      */
     @nullable Luts luts;
+
+    /**
+     * If the display has multiple per-layer picture processing pipelines, then this value is used
+     * to look up a picture profile which defines the parameters used when configuring a
+     * picture-processing pipeline for this layer, enhancing the quality of the buffer contents. If
+     * the server doesn't recognize this profile, it must continue with composition and ignore
+     * this value. If the value is zero, then the no picture processing must be applied.
+     *
+     * Note that the client will never send a DisplayCommand.pictureProfileId if
+     * IComposerClient.getMaxLayerPictureProfiles is non-zero. Picture profiles will only be
+     * specified on a per-layer basis.
+     *
+     * @see IComposerClient.getMaxLayerPictureProfiles
+     * @see DisplayCommand.pictureProfileId
+     */
+    long pictureProfileId;
 }
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/LutProperties.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/LutProperties.aidl
index 1c6fd18..d3dd30e 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/LutProperties.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/LutProperties.aidl
@@ -36,8 +36,8 @@
 
     /**
      * SamplingKey is about how a Lut can be sampled.
-     * A Lut can be sampled in more than one way,
-     * but only one sampling method is used at one time.
+     * A Lut can be sampled in more than one key,
+     * but only one sampling key is used at one time.
      *
      * The implementations should use a sampling strategy
      * at least as good as linear sampling.
diff --git a/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl b/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
index 5f55f1c..592ac50 100644
--- a/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
+++ b/graphics/composer/aidl/android/hardware/graphics/composer3/Luts.aidl
@@ -40,13 +40,15 @@
      * For data precision, 32-bit float is used to specify a Lut by both the HWC and
      * the platform.
      *
-     *
      * For unflattening/flattening 3D Lut(s), the algorithm below should be observed
      * by both the HWC and the platform.
      * Assuming that we have a 3D array `ORIGINAL[WIDTH, HEIGHT, DEPTH]`, we would turn it into
      * `FLAT[WIDTH * HEIGHT * DEPTH]` by
      *
      * `FLAT[z + DEPTH * (y + HEIGHT * x)] = ORIGINAL[x, y, z]`
+     *
+     * Noted that 1D Lut(s) should be gain curve ones
+     * and 3D Lut(s) should be pure color lookup ones.
      */
     @nullable ParcelFileDescriptor pfd;
 
@@ -60,6 +62,8 @@
 
     /**
      * The properties list of the Luts.
+     *
+     * The number of sampling key inside should only be one.
      */
     LutProperties[] lutProperties;
 }
diff --git a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
index 036460e..71a04f3 100644
--- a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
+++ b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
@@ -25,22 +25,20 @@
 #include <string.h>
 
 #include <aidl/android/hardware/graphics/common/BlendMode.h>
+#include <aidl/android/hardware/graphics/common/ColorTransform.h>
+#include <aidl/android/hardware/graphics/common/FRect.h>
+#include <aidl/android/hardware/graphics/common/Rect.h>
+#include <aidl/android/hardware/graphics/common/Transform.h>
 #include <aidl/android/hardware/graphics/composer3/Color.h>
 #include <aidl/android/hardware/graphics/composer3/Composition.h>
 #include <aidl/android/hardware/graphics/composer3/DisplayBrightness.h>
+#include <aidl/android/hardware/graphics/composer3/DisplayCommand.h>
 #include <aidl/android/hardware/graphics/composer3/LayerBrightness.h>
 #include <aidl/android/hardware/graphics/composer3/LayerLifecycleBatchCommandType.h>
 #include <aidl/android/hardware/graphics/composer3/Luts.h>
 #include <aidl/android/hardware/graphics/composer3/PerFrameMetadata.h>
 #include <aidl/android/hardware/graphics/composer3/PerFrameMetadataBlob.h>
 
-#include <aidl/android/hardware/graphics/composer3/DisplayCommand.h>
-
-#include <aidl/android/hardware/graphics/common/ColorTransform.h>
-#include <aidl/android/hardware/graphics/common/FRect.h>
-#include <aidl/android/hardware/graphics/common/Rect.h>
-#include <aidl/android/hardware/graphics/common/Transform.h>
-
 #include <log/log.h>
 #include <sync/sync.h>
 
@@ -59,6 +57,8 @@
 
 namespace aidl::android::hardware::graphics::composer3 {
 
+using PictureProfileId = decltype(LayerCommand().pictureProfileId);
+
 class ComposerClientWriter final {
   public:
     static constexpr std::optional<ClockMonotonicTimestamp> kNoTimestamp = std::nullopt;
@@ -84,6 +84,10 @@
                 DisplayBrightness{.brightness = brightness, .brightnessNits = brightnessNits});
     }
 
+    void setDisplayPictureProfileId(int64_t display, PictureProfileId pictureProfileId) {
+        getDisplayCommand(display).pictureProfileId = pictureProfileId;
+    }
+
     void setClientTarget(int64_t display, uint32_t slot, const native_handle_t* target,
                          int acquireFence, Dataspace dataspace, const std::vector<Rect>& damage,
                          float hdrSdrRatio) {
@@ -250,6 +254,11 @@
         getLayerCommand(display, layer).luts.emplace(std::move(luts));
     }
 
+    void setLayerPictureProfileId(int64_t display, int64_t layer,
+                                  PictureProfileId pictureProfileId) {
+        getLayerCommand(display, layer).pictureProfileId = pictureProfileId;
+    }
+
     std::vector<DisplayCommand> takePendingCommands() {
         flushLayerCommand();
         flushDisplayCommand();
diff --git a/graphics/composer/aidl/vts/VtsComposerClient.cpp b/graphics/composer/aidl/vts/VtsComposerClient.cpp
index 89ba2e6..9b6a005 100644
--- a/graphics/composer/aidl/vts/VtsComposerClient.cpp
+++ b/graphics/composer/aidl/vts/VtsComposerClient.cpp
@@ -690,4 +690,10 @@
     mDisplayResources.clear();
     return true;
 }
+
+std::pair<ScopedAStatus, int32_t> VtsComposerClient::getMaxLayerPictureProfiles(int64_t display) {
+    int32_t outMaxProfiles = 0;
+    return {mComposerClient->getMaxLayerPictureProfiles(display, &outMaxProfiles), outMaxProfiles};
+}
+
 }  // namespace aidl::android::hardware::graphics::composer3::vts
diff --git a/graphics/composer/aidl/vts/VtsComposerClient.h b/graphics/composer/aidl/vts/VtsComposerClient.h
index da6116f..53f5fae 100644
--- a/graphics/composer/aidl/vts/VtsComposerClient.h
+++ b/graphics/composer/aidl/vts/VtsComposerClient.h
@@ -198,6 +198,8 @@
 
     std::vector<RefreshRateChangedDebugData> takeListOfRefreshRateChangedDebugData();
 
+    std::pair<ScopedAStatus, int32_t> getMaxLayerPictureProfiles(int64_t display);
+
     static constexpr int32_t kMaxFrameIntervalNs = 50000000;  // 20fps
     static constexpr int32_t kNoFrameIntervalNs = 0;
 
diff --git a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
index eaf23b5..8006523 100644
--- a/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
+++ b/graphics/composer/aidl/vts/VtsHalGraphicsComposer3_TargetTest.cpp
@@ -28,9 +28,11 @@
 #include <android/hardware/graphics/composer3/ComposerClientReader.h>
 #include <android/hardware/graphics/composer3/ComposerClientWriter.h>
 #include <binder/ProcessState.h>
+#include <cutils/ashmem.h>
 #include <gtest/gtest.h>
 #include <ui/Fence.h>
 #include <ui/GraphicBuffer.h>
+#include <ui/PictureProfileHandle.h>
 #include <ui/PixelFormat.h>
 #include <algorithm>
 #include <iterator>
@@ -118,6 +120,15 @@
                 [&](const Capability& activeCapability) { return activeCapability == capability; });
     }
 
+    bool hasDisplayCapability(int64_t displayId, DisplayCapability capability) {
+        const auto& [status, capabilities] = mComposerClient->getDisplayCapabilities(displayId);
+        EXPECT_TRUE(status.isOk());
+        return std::any_of(capabilities.begin(), capabilities.end(),
+                           [&](const DisplayCapability& activeCapability) {
+                               return activeCapability == capability;
+                           });
+    }
+
     int getInterfaceVersion() {
         const auto& [versionStatus, version] = mComposerClient->getInterfaceVersion();
         EXPECT_TRUE(versionStatus.isOk());
@@ -1388,6 +1399,14 @@
     }
 }
 
+TEST_P(GraphicsComposerAidlV3Test, GetMaxLayerPictureProfiles) {
+    for (const auto& display : mDisplays) {
+        const auto& [status, maxPorfiles] =
+                mComposerClient->getMaxLayerPictureProfiles(display.getDisplayId());
+        EXPECT_TRUE(status.isOk());
+    }
+}
+
 // Tests for Command.
 class GraphicsComposerAidlCommandTest : public GraphicsComposerAidlTest {
   protected:
@@ -2048,6 +2067,7 @@
     EXPECT_TRUE(layerStatus.isOk());
     writer.setLayerBuffer(getPrimaryDisplayId(), layer, /*slot*/ 0, handle, /*acquireFence*/ -1);
     execute();
+    ASSERT_TRUE(mReader.takeErrors().empty());
 }
 
 TEST_P(GraphicsComposerAidlCommandTest, SetLayerBufferMultipleTimes) {
@@ -3219,6 +3239,140 @@
     });
 }
 
+TEST_P(GraphicsComposerAidlCommandV3Test, getMaxLayerPictureProfiles_success) {
+    for (auto& display : mDisplays) {
+        int64_t displayId = display.getDisplayId();
+        if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
+            continue;
+        }
+        const auto& [status, maxProfiles] =
+                mComposerClient->getMaxLayerPictureProfiles(getPrimaryDisplayId());
+        EXPECT_TRUE(status.isOk());
+    }
+}
+
+TEST_P(GraphicsComposerAidlCommandV3Test, setDisplayPictureProfileId_success) {
+    for (auto& display : mDisplays) {
+        int64_t displayId = display.getDisplayId();
+        if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
+            continue;
+        }
+
+        auto& writer = getWriter(displayId);
+        const auto layer = createOnScreenLayer(display);
+        const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+        ASSERT_NE(nullptr, buffer->handle);
+        // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+        writer.setDisplayPictureProfileId(displayId, PictureProfileId(1));
+        writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
+                              /*acquireFence*/ -1);
+        execute();
+        ASSERT_TRUE(mReader.takeErrors().empty());
+    }
+}
+
+TEST_P(GraphicsComposerAidlCommandV3Test, setLayerPictureProfileId_success) {
+    for (auto& display : mDisplays) {
+        int64_t displayId = display.getDisplayId();
+        if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
+            continue;
+        }
+        const auto& [status, maxProfiles] = mComposerClient->getMaxLayerPictureProfiles(displayId);
+        EXPECT_TRUE(status.isOk());
+        if (maxProfiles == 0) {
+            continue;
+        }
+
+        auto& writer = getWriter(displayId);
+        const auto layer = createOnScreenLayer(display);
+        const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+        ASSERT_NE(nullptr, buffer->handle);
+        writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
+                              /*acquireFence*/ -1);
+        // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+        writer.setLayerPictureProfileId(displayId, layer, PictureProfileId(1));
+        execute();
+        ASSERT_TRUE(mReader.takeErrors().empty());
+    }
+}
+
+TEST_P(GraphicsComposerAidlCommandV3Test, setLayerPictureProfileId_failsWithTooManyProfiles) {
+    for (auto& display : mDisplays) {
+        int64_t displayId = display.getDisplayId();
+        if (!hasDisplayCapability(displayId, DisplayCapability::PICTURE_PROCESSING)) {
+            continue;
+        }
+        const auto& [status, maxProfiles] = mComposerClient->getMaxLayerPictureProfiles(displayId);
+        EXPECT_TRUE(status.isOk());
+        if (maxProfiles == 0) {
+            continue;
+        }
+
+        auto& writer = getWriter(displayId);
+        for (int profileId = 1; profileId <= maxProfiles + 1; ++profileId) {
+            const auto layer = createOnScreenLayer(display);
+            const auto buffer = allocate(::android::PIXEL_FORMAT_RGBA_8888);
+            ASSERT_NE(nullptr, buffer->handle);
+            writer.setLayerBuffer(displayId, layer, /*slot*/ 0, buffer->handle,
+                                  /*acquireFence*/ -1);
+            // TODO(b/337330263): Lookup profile IDs from PictureProfileService
+            writer.setLayerPictureProfileId(displayId, layer, PictureProfileId(profileId));
+        }
+        execute();
+        const auto errors = mReader.takeErrors();
+        ASSERT_TRUE(errors.size() == 1 &&
+                    errors[0].errorCode == IComposerClient::EX_PICTURE_PROFILE_MAX_EXCEEDED);
+    }
+}
+
+class GraphicsComposerAidlCommandV4Test : public GraphicsComposerAidlCommandTest {
+  protected:
+    void SetUp() override {
+        GraphicsComposerAidlTest::SetUp();
+        if (getInterfaceVersion() <= 3) {
+            GTEST_SKIP() << "Device interface version is expected to be >= 4";
+        }
+    }
+};
+
+TEST_P(GraphicsComposerAidlCommandV4Test, SetUnsupportedLayerLuts) {
+    auto& writer = getWriter(getPrimaryDisplayId());
+    const auto& [layerStatus, layer] =
+            mComposerClient->createLayer(getPrimaryDisplayId(), kBufferSlotCount, &writer);
+    EXPECT_TRUE(layerStatus.isOk());
+    const auto& [status, properties] = mComposerClient->getOverlaySupport();
+    if (!status.isOk() && status.getExceptionCode() == EX_SERVICE_SPECIFIC &&
+        status.getServiceSpecificError() == IComposerClient::EX_UNSUPPORTED) {
+        GTEST_SUCCEED() << "getOverlaySupport is not supported";
+        return;
+    }
+    ASSERT_TRUE(status.isOk());
+
+    // TODO (b/362319189): add Lut VTS enforcement
+    if (!properties.lutProperties) {
+        int32_t size = 7;
+        size_t bufferSize = static_cast<size_t>(size) * sizeof(float);
+        int32_t fd = ashmem_create_region("lut_shared_mem", bufferSize);
+        void* ptr = mmap(nullptr, bufferSize, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+        std::vector<float> buffers = {0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f};
+        memcpy(ptr, buffers.data(), bufferSize);
+        munmap(ptr, bufferSize);
+        Luts luts;
+        luts.offsets = {0};
+        luts.lutProperties = {
+                {LutProperties::Dimension::ONE_D, size, {LutProperties::SamplingKey::RGB}}};
+        luts.pfd = ndk::ScopedFileDescriptor(fd);
+
+        writer.setLayerLuts(getPrimaryDisplayId(), layer, luts);
+        writer.validateDisplay(getPrimaryDisplayId(), ComposerClientWriter::kNoTimestamp,
+                               VtsComposerClient::kNoFrameIntervalNs);
+        execute();
+        // change to client composition
+        ASSERT_FALSE(mReader.takeChangedCompositionTypes(getPrimaryDisplayId()).empty());
+        ASSERT_TRUE(mReader.takeErrors().empty());
+    }
+}
+
 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlCommandTest);
 INSTANTIATE_TEST_SUITE_P(
         PerInstance, GraphicsComposerAidlCommandTest,
@@ -3249,6 +3403,11 @@
         PerInstance, GraphicsComposerAidlCommandV3Test,
         testing::ValuesIn(::android::getAidlHalInstanceNames(IComposer::descriptor)),
         ::android::PrintInstanceNameToString);
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(GraphicsComposerAidlCommandV4Test);
+INSTANTIATE_TEST_SUITE_P(
+        PerInstance, GraphicsComposerAidlCommandV4Test,
+        testing::ValuesIn(::android::getAidlHalInstanceNames(IComposer::descriptor)),
+        ::android::PrintInstanceNameToString);
 }  // namespace aidl::android::hardware::graphics::composer3::vts
 
 int main(int argc, char** argv) {
diff --git a/health/2.0/vts/functional/Android.bp b/health/2.0/vts/functional/Android.bp
index 597fb50..206ec0f 100644
--- a/health/2.0/vts/functional/Android.bp
+++ b/health/2.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_kernel",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/health/2.1/vts/functional/Android.bp b/health/2.1/vts/functional/Android.bp
index 238a150..ebb082d 100644
--- a/health/2.1/vts/functional/Android.bp
+++ b/health/2.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_kernel",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/health/aidl/vts/functional/Android.bp b/health/aidl/vts/functional/Android.bp
index 6d2b530..25ba5f8 100644
--- a/health/aidl/vts/functional/Android.bp
+++ b/health/aidl/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_kernel",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/health/storage/1.0/vts/functional/Android.bp b/health/storage/1.0/vts/functional/Android.bp
index ccf22ce..e78e044 100644
--- a/health/storage/1.0/vts/functional/Android.bp
+++ b/health/storage/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_kernel",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/health/storage/aidl/vts/functional/Android.bp b/health/storage/aidl/vts/functional/Android.bp
index fe15170..083ec37 100644
--- a/health/storage/aidl/vts/functional/Android.bp
+++ b/health/storage/aidl/vts/functional/Android.bp
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 package {
+    default_team: "trendy_team_android_kernel",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/power/1.0/vts/functional/Android.bp b/power/1.0/vts/functional/Android.bp
index 7d90a83..0bb1420 100644
--- a/power/1.0/vts/functional/Android.bp
+++ b/power/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_powermanager_framework",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/power/1.1/vts/functional/Android.bp b/power/1.1/vts/functional/Android.bp
index 4270ab7..83f1e6d 100644
--- a/power/1.1/vts/functional/Android.bp
+++ b/power/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_powermanager_framework",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/power/1.2/vts/functional/Android.bp b/power/1.2/vts/functional/Android.bp
index ab4b601..82184e8 100644
--- a/power/1.2/vts/functional/Android.bp
+++ b/power/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_powermanager_framework",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/power/1.3/vts/functional/Android.bp b/power/1.3/vts/functional/Android.bp
index c1186e3..c164901 100644
--- a/power/1.3/vts/functional/Android.bp
+++ b/power/1.3/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_powermanager_framework",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/power/aidl/vts/Android.bp b/power/aidl/vts/Android.bp
index c9285f4..e3e72d8 100644
--- a/power/aidl/vts/Android.bp
+++ b/power/aidl/vts/Android.bp
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 package {
+    default_team: "trendy_team_powermanager_framework",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/power/stats/1.0/vts/functional/Android.bp b/power/stats/1.0/vts/functional/Android.bp
index 5a448d8..c11f848 100644
--- a/power/stats/1.0/vts/functional/Android.bp
+++ b/power/stats/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_powermanager_framework",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/power/stats/aidl/vts/Android.bp b/power/stats/aidl/vts/Android.bp
index b9a395b..4fdc184 100644
--- a/power/stats/aidl/vts/Android.bp
+++ b/power/stats/aidl/vts/Android.bp
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 package {
+    default_team: "trendy_team_powermanager_framework",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp
index 517ad86..eca9a27 100644
--- a/radio/aidl/Android.bp
+++ b/radio/aidl/Android.bp
@@ -37,7 +37,7 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 
 }
 
@@ -47,7 +47,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/config/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V3"],
+    imports: ["android.hardware.radio-V4"],
     backend: {
         cpp: {
             enabled: true,
@@ -71,7 +71,7 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 
 }
 
@@ -81,7 +81,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/data/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V3"],
+    imports: ["android.hardware.radio-V4"],
     backend: {
         cpp: {
             enabled: true,
@@ -114,7 +114,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/messaging/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V3"],
+    imports: ["android.hardware.radio-V4"],
     backend: {
         cpp: {
             enabled: true,
@@ -138,7 +138,7 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 }
 
 aidl_interface {
@@ -147,7 +147,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/modem/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V3"],
+    imports: ["android.hardware.radio-V4"],
     backend: {
         cpp: {
             enabled: true,
@@ -171,7 +171,7 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 }
 
 aidl_interface {
@@ -180,7 +180,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/network/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V3"],
+    imports: ["android.hardware.radio-V4"],
     backend: {
         cpp: {
             enabled: true,
@@ -204,7 +204,7 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 }
 
 aidl_interface {
@@ -242,8 +242,8 @@
     srcs: ["android/hardware/radio/sim/*.aidl"],
     stability: "vintf",
     imports: [
-        "android.hardware.radio-V3",
-        "android.hardware.radio.config-V3",
+        "android.hardware.radio-V4",
+        "android.hardware.radio.config-V4",
     ],
     backend: {
         cpp: {
@@ -277,7 +277,7 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 }
 
 aidl_interface {
@@ -286,7 +286,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/voice/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V3"],
+    imports: ["android.hardware.radio-V4"],
     backend: {
         cpp: {
             enabled: true,
@@ -310,7 +310,7 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 }
 
 aidl_interface {
@@ -319,7 +319,7 @@
     srcs: ["android/hardware/radio/ims/media/*.aidl"],
     stability: "vintf",
     imports: [
-        "android.hardware.radio-V3",
+        "android.hardware.radio-V4",
         "android.hardware.radio.data-V4",
     ],
     backend: {
@@ -355,7 +355,7 @@
     vendor_available: true,
     srcs: ["android/hardware/radio/ims/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V3"],
+    imports: ["android.hardware.radio-V4"],
     backend: {
         cpp: {
             enabled: false,
@@ -375,5 +375,5 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
index 11e7356..45e6ccf 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrSignalStrength.aidl
@@ -43,5 +43,5 @@
   int csiSinr;
   int csiCqiTableIndex;
   byte[] csiCqiReport;
-  int timingAdvance = 0x7FFFFFFF;
+  int timingAdvance = android.hardware.radio.RadioConst.VALUE_UNAVAILABLE /* 2147483647 */;
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
index 970cd1e..e24a35d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioConst.aidl
@@ -35,6 +35,9 @@
 /* @hide */
 @JavaDerive(toString=true) @VintfStability
 parcelable RadioConst {
+  const int VALUE_UNAVAILABLE = 0x7FFFFFFF;
+  const long VALUE_UNAVAILABLE_LONG = 0x7FFFFFFFFFFFFFFF;
+  const byte VALUE_UNAVAILABLE_BYTE = 0xFFu8;
   const int MAX_RILDS = 3;
   const int MAX_UUID_LENGTH = 64;
   const int CARD_MAX_APPS = 8;
diff --git a/radio/aidl/android/hardware/radio/RadioConst.aidl b/radio/aidl/android/hardware/radio/RadioConst.aidl
index 7b923b9..df27526 100644
--- a/radio/aidl/android/hardware/radio/RadioConst.aidl
+++ b/radio/aidl/android/hardware/radio/RadioConst.aidl
@@ -20,6 +20,9 @@
 @VintfStability
 @JavaDerive(toString=true)
 parcelable RadioConst {
+    const int VALUE_UNAVAILABLE = 0x7FFFFFFF;
+    const long VALUE_UNAVAILABLE_LONG = 0x7FFFFFFFFFFFFFFF;
+    const byte VALUE_UNAVAILABLE_BYTE = 0xFFu8;
     const int MAX_RILDS = 3;
     const int MAX_UUID_LENGTH = 64;
     const int CARD_MAX_APPS = 8;
diff --git a/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl b/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
index 1838f2e..90c4454 100644
--- a/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
+++ b/radio/aidl/android/hardware/radio/data/KeepaliveRequest.aidl
@@ -40,7 +40,7 @@
     byte[] sourceAddress;
     /**
      * Source port if relevant for the given type
-     * INT_MAX: 0x7FFFFFFF denotes that the field is unused
+     * RadioConst:VALUE_UNAVAILABLE denotes that the field is unused
      */
     int sourcePort;
     /**
@@ -49,7 +49,7 @@
     byte[] destinationAddress;
     /**
      * Destination if relevant for the given type
-     * INT_MAX: 0x7FFFFFFF denotes that the field is unused
+     * RadioConst:VALUE_UNAVAILABLE denotes that the field is unused
      */
     int destinationPort;
     /**
diff --git a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
index 957973d..7ac560f 100644
--- a/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
+++ b/radio/aidl/android/hardware/radio/data/LinkAddress.aidl
@@ -44,14 +44,14 @@
      * The time, as reported by SystemClock.elapsedRealtime(), when this link address will be or
      * was deprecated. -1 indicates this information is not available. At the time existing
      * connections can still use this address until it expires, but new connections should use the
-     * new address. LONG_MAX(0x7FFFFFFFFFFFFFFF) indicates this link address will never be
+     * new address. RadioConst:VALUE_UNAVAILABLE_LONG indicates this link address will never be
      * deprecated.
      */
     long deprecationTime;
     /**
      * The time, as reported by SystemClock.elapsedRealtime(), when this link address will expire
      * and be removed from the interface. -1 indicates this information is not available.
-     * LONG_MAX(0x7FFFFFFFFFFFFFFF) indicates this link address will never expire.
+     * RadioConst:VALUE_UNAVAILABLE_LONG indicates this link address will never expire.
      */
     long expirationTime;
 }
diff --git a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
index b8f01c0..31fb14c 100644
--- a/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
+++ b/radio/aidl/android/hardware/radio/data/SetupDataCallResult.aidl
@@ -68,10 +68,10 @@
     /**
      * If cause is not DataCallFailCause.NONE, this field indicates the network suggested data
      * retry back-off time in milliseconds. Negative value indicates network does not give any
-     * suggestion. 0 indicates retry should be performed immediately. 0x7fffffffffffffff indicates
-     * the device should not retry data setup anymore. During this time, no calls to
-     * IRadioData.setupDataCall for this APN will be made unless IRadioDataIndication.unthrottleApn
-     * is sent with the same APN.
+     * suggestion. 0 indicates retry should be performed immediately.
+     * RadioConst:VALUE_UNAVAILABLE_LONG indicates the device should not retry data setup anymore.
+     * During this time, no calls to IRadioData.setupDataCall for this APN will be made unless
+     * IRadioDataIndication.unthrottleApn is sent with the same APN.
      */
     long suggestedRetryTime;
     /**
diff --git a/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
index ae7aa93..0e241d3 100644
--- a/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/CdmaSignalStrength.aidl
@@ -22,12 +22,12 @@
 parcelable CdmaSignalStrength {
     /**
      * This value is the actual RSSI value multiplied by -1. Example: If the actual RSSI is -75,
-     * then this response value will be 75. INT_MAX means invalid/unreported.
+     * then this response value will be 75. RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int dbm;
     /**
      * This value is the actual Ec/Io multiplied by -10. Example: If the actual Ec/Io is -12.5 dB,
-     * then this response value will be 125. INT_MAX means invalid/unreported.
+     * then this response value will be 125. RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int ecio;
 }
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
index b93988f..acf3db1 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityCdma.aidl
@@ -23,27 +23,27 @@
 @JavaDerive(toString=true)
 parcelable CellIdentityCdma {
     /**
-     * Network Id 0..65535, INT_MAX if unknown
+     * Network Id 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int networkId;
     /**
-     * CDMA System Id 0..32767, INT_MAX if unknown
+     * CDMA System Id 0..32767, RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int systemId;
     /**
-     * Base Station Id 0..65535, INT_MAX if unknown
+     * Base Station Id 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int baseStationId;
     /**
      * Longitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. It is represented in
      * units of 0.25 seconds and ranges from -2592000 to 2592000, both values inclusive
-     * (corresponding to a range of -180 to +180 degrees). INT_MAX if unknown
+     * (corresponding to a range of -180 to +180 degrees). RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int longitude;
     /**
      * Latitude is a decimal number as specified in 3GPP2 C.S0005-A v6.0. It is represented in
      * units of 0.25 seconds and ranges from -1296000 to 1296000, both values inclusive
-     * (corresponding to a range of -90 to +90 degrees). INT_MAX if unknown
+     * (corresponding to a range of -90 to +90 degrees). RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int latitude;
     /**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
index bc02adc..fe39a0e 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityGsm.aidl
@@ -31,11 +31,12 @@
      */
     String mnc;
     /**
-     * 16-bit Location Area Code, 0..65535, INT_MAX if unknown
+     * 16-bit Location Area Code, 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int lac;
     /**
-     * 16-bit GSM Cell Identity described in TS 27.007, 0..65535, INT_MAX if unknown
+     * 16-bit GSM Cell Identity described in TS 27.007, 0..65535,
+     * RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int cid;
     /**
@@ -43,7 +44,7 @@
      */
     int arfcn;
     /**
-     * 6-bit Base Station Identity Code, 0xFF if unknown
+     * 6-bit Base Station Identity Code, RadioConst:VALUE_UNAVAILABLE_BYTE if unknown
      */
     byte bsic;
     /**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
index 6912e02..9c4fc3c 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityLte.aidl
@@ -33,7 +33,7 @@
      */
     String mnc;
     /**
-     * 28-bit Cell Identity described in TS 27.007, INT_MAX if unknown
+     * 28-bit Cell Identity described in TS 27.007, RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int ci;
     /**
@@ -41,7 +41,7 @@
      */
     int pci;
     /**
-     * 16-bit tracking area code, INT_MAX if unknown
+     * 16-bit tracking area code, RadioConst:VALUE_UNAVAILABLE if unknown
      */
     int tac;
     /**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
index 4192845..7ebc0cd 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityNr.aidl
@@ -29,12 +29,12 @@
 parcelable CellIdentityNr {
     /**
      * 3-digit Mobile Country Code, in range[0, 999]; This value must be valid for registered or
-     *  camped cells; INT_MAX means invalid/unreported.
+     *  camped cells; Empty string means invalid/unreported.
      */
     String mcc;
     /**
      * 2 or 3-digit Mobile Network Code, in range [0, 999], This value must be valid for
-     * registered or camped cells; INT_MAX means invalid/unreported.
+     * registered or camped cells; Empty string means invalid/unreported.
      */
     String mnc;
     /**
@@ -48,7 +48,7 @@
      */
     int pci;
     /**
-     * 16-bit tracking area code, INT_MAX means invalid/unreported.
+     * 16-bit tracking area code, RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int tac;
     /**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
index 33ffc6f..8373493 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityTdscdma.aidl
@@ -32,15 +32,17 @@
      */
     String mnc;
     /**
-     * 16-bit Location Area Code, 0..65535, INT_MAX if unknown.
+     * 16-bit Location Area Code, 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown.
      */
     int lac;
     /**
-     * 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown.
+     * 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, RadioConst:VALUE_UNAVAILABLE
+     * if unknown.
      */
     int cid;
     /**
-     * 8-bit Cell Parameters ID described in TS 25.331, 0..127, INT_MAX if unknown.
+     * 8-bit Cell Parameters ID described in TS 25.331, 0..127, RadioConst:VALUE_UNAVAILABLE if
+     * unknown.
      */
     int cpid;
     /**
diff --git a/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl b/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
index b6e328a..ab703f1 100644
--- a/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
+++ b/radio/aidl/android/hardware/radio/network/CellIdentityWcdma.aidl
@@ -32,11 +32,12 @@
      */
     String mnc;
     /**
-     * 16-bit Location Area Code, 0..65535, INT_MAX if unknown.
+     * 16-bit Location Area Code, 0..65535, RadioConst:VALUE_UNAVAILABLE if unknown.
      */
     int lac;
     /**
-     * 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, INT_MAX if unknown.
+     * 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, RadioConst:VALUE_UNAVAILABLE
+     * if unknown.
      */
     int cid;
     /**
diff --git a/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
index fc7cc1b..ac6928e 100644
--- a/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/EvdoSignalStrength.aidl
@@ -22,17 +22,17 @@
 parcelable EvdoSignalStrength {
     /**
      * This value is the actual RSSI value multiplied by -1. Example: If the actual RSSI is -75,
-     * then this response value will be 75; INT_MAX means invalid/unreported.
+     * then this response value will be 75; RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int dbm;
     /**
      * This value is the actual Ec/Io multiplied by -10. Example: If the actual Ec/Io is -12.5 dB,
-     * then this response value will be 125; INT_MAX means invalid/unreported.
+     * then this response value will be 125; RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int ecio;
     /**
-     * Valid values are 0-8. 8 is the highest signal to noise ratio; INT_MAX means
-     * invalid/unreported.
+     * Valid values are 0-8. 8 is the highest signal to noise ratio; RadioConst:VALUE_UNAVAILABLE
+     * means invalid/unreported.
      */
     int signalNoiseRatio;
 }
diff --git a/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
index d569cf7..4a99646 100644
--- a/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/GsmSignalStrength.aidl
@@ -21,15 +21,18 @@
 @JavaDerive(toString=true)
 parcelable GsmSignalStrength {
     /**
-     * Valid values are (0-61, 99) as defined in TS 27.007 8.69; INT_MAX means invalid/unreported.
+     * Valid values are (0-61, 99) as defined in TS 27.007 8.69; RadioConst:VALUE_UNAVAILABLE means
+     * invalid/unreported.
      */
     int signalStrength;
     /**
-     * Bit error rate (0-7, 99) as defined in TS 27.007 8.5; INT_MAX means invalid/unreported.
+     * Bit error rate (0-7, 99) as defined in TS 27.007 8.5; RadioConst:VALUE_UNAVAILABLE means
+     * invalid/unreported.
      */
     int bitErrorRate;
     /**
-     * Timing advance in bit periods. 1 bit period = 48/13 us. INT_MAX means invalid/unreported.
+     * Timing advance in bit periods. 1 bit period = 48/13 us. RadioConst:VALUE_UNAVAILABLE means
+     * invalid/unreported.
      */
     int timingAdvance;
 }
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 5f26195..a4f97e3 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -278,7 +278,7 @@
     /**
      * Sets the minimum time between when unsolicited cellInfoList() must be invoked.
      * A value of 0, means invoke cellInfoList() when any of the reported information changes.
-     * Setting the value to INT_MAX(0x7fffffff) means never issue a unsolicited cellInfoList().
+     * Value of RadioConst:VALUE_UNAVAILABLE means never issue a unsolicited cellInfoList().
      *
      * @param serial Serial number of request.
      * @param rate minimum time in milliseconds to indicate time between unsolicited cellInfoList()
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
index da82b78..34948fb 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkIndication.aidl
@@ -221,6 +221,12 @@
      * - If a device uses a 2G network to send a AUTHENTICATION_AND_CIPHERING_RESPONSE message on
      * the NAS and the message includes an IMEISV.
      *
+     * cellularIdentifierDisclosure indications must be sent to Android regardless of the screen
+     * state. If the screen is off, the indications must still be sent to Android.
+     *
+     * Note: in the NRSA scenario, only a SUCI generated by a null scheme should be considered as a
+     * plain-text identifier.
+     *
      * @param type Type of radio indication
      * @param disclosure A CellularIdentifierDisclosure as specified by
      *         IRadioNetwork.setCellularIdentifierTransparencyEnabled.
@@ -232,23 +238,78 @@
     /*
      * Indicates that a new ciphering or integrity algorithm was used for a particular voice,
      * signaling, or data connection for a given PLMN and/or access network. Due to power
-     * concerns, once a connection type has been reported on, follow-up reports about that
-     * connection type are only generated if there is any change to the most-recently reported
-     * encryption or integrity, or if the value of SecurityAlgorithmUpdate#isUnprotectedEmergency
-     * changes. A change only in cell ID should not trigger an update, as the design is intended
-     * to be agnostic to dual connectivity ("secondary serving cells").
+     * concerns, once a ConnectionEvent has been reported on, follow-up reports about that
+     * ConnectionEvent are only generated if there is any change to the most-recently reported
+     * encryption or integrity, if there is a RAT change, or if the value of
+     * SecurityAlgorithmUpdate#isUnprotectedEmergency changes. A change only in cell ID should not
+     * trigger an update, as the design is intended to be agnostic to dual connectivity ("secondary
+     * serving cells").
      *
-     * Sample scenario to further clarify "most-recently reported":
+     * Example to further clarify "most-recently reported":
+     * 1. After booting up, the UE is in ENDC with LTE. Modem reports NAS_SIGNALLING_LTE and
+     *    AS_SIGNALLING_LTE are well-ciphered but AS_SIGNALLING_5G is null-ciphered.
+     * 2. UE moves to 3G and enters the connected mode. Modem reports indications of PS_SERVICE_3G
+     *    and SIGNALLING_3G to Android.
+     * 3. UE moves to LTE. UE enters the connected mode and there is no ENDC. The algorithms of
+     *    NAS_SIGNALLING_LTE and AS_SIGNALLING_LTE are the same as in Step 1. The UE should send
+     *    this indication to AP as it’s a RAT switch.
+     * 4. Later, UE establishes ENDC. AS_SIGNALLING_5G is null-ciphered. The UE should send this
+     *    indication as well, as it is a RAT switch.
+     * 5. The UE enter IDLE mode, and later connected mode in ENDC. There are no changes to security
+     *    algorithms, so the modem does not need to send any updates.
      *
-     * 1. Modem reports user is connected to a null-ciphered 3G network.
-     * 2. User then moves and connects to a well-ciphered 5G network, and modem reports this.
-     * 3. User returns to original location and reconnects to the null-ciphered 3G network. Modem
-     *    should report this as it's different than the most-recently reported data from step (2).
+     * Most recently reported state is reset when (1) RadioState is transitioned to ON from any
+     * other state (e.g. radio is turned on during device boot, or modem boot), and (2) when
+     * CardState is transitioned to PRESENT from any other state (e.g. when SIM is inserted), or (3)
+     * if there is a change in access network (PLMN) or RAT.
      *
-     * State is reset when (1) RadioState is transitioned to ON from any other state (e.g. radio
-     * is turned on during device boot, or modem boot), and (2) when CardState is transitioned
-     * to PRESENT from any other state (e.g. when SIM is inserted), or (3) if there is a change in
-     * access network (PLMN).
+     * securityAlgorithmUpdate indications must be sent to Android regardless of the screen state.
+     * If the screen is off, the indications must still be sent to Android.
+     *
+     *
+     * 5G TS 38.331 cipheringDisabled and integrityProtection
+     * ======================================================
+     * For most connections, generally what is reported by the network is what ends up being used.
+     * There are two significant cases where this may not be the case. In 5G, per the introduction
+     * of network configuration options cipheringDisabled and integrityProtection (TS 38.331), the
+     * network can have declared certain security algorithms to be used while also requiring a null
+     * algorithm via those parameters.
+     *
+     *
+     * Exceptions for DRBs with null integrity (pre-5G Rel 16)
+     * =======================================================
+     * When reporting the SecurityAlgorithm for a ConnectionType which includes a DRB, there is an
+     * exception where a DRB with null integrity is not to be considered/included in reporting
+     * except for 5G Rel 16 connections and newer. Because DRBs almost always use null integrity in
+     * practice, and thus if included the report would always be null, rendering the report
+     * useless. For anything 5G Rel 16 or newer, accurate reporting for the DRB's integrity is
+     * required.
+     *
+     *
+     * NRDC MCG and SCGs
+     * =================
+     * In the NRDC case, there can be two sets of algorithms, one for the MCG (Master Cell Group)
+     * and one for the SCG (Secondary Cell Group). In this case, always send a combined update that
+     * reflects the weaker of the algorithms, e.g. (weakest) NEA0 < NEA1 < NEA2 < NEA3 (strongest).
+     * This applies to both the ciphering and integrity algorithms.
+     *
+     *
+     * Determining the value of isUnprotectedEmergency
+     * ===============================================
+     * 2G: isUnprotectedEmergency is true if the ciphering algorithm is NULL.
+     * 3G: isUnprotectedEmergency is true if the ciphering and integrity algorithm are NULL.
+     * 4G: isUnprotectedEmergency is true if the ciphering algorithm is NULL.
+     * 5G: isUnprotectedEmergency is true if the ciphering algorithm is NULL.
+     * Notes:
+     *    - On integrity: In 4G, PDCP can be LTE-based or NR-based. Starting from 5G Rel 17, only
+     *      the NR-based PDCP supports DRB integrity. As the PDCP version can change during a DRB's
+     *      operation, it becomes complicated when integrity is used to determine whether an
+     *      emergency call is protected or not, hence its exclusion to simplify implementation.
+     *    - 4G and 5G with multiple DRBs : emergency calls are protected under that RAT only if all
+     *      DRBs are protected (including IMS DRB).
+     *    - 4G and 5G DRB integrity: Since DRB integrity is not enabled in most networks, if both
+     *      ciphering and integrity are taken into account to determine the value of
+     *      isUnprotectedEmergency, the value will mostly be false, hence why it is excluded.
      *
      * @param type Type of radio indication
      * @param securityAlgorithmUpdate SecurityAlgorithmUpdate encapsulates details of security
diff --git a/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
index 21d3ec7..785db0b 100644
--- a/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/LteSignalStrength.aidl
@@ -21,41 +21,43 @@
 @JavaDerive(toString=true)
 parcelable LteSignalStrength {
     /**
-     * Valid values are (0-31, 99) as defined in TS 27.007 8.5; INT_MAX means invalid/unreported.
+     * Valid values are (0-31, 99) as defined in TS 27.007 8.5;
+     * RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int signalStrength;
     /**
      * The current Reference Signal Receive Power in dBm multiplied by -1. Range: 44 to 140 dBm;
-     * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP TS 36.133 9.1.4
+     * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value. Ref: 3GPP TS 36.133 9.1.4
      */
     int rsrp;
     /**
      * The current Reference Signal Receive Quality in dB multiplied by -1. Range: 20 to 3 dB;
-     * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP TS 36.133 9.1.7
+     * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value. Ref: 3GPP TS 36.133 9.1.7
      */
     int rsrq;
     /**
      * The current reference signal signal-to-noise ratio in 0.1 dB units.
      * Range: -200 to +300 (-200 = -20.0 dB, +300 = 30dB).
-     * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP TS 36.101 8.1.1
+     * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value. Ref: 3GPP TS 36.101 8.1.1
      */
     int rssnr;
     /**
      * The current Channel Quality Indicator. Range: 0 to 15.
-     * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP TS 36.101 9.2, 9.3, A.4
+     * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value.
+     * Ref: 3GPP TS 36.101 9.2, 9.3, A.4
      */
     int cqi;
     /**
      * Timing advance in micro seconds for a one way trip from cell to device. Approximate distance
      * is calculated using 300m/us * timingAdvance. Range: 0 to 1282 inclusive.
-     * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value. Reference: 3GPP 36.213 section 4.2.3
+     * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value. Ref: 3GPP 36.213 section 4.2.3
      */
     int timingAdvance;
     /**
      * CSI channel quality indicator (CQI) table index. There are multiple CQI tables.
      * The definition of CQI in each table is different.
      * Reference: 3GPP TS 136.213 section 7.2.3.
-     * Range [1, 6], INT_MAX means invalid/unreported.
+     * Range [1, 6], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int cqiTableIndex;
 }
diff --git a/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
index 65daf36..a0db2d5 100644
--- a/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrSignalStrength.aidl
@@ -16,6 +16,8 @@
 
 package android.hardware.radio.network;
 
+import android.hardware.radio.RadioConst;
+
 /** @hide */
 @VintfStability
 @JavaDerive(toString=true)
@@ -23,44 +25,44 @@
     /**
      * SS reference signal received power, multiplied by -1.
      * Reference: 3GPP TS 38.215.
-     * Range [44, 140], INT_MAX means invalid/unreported.
+     * Range [44, 140], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int ssRsrp;
     /**
      * SS reference signal received quality, multiplied by -1.
      * Reference: 3GPP TS 38.215, 3GPP TS 38.133 section 10.
-     * Range [-20 dB, 43 dB], INT_MAX means invalid/unreported.
+     * Range [-20 dB, 43 dB], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int ssRsrq;
     /**
      * SS signal-to-noise and interference ratio.
      * Reference: 3GPP TS 38.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.
-     * Range [-23, 40], INT_MAX means invalid/unreported.
+     * Range [-23, 40], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int ssSinr;
     /**
      * CSI reference signal received power, multiplied by -1.
      * Reference: 3GPP TS 38.215.
-     * Range [44, 140], INT_MAX means invalid/unreported.
+     * Range [44, 140], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int csiRsrp;
     /**
      * CSI reference signal received quality, multiplied by -1.
      * Reference: 3GPP TS 38.215.
-     * Range [3, 20], INT_MAX means invalid/unreported.
+     * Range [3, 20], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int csiRsrq;
     /**
      * CSI signal-to-noise and interference ratio.
      * Reference: 3GPP TS 138.215 section 5.1.*, 3GPP TS 38.133 section 10.1.16.1.
-     * Range [-23, 40], INT_MAX means invalid/unreported.
+     * Range [-23, 40], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int csiSinr;
     /**
      * CSI channel quality indicator (CQI) table index. There are multiple CQI tables.
      * The definition of CQI in each table is different.
      * Reference: 3GPP TS 138.214 section 5.2.2.1.
-     * Range [1, 3], INT_MAX means invalid/unreported.
+     * Range [1, 3], RadioConst:VALUE_UNAVAILABLE means invalid/unreported.
      */
     int csiCqiTableIndex;
     /**
@@ -69,14 +71,14 @@
      * index is provided for each subband, in ascending order of subband index. If CQI is not
      * available, the CQI report is empty.
      * Reference: 3GPP TS 138.214 section 5.2.2.1.
-     * Range [0, 15], 0xFF means invalid/unreported.
+     * Range [0, 15], RadioConst:VALUE_UNAVAILABLE_BYTE means invalid/unreported.
      */
     byte[] csiCqiReport;
     /**
      * Timing advance in micro seconds for a one way trip from cell to device. Approximate distance
      * is calculated using 300m/us * timingAdvance. Range: 0 to 1282 inclusive.
-     * INT_MAX: 0x7FFFFFFF denotes invalid/unreported value.
+     * RadioConst:VALUE_UNAVAILABLE denotes invalid/unreported value.
      * Reference: 3GPP 36.213 section 4.2.3
      */
-    int timingAdvance = 0x7FFFFFFF;
+    int timingAdvance = RadioConst.VALUE_UNAVAILABLE;
 }
diff --git a/radio/aidl/android/hardware/radio/network/SignalStrength.aidl b/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
index 5fed522..fbe3be2 100644
--- a/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/SignalStrength.aidl
@@ -30,37 +30,37 @@
 parcelable SignalStrength {
     /**
      * If GSM measurements are provided, this structure must contain valid measurements; otherwise
-     * all fields should be set to INT_MAX to mark them as invalid.
+     * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
      */
     GsmSignalStrength gsm;
     /**
      * If CDMA measurements are provided, this structure must contain valid measurements; otherwise
-     * all fields should be set to INT_MAX to mark them as invalid.
+     * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
      */
     CdmaSignalStrength cdma;
     /**
      * If EvDO measurements are provided, this structure must contain valid measurements; otherwise
-     * all fields should be set to INT_MAX to mark them as invalid.
+     * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
      */
     EvdoSignalStrength evdo;
     /**
      * If LTE measurements are provided, this structure must contain valid measurements; otherwise
-     * all fields should be set to INT_MAX to mark them as invalid.
+     * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
      */
     LteSignalStrength lte;
     /**
      * If TD-SCDMA measurements are provided, this structure must contain valid measurements;
-     * otherwise all fields should be set to INT_MAX to mark them as invalid.
+     * otherwise all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
      */
     TdscdmaSignalStrength tdscdma;
     /**
      * If WCDMA measurements are provided, this structure must contain valid measurements; otherwise
-     * all fields should be set to INT_MAX to mark them as invalid.
+     * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
      */
     WcdmaSignalStrength wcdma;
     /**
      * If NR 5G measurements are provided, this structure must contain valid measurements; otherwise
-     * all fields should be set to INT_MAX to mark them as invalid.
+     * all fields should be set to RadioConst:VALUE_UNAVAILABLE to mark them as invalid.
      */
     NrSignalStrength nr;
 }
diff --git a/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
index 4afdd0f..87c6baa 100644
--- a/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/TdscdmaSignalStrength.aidl
@@ -22,17 +22,17 @@
 parcelable TdscdmaSignalStrength {
     /**
      * UTRA carrier RSSI as defined in TS 25.225 5.1.4. Valid values are (0-31, 99) as defined in
-     * TS 27.007 8.5. INT_MAX denotes that the value is invalid/unreported.
+     * TS 27.007 8.5. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
      */
     int signalStrength;
     /**
      * Transport Channel BER as defined in TS 25.225 5.2.5. Valid values are (0-7, 99) as defined in
-     * TS 27.007 8.5. INT_MAX denotes that the value is invalid/unreported.
+     * TS 27.007 8.5. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
      */
     int bitErrorRate;
     /**
      * P-CCPCH RSCP as defined in TS 25.225 5.1.1. Valid values are (0-96, 255) as defined in
-     * TS 27.007 8.69. INT_MAX denotes that the value is invalid/unreported.
+     * TS 27.007 8.69. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
      */
     int rscp;
 }
diff --git a/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl b/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
index ace89ed..8bc7fb8 100644
--- a/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
+++ b/radio/aidl/android/hardware/radio/network/WcdmaSignalStrength.aidl
@@ -21,21 +21,23 @@
 @JavaDerive(toString=true)
 parcelable WcdmaSignalStrength {
     /**
-     * Valid values are (0-31, 99) as defined in TS 27.007 8.5; INT_MAX means unreported.
+     * Valid values are (0-31, 99) as defined in TS 27.007 8.5; RadioConst:VALUE_UNAVAILABLE means
+     * unreported.
      */
     int signalStrength;
     /**
-     * Bit error rate (0-7, 99) as defined in TS 27.007 8.5; INT_MAX means invalid/unreported.
+     * Bit error rate (0-7, 99) as defined in TS 27.007 8.5; RadioConst:VALUE_UNAVAILABLE means
+     * invalid/unreported.
      */
     int bitErrorRate;
     /**
      * CPICH RSCP as defined in TS 25.215 5.1.1. Valid values are (0-96, 255) as defined in
-     * TS 27.007 8.69. INT_MAX denotes that the value is invalid/unreported.
+     * TS 27.007 8.69. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
      */
     int rscp;
     /**
      * Ec/No value as defined in TS 25.215 5.1.5. Valid values are (0-49, 255) as defined in
-     * TS 27.007 8.69. INT_MAX denotes that the value is invalid/unreported.
+     * TS 27.007 8.69. RadioConst:VALUE_UNAVAILABLE denotes that the value is invalid/unreported.
      */
     int ecno;
 }
diff --git a/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl b/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
index 7870a74..1e010b9 100644
--- a/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IRadioSim.aidl
@@ -257,7 +257,7 @@
      * Request APDU exchange on the basic channel. This command reflects TS 27.007
      * "generic SIM access" operation (+CSIM). The modem must ensure proper function of GSM/CDMA,
      * and filter commands appropriately. It must filter channel management and SELECT by DF
-     * name commands. "sessionid" field must be ignored.
+     * name commands. "sessionId" field is always 0 (for aid="") and may be ignored.
      *
      * @param serial Serial number of request.
      * @param message SimApdu to be sent
diff --git a/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl b/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
index 63134c1..8666e03 100644
--- a/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
+++ b/radio/aidl/android/hardware/radio/sim/IRadioSimResponse.aidl
@@ -263,6 +263,8 @@
      *   RadioError:NONE
      *   RadioError:RADIO_NOT_AVAILABLE
      *   RadioError:INTERNAL_ERR
+     *   RadioError:INVALID_ARGUMENTS when given channel is invalid or basic (channel 0)
+     *   RadioError:MISSING_RESOURCE when given channel is not open
      *   RadioError:NO_MEMORY
      *   RadioError:NO_RESOURCES
      *   RadioError:CANCELLED
@@ -325,6 +327,7 @@
      *   RadioError:NONE
      *   RadioError:RADIO_NOT_AVAILABLE
      *   RadioError:INTERNAL_ERR
+     *   RadioError:INVALID_ARGUMENTS
      *   RadioError:NO_MEMORY
      *   RadioError:NO_RESOURCES
      *   RadioError:CANCELLED
diff --git a/radio/aidl/compat/libradiocompat/Android.bp b/radio/aidl/compat/libradiocompat/Android.bp
index 3fbd398..a3a8c20 100644
--- a/radio/aidl/compat/libradiocompat/Android.bp
+++ b/radio/aidl/compat/libradiocompat/Android.bp
@@ -25,16 +25,16 @@
 cc_defaults {
     name: "android.hardware.radio-library.aidl_deps",
     shared_libs: [
-        "android.hardware.radio.config-V3-ndk",
+        "android.hardware.radio.config-V4-ndk",
         "android.hardware.radio.data-V4-ndk",
-        "android.hardware.radio.ims-V2-ndk",
+        "android.hardware.radio.ims-V3-ndk",
         "android.hardware.radio.ims.media-V3-ndk",
-        "android.hardware.radio.messaging-V3-ndk",
-        "android.hardware.radio.modem-V3-ndk",
-        "android.hardware.radio.network-V3-ndk",
+        "android.hardware.radio.messaging-V4-ndk",
+        "android.hardware.radio.modem-V4-ndk",
+        "android.hardware.radio.network-V4-ndk",
         "android.hardware.radio.sap-V1-ndk",
-        "android.hardware.radio.sim-V3-ndk",
-        "android.hardware.radio.voice-V3-ndk",
+        "android.hardware.radio.sim-V4-ndk",
+        "android.hardware.radio.voice-V4-ndk",
     ],
 }
 
diff --git a/radio/aidl/vts/Android.bp b/radio/aidl/vts/Android.bp
index 37e0ba8..6e8ce8b 100644
--- a/radio/aidl/vts/Android.bp
+++ b/radio/aidl/vts/Android.bp
@@ -77,17 +77,17 @@
         "server_configurable_flags",
     ],
     static_libs: [
-        "android.hardware.radio-V3-ndk",
-        "android.hardware.radio.config-V3-ndk",
+        "android.hardware.radio-V4-ndk",
+        "android.hardware.radio.config-V4-ndk",
         "android.hardware.radio.data-V4-ndk",
-        "android.hardware.radio.ims-V2-ndk",
+        "android.hardware.radio.ims-V3-ndk",
         "android.hardware.radio.ims.media-V3-ndk",
-        "android.hardware.radio.messaging-V3-ndk",
-        "android.hardware.radio.modem-V3-ndk",
-        "android.hardware.radio.network-V3-ndk",
+        "android.hardware.radio.messaging-V4-ndk",
+        "android.hardware.radio.modem-V4-ndk",
+        "android.hardware.radio.network-V4-ndk",
         "android.hardware.radio.sap-V1-ndk",
-        "android.hardware.radio.sim-V3-ndk",
-        "android.hardware.radio.voice-V3-ndk",
+        "android.hardware.radio.sim-V4-ndk",
+        "android.hardware.radio.voice-V4-ndk",
         "telephony_flags_c_lib",
     ],
     test_suites: [
diff --git a/renderscript/1.0/vts/functional/Android.bp b/renderscript/1.0/vts/functional/Android.bp
index 4b665b1..64c4aab 100644
--- a/renderscript/1.0/vts/functional/Android.bp
+++ b/renderscript/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_renderscript_nnapi",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/security/keymint/aidl/Android.bp b/security/keymint/aidl/Android.bp
index e346610..a2e58ac 100644
--- a/security/keymint/aidl/Android.bp
+++ b/security/keymint/aidl/Android.bp
@@ -17,7 +17,7 @@
         "android.hardware.security.secureclock-V1",
     ],
     stability: "vintf",
-    frozen: true,
+    frozen: false,
     backend: {
         java: {
             platform_apis: true,
@@ -51,34 +51,42 @@
 
 }
 
+// An aidl_interface_defaults that includes the latest KeyMint AIDL interface.
+// aidl_interface modules that depend on KeyMint directly can include this
+// aidl_interface_defaults to avoid managing dependency versions explicitly.
+aidl_interface_defaults {
+    name: "android.hardware.security.keymint-latest-defaults",
+    imports: ["android.hardware.security.keymint-V4"],
+}
+
 // cc_defaults that includes the latest KeyMint AIDL library.
 // Modules that depend on KeyMint directly can include this cc_defaults to avoid
 // managing dependency versions explicitly.
 cc_defaults {
     name: "keymint_use_latest_hal_aidl_ndk_static",
     static_libs: [
-        "android.hardware.security.keymint-V3-ndk",
+        "android.hardware.security.keymint-V4-ndk",
     ],
 }
 
 cc_defaults {
     name: "keymint_use_latest_hal_aidl_ndk_shared",
     shared_libs: [
-        "android.hardware.security.keymint-V3-ndk",
+        "android.hardware.security.keymint-V4-ndk",
     ],
 }
 
 cc_defaults {
     name: "keymint_use_latest_hal_aidl_cpp_static",
     static_libs: [
-        "android.hardware.security.keymint-V3-cpp",
+        "android.hardware.security.keymint-V4-cpp",
     ],
 }
 
 cc_defaults {
     name: "keymint_use_latest_hal_aidl_cpp_shared",
     shared_libs: [
-        "android.hardware.security.keymint-V3-cpp",
+        "android.hardware.security.keymint-V4-cpp",
     ],
 }
 
@@ -88,6 +96,6 @@
 rust_defaults {
     name: "keymint_use_latest_hal_aidl_rust",
     rustlibs: [
-        "android.hardware.security.keymint-V3-rust",
+        "android.hardware.security.keymint-V4-rust",
     ],
 }
diff --git a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/ErrorCode.aidl b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/ErrorCode.aidl
index b05a0f3..71d3651 100644
--- a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/ErrorCode.aidl
+++ b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/ErrorCode.aidl
@@ -36,90 +36,91 @@
 @Backing(type="int") @VintfStability
 enum ErrorCode {
   OK = 0,
-  ROOT_OF_TRUST_ALREADY_SET = -1,
-  UNSUPPORTED_PURPOSE = -2,
-  INCOMPATIBLE_PURPOSE = -3,
-  UNSUPPORTED_ALGORITHM = -4,
-  INCOMPATIBLE_ALGORITHM = -5,
-  UNSUPPORTED_KEY_SIZE = -6,
-  UNSUPPORTED_BLOCK_MODE = -7,
-  INCOMPATIBLE_BLOCK_MODE = -8,
-  UNSUPPORTED_MAC_LENGTH = -9,
-  UNSUPPORTED_PADDING_MODE = -10,
-  INCOMPATIBLE_PADDING_MODE = -11,
-  UNSUPPORTED_DIGEST = -12,
-  INCOMPATIBLE_DIGEST = -13,
-  INVALID_EXPIRATION_TIME = -14,
-  INVALID_USER_ID = -15,
-  INVALID_AUTHORIZATION_TIMEOUT = -16,
-  UNSUPPORTED_KEY_FORMAT = -17,
-  INCOMPATIBLE_KEY_FORMAT = -18,
-  UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM = -19,
-  UNSUPPORTED_KEY_VERIFICATION_ALGORITHM = -20,
-  INVALID_INPUT_LENGTH = -21,
-  KEY_EXPORT_OPTIONS_INVALID = -22,
-  DELEGATION_NOT_ALLOWED = -23,
-  KEY_NOT_YET_VALID = -24,
-  KEY_EXPIRED = -25,
-  KEY_USER_NOT_AUTHENTICATED = -26,
-  OUTPUT_PARAMETER_NULL = -27,
-  INVALID_OPERATION_HANDLE = -28,
-  INSUFFICIENT_BUFFER_SPACE = -29,
-  VERIFICATION_FAILED = -30,
-  TOO_MANY_OPERATIONS = -31,
-  UNEXPECTED_NULL_POINTER = -32,
-  INVALID_KEY_BLOB = -33,
-  IMPORTED_KEY_NOT_ENCRYPTED = -34,
-  IMPORTED_KEY_DECRYPTION_FAILED = -35,
-  IMPORTED_KEY_NOT_SIGNED = -36,
-  IMPORTED_KEY_VERIFICATION_FAILED = -37,
-  INVALID_ARGUMENT = -38,
-  UNSUPPORTED_TAG = -39,
-  INVALID_TAG = -40,
-  MEMORY_ALLOCATION_FAILED = -41,
-  IMPORT_PARAMETER_MISMATCH = -44,
-  SECURE_HW_ACCESS_DENIED = -45,
-  OPERATION_CANCELLED = -46,
-  CONCURRENT_ACCESS_CONFLICT = -47,
-  SECURE_HW_BUSY = -48,
-  SECURE_HW_COMMUNICATION_FAILED = -49,
-  UNSUPPORTED_EC_FIELD = -50,
-  MISSING_NONCE = -51,
-  INVALID_NONCE = -52,
-  MISSING_MAC_LENGTH = -53,
-  KEY_RATE_LIMIT_EXCEEDED = -54,
-  CALLER_NONCE_PROHIBITED = -55,
-  KEY_MAX_OPS_EXCEEDED = -56,
-  INVALID_MAC_LENGTH = -57,
-  MISSING_MIN_MAC_LENGTH = -58,
-  UNSUPPORTED_MIN_MAC_LENGTH = -59,
-  UNSUPPORTED_KDF = -60,
-  UNSUPPORTED_EC_CURVE = -61,
-  KEY_REQUIRES_UPGRADE = -62,
-  ATTESTATION_CHALLENGE_MISSING = -63,
-  KEYMINT_NOT_CONFIGURED = -64,
-  ATTESTATION_APPLICATION_ID_MISSING = -65,
-  CANNOT_ATTEST_IDS = -66,
-  ROLLBACK_RESISTANCE_UNAVAILABLE = -67,
-  HARDWARE_TYPE_UNAVAILABLE = -68,
-  PROOF_OF_PRESENCE_REQUIRED = -69,
-  CONCURRENT_PROOF_OF_PRESENCE_REQUESTED = -70,
-  NO_USER_CONFIRMATION = -71,
-  DEVICE_LOCKED = -72,
-  EARLY_BOOT_ENDED = -73,
-  ATTESTATION_KEYS_NOT_PROVISIONED = -74,
-  ATTESTATION_IDS_NOT_PROVISIONED = -75,
-  INVALID_OPERATION = -76,
-  STORAGE_KEY_UNSUPPORTED = -77,
-  INCOMPATIBLE_MGF_DIGEST = -78,
-  UNSUPPORTED_MGF_DIGEST = -79,
-  MISSING_NOT_BEFORE = -80,
-  MISSING_NOT_AFTER = -81,
-  MISSING_ISSUER_SUBJECT = -82,
-  INVALID_ISSUER_SUBJECT = -83,
-  BOOT_LEVEL_EXCEEDED = -84,
-  HARDWARE_NOT_YET_AVAILABLE = -85,
-  UNIMPLEMENTED = -100,
-  VERSION_MISMATCH = -101,
-  UNKNOWN_ERROR = -1000,
+  ROOT_OF_TRUST_ALREADY_SET = (-1) /* -1 */,
+  UNSUPPORTED_PURPOSE = (-2) /* -2 */,
+  INCOMPATIBLE_PURPOSE = (-3) /* -3 */,
+  UNSUPPORTED_ALGORITHM = (-4) /* -4 */,
+  INCOMPATIBLE_ALGORITHM = (-5) /* -5 */,
+  UNSUPPORTED_KEY_SIZE = (-6) /* -6 */,
+  UNSUPPORTED_BLOCK_MODE = (-7) /* -7 */,
+  INCOMPATIBLE_BLOCK_MODE = (-8) /* -8 */,
+  UNSUPPORTED_MAC_LENGTH = (-9) /* -9 */,
+  UNSUPPORTED_PADDING_MODE = (-10) /* -10 */,
+  INCOMPATIBLE_PADDING_MODE = (-11) /* -11 */,
+  UNSUPPORTED_DIGEST = (-12) /* -12 */,
+  INCOMPATIBLE_DIGEST = (-13) /* -13 */,
+  INVALID_EXPIRATION_TIME = (-14) /* -14 */,
+  INVALID_USER_ID = (-15) /* -15 */,
+  INVALID_AUTHORIZATION_TIMEOUT = (-16) /* -16 */,
+  UNSUPPORTED_KEY_FORMAT = (-17) /* -17 */,
+  INCOMPATIBLE_KEY_FORMAT = (-18) /* -18 */,
+  UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM = (-19) /* -19 */,
+  UNSUPPORTED_KEY_VERIFICATION_ALGORITHM = (-20) /* -20 */,
+  INVALID_INPUT_LENGTH = (-21) /* -21 */,
+  KEY_EXPORT_OPTIONS_INVALID = (-22) /* -22 */,
+  DELEGATION_NOT_ALLOWED = (-23) /* -23 */,
+  KEY_NOT_YET_VALID = (-24) /* -24 */,
+  KEY_EXPIRED = (-25) /* -25 */,
+  KEY_USER_NOT_AUTHENTICATED = (-26) /* -26 */,
+  OUTPUT_PARAMETER_NULL = (-27) /* -27 */,
+  INVALID_OPERATION_HANDLE = (-28) /* -28 */,
+  INSUFFICIENT_BUFFER_SPACE = (-29) /* -29 */,
+  VERIFICATION_FAILED = (-30) /* -30 */,
+  TOO_MANY_OPERATIONS = (-31) /* -31 */,
+  UNEXPECTED_NULL_POINTER = (-32) /* -32 */,
+  INVALID_KEY_BLOB = (-33) /* -33 */,
+  IMPORTED_KEY_NOT_ENCRYPTED = (-34) /* -34 */,
+  IMPORTED_KEY_DECRYPTION_FAILED = (-35) /* -35 */,
+  IMPORTED_KEY_NOT_SIGNED = (-36) /* -36 */,
+  IMPORTED_KEY_VERIFICATION_FAILED = (-37) /* -37 */,
+  INVALID_ARGUMENT = (-38) /* -38 */,
+  UNSUPPORTED_TAG = (-39) /* -39 */,
+  INVALID_TAG = (-40) /* -40 */,
+  MEMORY_ALLOCATION_FAILED = (-41) /* -41 */,
+  IMPORT_PARAMETER_MISMATCH = (-44) /* -44 */,
+  SECURE_HW_ACCESS_DENIED = (-45) /* -45 */,
+  OPERATION_CANCELLED = (-46) /* -46 */,
+  CONCURRENT_ACCESS_CONFLICT = (-47) /* -47 */,
+  SECURE_HW_BUSY = (-48) /* -48 */,
+  SECURE_HW_COMMUNICATION_FAILED = (-49) /* -49 */,
+  UNSUPPORTED_EC_FIELD = (-50) /* -50 */,
+  MISSING_NONCE = (-51) /* -51 */,
+  INVALID_NONCE = (-52) /* -52 */,
+  MISSING_MAC_LENGTH = (-53) /* -53 */,
+  KEY_RATE_LIMIT_EXCEEDED = (-54) /* -54 */,
+  CALLER_NONCE_PROHIBITED = (-55) /* -55 */,
+  KEY_MAX_OPS_EXCEEDED = (-56) /* -56 */,
+  INVALID_MAC_LENGTH = (-57) /* -57 */,
+  MISSING_MIN_MAC_LENGTH = (-58) /* -58 */,
+  UNSUPPORTED_MIN_MAC_LENGTH = (-59) /* -59 */,
+  UNSUPPORTED_KDF = (-60) /* -60 */,
+  UNSUPPORTED_EC_CURVE = (-61) /* -61 */,
+  KEY_REQUIRES_UPGRADE = (-62) /* -62 */,
+  ATTESTATION_CHALLENGE_MISSING = (-63) /* -63 */,
+  KEYMINT_NOT_CONFIGURED = (-64) /* -64 */,
+  ATTESTATION_APPLICATION_ID_MISSING = (-65) /* -65 */,
+  CANNOT_ATTEST_IDS = (-66) /* -66 */,
+  ROLLBACK_RESISTANCE_UNAVAILABLE = (-67) /* -67 */,
+  HARDWARE_TYPE_UNAVAILABLE = (-68) /* -68 */,
+  PROOF_OF_PRESENCE_REQUIRED = (-69) /* -69 */,
+  CONCURRENT_PROOF_OF_PRESENCE_REQUESTED = (-70) /* -70 */,
+  NO_USER_CONFIRMATION = (-71) /* -71 */,
+  DEVICE_LOCKED = (-72) /* -72 */,
+  EARLY_BOOT_ENDED = (-73) /* -73 */,
+  ATTESTATION_KEYS_NOT_PROVISIONED = (-74) /* -74 */,
+  ATTESTATION_IDS_NOT_PROVISIONED = (-75) /* -75 */,
+  INVALID_OPERATION = (-76) /* -76 */,
+  STORAGE_KEY_UNSUPPORTED = (-77) /* -77 */,
+  INCOMPATIBLE_MGF_DIGEST = (-78) /* -78 */,
+  UNSUPPORTED_MGF_DIGEST = (-79) /* -79 */,
+  MISSING_NOT_BEFORE = (-80) /* -80 */,
+  MISSING_NOT_AFTER = (-81) /* -81 */,
+  MISSING_ISSUER_SUBJECT = (-82) /* -82 */,
+  INVALID_ISSUER_SUBJECT = (-83) /* -83 */,
+  BOOT_LEVEL_EXCEEDED = (-84) /* -84 */,
+  HARDWARE_NOT_YET_AVAILABLE = (-85) /* -85 */,
+  MODULE_HASH_ALREADY_SET = (-86) /* -86 */,
+  UNIMPLEMENTED = (-100) /* -100 */,
+  VERSION_MISMATCH = (-101) /* -101 */,
+  UNKNOWN_ERROR = (-1000) /* -1000 */,
 }
diff --git a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/HardwareAuthenticatorType.aidl b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/HardwareAuthenticatorType.aidl
index dfc98f0..eb4f621 100644
--- a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/HardwareAuthenticatorType.aidl
+++ b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/HardwareAuthenticatorType.aidl
@@ -36,7 +36,7 @@
 @Backing(type="int") @VintfStability
 enum HardwareAuthenticatorType {
   NONE = 0,
-  PASSWORD = 1,
-  FINGERPRINT = 2,
-  ANY = -1,
+  PASSWORD = (1 << 0) /* 1 */,
+  FINGERPRINT = (1 << 1) /* 2 */,
+  ANY = 0xFFFFFFFF,
 }
diff --git a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/IKeyMintDevice.aidl
index dcc22c4..2945dab 100644
--- a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/IKeyMintDevice.aidl
+++ b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/IKeyMintDevice.aidl
@@ -52,5 +52,6 @@
   byte[16] getRootOfTrustChallenge();
   byte[] getRootOfTrust(in byte[16] challenge);
   void sendRootOfTrust(in byte[] rootOfTrust);
+  void setAdditionalAttestationInfo(in android.hardware.security.keymint.KeyParameter[] info);
   const int AUTH_TOKEN_MAC_LENGTH = 32;
 }
diff --git a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/Tag.aidl b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/Tag.aidl
index 6ae2369..79341ee 100644
--- a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/Tag.aidl
+++ b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/Tag.aidl
@@ -36,69 +36,70 @@
 @Backing(type="int") @VintfStability
 enum Tag {
   INVALID = 0,
-  PURPOSE = 536870913,
-  ALGORITHM = 268435458,
-  KEY_SIZE = 805306371,
-  BLOCK_MODE = 536870916,
-  DIGEST = 536870917,
-  PADDING = 536870918,
-  CALLER_NONCE = 1879048199,
-  MIN_MAC_LENGTH = 805306376,
-  EC_CURVE = 268435466,
-  RSA_PUBLIC_EXPONENT = 1342177480,
-  INCLUDE_UNIQUE_ID = 1879048394,
-  RSA_OAEP_MGF_DIGEST = 536871115,
-  BOOTLOADER_ONLY = 1879048494,
-  ROLLBACK_RESISTANCE = 1879048495,
-  HARDWARE_TYPE = 268435760,
-  EARLY_BOOT_ONLY = 1879048497,
-  ACTIVE_DATETIME = 1610613136,
-  ORIGINATION_EXPIRE_DATETIME = 1610613137,
-  USAGE_EXPIRE_DATETIME = 1610613138,
-  MIN_SECONDS_BETWEEN_OPS = 805306771,
-  MAX_USES_PER_BOOT = 805306772,
-  USAGE_COUNT_LIMIT = 805306773,
-  USER_ID = 805306869,
-  USER_SECURE_ID = -1610612234,
-  NO_AUTH_REQUIRED = 1879048695,
-  USER_AUTH_TYPE = 268435960,
-  AUTH_TIMEOUT = 805306873,
-  ALLOW_WHILE_ON_BODY = 1879048698,
-  TRUSTED_USER_PRESENCE_REQUIRED = 1879048699,
-  TRUSTED_CONFIRMATION_REQUIRED = 1879048700,
-  UNLOCKED_DEVICE_REQUIRED = 1879048701,
-  APPLICATION_ID = -1879047591,
-  APPLICATION_DATA = -1879047492,
-  CREATION_DATETIME = 1610613437,
-  ORIGIN = 268436158,
-  ROOT_OF_TRUST = -1879047488,
-  OS_VERSION = 805307073,
-  OS_PATCHLEVEL = 805307074,
-  UNIQUE_ID = -1879047485,
-  ATTESTATION_CHALLENGE = -1879047484,
-  ATTESTATION_APPLICATION_ID = -1879047483,
-  ATTESTATION_ID_BRAND = -1879047482,
-  ATTESTATION_ID_DEVICE = -1879047481,
-  ATTESTATION_ID_PRODUCT = -1879047480,
-  ATTESTATION_ID_SERIAL = -1879047479,
-  ATTESTATION_ID_IMEI = -1879047478,
-  ATTESTATION_ID_MEID = -1879047477,
-  ATTESTATION_ID_MANUFACTURER = -1879047476,
-  ATTESTATION_ID_MODEL = -1879047475,
-  VENDOR_PATCHLEVEL = 805307086,
-  BOOT_PATCHLEVEL = 805307087,
-  DEVICE_UNIQUE_ATTESTATION = 1879048912,
-  IDENTITY_CREDENTIAL_KEY = 1879048913,
-  STORAGE_KEY = 1879048914,
-  ATTESTATION_ID_SECOND_IMEI = -1879047469,
-  ASSOCIATED_DATA = -1879047192,
-  NONCE = -1879047191,
-  MAC_LENGTH = 805307371,
-  RESET_SINCE_ID_ROTATION = 1879049196,
-  CONFIRMATION_TOKEN = -1879047187,
-  CERTIFICATE_SERIAL = -2147482642,
-  CERTIFICATE_SUBJECT = -1879047185,
-  CERTIFICATE_NOT_BEFORE = 1610613744,
-  CERTIFICATE_NOT_AFTER = 1610613745,
-  MAX_BOOT_LEVEL = 805307378,
+  PURPOSE = (android.hardware.security.keymint.TagType.ENUM_REP | 1) /* 536870913 */,
+  ALGORITHM = (android.hardware.security.keymint.TagType.ENUM | 2) /* 268435458 */,
+  KEY_SIZE = (android.hardware.security.keymint.TagType.UINT | 3) /* 805306371 */,
+  BLOCK_MODE = (android.hardware.security.keymint.TagType.ENUM_REP | 4) /* 536870916 */,
+  DIGEST = (android.hardware.security.keymint.TagType.ENUM_REP | 5) /* 536870917 */,
+  PADDING = (android.hardware.security.keymint.TagType.ENUM_REP | 6) /* 536870918 */,
+  CALLER_NONCE = (android.hardware.security.keymint.TagType.BOOL | 7) /* 1879048199 */,
+  MIN_MAC_LENGTH = (android.hardware.security.keymint.TagType.UINT | 8) /* 805306376 */,
+  EC_CURVE = (android.hardware.security.keymint.TagType.ENUM | 10) /* 268435466 */,
+  RSA_PUBLIC_EXPONENT = (android.hardware.security.keymint.TagType.ULONG | 200) /* 1342177480 */,
+  INCLUDE_UNIQUE_ID = (android.hardware.security.keymint.TagType.BOOL | 202) /* 1879048394 */,
+  RSA_OAEP_MGF_DIGEST = (android.hardware.security.keymint.TagType.ENUM_REP | 203) /* 536871115 */,
+  BOOTLOADER_ONLY = (android.hardware.security.keymint.TagType.BOOL | 302) /* 1879048494 */,
+  ROLLBACK_RESISTANCE = (android.hardware.security.keymint.TagType.BOOL | 303) /* 1879048495 */,
+  HARDWARE_TYPE = (android.hardware.security.keymint.TagType.ENUM | 304) /* 268435760 */,
+  EARLY_BOOT_ONLY = (android.hardware.security.keymint.TagType.BOOL | 305) /* 1879048497 */,
+  ACTIVE_DATETIME = (android.hardware.security.keymint.TagType.DATE | 400) /* 1610613136 */,
+  ORIGINATION_EXPIRE_DATETIME = (android.hardware.security.keymint.TagType.DATE | 401) /* 1610613137 */,
+  USAGE_EXPIRE_DATETIME = (android.hardware.security.keymint.TagType.DATE | 402) /* 1610613138 */,
+  MIN_SECONDS_BETWEEN_OPS = (android.hardware.security.keymint.TagType.UINT | 403) /* 805306771 */,
+  MAX_USES_PER_BOOT = (android.hardware.security.keymint.TagType.UINT | 404) /* 805306772 */,
+  USAGE_COUNT_LIMIT = (android.hardware.security.keymint.TagType.UINT | 405) /* 805306773 */,
+  USER_ID = (android.hardware.security.keymint.TagType.UINT | 501) /* 805306869 */,
+  USER_SECURE_ID = (android.hardware.security.keymint.TagType.ULONG_REP | 502) /* -1610612234 */,
+  NO_AUTH_REQUIRED = (android.hardware.security.keymint.TagType.BOOL | 503) /* 1879048695 */,
+  USER_AUTH_TYPE = (android.hardware.security.keymint.TagType.ENUM | 504) /* 268435960 */,
+  AUTH_TIMEOUT = (android.hardware.security.keymint.TagType.UINT | 505) /* 805306873 */,
+  ALLOW_WHILE_ON_BODY = (android.hardware.security.keymint.TagType.BOOL | 506) /* 1879048698 */,
+  TRUSTED_USER_PRESENCE_REQUIRED = (android.hardware.security.keymint.TagType.BOOL | 507) /* 1879048699 */,
+  TRUSTED_CONFIRMATION_REQUIRED = (android.hardware.security.keymint.TagType.BOOL | 508) /* 1879048700 */,
+  UNLOCKED_DEVICE_REQUIRED = (android.hardware.security.keymint.TagType.BOOL | 509) /* 1879048701 */,
+  APPLICATION_ID = (android.hardware.security.keymint.TagType.BYTES | 601) /* -1879047591 */,
+  APPLICATION_DATA = (android.hardware.security.keymint.TagType.BYTES | 700) /* -1879047492 */,
+  CREATION_DATETIME = (android.hardware.security.keymint.TagType.DATE | 701) /* 1610613437 */,
+  ORIGIN = (android.hardware.security.keymint.TagType.ENUM | 702) /* 268436158 */,
+  ROOT_OF_TRUST = (android.hardware.security.keymint.TagType.BYTES | 704) /* -1879047488 */,
+  OS_VERSION = (android.hardware.security.keymint.TagType.UINT | 705) /* 805307073 */,
+  OS_PATCHLEVEL = (android.hardware.security.keymint.TagType.UINT | 706) /* 805307074 */,
+  UNIQUE_ID = (android.hardware.security.keymint.TagType.BYTES | 707) /* -1879047485 */,
+  ATTESTATION_CHALLENGE = (android.hardware.security.keymint.TagType.BYTES | 708) /* -1879047484 */,
+  ATTESTATION_APPLICATION_ID = (android.hardware.security.keymint.TagType.BYTES | 709) /* -1879047483 */,
+  ATTESTATION_ID_BRAND = (android.hardware.security.keymint.TagType.BYTES | 710) /* -1879047482 */,
+  ATTESTATION_ID_DEVICE = (android.hardware.security.keymint.TagType.BYTES | 711) /* -1879047481 */,
+  ATTESTATION_ID_PRODUCT = (android.hardware.security.keymint.TagType.BYTES | 712) /* -1879047480 */,
+  ATTESTATION_ID_SERIAL = (android.hardware.security.keymint.TagType.BYTES | 713) /* -1879047479 */,
+  ATTESTATION_ID_IMEI = (android.hardware.security.keymint.TagType.BYTES | 714) /* -1879047478 */,
+  ATTESTATION_ID_MEID = (android.hardware.security.keymint.TagType.BYTES | 715) /* -1879047477 */,
+  ATTESTATION_ID_MANUFACTURER = (android.hardware.security.keymint.TagType.BYTES | 716) /* -1879047476 */,
+  ATTESTATION_ID_MODEL = (android.hardware.security.keymint.TagType.BYTES | 717) /* -1879047475 */,
+  VENDOR_PATCHLEVEL = (android.hardware.security.keymint.TagType.UINT | 718) /* 805307086 */,
+  BOOT_PATCHLEVEL = (android.hardware.security.keymint.TagType.UINT | 719) /* 805307087 */,
+  DEVICE_UNIQUE_ATTESTATION = (android.hardware.security.keymint.TagType.BOOL | 720) /* 1879048912 */,
+  IDENTITY_CREDENTIAL_KEY = (android.hardware.security.keymint.TagType.BOOL | 721) /* 1879048913 */,
+  STORAGE_KEY = (android.hardware.security.keymint.TagType.BOOL | 722) /* 1879048914 */,
+  ATTESTATION_ID_SECOND_IMEI = (android.hardware.security.keymint.TagType.BYTES | 723) /* -1879047469 */,
+  MODULE_HASH = (android.hardware.security.keymint.TagType.BYTES | 724) /* -1879047468 */,
+  ASSOCIATED_DATA = (android.hardware.security.keymint.TagType.BYTES | 1000) /* -1879047192 */,
+  NONCE = (android.hardware.security.keymint.TagType.BYTES | 1001) /* -1879047191 */,
+  MAC_LENGTH = (android.hardware.security.keymint.TagType.UINT | 1003) /* 805307371 */,
+  RESET_SINCE_ID_ROTATION = (android.hardware.security.keymint.TagType.BOOL | 1004) /* 1879049196 */,
+  CONFIRMATION_TOKEN = (android.hardware.security.keymint.TagType.BYTES | 1005) /* -1879047187 */,
+  CERTIFICATE_SERIAL = (android.hardware.security.keymint.TagType.BIGNUM | 1006) /* -2147482642 */,
+  CERTIFICATE_SUBJECT = (android.hardware.security.keymint.TagType.BYTES | 1007) /* -1879047185 */,
+  CERTIFICATE_NOT_BEFORE = (android.hardware.security.keymint.TagType.DATE | 1008) /* 1610613744 */,
+  CERTIFICATE_NOT_AFTER = (android.hardware.security.keymint.TagType.DATE | 1009) /* 1610613745 */,
+  MAX_BOOT_LEVEL = (android.hardware.security.keymint.TagType.UINT | 1010) /* 805307378 */,
 }
diff --git a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/TagType.aidl b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/TagType.aidl
index a7d1de5..ca19e7e 100644
--- a/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/TagType.aidl
+++ b/security/keymint/aidl/aidl_api/android.hardware.security.keymint/current/android/hardware/security/keymint/TagType.aidl
@@ -35,15 +35,15 @@
 /* @hide */
 @Backing(type="int") @VintfStability
 enum TagType {
-  INVALID = 0,
-  ENUM = 268435456,
-  ENUM_REP = 536870912,
-  UINT = 805306368,
-  UINT_REP = 1073741824,
-  ULONG = 1342177280,
-  DATE = 1610612736,
-  BOOL = 1879048192,
-  BIGNUM = -2147483648,
-  BYTES = -1879048192,
-  ULONG_REP = -1610612736,
+  INVALID = (0 << 28) /* 0 */,
+  ENUM = (1 << 28) /* 268435456 */,
+  ENUM_REP = (2 << 28) /* 536870912 */,
+  UINT = (3 << 28) /* 805306368 */,
+  UINT_REP = (4 << 28) /* 1073741824 */,
+  ULONG = (5 << 28) /* 1342177280 */,
+  DATE = (6 << 28) /* 1610612736 */,
+  BOOL = (7 << 28) /* 1879048192 */,
+  BIGNUM = (8 << 28) /* -2147483648 */,
+  BYTES = (9 << 28) /* -1879048192 */,
+  ULONG_REP = (10 << 28) /* -1610612736 */,
 }
diff --git a/security/keymint/aidl/android/hardware/security/keymint/ErrorCode.aidl b/security/keymint/aidl/android/hardware/security/keymint/ErrorCode.aidl
index 137e6b6..72fa773 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/ErrorCode.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/ErrorCode.aidl
@@ -108,6 +108,7 @@
     INVALID_ISSUER_SUBJECT = -83,
     BOOT_LEVEL_EXCEEDED = -84,
     HARDWARE_NOT_YET_AVAILABLE = -85,
+    MODULE_HASH_ALREADY_SET = -86,
 
     UNIMPLEMENTED = -100,
     VERSION_MISMATCH = -101,
diff --git a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
index 4ebafee..e8eed71 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/IKeyMintDevice.aidl
@@ -959,4 +959,17 @@
      * not implemented.  TEE KeyMint implementations must return ErrorCode::UNIMPLEMENTED.
      */
     void sendRootOfTrust(in byte[] rootOfTrust);
+
+    /**
+     * Called by Android to deliver additional attestation information to the IKeyMintDevice.
+     *
+     * IKeyMintDevice must ignore KeyParameters with tags not included in the following list:
+     *
+     * o Tag::MODULE_HASH: holds a hash that must be included in attestations in the moduleHash
+     *   field of the software enforced authorization list. If Tag::MODULE_HASH is included in more
+     *   than one setAdditionalAttestationInfo call, the implementation should compare the initial
+     *   KeyParamValue with the more recent one. If they differ, the implementation should fail with
+     *   ErrorCode::MODULE_HASH_ALREADY_SET. If they are the same, no action needs to be taken.
+     */
+    void setAdditionalAttestationInfo(in KeyParameter[] info);
 }
diff --git a/security/keymint/aidl/android/hardware/security/keymint/Tag.aidl b/security/keymint/aidl/android/hardware/security/keymint/Tag.aidl
index 996e4e3..e56c193 100644
--- a/security/keymint/aidl/android/hardware/security/keymint/Tag.aidl
+++ b/security/keymint/aidl/android/hardware/security/keymint/Tag.aidl
@@ -901,6 +901,17 @@
     ATTESTATION_ID_SECOND_IMEI = TagType.BYTES | 723,
 
     /**
+     * Tag::MODULE_HASH specifies the SHA-256 hash of the DER-encoded module information (see
+     * KeyCreationResult.aidl for the ASN.1 schema).
+     *
+     * This tag is never provided or returned from KeyMint in the key characteristics. It exists
+     * only to define the tag for use in the attestation record.
+     *
+     * Must never appear in KeyCharacteristics.
+     */
+    MODULE_HASH = TagType.BYTES | 724,
+
+    /**
      * OBSOLETE: Do not use.
      *
      * This tag value is included for historical reasons -- in Keymaster it was used to hold
diff --git a/security/keymint/aidl/default/Android.bp b/security/keymint/aidl/default/Android.bp
index 22a46ed..a7066de 100644
--- a/security/keymint/aidl/default/Android.bp
+++ b/security/keymint/aidl/default/Android.bp
@@ -97,9 +97,6 @@
         "libkmr_hal_nonsecure",
         "libkmr_ta_nonsecure",
     ],
-    required: [
-        "android.hardware.hardware_keystore.xml",
-    ],
     vintf_fragment_modules: [
         "android.hardware.security.keymint-service.xml",
         "android.hardware.security.sharedsecret-service.xml",
diff --git a/security/keymint/aidl/default/android.hardware.hardware_keystore.xml b/security/keymint/aidl/default/android.hardware.hardware_keystore.xml
index 4c75596..1ab2133 100644
--- a/security/keymint/aidl/default/android.hardware.hardware_keystore.xml
+++ b/security/keymint/aidl/default/android.hardware.hardware_keystore.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <permissions>
-  <feature name="android.hardware.hardware_keystore" version="300" />
+  <feature name="android.hardware.hardware_keystore" version="400" />
 </permissions>
diff --git a/security/keymint/aidl/default/android.hardware.security.keymint-service.xml b/security/keymint/aidl/default/android.hardware.security.keymint-service.xml
index 0568ae6..6bdd33e 100644
--- a/security/keymint/aidl/default/android.hardware.security.keymint-service.xml
+++ b/security/keymint/aidl/default/android.hardware.security.keymint-service.xml
@@ -1,7 +1,7 @@
 <manifest version="1.0" type="device">
     <hal format="aidl">
         <name>android.hardware.security.keymint</name>
-        <version>3</version>
+        <version>4</version>
         <fqname>IKeyMintDevice/default</fqname>
     </hal>
     <hal format="aidl">
diff --git a/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp b/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
index c1f6aee..083a9aa 100644
--- a/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
+++ b/security/keymint/aidl/vts/functional/BootloaderStateTest.cpp
@@ -109,7 +109,7 @@
     }
 }
 
-// Check that attested vbmeta digest is correct.
+// Check that the attested VBMeta digest is correct.
 TEST_P(BootloaderStateTest, VbmetaDigest) {
     AvbSlotVerifyData* avbSlotData;
     auto suffix = fs_mgr_get_slot_suffix();
@@ -125,21 +125,29 @@
                                   AVB_HASHTREE_ERROR_MODE_EIO, &avbSlotData);
     ASSERT_TRUE(avb_slot_data_loaded(result)) << "Failed to load avb slot data";
 
-    // Unfortunately, bootloader is not required to report the algorithm used
-    // to calculate the digest. There are only two supported options though,
-    // SHA256 and SHA512. Attested VBMeta digest must match one of these.
-    vector<uint8_t> digest256(AVB_SHA256_DIGEST_SIZE);
-    vector<uint8_t> digest512(AVB_SHA512_DIGEST_SIZE);
-
+    vector<uint8_t> sha256Digest(AVB_SHA256_DIGEST_SIZE);
     avb_slot_verify_data_calculate_vbmeta_digest(avbSlotData, AVB_DIGEST_TYPE_SHA256,
-                                                 digest256.data());
-    avb_slot_verify_data_calculate_vbmeta_digest(avbSlotData, AVB_DIGEST_TYPE_SHA512,
-                                                 digest512.data());
+                                                 sha256Digest.data());
 
-    ASSERT_TRUE((attestedVbmetaDigest_ == digest256) || (attestedVbmetaDigest_ == digest512))
-            << "Attested vbmeta digest (" << bin2hex(attestedVbmetaDigest_)
-            << ") does not match computed digest (sha256: " << bin2hex(digest256)
-            << ", sha512: " << bin2hex(digest512) << ").";
+    if (get_vsr_api_level() >= __ANDROID_API_V__) {
+        ASSERT_TRUE(attestedVbmetaDigest_ == sha256Digest)
+                << "Attested VBMeta digest (" << bin2hex(attestedVbmetaDigest_)
+                << ") does not match the expected SHA-256 digest (" << bin2hex(sha256Digest)
+                << ").";
+    } else {
+        // Prior to VSR-V, there was no MUST requirement for the algorithm used by the bootloader
+        // to calculate the VBMeta digest. However, the only two supported options are SHA-256 and
+        // SHA-512, so we expect the attested VBMeta digest to match one of these.
+        vector<uint8_t> sha512Digest(AVB_SHA512_DIGEST_SIZE);
+        avb_slot_verify_data_calculate_vbmeta_digest(avbSlotData, AVB_DIGEST_TYPE_SHA512,
+                                                     sha512Digest.data());
+
+        ASSERT_TRUE((attestedVbmetaDigest_ == sha256Digest) ||
+                    (attestedVbmetaDigest_ == sha512Digest))
+                << "Attested VBMeta digest (" << bin2hex(attestedVbmetaDigest_)
+                << ") does not match the expected digest (SHA-256: " << bin2hex(sha256Digest)
+                << " or SHA-512: " << bin2hex(sha512Digest) << ").";
+    }
 }
 
 INSTANTIATE_KEYMINT_AIDL_TEST(BootloaderStateTest);
diff --git a/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp b/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp
index 49fd0c9..781b7a6 100644
--- a/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp
+++ b/security/keymint/aidl/vts/performance/KeyMintBenchmark.cpp
@@ -294,6 +294,7 @@
     ErrorCode DeleteKey() {
         Status result = keymint_->deleteKey(key_blob_);
         key_blob_ = vector<uint8_t>();
+        key_transform_ = "";
         return GetReturnErrorCode(result);
     }
 
diff --git a/security/keymint/support/remote_prov_utils.cpp b/security/keymint/support/remote_prov_utils.cpp
index 464d912..6a5b608 100644
--- a/security/keymint/support/remote_prov_utils.cpp
+++ b/security/keymint/support/remote_prov_utils.cpp
@@ -1136,42 +1136,25 @@
                      allowAnyMode);
 }
 
-ErrMsgOr<bool> isCsrWithProperDiceChain(const std::vector<uint8_t>& csr,
+ErrMsgOr<bool> isCsrWithProperDiceChain(const std::vector<uint8_t>& encodedCsr,
                                         const std::string& instanceName) {
-    auto [parsedRequest, _, csrErrMsg] = cppbor::parse(csr);
-    if (!parsedRequest) {
-        return csrErrMsg;
-    }
-    if (!parsedRequest->asArray()) {
-        return "AuthenticatedRequest is not a CBOR array.";
-    }
-    if (parsedRequest->asArray()->size() != 4U) {
-        return "AuthenticatedRequest must contain version, UDS certificates, DICE chain, and "
-               "signed data. However, the parsed AuthenticatedRequest has " +
-               std::to_string(parsedRequest->asArray()->size()) + " entries.";
-    }
-
-    auto version = parsedRequest->asArray()->get(0)->asUint();
-    auto diceCertChain = parsedRequest->asArray()->get(2)->asArray();
-
-    if (!version || version->value() != 1U) {
-        return "AuthenticatedRequest version must be an unsigned integer and must be equal to 1.";
-    }
-    if (!diceCertChain) {
-        return "AuthenticatedRequest DiceCertChain must be an Array.";
-    }
-
-    // DICE chain is [ pubkey, + DiceChainEntry ].
     auto diceChainKind = getDiceChainKind();
     if (!diceChainKind) {
         return diceChainKind.message();
     }
 
-    auto encodedDiceChain = diceCertChain->encode();
-    auto chain = hwtrust::DiceChain::Verify(encodedDiceChain, *diceChainKind,
-                                            /*allowAnyMode=*/false, deviceSuffix(instanceName));
-    if (!chain.ok()) return chain.error().message();
-    return chain->IsProper();
+    auto csr = hwtrust::Csr::validate(encodedCsr, *diceChainKind, false /*allowAnyMode*/,
+                                      deviceSuffix(instanceName));
+    if (!csr.ok()) {
+        return csr.error().message();
+    }
+
+    auto diceChain = csr->getDiceChain();
+    if (!diceChain.ok()) {
+        return diceChain.error().message();
+    }
+
+    return diceChain->IsProper();
 }
 
 }  // namespace aidl::android::hardware::security::keymint::remote_prov
diff --git a/security/keymint/support/remote_prov_utils_test.cpp b/security/keymint/support/remote_prov_utils_test.cpp
index 8ffb149..58f1fc5 100644
--- a/security/keymint/support/remote_prov_utils_test.cpp
+++ b/security/keymint/support/remote_prov_utils_test.cpp
@@ -82,6 +82,76 @@
         0x50, 0x12, 0x82, 0x37, 0xfe, 0xa4, 0x07, 0xc3, 0xd5, 0xc3, 0x78, 0xcc, 0xf9, 0xef, 0xe1,
         0x95, 0x38, 0x9f, 0xb0, 0x79, 0x16, 0x4c, 0x4a, 0x23, 0xc4, 0xdc, 0x35, 0x4e, 0x0f};
 
+inline const std::vector<uint8_t> kCsrWithDegenerateDiceChain{
+        0x85, 0x01, 0xa0, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0x65,
+        0xe0, 0x51, 0x62, 0x45, 0x17, 0xcc, 0xa8, 0x40, 0x41, 0x6d, 0xc0, 0x86, 0x7a, 0x15, 0x6e,
+        0xee, 0x04, 0xae, 0xbd, 0x05, 0x13, 0x36, 0xcb, 0xd2, 0x8d, 0xd8, 0x80, 0x16, 0xc1, 0x69,
+        0x0d, 0x22, 0x58, 0x20, 0xea, 0xa1, 0x37, 0xd5, 0x01, 0xbd, 0xe0, 0x25, 0x6a, 0x3d, 0x4c,
+        0xcd, 0x31, 0xa1, 0x4d, 0xa6, 0x80, 0x82, 0x03, 0x40, 0xe2, 0x88, 0x81, 0x53, 0xc3, 0xb3,
+        0x6d, 0xf7, 0xf4, 0x10, 0xde, 0x96, 0x23, 0x58, 0x20, 0x24, 0x69, 0x44, 0x6e, 0xf5, 0xcc,
+        0x18, 0xfe, 0x63, 0xac, 0x5e, 0x85, 0x9c, 0xfc, 0x9d, 0xfa, 0x90, 0xee, 0x6c, 0xc2, 0x22,
+        0x49, 0x02, 0xc7, 0x93, 0xf4, 0x30, 0xf1, 0x51, 0x11, 0x20, 0x33, 0x84, 0x43, 0xa1, 0x01,
+        0x26, 0xa0, 0x58, 0x97, 0xa5, 0x01, 0x66, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x02, 0x67,
+        0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3a, 0x00, 0x47, 0x44, 0x56, 0x41, 0x01, 0x3a,
+        0x00, 0x47, 0x44, 0x57, 0x58, 0x70, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58,
+        0x20, 0x65, 0xe0, 0x51, 0x62, 0x45, 0x17, 0xcc, 0xa8, 0x40, 0x41, 0x6d, 0xc0, 0x86, 0x7a,
+        0x15, 0x6e, 0xee, 0x04, 0xae, 0xbd, 0x05, 0x13, 0x36, 0xcb, 0xd2, 0x8d, 0xd8, 0x80, 0x16,
+        0xc1, 0x69, 0x0d, 0x22, 0x58, 0x20, 0xea, 0xa1, 0x37, 0xd5, 0x01, 0xbd, 0xe0, 0x25, 0x6a,
+        0x3d, 0x4c, 0xcd, 0x31, 0xa1, 0x4d, 0xa6, 0x80, 0x82, 0x03, 0x40, 0xe2, 0x88, 0x81, 0x53,
+        0xc3, 0xb3, 0x6d, 0xf7, 0xf4, 0x10, 0xde, 0x96, 0x23, 0x58, 0x20, 0x24, 0x69, 0x44, 0x6e,
+        0xf5, 0xcc, 0x18, 0xfe, 0x63, 0xac, 0x5e, 0x85, 0x9c, 0xfc, 0x9d, 0xfa, 0x90, 0xee, 0x6c,
+        0xc2, 0x22, 0x49, 0x02, 0xc7, 0x93, 0xf4, 0x30, 0xf1, 0x51, 0x11, 0x20, 0x33, 0x3a, 0x00,
+        0x47, 0x44, 0x58, 0x41, 0x20, 0x58, 0x40, 0x16, 0xb9, 0x51, 0xdf, 0x31, 0xad, 0xa0, 0x3d,
+        0x98, 0x40, 0x85, 0xdf, 0xd9, 0xbe, 0xf6, 0x79, 0x62, 0x36, 0x8b, 0x60, 0xaa, 0x79, 0x8e,
+        0x52, 0x04, 0xdd, 0xba, 0x39, 0xa2, 0x58, 0x9c, 0x60, 0xd5, 0x96, 0x51, 0x42, 0xe2, 0xa5,
+        0x57, 0x58, 0xb4, 0x89, 0x2c, 0x94, 0xb9, 0xda, 0xe7, 0x93, 0x85, 0xda, 0x64, 0xa0, 0x52,
+        0xfc, 0x6b, 0xb1, 0x0a, 0xa8, 0x13, 0xd9, 0x84, 0xfb, 0x34, 0x77, 0x84, 0x43, 0xa1, 0x01,
+        0x26, 0xa0, 0x59, 0x02, 0x0f, 0x82, 0x58, 0x20, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+        0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16,
+        0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x59, 0x01, 0xe9, 0x84, 0x03,
+        0x67, 0x6b, 0x65, 0x79, 0x6d, 0x69, 0x6e, 0x74, 0xae, 0x65, 0x62, 0x72, 0x61, 0x6e, 0x64,
+        0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x65, 0x66, 0x75, 0x73, 0x65, 0x64, 0x01, 0x65,
+        0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x65, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x66, 0x64, 0x65, 0x76,
+        0x69, 0x63, 0x65, 0x66, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x67, 0x70, 0x72, 0x6f, 0x64,
+        0x75, 0x63, 0x74, 0x65, 0x70, 0x69, 0x78, 0x65, 0x6c, 0x68, 0x76, 0x62, 0x5f, 0x73, 0x74,
+        0x61, 0x74, 0x65, 0x65, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x6a, 0x6f, 0x73, 0x5f, 0x76, 0x65,
+        0x72, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x31, 0x32, 0x6c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61,
+        0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x66, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x6d, 0x76,
+        0x62, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x4f, 0x11, 0x22,
+        0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x6e, 0x73,
+        0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x63, 0x74,
+        0x65, 0x65, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c,
+        0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x62, 0x70, 0x62, 0x6f, 0x6f, 0x74, 0x6c,
+        0x6f, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66, 0x6c, 0x6f, 0x63,
+        0x6b, 0x65, 0x64, 0x72, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x74, 0x63,
+        0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x61, 0x72, 0x76, 0x65,
+        0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x65, 0x76, 0x65,
+        0x6c, 0x1a, 0x01, 0x34, 0x8c, 0x63, 0x82, 0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21,
+        0x58, 0x20, 0x46, 0xbd, 0xfc, 0xed, 0xa6, 0x94, 0x9a, 0xc4, 0x5e, 0x27, 0xcf, 0x24, 0x25,
+        0xc5, 0x0c, 0x7d, 0xed, 0x8f, 0x21, 0xe0, 0x47, 0x81, 0x5a, 0xdc, 0x3b, 0xd4, 0x9e, 0x13,
+        0xb6, 0x06, 0x36, 0x70, 0x22, 0x58, 0x20, 0x0a, 0xbd, 0xbc, 0x0d, 0x19, 0xba, 0xcc, 0xdc,
+        0x00, 0x64, 0x31, 0x4c, 0x84, 0x66, 0x1d, 0xfb, 0x50, 0xd0, 0xe3, 0xf8, 0x78, 0x9d, 0xf9,
+        0x77, 0x2b, 0x40, 0x6b, 0xb5, 0x8e, 0xd3, 0xf8, 0xa9, 0x23, 0x58, 0x21, 0x00, 0x9c, 0x42,
+        0x3f, 0x79, 0x76, 0xa0, 0xd1, 0x98, 0x58, 0xbb, 0x9b, 0x9e, 0xfb, 0x3b, 0x08, 0xf2, 0xe1,
+        0xa3, 0xfe, 0xf4, 0x21, 0x5b, 0x97, 0x2d, 0xcb, 0x9a, 0x55, 0x1a, 0x7f, 0xa7, 0xc1, 0xa8,
+        0xa6, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20, 0xef, 0xd3, 0x88, 0xc4, 0xbc,
+        0xce, 0x51, 0x4d, 0x4b, 0xd3, 0x81, 0x26, 0xc6, 0xcc, 0x66, 0x3b, 0x12, 0x38, 0xbf, 0x23,
+        0x7a, 0x2e, 0x7f, 0x82, 0xa7, 0x81, 0x74, 0x21, 0xc0, 0x12, 0x79, 0xf4, 0x22, 0x58, 0x20,
+        0xdc, 0x85, 0x6c, 0x1c, 0xcc, 0xf9, 0xf3, 0xe8, 0xff, 0x90, 0xfd, 0x89, 0x03, 0xf5, 0xaf,
+        0x75, 0xa0, 0x79, 0xbb, 0x53, 0x9a, 0x1f, 0x2b, 0x34, 0x86, 0x47, 0x3d, 0x66, 0x2a, 0x07,
+        0x3b, 0x1e, 0x23, 0x58, 0x20, 0x34, 0x7b, 0x15, 0xcc, 0xbf, 0x26, 0xc9, 0x28, 0x0e, 0xee,
+        0xc5, 0x47, 0xac, 0x00, 0xc4, 0x4d, 0x81, 0x2b, 0x1e, 0xac, 0x31, 0xd2, 0x6f, 0x36, 0x85,
+        0xe6, 0xa8, 0xf0, 0x46, 0xfc, 0xd2, 0x83, 0x58, 0x40, 0x55, 0x4c, 0x38, 0xdf, 0xfe, 0x49,
+        0xa8, 0xa0, 0xa5, 0x08, 0xce, 0x2f, 0xe5, 0xf6, 0x6e, 0x2b, 0xc2, 0x95, 0x39, 0xc8, 0xca,
+        0x77, 0xd6, 0xf6, 0x67, 0x24, 0x6b, 0x0e, 0x63, 0x5d, 0x11, 0x97, 0x26, 0x52, 0x30, 0xbc,
+        0x28, 0x1d, 0xbf, 0x2a, 0x3e, 0x8c, 0x90, 0x54, 0xaa, 0xaa, 0xd1, 0x7c, 0x53, 0x7b, 0x48,
+        0x1f, 0x51, 0x50, 0x6c, 0x32, 0xe1, 0x0f, 0x57, 0xea, 0x47, 0x76, 0x85, 0x0c, 0xa1, 0x6b,
+        0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x78, 0x3b, 0x62, 0x72,
+        0x61, 0x6e, 0x64, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x31, 0x2f, 0x64,
+        0x65, 0x76, 0x69, 0x63, 0x65, 0x31, 0x3a, 0x31, 0x31, 0x2f, 0x69, 0x64, 0x2f, 0x32, 0x30,
+        0x32, 0x31, 0x30, 0x38, 0x30, 0x35, 0x2e, 0x34, 0x32, 0x3a, 0x75, 0x73, 0x65, 0x72, 0x2f,
+        0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2d, 0x6b, 0x65, 0x79, 0x73};
+
 // The challenge that is in kKeysToSignForCsrWithUdsCerts and kCsrWithUdsCerts
 inline const std::vector<uint8_t> kChallenge{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
                                              0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
@@ -557,6 +627,18 @@
                              DEFAULT_INSTANCE_NAME));
 }
 
+TEST(RemoteProvUtils, validateDiceChainProper) {
+    auto result = isCsrWithProperDiceChain(kCsrWithUdsCerts, DEFAULT_INSTANCE_NAME);
+    ASSERT_TRUE(result) << result.message();
+    ASSERT_TRUE(*result) << "DICE Chain is degenerate";
+}
+
+TEST(RemoteProvUtils, validateDiceChainDegenerate) {
+    auto result = isCsrWithProperDiceChain(kCsrWithDegenerateDiceChain, DEFAULT_INSTANCE_NAME);
+    ASSERT_TRUE(result) << result.message();
+    ASSERT_FALSE(*result) << "DICE Chain is proper";
+}
+
 TEST(RemoteProvUtilsTest, requireUdsCertsWhenPresent) {
     auto [keysToSignPtr, _, errMsg] = cppbor::parse(kKeysToSignForCsrWithUdsCerts);
     ASSERT_TRUE(keysToSignPtr) << "Error: " << errMsg;
diff --git a/security/rkp/OWNERS b/security/rkp/OWNERS
index 8f854b4..fd43089 100644
--- a/security/rkp/OWNERS
+++ b/security/rkp/OWNERS
@@ -2,3 +2,4 @@
 
 jbires@google.com
 sethmo@google.com
+vikramgaur@google.com
diff --git a/tetheroffload/aidl/vts/functional/Android.bp b/tetheroffload/aidl/vts/functional/Android.bp
index 74edab0..a379cf7 100644
--- a/tetheroffload/aidl/vts/functional/Android.bp
+++ b/tetheroffload/aidl/vts/functional/Android.bp
@@ -1,4 +1,5 @@
 package {
+    default_team: "trendy_team_pixel_connectivity_networking",
     default_applicable_licenses: ["Android-Apache-2.0"],
 }
 
diff --git a/tetheroffload/config/1.0/vts/functional/Android.bp b/tetheroffload/config/1.0/vts/functional/Android.bp
index fe03d8f..cbc0bb2 100644
--- a/tetheroffload/config/1.0/vts/functional/Android.bp
+++ b/tetheroffload/config/1.0/vts/functional/Android.bp
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 package {
+    default_team: "trendy_team_pixel_connectivity_networking",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/tetheroffload/control/1.0/vts/functional/Android.bp b/tetheroffload/control/1.0/vts/functional/Android.bp
index dc3b00c..8aa625e 100644
--- a/tetheroffload/control/1.0/vts/functional/Android.bp
+++ b/tetheroffload/control/1.0/vts/functional/Android.bp
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 package {
+    default_team: "trendy_team_pixel_connectivity_networking",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/tetheroffload/control/1.1/vts/functional/Android.bp b/tetheroffload/control/1.1/vts/functional/Android.bp
index 3eea59b..01731dd 100644
--- a/tetheroffload/control/1.1/vts/functional/Android.bp
+++ b/tetheroffload/control/1.1/vts/functional/Android.bp
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 package {
+    default_team: "trendy_team_pixel_connectivity_networking",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/thermal/1.0/vts/functional/Android.bp b/thermal/1.0/vts/functional/Android.bp
index c73008a..d3db67c 100644
--- a/thermal/1.0/vts/functional/Android.bp
+++ b/thermal/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_games",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/thermal/1.1/vts/functional/Android.bp b/thermal/1.1/vts/functional/Android.bp
index 89fef1b..6e4e003 100644
--- a/thermal/1.1/vts/functional/Android.bp
+++ b/thermal/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_games",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/thermal/2.0/vts/functional/Android.bp b/thermal/2.0/vts/functional/Android.bp
index 29dffcb..e959bc8 100644
--- a/thermal/2.0/vts/functional/Android.bp
+++ b/thermal/2.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_games",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/thermal/aidl/vts/Android.bp b/thermal/aidl/vts/Android.bp
index 8235be2..18cb051 100644
--- a/thermal/aidl/vts/Android.bp
+++ b/thermal/aidl/vts/Android.bp
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 package {
+    default_team: "trendy_team_games",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/tv/mediaquality/OWNERS b/tv/mediaquality/OWNERS
new file mode 100644
index 0000000..35ca732
--- /dev/null
+++ b/tv/mediaquality/OWNERS
@@ -0,0 +1,3 @@
+quxiangfang@google.com
+shubang@google.com
+haofanw@google.com
\ No newline at end of file
diff --git a/tv/mediaquality/aidl/Android.bp b/tv/mediaquality/aidl/Android.bp
new file mode 100644
index 0000000..0084248
--- /dev/null
+++ b/tv/mediaquality/aidl/Android.bp
@@ -0,0 +1,38 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_interfaces_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+aidl_interface {
+    name: "android.hardware.tv.mediaquality",
+    vendor_available: true,
+    owner: "haofanw",
+    srcs: [
+        "android/hardware/tv/mediaquality/*.aidl",
+    ],
+    imports: [
+        "android.hardware.graphics.common-V5",
+    ],
+    stability: "vintf",
+    backend: {
+        java: {
+            enabled: true,
+            platform_apis: true,
+        },
+        ndk: {
+            enabled: true,
+            min_sdk_version: "29",
+        },
+        rust: {
+            enabled: true,
+        },
+        cpp: {
+            enabled: false,
+        },
+    },
+    frozen: false,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightCompressAlgorithm.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightCompressAlgorithm.aidl
new file mode 100644
index 0000000..d441370
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightCompressAlgorithm.aidl
@@ -0,0 +1,39 @@
+/*
+ * 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.hardware.tv.mediaquality;
+@VintfStability
+enum AmbientBacklightCompressAlgorithm {
+  NONE = 0,
+  RLE = 1,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightEvent.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightEvent.aidl
new file mode 100644
index 0000000..2fc2cc6
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightEvent.aidl
@@ -0,0 +1,39 @@
+/*
+ * 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.hardware.tv.mediaquality;
+@VintfStability
+union AmbientBacklightEvent {
+  boolean enabled;
+  android.hardware.tv.mediaquality.AmbientBacklightMetadata metadata;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
new file mode 100644
index 0000000..bbdfd62
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
@@ -0,0 +1,40 @@
+/*
+ * 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.hardware.tv.mediaquality;
+@VintfStability
+parcelable AmbientBacklightMetadata {
+  android.hardware.tv.mediaquality.AmbientBacklightSettings settings;
+  android.hardware.tv.mediaquality.AmbientBacklightCompressAlgorithm compressAlgorithm;
+  int[] zonesColors;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
new file mode 100644
index 0000000..ffbae26
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
@@ -0,0 +1,45 @@
+/*
+ * 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.hardware.tv.mediaquality;
+@VintfStability
+parcelable AmbientBacklightSettings {
+  String packageName;
+  android.hardware.tv.mediaquality.AmbientBacklightSource source;
+  int maxFramerate;
+  android.hardware.graphics.common.PixelFormat colorFormat;
+  int hZonesNumber;
+  int vZonesNumber;
+  boolean hasLetterbox;
+  int threshold;
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSource.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSource.aidl
new file mode 100644
index 0000000..22912f4
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/AmbientBacklightSource.aidl
@@ -0,0 +1,40 @@
+/*
+ * 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.hardware.tv.mediaquality;
+@VintfStability
+enum AmbientBacklightSource {
+  NONE = 0,
+  AUDIO = 1,
+  VIDEO = 2,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
new file mode 100644
index 0000000..d2b2bc3
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -0,0 +1,41 @@
+/*
+ * 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.hardware.tv.mediaquality;
+@VintfStability
+interface IMediaQuality {
+  void setCallback(in android.hardware.tv.mediaquality.IMediaQualityCallback callback);
+  void setAmbientBacklightDetector(in android.hardware.tv.mediaquality.AmbientBacklightSettings settings);
+  void setAmbientBacklightDetectionEnabled(in boolean enabled);
+  boolean getAmbientBacklightDetectionEnabled();
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQualityCallback.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQualityCallback.aidl
new file mode 100644
index 0000000..014bf58
--- /dev/null
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQualityCallback.aidl
@@ -0,0 +1,38 @@
+/*
+ * 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.hardware.tv.mediaquality;
+@VintfStability
+interface IMediaQualityCallback {
+  oneway void notifyAmbientBacklightEvent(in android.hardware.tv.mediaquality.AmbientBacklightEvent event);
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightCompressAlgorithm.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightCompressAlgorithm.aidl
new file mode 100644
index 0000000..e1c68b3
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightCompressAlgorithm.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.hardware.tv.mediaquality;
+
+@VintfStability
+enum AmbientBacklightCompressAlgorithm {
+    /**
+     * The compress algorithm is disabled.
+     */
+    NONE = 0,
+    /**
+     * The compress algorithm is enabled for RLE (Run-Length Encoding).
+     */
+    RLE = 1,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightEvent.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightEvent.aidl
new file mode 100644
index 0000000..237e531
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightEvent.aidl
@@ -0,0 +1,32 @@
+/*
+ * 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.hardware.tv.mediaquality;
+
+import android.hardware.tv.mediaquality.AmbientBacklightMetadata;
+
+@VintfStability
+union AmbientBacklightEvent {
+    /**
+     * This field is relevant when the event signifies that ambient backlight is enabled.
+     */
+    boolean enabled;
+
+    /**
+     * This field is relevant when the event includes ambient backlight metadata.
+     */
+    AmbientBacklightMetadata metadata;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
new file mode 100644
index 0000000..49b3a28
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightMetadata.aidl
@@ -0,0 +1,39 @@
+/*
+ * 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.hardware.tv.mediaquality;
+
+import android.hardware.tv.mediaquality.AmbientBacklightCompressAlgorithm;
+import android.hardware.tv.mediaquality.AmbientBacklightSettings;
+
+@VintfStability
+parcelable AmbientBacklightMetadata {
+    /**
+     * The settings which are used to generate the colors.
+     */
+    AmbientBacklightSettings settings;
+
+    /**
+     * The compress algorithm of the ambient backlight colors.
+     */
+    AmbientBacklightCompressAlgorithm compressAlgorithm;
+
+    /**
+     * The colors for the zones. Format of the color will be indicated in the
+     * AmbientBacklightSettings::colorFormat.
+     */
+    int[] zonesColors;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
new file mode 100644
index 0000000..b6a26ee
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.aidl
@@ -0,0 +1,70 @@
+/*
+ * 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.hardware.tv.mediaquality;
+
+import android.hardware.graphics.common.PixelFormat;
+import android.hardware.tv.mediaquality.AmbientBacklightSource;
+
+@VintfStability
+parcelable AmbientBacklightSettings {
+    /**
+     * The package name of the ambient backlight control application.
+     */
+    String packageName;
+
+    /**
+     * The source of the ambient backlight.
+     */
+    AmbientBacklightSource source;
+
+    /**
+     * The maximum framerate for the ambient backlight.
+     */
+    int maxFramerate;
+
+    /**
+     * The color format for the ambient backlight.
+     */
+    PixelFormat colorFormat;
+
+    /**
+     * The number of zones in horizontal direction.
+     */
+    int hZonesNumber;
+
+    /**
+     * The number of zones in vertical direction.
+     */
+    int vZonesNumber;
+
+    /**
+     * When a video has a different aspect ratio than the display people
+     * watching it on, they often get black bars at the top and bottom
+     * (or sometimes the sides). These black bars are called "letterboxing".
+     * It's a way to show the entire video without distortion, but it means
+     * some of the screen space is unused. This configuration determines
+     * whether to ignore the black bar used for padding.
+     */
+    boolean hasLetterbox;
+
+    /**
+     * The color threshold for the ambient backlight. The units of the color deopends on
+     * the colorFormat. For example, RGB888, where the values of R/G/B range from 0 to 255,
+     * and the threshold is a positive number within the same range.
+     */
+    int threshold;
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSource.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSource.aidl
new file mode 100644
index 0000000..8051fb6
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/AmbientBacklightSource.aidl
@@ -0,0 +1,33 @@
+/*
+ * 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.hardware.tv.mediaquality;
+
+@VintfStability
+enum AmbientBacklightSource {
+    /**
+     * The detection is disabled.
+     */
+    NONE = 0,
+    /**
+     * The detection is enabled for audio.
+     */
+    AUDIO = 1,
+    /**
+     * The detection is enabled for video.
+     */
+    VIDEO = 2,
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
new file mode 100644
index 0000000..def9e39
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.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.hardware.tv.mediaquality;
+
+import android.hardware.tv.mediaquality.AmbientBacklightSettings;
+import android.hardware.tv.mediaquality.IMediaQualityCallback;
+
+/**
+ * Interface for the media quality service
+ */
+@VintfStability
+interface IMediaQuality {
+    /**
+     * Sets a callback for events.
+     *
+     * @param callback Callback object to pass events.
+     */
+    void setCallback(in IMediaQualityCallback callback);
+
+    /**
+     * Sets the ambient backlight detector settings.
+     *
+     * @param settings Ambient backlight detector settings.
+     */
+    void setAmbientBacklightDetector(in AmbientBacklightSettings settings);
+
+    /**
+     * Sets the ambient backlight detection enabled or disabled. The ambient backlight is the
+     * projection of light against the wall driven by the current content playing. Enable will
+     * detects the Ambient backlight metadata and ambient control app can control the related
+     * device as configured before.
+     *
+     * @param enabled True to enable the ambient backlight detection, false to disable.
+     */
+    void setAmbientBacklightDetectionEnabled(in boolean enabled);
+
+    /**
+     * Gets the ambient backlight detection enabled status. The ambient backlight is enabled by
+     * calling setAmbientBacklightDetectionEnabled(in boolean enabled). True to enable the
+     * ambient light detection and False to disable the ambient backlight detection.
+     *
+     * @return True if the ambient backlight detection is enabled, false otherwise.
+     */
+    boolean getAmbientBacklightDetectionEnabled();
+}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQualityCallback.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQualityCallback.aidl
new file mode 100644
index 0000000..31ab255
--- /dev/null
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQualityCallback.aidl
@@ -0,0 +1,30 @@
+/*
+ * 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.hardware.tv.mediaquality;
+
+import android.hardware.tv.mediaquality.AmbientBacklightEvent;
+
+@VintfStability
+oneway interface IMediaQualityCallback {
+    /**
+     * Notifies the client that an ambient backlight event has occurred. For possible
+     * event types, check AmbientBacklightEventType.
+     *
+     * @param event Event passed to the client.
+     */
+    void notifyAmbientBacklightEvent(in AmbientBacklightEvent event);
+}
diff --git a/tv/mediaquality/aidl/default/Android.bp b/tv/mediaquality/aidl/default/Android.bp
new file mode 100644
index 0000000..e25b01f
--- /dev/null
+++ b/tv/mediaquality/aidl/default/Android.bp
@@ -0,0 +1,24 @@
+package {
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_interfaces_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+rust_binary {
+    name: "android.hardware.tv.mediaquality-service.example",
+    relative_install_path: "hw",
+    init_rc: ["mediaquality-default.rc"],
+    vintf_fragments: ["mediaquality-default.xml"],
+    vendor: true,
+    rustlibs: [
+        "libandroid_logger",
+        "liblogger",
+        "liblog_rust",
+        "libbinder_rs",
+        "android.hardware.tv.mediaquality-V1-rust",
+    ],
+    srcs: ["main.rs"],
+}
diff --git a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
new file mode 100644
index 0000000..8769804
--- /dev/null
+++ b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
@@ -0,0 +1,114 @@
+/*
+ * 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 module implements the IMediaQuality AIDL interface.
+
+use android_hardware_tv_mediaquality::aidl::android::hardware::tv::mediaquality::{
+    IMediaQuality::IMediaQuality,
+    IMediaQualityCallback::IMediaQualityCallback,
+    AmbientBacklightEvent::AmbientBacklightEvent,
+    AmbientBacklightSettings::AmbientBacklightSettings,
+};
+use binder::Interface;
+use std::sync::{Arc, Mutex};
+use std::thread;
+use binder::Strong;
+
+/// Defined so we can implement the IMediaQuality AIDL interface.
+pub struct MediaQualityService {
+    callback: Arc<Mutex<Option<Strong<dyn IMediaQualityCallback>>>>,
+    ambient_backlight_enabled: Arc<Mutex<bool>>,
+    ambient_backlight_detector_settings: Arc<Mutex<AmbientBacklightSettings>>
+}
+
+impl MediaQualityService {
+
+    /// Create a new instance of the MediaQualityService.
+    pub fn new() -> Self {
+        Self {
+            callback: Arc::new(Mutex::new(None)),
+            ambient_backlight_enabled: Arc::new(Mutex::new(true)),
+            ambient_backlight_detector_settings:
+                    Arc::new(Mutex::new(AmbientBacklightSettings::default())),
+        }
+    }
+}
+
+impl Interface for MediaQualityService {}
+
+impl IMediaQuality for MediaQualityService {
+
+    fn setCallback(
+        &self,
+        callback: &Strong<dyn IMediaQualityCallback>
+    ) -> binder::Result<()> {
+        println!("Received callback: {:?}", callback);
+        let mut cb = self.callback.lock().unwrap();
+        *cb = Some(callback.clone());
+        Ok(())
+    }
+
+    fn setAmbientBacklightDetector(
+        &self,
+        settings: &AmbientBacklightSettings
+    ) -> binder::Result<()> {
+        println!("Received settings: {:?}", settings);
+        let mut ambient_backlight_detector_settings = self.ambient_backlight_detector_settings.lock().unwrap();
+        ambient_backlight_detector_settings.packageName = settings.packageName.clone();
+        ambient_backlight_detector_settings.source = settings.source;
+        ambient_backlight_detector_settings.maxFramerate = settings.maxFramerate;
+        ambient_backlight_detector_settings.colorFormat = settings.colorFormat;
+        ambient_backlight_detector_settings.hZonesNumber = settings.hZonesNumber;
+        ambient_backlight_detector_settings.vZonesNumber = settings.vZonesNumber;
+        ambient_backlight_detector_settings.hasLetterbox = settings.hasLetterbox;
+        ambient_backlight_detector_settings.threshold = settings.threshold;
+        Ok(())
+    }
+
+    fn setAmbientBacklightDetectionEnabled(&self, enabled: bool) -> binder::Result<()> {
+        println!("Received enabled: {}", enabled);
+        let mut ambient_backlight_enabled = self.ambient_backlight_enabled.lock().unwrap();
+        *ambient_backlight_enabled = enabled;
+        if enabled {
+            println!("Enable Ambient Backlight detection");
+            thread::scope(|s| {
+                s.spawn(|| {
+                    let cb = self.callback.lock().unwrap();
+                    if let Some(cb) = &*cb {
+                        let enabled_event = AmbientBacklightEvent::Enabled(true);
+                        cb.notifyAmbientBacklightEvent(&enabled_event).unwrap();
+                    }
+                });
+            });
+        } else {
+            println!("Disable Ambient Backlight detection");
+            thread::scope(|s| {
+                s.spawn(|| {
+                    let cb = self.callback.lock().unwrap();
+                    if let Some(cb) = &*cb {
+                        let disabled_event = AmbientBacklightEvent::Enabled(false);
+                        cb.notifyAmbientBacklightEvent(&disabled_event).unwrap();
+                    }
+                });
+            });
+        }
+        Ok(())
+    }
+
+    fn getAmbientBacklightDetectionEnabled(&self) -> binder::Result<bool> {
+        let ambient_backlight_enabled = self.ambient_backlight_enabled.lock().unwrap();
+        Ok(*ambient_backlight_enabled)
+    }
+}
diff --git a/tv/mediaquality/aidl/default/hal/mod.rs b/tv/mediaquality/aidl/default/hal/mod.rs
new file mode 100644
index 0000000..5b5d4ac
--- /dev/null
+++ b/tv/mediaquality/aidl/default/hal/mod.rs
@@ -0,0 +1,17 @@
+/*
+ * 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.
+ */
+
+pub mod media_quality_hal_impl;
\ No newline at end of file
diff --git a/tv/mediaquality/aidl/default/main.rs b/tv/mediaquality/aidl/default/main.rs
new file mode 100644
index 0000000..f0cccb4
--- /dev/null
+++ b/tv/mediaquality/aidl/default/main.rs
@@ -0,0 +1,45 @@
+/*
+ * 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 implements the MediaQuality Example Service.
+use android_hardware_tv_mediaquality::aidl::android::hardware::tv::mediaquality::IMediaQuality::{BnMediaQuality, IMediaQuality};
+use binder::BinderFeatures;
+
+mod hal;
+use hal::media_quality_hal_impl::MediaQualityService;
+
+const LOG_TAG: &str = "mediaquality_service_example_rust";
+
+use log::LevelFilter;
+
+fn main() {
+
+    android_logger::init_once(
+        android_logger::Config::default()
+            .with_tag(LOG_TAG)
+            .with_max_level(LevelFilter::Info),
+    );
+
+    let media_quality_service = MediaQualityService::new();
+    let media_quality_service_binder = BnMediaQuality::new_binder(media_quality_service, BinderFeatures::default());
+
+    let service_name = format!("{}/default", MediaQualityService::get_descriptor());
+    binder::add_service(&service_name, media_quality_service_binder.as_binder())
+        .expect("Failed to register service");
+
+    log::info!("MediaQualityHal service is running...");
+
+    binder::ProcessState::join_thread_pool();
+}
diff --git a/tv/mediaquality/aidl/default/mediaquality-default.rc b/tv/mediaquality/aidl/default/mediaquality-default.rc
new file mode 100644
index 0000000..5a103a9
--- /dev/null
+++ b/tv/mediaquality/aidl/default/mediaquality-default.rc
@@ -0,0 +1,4 @@
+service vendor.mediaquality-default /vendor/bin/hw/android.hardware.tv.mediaquality-service.example
+    class hal
+    user nobody
+    group nobody
diff --git a/tv/mediaquality/aidl/default/mediaquality-default.xml b/tv/mediaquality/aidl/default/mediaquality-default.xml
new file mode 100644
index 0000000..865f663
--- /dev/null
+++ b/tv/mediaquality/aidl/default/mediaquality-default.xml
@@ -0,0 +1,6 @@
+<manifest version="1.0" type="device">
+    <hal format="aidl">
+        <name>android.hardware.tv.mediaquality</name>
+        <fqname>IMediaQuality/default</fqname>
+    </hal>
+</manifest>
\ No newline at end of file
diff --git a/tv/mediaquality/aidl/vts/functional/Android.bp b/tv/mediaquality/aidl/vts/functional/Android.bp
new file mode 100644
index 0000000..226569e
--- /dev/null
+++ b/tv/mediaquality/aidl/vts/functional/Android.bp
@@ -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 {
+    default_team: "trendy_team_tv_os",
+    // See: http://go/android-license-faq
+    // A large-scale-change added 'default_applicable_licenses' to import
+    // all of the 'license_kinds' from "hardware_interfaces_license"
+    // to get the below license kinds:
+    //   SPDX-license-identifier-Apache-2.0
+    default_applicable_licenses: ["hardware_interfaces_license"],
+}
+
+cc_test {
+    name: "VtsHalMediaQualityTargetTest",
+    defaults: [
+        "VtsHalTargetTestDefaults",
+        "use_libaidlvintf_gtest_helper_static",
+    ],
+    srcs: ["VtsHalMediaQualityTest.cpp"],
+    shared_libs: [
+        "libbinder",
+        "libbinder_ndk",
+    ],
+    static_libs: [
+        "android.hardware.tv.mediaquality-V1-ndk",
+    ],
+    test_suites: [
+        "vts",
+    ],
+}
diff --git a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
new file mode 100644
index 0000000..c11ebcb
--- /dev/null
+++ b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
@@ -0,0 +1,120 @@
+/*
+ * 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 "ambient_backlight_aidl_hal_test"
+
+#include <aidl/Gtest.h>
+#include <aidl/Vintf.h>
+#include <aidl/android/hardware/tv/mediaquality/AmbientBacklightEvent.h>
+#include <aidl/android/hardware/tv/mediaquality/AmbientBacklightSettings.h>
+#include <aidl/android/hardware/tv/mediaquality/BnMediaQualityCallback.h>
+#include <aidl/android/hardware/tv/mediaquality/IMediaQuality.h>
+#include <android/binder_auto_utils.h>
+#include <android/binder_manager.h>
+#include <binder/IServiceManager.h>
+#include <binder/ProcessState.h>
+#include <future>
+
+using aidl::android::hardware::graphics::common::PixelFormat;
+using aidl::android::hardware::tv::mediaquality::AmbientBacklightEvent;
+using aidl::android::hardware::tv::mediaquality::AmbientBacklightSettings;
+using aidl::android::hardware::tv::mediaquality::AmbientBacklightSource;
+using aidl::android::hardware::tv::mediaquality::BnMediaQualityCallback;
+using aidl::android::hardware::tv::mediaquality::IMediaQuality;
+using android::ProcessState;
+using android::String16;
+using ndk::ScopedAStatus;
+using ndk::SpAIBinder;
+
+#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
+#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())
+
+class MediaQualityCallback : public BnMediaQualityCallback {
+  public:
+    explicit MediaQualityCallback(
+            const std::function<void(const AmbientBacklightEvent& event)>& on_hal_event_cb)
+        : on_hal_event_cb_(on_hal_event_cb) {}
+    ScopedAStatus notifyAmbientBacklightEvent(const AmbientBacklightEvent& event) override {
+        on_hal_event_cb_(event);
+        return ScopedAStatus::ok();
+    }
+
+  private:
+    std::function<void(const AmbientBacklightEvent& event)> on_hal_event_cb_;
+};
+
+class MediaQualityAidl : public testing::TestWithParam<std::string> {
+  public:
+    virtual void SetUp() override {
+        mediaquality = IMediaQuality::fromBinder(
+                SpAIBinder(AServiceManager_waitForService(GetParam().c_str())));
+        ASSERT_NE(mediaquality, nullptr);
+    }
+    std::shared_ptr<IMediaQuality> mediaquality;
+};
+
+TEST_P(MediaQualityAidl, TestSetAmbientBacklightDetectionEnabled) {
+    std::promise<void> open_cb_promise;
+    std::future<void> open_cb_future{open_cb_promise.get_future()};
+    std::shared_ptr<MediaQualityCallback> callback =
+            ndk::SharedRefBase::make<MediaQualityCallback>([&open_cb_promise](auto event) {
+                EXPECT_EQ(event.getTag(), AmbientBacklightEvent::Tag::enabled);
+                EXPECT_EQ(event.template get<AmbientBacklightEvent::Tag::enabled>(), true);
+                open_cb_promise.set_value();
+                return ScopedAStatus::ok();
+            });
+    ASSERT_OK(mediaquality->setCallback(callback));
+    ASSERT_OK(mediaquality->setAmbientBacklightDetectionEnabled(true));
+    std::chrono::milliseconds timeout{10000};
+    EXPECT_EQ(open_cb_future.wait_for(timeout), std::future_status::ready);
+}
+
+TEST_P(MediaQualityAidl, TestGetAmbientBacklightDetectionEnabled) {
+    bool enabled;
+    ASSERT_OK(mediaquality->getAmbientBacklightDetectionEnabled(&enabled));
+}
+
+TEST_P(MediaQualityAidl, TestSetMediaQualityCallback) {
+    std::shared_ptr<MediaQualityCallback> callback = ndk::SharedRefBase::make<MediaQualityCallback>(
+            [](auto /* event */) { return ScopedAStatus::ok(); });
+    ASSERT_OK(mediaquality->setCallback(callback));
+}
+
+TEST_P(MediaQualityAidl, TestSetAmbientBacklightDetector) {
+    AmbientBacklightSettings in_settings = {
+            .packageName = "com.android.mediaquality",
+            .source = AmbientBacklightSource::VIDEO,
+            .colorFormat = PixelFormat::RGB_888,
+            .hZonesNumber = 32,
+            .vZonesNumber = 20,
+            .hasLetterbox = true,
+            .threshold = 0,
+    };
+    ASSERT_OK(mediaquality->setAmbientBacklightDetector(in_settings));
+}
+
+GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(MediaQualityAidl);
+
+INSTANTIATE_TEST_SUITE_P(
+        PerInstance, MediaQualityAidl,
+        testing::ValuesIn(android::getAidlHalInstanceNames(IMediaQuality::descriptor)),
+        android::PrintInstanceNameToString);
+
+int main(int argc, char** argv) {
+    ::testing::InitGoogleTest(&argc, argv);
+    ProcessState::self()->setThreadPoolMaxThreadCount(1);
+    ProcessState::self()->startThreadPool();
+    return RUN_ALL_TESTS();
+}
diff --git a/usb/1.0/vts/functional/Android.bp b/usb/1.0/vts/functional/Android.bp
index d976a06..09bbeec 100644
--- a/usb/1.0/vts/functional/Android.bp
+++ b/usb/1.0/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_usb",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/usb/1.1/vts/functional/Android.bp b/usb/1.1/vts/functional/Android.bp
index f514009..48e36f0 100644
--- a/usb/1.1/vts/functional/Android.bp
+++ b/usb/1.1/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_usb",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/usb/1.2/vts/functional/Android.bp b/usb/1.2/vts/functional/Android.bp
index 688e725..62442be 100644
--- a/usb/1.2/vts/functional/Android.bp
+++ b/usb/1.2/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_usb",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/usb/1.3/vts/functional/Android.bp b/usb/1.3/vts/functional/Android.bp
index 6a1ce1e..a345128 100644
--- a/usb/1.3/vts/functional/Android.bp
+++ b/usb/1.3/vts/functional/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_usb",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/usb/OWNERS b/usb/OWNERS
index 3611b4d..647d626 100644
--- a/usb/OWNERS
+++ b/usb/OWNERS
@@ -1,8 +1,8 @@
 # Bug component: 175220
 
-aprasath@google.com
-kumarashishg@google.com
-sarup@google.com
 anothermark@google.com
+febinthattil@google.com
+aprasath@google.com
 albertccwang@google.com
 badhri@google.com
+kumarashishg@google.com
\ No newline at end of file
diff --git a/usb/aidl/vts/Android.bp b/usb/aidl/vts/Android.bp
index cf9299e..d41116a 100644
--- a/usb/aidl/vts/Android.bp
+++ b/usb/aidl/vts/Android.bp
@@ -15,6 +15,7 @@
 //
 
 package {
+    default_team: "trendy_team_android_usb",
     // See: http://go/android-license-faq
     // A large-scale-change added 'default_applicable_licenses' to import
     // all of the 'license_kinds' from "hardware_interfaces_license"
diff --git a/wifi/aidl/default/aidl_callback_util.h b/wifi/aidl/default/aidl_callback_util.h
index f8ba53b..2419db9 100644
--- a/wifi/aidl/default/aidl_callback_util.h
+++ b/wifi/aidl/default/aidl_callback_util.h
@@ -45,6 +45,11 @@
     ~AidlCallbackHandler() { invalidate(); }
 
     bool addCallback(const std::shared_ptr<CallbackType>& cb) {
+        if (cb == nullptr) {
+            LOG(ERROR) << "Unable to register a null callback";
+            return false;
+        }
+
         std::unique_lock<std::mutex> lk(callback_handler_lock_);
         void* cbPtr = reinterpret_cast<void*>(cb->asBinder().get());
         const auto& cbPosition = findCbInSet(cbPtr);
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/NetworkParams.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/NetworkParams.aidl
index 4554223..b6c5cf2 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/NetworkParams.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/NetworkParams.aidl
@@ -40,4 +40,5 @@
   String passphrase;
   boolean isMetered;
   byte[] vendorElements;
+  boolean isClientIsolationEnabled;
 }
diff --git a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/NetworkParams.aidl b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/NetworkParams.aidl
index 47d9e6f..acc2cad 100644
--- a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/NetworkParams.aidl
+++ b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/NetworkParams.aidl
@@ -52,4 +52,8 @@
      * one or more elements). Example: byte[]{ 221, 4, 17, 34, 51, 1 }
      */
     byte[] vendorElements;
+    /**
+     * Whether the network uses client isolation.
+     */
+    boolean isClientIsolationEnabled;
 }
diff --git a/wifi/hostapd/aidl/lint-baseline.xml b/wifi/hostapd/aidl/lint-baseline.xml
index 4329e12..23fe690 100644
--- a/wifi/hostapd/aidl/lint-baseline.xml
+++ b/wifi/hostapd/aidl/lint-baseline.xml
@@ -63,4 +63,22 @@
             file="out/soong/.intermediates/hardware/interfaces/wifi/hostapd/aidl/android.hardware.wifi.hostapd-V3-java-source/gen/android/hardware/wifi/hostapd/IHostapdCallback.java"/>
     </issue>
 
-</issues>
\ No newline at end of file
+    <issue
+        id="NewApi"
+        message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+        errorLine1="      this.markVintfStability();"
+        errorLine2="           ~~~~~~~~~~~~~~~~~~">
+        <location
+            file="out/soong/.intermediates/hardware/interfaces/wifi/hostapd/aidl/android.hardware.wifi.hostapd-V4-java-source/gen/android/hardware/wifi/hostapd/IHostapd.java"/>
+    </issue>
+
+    <issue
+        id="NewApi"
+        message="Call requires API level 31 (current min is 30): `android.os.Binder#markVintfStability`"
+        errorLine1="      this.markVintfStability();"
+        errorLine2="           ~~~~~~~~~~~~~~~~~~">
+        <location
+            file="out/soong/.intermediates/hardware/interfaces/wifi/hostapd/aidl/android.hardware.wifi.hostapd-V4-java-source/gen/android/hardware/wifi/hostapd/IHostapdCallback.java"/>
+    </issue>
+
+</issues>