summaryrefslogtreecommitdiffstats
path: root/gki
diff options
context:
space:
mode:
authorMatthew Xie <mattx@google.com>2012-10-17 19:30:32 -0700
committerMatthew Xie <mattx@google.com>2012-10-19 14:51:43 -0700
commit520b756328dcf4a54cf25f5d16177aa17fdbce31 (patch)
treec9bb9d4b0ea2109e217a355b23d46e753aa3f61d /gki
parentad66e170ebd53f8f5970844f9b28ec4d56125c13 (diff)
downloadexternal_bluetooth_bluedroid-520b756328dcf4a54cf25f5d16177aa17fdbce31.zip
external_bluetooth_bluedroid-520b756328dcf4a54cf25f5d16177aa17fdbce31.tar.gz
external_bluetooth_bluedroid-520b756328dcf4a54cf25f5d16177aa17fdbce31.tar.bz2
Bump up priority of a few tasks that could affect a2dp
Change nice to -16, same as android audio service. Affected tasks: btu, gki timer, hci worker, media task, userial_read bug 7267756 Change-Id: I0b5ecc4345240601ef6e5890240054dab193e4a0
Diffstat (limited to 'gki')
-rw-r--r--gki/Android.mk1
-rwxr-xr-xgki/ulinux/gki_ulinux.c7
2 files changed, 6 insertions, 2 deletions
diff --git a/gki/Android.mk b/gki/Android.mk
index c76c237..0ece25b 100644
--- a/gki/Android.mk
+++ b/gki/Android.mk
@@ -8,6 +8,7 @@ LOCAL_C_INCLUDES:= $(LOCAL_PATH)/common \
$(LOCAL_PATH)/ulinux \
$(LOCAL_PATH)/../include \
$(LOCAL_PATH)/../stack/include \
+ $(LOCAL_PATH)/../utils/include \
$(bdroid_C_INCLUDES) \
LOCAL_CFLAGS += -Werror $(bdroid_CFLAGS)
diff --git a/gki/ulinux/gki_ulinux.c b/gki/ulinux/gki_ulinux.c
index 97a7f41..57ff7bb 100755
--- a/gki/ulinux/gki_ulinux.c
+++ b/gki/ulinux/gki_ulinux.c
@@ -33,6 +33,7 @@
#include <pthread.h> /* must be 1st header defined */
#include <time.h>
#include "gki_int.h"
+#include "bt_utils.h"
#define LOG_TAG "GKI_LINUX"
@@ -618,6 +619,10 @@ void* timer_thread(void *arg)
/* Indicate that tick is just starting */
restart = 1;
+ prctl(PR_SET_NAME, (unsigned long)"gki timer", 0, 0, 0);
+
+ raise_priority_a2dp(TASK_HIGH_GKI_TIMER);
+
while(!shutdown_timer)
{
/* If the timer has been stopped (no SW timer running) */
@@ -807,8 +812,6 @@ void GKI_run (void *p_task_id)
return;
}
- prctl(PR_SET_NAME, (unsigned long)"gki timer", 0, 0, 0);
-
#else
GKI_TRACE("GKI_run ");
for (;;)