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
|
@ -1,24 +1,24 @@
|
|||
on boot
|
||||
insmod /system/vendor/modules/bcmdhd.ko
|
||||
#insmod /system/vendor/modules/bcmdhd.ko
|
||||
insmod /system/vendor/modules/bcm_btlpm.ko
|
||||
|
||||
# bluetooth power up/down interface
|
||||
chmod 0660 /sys/class/rfkill/rfkill0/state
|
||||
chmod 0660 /sys/class/rfkill/rfkill0/type
|
||||
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
|
||||
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
|
||||
chown bluetooth net_bt_admin /sys/class/rfkill/rfkill0/state
|
||||
chown bluetooth net_bt_admin /sys/class/rfkill/rfkill0/type
|
||||
write /sys/class/rfkill/rfkill0/state 0
|
||||
|
||||
# bluetooth LPM
|
||||
chmod 0220 /proc/bluetooth/sleep/lpm
|
||||
chmod 0220 /proc/bluetooth/sleep/btwrite
|
||||
chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
|
||||
chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
|
||||
chown bluetooth net_bt_admin /proc/bluetooth/sleep/lpm
|
||||
chown bluetooth net_bt_admin /proc/bluetooth/sleep/btwrite
|
||||
|
||||
# bluetooth MAC address programming
|
||||
chown bluetooth net_bt_stack ro.bt.bdaddr_path
|
||||
chown bluetooth net_bt_stack /system/etc/bluetooth
|
||||
chown bluetooth net_bt_stack /data/misc/bluetooth
|
||||
chown bluetooth net_bt_admin ro.bt.bdaddr_path
|
||||
chown bluetooth net_bt_admin /system/etc/bluetooth
|
||||
chown bluetooth net_bt_admin /data/misc/bluetooth
|
||||
setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"
|
||||
|
||||
# to observe dnsmasq.leases file for dhcp information of soft ap.
|
||||
|
@ -26,20 +26,24 @@ on boot
|
|||
|
||||
# broadcom wifi service
|
||||
# 1 broadcom wifi sta service
|
||||
service wpa_supplicant /system/bin/wpa_supplicant \
|
||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
||||
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
|
||||
service wpa_supplicant_broadcom /system/vendor/bin/hw/wpa_supplicant \
|
||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
||||
-m/data/misc/wifi/p2p_supplicant.conf \
|
||||
-puse_p2p_group_interface=1p2p_device=1use_multi_chan_concurrent=1 \
|
||||
-O/data/misc/wifi/sockets \
|
||||
-e/data/misc/wifi/entropy.bin \
|
||||
-g@android:wpa_wlan0
|
||||
class main
|
||||
socket wpa_wlan0 dgram 660 wifi wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
# 2 broadcom wifi sta p2p concurrent service
|
||||
service p2p_supplicant /system/bin/wpa_supplicant \
|
||||
service p2p_supplicant /system/vendor/bin/wpa_supplicant \
|
||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
||||
-I/system/etc/wifi/p2p_supplicant_overlay.conf \
|
||||
-puse_p2p_group_interface=1p2p_device=1use_multi_chan_concurrent=1 \
|
||||
-O/data/misc/wifi/sockets \
|
||||
-m/data/misc/wifi/p2p_supplicant.conf \
|
||||
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
|
||||
class main
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
on boot
|
||||
# MAC Program
|
||||
mkdir /data/misc/bluedroid 0770 bluetooth net_bt_admin
|
||||
exec - root system -- /vendor/xbin/macprog.sh
|
||||
chmod 775 /data/misc/wifi
|
||||
|
||||
# Bluetooth
|
||||
# UART device
|
||||
chmod 0660 /dev/ttyS1
|
||||
chown bluetooth net_bt_admin /dev/ttyS1
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
@ -19,3 +19,7 @@ PRODUCT_COPY_FILES += \
|
|||
hardware/aw/wlan/config/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
hardware/aw/wlan/config/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
|
||||
########################
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(TOP_DIR)device/softwinner/common/init.wireless.broadcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wireless.broadcom.rc \
|
||||
$(TOP_DIR)device/softwinner/$(basename $(TARGET_DEVICE))/configs/init.wireless.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wireless.rc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue