diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-13 01:59:26 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-13 01:59:26 +0000 |
| commit | 656c39e45ccb41592776fb49d06c036a7c0f8a6c (patch) | |
| tree | 23cf89020ddca562add77c5b54467335821957a0 /util | |
| parent | 9a1bf61bdadc385cced40d9114e54f4888796afb (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.c | 4 |
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); |
