[cpia] Problem with isa parallel port

ZioIvy zioivy@libero.it
Fri, 10 Mar 2000 13:05:38 +0100


Peter Pregler wrote:
> 
> On 09-Mar-2000 ZioIvy wrote:
> > I have a double parallel port on isa bus. Linux detects both ports
> > correctly, I can print and use them with the kernel 2.3.34, but not with
> > the 2.2.x (2.2.12-2.2.14). Cpia detects the camera, the ecp port etc.
> > but when I start gqcam it freezes and I have to kill it. With dmesg I
> > get an Input/Output Read Error.
> > Solutions?
> 
> - reading your mind?
> - hacking your computer to get the relevant syslog-info?
> - posting more information, esp. info from the syslog-files and the
>   proc-filesystem (dma/interrupt/parport/cpia/modules)

Sorry 8-(
It was late and I was tired. Sometimes I disconnect my brain 8-)

If I insert modules without dma support dmesg gives:

parport0: PC-style at 0x3bc (0x7bc) [SPP,ECP,ECPPS2]
parport0: detected irq 7; use procfs to enable interrupt-driven
operation.
parport1: PC-style at 0x378 (0x778) [SPP,ECP,ECPPS2]
parport1: detected irq 4; use procfs to enable interrupt-driven
operation.
parport2: PC-style at 0x278 (0x678) [SPP,ECP,ECPPS2]
parport2: detected irq 10; use procfs to enable interrupt-driven
operation.
Linux video capture interface: v1.00
V4L-Driver for Vision CPiA based cameras v0.7.3
parport0: Printer, HEWLETT-PACKARD DESKJET 880C
parport1: read2 timeout.
parport1: Multimedia device, VLSI Vision Ltd PPC2 Camera
parport2: no IEEE-1284 device present.
Parallel port driver for Vision CPiA based cameras v0.7.3
  using PIO mode
cpia.c(5502):goto_low_power(2314):camera now in LOW power state
cpia.c(5510):goto_high_power(2300):camera now in HIGH power state
cpia.c(5522):dispatch_commands(2039):1 1 0 0 1 1 1 1 
cpia.c(5522):dispatch_commands(2040):0 1 1 1 1 1 0 1 
cpia.c(5524):save_camera_state(2334):0/0/185/0/220/214/214/230
cpia.c(5524):save_camera_state(2338):32/6/92
  CPiA Version: 1.20 (2.0)
  CPiA PnP-ID: 0553:0002:0100
  VP-Version: 1.0 0100
  1 camera(s) found

Than I start gqcam, it freezes, I kill it and I get:

cpia.c(8299):goto_low_power(2314):camera now in LOW power state
cpia.c(8307):goto_high_power(2300):camera now in HIGH power state
cpia.c(8320):dispatch_commands(2039):1 1 0 0 1 1 1 1 
cpia.c(8320):dispatch_commands(2040):0 1 1 1 1 1 0 1 
cpia.c(8321):save_camera_state(2334):0/0/185/0/220/214/214/230
cpia.c(8321):save_camera_state(2338):32/6/92
cpia.c(8321):cpia_ioctl(2677):VIDIOCGCAP
cpia.c(8321):cpia_ioctl(2789):VIDIOCGWIN
cpia.c(8321):cpia_ioctl(2736):VIDIOCGPICT
cpia.c(8321):cpia_ioctl(2745):VIDIOCSPICT
cpia.c(8321):cpia_ioctl(2754):palette: 4
cpia.c(8321):cpia_ioctl(2755):depth: 24
cpia.c(8321):cpia_ioctl(2783):VIDIOCSPICT: 24 / 4 // 32768 / 32768 /
32768 / 32768
cpia.c(8322):cpia_ioctl(2799):VIDIOCSWIN
cpia.c(8322):cpia_ioctl(2842):1/352:288
cpia_pp.c(8361):while_out(305):WhileoutError at line waited 10
cpia_pp.c(8361):cpia_pp_streamRead(1231):incomplete image: 8361 / 0 / 1
cpia.c(8361):fetch_frame(2207):streamRead failed: -5
cpia.c(8361):fetch_frame(2159):retry=1
cpia.c(8457):cpia_read(2633):upload failed 0/0
cpia.c(8457):save_camera_state(2334):0/0/185/0/220/214/214/230
cpia.c(8457):save_camera_state(2338):35/9/88
cpia.c(8458):goto_low_power(2314):camera now in LOW power state
cpia.c(8597):cpia_unregister_camera(3277):unregistering video
cpia.c(8597):cpia_unregister_camera(3287):destroying /proc/cpia/video0
cpia.c(8597):cpia_unregister_camera(3291):freeing camera


But this mornign I found that if I insert parport_pc with:

insmod parport_pc io=0x378 irq=4 dma=1

I obtain:

parport0: PC-style at 0x378 (0x778), irq 4, dma 1 [SPP,ECP,ECPPS2]
Linux video capture interface: v1.00
V4L-Driver for Vision CPiA based cameras v0.7.3
parport0: read2 timeout.
parport0: Multimedia device, VLSI Vision Ltd PPC2 Camera
Parallel port driver for Vision CPiA based cameras v0.7.3
  using DMA mode (irq 4, DMA 1)
cpia.c(9023):goto_low_power(2314):camera now in LOW power state
cpia.c(9031):goto_high_power(2300):camera now in HIGH power state
cpia.c(9043):dispatch_commands(2039):1 1 0 0 1 1 1 1 
cpia.c(9043):dispatch_commands(2040):0 1 1 1 1 1 0 1 
cpia.c(9045):save_camera_state(2334):0/0/185/0/220/214/214/230
cpia.c(9045):save_camera_state(2338):32/6/92
  CPiA Version: 1.20 (2.0)
  CPiA PnP-ID: 0553:0002:0100
  VP-Version: 1.0 0100
  1 camera(s) found

