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

Commit 03a790a2 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6431658 from ef4936b8 to mainline-release

Change-Id: I2a0811133e2b72b358f1e7b7a43657d259c8f417
parents d2934c97 ef4936b8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -219,6 +219,7 @@ public:
                if (success) {
                    break;
                }
                invalidate();
                using namespace std::chrono_literals;
                static constexpr auto kServiceRetryPeriod = 5s;
                LOG(INFO) << "Failed to retrieve component traits from service "
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ cc_library {

    static_libs: [
        "libmedia_midiiowrapper",
        "libsonivox",
        "libsonivoxwithoutjet",
        "libstagefright_foundation",
        "libwatchdog",
    ],
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ cc_test {
        "libstagefright_metadatautils",

        "libmedia_midiiowrapper",
        "libsonivox",
        "libsonivoxwithoutjet",
        "libvorbisidec",
        "libwebm",
        "libFLAC",
+6 −0
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ cc_library {
        "libaaudio_internal",
        "libaudioclient",
        "libaudioutils",
        "libmedia_helper",
        "libmediametrics",
        "libmediautils",
        "liblog",
        "libcutils",
        "libutils",
@@ -75,6 +78,9 @@ cc_library {
    shared_libs: [
        "libaudioclient",
        "libaudioutils",
        "libmedia_helper",
        "libmediametrics",
        "libmediautils",
        "liblog",
        "libcutils",
        "libutils",
+19 −3
Original line number Diff line number Diff line
@@ -14,9 +14,7 @@
 * limitations under the License.
 */

// This file is used in both client and server processes.
// This is needed to make sense of the logs more easily.
#define LOG_TAG (mInService ? "AudioStreamInternal_Service" : "AudioStreamInternal_Client")
#define LOG_TAG "AudioStreamInternal"
//#define LOG_NDEBUG 0
#include <utils/Log.h>

@@ -28,6 +26,8 @@

#include <aaudio/AAudio.h>
#include <cutils/properties.h>

#include <media/MediaMetricsItem.h>
#include <utils/String16.h>
#include <utils/Trace.h>

@@ -36,12 +36,20 @@
#include "binding/AAudioStreamConfiguration.h"
#include "binding/IAAudioService.h"
#include "binding/AAudioServiceMessage.h"
#include "core/AudioGlobal.h"
#include "core/AudioStreamBuilder.h"
#include "fifo/FifoBuffer.h"
#include "utility/AudioClock.h"

#include "AudioStreamInternal.h"

// We do this after the #includes because if a header uses ALOG.
// it would fail on the reference to mInService.
#undef LOG_TAG
// This file is used in both client and server processes.
// This is needed to make sense of the logs more easily.
#define LOG_TAG (mInService ? "AudioStreamInternal_Service" : "AudioStreamInternal_Client")

using android::String16;
using android::Mutex;
using android::WrappingBuffer;
@@ -137,6 +145,11 @@ aaudio_result_t AudioStreamInternal::open(const AudioStreamBuilder &builder) {
        return mServiceStreamHandle;
    }

    // This must match the key generated in oboeservice/AAudioServiceStreamBase.cpp
    // so the client can have permission to log.
    mMetricsId = std::string(AMEDIAMETRICS_KEY_PREFIX_AUDIO_STREAM)
            + std::to_string(mServiceStreamHandle);

    result = configurationOutput.validate();
    if (result != AAUDIO_OK) {
        goto error;
@@ -274,6 +287,9 @@ aaudio_result_t AudioStreamInternal::release_l() {
        if (isActive() || currentState == AAUDIO_STREAM_STATE_DISCONNECTED) {
            requestStop();
        }

        logBufferState();

        setState(AAUDIO_STREAM_STATE_CLOSING);
        aaudio_handle_t serviceStreamHandle = mServiceStreamHandle;
        mServiceStreamHandle = AAUDIO_HANDLE_INVALID;
Loading