summaryrefslogtreecommitdiffstats
path: root/btif
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 /btif
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 'btif')
-rw-r--r--btif/src/bluetooth.c4
-rwxr-xr-xbtif/src/btif_media_task.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c
index 18e706f..20d6a07 100644
--- a/btif/src/bluetooth.c
+++ b/btif/src/bluetooth.c
@@ -40,6 +40,7 @@
#define LOG_TAG "bluedroid"
#include "btif_api.h"
+#include "bt_utils.h"
/************************************************************************************
** Constants & Macros
@@ -113,6 +114,8 @@ static int init(bt_callbacks_t* callbacks )
/* add checks for individual callbacks ? */
+ bt_utils_init();
+
/* init btif */
btif_init_bluetooth();
@@ -146,6 +149,7 @@ static void cleanup( void )
return;
btif_shutdown_bluetooth();
+ bt_utils_cleanup();
/* hal callbacks reset upon shutdown complete callback */
diff --git a/btif/src/btif_media_task.c b/btif/src/btif_media_task.c
index 6975154..c615751 100755
--- a/btif/src/btif_media_task.c
+++ b/btif/src/btif_media_task.c
@@ -67,6 +67,7 @@
#include "btif_av.h"
#include "btif_sm.h"
#include "btif_util.h"
+#include "bt_utils.h"
/*****************************************************************************
** Constants
@@ -1209,6 +1210,8 @@ int btif_media_task(void *p)
media_task_running = MEDIA_TASK_STATE_ON;
+ raise_priority_a2dp(TASK_HIGH_MEDIA);
+
while (1)
{
event = GKI_wait(0xffff, 0);