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

Commit 8284636f authored by Carter Hsu's avatar Carter Hsu
Browse files

audio: add wakelock capability for audiohalservice



1. wake_lock group
2. BLOCK_SUSPEND capability

int pm_wake_lock(const char *buf)
{
	const char *str = buf;
	struct wakelock *wl;
	u64 timeout_ns = 0;
	size_t len;
	int ret = 0;

	if (!capable(CAP_BLOCK_SUSPEND))
		return -EPERM;
Bug: 111018819
Test: manual
Change-Id: I1283e4b1ab2b95e4e94df045240001485593f1ab
Signed-off-by: default avatarCarter Hsu <carterhsu@google.com>
parent c0a06f34
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@ service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
    class hal
    user audioserver
    # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
    group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct
    group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock
    capabilities BLOCK_SUSPEND
    ioprio rt 4
    writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
    # audioflinger restarts itself when it loses connection with the hal