Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbrx: make extra room for history in rx filter #1249

Closed

Conversation

willcode
Copy link
Contributor

@willcode willcode commented May 22, 2023

The default output buffer allocation for the nb (noise blanker) block in nbrx could end up being smaller than the history requirement of the rx filter when filter params are adjusted at runtime. Allocate space for 64k items, which should be enough for a very tight filter.

Fixes #1233

The default output buffer allocation for the nb (noise
blanker) block in nbrx could end up being smaller than
this history requirement of the rx filter when filter
params were adjusted at runtime. Allocate space for 64k
items, which should be enough for a very tight filter.

Signed-off-by: Jeff Long <willcode4@gmail.com>
@vladisslav2011
Copy link
Contributor

I've tried this and it didn't work.

@willcode
Copy link
Contributor Author

You ran this patch, or you've tried something like this before?

@vladisslav2011
Copy link
Contributor

  1. I've tried this before.
  2. I've checked out the commit before my fix (direct implementation of the FIR filter) and added this one line.

It does not work at least on my system.

@willcode
Copy link
Contributor Author

Since the quad rate is fixed at 96k and the filter widths are going to be the same, I'm not sure how we're seeing different results. What do you see if you add this to master? How much space did the error message say it was looking for?

@vladisslav2011
Copy link
Contributor

vladisslav2011 commented May 22, 2023

Master does not compile, so I see nothing.
The error message with this fix:

gr::log :WARN: flat_flowgraph - Block (rx_nb_cc0) max output buffer set to 8192 instead of requested 65536

sched: <block fir_filter_ccc (45)> is requesting more input data
  than we can provide.
  ninput_items_required = 11570
  max_possible_items_available = 8191
  If this is a filter, consider reducing the number of taps.

@willcode
Copy link
Contributor Author

What version of GR?

@vladisslav2011
Copy link
Contributor

vladisslav2011 commented May 22, 2023

linux; GNU C++ version 7.3.0; Boost_106501; UHD_003.010.003.000-0-unknown

qt5ct: using qt5ct plugin
gr-osmosdr 0.1.5 (0.1.5) gnuradio 3.7.11
$ src/gqrx
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-vlad'
gr-osmosdr 0.2.0.0 (0.2.0) gnuradio v3.10.0.0-rc1-277-g463c3477

With this fix applied:

rx_nb_cc :warning: Block (rx_nb_cc0) max output buffer set to 23552 instead of requested 65536
rx_nb_cc :warning: Block (rx_nb_cc0) max output buffer set to 8192 instead of requested 23552
block_executor :error: sched: <block fir_filter_blk<IN_T,OUT_T,TAP_T> (130)> is requesting more input data  than we can provide.  ninput_items_required = 11570  max_possible_items_available = 8191  If this is a filter, consider reducing the number of taps.

And the bug is still here...
I'll update pull recent GNU Radio changes and retest, but it's highly unlikely, that it will work as there were no significant changes to the flat_flowgraph/block_detail...

*rebuilding current GNU Radio main in a Ubuntu 22.04 chroot.

@willcode
Copy link
Contributor Author

No, it's going to be more complicated than this. The GR buffer allocator is not doing what I thought it would do.

@willcode willcode closed this May 22, 2023
@willcode willcode deleted the fix/rx-filter-input-buffer-size branch May 22, 2023 01:21
@vladisslav2011
Copy link
Contributor

Thing are getting more and more interesting here.
Gqrx segfaults when built with current GNU Radio main, so I can't test this at all...

@willcode
Copy link
Contributor Author

Was it a segfault once after build, then worked after that? I've seen that occasionally and don't know what that is about. If it's a constant segfault, I haven't seen it.

@vladisslav2011
Copy link
Contributor

The segfault is not related to this change.
I've made it work. That was HackRF and wrong gr-osmosdr branch without fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting the filter width too narrow causes DSP to hang
2 participants