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

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

Snap for 12272146 from 2c367cb6 to 24Q4-release

Change-Id: Id1da3dc0862f768acc6e0ff2f47dbd59c73f4ed8
parents c7c57bfc 2c367cb6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ cc_library {
    ],
    static_libs: [
        "android.hardware.common-V2-ndk",
        "android.hardware.drm.common-V1-ndk",
        "android.hardware.drm-V1-ndk",
        "android.hardware.security.rkp-V3-ndk",
        "libbase",
@@ -39,6 +40,7 @@ cc_binary {
    ],
    static_libs: [
        "android.hardware.common-V2-ndk",
        "android.hardware.drm.common-V1-ndk",
        "android.hardware.drm-V1-ndk",
        "android.hardware.security.rkp-V3-ndk",
        "libbase",
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ cc_defaults {

    static_libs: [
        "android.hardware.common-V2-ndk",
        "android.hardware.drm.common-V1-ndk",
        "android.hardware.drm-V1-ndk",
        "libbase",
        "libclearkeybase",
+4 −0
Original line number Diff line number Diff line
@@ -824,6 +824,10 @@ c2_status_t GraphicsTracker::deallocate(uint64_t bid, const sp<Fence> &fence) {
    std::shared_ptr<BufferCache> cache;
    int slotId;
    sp<Fence> rFence;
    if (mStopped.load() == true) {
        ALOGE("cannot deallocate due to being stopped");
        return C2_BAD_STATE;
    }
    c2_status_t res = requestDeallocate(bid, fence, &completed, &updateDequeue,
                                        &cache, &slotId, &rFence);
    if (res != C2_OK) {
+11 −0
Original line number Diff line number Diff line
@@ -680,6 +680,17 @@ status_t AudioRecord::setInputDevice(audio_port_handle_t deviceId) {
    AutoMutex lock(mLock);
    ALOGV("%s(%d): deviceId=%d mSelectedDeviceId=%d",
            __func__, mPortId, deviceId, mSelectedDeviceId);
    const int64_t beginNs = systemTime();
    mediametrics::Defer defer([&] {
        mediametrics::LogItem(mMetricsId)
                .set(AMEDIAMETRICS_PROP_CALLERNAME,
                     mCallerName.empty()
                     ? AMEDIAMETRICS_PROP_CALLERNAME_VALUE_UNKNOWN
                     : mCallerName.c_str())
                .set(AMEDIAMETRICS_PROP_EVENT, AMEDIAMETRICS_PROP_EVENT_VALUE_SETPREFERREDDEVICE)
                .set(AMEDIAMETRICS_PROP_EXECUTIONTIMENS, (int64_t)(systemTime() - beginNs))
                .set(AMEDIAMETRICS_PROP_SELECTEDDEVICEID, (int32_t)deviceId)
                .record(); });

    if (mSelectedDeviceId != deviceId) {
        mSelectedDeviceId = deviceId;
+15 −1
Original line number Diff line number Diff line
@@ -322,6 +322,18 @@ status_t AudioSystem::setStreamMute(audio_stream_type_t stream, bool mute) {
    return NO_ERROR;
}

status_t AudioSystem::setPortsVolume(
        const std::vector<audio_port_handle_t>& portIds, float volume, audio_io_handle_t output) {
    const sp<IAudioFlinger> af = get_audio_flinger();
    if (af == 0) return PERMISSION_DENIED;
    std::vector<int32_t> portIdsAidl = VALUE_OR_RETURN_STATUS(
            convertContainer<std::vector<int32_t>>(
                    portIds, legacy2aidl_audio_port_handle_t_int32_t));
    int32_t outputAidl = VALUE_OR_RETURN_STATUS(legacy2aidl_audio_io_handle_t_int32_t(output));
    af->setPortsVolume(portIdsAidl, volume, outputAidl);
    return NO_ERROR;
}

status_t AudioSystem::setMode(audio_mode_t mode) {
    if (uint32_t(mode) >= AUDIO_MODE_CNT) return BAD_VALUE;
    const sp<IAudioFlinger> af = get_audio_flinger();
@@ -1081,7 +1093,8 @@ status_t AudioSystem::getOutputForAttr(audio_attributes_t* attr,
                                       audio_port_handle_t* portId,
                                       std::vector<audio_io_handle_t>* secondaryOutputs,
                                       bool *isSpatialized,
                                       bool *isBitPerfect) {
                                       bool *isBitPerfect,
                                       float *volume) {
    if (attr == nullptr) {
        ALOGE("%s NULL audio attributes", __func__);
        return BAD_VALUE;
@@ -1147,6 +1160,7 @@ status_t AudioSystem::getOutputForAttr(audio_attributes_t* attr,
    *isBitPerfect = responseAidl.isBitPerfect;
    *attr = VALUE_OR_RETURN_STATUS(
            aidl2legacy_AudioAttributes_audio_attributes_t(responseAidl.attr));
    *volume = responseAidl.volume;

    return OK;
}
Loading