Skip to content

fix(debug): handle unaligned bus reset captures - #8

Draft
gly11 wants to merge 1 commit into
pr/swift-sbp2-connectorfrom
pr/bus-reset-capture-alignment
Draft

gly11 wants to merge 1 commit into
pr/swift-sbp2-connectorfrom
pr/bus-reset-capture-alignment

Conversation

@gly11

@gly11 gly11 commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary

This PR is stacked on pr/swift-sbp2-connector and fixes bus-reset packet capture handling when the AR buffer data is not naturally aligned.

Bus Reset Capture

  • Copy capture quadlets through aligned local storage before decoding
  • Avoid direct unaligned reads from the received packet buffer
  • Keep the change scoped to the debug capture path

Why this PR

The capture fix is small and independent. Keeping it separate makes the alignment behavior easy to review without pulling in unrelated driver or app changes.

This PR intentionally does not include debug UI, diagnostic handlers, local scripts, install helpers, or documentation-only planning notes.

Verification

Local verification completed for this slice:

git diff --check pr/swift-sbp2-connector..HEAD
xcodebuild -project ASFW.xcodeproj -scheme ASFW -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build

The CMake driver target still needs separate project cleanup because the generated DriverKit header is not available through the current CMake path. Xcode build verification was used as the gate for this slice.

@gly11
gly11 force-pushed the pr/swift-sbp2-connector branch from ab900ba to 62fa6d6 Compare May 27, 2026 14:06
@gly11
gly11 force-pushed the pr/bus-reset-capture-alignment branch from 9ee943e to 85bba25 Compare May 27, 2026 14:06
@gly11
gly11 force-pushed the pr/swift-sbp2-connector branch from 62fa6d6 to 7e2a8e1 Compare May 27, 2026 14:28
@gly11
gly11 force-pushed the pr/bus-reset-capture-alignment branch 2 times, most recently from c5e3b33 to b17eeda Compare May 27, 2026 14:44
@gly11
gly11 force-pushed the pr/swift-sbp2-connector branch from 7e2a8e1 to b8899e8 Compare May 27, 2026 14:44
@gly11
gly11 force-pushed the pr/bus-reset-capture-alignment branch from b17eeda to f7ba5f6 Compare May 27, 2026 14:58
@gly11
gly11 force-pushed the pr/swift-sbp2-connector branch from b8899e8 to 4c2d153 Compare May 27, 2026 14:59
gly11 pushed a commit that referenced this pull request Jul 25, 2026
…ation

44100.md:
- §12: reverse-engineer RME FirefaceAudioDriver's 44.1 cadence — DCL-branch
  Bresenham (increment = rate/8000), closed-loop RX clock recovery via the
  +276 per-group target table and a 1/16 IIR estimate, and per-rate startup
  latency anchors. Behavioral/algorithm observations only (proprietary binary).
- Extend the IDA evidence index and add RME-specific open questions.
- Mark all open questions with status: #6 RESOLVED (Linux cross-check),
  #8 RESOLVED-by-decision (resync branch not needed under replay),
  mrmidi#12 RESOLVED design / capture-gated value; flag #1–#5 as legacy-DCL
  archaeology, not blockers.

SAMPLE_RATE_EXPANSION.md:
- §3: minimal TX cadence contract ({data/no-data, SYT}; DBC free; SYT =
  delta replay + per-rate phase re-anchor; payload separate; RX carries none)
  and what "device-as-master" does and does not remove.
- §8: consolidate the capture-gated items into one measurement (per-rate
  presentation lead + startup-prefix tolerance) in one gated session, partly
  self-instrumented via [TxSyt]/[Zts] traces; #9/#10 moot under replay.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant