pothosware / SoapyPlutoSDR

Soapy SDR plugin for PlutoSDR
https://github.com/pothosware/SoapyPlutoSDR/wiki
GNU Lesser General Public License v2.1
53 stars 22 forks source link

Remove RX intermediate type conversion buffer #8

Closed zuckschwerdt closed 5 years ago

zuckschwerdt commented 5 years ago

the current code copies the RX data to an intermediate buffer just to copy that buffer to the output user buffer again. This change removes the intermediate copy step and folds the two tight copy loops for iio_channel_convert() and sample format conversion into one.

zuckschwerdt commented 5 years ago

This matches the TX streamlining in #6 for RX.

guruofquality commented 5 years ago

You are a real pro here. I'm giving you commit access

zuckschwerdt commented 5 years ago

I got three more patches lined up: TX is MSB first, not LSB like RX; a fast copy optimization if hardware buffers align to user buffers (they do on the default using the Pluto or SoapyRemote); and then DMA on top of that, getting rid of another buffer ;) I'll PR all three in the next days for review and for documentation to the community. But feel free to let those sit, I'll then just merge after a week or so.