Merge "Add additional picture parameter" into main
diff --git a/audio/aidl/default/config/audioPolicy/api/current.txt b/audio/aidl/default/config/audioPolicy/api/current.txt
index 7fce8fb..1249a09 100644
--- a/audio/aidl/default/config/audioPolicy/api/current.txt
+++ b/audio/aidl/default/config/audioPolicy/api/current.txt
@@ -223,6 +223,18 @@
     enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_FLAC;
     enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_HE_AAC_V1;
     enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_HE_AAC_V2;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_BASE_AAC;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_BASE_ENHANCED_AAC;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_BASE_ENHANCED_FLAC;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_BASE_ENHANCED_OPUS;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_BASE_ENHANCED_PCM;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_BASE_FLAC;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_BASE_OPUS;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_BASE_PCM;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_SIMPLE_AAC;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_SIMPLE_FLAC;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_SIMPLE_OPUS;
+    enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IAMF_SIMPLE_PCM;
     enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IEC60958;
     enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_IEC61937;
     enum_constant public static final android.audio.policy.configuration.AudioFormat AUDIO_FORMAT_LC3;
diff --git a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
index 1f90313..8adac8c 100644
--- a/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
+++ b/audio/aidl/default/config/audioPolicy/audio_policy_configuration.xsd
@@ -417,6 +417,18 @@
             <xs:enumeration value="AUDIO_FORMAT_APTX_ADAPTIVE_R4"/>
             <xs:enumeration value="AUDIO_FORMAT_DTS_HD_MA"/>
             <xs:enumeration value="AUDIO_FORMAT_DTS_UHD_P2"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_SIMPLE_OPUS"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_SIMPLE_AAC"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_SIMPLE_PCM"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_SIMPLE_FLAC"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_BASE_OPUS"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_BASE_AAC"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_BASE_PCM"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_BASE_FLAC"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_BASE_ENHANCED_OPUS"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_BASE_ENHANCED_AAC"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_BASE_ENHANCED_PCM"/>
+            <xs:enumeration value="AUDIO_FORMAT_IAMF_BASE_ENHANCED_FLAC"/>
         </xs:restriction>
     </xs:simpleType>
     <xs:simpleType name="extendableAudioFormat">
diff --git a/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp b/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp
index d43b595..206ce0c 100644
--- a/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp
+++ b/automotive/audiocontrol/aidl/default/converter/src/CarAudioConfigurationXmlConverter.cpp
@@ -645,11 +645,9 @@
 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)) {
+        // Legacy file had default invocation type as on playback changed
+        entry.type = api::VolumeInvocationType::ON_PLAYBACK_CHANGED;
+    } else if (!parseVolumeActivationType(xsdEntry.getInvocationType(), entry.type)) {
         LOG(ERROR) << __func__ << " Could not parse configuration entry type";
         return false;
     }
diff --git a/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp b/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
index c01c0d6..6781a81 100644
--- a/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
+++ b/automotive/audiocontrol/aidl/vts/VtsHalAudioControlTargetTest.cpp
@@ -149,7 +149,9 @@
         return false;
     }
     if (groupDevices.contains(address)) {
-        message = " Audio device address can not repeat in the same volume group";
+        message =
+                " Audio device address can not repeat in the same volume group or within audio"
+                " zone configuration if not using configurable audio policy engine";
         return false;
     }
     groupDevices.insert(address);
@@ -196,7 +198,8 @@
 
 void validateVolumeGroupInfo(const AudioZoneConfig& audioZoneConfig,
                              const VolumeGroupConfig& volumeGroupConfig,
-                             const AudioDeviceConfiguration& deviceConfig) {
+                             const AudioDeviceConfiguration& deviceConfig,
+                             std::set<std::string>& groupDevices) {
     std::string zoneConfigName = testutils::toAlphaNumeric(ToString(audioZoneConfig.name));
     std::string volumeGroupName = testutils::toAlphaNumeric(ToString(volumeGroupConfig.name));
     std::string volumeGroupInfo =
@@ -209,7 +212,6 @@
         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))
@@ -254,6 +256,7 @@
     std::set<std::string> contextInfoNames;
     EXPECT_FALSE(audioZoneConfig.volumeGroups.empty())
             << "Volume groups for zone config " << zoneConfigName.c_str();
