Signed-off-by: Mathieu Trudel-Lapierre <mathieu-tl@xxxxxxxxxx>
---
init.mako.bt.sh | 7 ++-----
init.mako.rc | 6 +++---
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/init.mako.bt.sh b/init.mako.bt.sh
index 4fdd065..d384a32 100644
--- a/init.mako.bt.sh
+++ b/init.mako.bt.sh
@@ -39,8 +39,6 @@ else
BDADDR=`/system/bin/bdAddrLoader -p net.btdut.address -s -x`
fi
-setprop bluetooth.status off
-
logi "BDADDR: $BDADDR"
case $POWER_CLASS in
@@ -65,12 +63,11 @@ fi
case $? in
0) logi "Bluetooth QSoC firmware download succeeded, $PWR_CLASS $BDADDR $TRANSPORT";;
*) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init;
- setprop bluetooth.status off;
exit $exit_code_hci_qcomm_init;;
esac
-setprop bluetooth.status on
-
logi "start bluetooth smd transport"
+echo 1 > /sys/module/hci_smd/parameters/hcismd_set
+
exit 0
diff --git a/init.mako.rc b/init.mako.rc
index e681a49..cada833 100644
--- a/init.mako.rc
+++ b/init.mako.rc
@@ -265,17 +265,17 @@ service rmt_storage /system/bin/rmt_storage
user root
service hciattach /system/bin/sh /system/etc/init.mako.bt.sh
- class late_start
+ class main
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin system
disabled
oneshot
on property:bluetooth.hciattach=true
- start hciattach
+ write /sys/module/hci_smd/parameters/hcismd_set 1
on property:bluetooth.hciattach=false
- setprop bluetooth.status off
+ write /sys/module/hci_smd/parameters/hcismd_set 0
service bridgemgrd /system/bin/bridgemgrd
class main