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

Unverified Commit 187d6cd8 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-14.0.0_r17' into staging/lineage-21.0_merge-android-14.0.0_r17

Android 14.0.0 Release 17 (UQ1A.231205.015)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZXDPLwAKCRDorT+BmrEO
# eF0RAJ4iqd87xVmCXH2HL3Jrr9bhbZWTGwCghquOygAFFh6R5a6rfvFuEYci7MU=
# =Drad
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Dec  6 21:44:47 2023 EET
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 2182 signatures in the past
#      2 years.  Encrypted 4 messages in the past 23 months.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381  0964 E8AD 3F81 9AB1 0E78

# By Shruti Bihani (27) and others
# Via Automerger Merge Worker (962) and others
* tag 'android-14.0.0_r17': (148 commits)
  Revert "NdkMedia: fix android.mediav2.cts.CodecEncoderSurfaceTest failed."
  NdkMedia: fix android.mediav2.cts.CodecEncoderSurfaceTest failed.
  httplive: fix use-after-free
  Camera: Clarify interaction between aeTargetFpsRange and minDuration
  Use ERROR_CAMERA_DISCONNECTED on id remap
  Log pixel format metric for encoders using surface.
  Log pixel format metric for decoders and non-surface mode encoders.
  av: change return value if effect is not processing
  Add metrics updated callback.
  Fix deadlock when notifyPhysicalCameraDevice is called while waitUntilDrained hasn't completed
  Validate OMX Params for VPx encoders
  libaudiohal@aidl: Fix handling of point-to-point connections
  libaudiohal@aidl: Handle postponed streams closing
  Fix the format used by ThreadBase::toAudioPortConfig
  audioflinger: Clear InputSource in RecordThread::clearInput
  libaudiohal@aidl: Fix port config matching in findOrCreatePortConfig
  libaudiohal@aidl: Log clarifications
  Add AIDL union tag checking before access
  libaudiohal@aidl: Fix `setPortConfigFromConfig` for unspecified values
  audio: change volume only if effect updates the volume
  ...

 Conflicts:
	services/audiopolicy/service/AudioPolicyService.cpp

Change-Id: Iae584f35e9fe041702375e5d49e0407342da8e46
parents 2c377d34 05f0c2a6
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -102,3 +102,27 @@ cc_library_headers {
        },
    },
}

aidl_interface {
    name: "av-audio-types-aidl",
    unstable: true,
    host_supported: true,
    vendor_available: true,
    double_loadable: true,
    local_include_dir: "aidl",
    srcs: [
        "aidl/android/media/audio/IHalAdapterVendorExtension.aidl",
    ],
    imports: [
        "android.hardware.audio.core-V1",
    ],
    backend: {
        // The C++ backend is disabled transitively due to use of FMQ by the audio core HAL.
        cpp: {
            enabled: false,
        },
        java: {
            sdk_version: "module_current",
        },
    },
}
+1 −0
Original line number Diff line number Diff line
@@ -12,3 +12,4 @@ clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
               media/libmediatranscoding/
               services/mediatranscoding/
               media/libaudioclient/tests/
               media/libaudiohal/tests/
+136 −0
Original line number Diff line number Diff line
/*
 * 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.media.audio;

import android.hardware.audio.core.VendorParameter;

/**
 * This interface is used by the HAL adapter of the Audio Server. Implementation
 * is optional. Vendors may provide an implementation on the system_ext
 * partition. The default instance of this interface, if provided, must be
 * registered prior to the moment when the audio server connects to HAL modules.
 *
 * {@hide}
 */
interface IHalAdapterVendorExtension {
    enum ParameterScope {
        MODULE = 0,
        STREAM = 1,
    }

    /**
     * Parse raw parameter keys into vendor parameter ids.
     *
     * This method prepares arguments for a call to the 'getVendorParameters'
     * method of an 'IModule' or an 'IStreamCommon' interface instance,
     * depending on the provided scope.
     *
     * The client calls this method in order to prepare arguments for a call to
     * the particular Core HAL interface. The result returned by the HAL is then
     * processed using the 'processVendorParameters' method. It is not required
     * to maintain a 1:1 correspondence between the provided raw keys and the
     * elements of the parsed result. If the returned list is empty, the call of
     * 'getVendorParameters' is skipped. The implementation can either ignore
     * keys which it does not recognize, or throw an error. The latter is
     * preferred as it can help in discovering malformed key names.
     *
     * @param scope The scope of all raw parameter keys.
     * @param rawKeys Raw parameter keys, joined into a string using a semicolon
     *                (';') as the delimiter.
     * @return A list of vendor parameter IDs, see android.hardware.audio.core.VendorParameter.
     * @throws EX_ILLEGAL_ARGUMENT If the implementation can not parse the raw keys
     *                             and prefers to signal an error.
     */
    @utf8InCpp String[] parseVendorParameterIds(
            ParameterScope scope, in @utf8InCpp String rawKeys);

    /**
     * Parse raw parameter key-value pairs into vendor parameters.
     *
     * This method prepares arguments for a call to the 'setVendorParameters'
     * method of an 'IModule' or an 'IStreamCommon' interface instance,
     * depending on the provided scope.
     *
     * The vendor parameters returned using 'syncParameters' argument is then
     * used to call the 'setVendorParameters' method with 'async = false', and
     * 'asyncParameters' is used in a subsequent call to the same method, but
     * with 'async = true'. It is not required to maintain a 1:1 correspondence
     * between the provided key-value pairs and the elements of parsed
     * results. If any of the returned lists of vendor parameters is empty, then
     * the corresponding call is skipped. The implementation can either ignore
     * keys which it does not recognize, and invalid values, or throw an
     * error. The latter is preferred as it can help in discovering malformed
     * key names and values.
     *
     * @param scope The scope of all raw key-value pairs.
     * @param rawKeys Raw key-value pairs, separated by the "equals" sign ('='),
     *                joined into a string using a semicolon (';') as the delimiter.
     * @param syncParameters A list of vendor parameters to be set synchronously.
     * @param asyncParameters A list of vendor parameters to be set asynchronously.
     * @throws EX_ILLEGAL_ARGUMENT If the implementation can not parse raw key-value
     *                             pairs and prefers to signal an error.
     */
    void parseVendorParameters(
            ParameterScope scope, in @utf8InCpp String rawKeysAndValues,
            out VendorParameter[] syncParameters, out VendorParameter[] asyncParameters);

    /**
     * Parse raw value of the parameter for BT A2DP reconfiguration.
     *
     * This method may return any number of vendor parameters (including zero)
     * which will be passed to the 'IBluetoothA2dp.reconfigureOffload' method.
     *
     * @param rawValue An unparsed value of the legacy parameter.
     * @return A list of vendor parameters.
     * @throws EX_ILLEGAL_ARGUMENT If the implementation can not parse the raw value.
     */
    VendorParameter[] parseBluetoothA2dpReconfigureOffload(in @utf8InCpp String rawValue);

    /**
     * Parse raw value of the parameter for BT LE reconfiguration.
     *
     * This method may return any number of vendor parameters (including zero)
     * which will be passed to the 'IBluetoothLe.reconfigureOffload' method.
     *
     * @param rawValue An unparsed value of the legacy parameter.
     * @return A list of vendor parameters.
     * @throws EX_ILLEGAL_ARGUMENT If the implementation can not parse the raw value.
     */
    VendorParameter[] parseBluetoothLeReconfigureOffload(in @utf8InCpp String rawValue);

    /**
     * Process vendor parameters returned by the Audio Core HAL.
     *
     * This processes the result returned from a call to the
     * 'getVendorParameters' method of an 'IModule' or an 'IStreamCommon'
     * interface instance, depending on the provided scope.
     *
     * See 'parseVendorParameterIds' method for the flow description.  It is not
     * required to maintain a 1:1 correspondence between the elements of the
     * provided list and the emitted key-value pairs. The returned string with
     * raw key-value pairs is passed back to the framework.
     *
     * @param scope The scope of vendor parameters.
     * @param parameters Vendor parameters, see android.hardware.audio.core.VendorParameter.
     * @return Key-value pairs, separated by the "equals" sign ('='),
     *         joined into a string using a semicolon (';') as the delimiter.
     * @throws EX_ILLEGAL_ARGUMENT If the implementation can not emit raw key-value
     *                             pairs and prefers to signal an error.
     */
    @utf8InCpp String processVendorParameters(
            ParameterScope scope, in VendorParameter[] parameters);
}
+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ filegroup {
    srcs: [
        "aidl/android/hardware/CameraExtensionSessionStats.aidl",
        "aidl/android/hardware/ICameraService.aidl",
        "aidl/android/hardware/CameraIdRemapping.aidl",
        "aidl/android/hardware/ICameraServiceListener.aidl",
        "aidl/android/hardware/ICameraServiceProxy.aidl",
        "aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl",
+50 −0
Original line number Diff line number Diff line
/*
 * 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;

/**
 * Specifies a remapping of Camera Ids.
 *
 * Example: For a given package, a remapping of camera id0 to id1 specifies
 * that any operation to perform on id0 should instead be performed on id1.
 *
 * @hide
 */
parcelable CameraIdRemapping {
    /**
     * Specifies remapping of Camera Ids per package.
     */
    parcelable PackageIdRemapping {
        /** Package Name (e.g. com.android.xyz). */
        String packageName;
        /**
         * Ordered list of Camera Ids to replace. Only Camera Ids present in this list will be
         * affected.
         */
        List<String> cameraIdsToReplace;
        /**
         *  Ordered list of updated Camera Ids, where updatedCameraIds[i] corresponds to
         *  the updated camera id for cameraIdsToReplace[i].
         */
        List<String> updatedCameraIds;
    }

    /**
     * List of Camera Id remappings to perform.
     */
    List<PackageIdRemapping> packageIdRemappings;
}
Loading