From 7396b53e1bdd1aa5f9dcba760c8993a0cf620b6a Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 29 Mar 2010 11:16:42 -0700 Subject: use bb_rate and if_rate to handle dxc io rates --- host/lib/usrp/usrp2/dsp_impl.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/usrp2') diff --git a/host/lib/usrp/usrp2/dsp_impl.cpp b/host/lib/usrp/usrp2/dsp_impl.cpp index 40ef06a8c..0d43fac0e 100644 --- a/host/lib/usrp/usrp2/dsp_impl.cpp +++ b/host/lib/usrp/usrp2/dsp_impl.cpp @@ -113,7 +113,8 @@ void usrp2_impl::ddc_get(const wax::obj &key, wax::obj &val){ case DSP_PROP_OTHERS:{ prop_names_t others = boost::assign::list_of - ("rate") + ("if_rate") + ("bb_rate") ("decim") ("decims") ("freq") @@ -127,10 +128,14 @@ void usrp2_impl::ddc_get(const wax::obj &key, wax::obj &val){ //handle string-based properties specific to this dsp std::string key_name = key.as(); - if (key_name == "rate"){ + if (key_name == "if_rate"){ val = get_master_clock_freq(); return; } + else if (key_name == "bb_rate"){ + val = get_master_clock_freq()/_ddc_decim; + return; + } else if (key_name == "decim"){ val = _ddc_decim; return; @@ -234,7 +239,8 @@ void usrp2_impl::duc_get(const wax::obj &key, wax::obj &val){ case DSP_PROP_OTHERS:{ prop_names_t others = boost::assign::list_of - ("rate") + ("if_rate") + ("bb_rate") ("interp") ("interps") ("freq") @@ -247,10 +253,14 @@ void usrp2_impl::duc_get(const wax::obj &key, wax::obj &val){ //handle string-based properties specific to this dsp std::string key_name = key.as(); - if (key_name == "rate"){ + if (key_name == "if_rate"){ val = get_master_clock_freq(); return; } + else if (key_name == "bb_rate"){ + val = get_master_clock_freq()/_duc_interp; + return; + } else if (key_name == "interp"){ val = _duc_interp; return; -- cgit v1.2.3