summaryrefslogtreecommitdiffstats
path: root/host/lib/simple_device.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-29 11:16:42 -0700
committerJosh Blum <josh@joshknows.com>2010-03-29 11:16:42 -0700
commit7396b53e1bdd1aa5f9dcba760c8993a0cf620b6a (patch)
tree064f8d3f077ac4b16c8d35dbdfdf9ea7e4b842d3 /host/lib/simple_device.cpp
parent86fffe7f9ed78a682879dd56c26628256f89e6ae (diff)
downloaduhd-7396b53e1bdd1aa5f9dcba760c8993a0cf620b6a.tar.gz
uhd-7396b53e1bdd1aa5f9dcba760c8993a0cf620b6a.tar.bz2
uhd-7396b53e1bdd1aa5f9dcba760c8993a0cf620b6a.zip
use bb_rate and if_rate to handle dxc io rates
Diffstat (limited to 'host/lib/simple_device.cpp')
-rw-r--r--host/lib/simple_device.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/host/lib/simple_device.cpp b/host/lib/simple_device.cpp
index d507762a9..2e6bffc9c 100644
--- a/host/lib/simple_device.cpp
+++ b/host/lib/simple_device.cpp
@@ -116,19 +116,17 @@ public:
* RX methods
******************************************************************/
void set_rx_rate(double rate){
- double samp_rate = _rx_ddc[std::string("rate")].as<double>();
+ double samp_rate = _rx_ddc[std::string("if_rate")].as<double>();
assert_has(get_rx_rates(), rate, "simple device rx rate");
_rx_ddc[std::string("decim")] = size_t(samp_rate/rate);
}
double get_rx_rate(void){
- double samp_rate = _rx_ddc[std::string("rate")].as<double>();
- size_t decim = _rx_ddc[std::string("decim")].as<size_t>();
- return samp_rate/decim;
+ return _rx_ddc[std::string("bb_rate")].as<double>();
}
std::vector<double> get_rx_rates(void){
- return get_xx_rates(_rx_ddc[std::string("decims")], _rx_ddc[std::string("rate")]);
+ return get_xx_rates(_rx_ddc[std::string("decims")], _rx_ddc[std::string("if_rate")]);
}
tune_result_t set_rx_freq(double target_freq){
@@ -167,19 +165,17 @@ public:
* TX methods
******************************************************************/
void set_tx_rate(double rate){
- double samp_rate = _tx_duc[std::string("rate")].as<double>();
+ double samp_rate = _tx_duc[std::string("if_rate")].as<double>();
assert_has(get_tx_rates(), rate, "simple device tx rate");
_tx_duc[std::string("interp")] = size_t(samp_rate/rate);
}
double get_tx_rate(void){
- double samp_rate = _tx_duc[std::string("rate")].as<double>();
- size_t interp = _tx_duc[std::string("interp")].as<size_t>();
- return samp_rate/interp;
+ return _tx_duc[std::string("bb_rate")].as<double>();
}
std::vector<double> get_tx_rates(void){
- return get_xx_rates(_tx_duc[std::string("interps")], _tx_duc[std::string("rate")]);
+ return get_xx_rates(_tx_duc[std::string("interps")], _tx_duc[std::string("if_rate")]);
}
tune_result_t set_tx_freq(double target_freq){