universal8895: add common bluetooth configuration
authorStricted <info@stricted.net>
Sun, 23 Sep 2018 00:46:37 +0000 (02:46 +0200)
committerJan Altensen <info@stricted.net>
Tue, 3 Sep 2019 17:04:34 +0000 (19:04 +0200)
Change-Id: Ibf15cda6cfd34f44d9aa210369e5bfd9891b5c47

BoardConfigCommon.mk
bluetooth/bdroid_buildcfg.h [new file with mode: 0644]
bluetooth/libbt_vndcfg.txt [new file with mode: 0644]

index a73680cfa7a55ca173f52761c0026634a694b8cd..fd549ff664a93927a58512627e2391017649eb30 100644 (file)
@@ -19,6 +19,9 @@ LOCAL_PATH := device/samsung/universal8895-common
 # Include path
 TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include
 
+# Bluetooth
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
+
 # Firmware
 TARGET_NO_BOOTLOADER := true
 TARGET_NO_RADIOIMAGE := true
@@ -81,6 +84,10 @@ BOARD_USES_DT := true
 # Renderscript
 OVERRIDE_RS_DRIVER := libRSDriverArm.so
 
+# Bluetooth
+BOARD_CUSTOM_BT_CONFIG := $(LOCAL_PATH)/bluetooth/libbt_vndcfg.txt
+BOARD_HAVE_BLUETOOTH := true
+
 # Backlight
 BACKLIGHT_PATH := "/sys/class/backlight/panel/brightness"
 
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
new file mode 100644 (file)
index 0000000..ec43a1b
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ * Copyright (C) 2014 The CyanogenMod Project <http://www.cyanogenmod.org>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _BDROID_BUILDCFG_H
+#define _BDROID_BUILDCFG_H
+
+#define BTM_DEF_LOCAL_NAME   "Samsung Galaxy"
+
+#define BTM_WBS_INCLUDED TRUE       /* Enable WBS */
+#define BTIF_HF_WBS_PREFERRED FALSE /* Don't prefer WBS    */
+
+#define BLE_VND_INCLUDED TRUE
+
+#define BTM_SCO_ENHANCED_SYNC_ENABLED FALSE
+
+#endif
diff --git a/bluetooth/libbt_vndcfg.txt b/bluetooth/libbt_vndcfg.txt
new file mode 100644 (file)
index 0000000..64a3aa8
--- /dev/null
@@ -0,0 +1,7 @@
+BLUETOOTH_UART_DEVICE_PORT = "/dev/ttySAC1"
+FW_PATCHFILE_LOCATION = "/vendor/firmware"
+FW_PATCH_SETTLEMENT_DELAY_MS = 100
+UART_TARGET_BAUD_RATE = 921600
+LPM_IDLE_TIMEOUT_MULTIPLE = 5
+SCO_USE_I2S_INTERFACE = TRUE
+SCO_I2SPCM_IF_ROLE = 0