summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Strudel <tstrudel@google.com>2016-11-17 12:33:12 -0800
committerThierry Strudel <tstrudel@google.com>2016-11-17 12:50:28 -0800
commit190a4be3a00ae97925465dccdf68ecf1c066306d (patch)
tree5a8622e826cd6693a49d9ace9ed9d1757cbdf7f4
parentb7260c25f01729de51be08443b9618eaf8e8a882 (diff)
downloadbt-190a4be3a00ae97925465dccdf68ecf1c066306d.tar.gz
msmcobalt: Update to 07.00.00.253.042
msmcobalt: from hardware/qcom/bt 18bc73b Promotion of bt.lnx.2.1-00029. 7192a6a FM: move FM power control operations to FMhal service ae8dc96 Enable LPM mode by changing BT_VND_OP_LPM_SET_MODE handler Change-Id: I6765eae62caa335656264220899be841942c8247 Signed-off-by: Thierry Strudel <tstrudel@google.com>
-rw-r--r--msmcobalt/libbt-vendor/src/bt_vendor_qcom.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/msmcobalt/libbt-vendor/src/bt_vendor_qcom.c b/msmcobalt/libbt-vendor/src/bt_vendor_qcom.c
index 6586f36..278e897 100644
--- a/msmcobalt/libbt-vendor/src/bt_vendor_qcom.c
+++ b/msmcobalt/libbt-vendor/src/bt_vendor_qcom.c
@@ -725,6 +725,7 @@ static int __op(bt_vendor_opcode_t opcode, void *param)
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 @@ userial_open:
}
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 @@ static void ssr_cleanup(int reason)
#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);