summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcb <billchen1977@gmail.com>2017-09-28 16:31:59 +0800
committerMichael Bestas <mkbestas@lineageos.org>2019-12-11 23:50:40 +0200
commita7cdd8e4bb166af63989471f41d602341b98efd5 (patch)
tree0341a1e6bb9a9aac5195b467142b59ed570300ab
parent6e7a33562c327d84ca5ab3584e2d4245306bcac6 (diff)
downloadandroid_system_bt-a7cdd8e4bb166af63989471f41d602341b98efd5.tar.gz
android_system_bt-a7cdd8e4bb166af63989471f41d602341b98efd5.tar.bz2
android_system_bt-a7cdd8e4bb166af63989471f41d602341b98efd5.zip
Add support to force disable enhanced sco commandsstaging/lineage-17.0_merge-android-10.0.0_r9
Change-Id: I04c73d723d50c2f619102e1904b05937a77d0103 (cherry picked from commit a7fb51fdb48cefc47f32b1e6b1a1f9bb71e7d953)
-rw-r--r--device/src/controller.cc4
-rw-r--r--internal_include/bt_target.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/device/src/controller.cc b/device/src/controller.cc
index d843932e7..6525c14f1 100644
--- a/device/src/controller.cc
+++ b/device/src/controller.cc
@@ -22,6 +22,7 @@
#include <base/logging.h>
+#include "bt_target.h"
#include "bt_types.h"
#include "btcore/include/event_mask.h"
#include "btcore/include/module.h"
@@ -127,6 +128,9 @@ static future_t* start_up(void) {
AWAIT_COMMAND(packet_factory->make_read_local_supported_commands());
packet_parser->parse_read_local_supported_commands_response(
response, supported_commands, HCI_SUPPORTED_COMMANDS_ARRAY_SIZE);
+#if (BTM_SCO_ENHANCED_SYNC_ENABLED == FALSE)
+ supported_commands[29] &= ~0x08;
+#endif
// Read page 0 of the controller features next
uint8_t page_number = 0;
diff --git a/internal_include/bt_target.h b/internal_include/bt_target.h
index 67a67c56d..b1227a345 100644
--- a/internal_include/bt_target.h
+++ b/internal_include/bt_target.h
@@ -286,6 +286,12 @@
#define BTM_DISC_DURING_RS TRUE
#endif
+/* This is used to work around a controller bug that report supporting
+ * enhanced synchronous commands */
+#ifndef BTM_SCO_ENHANCED_SYNC_ENABLED
+#define BTM_SCO_ENHANCED_SYNC_ENABLED TRUE
+#endif
+
/**************************
* Initial SCO TX credit
************************/