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

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

Snap for 12930767 from 081e11e5 to 25Q2-release

Change-Id: Id0d38bddae760267b5fcc252e62cb2a1b92e102a
parents 5a5c4bed 081e11e5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -92,6 +92,14 @@ flag {
    bug: "376480814"
}

flag {
    name: "hardening_partial"
    is_exported: true
    namespace: "media_audio"
    description: "Flag for partial enforcement of hardening"
    bug: "376480814"
}

flag {
    name: "hardening_strict"
    is_exported: true
+8 −0
Original line number Diff line number Diff line
@@ -23,6 +23,14 @@ flag {
    bug: "302323921"
}

flag {
    name: "cache_get_stream_min_max_volume"
    namespace: "media_audio"
    description:
       "Cache getStream[Min|Max]Volume calls between AM and AS"
    bug: "383667500"
}

flag {
    name: "concurrent_audio_record_bypass_permission"
    namespace: "media_audio"
+0 −7
Original line number Diff line number Diff line
@@ -34,13 +34,6 @@ cc_library {
        "libcodec2-aidl-client-defaults",
    ],

    // http://b/343951602#comment4 Explicitly set cpp_std to gnu++20.  The
    // default inherited from libcodec2-impl-defaults sets it to gnu++17 which
    // causes a segfault when mixing global std::string symbols built with
    // gnu++17 and gnu++20.  TODO(b/343951602): clean this after
    // libcodec2-impl-defaults opt into gnu++17 is removed.
    cpp_std: "gnu++20",

    header_libs: [
        "libcodec2_internal", // private
        "libcom.android.media.swcodec.apexcodecs-header",
+2 −0
Original line number Diff line number Diff line
@@ -77,12 +77,14 @@
#include <private/android/AHardwareBufferHelpers.h>
#include <system/window.h> // for NATIVE_WINDOW_QUERY_*

#include <algorithm>
#include <deque>
#include <iterator>
#include <limits>
#include <map>
#include <mutex>
#include <optional>
#include <ranges>
#include <sstream>
#include <thread>
#include <type_traits>
+4 −2
Original line number Diff line number Diff line
@@ -117,7 +117,8 @@ void AudioStreamInternalPlay::prepareBuffersForStop() {
        return;
    }
    // Sleep until the DSP has read all of the data written.
    int64_t validFramesInBuffer = getFramesWritten() - getFramesRead();
    int64_t validFramesInBuffer =
            mAudioEndpoint->getDataWriteCounter() - mAudioEndpoint->getDataReadCounter();
    if (validFramesInBuffer >= 0) {
        int64_t emptyFramesInBuffer = ((int64_t) getBufferCapacity()) - validFramesInBuffer;

@@ -131,7 +132,8 @@ void AudioStreamInternalPlay::prepareBuffersForStop() {
        // Sleep until we are confident the DSP has consumed all of the valid data.
        // Sleep for one extra burst as a safety margin because the IsochronousClockModel
        // is not perfectly accurate.
        int64_t positionInEmptyMemory = getFramesWritten() + getFramesPerBurst();
        // The ClockModel uses the server frame position so do not use getFramesWritten().
        int64_t positionInEmptyMemory = mAudioEndpoint->getDataWriteCounter() + getFramesPerBurst();
        int64_t timeAllConsumed = mClockModel.convertPositionToTime(positionInEmptyMemory);
        int64_t durationAllConsumed = timeAllConsumed - AudioClock::getNanoseconds();
        // Prevent sleeping for too long.
Loading