Using the Fobos with my ka9q-radio SDR at a 25 MHz sample rate, I see that the callback thread takes almost as much CPU time as my forward FFT. That's a lot! So I've added a raw mode to libusb that gives me the integer samples directly from the USB interface without passing through fobos_rx_convert_samples(). I've also written a new AVX2 input routine for my own code to use this mode. CPU consumption in the input thread has dropped to about 1/4 of what it was, a very substantial improvement. Much of the improvement is coming from my doing my own conversion from integer to floating point, avoiding the extra trip through memory taken by fobos_rx_convert_samples for the floating point samples it creates. At 50 Ms/s, that's 400 MB/s of writes and 400 MB/s of reads that can be avoided. I will submit a PR for libfobos when I am done. It does not disturb the existing interface; it simply adds functions to read raw data.
I noticed while looking at fobos_rx_convert_samples() that it estimates and removes DC from the samples and also balances the gain of the I and Q channels, but it does not correct for phase imbalance. This is also necessary to maximize image rejection. My own user code will do this. I'm not going to add it to libfobos because it could not be used in raw mode, but you would be free to borrow from it as you like.
Using the Fobos with my ka9q-radio SDR at a 25 MHz sample rate, I see that the callback thread takes almost as much CPU time as my forward FFT. That's a lot! So I've added a raw mode to libusb that gives me the integer samples directly from the USB interface without passing through fobos_rx_convert_samples(). I've also written a new AVX2 input routine for my own code to use this mode. CPU consumption in the input thread has dropped to about 1/4 of what it was, a very substantial improvement. Much of the improvement is coming from my doing my own conversion from integer to floating point, avoiding the extra trip through memory taken by fobos_rx_convert_samples for the floating point samples it creates. At 50 Ms/s, that's 400 MB/s of writes and 400 MB/s of reads that can be avoided. I will submit a PR for libfobos when I am done. It does not disturb the existing interface; it simply adds functions to read raw data.
I noticed while looking at fobos_rx_convert_samples() that it estimates and removes DC from the samples and also balances the gain of the I and Q channels, but it does not correct for phase imbalance. This is also necessary to maximize image rejection. My own user code will do this. I'm not going to add it to libfobos because it could not be used in raw mode, but you would be free to borrow from it as you like.