mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 05:36:23 +02:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user