diff options
-rw-r--r-- | fm_hci/fm_hci.c | 3 | ||||
-rw-r--r-- | jni/FmIoctlsInterface.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/fm_hci/fm_hci.c b/fm_hci/fm_hci.c index a3666af..c48edd5 100644 --- a/fm_hci/fm_hci.c +++ b/fm_hci/fm_hci.c @@ -338,7 +338,8 @@ static void* hci_tx_thread(void *arg) while (lib_running) { pthread_mutex_lock(&hci->event_lock); - pthread_cond_wait(&hci->event_cond, &hci->event_lock); + if (!(ready_events & HC_EVENT_TX)) + pthread_cond_wait(&hci->event_cond, &hci->event_lock); ALOGE("%s: ready_events= %d", __func__, ready_events); events = ready_events; if (ready_events & HC_EVENT_TX) diff --git a/jni/FmIoctlsInterface.cpp b/jni/FmIoctlsInterface.cpp index 046ca1e..640a90f 100644 --- a/jni/FmIoctlsInterface.cpp +++ b/jni/FmIoctlsInterface.cpp @@ -111,6 +111,9 @@ int FmIoctlsInterface :: set_calibration struct v4l2_ext_controls v4l2_ctls; char cal_data[CAL_DATA_SIZE] = {0}; + memset(&v4l2_ctls, 0, sizeof(v4l2_ctls)); + memset(&ext_ctl, 0, sizeof(ext_ctl)); + cal_fp = fopen(CALIB_DATA_NAME, "r"); if(cal_fp != NULL) { if(fread(&cal_data[0], 1, CAL_DATA_SIZE, cal_fp) |