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

Rebuild DDC block when sample rate changes #1401

Merged
merged 2 commits into from
Nov 13, 2024
Merged

Rebuild DDC block when sample rate changes #1401

merged 2 commits into from
Nov 13, 2024

Conversation

argilo
Copy link
Member

@argilo argilo commented Nov 13, 2024

downconverter_cc::set_decim_and_samp_rate currently skips rebuilding the DDC block if the decimation value has not changed. This leads to trouble, because it's possible for the sample rate to change while the decimation value remains the same. In this case, a new freq_xlating_fir_filter_ccf needs to be constructed, but that doesn't happen.

To trigger the bug, open an RTL-SDR device through SoapyRTLSDR, and set the sample rate to 2400000. Clicking on a signal will not tune it, because the Frequency Xlating FIR Filter block has its sample rate set to 2048000, the default value used by the SoapyRTLSDR driver.

To fix the problem, I changed downconverter_cc::set_decim_and_samp_rate to always rebuild the DDC block, thereby constructing a new Frequency Xlating FIR Filter block.

@argilo argilo added the bug label Nov 13, 2024
@argilo argilo merged commit 100589b into master Nov 13, 2024
36 checks passed
@argilo argilo deleted the fix-ddc-samp-rate branch November 13, 2024 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant