SoapySDR icon indicating copy to clipboard operation
SoapySDR copied to clipboard

Frequency correction emulation

Open WGH- opened this issue 3 years ago • 1 comments

Many drivers, like the HackRF one, don't have frequency correction implemented, because the hardware doesn't have the ability.

For these devices setFrequencyCorrection is no-op, and hasFrequencyCorrection also returns false.

However, it can be implemented in software. For exampe, gr-osmosdr implements it for HackRF this way. gr-osmosdr also fills more or less the same niche as SoapySDR (even though it can use it as a backend), but it has fewer features and depends on GNU Radio.

In any case, many end users need frequency correction either way. The question is, where should it be implemented, if the device doesn't support it in hardware?

Right now SoapySDR's clients must implemented it, if the devices doesn't support it (hasFrequencyCorrection returns false). But maybe SoapySDR should implement it itself, by claiming it's always available, and using software correction if hardware correction is unavailble?

WGH- avatar Feb 04 '21 14:02 WGH-

The idea of adjusting the main oscillator ppm is that any RF frequency when tuned will match the reference perfectly after the adjustment. To know how the adjustment will effect the RF synthesizer at different frequencies is very hardware specific.

So I think implementing setFrequencyCorrection/hasFrequencyCorrection totally in software for a given module is just fine. If you want a particular support module to have the support, just make a PR in the repo, like SoapyHackRF.

guruofquality avatar Apr 26 '21 03:04 guruofquality