btlinux: Enable Bluetooth
BT mouse works. Can be paired with external BT
speakers too but Audio doesn't work.
Based on John's fix for enabling BT on db845c
https://android-review.googlesource.com/c/device/linaro/dragonboard/+/1223472
Verified on db845c GKI images downloaded from
https://ci.android.com/builds/submitted/6175498/kernel_db845c/latest/
And upstream BT QCA firmware files copied from
https://android.googlesource.com/device/linaro/dragonboard/+/6fb3857ed36b01d50158b09751eef7e08da34b49
Signed-off-by: Amit Pundir <pundiramit@gmail.com>
diff --git a/aosp_beryllium.mk b/aosp_beryllium.mk
index 4980f6e..b56bc69 100644
--- a/aosp_beryllium.mk
+++ b/aosp_beryllium.mk
@@ -1,15 +1,20 @@
DB845C_KERNEL_DIR := device/linaro/dragonboard-kernel/android-5.4
-LOCAL_KERNEL_DIR := device/xiaomi/beryllium/prebuilt-kernel/android-5.4
-
DB845C_MODS := $(wildcard $(DB845C_KERNEL_DIR)/*.ko)
+
# Local modules are built from following tree:
# https://github.com/pundiramit/linux/tree/android-5.4-modules
+LOCAL_KERNEL_DIR := device/xiaomi/beryllium/prebuilt-kernel/android-5.4
LOCAL_MODS := $(wildcard $(LOCAL_KERNEL_DIR)/*.ko)
-BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(DB845C_MODS)
+
# Skip copying modules broken on android-5.4
# Use local module copy instead
-SKIP_MODS := %/msm.ko
-BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(filter-out $(SKIP_MODS),$(DB845C_MODS))
+DB845C_SKIP_MODS := %/msm.ko
+
+# BT modules go to vendor partition
+DB845C_ONLY_VENDOR := %/btqca.ko %/hci_uart.ko
+BOARD_VENDOR_KERNEL_MODULES := $(filter $(DB845C_ONLY_VENDOR),$(DB845C_MODS))
+
+BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(filter-out $(DB845C_SKIP_MODS) $(DB845C_ONLY_VENDOR),$(DB845C_MODS))
BOARD_VENDOR_RAMDISK_KERNEL_MODULES += $(LOCAL_MODS)
# Inherit the full_base and device configurations
diff --git a/device-common.mk b/device-common.mk
index b8e1d23..eccc912 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -76,7 +76,7 @@
# Enable BT
PRODUCT_PACKAGES += \
- android.hardware.bluetooth@1.0-service.btlinux
+ android.hardware.bluetooth@1.1-service.btlinux
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
diff --git a/manifest.xml b/manifest.xml
index d2d3477..2342860 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -91,7 +91,7 @@
<hal format="hidl">
<name>android.hardware.bluetooth</name>
<transport>hwbinder</transport>
- <version>1.0</version>
+ <version>1.1</version>
<interface>
<name>IBluetoothHci</name>
<instance>default</instance>