Merge "Rename mDNS offload feature name" into main
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
index 1049d98..60c276b 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
@@ -74,8 +74,8 @@
     const int EIGHT = 0x80;
   }
   parcelable SupportedOctetsPerCodecFrame {
-    int minimum;
-    int maximum;
+    int min;
+    int max;
   }
   parcelable SupportedMaxCodecFramesPerSDU {
     int value;
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ConfigurationFlags.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
index baf0a4e..6b3cf72 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
@@ -38,8 +38,8 @@
   const int NONE = 0x0000;
   const int LOSSLESS = 0x0001;
   const int LOW_LATENCY = 0x0002;
-  const int ALLOW_ASYMMETRIC_CONFIGURATIONS = 0x0003;
-  const int SPATIAL_AUDIO = 0x0004;
-  const int PROVIDE_ASE_METADATA = 0x0005;
-  const int MONO_MIC_CONFIGURATION = 0x0006;
+  const int ALLOW_ASYMMETRIC_CONFIGURATIONS = 0x0004;
+  const int SPATIAL_AUDIO = 0x0008;
+  const int PROVIDE_ASE_METADATA = 0x0010;
+  const int MONO_MIC_CONFIGURATION = 0x0020;
 }
diff --git a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
index 87401ff..3a2dcef 100644
--- a/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
+++ b/bluetooth/audio/aidl/aidl_api/android.hardware.bluetooth.audio/current/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
@@ -43,13 +43,15 @@
   android.hardware.bluetooth.audio.A2dpStatus parseA2dpConfiguration(in android.hardware.bluetooth.audio.CodecId codecId, in byte[] configuration, out android.hardware.bluetooth.audio.CodecParameters codecParameters);
   @nullable android.hardware.bluetooth.audio.A2dpConfiguration getA2dpConfiguration(in List<android.hardware.bluetooth.audio.A2dpRemoteCapabilities> remoteA2dpCapabilities, in android.hardware.bluetooth.audio.A2dpConfigurationHint hint);
   void setCodecPriority(in android.hardware.bluetooth.audio.CodecId codecId, int priority);
-  List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting> getLeAudioAseConfiguration(in @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities> remoteSinkAudioCapabilities, in @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities> remoteSourceAudioCapabilities, in List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement> requirements);
+  android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting[] getLeAudioAseConfiguration(in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities[] remoteSinkAudioCapabilities, in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities[] remoteSourceAudioCapabilities, in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement[] requirements);
   android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationPair getLeAudioAseQosConfiguration(in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationRequirement qosRequirement);
   android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfigurationPair getLeAudioAseDatapathConfiguration(in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.StreamConfig sinkConfig, in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.StreamConfig sourceConfig);
   void onSinkAseMetadataChanged(in android.hardware.bluetooth.audio.IBluetoothAudioProvider.AseState state, int cigId, int cisId, in @nullable android.hardware.bluetooth.audio.MetadataLtv[] metadata);
   void onSourceAseMetadataChanged(in android.hardware.bluetooth.audio.IBluetoothAudioProvider.AseState state, int cigId, int cisId, in @nullable android.hardware.bluetooth.audio.MetadataLtv[] metadata);
