diff options
author | Carter Hsu <carterhsu@google.com> | 2018-07-13 10:41:29 +0800 |
---|---|---|
committer | Carter Hsu <carterhsu@google.com> | 2018-07-13 06:46:10 +0000 |
commit | 8284636fecaf9d679646416988762ce4b3ca685b (patch) | |
tree | 68c4457480d66e690099287a6afa87a862f68210 | |
parent | c0a06f34c88cf9dc017be6178113b35c3c7fc67e (diff) | |
download | platform_hardware_interfaces-8284636fecaf9d679646416988762ce4b3ca685b.tar.gz platform_hardware_interfaces-8284636fecaf9d679646416988762ce4b3ca685b.tar.bz2 platform_hardware_interfaces-8284636fecaf9d679646416988762ce4b3ca685b.zip |
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: Carter Hsu <carterhsu@google.com>
-rw-r--r-- | audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc b/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc index 8217b946dc..6e91bccb3c 100644 --- a/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc +++ b/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc @@ -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 |