diff --git a/host/libraries/libbladeRF/src/streaming/sync.c b/host/libraries/libbladeRF/src/streaming/sync.c index 604883b9..dde8c531 100644 --- a/host/libraries/libbladeRF/src/streaming/sync.c +++ b/host/libraries/libbladeRF/src/streaming/sync.c @@ -195,6 +195,11 @@ int sync_init(struct bladerf_sync *sync, return BLADERF_ERR_INVAL; } + if (format == BLADERF_FORMAT_SC16_Q11_PACKED && (buffer_size/3) % 4096 != 0) { + assert(!"Invalid buffer size for SC16Q11_PACKED format. Must be a 3x multiple of 1024 samples per buffer."); + return BLADERF_ERR_INVAL; + } + /* Deinitialize sync handle if it's initialized */ sync_deinit(sync); diff --git a/host/libraries/libbladeRF_test/test_rx_discont/src/main.c b/host/libraries/libbladeRF_test/test_rx_discont/src/main.c index c78e0d9d..dd1511a8 100644 --- a/host/libraries/libbladeRF_test/test_rx_discont/src/main.c +++ b/host/libraries/libbladeRF_test/test_rx_discont/src/main.c @@ -35,7 +35,7 @@ #include "conversions.h" /* TODO Make these configurable */ -#define BUFFER_SIZE 4096 +#define BUFFER_SIZE 4096*3 #define NUM_BUFFERS 128 #define NUM_XFERS 31 #define TIMEOUT_MS 2500