Promotion of bt.lnx.2.1-00029.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
926763 I4350a8d88d845cf9c7a1d80ea659763cc5309399 Enable LPM mode by changing BT_VND_OP_LPM_SET_MODE handl
1060839 Ifa2589825c47ef705d29129a53bec63b514e00f4 FM: move FM power control operations to FMhal service
Change-Id: Ifedab3add11999a4cfde5a1cb1cc69addcbc6a6b
CRs-Fixed: 1060839, 926763
diff --git a/libbt-vendor/src/bt_vendor_qcom.c b/libbt-vendor/src/bt_vendor_qcom.c
index 6586f36..278e897 100644
--- a/libbt-vendor/src/bt_vendor_qcom.c
+++ b/libbt-vendor/src/bt_vendor_qcom.c
@@ -725,6 +725,7 @@
char wipower_status[PROPERTY_VALUE_MAX];
char emb_wp_mode[PROPERTY_VALUE_MAX];
char bt_version[PROPERTY_VALUE_MAX];
+ char lpm_config[PROPERTY_VALUE_MAX];
bool ignore_boot_prop = TRUE;
#ifdef READ_BT_ADDR_FROM_PROP
int i = 0;
@@ -1151,8 +1152,21 @@
}
q->cb->lpm_cb(BT_VND_OP_RESULT_SUCCESS);
} else {
- /* respond with failure as it's handled by other mechanism */
- q->cb->lpm_cb(BT_VND_OP_RESULT_FAIL);
+ int lpm_result = BT_VND_OP_RESULT_SUCCESS;
+
+ property_get("persist.service.bdroid.lpmcfg", lpm_config, "all");
+ ALOGI("%s: property_get: persist.service.bdroid.lpmcfg: %s",
+ __func__, lpm_config);
+
+ if (!strcmp(lpm_config, "all")) {
+ // respond with success since we want to hold wake lock through LPM
+ lpm_result = BT_VND_OP_RESULT_SUCCESS;
+ }
+ else {
+ lpm_result = BT_VND_OP_RESULT_FAIL;
+ }
+
+ q->cb->lpm_cb(lpm_result);
}
break;
@@ -1321,9 +1335,6 @@
#ifdef ENABLE_ANT
__op(BT_VND_OP_POWER_CTRL, &pwr_state);
#endif
-#ifdef FM_OVER_UART
- __op(BT_VND_OP_POWER_CTRL, &pwr_state);
-#endif
}
/*Generally switching of chip should be enough*/
__op(BT_VND_OP_POWER_CTRL, &pwr_state);