dopinder: Configure Realtek Bluetooth/Wi-Fi HALs
authorAaron Kling <webgeek1234@gmail.com>
Thu, 1 Jul 2021 00:19:40 +0000 (19:19 -0500)
committerNolen Johnson <johnsonnolen@gmail.com>
Tue, 27 Jul 2021 15:35:58 +0000 (11:35 -0400)
* We're not unifying things, and the stock MultiHAL requires
  framework side magic, so we're going with the hardware/realtek
  solution.

* Set Bluetooth overlays based on stock.

Change-Id: Ie8e0f2d2a5f1cb8337ebe88b903fb18a71602f18

Android.mk [new file with mode: 0644]
BoardConfig.mk
device.mk
lineage.dependencies
overlay/packages/apps/Bluetooth/res/values/config.xml [new file with mode: 0644]

diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..246b24a
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# Copyright (C) 2021 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+ifeq ($(TARGET_DEVICE), dopinder)
+
+LOCAL_PATH := $(call my-dir)
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
+include external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant_conf.mk
+endif
index bd35797211c6bad8f70f7b5001f5ffb7616f3e23..06c643359555fbed7961849bcbc8c9ab1a385662 100644 (file)
@@ -13,3 +13,12 @@ TARGET_BOOTLOADER_BOARD_NAME := sti6140d360
 
 ## DTB
 TARGET_DTB_NAME := g12a_s905x2_u212_sti6130d3x0
+
+## Wi-Fi
+BOARD_WLAN_DEVICE := realtek
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+WPA_SUPPLICANT_VERSION := VER_0_8_X
+BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_rtl
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_rtl
+WIFI_DRIVER_SOCKET_IFACE := wlan0
+PRODUCT_CFI_INCLUDE_PATHS += hardware/realtek/wlan/wpa_supplicant_8_lib
index 5c2b9b63b2169d82297ce627d78d3bb77aa95410..e92759d41278da1389eb2dc0bf41f2c2e2b608da 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -10,6 +10,14 @@ $(call inherit-product, vendor/askey/dopinder/dopinder-vendor.mk)
 
 $(call inherit-product, device/amlogic/g12-common/g12.mk)
 
+## Bluetooth
+BOARD_HAVE_BLUETOOTH_RTK_TV := true
+include hardware/realtek/rtkbt/rtkbt.mk
+
 ## Kernel Modules
 PRODUCT_PACKAGES += \
     8822cs
+
+## Overlays
+DEVICE_PACKAGE_OVERLAYS += \
+    $(DEVICE_PATH)/overlay
index 38fca6723cd8d6743435df4ac0bf03e27c8ff964..0628e3137654c38d0141a1b66daad8724ad603a8 100644 (file)
@@ -6,5 +6,9 @@
   {
     "repository": "android_hardware_amlogic_kernel-modules_rtl8822cs",
     "target_path": "hardware/amlogic/kernel-modules/rtl8822cs"
+  },
+  {
+    "repository": "android_hardware_realtek",
+    "target_path": "hardware/realtek"
   }
 ]
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
new file mode 100644 (file)
index 0000000..7df2fca
--- /dev/null
@@ -0,0 +1,22 @@
+<resources>
+    <bool name="profile_supported_avrcp_controller">false</bool>
+    <bool name="profile_supported_a2dp_sink">false</bool>
+    <bool name="profile_supported_hs_hfp">false</bool>
+    <bool name="profile_supported_pbap">false</bool>
+    <bool name="profile_supported_hdp">false</bool>
+    <bool name="profile_supported_opp">false</bool>
+    <bool name="enable_phone_policy">false</bool>
+
+    <bool name="profile_supported_hfpclient">false</bool>
+    <bool name="hfp_client_connection_service_enabled">false</bool>
+    <bool name="profile_supported_pbapclient">false</bool>
+    <bool name="profile_supported_pan">false</bool>
+    <bool name="profile_supported_mapmce">false</bool>
+
+    <bool name="profile_supported_hid_host">true</bool>
+    <bool name="profile_supported_hid_device">true</bool>
+    <bool name="profile_supported_avrcp_target">true</bool>
+    <bool name="profile_supported_a2dp">true</bool>
+    <bool name="profile_supported_gatt">true</bool>
+    <bool name="profile_supported_map">true</bool>
+</resources>