update ap6212 configuration, but can't work now
This commit is contained in:
parent
0ecc9cfb31
commit
4ff47aa650
7 changed files with 106 additions and 28 deletions
|
@ -93,14 +93,15 @@ endif
|
|||
# 2. Bluetooth Configuration
|
||||
# make sure BOARD_HAVE_BLUETOOTH is true for every bt vendor
|
||||
|
||||
BOARD_BLUETOOTH_VENDOR := realtek
|
||||
BOARD_BLUETOOTH_VENDOR := broadcom
|
||||
|
||||
# 2.1 broadcom bt configuration
|
||||
# BOARD_HAVE_BLUETOOTH_NAME: ap6210/ap6212/ap6330/ap6335
|
||||
ifeq ($(BOARD_BLUETOOTH_VENDOR), broadcom)
|
||||
BOARD_HAVE_BLUETOOTH := true
|
||||
BOARD_HAVE_BLUETOOTH_BCM := true
|
||||
BOARD_HAVE_BLUETOOTH_NAME := ap6255
|
||||
BOARD_HAVE_BLUETOOTH_NAME := ap6212
|
||||
BOARD_CUSTOM_BT_CONFIG := $(TOP_DIR)device/softwinner/$(basename $(TARGET_DEVICE))/configs/bluetooth/vnd_$(basename $(TARGET_DEVICE)).txt
|
||||
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(TOP_DIR)device/softwinner/$(basename $(TARGET_DEVICE))/configs/bluetooth/
|
||||
endif
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#ifndef _BDROID_BUILDCFG_H
|
||||
#define _BDROID_BUILDCFG_H
|
||||
|
||||
#ifdef BLUETOOTH_RTK
|
||||
|
||||
/*
|
||||
#define BTM_DEF_LOCAL_NAME "Realtek Bluetooth"
|
||||
*/
|
||||
|
@ -70,4 +72,61 @@
|
|||
#define BT_HCI_DEVICE_NODE_MAX_LEN 512
|
||||
|
||||
#define KERNEL_MISSING_CLOCK_BOOTTIME_ALARM TRUE
|
||||
|
||||
#else
|
||||
#define BTM_DEF_LOCAL_NAME "BPI-M64"
|
||||
#define BTA_DM_COD {0x20, BTM_COD_MAJOR_AUDIO, BTM_COD_MINOR_SET_TOP_BOX}
|
||||
|
||||
#define BLE_VND_INCLUDED TRUE
|
||||
|
||||
// Turn off BLE_PRIVACY_SPT. Remote reconnect fails on
|
||||
// often if this is enabled.
|
||||
#define BLE_PRIVACY_SPT FALSE
|
||||
|
||||
// Force connection interval to 13.75ms
|
||||
#define BTM_BLE_CONN_INT_MIN_DEF 11 /* 13.75ms = 11 * 1.25 */
|
||||
#define BTM_BLE_CONN_INT_MAX_DEF BTM_BLE_CONN_INT_MIN_DEF
|
||||
|
||||
// Allow better battery life
|
||||
#define BTM_BLE_CONN_SLAVE_LATENCY_DEF 24
|
||||
|
||||
// Detect disconnects faster
|
||||
#define BTM_BLE_CONN_TIMEOUT_DEF 300
|
||||
|
||||
// Increase background scanning to reduce reconnect time
|
||||
#define BTM_BLE_SCAN_SLOW_INT_1 110 /* 68.75 ms = 110 *0.625 */
|
||||
#define BTM_BLE_SCAN_SLOW_WIN_1 8 /* 5 ms = 8 *0.625 */
|
||||
|
||||
// Disable HFP
|
||||
#define BTIF_HF_SERVICES (BTA_HSP_SERVICE_MASK)
|
||||
#define BTIF_HF_SERVICE_NAMES { BTIF_HSAG_SERVICE_NAME, NULL }
|
||||
|
||||
// Disable compiling code in Bluedroid for profiles we don't support
|
||||
#define BTA_PAN_INCLUDED FALSE
|
||||
#define BNEP_INCLUDED FALSE
|
||||
#define AVDT_INCLUDED FALSE
|
||||
#define PAN_INCLUDED FALSE
|
||||
#define AVCT_INCLUDED FALSE
|
||||
|
||||
/* We will support a remote + 4 game controllers. To be able to
|
||||
* allocate sufficient bandwidth for all devices we will restrict the
|
||||
* Game Controllers to a sniff interval of 13.75ms.
|
||||
*/
|
||||
#define BTA_DM_PM_SNIFF4_MAX 22
|
||||
#define BTA_DM_PM_SNIFF4_MIN 22
|
||||
#define BTA_DM_PM_SNIFF4_ATTEMPT 1
|
||||
#define BTA_DM_PM_SNIFF4_TIMEOUT 0
|
||||
|
||||
#define BTA_DM_PM_SNIFF_HH_OPEN_IDX BTA_DM_PM_SNIFF4
|
||||
#define BTA_DM_PM_HH_OPEN_DELAY 0
|
||||
|
||||
#define BTA_DM_PM_SNIFF_HH_ACTIVE_IDX BTA_DM_PM_SNIFF4
|
||||
#define BTA_DM_PM_HH_ACTIVE_DELAY 0
|
||||
|
||||
#define BTA_DM_PM_SNIFF_HH_IDLE_IDX BTA_DM_PM_SNIFF4
|
||||
#define BTA_DM_PM_HH_IDLE_DELAY 0
|
||||
|
||||
// Change I/O capabilities to output only so pairing uses passkey instead of pin
|
||||
#define BTM_LOCAL_IO_CAPS BTM_IO_CAP_OUT
|
||||
#endif
|
||||
#endif
|
||||
|
|
21
android/device/softwinner/tulip-m64/configs/bluetooth/vnd_tulip-m64.txt
Executable file
21
android/device/softwinner/tulip-m64/configs/bluetooth/vnd_tulip-m64.txt
Executable file
|
@ -0,0 +1,21 @@
|
|||
#Set baudrate to 1500000
|
||||
UART_TARGET_BAUD_RATE=1500000
|
||||
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyS1"
|
||||
FW_PATCHFILE_LOCATION = "/system/vendor/modules/"
|
||||
LPM_IDLE_TIMEOUT_MULTIPLE = 5
|
||||
LPM_SLEEP_MODE = FALSE
|
||||
BT_WAKE_VIA_PROC = TRUE
|
||||
BTVND_DBG = TRUE
|
||||
BTHW_DBG = TRUE
|
||||
VNDUSERIAL_DBG = TRUE
|
||||
UPIO_DBG = TRUE
|
||||
SCO_PCM_ROUTING = 0x00
|
||||
SCO_PCM_IF_CLOCK_RATE = 0x04
|
||||
SCO_PCM_IF_FRAME_TYPE = 0x00
|
||||
SCO_PCM_IF_SYNC_MODE = 0x00
|
||||
SCO_PCM_IF_CLOCK_MODE = 0x00
|
||||
PCM_DATA_FMT_SHIFT_MODE = 0x00
|
||||
PCM_DATA_FMT_FILL_BITS = 0x03
|
||||
PCM_DATA_FMT_FILL_METHOD = 0x00
|
||||
PCM_DATA_FMT_FILL_NUM = 0x00
|
||||
PCM_DATA_FMT_JUSTIFY_MODE = 0x0
|
|
@ -6,6 +6,6 @@ on boot
|
|||
|
||||
# Bluetooth
|
||||
# UART device
|
||||
chmod 0660 /dev/rtk_btusb
|
||||
chown bluetooth net_bt_admin /dev/rtk_btusb
|
||||
chmod 0660 /dev/ttyS1
|
||||
chown bluetooth net_bt_admin /dev/ttyS1
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue