Skip to content
New issue

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

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

Already on GitHub? # to your account

Return the device actual supported sample rate in the SoapySDR module #305

Merged
merged 1 commit into from
Apr 22, 2020
Merged

Return the device actual supported sample rate in the SoapySDR module #305

merged 1 commit into from
Apr 22, 2020

Conversation

skgsergio
Copy link
Contributor

@skgsergio skgsergio commented Apr 3, 2020

Currently, this SoapySDR module returns some fixed values as the sample rate range and only those two values as the list of sample rates.

This causes some issues with apps using SoapySDR to work with LimeSDR devices:

  • Those using the range allow setting the sample rate to values over LimeSDR Mini specification and cause issues.
  • Those using the list of sample rates only get 0.1 and 65 Msps values as is what the module says and for example in LimeSDR Mini 65 Msps is way higher than the 30.72 Msps specification. Also, you don't get more values you can use.

This PR attempts to fix this by getting device values calling to LMS_GetSampleRateRange and returning those in the case of the range function or creating some stepped values in between the min and max values.

In any case, if the LMS_GetSampleRateRange fails it falls back to the previous hardcoded values.

Aditionally for the applications using the list api instead the range one
generate some stepped values so they don't just have the min and max ones.
@gracid gracid merged commit 86d5a3c into myriadrf:master Apr 22, 2020
@skgsergio skgsergio deleted the return-valid-samplerate-values branch April 22, 2020 12:35
@skgsergio
Copy link
Contributor Author

Thank you for merging this! 🚀

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

Successfully merging this pull request may close these issues.

2 participants