From e08303d8cf6f69fc1cb53ad7084984e4c24cbfa2 Mon Sep 17 00:00:00 2001 From: Philip Cuadra Date: Thu, 23 Mar 2017 10:05:45 -0700 Subject: [PATCH] Allow Bluetooth HAL CAP_SYS_NICE The Bluetooth HAL has threads that process Bluetooth audio. They need to be scheduled as RT priority, so allow the Bluetooth HAL to set its threads to RT scheduling. Bug 37518404 Test: play Bluetooth audio, confirm priority via systrace Change-Id: I4928cf182a0805c0714e4d073cba15c864fbe328 --- libcutils/fs_config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libcutils/fs_config.c b/libcutils/fs_config.c index 6e5db0bc3..e1e8c8dd0 100644 --- a/libcutils/fs_config.c +++ b/libcutils/fs_config.c @@ -189,8 +189,10 @@ static const struct fs_path_config android_files[] = { CAP_MASK_LONG(CAP_NET_RAW), "system/bin/hostapd" }, - /* Support Bluetooth legacy hal accessing /sys/class/rfkill */ - { 00700, AID_BLUETOOTH, AID_BLUETOOTH, CAP_MASK_LONG(CAP_NET_ADMIN), + /* Support Bluetooth legacy hal accessing /sys/class/rfkill + * Support RT scheduling in Bluetooth */ + { 00700, AID_BLUETOOTH, AID_BLUETOOTH, CAP_MASK_LONG(CAP_NET_ADMIN) | + CAP_MASK_LONG(CAP_SYS_NICE), "vendor/bin/hw/android.hardware.bluetooth@1.0-service" }, /* Support wifi_hal_legacy administering a network interface. */