Skip to content

FX3 ADC integration + HSDAOH/MISRC regression fix + CI post-build guards - #17

Merged
harrypm merged 1 commit into
mainfrom
feature/fx3adc-clean-integration
Jul 18, 2026
Merged

harrypm merged 1 commit into
mainfrom
feature/fx3adc-clean-integration

Conversation

@harrypm

@harrypm harrypm commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Summary

FX3 ADC integration + HSDAOH/MISRC regression fix + CI post-build guards, squashed into a single commit on top of main (rebased onto the latest main incl. PR #16 dual-PCM1802 fix).

FX3 ADC integration (vendored cyusb shim, 100 MSPS fx3usbadc capture)

  • Replaced the missing external libcyusb meson lookup with a from-source vendored compat shim (third_party/cyusb/cyusb.{c,h}) over libusb-1.0 — local == CI, no external pkg-config, no system libcyusb shadowing. cyusb_handle aliases libusb_device_handle.
  • gui_fx3.c: corrected fx3usbadc start command for 100 MHz external clock (wIndex=0xC010, config 16; was 0x800C 64 MHz internal); ctrl timeout 100ms→1000ms; send 0x91 before bulk reads; stay on EP 0x81 only (no 0x82/0x83 fallback spam); break capture thread on fatal USB errors + rate-limit transient logs; trimmed dropdown label.
  • Connect-loop fix: FX3/DdD start paths now set capture_start_time + clear reconnect_pending on successful start (watchdog was firing within 2s). Removed pre-CMD_START diagnostic read that poisoned EP 0x81.
  • FX3 capture verified end-to-end at 100 MSPS (PID 0x00F1 fx3usbadc).

HSDAOH/MISRC regression (stale system libhsdaoh)

  • Built misrc_gui had linked a stale /usr/local/lib/libhsdaoh (no srate) instead of vendored .deps/install due to RUNPATH ordering. Removed the stale system lib; rebuild links .deps/install/lib/libhsdaoh.so.0. MISRC + HSDAOH modes confirmed working.

CI post-build guards + FX3 native on all platforms

  • meson.build: cyusb shim built on ALL platforms (Linux/Windows/macOS) when libusb-1.0 found; -DENABLE_FX3=1 + fx3_enabled=true.
  • ci_guard_tests.py: --post-build + --gui-path mode; platform-aware vendored-hsdaoh linkage check (ldd/otool/objdump); FX3-symbol presence check; meson FX3 policy check. Guard gap fix: missing --gui-path in --post-build now FAILs (was silent pass).
  • build.yml: post-build guard step added to all 4 build jobs.

Verification

  • Rebased onto harrypm/main (ab3cc9d, incl. PR Fix dual PCM1802 upstream pairing #16) — clean, no conflicts.
  • ninja misrc_gui misrc_capture clean (rc=0) in build-appimage-local.
  • Pre-build + post-build ci_guard_tests.py suites PASS (rc=0); FX3 symbols + vendored hsdaoh linkage confirmed.

Co-Authored-By: Oz oz-agent@warp.dev

Squashes the FX3 integration branch (f201bda, 8be0341, 0a43e9e, 03ef916) into a
single commit on top of main.

FX3 ADC integration (vendored cyusb shim, 100 MSPS fx3usbadc capture):
- Build was broken by a missing Cypress libcyusb wrapper that lived in /tmp and
  was never committed (lost after reboot). Replaced the external
  dependency('libcyusb') meson lookup with a from-source vendored compat shim
  (third_party/cyusb/cyusb.{c,h}) over libusb-1.0, so local == CI and no
  external pkg-config / no system libcyusb can shadow it. cyusb_handle aliases
  libusb_device_handle, matching gui_fx3.c call sites.
- gui_fx3.c: corrected fx3usbadc start command for 100 MHz external clock
  (wIndex=0xC010, config 16; was 0x800C 64 MHz internal). Ctrl timeout 100ms
  -> 1000ms. Send 0x91 before bulk reads (reference app ordering; sigrok keeps
  post-thread ordering). fx3usbadc stays on EP 0x81 only (no 0x82/0x83 fallback
  spam). Break capture thread on fatal USB errors (NO_DEVICE/NOT_FOUND/NO_MEM/
  ACCESS) + rate-limit transient error logs. Trimmed device dropdown label to
  avoid UI overflow.
- Connect loop fix: FX3/DdD start paths never set capture_start_time, so the
  auto-reconnect watchdog fired within 2s -> stop+reconnect loop. Now sets
  capture_start_time + reconnect_pending=false + capture_timestamp on
  successful start. Removed pre-CMD_START diagnostic read that poisoned EP 0x81.
- FX3 capture verified end-to-end at 100 MSPS (PID 0x00F1 fx3usbadc).

HSDAOH/MISRC regression resolution (root cause: stale system libhsdaoh):
- Built misrc_gui linked a stale manually-installed libhsdaoh at /usr/local/lib
  (no srate field) instead of the vendored .deps/install copy, due to RUNPATH
  ordering. Removed the stale system lib (matches a clean CI runner); rebuild
  now links .deps/install/lib/libhsdaoh.so.0. User confirmed MISRC + HSDAOH
  modes work.

CI post-build guards + FX3 native on all platforms:
- meson.build: build the cyusb compat shim on ALL platforms (Linux, Windows,
  macOS) whenever libusb-1.0 is found; dropped the Linux/non-Linux split.
  -DENABLE_FX3=1 + fx3_enabled=true when libusb found.
- ci_guard_tests.py: --post-build + --gui-path args. check_built_gui_links_
  vendored_hsdaoh (platform-aware: ldd Linux, otool -L macOS, objdump -p DLL
  NEEDED Windows). check_built_gui_has_fx3_symbols (nm/strings for [FX3] +
  'fx3usbadc start command sent'). check_meson_fx3_policy (pre-build text
  check). Guard gap fix: --post-build with a missing --gui-path now FAILS
  instead of silently passing; preflight mode still skips gracefully.
- build.yml: run ci_guard_tests.py --post-build --gui-path $BUILD_DIR/misrc_gui
  after the build in all 4 jobs (linux-appimage, windows-exe, windows-exe-arm64,
  macos-app-build).

Docs: FX3_DEV_ENVIRONMENT.md + misrc_fx3_integration_prompt.md record the SDK
setup, integration, regression, and CI reinforcement.

Verified locally: pre-build + post-build guard suites PASS (rc=0); rebuilt
build-appimage-local/misrc_gui has FX3 symbols + links vendored hsdaoh.

Co-Authored-By: Oz <oz-agent@warp.dev>
@harrypm
harrypm merged commit 08881be into main Jul 18, 2026
10 checks passed
@harrypm
harrypm deleted the feature/fx3adc-clean-integration branch July 18, 2026 19:48
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