Merge "Check for antenna connected on activity restart" into fm.lnx.2.1-dev
diff --git a/fm_hci/fm_hci.c b/fm_hci/fm_hci.c
index 2fafe83..a3666af 100644
--- a/fm_hci/fm_hci.c
+++ b/fm_hci/fm_hci.c
@@ -57,6 +57,7 @@
#define WAIT_TIMEOUT 200000 /* 200*1000us */
static void fm_hci_exit(void *arg);
+static int power(struct fm_hci_t *hci, fm_power_state_t state);
static void event_notification(struct fm_hci_t *hci, uint16_t event)
{
@@ -178,7 +179,7 @@
{
fd_set readFds;
sigset_t sigmask, emptymask;
- int n = 0, ret = -1, evt_len = -1;
+ int n = 0, ret = -1, evt_len = -1,status=0;
volatile int fd = hci->fd;
struct sigaction action;
@@ -230,6 +231,10 @@
ALOGI("%s: FM H/w Err Event Recvd. Event Code: 0x%2x", __func__, pbuf->evt_code);
lib_running =0;
hci->vendor->ssr_cleanup(0x22);
+ status = power(hci, FM_RADIO_DISABLE);
+ if (status < 0) {
+ ALOGE("power off fm radio failed during SSR ");
+ }
} else {
ALOGE("%s: Not CS/CC Event: Recvd. Event Code: 0x%2x", __func__, pbuf->evt_code);
}