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

Commit adea1782 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12667701 from 91ece572 to 25Q1-release

Change-Id: Ibcaf91bda2fbdc80880773e45fd53a930128711f
parents dc0a64a4 91ece572
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1907,7 +1907,7 @@ ReflectedParamUpdater::Dict CCodecConfig::getReflectedFormat(
                        bottom = c2_min(bottom, height);
                        if (right > left && bottom > top) {
                            C2Rect rect(right - left, bottom - top);
                            rect.at(left, top);
                            rect = rect.at(left, top);
                            c2QpOffsetRects.push_back(C2QpOffsetRectStruct(rect, offset));
                        } else {
                            ALOGE("Rects configuration %s is not valid.", box);
+1 −0
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ cc_fuzz {
        "libaaudio",
        "libaaudio_internal",
        "libaudioclient",
        "libaudiofoundation",
        "libaudioutils",
        "libbase_ndk",
        "libcutils",
+23 −1
Original line number Diff line number Diff line
@@ -1909,10 +1909,32 @@ AAUDIO_API int32_t AAudioStream_getSamplesPerFrame(AAudioStream* _Nonnull stream
 * Available since API level 26.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream()
 * @return actual device ID
 * @return actual device id. If there are multiple device ids used, the first device picked by
 *         the audio policy engine will be returned.
 */
AAUDIO_API int32_t AAudioStream_getDeviceId(AAudioStream* _Nonnull stream) __INTRODUCED_IN(26);

/**
 * Available since API level 36.
 *
 * Call this function after AAudioStreamBuilder_openStream().
 * This function will crash if stream is null.
 * An array of size 16 should generally be large enough to fit all device identifiers.
 *
 * @param stream reference provided by AAudioStreamBuilder_openStream().
 * @param ids reference to an array of ids.
 * @params numIds size allocated to the array of ids.
 *         The input should be the size of the ids array.
 *         The output will be the actual number of device ids.
 * @return {@link #AAUDIO_OK} or an error code.
 *         If numIds is null, return {@link #AAUDIO_ERROR_ILLEGAL_ARGUMENT}.
 *         If numIds is smaller than the number of device ids, return
 *         {@link #AAUDIO_ERROR_OUT_OF_RANGE}. The value of numIds will still be updated.
 *         Otherwise, if ids is null, return {@link #AAUDIO_ERROR_ILLEGAL_ARGUMENT}.
 */
AAUDIO_API aaudio_result_t AAudioStream_getDeviceIds(AAudioStream* _Nonnull stream,
        int32_t* _Nonnull ids, int32_t* _Nonnull numIds) __INTRODUCED_IN(36);

/**
 * Available since API level 26.
 *
+2 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ cc_library {
        "framework-permission-aidl-cpp",
        "libaaudio_internal",
        "libaudioclient",
        "libaudiofoundation",
        "libaudioutils",
        "libbinder",
        "libcutils",
@@ -166,6 +167,7 @@ cc_library {
        "framework-permission-aidl-cpp",
        "libaudioclient",
        "libaudioclient_aidl_conversion",
        "libaudiofoundation",
        "libaudioutils",
        "libbinder",
        "libcutils",
+19 −2
Original line number Diff line number Diff line
@@ -34,7 +34,16 @@ using android::media::audio::common::AudioFormatDescription;
AAudioStreamConfiguration::AAudioStreamConfiguration(const StreamParameters& parcelable) {
    setChannelMask(parcelable.channelMask);
    setSampleRate(parcelable.sampleRate);
    setDeviceId(parcelable.deviceId);
    auto deviceIds = android::convertContainer<android::DeviceIdVector>(
            parcelable.deviceIds, android::aidl2legacy_int32_t_audio_port_handle_t);
    if (deviceIds.ok()) {
        setDeviceIds(deviceIds.value());
    } else {
        ALOGE("deviceIds (%s) aidl2legacy conversion failed",
              android::toString(parcelable.deviceIds).c_str());
        android::DeviceIdVector emptyDeviceIds;
        setDeviceIds(emptyDeviceIds);
    }
    static_assert(sizeof(aaudio_sharing_mode_t) == sizeof(parcelable.sharingMode));
    setSharingMode(parcelable.sharingMode);
    auto convFormat = android::aidl2legacy_AudioFormatDescription_audio_format_t(
@@ -87,7 +96,15 @@ StreamParameters AAudioStreamConfiguration::parcelable() const {
    StreamParameters result;
    result.channelMask = getChannelMask();
    result.sampleRate = getSampleRate();
    result.deviceId = getDeviceId();
    auto deviceIds = android::convertContainer<std::vector<int32_t>>(
            getDeviceIds(), android::legacy2aidl_audio_port_handle_t_int32_t);
    if (deviceIds.ok()) {
        result.deviceIds = deviceIds.value();
    } else {
        ALOGE("deviceIds (%s) legacy2aidl conversion failed",
              android::toString(getDeviceIds()).c_str());
        result.deviceIds = {};
    }
    static_assert(sizeof(aaudio_sharing_mode_t) == sizeof(result.sharingMode));
    result.sharingMode = getSharingMode();
    auto convAudioFormat = android::legacy2aidl_audio_format_t_AudioFormatDescription(getFormat());
Loading