Merge "Revert "Disable FM over UART for pure AOSP configuration""
diff --git a/libbt-vendor/src/bt_vendor_qcom.c b/libbt-vendor/src/bt_vendor_qcom.c
old mode 100644
new mode 100755
index 8cb928b..8cbf5d1
--- a/libbt-vendor/src/bt_vendor_qcom.c
+++ b/libbt-vendor/src/bt_vendor_qcom.c
@@ -451,6 +451,9 @@
return -1;
}
}
+ /* Always perform BT power action so as to have the chance to
+ recover BT power properly from un-expected error. */
+#ifdef CHECK_BT_POWER_PERFORM_ACTION
if(can_perform_action(on) == false) {
ALOGE("%s:can't perform action as it is being used by other clients", __func__);
#ifdef WIFI_BT_STATUS_SYNC
@@ -459,6 +462,9 @@
#endif
goto done;
}
+#else
+ ALOGI("%s: always perform action", __func__);
+#endif
ret = asprintf(&enable_ldo_path, "/sys/class/rfkill/rfkill%d/device/extldo", q->rfkill_id);
if( (ret < 0 ) || (enable_ldo_path == NULL) )
{
@@ -796,6 +802,16 @@
case BT_SOC_ROME:
case BT_SOC_AR3K:
case BT_SOC_CHEROKEE:
+ if (q->soc_type == BT_SOC_ROME)
+ {
+ if (nState == BT_VND_PWR_ON)
+ {
+ /* Always power BT off before power on. */
+ ALOGI("bt-vendor: always power off before power on");
+ bt_powerup(BT_VND_PWR_OFF);
+ }
+ }
+
/* BT Chipset Power Control through Device Tree Node */
retval = bt_powerup(nState);
default:
@@ -1458,10 +1474,10 @@
}
// Entry point of DLib
+/* Remove 'ssr_cleanup' because it's not defined in 'bt_vendor_interface_t'. */
const bt_vendor_interface_t BLUETOOTH_VENDOR_LIB_INTERFACE = {
sizeof(bt_vendor_interface_t),
init,
op,
- cleanup,
- ssr_cleanup
+ cleanup
};