[cpia] cpia 0.6.0 and non ECP ports

Nick Holloway Nick.Holloway@alfie.demon.co.uk
5 Feb 2000 22:56:14 -0000


I was wondering what it would take to implement nibble mode, as I've
got an elderly Thinkpad laptop, where the parallel port is not ECP.

Reading through the code for cpia and the 2.3 kernels, it looked as
if ``it might just work''.  I'm glad to say that it does (with a very
minor patch).  I haven't done extensive testing, but I've grabbed a few
single frames.

All I needed to do was to relax the test on the parport type in
"cpia_pp_register", and allow PCSPP to be used.  I suspect that the
actual test may be different, but I leave that to someone who understands
parallel port modes, and what the CPiA camera can be used with.

--- cpia_pp.c~	Sat Feb  5 21:01:58 2000
+++ cpia_pp.c	Sat Feb  5 21:14:40 2000
@@ -1477,7 +1477,8 @@
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0))
 	if (!(port->modes & PARPORT_MODE_PCECP)) {
 #else
-	if (!(port->modes & PARPORT_MODE_ECP)) {
+	if (!(port->modes & PARPORT_MODE_ECP)
+	    && !(port->modes & PARPORT_MODE_PCSPP)) {
 #endif
 		LOG("port is not ECP capable\n");
 		return -ENXIO;

-- 
 `O O'  | Nick.Holloway@alfie.demon.co.uk
// ^ \\ | http://www.alfie.demon.co.uk/