summaryrefslogtreecommitdiffstats
path: root/host/lib/simple_device.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-18 08:15:15 +0000
committerJosh Blum <josh@joshknows.com>2010-03-18 08:15:15 +0000
commitd105f614477c7f2a4f24a4efc802de7eb750bd7a (patch)
tree6c5f6e615f153862e546e5fb3879a400b73bfec1 /host/lib/simple_device.cpp
parent5de235715b36ef9a98ea418832a5382cbf25d4d6 (diff)
parentf2a86eb6389210a8ebd475782ab707f814c6e49c (diff)
downloaduhd-d105f614477c7f2a4f24a4efc802de7eb750bd7a.tar.gz
uhd-d105f614477c7f2a4f24a4efc802de7eb750bd7a.tar.bz2
uhd-d105f614477c7f2a4f24a4efc802de7eb750bd7a.zip
Merge branch 'master' of git@ettus.sourcerepo.com:ettus/uhd into u1e_uhd
Diffstat (limited to 'host/lib/simple_device.cpp')
-rw-r--r--host/lib/simple_device.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/host/lib/simple_device.cpp b/host/lib/simple_device.cpp
index 62a38cb79..79b035071 100644
--- a/host/lib/simple_device.cpp
+++ b/host/lib/simple_device.cpp
@@ -133,8 +133,16 @@ public:
_mboard = (*_dev)[DEVICE_PROP_MBOARD];
_rx_ddc = _mboard[named_prop_t(MBOARD_PROP_RX_DSP, "ddc0")];
_tx_duc = _mboard[named_prop_t(MBOARD_PROP_TX_DSP, "duc0")];
- _rx_subdev = _mboard[MBOARD_PROP_RX_DBOARD][DBOARD_PROP_SUBDEV];
- _tx_subdev = _mboard[MBOARD_PROP_TX_DBOARD][DBOARD_PROP_SUBDEV];
+
+ //extract rx subdevice
+ wax::obj rx_dboard = _mboard[MBOARD_PROP_RX_DBOARD];
+ std::string rx_subdev_in_use = rx_dboard[DBOARD_PROP_USED_SUBDEVS].as<prop_names_t>().at(0);
+ _rx_subdev = rx_dboard[named_prop_t(DBOARD_PROP_SUBDEV, rx_subdev_in_use)];
+
+ //extract tx subdevice
+ wax::obj tx_dboard = _mboard[MBOARD_PROP_TX_DBOARD];
+ std::string tx_subdev_in_use = tx_dboard[DBOARD_PROP_USED_SUBDEVS].as<prop_names_t>().at(0);
+ _tx_subdev = tx_dboard[named_prop_t(DBOARD_PROP_SUBDEV, tx_subdev_in_use)];
}
~simple_device_impl(void){