spkmodem-decode: enforce calibrated seperator range

we weren't actually using what we calculated. this patch
fixes that, thus preventing random noise / microphone
clicks, random artifacts and such from being treated
as real frames (the purpose of is_valid_signal is
partly noise suppression).

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-13 01:42:41 +00:00
parent 9d24b78340
commit 9e94cc017a
+8 -2
View File
@@ -390,8 +390,14 @@ select_separator_tone(struct decoder_state *st)
static int static int
is_valid_signal(struct decoder_state *st) is_valid_signal(struct decoder_state *st)
{ {
return (st->freq_separator > 0 && if (st->freq_data <= 0)
st->freq_data > 0); return 0;
if (st->freq_separator < st->sep_min ||
st->freq_separator > st->sep_max)
return 0;
return 1;
} }
/* /*