Closed fsphil closed 4 years ago
fullScale in the getNatveStream format would also have to change to match
The docs suggest that the value returned by getNativeStreamFormat does not apply when using read/writeStream():
"This is the format used by the underlying transport layer, and the direct buffer access API calls (when available).".
So CS16 / 2048 is still valid in this case. I may have misunderstood.
For example, soapyremote will use the native stream format to transport the samples over the network, and use the scaleFactor when scaling if the user requested floats; so this scale factor informs the caller how to scale the data.
OK, change made. I see there is a CS12 type, it might be good to implement that here.
The driver currently expects samples in the bladerf's native range of -2048-2047 when using the CS16 data type. This patch fixes this by adding a simple bit shift on RX and TX.
I'm only able to test the changes in writeStream() at the moment (with hacktv), I've no handy way of testing readStream().