Feature/wfm demod: add WideFM software demodulator via DAX IQ#3407
Open
ea5wa wants to merge 2 commits into
Open
Feature/wfm demod: add WideFM software demodulator via DAX IQ#3407ea5wa wants to merge 2 commits into
ea5wa wants to merge 2 commits into
Conversation
Adds a software FM demodulator that receives IQ samples from DAX IQ RX, demodulates them and routes audio to a selected output device (e.g. Hi-Fi Cable) at 48 kHz. New files: - WfmDemodulator: FM discriminator, de-emphasis, volume control - WaveInReader / WaveOutWriter: Win32 audio I/O wrappers - WfmDeviceDialog: output device picker with remember-choice option Wiring: - DaxIqModel: expose iqSamplesReady signal to feed the demodulator - RxApplet / VfoWidget: WFM toggle button (visible in FM/NFM mode only) - MainWindow: activateWFM/deactivateWFM, widens IF filter to ±20 kHz, centers panadapter on slice frequency, restores filter on deactivation - CMakeLists: register new source files
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
Adds a software FM demodulator that receives raw IQ samples from the
radio's DAX IQ RX stream, demodulates them in software, and routes the
resulting audio to a user-selected output device (e.g. a Virtual Audio
Cable such as Hi-Fi Cable Input) at 48 kHz. This makes it possible to
use the Flex radio as a wideband FM / satellite receiver feeding any
Windows audio application — in particular 9k6 packet/telemetry modems
such as hs-soundmodem.
Constitution principle honored: Principle I — the demodulator is
fully self-contained; it activates only when the operator presses the
WFM button and deactivates cleanly on toggle-off or mode change,
restoring the original IF filter without side-effects on any other
subsystem.
Audio path
Flex DAX IQ RX (channel 1, 24 kHz IQ @ 48 kHz sample rate)
└─► DaxIqWorker::processIqPacket()
└─► samplesReady(channel, QVector iqInterleaved, sampleRate)
└─► WfmDemodulator::onIqSamples()
├─► FM discriminator (atan2 phase difference)
├─► 75 µs de-emphasis filter
├─► volume scaling
└─► WaveOutWriter → selected output device @ 48 kHz Int16
On activation the IF filter is widened to ±20 kHz (G3RUH standard) and
the panadapter is centered on the slice frequency so DAX IQ RX 1 is
aligned with the signal. Both are restored on deactivation.
The audio output device is resolved via WfmDeviceDialog on first use;
the choice can be saved to AppSettings ("WfmAudioDevice") to skip the
dialog on subsequent activations.
Changes
New files:
src/core/WfmDemodulator.{h,cpp} — FM discriminator, de-emphasis,
volume control, start/stop lifecycle.
src/core/WaveInReader.{h,cpp} — Win32 waveIn capture wrapper
(reserved for loopback / future use).
src/core/WaveOutWriter.{h,cpp} — Win32 waveOut playback wrapper
used by WfmDemodulator to write PCM to the selected VAC.
src/gui/WfmDeviceDialog.{h,cpp} — output device picker dialog with
"remember my choice" checkbox.
Modified files:
src/models/DaxIqModel.{h,cpp}: expose iqSamplesReady / samplesReady
signals so the demodulator can subscribe to raw IQ without polling.
src/gui/RxApplet.{h,cpp}: WFM toggle button (36×20 px, visible
alongside the mode combo); intercepts "WFM" mode-combo selection.
src/gui/VfoWidget.{h,cpp}: WFM toggle button on the DSP/OPT tab,
visible only when the slice is in FM or NFM mode; auto-unchecks on
mode change.
src/gui/MainWindow.{h,cpp}: activateWFM / deactivateWFM methods;
wires both RxApplet and VfoWidget signals; manages filter save/restore
and panadapter centering.
CMakeLists.txt: registers the four new source files.
.gitignore: added Resumen para empezar de nuevo.txt.
Test plan
Platform: Windows 11, Flex-6600, Hi-Fi Cable (VB-Audio).
WideFM demodulation — satellite 9k6 telemetry:
Tuned Slice A to a satellite downlink frequency in FM mode.
Pressed the WFM button in the RxApplet — WfmDeviceDialog appeared;
selected Hi-Fi Cable Input and checked "remember choice".
Confirmed that:
IF filter widened to ±20 kHz automatically.
Panadapter recentered on the slice frequency.
Audio appeared on Hi-Fi Cable Input at 48 kHz.
Launched hs-soundmodem pointed at Hi-Fi Cable Output; decoded 9k6
FSK satellite telemetry frames correctly with no audio glitches.
Pressed WFM again to deactivate:
Audio stopped.
IF filter restored to its previous width.
No crashes; repeated activate/deactivate cycle 5+ times without issues.
Changed slice mode away from FM — WFM button hid automatically and
demodulator stopped cleanly.
Cleared saved device preference, reactivated — dialog appeared again
as expected.
Device error handling:
Unplugged Hi-Fi Cable, attempted activation — demodulator detected
failed open, cleared the saved preference, and returned gracefully
without crashing.