-  android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastConfigurationSetting getLeAudioBroadcastConfiguration(in @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities> remoteSinkAudioCapabilities, in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastConfigurationRequirement requirement);
-  android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfiguration getLeAudioBroadcastDatapathConfiguration(in android.hardware.bluetooth.audio.AudioContext context, in android.hardware.bluetooth.audio.LeAudioBroadcastConfiguration.BroadcastStreamMap[] streamMap);
+  android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastConfigurationSetting getLeAudioBroadcastConfiguration(in @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDeviceCapabilities[] remoteSinkAudioCapabilities, in android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastConfigurationRequirement requirement);
+  android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfiguration getLeAudioBroadcastDatapathConfiguration(in android.hardware.bluetooth.audio.AudioContext audioContext, in android.hardware.bluetooth.audio.LeAudioBroadcastConfiguration.BroadcastStreamMap[] streamMap);
+  const int CODEC_PRIORITY_DISABLED = (-1) /* -1 */;
+  const int CODEC_PRIORITY_NONE = 0;
   @VintfStability
   parcelable LeAudioDeviceCapabilities {
     android.hardware.bluetooth.audio.CodecId codecId;
@@ -97,8 +99,8 @@
   parcelable LeAudioAseConfigurationSetting {
     android.hardware.bluetooth.audio.AudioContext audioContext;
     android.hardware.bluetooth.audio.IBluetoothAudioProvider.Packing packing;
-    @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting.AseDirectionConfiguration> sinkAseConfiguration;
-    @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting.AseDirectionConfiguration> sourceAseConfiguration;
+    @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting.AseDirectionConfiguration[] sinkAseConfiguration;
+    @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseConfigurationSetting.AseDirectionConfiguration[] sourceAseConfiguration;
     @nullable android.hardware.bluetooth.audio.ConfigurationFlags flags;
     @VintfStability
     parcelable AseDirectionConfiguration {
@@ -110,8 +112,8 @@
   @VintfStability
   parcelable LeAudioConfigurationRequirement {
     android.hardware.bluetooth.audio.AudioContext audioContext;
-    @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement.AseDirectionRequirement> sinkAseRequirement;
-    @nullable List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement.AseDirectionRequirement> sourceAseRequirement;
+    @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement.AseDirectionRequirement[] sinkAseRequirement;
+    @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioConfigurationRequirement.AseDirectionRequirement[] sourceAseRequirement;
     @nullable android.hardware.bluetooth.audio.ConfigurationFlags flags;
     @VintfStability
     parcelable AseDirectionRequirement {
@@ -120,7 +122,7 @@
   }
   @VintfStability
   parcelable LeAudioAseQosConfigurationRequirement {
-    android.hardware.bluetooth.audio.AudioContext contextType;
+    android.hardware.bluetooth.audio.AudioContext audioContext;
     @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationRequirement.AseQosDirectionRequirement sinkAseQosRequirement;
     @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioAseQosConfigurationRequirement.AseQosDirectionRequirement sourceAseQosRequirement;
     @nullable android.hardware.bluetooth.audio.ConfigurationFlags flags;
@@ -147,7 +149,7 @@
     @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfiguration outputConfig;
   }
   parcelable StreamConfig {
-    android.hardware.bluetooth.audio.AudioContext context;
+    android.hardware.bluetooth.audio.AudioContext audioContext;
     android.hardware.bluetooth.audio.LeAudioConfiguration.StreamMap[] streamMap;
   }
   @Backing(type="byte") @VintfStability
@@ -163,13 +165,13 @@
   }
   @VintfStability
   parcelable LeAudioBroadcastSubgroupConfigurationRequirement {
-    android.hardware.bluetooth.audio.AudioContext context;
+    android.hardware.bluetooth.audio.AudioContext audioContext;
     android.hardware.bluetooth.audio.IBluetoothAudioProvider.BroadcastQuality quality;
     int bisNumPerSubgroup;
   }
   @VintfStability
   parcelable LeAudioBroadcastConfigurationRequirement {
-    List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastSubgroupConfigurationRequirement> subgroupConfigurationRequirements;
+    android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastSubgroupConfigurationRequirement[] subgroupConfigurationRequirements;
   }
   @VintfStability
   parcelable LeAudioSubgroupBisConfiguration {
@@ -178,7 +180,7 @@
   }
   @VintfStability
   parcelable LeAudioBroadcastSubgroupConfiguration {
-    List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioSubgroupBisConfiguration> bisConfigurations;
+    android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioSubgroupBisConfiguration[] bisConfigurations;
     @nullable byte[] vendorCodecConfiguration;
   }
   @VintfStability
@@ -192,6 +194,6 @@
     android.hardware.bluetooth.audio.IBluetoothAudioProvider.Packing packing;
     android.hardware.bluetooth.audio.IBluetoothAudioProvider.Framing framing;
     @nullable android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioDataPathConfiguration dataPathConfiguration;
-    List<android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastSubgroupConfiguration> subgroupsConfigurations;
+    android.hardware.bluetooth.audio.IBluetoothAudioProvider.LeAudioBroadcastSubgroupConfiguration[] subgroupsConfigurations;
   }
 }
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecId.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecId.aidl
index 896a712..2243957 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecId.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecId.aidl
@@ -32,7 +32,7 @@
 
     /**
      * Vendor Codec:
-     * id       16 bits - Assigned by BT Sig
+     * id       16 bits - Vendor identifier, assigned by BT Sig [Assigned Numbers - 7.1]
      * codecId  16 bits - Assigned by the vendor
      */
     parcelable Vendor {
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecInfo.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecInfo.aidl
index 33f0c04..b60d70f 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecInfo.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecInfo.aidl
@@ -26,9 +26,12 @@
 @VintfStability
 parcelable CodecInfo {
     /**
-     * Codec identifier and human readable name
+     * Codec identifier
      */
     CodecId id;
+    /**
+     * Human readable name used to present codec to the user and for debug logs
+     */
     String name;
 
     /**
@@ -92,17 +95,18 @@
      */
     parcelable LeAudio {
         /**
-         * Channel configuration: Mono, Dual-Mono or Stereo
+         * List of independently supported channel modes: Mono, Dual-Mono, or
+         * Stereo.
          */
         ChannelMode[] channelMode;
 
         /**
-         * Supported sampling frequencies, in Hz.
+         * List of supported sampling frequencies, in Hz.
          */
         int[] samplingFrequencyHz;
 
-        /*
-         * FrameDuration in microseconds.
+        /**
+         * List of supported FrameDurations in microseconds.
          */
         int[] frameDurationUs;
 
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
index ceb90ba..fa302e3 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/CodecSpecificCapabilitiesLtv.aidl
@@ -23,6 +23,9 @@
  */
 @VintfStability
 union CodecSpecificCapabilitiesLtv {
+    /**
+     * Supported sampling frequencies in Hertz
+     */
     parcelable SupportedSamplingFrequencies {
         const int HZ8000 = 0x0001;
         const int HZ11025 = 0x0002;
@@ -41,10 +44,13 @@
         /* 16 bits wide bit mask */
         int bitmask;
     }
+    /**
+     * Supported frame durations in microseconds
+     */
     parcelable SupportedFrameDurations {
         const int US7500 = 0x01;
         const int US10000 = 0x02;
-        // Bits 2-3 are RFU
+        /* Bits 2-3 are RFU */
         const int US7500PREFERRED = 0x10;
         const int US10000PREFERRED = 0x20;
 
@@ -65,8 +71,8 @@
         int bitmask;
     }
     parcelable SupportedOctetsPerCodecFrame {
-        int minimum;
-        int maximum;
+        int min;
+        int max;
     }
     parcelable SupportedMaxCodecFramesPerSDU {
         int value;
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ConfigurationFlags.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
index 57c8be5..a12af49 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/ConfigurationFlags.aidl
@@ -22,33 +22,33 @@
 @VintfStability
 parcelable ConfigurationFlags {
     const int NONE = 0x0000;
-    /*
+    /**
      * Set for the lossless configurations
      */
     const int LOSSLESS = 0x0001;
-    /*
+    /**
      * Set for the low latency configurations
      */
     const int LOW_LATENCY = 0x0002;
-    /*
+    /**
      * When set, asymmetric configuration for SINK and SOURCE can be used.
      * e.g. in GAMING mode stream for 32kHz and back channel for 16 kHz
      */
-    const int ALLOW_ASYMMETRIC_CONFIGURATIONS = 0x0003;
-    /*
+    const int ALLOW_ASYMMETRIC_CONFIGURATIONS = 0x0004;
+    /**
      * Set for the spatial audio configurations
      */
-    const int SPATIAL_AUDIO = 0x0004;
-    /*
+    const int SPATIAL_AUDIO = 0x0008;
+    /**
      * When set, BluetoothAudioProvider requests to receive ASE metadata.
      * In such case onSinkAseMetadataChanged() and onSourceAseMetadataChanged
      * will be called.
      */
-    const int PROVIDE_ASE_METADATA = 0x0005;
-    /*
+    const int PROVIDE_ASE_METADATA = 0x0010;
+    /**
      * Set for mono microphone configurations
      */
-    const int MONO_MIC_CONFIGURATION = 0x0006;
+    const int MONO_MIC_CONFIGURATION = 0x0020;
 
     int bitmask;
 }
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
index 8c6fe69..1424431 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/IBluetoothAudioProvider.aidl
@@ -136,14 +136,31 @@
             in List<A2dpRemoteCapabilities> remoteA2dpCapabilities, in A2dpConfigurationHint hint);
 
     /**
+     * Predefined values for the codec priority, used by `setCodecPriority()`.
+     * Besides these special values, the codec priority can be set to 1 for
+     * the highest possible priority, or to any other 4 bytes wide integer N,
+     * where N has the higher priority than N + 1.
+     */
+    const int CODEC_PRIORITY_DISABLED = -1;
+    const int CODEC_PRIORITY_NONE = 0;
+
+    /**
      * Set specific codec priority
      *
      *  It should be assumed that the external module will start with all its
-     *  integrated codecs priority 0 by default.
+     *  integrated codecs priority set to `CODEC_PRIORITY_NONE` by default.
+     *
+     * Note: If the BT stack sets a particular codec priority to
+     *       CODEC_PRIORITY_DISABLED, the configuration provider shal not return
+     *       a particular codec when asked for the configuration. Other priority
+     *       levels and the prioritization mechanism details are not specified
+     *       and the vendor can implement them as desired.
      *
      * @param codecId:  codecId
-     * @param priority: 0 for no priority, -1 for codec disabled,
-     *                  from 1 to N, where 1 is highest.
+     * @param priority: `CODEC_PRIORITY_NONE` for no priority,
+     *        `CODEC_PRIORITY_DISABLED` for the disabled codec, or priority
+     *        level from 1 to N, where the priority of N + 1 is lower than N,
+     *        and N equal to 1 is the highest possible codec priority.
      */
     void setCodecPriority(in CodecId codecId, int priority);
 
@@ -240,7 +257,8 @@
         IsoDataPathConfiguration isoDataPathConfiguration;
     }
 
-    /* All the LeAudioAseQosConfiguration parameters are defined by the
+    /**
+     * All the LeAudioAseQosConfiguration parameters are defined by the
      * Bluetooth Audio Stream Control Service specification v.1.0, Sec. 5: "ASE
      * Control Operations".
      */
@@ -330,11 +348,11 @@
         /**
          * Sink ASEs configuration
          */
-        @nullable List<AseDirectionConfiguration> sinkAseConfiguration;
+        @nullable AseDirectionConfiguration[] sinkAseConfiguration;
         /**
          * Source ASEs configuration
          */
-        @nullable List<AseDirectionConfiguration> sourceAseConfiguration;
+        @nullable AseDirectionConfiguration[] sourceAseConfiguration;
         /**
          * Additional flags, used for configurations with special features
          */
@@ -371,11 +389,11 @@
         /**
          * Sink ASEs configuration setting
          */
-        @nullable List<AseDirectionRequirement> sinkAseRequirement;
+        @nullable AseDirectionRequirement[] sinkAseRequirement;
         /**
          * Source ASEs configuration setting
          */
-        @nullable List<AseDirectionRequirement> sourceAseRequirement;
+        @nullable AseDirectionRequirement[] sourceAseRequirement;
         /**
          * Additional flags, used to request configurations with special
          * features
@@ -395,25 +413,57 @@
      *       BluetoothStack expects to get configuration list for SINK and SOURCE
      *       on either _ENCODING or _DECODING session.
      *
-     * @param remoteSinkAudioCapabilities List of remote sink capabilities
+     * Note: When the requirements are not met, either for one or both
+     *       directions, the corresponding returned AseDirectionConfiguration
+     *       can be set to null. Otherwise it shall contain an ASE configuration
+     *       array with the number of configurations equal to the number of ASEs
+     *       which should be configured by the BT stack for this particular
+     *       direction.
+     *       The provider shall match all the requirements set by the Bluetooth
+     *       stack or return a null configuration for the direction when these
+     *       requirements are not met. In response, the BT Stack may decide to
+     *       reduce the requirements to the minimum, which is the `audioContext`
+     *       and the `LeAudioAseConfiguration.codecConfiguration` with the
+     *       mandatory `CodecSpecificConfigurationLtv.SamplingFrequency` and
+     *       `CodecSpecificConfigurationLtv.AudioChannelAllocation` fields set.
+     *       When these minimum requirements are not met as well, the Bt stack
+     *       may set either `sinkAseRequirement` or `sourceAseRequirement`, or
+     *       both to null. In such case the provider has the freedom of
+     *       providing a configuration for the null-ed direction requirements or
+     *       not for the particular audio context. However returning neither of
+     *       the direction configurations (both nulled) is considered as an
+     *       invalid behavior.
+     *       If the returned configurations are not complete (either
+     *       `qosConfiguration` or `dataPathConfiguration` are null), the BT
+     *       stack will ask for these dynamically during the stream
+     *       establishment, using the corresponding
+     *       `getLeAudioAseQosConfiguration()` and
+     *       `getLeAudioAseDatapathConfiguration()` API calls. This behavior
+     *       is not desired as it slows down the stream establishment, and
+     *       should be implemented only if really needed (e.g. when the provider
+     *       needs to monitor the remote device ASE states, using the
+     *       `onSinkAseMetadataChanged()` and `onSourceAseMetadataChanged()`
+     *       callbacks to derive the valid QoS and/or data path configuration).
+     *
+     * @param remoteSinkAudioCapabilities Array of remote sink capabilities
      *        supported by an active group devices.
-     * @param remoteSourceAudioCapabilities List of remote source capabilities
+     * @param remoteSourceAudioCapabilities Array of remote source capabilities
      *        supported by an active group devices.
      * @param requirements ASE configuration requirements
      *
-     * @return List<LeAudioAseConfigurationSetting>
+     * @return LeAudioAseConfigurationSetting[]
      */
-    List<LeAudioAseConfigurationSetting> getLeAudioAseConfiguration(
-            in @nullable List<LeAudioDeviceCapabilities> remoteSinkAudioCapabilities,
-            in @nullable List<LeAudioDeviceCapabilities> remoteSourceAudioCapabilities,
-            in List<LeAudioConfigurationRequirement> requirements);
+    LeAudioAseConfigurationSetting[] getLeAudioAseConfiguration(
+            in @nullable LeAudioDeviceCapabilities[] remoteSinkAudioCapabilities,
+            in @nullable LeAudioDeviceCapabilities[] remoteSourceAudioCapabilities,
+            in LeAudioConfigurationRequirement[] requirements);
 
     @VintfStability
     parcelable LeAudioAseQosConfigurationRequirement {
         /**
          * Audio Contect Type that this requirements apply to
          */
-        AudioContext contextType;
+        AudioContext audioContext;
 
         /**
          * QoS preferences received in Codec Configured ASE state. As defined in
@@ -501,6 +551,18 @@
      * parameters are not within the boundaries received from the remote device
      * after configuring the ASEs.
      *
+     * Note: When the requirements are not met, either for one or both
+     *       directions, the corresponding configurations in the returned
+     *       LeAudioAseQosConfigurationPair can be set to null. The minimum
+     *       requirement can have only the `audioContext` field set and just a
+     *       single (either sink or source) AseQosDirectionRequirement, where
+     *       only the preferred parameter fields are not specified. The
+     *       configuration provider should always be able to satisfy such
+     *       requirement for all the audio contexts specified by Bluetooth SIG.
+     *       The Bluetooth stack can reduce the requirements to the minimum,
+     *       when more precisely specified requirements are not met by the
+     *       configuration provider.
+     *
      * @param qosRequirement ASE QoS configurations requirements
      *
      * @return LeAudioAseQosConfigurationPair
@@ -527,7 +589,7 @@
          * This can serve as a hint for selecting the proper configuration by
          * the offloader.
          */
-        AudioContext context;
+        AudioContext audioContext;
         /**
          * Stream configuration, including connection handles and audio channel
          * allocations.
@@ -545,13 +607,25 @@
      * @param sinkConfig - remote sink device stream configuration
      * @param sourceConfig - remote source device stream configuration
      *
+     * Note: The provider shall provide a data path configuration for each
+     *       of the non-null configurations passed to this function if these
+     *       configurations are supported by the configuration provider.
+     *       The Bluetooth stack can set either only sink or source
+     *       configuration if it expects just a single direction data path
+     *       configuration. Not providing a valid data path configuration for
+     *       the stream configured with the codec parameters provided by the
+     *       configuration provider will be considered an invalid behavior.
+     *       The BT stack can pass asymmetric sink and source configurations
+     *       if `ALLOW_ASYMMETRIC_CONFIGURATIONS` flag was set by the provider
+     *       in the `CodecInfo` information for the particular codec.
+     *
      * @return LeAudioDataPathConfigurationPair
      */
     LeAudioDataPathConfigurationPair getLeAudioAseDatapathConfiguration(
             in @nullable StreamConfig sinkConfig,
             in @nullable StreamConfig sourceConfig);
 
-    /*
+    /**
      * Audio Stream Endpoint state used to report Metadata changes on the remote
      * device audio endpoints.
      */
@@ -564,14 +638,32 @@
     }
 
     /**
-     * Used to report metadata changes to the provider. This allows for a
-     * pseudo communication channel between the remote device and the provider,
-     * using the vendor specific metadata of the changing ASE state.
-     * It is used only when ASE is using configurations marked with the
-     * `PROVIDE_ASE_METADATA` flag.
+     * Used to report sink endpoint metadata changes to the provider. This
+     * allows for a pseudo communication channel between the remote device and
+     * the provider, using the vendor specific metadata of the changing ASE
+     * state. It is used only when Audio Stream Endpoint (ASE) is using
+     * configurations marked with the `PROVIDE_ASE_METADATA` flag.
+     *
+     * @param state - current Audio Stream Endpoint state of the remote device
+     * @param cigId - Coordinate Isochronous Group identifier
+     * @param cisId - Coordinate Isochronous Stream identifier
+     * @param metadata - remote sink device metadata for the given ASE
      */
     void onSinkAseMetadataChanged(
             in AseState state, int cigId, int cisId, in @nullable MetadataLtv[] metadata);
+
+    /**
+     * Used to report source endpoint metadata changes to the provider. This
+     * allows for a pseudo communication channel between the remote device and
+     * the provider, using the vendor specific metadata of the changing ASE
+     * state. It is used only when Audio Stream Endpoint (ASE) is using
+     * configurations marked with the `PROVIDE_ASE_METADATA` flag.
+     *
+     * @param state - current Audio Stream Endpoint state of the remote device
+     * @param cigId - Coordinate Isochronous Group identifier
+     * @param cisId - Coordinate Isochronous Stream identifier
+     * @param metadata - remote source device metadata for the given ASE
+     */
     void onSourceAseMetadataChanged(
             in AseState state, int cigId, int cisId, in @nullable MetadataLtv[] metadata);
 
@@ -595,7 +687,7 @@
          * This can serve as a hint for selecting the proper configuration by
          * the offloader.
          */
-        AudioContext context;
+        AudioContext audioContext;
         /**
          * Streaming Broadcast Audio Quality
          */
@@ -614,7 +706,7 @@
      */
     @VintfStability
     parcelable LeAudioBroadcastConfigurationRequirement {
-        List<LeAudioBroadcastSubgroupConfigurationRequirement> subgroupConfigurationRequirements;
+        LeAudioBroadcastSubgroupConfigurationRequirement[] subgroupConfigurationRequirements;
     }
 
     /**
@@ -635,11 +727,10 @@
 
     /**
      * Subgroup configuration with a list of BIS configurations
-     *
      */
     @VintfStability
     parcelable LeAudioBroadcastSubgroupConfiguration {
-        List<LeAudioSubgroupBisConfiguration> bisConfigurations;
+        LeAudioSubgroupBisConfiguration[] bisConfigurations;
 
         /**
          * Vendor specific codec configuration for all the BISes inside this
@@ -659,7 +750,6 @@
      * LeAudioBroadcastConfigurationSetting is a result of
      * getLeAudioBroadcastConfiguration. It is used in HCI_LE_Create_BIG command
      * and for creating the Broadcast Announcements.
-     *
      */
     @VintfStability
     parcelable LeAudioBroadcastConfigurationSetting {
@@ -705,18 +795,23 @@
         @nullable LeAudioDataPathConfiguration dataPathConfiguration;
 
         /**
-         * A list of subgroup configurations in the broadcast.
+         * An array of subgroup configurations in the broadcast.
          */
-        List<LeAudioBroadcastSubgroupConfiguration> subgroupsConfigurations;
+        LeAudioBroadcastSubgroupConfiguration[] subgroupsConfigurations;
     }
 
     /**
      * Get Broadcast configuration. Output of this function will be used
      * in HCI_LE_Create_BIG  (0x0068) command and also to create BIG INFO
      *
+     * @param remoteSinkAudioCapabilities - remote device sink endpoint
+     *        capabilities
+     * @param requirement - requested configuration requirements
+     *
+     * @return the whole broadcast audio stream configuration
      */
     LeAudioBroadcastConfigurationSetting getLeAudioBroadcastConfiguration(
-            in @nullable List<LeAudioDeviceCapabilities> remoteSinkAudioCapabilities,
+            in @nullable LeAudioDeviceCapabilities[] remoteSinkAudioCapabilities,
             in LeAudioBroadcastConfigurationRequirement requirement);
 
     /**
@@ -725,7 +820,12 @@
      * not provided in LeAudioBroadcastConfigurationSetting. Calling this during
      * the broadcast audio stream establishment might slightly delay the stream
      * start.
+     *
+     * @param audioContext - audio stream context for the given stream map
+     * @param streamMap - channel map with BIS configurations
+     *
+     * @return broadcast audio stream data path configuration
      */
     LeAudioDataPathConfiguration getLeAudioBroadcastDatapathConfiguration(
-            in AudioContext context, in BroadcastStreamMap[] streamMap);
+            in AudioContext audioContext, in BroadcastStreamMap[] streamMap);
 }
diff --git a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/MetadataLtv.aidl b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/MetadataLtv.aidl
index b0befc1..afe76ce 100644
--- a/bluetooth/audio/aidl/android/hardware/bluetooth/audio/MetadataLtv.aidl
+++ b/bluetooth/audio/aidl/android/hardware/bluetooth/audio/MetadataLtv.aidl
@@ -30,8 +30,9 @@
     parcelable StreamingAudioContexts {
         AudioContext values;
     }
-    /* This is an opaque container for passing metadata between the provider and
-     * the remote device. It must not be interpreted by the BT stack.
+    /**
+     * This is an opaque container for passing metadata between the provider and
+     * the remote device. It shall not be inspected by the BT stack.
      */
     parcelable VendorSpecific {
         int companyId;
diff --git a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
index cff3b25..a692d84 100644
--- a/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
+++ b/bluetooth/audio/aidl/default/LeAudioOffloadAudioProvider.cpp
@@ -157,8 +157,11 @@
 bool LeAudioOffloadAudioProvider::isMatchedValidCodec(CodecId cfg_codec,
                                                       CodecId req_codec) {
   auto priority = codec_priority_map_.find(cfg_codec);
-  if (priority != codec_priority_map_.end() && priority->second == -1)
+  if (priority != codec_priority_map_.end() &&
+      priority->second ==
+          LeAudioOffloadAudioProvider::CODEC_PRIORITY_DISABLED) {
     return false;
+  }
   return cfg_codec == req_codec;
 }
 
@@ -222,8 +225,8 @@
     CodecSpecificConfigurationLtv::OctetsPerCodecFrame& cfg_octets,
     CodecSpecificCapabilitiesLtv::SupportedOctetsPerCodecFrame&
         capability_octets) {
-  return cfg_octets.value >= capability_octets.minimum &&
-         cfg_octets.value <= capability_octets.maximum;
+  return cfg_octets.value >= capability_octets.min &&
+         cfg_octets.value <= capability_octets.max;
 }
 
 bool LeAudioOffloadAudioProvider::isCapabilitiesMatchedCodecConfiguration(
@@ -568,7 +571,7 @@
 
   for (auto& setting : ase_configuration_settings) {
     // Context matching
-    if (setting.audioContext != in_qosRequirement.contextType) continue;
+    if (setting.audioContext != in_qosRequirement.audioContext) continue;
 
     // Match configuration flags
     // Currently configuration flags are not populated, ignore.
diff --git a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
index 85bc48a..7b98634 100644
--- a/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
+++ b/bluetooth/audio/aidl/vts/VtsHalBluetoothAudioTargetTest.cpp
@@ -2302,8 +2302,8 @@
     frame_duration.bitmask =
         CodecSpecificCapabilitiesLtv::SupportedFrameDurations::US7500;
     auto octets = CodecSpecificCapabilitiesLtv::SupportedOctetsPerCodecFrame();
-    octets.minimum = 0;
-    octets.maximum = 60;
+    octets.min = 0;
+    octets.max = 60;
     auto frames = CodecSpecificCapabilitiesLtv::SupportedMaxCodecFramesPerSDU();
     frames.value = 2;
     capability.codecSpecificCapabilities = {sampling_rate, frame_duration,
@@ -2567,7 +2567,7 @@
   std::vector<IBluetoothAudioProvider::LeAudioAseQosConfiguration>
       QoSConfigurations;
   for (auto bitmask : all_context_bitmasks) {
-    requirement.contextType = GetAudioContext(bitmask);
+    requirement.audioContext = GetAudioContext(bitmask);
     IBluetoothAudioProvider::LeAudioAseQosConfigurationPair result;
     auto aidl_retval =
         audio_provider_->getLeAudioAseQosConfiguration(requirement, &result);
@@ -2590,8 +2590,8 @@
   bool is_supported = false;
 
   for (auto bitmask : all_context_bitmasks) {
-    sink_requirement.context = GetAudioContext(bitmask);
-    source_requirement.context = GetAudioContext(bitmask);
+    sink_requirement.audioContext = GetAudioContext(bitmask);
+    source_requirement.audioContext = GetAudioContext(bitmask);
     IBluetoothAudioProvider::LeAudioDataPathConfigurationPair result;
     auto aidl_retval = audio_provider_->getLeAudioAseDatapathConfiguration(
         sink_requirement, source_requirement, &result);
diff --git a/health/aidl/default/Health.cpp b/health/aidl/default/Health.cpp
index b2c0f0a..a16087c 100644
--- a/health/aidl/default/Health.cpp
+++ b/health/aidl/default/Health.cpp
@@ -253,15 +253,6 @@
     return healthd_config_->screen_on(&props);
 }
 
-namespace {
-bool IsDeadObjectLogged(const ndk::ScopedAStatus& ret) {
-    if (ret.isOk()) return false;
-    if (ret.getStatus() == ::STATUS_DEAD_OBJECT) return true;
-    LOG(ERROR) << "Cannot call healthInfoChanged on callback: " << ret.getDescription();
-    return false;
-}
-}  // namespace
-
 //
 // Subclass helpers / overrides
 //
@@ -305,8 +296,10 @@
         return ndk::ScopedAStatus::ok();
     }
 
-    if (auto res = callback->healthInfoChanged(health_info); IsDeadObjectLogged(res)) {
-        (void)unregisterCallback(callback);
+    auto res = callback->healthInfoChanged(health_info);
+    if (!res.isOk()) {
+        LOG(DEBUG) << "Cannot call healthInfoChanged:" << res.getDescription()
+                   << ". Do nothing here if callback is dead as it will be cleaned up later.";
     }
     return ndk::ScopedAStatus::ok();
 }
@@ -353,13 +346,13 @@
 void Health::OnHealthInfoChanged(const HealthInfo& health_info) {
     // Notify all callbacks
     std::unique_lock<decltype(callbacks_lock_)> lock(callbacks_lock_);
-    // is_dead notifies a callback and return true if it is dead.
-    auto is_dead = [&](const auto& linked) {
+    for (const auto& linked : callbacks_) {
         auto res = linked->callback()->healthInfoChanged(health_info);
-        return IsDeadObjectLogged(res);
-    };
-    auto it = std::remove_if(callbacks_.begin(), callbacks_.end(), is_dead);
-    callbacks_.erase(it, callbacks_.end());  // calls unlinkToDeath on deleted callbacks.
+        if (!res.isOk()) {
+            LOG(DEBUG) << "Cannot call healthInfoChanged:" << res.getDescription()
+                       << ". Do nothing here if callback is dead as it will be cleaned up later.";
+        }
+    }
     lock.unlock();
 
     // Let HalHealthLoop::OnHealthInfoChanged() adjusts uevent / wakealarm periods