From 520b756328dcf4a54cf25f5d16177aa17fdbce31 Mon Sep 17 00:00:00 2001 From: Matthew Xie Date: Wed, 17 Oct 2012 19:30:32 -0700 Subject: 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 --- btif/src/bluetooth.c | 4 ++++ btif/src/btif_media_task.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'btif') 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); -- cgit v1.1