Raise BTU and HCI thread priorities
The audio sub-system and audio related tasks run at elevated thread
priorities in order to ensure timely handling of audio packets. This
patch raises the thread priority of lower layer Bluetooth tasks involved
in delivering audio packets to avoid thread pre-emption and subsequent
audio skipping.
Bug: 24570959
Change-Id: I5e19ee4590207df753f7b8bfc22174959722ec2d
diff --git a/osi/src/eager_reader.c b/osi/src/eager_reader.c
index 63b190e..3ca8ad1 100644
--- a/osi/src/eager_reader.c
+++ b/osi/src/eager_reader.c
@@ -30,7 +30,6 @@
#include "osi/include/osi.h"
#include "osi/include/log.h"
#include "osi/include/reactor.h"
-#include "osi/include/thread.h"
#if !defined(EFD_SEMAPHORE)
# define EFD_SEMAPHORE (1 << 0)
@@ -212,6 +211,11 @@
return bytes_consumed;
}
+thread_t* eager_reader_get_read_thread(const eager_reader_t *reader) {
+ assert(reader != NULL);
+ return reader->inbound_read_thread;
+}
+
static bool has_byte(const eager_reader_t *reader) {
assert(reader != NULL);