We have strict time requirements in our project and we need a tight buffer syncronization we are achieving with some software tricks, not letting the libioo kbuffers ever underflow or overflow.
We'd like to read only samples when needed (let's say 10% of the time), but as far as I understand looking at the libiio code, refill() makes a memcpy internally, even though 90% of those memcpy are meaningless to us. Is there any way to discard 1 kbuffer and jump to the next one avoiding those useless memory operations?
In the opposite side, transmission, the only way I managed to don't lose buffer synchronization is to push() zeros when I don't want to transmit useful data, also having an overhead by zeroing the txbuf struct. I think this is harder to dodge, but If anyone have any tip...