From 13de90d664207825b6664906f5128207041cbc2a Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sun, 1 Mar 2026 01:55:59 +0100 Subject: [PATCH] [fix](trx-backend-soapysdr): increase wfm resampler taps from 16 to 32 Doubles the polyphase FIR length for the composite-to-audio rate converter, improving stopband rejection from ~25 dB to ~50 dB. This reduces treble distortion from imaging artifacts. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stan Grams --- src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs b/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs index 58dd4d9..6bbd4ad 100644 --- a/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs +++ b/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs @@ -39,7 +39,8 @@ const STEREO_MATRIX_GAIN: f32 = 0.50; /// and modulate higher-frequency stereo detail. const STEREO_DIFF_DC_R: f32 = 0.9995; /// Fractional-resampler FIR taps for WFM audio reconstruction. -const WFM_RESAMP_TAPS: usize = 16; +/// 32 taps gives ~50 dB stopband rejection, enough for clean treble. +const WFM_RESAMP_TAPS: usize = 32; /// Polyphase slots for the WFM fractional FIR resampler. const WFM_RESAMP_PHASES: usize = 32; /// Slightly sub-Nyquist sinc cutoff to tame top-end imaging.