aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/tune_helper.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-15 14:57:30 -0700
committerJosh Blum <josh@joshknows.com>2010-07-16 16:51:30 -0700
commit2a3d0e653e9d38dc3eed729d1442f3d98aadb1e5 (patch)
treea3614c0c9b8d6765846715d8902dbc03174a4e7d /host/lib/usrp/tune_helper.cpp
parent1b7bf0ce1a5b5306323730ef790b3038d4ca3979 (diff)
downloaduhd-2a3d0e653e9d38dc3eed729d1442f3d98aadb1e5.tar.gz
uhd-2a3d0e653e9d38dc3eed729d1442f3d98aadb1e5.tar.bz2
uhd-2a3d0e653e9d38dc3eed729d1442f3d98aadb1e5.zip
usrp: removed spectrum inverted property from subdev code and tune helper (it wasnt used)
Diffstat (limited to 'host/lib/usrp/tune_helper.cpp')
-rw-r--r--host/lib/usrp/tune_helper.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/host/lib/usrp/tune_helper.cpp b/host/lib/usrp/tune_helper.cpp
index 1d584913c..dd2985d88 100644
--- a/host/lib/usrp/tune_helper.cpp
+++ b/host/lib/usrp/tune_helper.cpp
@@ -30,13 +30,12 @@ using namespace uhd::usrp;
**********************************************************************/
static bool invert_dxc_freq(
bool outside_of_nyquist,
- bool subdev_spectrum_inverted,
bool subdev_quadrature,
dboard_iface::unit_t unit
){
bool is_tx = unit == dboard_iface::UNIT_TX;
if (subdev_quadrature) return is_tx;
- return outside_of_nyquist xor subdev_spectrum_inverted xor is_tx;
+ return outside_of_nyquist xor is_tx;
}
static tune_result_t tune_xx_subdev_and_dxc(
@@ -46,7 +45,6 @@ static tune_result_t tune_xx_subdev_and_dxc(
){
wax::obj subdev_freq_proxy = subdev[SUBDEV_PROP_FREQ];
bool subdev_quadrature = subdev[SUBDEV_PROP_QUADRATURE].as<bool>();
- bool subdev_spectrum_inverted = subdev[SUBDEV_PROP_SPECTRUM_INVERTED].as<bool>();
wax::obj dxc_freq_proxy = dxc[DSP_PROP_FREQ_SHIFT];
double dxc_sample_rate = dxc[DSP_PROP_CODEC_RATE].as<double>();
@@ -63,9 +61,7 @@ static tune_result_t tune_xx_subdev_and_dxc(
//invert the sign on the dxc freq given the following conditions
bool outside_of_nyquist = std::abs(target_freq - actual_inter_freq) > dxc_sample_rate/2.0;
- if (invert_dxc_freq(
- outside_of_nyquist, subdev_spectrum_inverted, subdev_quadrature, unit
- )) target_dxc_freq *= -1.0;
+ if (invert_dxc_freq(outside_of_nyquist, subdev_quadrature, unit)) target_dxc_freq *= -1.0;
dxc_freq_proxy = target_dxc_freq;
double actual_dxc_freq = dxc_freq_proxy.as<double>();
@@ -85,16 +81,13 @@ static double derive_freq_from_xx_subdev_and_dxc(
){
//extract subdev properties
bool subdev_quadrature = subdev[SUBDEV_PROP_QUADRATURE].as<bool>();
- bool subdev_spectrum_inverted = subdev[SUBDEV_PROP_SPECTRUM_INVERTED].as<bool>();
//extract actual dsp and IF frequencies
double actual_inter_freq = subdev[SUBDEV_PROP_FREQ].as<double>();
double actual_dxc_freq = dxc[DSP_PROP_FREQ_SHIFT].as<double>();
//invert the sign on the dxc freq given the following conditions
- if (invert_dxc_freq(
- false, subdev_spectrum_inverted, subdev_quadrature, unit
- )) actual_dxc_freq *= -1.0;
+ if (invert_dxc_freq(false, subdev_quadrature, unit)) actual_dxc_freq *= -1.0;
return actual_inter_freq - actual_dxc_freq;
}