summaryrefslogtreecommitdiffstats
path: root/NOTES
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-08 03:47:23 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-08 03:47:23 +0100
commit869ed99dbc3a645fee6de36e97e1e12127068f10 (patch)
treefa4a4e7ef977a3d3621ff5e96fb664e6fbc9e6fe /NOTES
parentddc77c1e819eee03a13efff4a9aa3161485f3f1f (diff)
downloadipecamera-869ed99dbc3a645fee6de36e97e1e12127068f10.tar.gz
ipecamera-869ed99dbc3a645fee6de36e97e1e12127068f10.tar.bz2
ipecamera-869ed99dbc3a645fee6de36e97e1e12127068f10.tar.xz
ipecamera-869ed99dbc3a645fee6de36e97e1e12127068f10.zip
new event architecture, first trial
Diffstat (limited to 'NOTES')
-rw-r--r--NOTES42
1 files changed, 35 insertions, 7 deletions
diff --git a/NOTES b/NOTES
index 94e4e95..36411d3 100644
--- a/NOTES
+++ b/NOTES
@@ -157,19 +157,47 @@ exact read: read exactly specified number of bytes (should be
error should be returned)
ignore packets: autoterminate each buffer, depends on engine
configuration
-autogrow: automatic memory allocation, only through streaming
+
+ To handle differnt cases, the value returned by callback function instructs
+the DMA library how long to wait for the next data to appear before timing
+out. The following variants are possible:
+terminate: just bail out
+check: no timeout, just check if there is data, otherwise
+ terminate
+timeout: standard DMA timeout, normaly used while receiving
+ fragments of packet: in this case it is expected
+ that device has already prepared data and only
+ the performance of DMA engine limits transfer speed
+wait: wait until the data is prepared by the device, this
+ timeout is specified as argument to the dma_stream
+ function (standard DMA timeout is used by default)
first | new_pkt | bufer
--------------------------
-standard wait | term | wait
-multiple packets wait | check | wait - DMA_READ_FLAG_MULTIPACKET
-waiting multipacket wait | wait | wait - DMA_READ_FLAG_WAIT
-exact wait | wait/term | wait - limited by size parameter
-ignore packets wait | check | check - just autoterminated
-autogrow
+standard wait | term | timeout
+multiple packets wait | check | timeout - DMA_READ_FLAG_MULTIPACKET
+waiting multipacket wait | wait | timeout - DMA_READ_FLAG_WAIT
+exact wait | wait/term | timeout - limited by size parameter
+ignore packets wait | wait/check| wait/check - just autoterminated
Shall we do a special handling in case of overflow?
+
+Buffering
+=========
+ The DMA addresses are limited to 32 bits (~4GB for everything). This means we
+ can't really use DMA pages are sole buffers. Therefore,
+ 1. In streaming mode a second thread will be spawned copying the data from the
+ DMA pages into the allocated buffers. On duration expiration this thread
+ will be stopped but processing will continue until all copyied data is
+ passed to the callbacks.
+ 2. In synchronous mode, a single event will be extracted from the the DMA
+ memory.
+
+ - Actually, we can make another in-module buffering. But this hopefully can
+ be avoided.
+
+
Register Access Synchronization
===============================
We need to serialize access to the registers by the different running