diff options
author | Giulio Cervera <giulio.cervera@cyanogenmod.org> | 2014-07-06 19:45:37 +0200 |
---|---|---|
committer | Giulio Cervera <giulio.cervera@cyanogenmod.org> | 2014-07-09 21:41:29 +0200 |
commit | 8c6095636435c8bc92220d5e24635d493ee65670 (patch) | |
tree | e7af1236cae48fd2a534be38244e683a0755d3c6 /rootdir | |
parent | cbaf21ed5c85985067972ffec09044c8020b6d83 (diff) |
shinano: update bt config
* use bluesleep driver
* fix bt permissions
* clean old qcom cruft
Change-Id: I4fba2dac438287f499598934dd72c19e84351e79
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/init.qcom.rc | 26 | ||||
-rw-r--r-- | rootdir/system/etc/init.qcom.bt.sh | 83 |
2 files changed, 8 insertions, 101 deletions
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 |