Repository navigation
Conversation
|
Physical validation (2026-08-14, CV1 hardware):
The post-DFU stale iOS BLE-manager instance is existing app behavior and is recorded separately from this firmware wake-boundary fix. |
96788af to
6e71d90
Compare
|
Verified this independently — the fix is sound and the harness genuinely pins the bug. Detail per file:
The two failing Desktop Swift checks are unrelated to this change: the log shows macOS fault-suite infrastructure errors ( Nice work on the failure-boundary writeup and the mutation-control evidence in the PR description — that's exactly the kind of verification record that makes firmware review tractable. Leaving for human maintainer review before it moves out of draft — mainly to sanity-check the reconnect one-shot policy (one bounded wake request per BLE connection) as the intended product behavior for #7206. — glm-5.3, Omi maintainer automation by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Physical-validation status update for @Git-on-my-level: The host harness still validates the narrow bug fixed by this PR, but further testing of the physical So this PR repairs a real AAD-entry race, but it is not yet the final fix for the connected-but-not-recording/transcribing failure class or for #7206. The remaining adjacent fault is below the live-preview/backend layer and may involve the physical AAD/PDM lifecycle, actual audio-subscription state, or the firmware's live-vs-durable routing boundary. The current host shim cannot distinguish those states. We are keeping this PR in draft while building a physical test jig that will leave the CV1 attached to a Segger and expose the board safely enough to trace AAD/PDM state, encoded-frame progress, GATT subscription/notification progress, discard routing, and SD write advancement. The jig needs to be completed before additional firmware flashes and physical validation can continue. No broader firmware workaround should be inferred from the current patch until that hardware trace is available. |
|
Thanks @axAilotl — this is a well-scoped repair for the persistent no-wake part of #7206, and the production-linked harness is exactly the kind of regression this subsystem needs. Notes from glm-5.3 (automated maintainer review): Core fix is sound
Harness verified I built and ran Notes
Marking ready-for-review plus a firmware maintainer's on-device sign-off on the settle-window arming is what's left here; leaving for human maintainer review with that specific ask. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Extended physical validation update (2026-08-15/16, CV1 hardware): The instrumented signed The good result is that the original permanent-sleep failure did not recur. On one uninterrupted application boot:
However, this run also confirms the power concern raised above. The retained trace covers the final 4.45 hours of the first checkpoint and contains 225 rate-limited sleep events with 225 matching wakes; every sampled wake follows its sleep by only about 66–67 ms. The unthrottled counters show 2,814 cycles in roughly 12 hours and another 1,531 cycles in 5 h 16 min. With the configured 10-second quiet hold, that cadence is strongly consistent with the newly armed WAKE path immediately undoing nearly every AAD entry rather than the microphone remaining asleep until later acoustic activity. The 09:15→14:31 interval was consequently capture-active for about 91.2% of wall time and consumed 14 battery-percentage points (about 2.7 points/hour; gauge-derived, not calibrated current measurement). So the patch fixes the catastrophic stranded-asleep behavior, but the present implementation does not yet pass the intended low-power AAD boundary: it appears to trade permanent sleep for near-continuous sleep/wake cycling. One user-visible no-transcription incident during the soak was not a recurrence of the pendant failure: direct SWD counters and iPhone GATT traffic continued advancing while text was absent, and restarting only the app restored transcription without resetting the pendant. Conclusion: keep this PR in draft. The production-linked harness remains valid for the lost-edge regression, but the physical acceptance test now also needs to require a real quiet dwell in AAD sleep, bounded wake latency on actual sound, and no entry-transient wake loop. The pendant is still running toward a near-depletion checkpoint; final RAM trace and battery/state evidence will be captured before it is allowed to shut down. |
|
Thanks @axAilotl — this is a focused repair of the #7206 no-wake boundary with an unusually strong verification story. Independent results from my side: Ran the new harness ( File notes:
CI note: the two failing checks (Desktop Swift Build & Tests, Desktop Swift Static & Test Contracts) are in the desktop Swift lane, which this diff does not touch; their logs show a macOS harness port collision / detached-app TERM case and workflow fixture mismatches, and the same lane has intermittent failures on Minor, non-blocking: the shim's settle injection matches Since this changes on-device power-state behavior for the listening pendant and ships through the manual firmware release flow, keeping by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Keep the CV1 microphone on a T5838-compliant 640 kHz PDM clock, gate quiet audio in software with bounded pre-roll, and expose SWD-readable soak counters. Hardware AAD sleep remains disabled on the unqualified CV1 v0.5 WAKE path.\n\nVerification:\n- plus56 host audio/VAD regression test passed\n- signed NCS 2.9.0 sysbuild completed\n- J-Link flash and verify succeeded on serial 69650697\n- physical quiet-to-voice transition replayed five pre-roll blocks with zero emit failures
Fall back from the failing CMD18/CMD12 batch path to individually checked CMD17 sector reads, latch the safe mode for the boot, preserve unread tail metadata, and keep caller buffers alive until the SD worker completes. Verification: plus57 SD fallback host regression; plus56 audio/VAD host regression; NCS 2.9 sysbuild/sign; J-Link verify; physical 23,650-record backlog drain with zero fallback failures and zero dropped packets. Failure-Class: none
6e71d90 to
e58b0fc
Compare
|
Thanks @axAilotl — supersession understood: the narrow AAD-arming patch verified earlier on hardware was overtaken by your finding of the 66-67 ms entry-transient loop, and this rework chooses reliable continuous capture over the unqualified CV1 v0.5 WAKE path. The failure-boundary writeup is unusually precise. Notes per file on the new head (both host regressions re-run independently from this branch: they compile clean under -Wall -Wextra -Werror and pass):
Two items before this leaves draft:
One judgment call for maintainers (label already present): this ships continuous PDM capture with software gating, so the mic rail never sleeps. Given the WAKE-path hardware findings that is the right reliability call, but it is a CV1 power-budget/product direction decision that needs maintainer sign-off before merge. Leaving for human maintainer review on that trade-off; the mechanical work here looks sound. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Hey @axAilotl 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Summary
This supersedes the earlier narrow AAD-entry patch on this PR. Physical testing proved that patch fixed the lost-edge race but exposed a real-hardware 66-67 ms sleep/re-wake loop. The qualified fix therefore does not claim hardware-AAD low-power operation: it chooses reliable capture and durable recovery over the unqualified CV1 v0.5 WAKE path.
Failure boundary
Firmware 3.0.21 could fail in two independent ways:
The new boundary keeps the microphone/PDM active, performs silence gating after capture, and treats multi-sector read failure as a one-way boot-local transition to individually verified sectors. Ring cursors advance only after successful delivery; failed reads never consume the unread tail.
Exact scope relative to firmware 3.0.21
The qualified image is exactly two commits on tag
Omi_CV1_v3.0.21:3.0.21+56: continuous capture, 640 kHz PDM, software VAD, bounded pre-roll, and SWD-readable soak counters3.0.21+57: CMD17 SD-read fallback plus SD-worker buffer-lifetime repairFor review, those same changed files are transplanted onto current
main; every firmware file changed by the qualified +57 image is byte-identical on this PR head.No app change is required. This patch does not change BLE services, ring opcodes, record layout, Opus framing, or cursor semantics. The existing app ring-sync implementation for firmware 3.0.20+ was used throughout physical qualification and drained disconnected backlogs successfully.
Physical qualification
Signed
3.0.21+57ran on CV1 hardware attached to J-Link serial69650697. All accepted observations were identity-locked to the production pendant (Omi, BLED0:25:80:82:17:70, modelOmi CV 1); the briefly selected DevKit was excluded before the Android clock started.iOS away/return qualification
is_connected=0; returned-phone drains ultimately consumed every eligible backlog without firmware drops or read/write errors.Android continuous-live qualification
408925/408940, dropped 0, exact software-VAD accounting, zero ring/write-queue/VAD/fallback-sector failures, mounted writable SD, and healthy mic/PDM. The core was resumed.missstates were downstream; neither represented missing or corrupt local audio.Cross-platform interpretation
The qualified result supports review of the firmware change: continuous capture remained alive through silence, software VAD accounting stayed exact, disconnected audio reached SD, returned-phone recovery produced structurally valid non-silent Opus, and the forced SD-read fallback preserved cursor/data integrity.
The earlier hardware-AAD permanent-sleep failure and 66-67 ms entry-transient loop cannot occur in this build because hardware AAD is disabled.
Verification
cc -std=c11 -Wall -Wextra -Werror -Isrc src/audio_frontend.c src/software_vad.c tests/plus56/test_plus56.c -o /tmp/omi-plus56-host-test && /tmp/omi-plus56-host-testcc -std=c11 -Wall -Wextra -Werror -Isrc src/sd_read_recovery.c tests/plus57/test_plus57.c -o /tmp/omi-plus57-host-test && /tmp/omi-plus57-host-testKnown adjacent behavior
Product invariants: none
Failure-Class: none