diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-01-26 13:43:39 +0000 |
---|---|---|
committer | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-01-26 13:43:39 +0000 |
commit | 93ad52ebc6b5b80180df867f59d9c5c007be538b (patch) | |
tree | 8c4b9fbe4cc8e8f988af9983decbeb0055541f1b /libfm_jni | |
parent | 208ee64877e3eae68a21d422bf7f05ff6a747440 (diff) | |
download | android_hardware_qcom_fm-93ad52ebc6b5b80180df867f59d9c5c007be538b.tar.gz android_hardware_qcom_fm-93ad52ebc6b5b80180df867f59d9c5c007be538b.tar.bz2 android_hardware_qcom_fm-93ad52ebc6b5b80180df867f59d9c5c007be538b.zip |
libfm_jni: Confine the firmware-load skipping to the actual loading
Change I31fee137a59256c2b2907b5ff7212327299a9646 removed the
property-setting steps from the initialization routine. Bring it
back, as we may want to use those properties to trigger module
state changes from init. The recommended flow for devices with
the latest IRIS driver is the following:
on property:hw.fm.init=0
write /sys/module/radio_iris_transport/parameters/fmsmd_set 0
on property:hw.fm.init=1
write /sys/module/radio_iris_transport/parameters/fmsmd_set 1
Change-Id: Id1997a51d83b82425630f6975f4020d4a2a448c4
Diffstat (limited to 'libfm_jni')
-rw-r--r-- | libfm_jni/FmIoctlsInterface.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libfm_jni/FmIoctlsInterface.cpp b/libfm_jni/FmIoctlsInterface.cpp index 2f64602..90d62e1 100644 --- a/libfm_jni/FmIoctlsInterface.cpp +++ b/libfm_jni/FmIoctlsInterface.cpp @@ -51,7 +51,6 @@ int FmIoctlsInterface :: start_fm_patch_dl char prop_value[PROPERTY_VALUE_MAX] = {'\0'}; struct v4l2_capability cap; -#ifndef QCOM_NO_FM_FIRMWARE ALOGI("%s: start_fm_patch_dl = %d\n", __func__, fd); ret = ioctl(fd, VIDIOC_QUERYCAP, &cap); ALOGD("%s: executed cmd\n", __func__); @@ -72,6 +71,7 @@ int FmIoctlsInterface :: start_fm_patch_dl ALOGD("set FM_INIT_PROP done"); if(ret != PROP_SET_SUCC) return FM_FAILURE; +#ifndef QCOM_NO_FM_FIRMWARE ret = property_set(SCRIPT_START_PROP, SOC_PATCH_DL_SCRPT); if(ret != PROP_SET_SUCC) return FM_FAILURE; @@ -84,6 +84,13 @@ int FmIoctlsInterface :: start_fm_patch_dl usleep(INIT_WAIT_TIMEOUT); } } +#else + ret = property_set(FM_INIT_PROP, "1"); + usleep(INIT_WAIT_TIMEOUT); + if(ret != PROP_SET_SUCC) + return FM_FAILURE; + init_success = 1; +#endif if(!init_success) { property_set(SCRIPT_STOP_PROP, SOC_PATCH_DL_SCRPT); return FM_FAILURE; @@ -94,10 +101,6 @@ int FmIoctlsInterface :: start_fm_patch_dl }else { return FM_FAILURE; } -#else - usleep(INIT_WAIT_TIMEOUT); - return FM_SUCCESS; -#endif } int FmIoctlsInterface :: close_fm_patch_dl |