summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiulio Cervera <giulio.cervera@cyanogenmod.org>2014-07-06 19:45:37 +0200
committerGiulio Cervera <giulio.cervera@cyanogenmod.org>2014-07-09 21:41:29 +0200
commit8c6095636435c8bc92220d5e24635d493ee65670 (patch)
treee7af1236cae48fd2a534be38244e683a0755d3c6
parentcbaf21ed5c85985067972ffec09044c8020b6d83 (diff)
shinano: update bt config
* use bluesleep driver * fix bt permissions * clean old qcom cruft Change-Id: I4fba2dac438287f499598934dd72c19e84351e79
-rw-r--r--bluetooth/vnd_shinano.txt14
-rw-r--r--rootdir/init.qcom.rc26
-rw-r--r--rootdir/system/etc/init.qcom.bt.sh83
-rw-r--r--shinano.mk1
4 files changed, 15 insertions, 109 deletions
diff --git a/bluetooth/vnd_shinano.txt b/bluetooth/vnd_shinano.txt
index 7ae98dc..71eae53 100644
--- a/bluetooth/vnd_shinano.txt
+++ b/bluetooth/vnd_shinano.txt
@@ -1,13 +1,13 @@
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyHS0"
FW_PATCHFILE_LOCATION = "/system/etc/firmware"
-BT_WAKE_VIA_PROC = FALSE
+BT_WAKE_VIA_PROC = TRUE
+UART_TARGET_BAUD_RATE = 4000000
LPM_IDLE_TIMEOUT_MULTIPLE = 5
+LPM_BT_WAKE_POLARITY = 0
+LPM_HOST_WAKE_POLARITY = 0
+SCO_USE_I2S_INTERFACE = FALSE
+SCO_I2SPCM_IF_ROLE = 0
BTVND_DBG = FALSE
-BTHW_DBG = FALSE
+BTHW_DBG = TRUE
VNDUSERIAL_DBG = FALSE
UPIO_DBG = FALSE
-UART_TARGET_BAUD_RATE = 3000000
-FW_PATCH_SETTLEMENT_DELAY_MS = 100
-USE_AXI_BRIDGE_LOCK = FALSE
-UART_FORCE_TWO_STOPBITS = TRUE
-LPM_COMBINE_SLEEP_MODE_AND_LPM = 0
diff --git a/rootdir/init.qcom.rc b/rootdir/init.qcom.rc
index c703b91..af0ebda 100644
--- a/rootdir/init.qcom.rc
+++ b/rootdir/init.qcom.rc
@@ -55,17 +55,11 @@ on init
# Bluetooth address setting
setprop ro.bt.bdaddr_path "/data/etc/bluetooth_bdaddr"
- chown bluetooth bluetooth ro.bt.bdaddr_path
+ chown bluetooth net_bt_stack ro.bt.bdaddr_path
- # Enable Bluetooth HFP 1.6
- setprop ro.bluetooth.hfp.ver 1.6
-
- # Disable Bluetooth A2DP SNK
- setprop bluetooth.a2dp.sink.enabled false
-
- # Enable Bluetooth WakeUp trigger
- chown bluetooth net_bt_admin /proc/bluetooth/wakeup/proto
- chmod 0660 /proc/bluetooth/wakeup/proto
+ # bluetooth LPM
+ chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
+ chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
# create directory for scd
mkdir /dev/socket/scd 0755 system system
@@ -126,12 +120,12 @@ on early-boot
on boot
write /sys/module/qpnp_power_on/parameters/forcecrash_on 1
exec /system/bin/btnvtool -O
- chown bluetooth net_bt_admin /sys/class/rfkill/rfkill0/type
- chown bluetooth net_bt_admin /sys/class/rfkill/rfkill0/state
+ 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_admin /dev/ttyHS0
+ chown bluetooth net_bt_stack /dev/ttyHS0
chmod 0660 /dev/ttyHS0
- chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
+ chown bluetooth net_bt_stack /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
# Create QMUX deamon socket area
@@ -153,10 +147,6 @@ on boot
chmod 0660 /dev/smd0
chown system system /dev/smd0
- # BT DUN port-bridge
- chmod 0660 /dev/smd7
- chown bluetooth bluetooth /dev/smd7
-
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
# Remove write permissions to video related nodes
diff --git a/rootdir/system/etc/init.qcom.bt.sh b/rootdir/system/etc/init.qcom.bt.sh
deleted file mode 100644
index 84820fb..0000000
--- a/rootdir/system/etc/init.qcom.bt.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/system/bin/sh
-
-BLUETOOTH_SLEEP_PATH=/proc/bluetooth/sleep/proto
-LOG_TAG="sony-bluetooth"
-LOG_NAME="${0}:"
-
-loge ()
-{
- /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
-}
-
-logi ()
-{
- /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
-}
-
-failed ()
-{
- loge "$1: exit code $2"
- exit $2
-}
-
-# Note that "hci_qcomm_init -e" prints expressions to set the shell variables
-# BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS.
-
-# BR/EDR & LE power class configurations
-POWER_CLASS=`getprop qcom.bt.dev_power_class`
-LE_POWER_CLASS=`getprop qcom.bt.le_dev_pwr_class`
-
-#find the transport type
-TRANSPORT=`getprop ro.qualcomm.bt.hci_transport`
-logi "Transport : $TRANSPORT"
-
-#load bd addr
-BDADDR=`/system/bin/cat /data/etc/bluetooth_bdaddr`
-
-setprop bluetooth.status off
-
-logi "BDADDR: $BDADDR"
-
-case $POWER_CLASS in
- 1) PWR_CLASS="-p 0" ;
- logi "Power Class: 1";;
- 2) PWR_CLASS="-p 1" ;
- logi "Power Class: 2";;
- 3) PWR_CLASS="-p 2" ;
- logi "Power Class: CUSTOM";;
- *) PWR_CLASS="";
- logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
- logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";;
-esac
-
-case $LE_POWER_CLASS in
- 1) LE_PWR_CLASS="-P 0" ;
- logi "LE Power Class: 1";;
- 2) LE_PWR_CLASS="-P 1" ;
- logi "LE Power Class: 2";;
- 3) LE_PWR_CLASS="-P 2" ;
- logi "LE Power Class: CUSTOM";;
- *) LE_PWR_CLASS="-P 1";
- logi "LE Power Class: Ignored. Default(2) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
- logi "LE Power Class: To override, Before turning BT ON; setprop qcom.bt.le_dev_pwr_class <1 or 2 or 3>";;
-esac
-
-if [ -z "$BDADDR" ]
-then
- logwrapper /system/bin/hci_qcomm_init -e $PWR_CLASS $LE_PWR_CLASS -vv
-else
- logwrapper /system/bin/hci_qcomm_init -b $BDADDR -e $PWR_CLASS $LE_PWR_CLASS -vv
-fi
-
-case $? in
- 0) logi "Bluetooth QSoC firmware download succeeded, $PWR_CLASS $BDADDR $TRANSPORT";;
- *) failed "Bluetooth QSoC firmware download failed" $?;
- setprop bluetooth.status off;
- exit $?;;
-esac
-
-setprop bluetooth.status on
-
-logi "start bluetooth smd transport"
-
-exit 0
diff --git a/shinano.mk b/shinano.mk
index 1fc9229..67085d3 100644
--- a/shinano.mk
+++ b/shinano.mk
@@ -44,7 +44,6 @@ PRODUCT_COPY_FILES += \
$(COMMON_PATH)/rootdir/fstab.qcom:root/fstab.qcom \
$(COMMON_PATH)/rootdir/init.qcom.rc:root/init.qcom.rc \
$(COMMON_PATH)/rootdir/init.recovery.qcom.rc:root/init.recovery.qcom.rc \
- $(COMMON_PATH)/rootdir/system/etc/init.qcom.bt.sh:system/etc/init.qcom.bt.sh \
$(COMMON_PATH)/rootdir/ueventd.qcom.rc:root/ueventd.qcom.rc
# Recovery