summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-12 23:19:32 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-12 23:21:18 +0000
commitc4fefba877af2a47cc2a32e47e0451603115618f (patch)
treed863181fbd112f0abf7e4dddbe88acbf9dcde46a /util
parent88ca9e6f033f9959d0a6ef3e47a81139a2dfdd1d (diff)
util/spkmodem-decode: don't run decode in col_sep_tone
otherwise, it runs twice Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/spkmodem_decode/spkmodem-decode.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/util/spkmodem_decode/spkmodem-decode.c b/util/spkmodem_decode/spkmodem-decode.c
index 6c7c03df..08e7b17a 100644
--- a/util/spkmodem_decode/spkmodem-decode.c
+++ b/util/spkmodem_decode/spkmodem-decode.c
@@ -307,6 +307,7 @@ handle_audio(struct decoder_state *st)
reset_char(st);
collect_separator_tone(st);
+ decode_pulse(st);
if (set_ascii_bit(st) < 0)
print_char(st);
@@ -328,30 +329,23 @@ collect_separator_tone(struct decoder_state *st)
if (valid_signal(st))
return;
- if (st->sep_samples >= 50 && st->freq_separator <= 0) {
- decode_pulse(st);
+ if (st->sep_samples >= 50 && st->freq_separator <= 0)
return;
- }
st->sep_sum += st->freq_separator;
st->sep_samples++;
- if (st->sep_samples != 50) {
- decode_pulse(st);
+ if (st->sep_samples != 50)
return;
- }
avg = st->sep_sum / st->sep_samples;
- /* ±3 pulse window */
st->sep_min = avg - SEP_TOLERANCE_PULSES;
st->sep_max = avg + SEP_TOLERANCE_PULSES;
if (st->debug)
printf("separator calibrated: %dHz\n",
avg * FRAME_RATE);
-
- decode_pulse(st);
}
/*