jni: fix calibration data path for legacy fm_qsoc_patches
* Set 'TARGET_FM_LEGACY_PATCHLOADER := true' to enable.
Change-Id: Ibfa83ba549b36ad5f93bacf310459bdb0ce33987
diff --git a/jni/Android.mk b/jni/Android.mk
index bf12d79..b536356 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -24,6 +24,10 @@
LOCAL_MODULE := libqcomfm_jni
LOCAL_MODULE_TAGS := optional
+ifeq ($(TARGET_FM_LEGACY_PATCHLOADER),true)
+ LOCAL_CFLAGS += -DFM_LEGACY_PATCHLOADER
+endif
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/jni/FmConst.h b/jni/FmConst.h
index e37160f..f503f83 100644
--- a/jni/FmConst.h
+++ b/jni/FmConst.h
@@ -44,7 +44,11 @@
#define STD_BUF_SIZE 256
const char *const FM_PERFORMANCE_PARAMS = "/etc/fm/fm_srch_af_th.conf";
+#ifdef FM_LEGACY_PATCHLOADER
+const char *const CALIB_DATA_NAME = "/data/app/Riva_fm_cal";
+#else
const char *const CALIB_DATA_NAME = "/data/misc/fm/Riva_fm_cal";
+#endif
#define V4L2_CTRL_CLASS_USER 0x00980000
#define V4L2_CID_BASE (V4L2_CTRL_CLASS_USER | 0x900)