m5: 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:37:31 +0000 (11:37 -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..427bb46
--- /dev/null
@@ -0,0 +1,13 @@
+#
+# Copyright (C) 2021 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+ifeq ($(TARGET_DEVICE), m5)
+
+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 a084651b36f45f49da0cd523c90e1e6ac6b7d661..a007276767f291dbb299ad15ef028658e443c20c 100644 (file)
@@ -13,3 +13,12 @@ TARGET_BOOTLOADER_BOARD_NAME := m5
 
 ## DTB
 TARGET_DTB_NAME := sm1_s905y3_bananapim5
+
+## 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 0e4e0ba8589e5306dd77f82927b5a4b3d85e48ad..e50f3119ad99dfbd556f06c91f9473fe78a26ea8 100644 (file)
--- a/device.mk
+++ b/device.mk
@@ -8,6 +8,14 @@ DEVICE_PATH := device/bananapi/m5
 
 $(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 1e5b4eb155657a102eba375038fe26bbaef37e7c..3abebda2b685ee3ce8f358519690132668418cb6 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>