ols: fixed demux mode disable noise filter
Demux flag wasn't getting set off if one non-demux sample was ran beforehand. Signed-off-by: Matt Ranostay <mranostay@gmail.com>
This commit is contained in:
parent
6a53bde671
commit
6ebe003985
|
@ -302,10 +302,13 @@ SR_PRIV int ols_set_samplerate(const struct sr_dev_inst *sdi,
|
|||
return SR_ERR_SAMPLERATE;
|
||||
|
||||
if (samplerate > CLOCK_RATE) {
|
||||
sr_info("Enabling demux mode.");
|
||||
devc->flag_reg |= FLAG_DEMUX;
|
||||
devc->flag_reg &= ~FLAG_FILTER;
|
||||
devc->max_probes = NUM_PROBES / 2;
|
||||
devc->cur_samplerate_divider = (CLOCK_RATE * 2 / samplerate) - 1;
|
||||
} else {
|
||||
sr_info("Disabling demux mode.");
|
||||
devc->flag_reg &= ~FLAG_DEMUX;
|
||||
devc->flag_reg |= FLAG_FILTER;
|
||||
devc->max_probes = NUM_PROBES;
|
||||
|
|
Loading…
Reference in New Issue