summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJason Abele <jason@ettus.com>2010-10-28 18:06:01 -0700
committerJason Abele <jason@ettus.com>2010-10-28 18:14:35 -0700
commit6a3e499f586513d48ef648aa910e252b7d8b046b (patch)
tree04a65feae5af3cb08aa686dee644ddfeb081aefa /host/lib/usrp
parent5f0c948ecc501ff03ba242f64edbdfaa9f748f38 (diff)
downloaduhd-6a3e499f586513d48ef648aa910e252b7d8b046b.tar.gz
uhd-6a3e499f586513d48ef648aa910e252b7d8b046b.tar.bz2
uhd-6a3e499f586513d48ef648aa910e252b7d8b046b.zip
Fix Bandwidth for IQ subdevs on Basic/LF
Additional typo cleanup and fix WBX bandwidth
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/dboard/db_basic_and_lf.cpp14
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp4
-rw-r--r--host/lib/usrp/dboard/db_tvrx.cpp2
-rw-r--r--host/lib/usrp/dboard/db_wbx.cpp4
4 files changed, 17 insertions, 7 deletions
diff --git a/host/lib/usrp/dboard/db_basic_and_lf.cpp b/host/lib/usrp/dboard/db_basic_and_lf.cpp
index 4c49b3bff..f03dd43d1 100644
--- a/host/lib/usrp/dboard/db_basic_and_lf.cpp
+++ b/host/lib/usrp/dboard/db_basic_and_lf.cpp
@@ -31,6 +31,16 @@ using namespace uhd::usrp;
using namespace boost::assign;
/***********************************************************************
+ * Constants
+ **********************************************************************/
+static const uhd::dict<std::string, double> subdev_bandwidth_scalar = map_list_of
+ ("A", 1.0)
+ ("B", 1.0)
+ ("AB", 2.0)
+ ("BA", 2.0)
+;
+
+/***********************************************************************
* The basic and lf boards:
* They share a common class because only the frequency bounds differ.
**********************************************************************/
@@ -163,7 +173,7 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_BANDWIDTH:
- val = 2*_max_freq; //we want complex double-sided
+ val = subdev_bandwidth_scalar[get_subdev_name()]*_max_freq;
return;
default: UHD_THROW_PROP_GET_ERROR();
@@ -274,7 +284,7 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_BANDWIDTH:
- val = 2*_max_freq; //we want complex double-sided
+ val = subdev_bandwidth_scalar[get_subdev_name()]*_max_freq;
return;
default: UHD_THROW_PROP_GET_ERROR();
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index 12e458d8c..152198c3a 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -458,7 +458,7 @@ void rfx_xcvr::rx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_BANDWIDTH:
- val = 2*20.0e6; //30MHz low-pass, we want complex double-sided
+ val = 2*20.0e6; //20MHz low-pass, we want complex double-sided
return;
default: UHD_THROW_PROP_GET_ERROR();
@@ -555,7 +555,7 @@ void rfx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_BANDWIDTH:
- val = 2*20.0e6; //30MHz low-pass, we want complex double-sided
+ val = 2*20.0e6; //20MHz low-pass, we want complex double-sided
return;
default: UHD_THROW_PROP_GET_ERROR();
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp
index 1f3c76556..2873e3d54 100644
--- a/host/lib/usrp/dboard/db_tvrx.cpp
+++ b/host/lib/usrp/dboard/db_tvrx.cpp
@@ -460,7 +460,7 @@ void tvrx::rx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_BANDWIDTH:
- val = 6.0e6; //30MHz low-pass, we want complex double-sided
+ val = 6.0e6;
return;
default: UHD_THROW_PROP_GET_ERROR();
diff --git a/host/lib/usrp/dboard/db_wbx.cpp b/host/lib/usrp/dboard/db_wbx.cpp
index 647f1b975..572f5de97 100644
--- a/host/lib/usrp/dboard/db_wbx.cpp
+++ b/host/lib/usrp/dboard/db_wbx.cpp
@@ -527,7 +527,7 @@ void wbx_xcvr::rx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_BANDWIDTH:
- val = 2*30.0e6; //20MHz low-pass, we want complex double-sided
+ val = 2*20.0e6; //20MHz low-pass, we want complex double-sided
return;
default: UHD_THROW_PROP_GET_ERROR();
@@ -628,7 +628,7 @@ void wbx_xcvr::tx_get(const wax::obj &key_, wax::obj &val){
return;
case SUBDEV_PROP_BANDWIDTH:
- val = 2*30.0e6; //20MHz low-pass, we want complex double-sided
+ val = 2*20.0e6; //20MHz low-pass, we want complex double-sided
return;
default: UHD_THROW_PROP_GET_ERROR();