summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Chan <jc@lineageos.org>2020-05-09 00:26:54 +0800
committerJan Altensen <info@stricted.net>2020-05-16 17:41:10 +0200
commit5502112367b6715547b02b9e8db9320eff49482d (patch)
treea7045681455ff92a293635f6a868bb44d86f5d1e
parent4c9e74f53b0279f3d9bf2549d5bb102f2604794b (diff)
downloadandroid_hardware_samsung-5502112367b6715547b02b9e8db9320eff49482d.tar.gz
android_hardware_samsung-5502112367b6715547b02b9e8db9320eff49482d.tar.bz2
android_hardware_samsung-5502112367b6715547b02b9e8db9320eff49482d.zip
fingerprint: inscreen: allow to set_fod_rect at boot
We found that stock firmware calculates the fod rect from resolution and a set of inscreen fingerprint sensor position data at boot and then use set_fod_rect command to tell the Kernel TSP driver. Then the Kernel TSP driver wrote it to "sponge" (presumably firmware of touchscreen panel). It is not yet known what exactly was done with this data but it is good to keep in line with stock firmware when we can. Change-Id: Id44d399a8dc482c7d6f320a3bbfea1282ac4f83a Signed-off-by: Jesse Chan <jc@lineageos.org>
-rw-r--r--hidl/fingerprint/inscreen/FingerprintInscreen.cpp6
-rw-r--r--hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp
index 1b1f313..d41f9c9 100644
--- a/hidl/fingerprint/inscreen/FingerprintInscreen.cpp
+++ b/hidl/fingerprint/inscreen/FingerprintInscreen.cpp
@@ -74,7 +74,11 @@ static T get(const std::string& path, const T& def) {
}
}
-FingerprintInscreen::FingerprintInscreen() {}
+FingerprintInscreen::FingerprintInscreen() {
+#ifdef FOD_SET_RECT
+ set(TSP_CMD_PATH, FOD_SET_RECT);
+#endif
+}
Return<void> FingerprintInscreen::onStartEnroll() { return Void(); }
diff --git a/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h b/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h
index 92ea3b4..72b616d 100644
--- a/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h
+++ b/hidl/fingerprint/inscreen/include/samsung_fingerprint_inscreen.h
@@ -24,6 +24,8 @@
#define FOD_ENABLE "fod_enable,1,1"
#define FOD_DISABLE "fod_enable,0"
+// #define FOD_SET_RECT "set_fod_rect,554,2263,886,2595"
+
#define FINGERPRINT_ACQUIRED_VENDOR 6
#define VENDORCODE_FINGER_DOWN 9002
#define VENDORCODE_FINGER_UP 9001