Skip to content
Snippets Groups Projects
Commit 38c637e5 authored by Satish kumar sugasi's avatar Satish kumar sugasi Committed by Gerrit - the friendly Code Review server
Browse files

Call FM power off api after SSR

This adds logic to do Power control operations after SSR
event received.invokes fmhal service to do Power OFF chip

Change-Id: Ia4e2e720943b02625d22d78757c2f3c748ddec53
parent eead6724
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,7 @@ static int fm_hal_fd =0; ...@@ -57,6 +57,7 @@ static int fm_hal_fd =0;
#define WAIT_TIMEOUT 200000 /* 200*1000us */ #define WAIT_TIMEOUT 200000 /* 200*1000us */
static void fm_hci_exit(void *arg); 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) static void event_notification(struct fm_hci_t *hci, uint16_t event)
{ {
...@@ -178,7 +179,7 @@ static int read_fm_event(struct fm_hci_t *hci, struct fm_event_header_t *pbuf, i ...@@ -178,7 +179,7 @@ static int read_fm_event(struct fm_hci_t *hci, struct fm_event_header_t *pbuf, i
{ {
fd_set readFds; fd_set readFds;
sigset_t sigmask, emptymask; 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; volatile int fd = hci->fd;
struct sigaction action; struct sigaction action;
...@@ -230,6 +231,10 @@ static int read_fm_event(struct fm_hci_t *hci, struct fm_event_header_t *pbuf, i ...@@ -230,6 +231,10 @@ static int read_fm_event(struct fm_hci_t *hci, struct fm_event_header_t *pbuf, i
ALOGI("%s: FM H/w Err Event Recvd. Event Code: 0x%2x", __func__, pbuf->evt_code); ALOGI("%s: FM H/w Err Event Recvd. Event Code: 0x%2x", __func__, pbuf->evt_code);
lib_running =0; lib_running =0;
hci->vendor->ssr_cleanup(0x22); hci->vendor->ssr_cleanup(0x22);
status = power(hci, FM_RADIO_DISABLE);
if (status < 0) {
ALOGE("power off fm radio failed during SSR ");
}
} else { } else {
ALOGE("%s: Not CS/CC Event: Recvd. Event Code: 0x%2x", __func__, pbuf->evt_code); ALOGE("%s: Not CS/CC Event: Recvd. Event Code: 0x%2x", __func__, pbuf->evt_code);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment