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

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

Snap for 4731145 from 975ac84e to pi-release

Change-Id: I29b6b3b59022def8c3a960a427b0e614471704b8
parents 5bc0781d 975ac84e
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -392,19 +392,25 @@ aaudio_result_t AudioStreamInternal::unregisterThread() {
}

aaudio_result_t AudioStreamInternal::startClient(const android::AudioClient& client,
                                                 audio_port_handle_t *clientHandle) {
                                                 audio_port_handle_t *portHandle) {
    ALOGV("%s() called", __func__);
    if (mServiceStreamHandle == AAUDIO_HANDLE_INVALID) {
        return AAUDIO_ERROR_INVALID_STATE;
    }

    return mServiceInterface.startClient(mServiceStreamHandle, client, clientHandle);
    aaudio_result_t result =  mServiceInterface.startClient(mServiceStreamHandle,
                                                            client, portHandle);
    ALOGV("%s(%d) returning %d", __func__, *portHandle, result);
    return result;
}

aaudio_result_t AudioStreamInternal::stopClient(audio_port_handle_t clientHandle) {
aaudio_result_t AudioStreamInternal::stopClient(audio_port_handle_t portHandle) {
    ALOGV("%s(%d) called", __func__, portHandle);
    if (mServiceStreamHandle == AAUDIO_HANDLE_INVALID) {
        return AAUDIO_ERROR_INVALID_STATE;
    }
    return mServiceInterface.stopClient(mServiceStreamHandle, clientHandle);
    aaudio_result_t result = mServiceInterface.stopClient(mServiceStreamHandle, portHandle);
    ALOGV("%s(%d) returning %d", __func__, portHandle, result);
    return result;
}

aaudio_result_t AudioStreamInternal::getTimestamp(clockid_t clockId,
+2 −1
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <audio_utils/string.h>

#define MIN(a, b) ((a) < (b) ? (a) : (b))

@@ -117,7 +118,7 @@ BufLogStream::BufLogStream(unsigned int id,
    mByteCount = 0l;
    mPaused = false;
    if (tag != NULL) {
        strncpy(mTag, tag, BUFLOGSTREAM_MAX_TAGSIZE);
        (void)audio_utils_strlcpy(mTag, tag);
    } else {
        mTag[0] = 0;
    }
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ LOCAL_C_INCLUDES := \
    frameworks/av/services/audiopolicy/common/include \
    frameworks/av/services/audiopolicy \
    frameworks/av/services/audiopolicy/utilities \
    system/media/audio_utils/include \

ifeq ($(USE_XML_AUDIO_POLICY_CONF), 1)

+3 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#define LOG_TAG "APM::Devices"
//#define LOG_NDEBUG 0

#include <audio_utils/string.h>
#include "DeviceDescriptor.h"
#include "TypeConverter.h"
#include "AudioGain.h"
@@ -247,7 +248,7 @@ void DeviceDescriptor::toAudioPortConfig(struct audio_port_config *dstConfig,
    // ALOG_ASSERT(mModule != NULL);
    dstConfig->ext.device.hw_module =
            mModule != 0 ? mModule->getHandle() : AUDIO_MODULE_HANDLE_NONE;
    strncpy(dstConfig->ext.device.address, mAddress.string(), AUDIO_DEVICE_MAX_ADDRESS_LEN);
    (void)audio_utils_strlcpy_zerofill(dstConfig->ext.device.address, mAddress.string());
}

void DeviceDescriptor::toAudioPort(struct audio_port *port) const
@@ -258,7 +259,7 @@ void DeviceDescriptor::toAudioPort(struct audio_port *port) const
    toAudioPortConfig(&port->active_config);
    port->ext.device.type = mDeviceType;
    port->ext.device.hw_module = mModule->getHandle();
    strncpy(port->ext.device.address, mAddress.string(), AUDIO_DEVICE_MAX_ADDRESS_LEN);
    (void)audio_utils_strlcpy_zerofill(port->ext.device.address, mAddress.string());
}

void DeviceDescriptor::importAudioPort(const sp<AudioPort>& port, bool force) {
+2 −0
Original line number Diff line number Diff line
@@ -243,6 +243,7 @@ void CameraService::addStates(const String8 id) {
    }

    if (mFlashlight->hasFlashUnit(id)) {
        Mutex::Autolock al(mTorchStatusMutex);
        mTorchStatusMap.add(id, TorchModeStatus::AVAILABLE_OFF);
    }

@@ -253,6 +254,7 @@ void CameraService::addStates(const String8 id) {
void CameraService::removeStates(const String8 id) {
    updateCameraNumAndIds();
    if (mFlashlight->hasFlashUnit(id)) {
        Mutex::Autolock al(mTorchStatusMutex);
        mTorchStatusMap.removeItem(id);
    }

Loading