diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-11-15 12:13:43 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-12-09 11:24:29 -0800 |
commit | 37b3b32c07b229bab003d12385b93e170c5cda0e (patch) | |
tree | 57fa855a4c6ea8ff0dd1164a8d2bf21e24097e3a /host/lib/usrp/multi_usrp.cpp | |
parent | cb3f7db78de5b88c8a7114b4c28ae5e7a9a19196 (diff) | |
download | uhd-37b3b32c07b229bab003d12385b93e170c5cda0e.tar.gz uhd-37b3b32c07b229bab003d12385b93e170c5cda0e.tar.bz2 uhd-37b3b32c07b229bab003d12385b93e170c5cda0e.zip |
rfnoc: legacy_compat gets its own set_{rx,tx}_rate() calls
This avoids double-calling subscribers, and will fix the case where a
rate change in a multi-channel scenario will break because the graph
resolution is done before all rates are set.
Diffstat (limited to 'host/lib/usrp/multi_usrp.cpp')
-rw-r--r-- | host/lib/usrp/multi_usrp.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp index 7c3bf8007..058925a9a 100644 --- a/host/lib/usrp/multi_usrp.cpp +++ b/host/lib/usrp/multi_usrp.cpp @@ -815,6 +815,18 @@ public: } void set_rx_rate(double rate, size_t chan){ + if (is_device3()) { + _legacy_compat->set_rx_rate(rate, chan); + if (chan == ALL_CHANS) { + for (size_t c = 0; c < get_rx_num_channels(); c++){ + do_samp_rate_warning_message(rate, get_rx_rate(c), "RX"); + } + } else { + do_samp_rate_warning_message(rate, get_rx_rate(chan), "RX"); + } + return; + } + if (chan != ALL_CHANS){ _tree->access<double>(rx_dsp_root(chan) / "rate" / "value").set(rate); do_samp_rate_warning_message(rate, get_rx_rate(chan), "RX"); @@ -1343,6 +1355,18 @@ public: } void set_tx_rate(double rate, size_t chan){ + if (is_device3()) { + _legacy_compat->set_tx_rate(rate, chan); + if (chan == ALL_CHANS) { + for (size_t c = 0; c < get_tx_num_channels(); c++){ + do_samp_rate_warning_message(rate, get_tx_rate(c), "TX"); + } + } else { + do_samp_rate_warning_message(rate, get_tx_rate(chan), "TX"); + } + return; + } + if (chan != ALL_CHANS){ _tree->access<double>(tx_dsp_root(chan) / "rate" / "value").set(rate); do_samp_rate_warning_message(rate, get_tx_rate(chan), "TX"); |