[cpia] DMA & CPia Parallel port

Jose Miguel Buenaposada jmbuena@isys.dia.fi.upm.es
Mon, 31 Jul 2000 12:55:56 +0200


Hi again !!
Peter, I send version some more information abaut my problems with the CPIA
Zoom cam parport version.

Well, I have been doing some other tests with no good results, kernel
2.2.14 (Redhat 6.1) and 1.1 Cpia driver version. I send you some
information:

- My BIOS sais:
   On Board Parallel Port   : 378H
   On Board Parallel Mode: Normal or ECP or EPP or ECP/EPP
   ECP Mode Use DMA   : 1 or 3
   Parallel Port EPP type    : EPP1.9 or EPP1.7

I have try ECP only mode and ECP/EPP mode with DMA 1 and 3 without
good luck :-(.

--------------------------------------------------------------------------------

My /proc/cpuinfo sais:

processor : 0
vendor_id : GenuineIntel
cpu family : 5
model  : 2
model name : Pentium 75 - 200
stepping : 12
cpu MHz  : 132.956803
fdiv_bug : no
hlt_bug  : no
sep_bug  : no
f00f_bug : yes
coma_bug : no
fpu  : yes
fpu_exception : yes
cpuid level : 1
wp  : yes
flags  : fpu vme de pse tsc msr mce cx8
bogomips : 53.04

--------------------------------------------------------------------------------

My /proc/pci sais:

PCI devices found:
  Bus  0, device   0, function  0:
    Host bridge: Intel 82437 (rev 2).
      Medium devsel.  Master Capable.  Latency=32.
  Bus  0, device   7, function  0:
    ISA bridge: Intel 82371FB PIIX ISA (rev 2).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  No
bursts.
  Bus  0, device   7, function  1:
    IDE interface: Intel 82371FB PIIX IDE (rev 2).
      Medium devsel.  Fast back-to-back capable.  Master Capable.
Latency=32.
      I/O at 0x3000 [0x3001].
  Bus  0, device  18, function  0:
    VGA compatible controller: S3 Inc. Trio32/Trio64 (rev 67).
      Medium devsel.  IRQ 10.
      Non-prefetchable 32 bit memory at 0xe0000000 [0xe0000000].
--------------------------------------------------------------------------------

I have try loading parport_pc with DMA settings and without it. Only the
PIO
mode works and only with CIF size, with QCIF size I get a "read(...)"
error and
in /var/log/messages:

cpia.c: parse_picture(2156): header not found

And I can not read images anymore. At least with the 1.1 version of the
driver I
can read images with compression_mode:quality (with the 1.0 version I
only can read
images with compression_mode:none) up to 2 fps with CIF size.

When I try to use dma I load cpia_pp in this way:

/sbin/insmod parport
/sbin/insmod parport_pc io=0x378 dma=3 irq=7
/sbin/insmod videodev
/sbin/insmod cpia
/sbin/insmod cpia_pp
echo 7 >> /proc/parport/0/irq

and the results:

Jul 31 10:44:31 veronica kernel: parport0: PC-style at 0x378 (0x778),
irq 7, dma 3 [SPP,ECP,ECPEPP,ECPPS2]
Jul 31 10:45:27 veronica kernel: Linux video capture interface: v1.00
Jul 31 10:45:30 veronica kernel: V4L-Driver for Vision CPiA based
cameras v1.1.0
Jul 31 10:45:31 veronica insmod: /lib/modules/2.2.14-5.0/misc/cpia_pp.o:
unresolved symbol cpia_unregister_camera
Jul 31 10:45:31 veronica insmod: /lib/modules/2.2.14-5.0/misc/cpia_pp.o:
unresolved symbol cpia_register_camera
Jul 31 10:45:32 veronica kernel: Parallel port driver for Vision CPiA
based cameras v1.1.0
Jul 31 10:45:32 veronica kernel:   using DMA mode (irq 7, DMA 3)
Jul 31 10:45:32 veronica kernel:   CPiA Version: 1.20 (2.0)
Jul 31 10:45:32 veronica kernel:   CPiA PnP-ID: 0553:0002:0100
Jul 31 10:45:32 veronica kernel:   VP-Version: 1.0 0100
Jul 31 10:45:32 veronica kernel:   1 camera(s) found

On /proc/modules:

cpia_pp                18680   0
cpia                   60540   0 [cpia_pp]
parport_pc              7252   1 [cpia_pp]
parport                 7380   1 [cpia_pp parport_pc]
videodev                2432   1 [cpia]
opl3                   11272   0
sb                     33908   0
uart401                 6032   0 [sb]
sound                  58008   0 [opl3 sb uart401]
soundlow                 300   0 [sound]
soundcore               2468   6 [sb sound]

On /proc/cpia/video0

read-only
-----------------------
V4L Driver version:       1.1.0
CPIA Version:             1.20 (2.0)
CPIA PnP-ID:              0553:0002:0100
VP-Version:               1.0 0100
system_state:             0x02
grab_state:               0x20
stream_state:             0x00
fatal_error:              0x00
cmd_error:                0x00
debug_flags:              0x00
vp_status:                0x10
error_code:               0x64
video_size:               CIF
roi:                      (  0,   0) to (352, 288)
actual_fps:                 7
transfer_rate:             770kB/s

read-write
-----------------------  current       min       max   default  comment
brightness:                   50         0       100        50
contrast:                     48         0        96        48  steps of
8
saturation:                   50         0       100        50
sensor_fps:               15.000         3        30        15
stream_start_line:           240         0       288       240
sub_sample:                  422       420       422       422
yuv_order:                  YUYV      YUYV      UYVY      YUYV
ecp_timing:               normal      slow    normal    normal
color_balance_mode:         auto    manual      auto      auto
red_gain:                     51         0       212        32
green_gain:                    3         0       212         6
blue_gain:                    57         0       212        92
max_gain:                      8         1         8         8  powers
of 2
exposure_mode:              auto    manual      auto      auto
centre_weight:                on       off        on        on
gain:                          4         1  max_gain         1  1,2,4,8
possible
fine_exp:                      2         0       510         0
coarse_exp:                  200         0       302       185
red_comp:                    220       220       255       220
green1_comp:                 214       214       255       214
green2_comp:                 214       214       255       214
blue_comp:                   230       230       255       230
apcor_gain1:                0x18       0x0      0xff      0x1c
apcor_gain2:                0x16       0x0      0xff      0x1a
apcor_gain4:                0x24       0x0      0xff      0x2d
apcor_gain8:                0x34       0x0      0xff      0x2a
vl_offset_gain1:              20         0       255        24
vl_offset_gain2:              24         0       255        28
vl_offset_gain4:              26         0       255        30
vl_offset_gain8:              26         0       255        30
flicker_control:             off       off        on       off
mains_frequency:              50        50        60        50 only
50/60
allowable_overexposure:  141auto      auto       255      auto
compression_mode:           auto    none,auto,manual      auto
decimation_enable:           off       off        on       off
compression_target:      quality framerate   quality   quality
target_framerate:             15         1        30        15
target_quality:                5         1        64         5
y_threshold:                  11         0        31         6
uv_threshold:                 11         0        31         6
hysteresis:                    3         0       255         3
threshold_max:                11         0       255        11
small_step:                    1         0       255         1
large_step:                    3         0       255         3
decimation_hysteresis:         2         0       255         2
fr_diff_step_thresh:           5         0       255         5
q_diff_step_thresh:            3         0       255         3
decimation_thresh_mod:         2         0       255         2

---------------------------------------------------------------------
After trying to read some images ( with no success :-( ):

on /proc/dma

0: SoundBlaster8
 3: cpia_pp
 4: cascade
 5: SoundBlaster16

on /proc/interrupts:

           CPU0
  0:      69433          XT-PIC  timer
  1:       3032          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  4:       3554          XT-PIC  serial
  5:       1493          XT-PIC  soundblaster
  7:          1          XT-PIC  parport0
  8:          1          XT-PIC  rtc
 13:          1          XT-PIC  fpu
 14:       1928          XT-PIC  ide0
 15:     475266          XT-PIC  ide1
NMI:          0

When I kill my application I get:

Jul 31 10:49:10 veronica kernel: cpia.c:clear_stall(2885):Clearing stall
Jul 31 10:49:52 veronica kernel: cpia.c:clear_stall(2885):Clearing stall
Jul 31 10:51:32 veronica kernel: cpia.c:clear_stall(2885):Clearing stall
Jul 31 10:52:12 veronica kernel: cpia.c:clear_stall(2885):Clearing stall

Well I hope I don't have broken hardware, I think this is not the
reason. I will be happy only getting images in QCIF size, althougt I can
not use DMA, but if I can work with DMA mode I'll be very, very happy.

If you need some more information don't hesiate to contact me. Anyway
thanks a lot for your time and your great work with the driver.

Regards.
José Miguel.


-- 
-------------------------------------------------------------------
Jose Miguel Buenaposada Biencinto

Facultad de Informática                  | Computer Science School
Universidad Politécnica de Madrid  (UPM) | Madrid Tech. University.
Campus de Montegancedo s/n 
28660 Boadilla del Monte, Madrid (ESPAÑA)| (SPAIN)
Voice    +34 91 336 69 47
e-mail:  jmbuena@dia.fi.upm.es
web   :  http://www.dia.fi.upm.es/~jmbuena 
-------------------------------------------------------------------