From e8061763bf63386bbda81b07e82c30b0ec47de6b Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Tue, 25 Aug 2026 15:27:06 -0500 Subject: [PATCH] Remove the ext-audio reconstruction filter in FM mode Further analysis shows this filter does not carry the benefit originally intended: it costs 4 dB at 3.4 kHz on top of the transmit filter and returns no measurable improvement. The downsampler anti-alias filter is worthwhile and is left in place. Improved coefficients were evaluated for both filters and offer no improvement noticeable in real-world use. Co-Authored-By: Claude Opus 5 --- FM.cpp | 8 -------- FM.h | 3 --- 2 files changed, 11 deletions(-) diff --git a/FM.cpp b/FM.cpp index 57afcf0..cfcd6ca 100644 --- a/FM.cpp +++ b/FM.cpp @@ -71,9 +71,6 @@ m_filterStage3(32768, -65536, 32768, 32768, -64075, 31460), m_dsFilterStage1(m_filterStage1),//same coefficients, separate state m_dsFilterStage2(m_filterStage2), m_dsFilterStage3(m_filterStage3), -m_usFilterStage1(m_filterStage1),//same coefficients, separate state -m_usFilterStage2(m_filterStage2), -m_usFilterStage3(m_filterStage3), m_blanking(), m_accessMode(1U), m_linkMode(false), @@ -128,7 +125,6 @@ void CFM::repeaterSamples(bool cos, q15_t* samples, const uint16_t* rssi, uint8_ q15_t currentExtSample; bool inputExt = m_inputExtRB.getSample(currentExtSample);//always consume the external input data so it does not overflow - currentExtSample = m_usFilterStage3.filter(m_usFilterStage2.filter(m_usFilterStage1.filter(currentExtSample))); inputExt = inputExt && m_extEnabled; switch (m_accessMode) { @@ -274,7 +270,6 @@ void CFM::linkSamples(bool cos, q15_t* samples, uint8_t length) // few samples past that point q15_t currentExtSample = 0; bool inputExt = m_inputExtRB.getSample(currentExtSample);//always consume the external input data so it does not overflow - currentExtSample = m_usFilterStage3.filter(m_usFilterStage2.filter(m_usFilterStage1.filter(currentExtSample))); inputExt = inputExt && m_extEnabled; switch (m_accessMode) { @@ -428,9 +423,6 @@ void CFM::reset() m_dsFilterStage1.reset(); m_dsFilterStage2.reset(); m_dsFilterStage3.reset(); - m_usFilterStage1.reset(); - m_usFilterStage2.reset(); - m_usFilterStage3.reset(); m_squelch.reset(); m_needReverse = false; diff --git a/FM.h b/FM.h index 29df859..8d5f49b 100644 --- a/FM.h +++ b/FM.h @@ -83,9 +83,6 @@ private: CFMDirectFormI m_dsFilterStage1; // anti-alias filter for the downsampler, own state CFMDirectFormI m_dsFilterStage2; CFMDirectFormI m_dsFilterStage3; - CFMDirectFormI m_usFilterStage1; // reconstruction filter for the upsampler, own state - CFMDirectFormI m_usFilterStage2; - CFMDirectFormI m_usFilterStage3; CFMBlanking m_blanking; uint8_t m_accessMode; bool m_linkMode;