pothosware / SoapyRTLSDR

SoapySDR RTL-SDR Support Module
https://github.com/pothosware/SoapyRTLSDR/wiki
MIT License
124 stars 29 forks source link

Add support for disabling PLL dithering #68

Closed brianmwaters closed 9 months ago

brianmwaters commented 1 year ago

Requires a fork of librtlsdr with dithering support (like this one), but there's a compile-time check so SoapyRTLSDR can still build when support isn't available.

I did notice that writeSetting("dithering") silently does nothing when the underlying librtlsdr doesn't have dithering support, but this also seems to be the case when you pass junk strings like "foo". I'm not sure if this is desired behavior, but an error message would be helpful (though adding one might break existing code).

zuckschwerdt commented 1 year ago

Looks good to me. We might at some point want to consider switching to runtime feature-detection, e.g.

int __attribute__((weak)) rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on);

if (!rtlsdr_set_bias_tee) {
    // ...
}
brianmwaters commented 1 year ago

Would you all consider a patch (I think it would have to be in the main SoapySDR repo?) that makes writeSetting return an error in the case that the user passes a key that hasn't been defined?

On second thought, breakage might not be that bad. Client code that doesn't check for errors won't be affected, and client code that does, probably really does want to know when its settings aren't being set.

brianmwaters commented 9 months ago

Hi, sorry to pester, but is there anything holding this up? I'd be happy to change something, but last I heard was a LGTM. Thanks btw