[feat](trx-rs): expose WFM stereo denoise toggle

Add a server-side toggle for the multiband stereo denoiser so it can be
enabled or disabled at runtime without restarting the server.

Backend (trx-backend-soapysdr):
- Add `denoise_enabled: bool` to `WfmStereoDecoder`; gate multiband
  blend behind it (falls back to uniform single-band blend when off)
- Add `set_denoise_enabled()` method on `WfmStereoDecoder`
- Propagate `wfm_denoise: bool` through `ChannelDsp`, `SdrPipeline`,
  and `SoapySdrRig`; add `set_wfm_denoise()` at each layer
- Include `wfm_denoise` in `filter_state()` so it flows into snapshots

Protocol / core (trx-core, trx-protocol, trx-server):
- Add `SetWfmDenoise(bool)` to `RigCommand` and `ClientCommand`
- Add default `set_wfm_denoise()` trait method to `RigCat`
- Handle `SetWfmDenoise` in `rig_task.rs` and update `RigFilterState`
- Add `wfm_denoise: bool` (default `true`) to `RigFilterState`

Frontend (trx-frontend-http):
- Add `POST /toggle_wfm_denoise` endpoint
- Add "Denoise On/Off" button next to the stereo/mono audio picker
- Sync button state from SSE filter snapshot (`update.filter.wfm_denoise`)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-02-28 19:47:36 +01:00
parent ffdc193671
commit 95716a0fc3
14 changed files with 118 additions and 8 deletions
+2
View File
@@ -298,6 +298,7 @@ mod tests {
fir_taps: 64,
cw_center_hz: 700,
wfm_deemphasis_us: 75,
wfm_denoise: true,
}),
..minimal_snapshot()
})
@@ -334,6 +335,7 @@ mod tests {
fir_taps: 128,
cw_center_hz: 700,
wfm_deemphasis_us: 50,
wfm_denoise: true,
}),
..minimal_snapshot()
};
+2
View File
@@ -51,6 +51,7 @@ pub fn client_command_to_rig(cmd: ClientCommand) -> RigCommand {
ClientCommand::SetWfmDeemphasis { deemphasis_us } => {
RigCommand::SetWfmDeemphasis(deemphasis_us)
}
ClientCommand::SetWfmDenoise { enabled } => RigCommand::SetWfmDenoise(enabled),
ClientCommand::GetSpectrum => RigCommand::GetSpectrum,
}
}
@@ -95,6 +96,7 @@ pub fn rig_command_to_client(cmd: RigCommand) -> ClientCommand {
RigCommand::SetWfmDeemphasis(deemphasis_us) => {
ClientCommand::SetWfmDeemphasis { deemphasis_us }
}
RigCommand::SetWfmDenoise(enabled) => ClientCommand::SetWfmDenoise { enabled },
RigCommand::GetSpectrum => ClientCommand::GetSpectrum,
}
}
+1
View File
@@ -39,6 +39,7 @@ pub enum ClientCommand {
SetBandwidth { bandwidth_hz: u32 },
SetFirTaps { taps: u32 },
SetWfmDeemphasis { deemphasis_us: u32 },
SetWfmDenoise { enabled: bool },
GetSpectrum,
}