diff options
| author | Srinu Jella <sjella@codeaurora.org> | 2014-02-11 12:46:14 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-03-01 22:33:14 -0800 |
| commit | fc4306b1cb3583fdd096a8dec1fba41162a96507 (patch) | |
| tree | f0528490de650abe482d7458d6fce4123a45182f | |
| parent | d98056db831b386ee56197367819f4d200e7bb25 (diff) | |
| download | android_hardware_qcom_bt-fc4306b1cb3583fdd096a8dec1fba41162a96507.tar.gz android_hardware_qcom_bt-fc4306b1cb3583fdd096a8dec1fba41162a96507.tar.bz2 android_hardware_qcom_bt-fc4306b1cb3583fdd096a8dec1fba41162a96507.zip | |
Bluetooth: Enable 500msec delay only for SSR
Enable 500msec delay only for SSR.
CRs-Fixed: 613474
Change-Id: I9193bbef2d913126dd4d4e8c49416aba18538fac
| -rw-r--r-- | libbt-vendor/src/hci_smd.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/libbt-vendor/src/hci_smd.c b/libbt-vendor/src/hci_smd.c index ef084a1..8d86390 100644 --- a/libbt-vendor/src/hci_smd.c +++ b/libbt-vendor/src/hci_smd.c @@ -41,6 +41,12 @@ static char *s_pszDevSmd[] = { "/dev/smd2" }; +/****************************************************************************** +** Externs +******************************************************************************/ +extern int is_bt_ssr_hci; + + /***************************************************************************** ** Functions *****************************************************************************/ @@ -63,7 +69,9 @@ int bt_hci_init_transport_id (int chId ) struct termios term; int fd = -1; int retry = 0; + char ssrvalue[92]= {'\0'}; + ssrvalue[0] = '0'; if(chId > 2 || chId <0) return -1; @@ -89,7 +97,26 @@ int bt_hci_init_transport_id (int chId ) ensure the smd port is successfully opened. TODO: Following sleep to be removed once SMD port is successfully opened immediately on return from the aforementioned open call */ - usleep(500000); + + property_get("bluetooth.isSSR", ssrvalue, ""); + + if(ssrvalue[0] == '1') + { + /*reset the SSR flag */ + if(chId == 1) + { + if(property_set("bluetooth.isSSR", "0") < 0) + { + ALOGE("SSR: hci_smd.c:SSR case : error in setting up property new\n "); + } + else + { + ALOGE("SSR: hci_smd.c:SSR case : Reset the SSr Flag new\n "); + } + } + ALOGE("hci_smd.c:IN SSR sleep for 500 msec New \n"); + usleep(500000); + } if (tcflush(fd, TCIOFLUSH) < 0) { |
