Get* - success!

Peter Pregler Peter.Pregler@risc.uni-linz.ac.at
Sun, 12 Sep 1999 11:38:46 +0200 (CEST)


This message is in MIME format
--_=XFMail.1.3.p0.Linux:990912113846:706=_
Content-Type: text/plain; charset=iso-8859-1


On 06-Sep-99 Bas Huisman wrote:
> - make it v4l(2) (you don't need any technical stuff done here,
>       I've made the code modular enough to do this)

Soon to come, i.e. I would like to finish a first draft today. Just one thing,
I do not plan to do any v4l2 port unless I personally need that.

> - make the "GET" command's work

I have attached a crude patch!!! :) The problem was that you have to specifiy
the numbers of bytes to read back in the command-structure as a multiple of 8.
There is a small and unclear explanation somewhere in the specification. I have
set it to 8 in my patch which works for all commands I tested (GetCPIAVersion,
GetColourParameters, ...). Someone should make it a cleaner though.

> - make it use DMA/IRQ (I could find a DMA_READ call in the 2.3.16 kernel
>       , only DMA_WRITE)

I have a working interrupt driven if_StreamRead here that allows to implement a
blocking read. It does not yield a visible performance gain. But I do need it 
for the v4l-layer.

About DMA: how does one use DMA with the parport. I have no programming
documentation for the DMA-controller. Furthermore I don't see how DMA-transfer
should work without polling. We don't know how much data to transfer
(compressed images are arbitrary length) and we don't have any interrupt driven
notification (afaik about parport-dma, but I might be wrong here) for read.
Has anyone any info on this? Is anyone in contact with the parport-developers
for the 2.3-kernels?

Greetings, Peter
-------------------------------
Even the thought that a ship was waiting to take him back to Earth
did not wipe out the sense of loss he felt at that moment.
-------------------------------
Email: Peter.Pregler@risc.uni-linz.ac.at
Peter Pregler / RISC, University of Linz, Austria

--_=XFMail.1.3.p0.Linux:990912113846:706=_
Content-Disposition: attachment; filename="readback.patch"
Content-Transfer-Encoding: base64
Content-Description: readback.patch
Content-Type: application/octet-stream; name=readback.patch; SizeOnDisk=1265

KioqIC4uLy4uL2NwaWEtMC4yLjEtb3JpZy9tb2R1bGUvaW50ZXJmYWNlX3BwLmMJV2VkIFNlcCAg
OCAxMDoxOToxOSAxOTk5Ci0tLSBpbnRlcmZhY2VfcHAuYwlTdW4gU2VwIDEyID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dWxl
JjcpPDw1KSB8CiAgCQkgICAgICAgICAoY3BpYV9jb21tYW5kc1twcm9jX25yXS5wcm9jICYgMHgx
Zik7CioqKioqKioqKioqKioqKgoqKiogMzAxLDMwNiAqKioqCi0tLSAzNDUsMzUxIC0tLS0KICAJ
Y2FzZSBDUElBX0lPQ19SZWFkSURBVEE6CiAgCWNhc2UgQ1BJQV9JT0NfUmVhZFZQUmVnczoKICAJ
CWlmKGlvc3RydSA9PSBOVUxMKSByZXR1cm4gLUVJTlZBTDsKKyAJCWRhdGFieXRlcyA9IDg7CiAg
CQljbWRbMV0gPSBEQVRBX0lOOwogIAkJY21kWzFdID0gKChjcGlhX2NvbW1hbmRzW3Byb2NfbnJd
Lm1vZHVsZSY3KTw8NSkgfAogIAkJICAgICAgICAgKGNwaWFfY29tbWFuZHNbcHJvY19ucl0ucHJv
YyAmIDB4MWYpOwo=

--_=XFMail.1.3.p0.Linux:990912113846:706=_--
End of MIME message
-----------------------------------------------------------------------------
To unsubscribe from this mailinglist, send the line "unsubscribe vision-webcam" in the
body of a message to "majordomo@errors.no".