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

Fix SoapySDRPlay3 edgecase #853

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions trunk-recorder/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,12 @@ bool load_config(string config_file) {
Source *source = new Source(center, rate, error, driver, device, &config);
BOOST_LOG_TRIVIAL(info) << "Max Frequency: " << format_freq(source->get_max_hz());
BOOST_LOG_TRIVIAL(info) << "Min Frequency: " << format_freq(source->get_min_hz());

// SoapySDRPlay3 quirk: autogain must be disabled before any of the gains can be set
if (source->get_device().find("sdrplay") != std::string::npos) {
source->set_gain_mode(agc);
}

if (node.second.count("gainSettings") != 0) {
BOOST_FOREACH (boost::property_tree::ptree::value_type &sub_node, node.second.get_child("gainSettings")) {
source->set_gain_by_name(sub_node.first, sub_node.second.get<double>("", 0));
Expand Down