[fix](trx-backend-soapysdr): tune wfm stereo filter bw and matrix gain
Restore AUDIO_BW_HZ to 15.8 kHz for cleaner mono path, widen STEREO_DIFF_BW_HZ to 18 kHz for better high-frequency stereo detail, and raise STEREO_MATRIX_GAIN from 0.30 to 0.50 (mathematically correct unity gain for the L=(S+D)/2 stereo matrix). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -11,10 +11,9 @@ const RDS_BPF_Q: f32 = 10.0;
|
|||||||
/// Pilot tone frequency (Hz).
|
/// Pilot tone frequency (Hz).
|
||||||
const PILOT_HZ: f32 = 19_000.0;
|
const PILOT_HZ: f32 = 19_000.0;
|
||||||
/// Audio bandwidth for WFM (Hz).
|
/// Audio bandwidth for WFM (Hz).
|
||||||
/// 18 kHz matches the diff path cutoff so both have identical group delay,
|
/// 15.8 kHz leaves guard band below the 19 kHz pilot and reduces top-end
|
||||||
/// which is required for good stereo separation. The 19 kHz pilot is
|
/// artifacts on strong signals while preserving the useful broadcast range.
|
||||||
/// removed by the notch filter on the mono path.
|
const AUDIO_BW_HZ: f32 = 15_800.0;
|
||||||
const AUDIO_BW_HZ: f32 = 18_000.0;
|
|
||||||
/// Stereo L-R subchannel bandwidth for WFM (Hz).
|
/// Stereo L-R subchannel bandwidth for WFM (Hz).
|
||||||
/// Wider than the mono path to preserve high-frequency stereo detail; the
|
/// Wider than the mono path to preserve high-frequency stereo detail; the
|
||||||
/// 19 kHz pilot is already removed by the coherent demodulation step.
|
/// 19 kHz pilot is already removed by the coherent demodulation step.
|
||||||
@@ -34,7 +33,7 @@ const STEREO_SEPARATION_PHASE_TRIM: f32 = 0.015;
|
|||||||
const STEREO_SEPARATION_GAIN: f32 = 1.000;
|
const STEREO_SEPARATION_GAIN: f32 = 1.000;
|
||||||
/// Extra headroom in the stereo matrix to reduce stereo-only clipping/IMD on
|
/// Extra headroom in the stereo matrix to reduce stereo-only clipping/IMD on
|
||||||
/// strong program material. This keeps bass excursions from flattening treble.
|
/// strong program material. This keeps bass excursions from flattening treble.
|
||||||
const STEREO_MATRIX_GAIN: f32 = 0.30;
|
const STEREO_MATRIX_GAIN: f32 = 0.50;
|
||||||
/// Gentle high-pass memory for the stereo L-R path.
|
/// Gentle high-pass memory for the stereo L-R path.
|
||||||
/// This trims only very low-frequency difference energy that can eat headroom
|
/// This trims only very low-frequency difference energy that can eat headroom
|
||||||
/// and modulate higher-frequency stereo detail.
|
/// and modulate higher-frequency stereo detail.
|
||||||
|
|||||||
Reference in New Issue
Block a user