Bluetooth default use CLOCK_BOOTTIME

388 views
Skip to first unread message

youling 257

unread,
Sep 5, 2018, 11:15:02 PM9/5/18
to Android-x86
some devices not support alarm,and bay trail will remove /sys/class/rtc/rtc0/wakealarm in the future,this will help suspend,

so let us Bluetooth default use CLOCK_BOOTTIME .

diff --git a/BoardConfig.mk b/BoardConfig.mk
index 1fa0091..0f7755a 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -7,6 +7,7 @@ TARGET_BOARD_PLATFORM := android-x86
 # Some framework code requires this to enable BT
 BOARD_HAVE_BLUETOOTH := true
 BOARD_HAVE_BLUETOOTH_LINUX := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/generic/common/bluetooth
 
 BOARD_USE_LEGACY_UI := true
 
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
index df91a8a..a6a788d 100644
--- a/bluetooth/bdroid_buildcfg.h
+++ b/bluetooth/bdroid_buildcfg.h
@@ -22,5 +22,6 @@
 #define BLUETOOTH_HCI_USE_USB TRUE
 // Bluetooth Low Power Mode is supported on BT4.0
 #define HCILP_INCLUDED FALSE
+#define KERNEL_MISSING_CLOCK_BOOTTIME_ALARM TRUE
 
 #endif
-- 
2.17.1
0001-default-use-CLOCK_BOOTTIME.patch

Chih-Wei Huang

unread,
Sep 6, 2018, 3:03:10 AM9/6/18
to Android-x86
I've applied the patch.
Thank you!
--
Chih-Wei
Android-x86 project
http://www.android-x86.org

youling 257

unread,
Oct 11, 2019, 8:04:26 AM10/11/19
to Android-x86
I test Bliss pie, Bluetooth stopped,

Bliss Version: '11.10'
Build fingerprint: 'Android-x86/android_x86_64/x86_64:9/PQ2A.190405.003/electrikjesus09011610:userdebug/test-keys'
Revision: '0'
ABI: 'x86_64'
pid: 2358, tid: 2429, name: stack_manager >>> com.android.bluetooth <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[1011/132619.664484:FATAL:alarm.cc(178)] Check failed: false. 

10-11 13:26:19.663 2358 2429 E bt_osi_alarm: timer_create_internal unable to create timer with clock 9: Operation not supported on transport endpoint
10-11 13:26:19.663 2358 2429 E bt_osi_alarm: The kernel might not have support for timer_create(CLOCK_BOOTTIME_ALARM): https://lwn.net/Articles/429925/
10-11 13:26:19.663 2358 2429 E bt_osi_alarm: See following patches: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=CLOCK_BOOTTIME_ALARM
10-11 13:26:19.664 2358 2429 F : [1011/132619.664484:FATAL:alarm.cc(178)] Check failed: false. 

Bliss used this patch, but seem not available on pie.

Fall back to CLOCK_BOOTTIME if CLOCK_BOOTTIME_ALARM fails
Reply all
Reply to author
Forward
0 new messages