Skip to content

Commit

Permalink
kitakami: update bluetooth config
Browse files Browse the repository at this point in the history
Change-Id: I7637b53a9f619e68a708451345cdcf29a18f2c37
Signed-off-by: Erik Castricum <[email protected]>
  • Loading branch information
erikcas committed May 22, 2017
1 parent 1b524ce commit e5fd188
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 16 deletions.
2 changes: 1 addition & 1 deletion PlatformConfigOmni.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ USE_SENSOR_MULTI_HAL := true
TARGET_USES_MEDIA_EXTENSIONS := true

#BCM BT/FM
BOARD_HAVE_BCM_FM_SYSFS := "/sys/bus/platform/drivers/bcm43xx_bluetooth/bcm43xx.81/"
BOARD_HAVE_BCM_FM_SYSFS := "/sys/devices/platform/bcm_ldisc/"

# Do not build keymaster
TARGET_PROVIDES_KEYMASTER := true
3 changes: 1 addition & 2 deletions bluetooth/bdroid_buildcfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ static inline const char* getBTDefaultName()
#define BTM_DEF_LOCAL_NAME getBTDefaultName()
#endif // OS_GENERIC

/* #define BTA_AV_CO_CP_SCMS_T TRUE */
#define SDP_AVRCP_1_5 FALSE
#define BTM_WBS_INCLUDED TRUE

#endif
7 changes: 4 additions & 3 deletions bluetooth/vnd_generic.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyHS0"
FW_PATCHFILE_LOCATION = "/system/etc/firmware/"
FW_PATCHFILE_NAME = "BCM43xx.hcd"
BT_WAKE_VIA_PROC = TRUE
BT_WAKE_VIA_PROC_NOTIFY_DEASSERT=TRUE
PROC_BTWRITE_TIMER_TIMEOUT_MS = 0
BT_WAKE_VIA_USERIAL_IOCTL = TRUE
USERIAL_IOCTL_BT_WAKE_ASSERT = 0x5441
USERIAL_IOCTL_BT_WAKE_DEASSERT = 0x5442
USERIAL_IOCTL_BT_WAKE_GET_ST = 0x5443
FW_PATCH_SETTLEMENT_DELAY_MS = 100
UART_TARGET_BAUD_RATE = 3000000
LPM_IDLE_TIMEOUT_MULTIPLE = 5
Expand Down
4 changes: 4 additions & 0 deletions rootdir/init.kitakami-caf.rc
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,10 @@ on boot
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
chown bluetooth net_bt /dev/ttyHS0
chmod 0660 /dev/ttyHS0
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock

# Bluetooth LPM
chown bluetooth net_bt_stack /proc/bluetooth/sleep/proto
Expand Down
117 changes: 107 additions & 10 deletions rootdir/system/etc/bluetooth/bt_vendor.conf
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# UART device port where Bluetooth controller is attached
# (intrface to libbt)
UartPort = /dev/brcm_bt_drv
#######################################################################################
# Common configurations (applies to both V4L2 & non-V4L2)
#######################################################################################

# UART device port of the chip's driver for Uim. UartPort can be
# a wrapper of this port (e.g., for combined BT/FM chips) used in
# libbt.
# UART device port where Bluetooth controller is attached (default ttyS1)
UartPort = /dev/brcm_bt_drv
UimUartPort = /dev/ttyHS0

# Target Baudrate to change to if different from 3000000
# This entry is mandatory if using V4L2
UartBaudRate = 3000000

# Firmware patch file location
FwPatchFilePath = /system/etc/firmware/
# Firmware patch file location (compile default /vendor/firmware)
FwPatchFilePath = /system/etc/firmware

# uncomment if you want to load a specific version
FwPatchFileName = BCM43xx.hcd

# Firmware patch setttlement delay in millisec
Expand All @@ -24,19 +25,111 @@ FwPatchSettlementDelay = 100
# 1: active high (positive logic) (default)
LpmWakePolarity = 1

# stack/controller idle timeout in units (300/25ms)
# make sur controller supports 25ms
#LpmIdleTimeout = 2

#**************************************
# SCO I2S/PCM interface
# 0: PCM
# 1: I2S
#**************************************
#ScoInterface = 0

#**************************************
# SCO over PCM
#
# Configuration for SCO over PCM interface, which parameters are represented by array.
# Each PCM parameters' definations are listed as below, in order. Be NOTICED that
# this setting is ONLY VALID as PCM interface is selected/used.
#
# PCM Frame Type (SCO_PCM_IF_FRAME_TYPE)
# - 0: Short
# - 1: Long
#
# PCM Sync Mode (SCO_PCM_IF_SYNC_MODE)
# - 0: Slave
# - 1: Master
#
# PCM Clock Mode (SCO_PCM_IF_CLOCK_MODE)
# - 0: Slave
# - 1: Master
#
# PCM NBS(Narrow Band Speech) Clock Rate (SCO_PCM_IF_CLOCK_RATE)
# - 0: 128K
# - 1: 256K
# - 2: 512K
# - 3: 1024K
# - 4: 2048K
#
# PCM WBS(Wide Band Speech) Clock Rate (SCO_I2SPCM_IF_CLOCK_RATE4WBS)
# - 0: 128K
# - 1: 256K
# - 2: 512K
# - 3: 1024K
# - 4: 2048K
#
# PCM WBS (Wide Band Speech) Sample Rate (SCO_I2SPCM_IF_SAMPLE_RATE)
#
# - 0: 8K
# - 1: 16K
# - 2: 4K
#
# Carriers do not support 16K voice samples at present,
# so, setting PCM WBS Sample Rate to 8K (0) for now.
#
#**************************************
#ScoPCMifParams = {0,0,0,4,4,0}

#**************************************
# PCM Format
#
# Configuration for PCM format, which parameters are represented by array.
# Each PCM format parameters' definations/descriptions are listed as below, in order.
#
# Shift Mode (PCM_DATA_FMT_SHIFT_MODE)
# - 0: MSB first
# - 1: LSB first
#
# Fill Bits (PCM_DATA_FMT_FILL_BITS)
# - Specifies the value with which to fill unused bits
# if Fill_Method is set to programmable
#
# Fill Method (PCM_DATA_FMT_FILL_METHOD)
# - 0 : 0's
# - 1 : 1's
# - 2 : Signed
# - 3 : Programmable
#
# Fill Num (PCM_DATA_FMT_FILL_NUM)
# - Specifies the number of bits to be filled
#
# Justify Mode (PCM_DATA_FMT_JUSTIFY_MODE)
# - 0: Left justify (fill data shifted out last)
# - 1: Right justify (fill data shifted out first)
#
#**************************************
#ScoPCMFmtParams = {0,0,3,0,0}

#######################################################################################

#######################################################################################
# Configurations specific to V4L2 based solution
#######################################################################################

# Setting this to true enables Low Power Mode (LPM) in the shared
# line discipline driver. Set this to fale if the LPM is not
# enabled or if it is handled in the platform
LpmEnable=true

#For hammerhead and grouper LPM is through bluesleep
#LPM for maguro and manta is done by UART driver itself
LpmUseBluesleep=true
LpmUseBluesleep=false

#Set to true if bd address was programmed into firmware using OTP
UseControllerBdaddr=false

# Enable debugging (add values below to enable multiple options)
#Enable debugging (add values below to enable multiple options)
# enable logging in driver for init/release driver : 1
# enable logging in driver for open : 2
# enable logging in driver for close : 4
Expand All @@ -45,3 +138,7 @@ UseControllerBdaddr=false
DBG_BT_DRV = 31
DBG_LDISC_DRV = 31
DBG_FM_DRV = 31
#***************************************************************************

#######################################################################################

4 changes: 4 additions & 0 deletions system.prop
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ persist.data.mode=concurrent
# Assertive Display
ro.qcom.ad=1
ro.qcom.ad.calib.data=/system/etc/ad_calib.cfg

# Bluetooth
bluetooth.enable_timeout_ms=12000
ro.bluetooth.hfp.ver=1.6

0 comments on commit e5fd188

Please sign in to comment.