libbladeRF: limit SC16 Q11 packed format to buf sizes of 3*4096*n bytes
This resolves buffer-to-buffer continuity.
This commit is contained in:
parent
e0877517c5
commit
461b584ceb
2 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue