diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-11-15 12:13:43 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-11-29 08:48:51 -0800 |
commit | 0d42e860985ce1744d4c3fa41a1c123575eaa2f8 (patch) | |
tree | ce9be20eb866e3b627528916dbf54adde4dae5a0 /host/lib/usrp/multi_usrp.cpp | |
parent | 1b82c24861e2ecdd9666b0b3c664b43c5978b7c9 (diff) | |
download | uhd-0d42e860985ce1744d4c3fa41a1c123575eaa2f8.tar.gz uhd-0d42e860985ce1744d4c3fa41a1c123575eaa2f8.tar.bz2 uhd-0d42e860985ce1744d4c3fa41a1c123575eaa2f8.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"); |