summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-13 01:59:26 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-13 01:59:26 +0000
commit656c39e45ccb41592776fb49d06c036a7c0f8a6c (patch)
tree23cf89020ddca562add77c5b54467335821957a0 /util
parent9a1bf61bdadc385cced40d9114e54f4888796afb (diff)
spkmodem-decode: reset calibration accumulators
in select_separator_tone, i never reset these after computing their average. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/spkmodem_decode/spkmodem-decode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/spkmodem_decode/spkmodem-decode.c b/util/spkmodem_decode/spkmodem-decode.c
index ee78ed73..0f28bc6f 100644
--- a/util/spkmodem_decode/spkmodem-decode.c
+++ b/util/spkmodem_decode/spkmodem-decode.c
@@ -371,6 +371,10 @@ select_separator_tone(struct decoder_state *st)
st->sep_min = avg - SEP_TOLERANCE_PULSES;
st->sep_max = avg + SEP_TOLERANCE_PULSES;
+ /* reset calibration accumulators */
+ st->sep_sum = 0;
+ st->sep_samples = 0;
+
if (st->debug)
printf("separator calibrated: %dHz\n",
avg * FRAME_RATE);