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

Commit a933fc6f authored by Andy Hung's avatar Andy Hung
Browse files

Revert^2 "AudioFlinger: allow wake from suspend"

25895de2

Test: go/abtd/run/L72200030014196774/
Test: atest com.google.android.power.pts.PowerTest#power1PartialWakeLockCheckTest
Bug: 432115909
Change-Id: I57abcafffd4944559dd5c00c62306d1d05e34dc0
parent 25895de2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ service audioserver /system/bin/audioserver
    user audioserver
    # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
    group audio camera drmrpc media mediadrm net_bt net_bt_admin net_bw_acct wakelock
    capabilities BLOCK_SUSPEND
    capabilities BLOCK_SUSPEND WAKE_ALARM
    # match rtprio cur / max with sensor service as we handle AR/VR HID sensor data.
    rlimit rtprio 10 10
    ioprio rt 4
+2 −0
Original line number Diff line number Diff line
@@ -348,6 +348,8 @@ void AudioFlinger::onFirstRef()
    mPatchPanel = IAfPatchPanel::create(sp<IAfPatchPanelCallback>::fromExisting(this));
    mMelReporter = sp<MelReporter>::make(sp<IAfMelReporterCallback>::fromExisting(this),
                                         mPatchPanel);

    ALOGD("%s: TimerQueue %s", __func__, mTimerQueue.ready() ? "ready" : "uninitialized");
}

status_t AudioFlinger::setAudioHalPids(const std::vector<pid_t>& pids) {
+4 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <audio_utils/mutex.h>
#include <audio_utils/FdToString.h>
#include <audio_utils/SimpleLog.h>
#include <audio_utils/TimerQueue.h>
#include <com/android/media/permission/PermissionEnum.h>
#include <media/IAudioFlinger.h>
#include <media/IAudioPolicyServiceLocal.h>
@@ -487,6 +488,9 @@ private:

    void dumpToThreadLog_l(const sp<IAfThreadBase>& thread) REQUIRES(mutex());

    // Internally locked timer queue for suspend / wakeup activity.
    audio_utils::TimerQueue mTimerQueue{true /* alarm */};

    // --- Notification Client ---
    class NotificationClient : public IBinder::DeathRecipient {
    public: