osmosdr/rtl/miri/hackrf: use 15 buffers by default

folowing rtl-sdr commit 89f73b183f2dac9c0dd75beca4cf2f77f20c4a36

So far we had 32 * 256KB which was a bit overkill, 15 are more than
enough.

15 was chosen instead of 16 because at least on Linux there seems to be
a system-wide limit of 63 transfers (when they are 256KB large), so 4
dongles can be used on a single machine without lowering the default
transfer number.
wip-signat
Dimitri Stolnikov 9 years ago
parent 154c4ddd5f
commit eb76e35689
  1. 2
      lib/hackrf/hackrf_sink_c.cc
  2. 2
      lib/hackrf/hackrf_source_c.cc
  3. 4
      lib/miri/miri_source_c.cc
  4. 4
      lib/osmosdr/osmosdr_src_c.cc
  5. 4
      lib/rtl/rtl_source_c.cc

@ -51,7 +51,7 @@
using namespace boost::assign;
#define BUF_LEN (16 * 32 * 512) /* must be multiple of 512 */
#define BUF_NUM 32
#define BUF_NUM 15
#define BYTES_PER_SAMPLE 2 /* HackRF device consumes 8 bit unsigned IQ data */

@ -45,7 +45,7 @@
using namespace boost::assign;
#define BUF_LEN (16 * 32 * 512) /* must be multiple of 512 */
#define BUF_NUM 32
#define BUF_NUM 15
#define BYTES_PER_SAMPLE 2 /* HackRF device produces 8 bit unsigned IQ data */

@ -45,7 +45,7 @@
using namespace boost::assign;
#define BUF_SIZE 2304 * 8 * 2
#define BUF_NUM 32
#define BUF_NUM 15
#define BUF_SKIP 1 // buffers to skip due to garbage
#define BYTES_PER_SAMPLE 4 // mirisdr device delivers 16 bit signed IQ data
@ -210,7 +210,7 @@ void miri_source_c::_mirisdr_wait(miri_source_c *obj)
void miri_source_c::mirisdr_wait()
{
int ret = mirisdr_read_async( _dev, _mirisdr_callback, (void *)this, 0, BUF_SIZE );
int ret = mirisdr_read_async( _dev, _mirisdr_callback, (void *)this, _buf_num, BUF_SIZE );
_running = false;

@ -44,7 +44,7 @@
using namespace boost::assign;
#define BUF_LEN (16 * 32 * 512) /* must be multiple of 512 */
#define BUF_NUM 32
#define BUF_NUM 15
#define BUF_SKIP 1 // buffers to skip due to garbage
#define BYTES_PER_SAMPLE 4 // osmosdr device delivers 16 bit signed IQ data
@ -203,7 +203,7 @@ void osmosdr_src_c::_osmosdr_wait(osmosdr_src_c *obj)
void osmosdr_src_c::osmosdr_wait()
{
int ret = osmosdr_read_async( _dev, _osmosdr_callback, (void *)this, 0, _buf_len );
int ret = osmosdr_read_async( _dev, _osmosdr_callback, (void *)this, _buf_num, _buf_len );
_running = false;

@ -46,7 +46,7 @@
using namespace boost::assign;
#define BUF_LEN (16 * 32 * 512) /* must be multiple of 512 */
#define BUF_NUM 32
#define BUF_NUM 15
#define BUF_SKIP 1 // buffers to skip due to initial garbage
#define BYTES_PER_SAMPLE 2 // rtl device delivers 8 bit unsigned IQ data
@ -301,7 +301,7 @@ void rtl_source_c::_rtlsdr_wait(rtl_source_c *obj)
void rtl_source_c::rtlsdr_wait()
{
int ret = rtlsdr_read_async( _dev, _rtlsdr_callback, (void *)this, 0, _buf_len );
int ret = rtlsdr_read_async( _dev, _rtlsdr_callback, (void *)this, _buf_num, _buf_len );
_running = false;

Loading…
Cancel
Save