+    std::set<std::string> groupDevices;
     for (const auto& volumeGroup : audioZoneConfig.volumeGroups) {
         ALOGI("Zone config name %s volume group test %s", zoneConfigName.c_str(),
               ToString(volumeGroup.name).c_str());
@@ -264,7 +267,11 @@
                     << "Context " << context << " repeats in zone config " << zoneConfigName;
             contextInfoNames.insert(context);
         }
-        validateVolumeGroupInfo(audioZoneConfig, volumeGroup, deviceConfig);
+        // Configurable audio policy engine can share devices among volume groups
+        if (deviceConfig.routingConfig == CONFIGURABLE_AUDIO_ENGINE_ROUTING) {
+            groupDevices.clear();
+        }
+        validateVolumeGroupInfo(audioZoneConfig, volumeGroup, deviceConfig, groupDevices);
     }
     const auto& audioZoneContexts = carAudioZone.audioZoneContext.audioContextInfos;
     std::map<std::string, AudioZoneContextInfo> infoNameToInfo;
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index 3b16bc9..8a3efa7 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -615,7 +615,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.tv.input</name>
-        <version>1-2</version>
+        <version>1-3</version>
         <interface>
             <name>ITvInput</name>
             <instance>default</instance>
diff --git a/tv/input/aidl/Android.bp b/tv/input/aidl/Android.bp
index afc811a..8d36ab1 100644
--- a/tv/input/aidl/Android.bp
+++ b/tv/input/aidl/Android.bp
@@ -45,5 +45,5 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 }
diff --git a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/ITvInput.aidl b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/ITvInput.aidl
index 84fe2fb..2ff2719 100644
--- a/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/ITvInput.aidl
+++ b/tv/input/aidl/aidl_api/android.hardware.tv.input/current/android/hardware/tv/input/ITvInput.aidl
@@ -40,6 +40,8 @@
   void setCallback(in android.hardware.tv.input.ITvInputCallback callback);
   void setTvMessageEnabled(int deviceId, int streamId, in android.hardware.tv.input.TvMessageEventType type, boolean enabled);
   void getTvMessageQueueDesc(out android.hardware.common.fmq.MQDescriptor<byte,android.hardware.common.fmq.SynchronizedReadWrite> queue, int deviceId, int streamId);
+  void setPictureProfileId(in int deviceId, in int streamId, in long profileId);
+  void setSoundProfileId(in int deviceId, in int streamId, in long profileId);
   const int STATUS_UNKNOWN = 1;
   const int STATUS_NO_RESOURCE = 2;
   const int STATUS_INVALID_ARGUMENTS = 3;
diff --git a/tv/input/aidl/android/hardware/tv/input/ITvInput.aidl b/tv/input/aidl/android/hardware/tv/input/ITvInput.aidl
index c63e0ac..e57edf9 100644
--- a/tv/input/aidl/android/hardware/tv/input/ITvInput.aidl
+++ b/tv/input/aidl/android/hardware/tv/input/ITvInput.aidl
@@ -109,4 +109,28 @@
      */
     void getTvMessageQueueDesc(
             out MQDescriptor<byte, SynchronizedReadWrite> queue, int deviceId, int streamId);
+
+    /**
+     * Set the picture profile ID for a specific stream in a device.
+     *
+     * @param deviceId Device ID for the stream to use the profile.
+     * @param streamId Stream ID for the stream to  use the profile. Must be one of the
+     *         stream IDs returned from getStreamConfigurations().
+     * @param profileId Picture profile ID for the stream. The ID is assigned by the framework,
+     *         and can be set by applications or TV input framework. See
+     *         android.media.quality.PictureQuality for more details.
+     */
+    void setPictureProfileId(in int deviceId, in int streamId, in long profileId);
+
+    /**
+     * Set the sound profile ID for a specific stream in a device.
+     *
+     * @param deviceId Device ID for the stream to use the profile.
+     * @param streamId Stream ID for the stream to  use the profile. Must be one of the
+     *         stream IDs returned from getStreamConfigurations().
+     * @param profileId Sound profile ID for the stream. The ID is assigned by the framework,
+     *         and can be set by applications or TV input framework. See
+     *         android.media.quality.SoundQuality for more details.
+     */
+    void setSoundProfileId(in int deviceId, in int streamId, in long profileId);
 }
