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

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

Snap for 7649781 from eac8ea64 to sc-v2-release

Change-Id: Ic513195b943d1c3d6861b451711745b9a73dc6c0
parents 71f1206c eac8ea64
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -465,6 +465,18 @@ status_t DeviceHalHidl::dump(int fd, const Vector<String16>& args) {
    argsFromHal(args, &hidlArgs);
    Return<void> ret = mDevice->debug(hidlHandle, hidlArgs);
    native_handle_delete(hidlHandle);

    // TODO(b/111997867, b/177271958)  Workaround - remove when fixed.
    // A Binder transmitted fd may not close immediately due to a race condition b/111997867
    // when the remote binder thread removes the last refcount to the fd blocks in the
    // kernel for binder activity. We send a Binder ping() command to unblock the thread
    // and complete the fd close / release.
    //
    // See DeviceHalHidl::dump(), EffectHalHidl::dump(), StreamHalHidl::dump(),
    //     EffectsFactoryHalHidl::dumpEffects().

    (void)mDevice->ping(); // synchronous Binder call

    return processReturn("dump", ret);
}

+12 −0
Original line number Diff line number Diff line
@@ -239,6 +239,18 @@ status_t EffectHalHidl::dump(int fd) {
    hidlHandle->data[0] = fd;
    Return<void> ret = mEffect->debug(hidlHandle, {} /* options */);
    native_handle_delete(hidlHandle);

    // TODO(b/111997867, b/177271958)  Workaround - remove when fixed.
    // A Binder transmitted fd may not close immediately due to a race condition b/111997867
    // when the remote binder thread removes the last refcount to the fd blocks in the
    // kernel for binder activity. We send a Binder ping() command to unblock the thread
    // and complete the fd close / release.
    //
    // See DeviceHalHidl::dump(), EffectHalHidl::dump(), StreamHalHidl::dump(),
    //     EffectsFactoryHalHidl::dumpEffects().

    (void)mEffect->ping(); // synchronous Binder call

    return ret.isOk() ? OK : FAILED_TRANSACTION;
}

+12 −0
Original line number Diff line number Diff line
@@ -180,6 +180,18 @@ status_t EffectsFactoryHalHidl::dumpEffects(int fd) {
    hidlHandle->data[0] = fd;
    Return<void> ret = mEffectsFactory->debug(hidlHandle, {} /* options */);
    native_handle_delete(hidlHandle);

    // TODO(b/111997867, b/177271958)  Workaround - remove when fixed.
    // A Binder transmitted fd may not close immediately due to a race condition b/111997867
    // when the remote binder thread removes the last refcount to the fd blocks in the
    // kernel for binder activity. We send a Binder ping() command to unblock the thread
    // and complete the fd close / release.
    //
    // See DeviceHalHidl::dump(), EffectHalHidl::dump(), StreamHalHidl::dump(),
    //     EffectsFactoryHalHidl::dumpEffects().

    (void)mEffectsFactory->ping(); // synchronous Binder call

    return processReturn(__FUNCTION__, ret);
}

+12 −0
Original line number Diff line number Diff line
@@ -160,6 +160,18 @@ status_t StreamHalHidl::dump(int fd, const Vector<String16>& args) {
    argsFromHal(args, &hidlArgs);
    Return<void> ret = mStream->debug(hidlHandle, hidlArgs);
    native_handle_delete(hidlHandle);

    // TODO(b/111997867, b/177271958)  Workaround - remove when fixed.
    // A Binder transmitted fd may not close immediately due to a race condition b/111997867
    // when the remote binder thread removes the last refcount to the fd blocks in the
    // kernel for binder activity. We send a Binder ping() command to unblock the thread
    // and complete the fd close / release.
    //
    // See DeviceHalHidl::dump(), EffectHalHidl::dump(), StreamHalHidl::dump(),
    //     EffectsFactoryHalHidl::dumpEffects().

    (void)mStream->ping(); // synchronous Binder call

    mStreamPowerLog.dump(fd);
    return processReturn("dump", ret);
}
+14 −14
Original line number Diff line number Diff line
@@ -5395,9 +5395,7 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
                            err = mOMXNode->getParameter(
                                    (OMX_INDEXTYPE)OMX_IndexParamAudioAndroidAacDrcPresentation,
                                    &presentation, sizeof(presentation));
                            if (err != OK) {
                                return err;
                            }
                            if (err == OK) {
                                notify->setInt32("aac-encoded-target-level",
                                                 presentation.nEncodedTargetLevel);
                                notify->setInt32("aac-drc-cut-level", presentation.nDrcCut);
@@ -5406,12 +5404,14 @@ status_t ACodec::getPortFormat(OMX_U32 portIndex, sp<AMessage> &notify) {
                                                 presentation.nHeavyCompression);
                                notify->setInt32("aac-target-ref-level",
                                                 presentation.nTargetReferenceLevel);
                            notify->setInt32("aac-drc-effect-type", presentation.nDrcEffectType);
                                notify->setInt32("aac-drc-effect-type",
                                                 presentation.nDrcEffectType);
                                notify->setInt32("aac-drc-album-mode", presentation.nDrcAlbumMode);
                                notify->setInt32("aac-drc-output-loudness",
                                                 presentation.nDrcOutputLoudness);
                            }
                        }
                    }
                    break;
                }