From 48b032e47aae81d0613864781ce1145d757edc7c Mon Sep 17 00:00:00 2001 From: arancormonk <180709949+arancormonk@users.noreply.github.com> Date: Thu, 4 Sep 2025 09:01:17 -0500 Subject: [PATCH] rtl_sdr_fm: fix Gardner timing interpolation cost and gating --- src/rtl_sdr_fm.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rtl_sdr_fm.cpp b/src/rtl_sdr_fm.cpp index 2d1c6d7..1cf7564 100644 --- a/src/rtl_sdr_fm.cpp +++ b/src/rtl_sdr_fm.cpp @@ -1797,7 +1797,10 @@ static inline void fll_update_error(struct demod_state *d) static inline void gardner_timing_adjust(struct demod_state *d) { if (!d->ted_enabled || d->ted_sps <= 1) return; + /* Guard: run TED only when we're near symbol rate to keep CPU low. + Skip when samples-per-symbol is very high unless explicitly forced. */ int sps = d->ted_sps; + if (sps > 12 && !d->ted_force) return; int mu = d->ted_mu_q20; /* Q20 */ int gain = d->ted_gain_q20; /* Q20 */ int16_t *x = d->lowpassed;