diff --git a/wifi/aidl/android/hardware/wifi/PasnConfig.aidl b/wifi/aidl/android/hardware/wifi/PasnConfig.aidl
index 4c6b5bf..37ef03c 100644
--- a/wifi/aidl/android/hardware/wifi/PasnConfig.aidl
+++ b/wifi/aidl/android/hardware/wifi/PasnConfig.aidl
@@ -22,12 +22,13 @@
 @VintfStability
 parcelable PasnConfig {
     /**
-     * Base Authentication and Key Management (AKM) protocol used for PASN as defined in |Akm|.
+     * Base Authentication and Key Management (AKM) protocol used for PASN. Represented as
+     * at bitmap of |Akm|.
      */
     long baseAkm;
     /**
-     * Pairwise cipher suite used for the PTKSA (Pairwise Transient Key Security Association)
-     * as defined in |CipherSuite|
+     * Pairwise cipher suite used for the PTKSA (Pairwise Transient Key Security Association).
+     * Represented as a bitmap of |CipherSuite|.
      */
     long cipherSuite;
     /**
diff --git a/wifi/aidl/android/hardware/wifi/RttResult.aidl b/wifi/aidl/android/hardware/wifi/RttResult.aidl
index 16b823d..361d7e9 100644
--- a/wifi/aidl/android/hardware/wifi/RttResult.aidl
+++ b/wifi/aidl/android/hardware/wifi/RttResult.aidl
@@ -222,12 +222,13 @@
      */
     boolean isSecureLtfEnabled;
     /**
-     * Base Authentication and Key Management (AKM) protocol used for PASN as defined in |Akm|.
+     * Base Authentication and Key Management (AKM) protocol used for PASN. Represented as
+     * at bitmap of |Akm|.
      */
     long baseAkm;
     /**
-     * Pairwise cipher suite used for the PTKSA (Pairwise Transient Key Security Association)
-     * as defined in |CipherSuite|
+     * Pairwise cipher suite used for the PTKSA (Pairwise Transient Key Security Association).
+     * Represented as a bitmap of |CipherSuite|.
      */
     long cipherSuite;
     /**
diff --git a/wifi/hostapd/aidl/Android.bp b/wifi/hostapd/aidl/Android.bp
index e580573..85d71f3 100644
--- a/wifi/hostapd/aidl/Android.bp
+++ b/wifi/hostapd/aidl/Android.bp
@@ -41,7 +41,9 @@
             ],
             min_sdk_version: "30",
             lint: {
-                baseline_filename: "lint-baseline.xml",
+                // Disable linter to avoid error about fixed size arrays.
+                // Interface will only be accessed on devices >= T.
+                enabled: false,
             },
         },
         ndk: {
diff --git a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/ApInfo.aidl b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/ApInfo.aidl
index f8320c6..0af90d2 100644
--- a/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/ApInfo.aidl
+++ b/wifi/hostapd/aidl/aidl_api/android.hardware.wifi.hostapd/current/android/hardware/wifi/hostapd/ApInfo.aidl
@@ -41,5 +41,5 @@
   android.hardware.wifi.hostapd.Generation generation;
   byte[] apIfaceInstanceMacAddress;
   @nullable android.hardware.wifi.common.OuiKeyedData[] vendorData;
-  @nullable byte[] mldMacAddress;
+  @nullable byte[6] mldMacAddress;
 }
diff --git a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/ApInfo.aidl b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/ApInfo.aidl
index 4e1e1c8..8aea70c 100644
--- a/wifi/hostapd/aidl/android/hardware/wifi/hostapd/ApInfo.aidl
+++ b/wifi/hostapd/aidl/android/hardware/wifi/hostapd/ApInfo.aidl
@@ -67,5 +67,5 @@
     /**
      * MAC Address of the multiple link device (MLD) which apIfaceInstance is associated with.
      */
-    @nullable byte[] mldMacAddress;
+    @nullable byte[6] mldMacAddress;
 }