goodix55x4: add host-side finger detection via frame diff polling - #4
Open
sidevesh wants to merge 1 commit into
Open
goodix55x4: add host-side finger detection via frame diff polling#4sidevesh wants to merge 1 commit into
sidevesh wants to merge 1 commit into
Conversation
The MCU's FDT-down reply on this firmware doesn't actually block until a real touch — it returns immediately regardless of the configured threshold. This causes the driver to capture frames before any finger is present. Fix by polling captured frames against the calibration background image (empty_img) using a per-pixel absolute difference score. A real touch raises the score well above the background noise floor (~4-5) to ~750+; the threshold is set conservatively at 100. Polls up to 100 times with 100ms delay between attempts before giving up with a retry error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MCU's FDT-down reply on this firmware doesn't actually block until a real touch — it returns immediately regardless of the configured threshold. This causes the driver to capture frames before any finger is present.
Fix by polling captured frames against the calibration background image (empty_img) using a per-pixel absolute difference score. A real touch raises the score well above the background noise floor (~4-5) to ~750+; the threshold is set conservatively at 100. Polls up to 100 times with 100ms delay between attempts before giving up with a retry error.
@TheWeirdDev this has resolved the issue of the fingerprint getting captured immediately without waiting for me to even touch the sensor and then failing on its own after trying multiple times continuously,
wonder what your thoughts are on this and if this issue is affecting this model sensor on all laptops and if this fix is applicable to all or not,
fyi: thanks for working on this project