aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri Stolnikov <horiz0n@gmx.net>2014-02-11 20:06:24 +0100
committerDimitri Stolnikov <horiz0n@gmx.net>2014-02-11 20:52:56 +0100
commiteb76e356893d17de6b883096087332be25e40318 (patch)
treefcb2532ec1ec3903acc70d2ae7cb0bdba07ed0f7
parent154c4ddd5f7726730c606feaea7272310a535007 (diff)
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.
-rw-r--r--lib/hackrf/hackrf_sink_c.cc2
-rw-r--r--lib/hackrf/hackrf_source_c.cc2
-rw-r--r--lib/miri/miri_source_c.cc4
-rw-r--r--lib/osmosdr/osmosdr_src_c.cc4
-rw-r--r--lib/rtl/rtl_source_c.cc4
5 files changed, 8 insertions, 8 deletions
diff --git a/lib/hackrf/hackrf_sink_c.cc b/lib/hackrf/hackrf_sink_c.cc
index 04a7124..1bb6f7e 100644
--- a/lib/hackrf/hackrf_sink_c.cc
+++ b/lib/hackrf/hackrf_sink_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 */
diff --git a/lib/hackrf/hackrf_source_c.cc b/lib/hackrf/hackrf_source_c.cc
index 795a3eb..022af7f 100644
--- a/lib/hackrf/hackrf_source_c.cc
+++ b/lib/hackrf/hackrf_source_c.cc
@@ -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 */
diff --git a/lib/miri/miri_source_c.cc b/lib/miri/miri_source_c.cc
index bac2fcf..ba6037f 100644
--- a/lib/miri/miri_source_c.cc
+++ b/lib/miri/miri_source_c.cc
@@ -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;
diff --git a/lib/osmosdr/osmosdr_src_c.cc b/lib/osmosdr/osmosdr_src_c.cc
index 54393b9..c9be8f4 100644
--- a/lib/osmosdr/osmosdr_src_c.cc
+++ b/lib/osmosdr/osmosdr_src_c.cc
@@ -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;
diff --git a/lib/rtl/rtl_source_c.cc b/lib/rtl/rtl_source_c.cc
index fa351b8..eb24464 100644
--- a/lib/rtl/rtl_source_c.cc
+++ b/lib/rtl/rtl_source_c.cc
@@ -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;