From: Uwe Hermann Date: Wed, 18 Apr 2018 21:22:38 +0000 (+0200) Subject: input modules: Increase chunk size to 4MB for all modules. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9a4fd01af84ac4739074c0e27b5ef3cb43637215;p=libsigrok.git input modules: Increase chunk size to 4MB for all modules. This reduces overhead and can slightly increase performance, depending on the module. --- diff --git a/src/input/chronovu_la8.c b/src/input/chronovu_la8.c index fcafdf5c..213c2203 100644 --- a/src/input/chronovu_la8.c +++ b/src/input/chronovu_la8.c @@ -29,7 +29,7 @@ #define DEFAULT_NUM_CHANNELS 8 #define DEFAULT_SAMPLERATE SR_MHZ(100) -#define CHUNK_SIZE (4 * 1024) +#define CHUNK_SIZE (4 * 1024 * 1024) #define CHRONOVU_LA8_FILESIZE ((8 * 1024 * 1024) + 5) struct context { diff --git a/src/input/csv.c b/src/input/csv.c index 477e6515..770cb18e 100644 --- a/src/input/csv.c +++ b/src/input/csv.c @@ -26,7 +26,7 @@ #define LOG_PREFIX "input/csv" -#define CHUNK_SIZE (128 * 1024) +#define CHUNK_SIZE (4 * 1024 * 1024) /* * The CSV input module has the following options: diff --git a/src/input/raw_analog.c b/src/input/raw_analog.c index ca29eaa4..5794ae84 100644 --- a/src/input/raw_analog.c +++ b/src/input/raw_analog.c @@ -31,7 +31,7 @@ #define LOG_PREFIX "input/raw_analog" /* How many bytes at a time to process and send to the session bus. */ -#define CHUNK_SIZE 4096 +#define CHUNK_SIZE (4 * 1024 * 1024) #define DEFAULT_NUM_CHANNELS 1 #define DEFAULT_SAMPLERATE 0 diff --git a/src/input/trace32_ad.c b/src/input/trace32_ad.c index cf8ab298..6cb6bcb4 100644 --- a/src/input/trace32_ad.c +++ b/src/input/trace32_ad.c @@ -45,7 +45,7 @@ #define LOG_PREFIX "input/trace32_ad" -#define CHUNK_SIZE 10240 +#define CHUNK_SIZE (4 * 1024 * 1024) #define MAX_POD_COUNT 12 #define HEADER_SIZE 80 diff --git a/src/input/vcd.c b/src/input/vcd.c index 5b541430..5051f0e3 100644 --- a/src/input/vcd.c +++ b/src/input/vcd.c @@ -67,7 +67,7 @@ #define LOG_PREFIX "input/vcd" -#define CHUNK_SIZE (1024 * 1024) +#define CHUNK_SIZE (4 * 1024 * 1024) struct context { gboolean started; diff --git a/src/input/wav.c b/src/input/wav.c index e5ab0891..9b19e0bb 100644 --- a/src/input/wav.c +++ b/src/input/wav.c @@ -31,7 +31,7 @@ #define LOG_PREFIX "input/wav" /* How many bytes at a time to process and send to the session bus. */ -#define CHUNK_SIZE 4096 +#define CHUNK_SIZE (1 * 1024 * 1024 * sizeof(float)) /* Minimum size of header + 1 8-bit mono PCM sample. */ #define MIN_DATA_CHUNK_OFFSET 45