Commit graph

65 commits

Author SHA1 Message Date
Josh Blum
b40ace72dd usrp1: use the transport frame sizes to calculate the max spp
The max send spp is the frame size minus the alignment padding.
This allows us to copy a remainder into a new buffer and always
commit multiples of the alignment size (512 bytes).

Reworked the managed send buffer implementation to handle the above.
Uses only managed memory, and only mem-copied under the alignment.
2010-10-06 18:41:30 -07:00
Josh Blum
7352c95037 uhd: reworked the zero copy interface
- recv buffers have a release call
- safe make function for recv buffers (buff + release callback)
- send buffer commits now have a void return
- safe make function for send buffers (buff + commit callback)

The reason for the void return from commit is that ssize_t num_bytes was never returning anything of use.
That is for all of the zero copy implementations so far, commit cannot really error (being asynchronous).

libusb zero copy impl was reworked to support the new interface.
USRP1 io_impl with the psuedo managed buffer was replaced with safe_make.
Also, usrp1 io_impl was simplified greatly due to commit returning void now.
UDP zero copy asio was disabled (in this commit, until its reworked).
Phony send and recv interfaces were removed completely.
2010-10-02 23:15:46 -07:00
Josh Blum
00cd601840 uhd: implemented a double timeout (in seconds) for send and recv chains
converted all size_t timeout_ms to double timeout

bounded and alignment buffer now take double timeout

added timeout to device::send and zero_copy_if::get_send_buff
2010-10-01 18:22:41 -07:00
Josh Blum
2c8a7c7deb uhd: implemented recv timeout for zero copy interface 2010-09-30 14:36:24 -07:00
Josh Blum
42576f1ed9 usrp1: removed msvc warnings for usrp1 impl code 2010-09-23 18:46:58 -07:00
Josh Blum
c36b8a83b1 usrp1: multi-channel tx working, modified vrt handler to interleave 2010-09-23 12:37:11 -07:00
Josh Blum
7ee585f2b9 usrp1: multi-channel rx working, modified vrt handler to deinterleave 2010-09-22 19:14:57 -07:00
Josh Blum
000578892e usrp1: reworked the io_impl for usrp1 to use the vrt packet handler
used dummy packers and unpackets that have a header size of zero

created wrapper around the data transport to handle non-512 multiple sends

honor the eob flag on send to flush the send buffer
2010-09-22 17:36:18 -07:00
Josh Blum
c9cd9b6058 usrp1: flush for flow error messages 2010-08-31 12:19:17 -07:00
Thomas Tsou
7d7479ad05 usrp1: Don't flush the stream buffer after every overrun/underrun 2010-08-27 22:55:18 -07:00
Thomas Tsou
df6e526275 usrp1: Remove unused overrun/underrun poll variable
The polling inverval for overrun and underrun checking is
rate dependent and calculated in the dsp code whenever
the interpolation or decimation is changed.
2010-08-24 16:06:11 -07:00
Thomas Tsou
9449d05773 usrp1: Cleanup unnecessary state variables 2010-08-24 16:05:55 -07:00
Thomas Tsou
4021779856 usrp1: Refactor I/O implementation 2010-08-23 15:18:01 -07:00
Thomas Tsou
dafbb2c047 usrp1: Make underrun/overrun checking rate dependent
Calculate a polling interval based on the sample rate and size.
2010-08-19 18:42:00 -07:00
Thomas Tsou
9cb9e7d522 usrp1: Add usrp1 implementation 2010-08-13 17:54:51 -07:00