-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Issue Description
UHD module fails when using two RX channels on USRP B210 with message Invalid recv stream command - stream now on multiple channels in a single streamer will fail to time align.
Setup Details
USRP B210, openSUSE Tumbleweed, SoapySDR v0.8, SoapyUHD v0.4.1-9a738c3
Steps to reproduce
SoapySDRUtil --args="driver=uhd" --rate=1e6 --channels="0, 1" --direction=RX
The above command instead of performing the expected rate test fails with the message mentioned in the description
Comments
This problem seems to originate inside the activateStream
function in SoapyUHDDevice.cpp. The stream_now
variable should not be set to True when more than one channels have been requested, but this is not handled in the code. Instead, the stream_now
should be set to False and the time_spec
to a time offset with respect to the current time, so that reception begins in a later time. The fix below seems to solve the issue of the rate test but probably needs more testing,
cmd.stream_now = (flags & SOAPY_SDR_HAS_TIME) == 0 && (stream->rx.get()->get_num_channels() == 1);
cmd.time_spec = _dev->get_time_now() + uhd::time_spec_t(0.1);