summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-11-07 15:10:19 -0800
committerJosh Blum <josh@joshknows.com>2011-11-07 15:10:19 -0800
commitf1434d7c52728cbf80e954b4c9414a94eec4c9ce (patch)
treed1f0ee2577d998e8017b77f6d67a866e3887f5cd /host/lib
parent7c503ad1fab5fd6218847b1d030881b4d048379f (diff)
downloaduhd-f1434d7c52728cbf80e954b4c9414a94eec4c9ce.tar.gz
uhd-f1434d7c52728cbf80e954b4c9414a94eec4c9ce.tar.bz2
uhd-f1434d7c52728cbf80e954b4c9414a94eec4c9ce.zip
usrp2: fix channel mapping calculation
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index d144c08bf..8018875ec 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -405,7 +405,7 @@ rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args_){
BOOST_FOREACH(const std::string &mb, _mbc.keys()){
num_chan_so_far += _mbc[mb].rx_chan_occ;
if (chan < num_chan_so_far){
- const size_t dsp = num_chan_so_far - chan - 1;
+ const size_t dsp = chan + _mbc[mb].rx_chan_occ - num_chan_so_far;
_mbc[mb].rx_dsps[dsp]->set_nsamps_per_packet(spp); //seems to be a good place to set this
_mbc[mb].rx_dsps[dsp]->set_format(args.otw_format, sc8_scalar);
my_streamer->set_xport_chan_get_buff(chan_i, boost::bind(
@@ -473,7 +473,7 @@ tx_streamer::sptr usrp2_impl::get_tx_stream(const uhd::stream_args_t &args_){
BOOST_FOREACH(const std::string &mb, _mbc.keys()){
num_chan_so_far += _mbc[mb].tx_chan_occ;
if (chan < num_chan_so_far){
- const size_t dsp = num_chan_so_far - chan - 1;
+ const size_t dsp = chan + _mbc[mb].tx_chan_occ - num_chan_so_far;
my_streamer->set_xport_chan_get_buff(chan_i, boost::bind(
&usrp2_impl::io_impl::get_send_buff, _io_impl.get(), abs, _1
));