cpia_pp.c(10613):cpia_pp_irq_handler(1066):image skipped?
cpia.c(10615):goto_low_power(2314):camera now in LOW power state
cpia.c(10623):goto_high_power(2300):camera now in HIGH power state
cpia.c(10636):dispatch_commands(2039):1 1 0 0 1 1 1 1 
cpia.c(10636):dispatch_commands(2040):0 1 1 1 1 1 0 1 
cpia.c(10637):save_camera_state(2334):0/0/185/0/220/214/214/230
cpia.c(10637):save_camera_state(2338):32/6/92
cpia.c(10638):cpia_ioctl(2677):VIDIOCGCAP
cpia.c(10638):cpia_ioctl(2789):VIDIOCGWIN
cpia.c(10638):cpia_ioctl(2736):VIDIOCGPICT
cpia.c(10638):cpia_ioctl(2745):VIDIOCSPICT
cpia.c(10638):cpia_ioctl(2754):palette: 4
cpia.c(10638):cpia_ioctl(2755):depth: 24
cpia.c(10638):cpia_ioctl(2783):VIDIOCSPICT: 24 / 4 // 32768 / 32768 /
32768 / 32768
cpia.c(10638):cpia_ioctl(2799):VIDIOCSWIN
cpia.c(10638):cpia_ioctl(2842):1/352:288
cpia.c(11667):fetch_frame(2207):streamRead failed: -5
cpia.c(11667):fetch_frame(2159):retry=1
cpia.c(11667):cpia_read(2633):upload failed 0/0
cpia.c(11667):save_camera_state(2334):0/0/185/0/220/214/214/230
cpia.c(11667):save_camera_state(2338):30/6/77
cpia.c(11669):goto_low_power(2314):camera now in LOW power state

The same problem except the firts message about cpia_pp_irq_handler.

Than, if I remove modules and I insert them again without dma, after
that the camera it's ok!

parport0: PC-style at 0x3bc (0x7bc) [SPP,ECP,ECPPS2]
parport0: detected irq 7; use procfs to enable interrupt-driven
operation.
parport1: PC-style at 0x378 (0x778) [SPP,ECP,ECPPS2]
parport1: detected irq 4; use procfs to enable interrupt-driven
operation.
parport2: PC-style at 0x278 (0x678) [SPP,ECP,ECPPS2]
parport2: detected irq 10; use procfs to enable interrupt-driven
operation.
Linux video capture interface: v1.00
V4L-Driver for Vision CPiA based cameras v0.7.3
parport0: Printer, HEWLETT-PACKARD DESKJET 880C
parport1: read2 timeout.
parport1: Multimedia device, VLSI Vision Ltd PPC2 Camera
parport2: no IEEE-1284 device present.
Parallel port driver for Vision CPiA based cameras v0.7.3
  using PIO mode
cpia.c(18603):goto_low_power(2314):camera now in LOW power state
cpia.c(18611):goto_high_power(2300):camera now in HIGH power state
cpia.c(18623):dispatch_commands(2039):1 1 0 0 1 1 1 1 
cpia.c(18623):dispatch_commands(2040):0 1 1 1 1 1 0 1 
cpia.c(18625):save_camera_state(2334):0/0/185/0/220/214/214/230
cpia.c(18625):save_camera_state(2338):32/6/92
  CPiA Version: 1.20 (2.0)
  CPiA PnP-ID: 0553:0002:0100
  VP-Version: 1.0 0100
  1 camera(s) found

cpia.c(20625):goto_low_power(2314):camera now in LOW power state
cpia.c(20633):goto_high_power(2300):camera now in HIGH power state
cpia.c(20645):dispatch_commands(2039):1 1 0 0 1 1 1 1 
cpia.c(20645):dispatch_commands(2040):0 1 1 1 1 1 0 1 
cpia.c(20647):save_camera_state(2334):0/0/185/0/220/214/214/230
cpia.c(20647):save_camera_state(2338):32/6/92
cpia.c(20647):cpia_ioctl(2677):VIDIOCGCAP
cpia.c(20647):cpia_ioctl(2789):VIDIOCGWIN
cpia.c(20647):cpia_ioctl(2736):VIDIOCGPICT
cpia.c(20647):cpia_ioctl(2745):VIDIOCSPICT
cpia.c(20647):cpia_ioctl(2754):palette: 4
cpia.c(20647):cpia_ioctl(2755):depth: 24
cpia.c(20647):cpia_ioctl(2783):VIDIOCSPICT: 24 / 4 // 32768 / 32768 /
32768 / 32768
cpia.c(20647):cpia_ioctl(2799):VIDIOCSWIN
cpia.c(20647):cpia_ioctl(2842):1/352:288
cpia.c(20711):dispatch_commands(2039):0 0 0 0 0 1 0 0 
cpia.c(20711):dispatch_commands(2040):0 0 0 0 0 0 0 0 
cpia.c(20751):dispatch_commands(2039):0 0 0 0 0 0 0 1 
cpia.c(20751):dispatch_commands(2040):0 0 0 0 0 0 1 0 
cpia.c(20948):save_camera_state(2334):0/1/27/1/220/214/214/230
cpia.c(20948):save_camera_state(2338):32/6/91
cpia.c(20949):goto_low_power(2314):camera now in LOW power state

In the proc fs dma and irq are set correctly when I insert parport_pc
with the irq and dma options.

Sorry for the long email.
I hope you have enougth informations now.
Thanks