summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-10-27 08:07:45 -0700
committerJosh Blum <josh@joshknows.com>2010-10-27 08:07:45 -0700
commit4fb937339bbe95091b5a22276d9618dc8e178f68 (patch)
tree61a604de6ab352bfe3d90fdc77e0d92ea8501bfc /host/lib/usrp/usrp1
parentdb0e3e574e9058ad51cacea91ccc42f0baed95fa (diff)
parenta7840ebb3f7d7f807d05059e2809eb45cff04899 (diff)
downloaduhd-4fb937339bbe95091b5a22276d9618dc8e178f68.tar.gz
uhd-4fb937339bbe95091b5a22276d9618dc8e178f68.tar.bz2
uhd-4fb937339bbe95091b5a22276d9618dc8e178f68.zip
Merge branch 'next' into usrp_e
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/codec_impl.cpp24
-rw-r--r--host/lib/usrp/usrp1/dboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp1/mboard_impl.cpp2
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp2
4 files changed, 17 insertions, 13 deletions
diff --git a/host/lib/usrp/usrp1/codec_impl.cpp b/host/lib/usrp/usrp1/codec_impl.cpp
index 1756c1ed4..db53be53e 100644
--- a/host/lib/usrp/usrp1/codec_impl.cpp
+++ b/host/lib/usrp/usrp1/codec_impl.cpp
@@ -45,7 +45,7 @@ void usrp1_impl::codec_init(void)
/***********************************************************************
* RX Codec Properties
**********************************************************************/
-static const std::string ad9862_pga_gain_name = "ad9862 pga";
+static const std::string adc_pga_gain_name = "PGA";
void usrp1_impl::rx_codec_get(const wax::obj &key_, wax::obj &val, dboard_slot_t dboard_slot)
{
@@ -62,21 +62,21 @@ void usrp1_impl::rx_codec_get(const wax::obj &key_, wax::obj &val, dboard_slot_t
return;
case CODEC_PROP_GAIN_NAMES:
- val = prop_names_t(1, ad9862_pga_gain_name);
+ val = prop_names_t(1, adc_pga_gain_name);
return;
case CODEC_PROP_GAIN_RANGE:
- UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name);
+ UHD_ASSERT_THROW(key.name == adc_pga_gain_name);
val = usrp1_codec_ctrl::rx_pga_gain_range;
return;
case CODEC_PROP_GAIN_I:
- UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name);
+ UHD_ASSERT_THROW(key.name == adc_pga_gain_name);
val = _codec_ctrls[dboard_slot]->get_rx_pga_gain('A');
return;
case CODEC_PROP_GAIN_Q:
- UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name);
+ UHD_ASSERT_THROW(key.name == adc_pga_gain_name);
val = _codec_ctrls[dboard_slot]->get_rx_pga_gain('B');
return;
@@ -91,12 +91,12 @@ void usrp1_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val, dboard_
//handle the set request conditioned on the key
switch(key.as<codec_prop_t>()) {
case CODEC_PROP_GAIN_I:
- UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name);
+ UHD_ASSERT_THROW(key.name == adc_pga_gain_name);
_codec_ctrls[dboard_slot]->set_rx_pga_gain(val.as<float>(), 'A');
return;
case CODEC_PROP_GAIN_Q:
- UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name);
+ UHD_ASSERT_THROW(key.name == adc_pga_gain_name);
_codec_ctrls[dboard_slot]->set_rx_pga_gain(val.as<float>(), 'B');
return;
@@ -107,6 +107,8 @@ void usrp1_impl::rx_codec_set(const wax::obj &key_, const wax::obj &val, dboard_
/***********************************************************************
* TX Codec Properties
**********************************************************************/
+static const std::string dac_pga_gain_name = "PGA";
+
void usrp1_impl::tx_codec_get(const wax::obj &key_, wax::obj &val, dboard_slot_t dboard_slot)
{
named_prop_t key = named_prop_t::extract(key_);
@@ -122,17 +124,17 @@ void usrp1_impl::tx_codec_get(const wax::obj &key_, wax::obj &val, dboard_slot_t
return;
case CODEC_PROP_GAIN_NAMES:
- val = prop_names_t(1, ad9862_pga_gain_name);
+ val = prop_names_t(1, dac_pga_gain_name);
return;
case CODEC_PROP_GAIN_RANGE:
- UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name);
+ UHD_ASSERT_THROW(key.name == dac_pga_gain_name);
val = usrp1_codec_ctrl::tx_pga_gain_range;
return;
case CODEC_PROP_GAIN_I: //only one gain for I and Q
case CODEC_PROP_GAIN_Q:
- UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name);
+ UHD_ASSERT_THROW(key.name == dac_pga_gain_name);
val = _codec_ctrls[dboard_slot]->get_tx_pga_gain();
return;
@@ -148,7 +150,7 @@ void usrp1_impl::tx_codec_set(const wax::obj &key_, const wax::obj &val, dboard_
switch(key.as<codec_prop_t>()){
case CODEC_PROP_GAIN_I: //only one gain for I and Q
case CODEC_PROP_GAIN_Q:
- UHD_ASSERT_THROW(key.name == ad9862_pga_gain_name);
+ UHD_ASSERT_THROW(key.name == dac_pga_gain_name);
_codec_ctrls[dboard_slot]->set_tx_pga_gain(val.as<float>());
return;
diff --git a/host/lib/usrp/usrp1/dboard_impl.cpp b/host/lib/usrp/usrp1/dboard_impl.cpp
index 3a8480e1b..2a2762a82 100644
--- a/host/lib/usrp/usrp1/dboard_impl.cpp
+++ b/host/lib/usrp/usrp1/dboard_impl.cpp
@@ -124,6 +124,7 @@ void usrp1_impl::rx_dboard_get(const wax::obj &key_, wax::obj &val, dboard_slot_
case DBOARD_PROP_GAIN_GROUP:
val = make_gain_group(
+ _rx_db_eeproms[dboard_slot].id,
_dboard_managers[dboard_slot]->get_rx_subdev(key.name),
_rx_codec_proxies[dboard_slot]->get_link(),
GAIN_GROUP_POLICY_RX
@@ -188,6 +189,7 @@ void usrp1_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val, dboard_slot_
case DBOARD_PROP_GAIN_GROUP:
val = make_gain_group(
+ _tx_db_eeproms[dboard_slot].id,
_dboard_managers[dboard_slot]->get_tx_subdev(key.name),
_tx_codec_proxies[dboard_slot]->get_link(),
GAIN_GROUP_POLICY_TX
diff --git a/host/lib/usrp/usrp1/mboard_impl.cpp b/host/lib/usrp/usrp1/mboard_impl.cpp
index fe3774eb4..669b20efa 100644
--- a/host/lib/usrp/usrp1/mboard_impl.cpp
+++ b/host/lib/usrp/usrp1/mboard_impl.cpp
@@ -98,7 +98,7 @@ static boost::uint32_t calc_rx_mux(
// for all quadrature sources: Z = 0
// for mixed sources: warning + Z = 0
int Z = (num_quads > 0)? 0 : 1;
- if (num_quads != 0 and num_reals != 0) uhd::print_warning(
+ if (num_quads != 0 and num_reals != 0) uhd::warning::post(
"Mixing real and quadrature rx subdevices is not supported.\n"
"The Q input to the real source(s) will be non-zero.\n"
);
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index 276ca86f6..314384e72 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -64,7 +64,7 @@ static device_addrs_t usrp1_find(const device_addr_t &hint)
);
}
catch(...){
- uhd::print_warning(
+ uhd::warning::post(
"Could not locate USRP1 firmware.\n"
"Please install the images package.\n"
);