Skip to content

Runtime HSDAOH/MISRC backend selection, dual-ADC Channel B support and first-connect fix - #15

Merged
harrypm merged 8 commits into
harrypm:mainfrom
machcnz:main
Jul 16, 2026
Merged

harrypm merged 8 commits into
harrypm:mainfrom
machcnz:main

Conversation

@machcnz

@machcnz machcnz commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Single binary supports both HSDAOH and MISRC hardware modes, selectable at runtime
via the existing MISRC/HSDAOH toggle button. No recompile needed to switch backends.

Changes

Runtime backend selection

  • MISRC/HSDAOH button now selects which capture backend is used at connect time
  • Existing raw-parser and upstream callback paths unchanged, just wired to the toggle

Dual-ADC Channel B support (HSDAOH upstream path)

  • Added stream_id=1 handler for dual AD9226 hardware (auto-detected on first callback)
    -- When dual-ADC detected, merges stream_id=0 (Ch A) and stream_id=1 (Ch B) into the same packed uint32 sample format that MISRC extraction already uses
  • Extraction thread re-reads Channel B availability each loop iteration, so dual-ADC auto-detection during capture works without restarting extraction (simplest code change)
  • Single-ADC hardware unaffected

Dual PCM1802 audio support

  • Added stream_id=3 handler for second PCM1802 on dual-audio hsdaoh hardware

First-connect timeout fix

  • Reset heartbeat baseline and added 5-second grace period after stream start
  • Eliminates connect/disconnect/reconnect cycling on first USB connection

Other

  • FFT grid labels now extend to 20 MHz (was capped at 11 MHz)
  • Device connection and sync logging (device name, backend, single/dual-ADC hsdaoh)
  • MinGW linker fix: crc16_simple static inline in vendored libhsdaoh

Testing

  • hsdaoh: Single AD9226 + single PCM1802: verified working (Windows)
  • hsdaoh: Dual AD9226 + dual PCM1802: implemented, untested (no hardware available yet)
  • MISRC mode: unchanged, not affected

machcnz added 8 commits July 7, 2026 15:17
…e thread

Implemented recording finalization in a separate thread
Added finalization thread for recording stop process and updated related functions to manage thread states and synchronization.

GUI can appear to freeze when finalising writing to spinning disk, due to low throughput completing writes.
Add function to check if finalization is in progress.
Updated record button functionality to support finalizing code and improved UI feedback during recording.
Added comments explaining the requirement of HSDAOH_UPSTREAM for Windows builds.
New feature - record button text displays 'finalize' if capture writes to disk is occuring.
This is most useful when using RF steam flac compression with spinning disks <50MB/sec throughput.
@harrypm
harrypm merged commit 6d31f96 into harrypm:main Jul 16, 2026
12 checks passed
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.

2 participants