aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-11-05 12:14:14 -0700
committerJosh Blum <josh@joshknows.com>2011-11-05 12:14:14 -0700
commit8bb81824ea3544352cf528cbd67efd04bde681c9 (patch)
tree8a0753f575f841f416735fccc652da3adaae1d39 /host/lib/usrp/usrp2
parent9c598203327943b6ec042b031849ec6d7d907479 (diff)
downloaduhd-8bb81824ea3544352cf528cbd67efd04bde681c9.tar.gz
uhd-8bb81824ea3544352cf528cbd67efd04bde681c9.tar.bz2
uhd-8bb81824ea3544352cf528cbd67efd04bde681c9.zip
usrp: parse rx stream args scalar
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 660156285..d144c08bf 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -372,6 +372,7 @@ rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args_){
//setup defaults for unspecified values
args.otw_format = args.otw_format.empty()? "sc16" : args.otw_format;
args.channels = args.channels.empty()? std::vector<size_t>(1, 0) : args.channels;
+ const unsigned sc8_scalar = unsigned(args.args.cast<double>("scalar", 0x400));
//calculate packet size
static const size_t hdr_size = 0
@@ -406,7 +407,7 @@ rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args_){
if (chan < num_chan_so_far){
const size_t dsp = num_chan_so_far - chan - 1;
_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, 0x400);
+ _mbc[mb].rx_dsps[dsp]->set_format(args.otw_format, sc8_scalar);
my_streamer->set_xport_chan_get_buff(chan_i, boost::bind(
&zero_copy_if::get_recv_buff, _mbc[mb].rx_dsp_xports[dsp], _1
));