docs: CNSDK C-ABI surface reference#18
Open
leaiss wants to merge 1 commit into
Open
Conversation
8c883ca to
fae05db
Compare
3f9b609 to
026ca75
Compare
5 tasks
Documents the ~30 CNSDK calls leia_cnsdk.cpp actually makes, plus the init order, thread affinity, and undocumented behaviors that took trial-and-error to figure out at POC time. Pre-Lume-Pad reference for anyone touching CNSDK call sites — most of these constraints aren't in the CNSDK headers. Sections: - Init/teardown timeline (29 numbered steps) - Thread affinity table (main / face_tracking_worker / render) - Per-function notes with parameter expectations + error semantics - Tile-to-eye mapping note + B17 limitation pointer - Version drift watch-list — what to recheck when bumping CNSDK Why this matters pre-Lume-Pad: thread affinity surprises (deadlocks), init-order surprises (NULL handles), and ABI drift surprises (silent renames) each take real hardware time to debug. This doc compresses each into a 30-second lookup. Cross-links: docs/cnsdk-android-calibration.md (the runtime-tunable knobs for B15/B17/B18) and ../docs/getting-started/android-vulkan- extension-survey.md (the runtime side's VK extension list).
026ca75 to
8bb779b
Compare
fae05db to
5635607
Compare
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.
Summary
Stacked on #17 (calibration knobs). New doc at
docs/cnsdk-c-abi-surface.md— reference for the ~30 CNSDK callsleia_cnsdk.cppactually makes, with init order, thread affinity, and undocumented behaviors that took trial-and-error at POC time.Sections
leia_platform_*→leia_core_*async init → device-config snapshot → face-tracking enable → interlacer init → per-frame loop → teardownface_tracking_worker/ render) — since CNSDK doesn't document thread safety, we serialize the device-config calls to one threadleia_core_enable_face_trackingis blocking with no cancel — workaround is a 2s watchdog detach in ourleia_cnsdk_destroy)leia_core_shutdownwasleia_core_releasein 0.6.x)Why this matters pre-Lume-Pad
Three things eat real hardware time when learning CNSDK from scratch: thread-affinity surprises (deadlocks), init-order surprises (NULL handles), and ABI-drift surprises (silent renames). This doc compresses each into a 30-second lookup, so when Lume Pad arrives you spend hardware time on calibration, not figuring out which call order works.
Stacking
Based on #17. Rebase onto main once #17 lands.
🤖 Generated with Claude Code