From Peter.Pregler@risc.uni-linz.ac.at Fri, 14 Jan 2000 11:53:39 +0100 (CET) Date: Fri, 14 Jan 2000 11:53:39 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] Administrativa - mailing list vision-webcam@errors.no moved Hi all, as you might have noticed it was very quiet on the vision-webcam list the last month. This was due to the fact the list was non-functional. You should have got/or get a message indicating a big change. This is due to the fact that the mailing list vision-webcam@errors.no you have been subscribed to has moved to cpia@risc.uni-linz.ac.at. Check out the big-change mail for information about how to subscribe/unsubscribe, archive notes or change the settings of your new subscription. Once again, you get this e-mail because you were subscribed to vision-webcam@errors.no which is not functional anymore. Please Jarl update the webpage accordingly, i.e. point to http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia Some news about new driver version that bounced to vision-webcam@errors.no will follow as soon as I am sure this replacement does what I expect of it. Greetings, Peter (emergency list-admin) ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From Peter.Pregler@risc.uni-linz.ac.at Fri, 14 Jan 2000 12:05:34 +0100 (CET) Date: Fri, 14 Jan 2000 12:05:34 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] New driver release and some important info Hi all, I have released a new driver that should fix most of the outstanding problems. Apart from that I have also submitted this version to Alan Cox for inclusion to 2.2.x. If the thing is accepted this will be last version release for 2.2.x as a standalone code. There is one incompatibility added with this version. I have changed the byte order for the read-method for palette RGB24/RGB32. This is due to the fact that v4l-applications exepct a different byte-order for mmap/read access to the driver. This is silly and a bug but state of the art. A consequence is that older versions of the client shipped with the driver will now display wrong colors. Just use the client in this release. The latest stock gqcam and applications like camserv should work now too. Here is the complete list of changes: 1999-01-12 v0.5.0 Patches from Scott J. Bertin - procfs code not compiled if kernel does not support procfs - cpia module won't unload now if /proc/cpia is in use - transfer rate is no longer a running average - busy_lock is now initialized in init_camera_struct() instead of cpia_open() - cleaned up initialization of pp and usb modules in cpia_init so they are initialized int the same order regardless of the combination of modules or compiled in items. Patches from Peter Pregler : - fix for color_balance_mode proc setting - check for possible division by zero in fetch_frame - default compression method is 'auto' again, first frame is always loaded uncompressed - load frame after size switch uncompressed - restructure of camera initialization, versions are printed only once - mmap byte order kludge - added VIDEO_SIZE_88_72 (quarter CIF) Patches from Chris Whiteford - camera inistialisation fix for firmware 1.02 A new version of the python-gtk control client can be found at: http://www.risc.uni-linz.ac.at/people/ppregler/cpia/ That one will allow control over about all camera settings that seem reasonable to me. Have fun, Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From Chris@informinteractive.com Fri, 14 Jan 2000 12:58:03 -0500 Date: Fri, 14 Jan 2000 12:58:03 -0500 From: Chris Whiteford Chris@informinteractive.com Subject: [cpia] New driver release and some important info This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF5EB8.EB01CDC0 Content-Type: text/plain; charset="iso-8859-1" -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I was wondering where everyone went. I knew that the driver was behaving relatively good, but everyone just disappeared.... AHHHHH.. Ok your back now, whoo that was close... const programmer* chris = NULL; return chris; - -----Original Message----- From: Peter Pregler [mailto:Peter.Pregler@risc.uni-linz.ac.at] Sent: Friday, January 14, 2000 6:06 AM To: cpia@risc.uni-linz.ac.at Subject: [cpia] New driver release and some important info Hi all, I have released a new driver that should fix most of the outstanding problems. Apart from that I have also submitted this version to Alan Cox for inclusion to 2.2.x. If the thing is accepted this will be last version release for 2.2.x as a standalone code. There is one incompatibility added with this version. I have changed the byte order for the read-method for palette RGB24/RGB32. This is due to the fact that v4l-applications exepct a different byte-order for mmap/read access to the driver. This is silly and a bug but state of the art. A consequence is that older versions of the client shipped with the driver will now display wrong colors. Just use the client in this release. The latest stock gqcam and applications like camserv should work now too. Here is the complete list of changes: 1999-01-12 v0.5.0 Patches from Scott J. Bertin - procfs code not compiled if kernel does not support procfs - cpia module won't unload now if /proc/cpia is in use - transfer rate is no longer a running average - busy_lock is now initialized in init_camera_struct() instead of cpia_open() - cleaned up initialization of pp and usb modules in cpia_init so they are initialized int the same order regardless of the combination of modules or compiled in items. Patches from Peter Pregler : - fix for color_balance_mode proc setting - check for possible division by zero in fetch_frame - default compression method is 'auto' again, first frame is always loaded uncompressed - load frame after size switch uncompressed - restructure of camera initialization, versions are printed only once - mmap byte order kludge - added VIDEO_SIZE_88_72 (quarter CIF) Patches from Chris Whiteford - camera inistialisation fix for firmware 1.02 A new version of the python-gtk control client can be found at: http://www.risc.uni-linz.ac.at/people/ppregler/cpia/ That one will allow control over about all camera settings that seem reasonable to me. Have fun, Peter - ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler _______________________________________________ cpia mailing list - cpia@risc.uni-linz.ac.at http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.1 for non-commercial use iQA/AwUBOH9klHCyV2ve66GWEQLxrACfTYbyOkFjVVNYdtBpQBak/dfC8D8AoOn9 Nc1tvDHY29DnuFWhoxLQ3mlP =Fb/J -----END PGP SIGNATURE----- ------_=_NextPart_001_01BF5EB8.EB01CDC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [cpia] New driver release and some important info

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I was wondering where everyone went.  I knew = that the driver was behaving relatively good, but everyone just = disappeared....  AHHHHH..  Ok your back now, whoo that was = close...

const programmer* chris =3D NULL;
return chris;



- -----Original Message-----
From: Peter Pregler [mailto:Peter.Pregler@r= isc.uni-linz.ac.at]
Sent: Friday, January 14, 2000 6:06 AM
To: cpia@risc.uni-linz.ac.at
Subject: [cpia] New driver release and some = important info


Hi all,

I have released a new driver that should fix most of = the outstanding
problems. Apart from that I have also submitted this = version to Alan Cox
for inclusion to 2.2.x. If the thing is accepted = this will be last
version release for 2.2.x as a standalone = code.

There is one incompatibility added with this version. = I have changed the
byte order for the read-method for palette = RGB24/RGB32. This is due to the
fact that v4l-applications exepct a different = byte-order for mmap/read
access to the driver. This is silly and a bug but = state of the art. A
consequence is that older versions of the client = shipped with the driver
will now display wrong colors. Just use the client = in this release. The
latest stock gqcam and applications like camserv = should work now too. Here
is the complete list of changes:

1999-01-12 v0.5.0

      Patches from Scott J. = Bertin <sbertin@mindspring.com>
      - procfs code not = compiled if kernel does not support procfs
      - cpia module won't = unload now if /proc/cpia is in use
      - transfer rate is no = longer a running average
      - busy_lock is now = initialized in init_camera_struct()
        instead = of cpia_open()
      - cleaned up = initialization of pp and usb modules in cpia_init
        so they = are initialized int the same order regardless of the
        = combination of modules or compiled in items.

      Patches from Peter = Pregler <Peter_Pregler@email.com>:
      - fix for = color_balance_mode proc setting
      - check for possible = division by zero in fetch_frame
      - default compression = method is 'auto' again, first frame
        is always = loaded uncompressed
      - load frame after = size switch uncompressed
      - restructure of = camera initialization, versions are printed
        only = once
      - mmap byte order = kludge
      - added = VIDEO_SIZE_88_72 (quarter CIF)

      Patches from Chris = Whiteford <Chris@informinteractive.com>
      - camera = inistialisation fix for firmware 1.02


A new version of the python-gtk control client can be = found at:

http://www.risc.uni-linz.ac.at/people/ppregler/cpia/

That one will allow control over about all camera = settings that seem
reasonable to me.

Have fun, Peter


- -------------------------------
Email: Peter.Pregler@risc.uni-linz.ac.at
WWW:  
http://www.risc.uni-linz.ac.at/people/ppregler

_______________________________________________
cpia mailing list  -  = cpia@risc.uni-linz.ac.at
http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/lis= tinfo/cpia

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use = <http://www.pgp.com>

iQA/AwUBOH9klHCyV2ve66GWEQLxrACfTYbyOkFjVVNYdtBpQBak/dfC8D8AoOn= 9
Nc1tvDHY29DnuFWhoxLQ3mlP
=3DFb/J
-----END PGP SIGNATURE-----

------_=_NextPart_001_01BF5EB8.EB01CDC0-- From Jochen.Scharrlach@schwaben.de Sat, 15 Jan 2000 16:12:15 +0100 (CET) Date: Sat, 15 Jan 2000 16:12:15 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB anyone? Hi, is anyone working on the USB driver? I found that the driver supplied with the 2.3.x kernel is very very simple (i.e. many features simply aren't implemented) and either my camera is broken or the YUV->RGB conversion doesn't work correctly. I took a look at the PPC2-driver and at the first glance it didn't seem to be very difficult to merge the kernel usb/cpia.c to the dummy cpia_usb.c - well actually it isn't that easy, because the IRQ is handled differently and the PPC2-driver doesn't support hot-plug. I'd take a closer look at it if really noone else works on the driver. Bye, Jochen -- new signature coming RSN (tm) From bas@brijn.nu Sat, 15 Jan 2000 23:21:09 +0100 Date: Sat, 15 Jan 2000 23:21:09 +0100 From: Bas Rijniersce bas@brijn.nu Subject: [cpia] Cpia 0.5.0 Hi, It was very quite :-) Let's see if this arrives... This version works great for me. I tried it on two machines, a dual celeron desktop and een Toshiba Tecra 8000 laptop. Peter, the cpia-control client is very useful! Thanx Bas ---- Bas Rijniersce Phone +31 341 550545 Oude Telgterweg 81 Fax +31 341 562940 3851 EA Ermelo http://www.brijn.nu The Netherlands bas@brijn.nu From naresh@mantra.nl Sun, 16 Jan 2000 11:13:05 +0100 (CET) Date: Sun, 16 Jan 2000 11:13:05 +0100 (CET) From: Naresh Sharma naresh@mantra.nl Subject: [cpia] USB anyone? Jochen, My usb cpia ezcam crashes the system after a few minutes of running. I you want help in fixing the usb-cpia cam, I'll be happy to help. Naresh On Sat, 15 Jan 2000, Jochen Scharrlach wrote: > Hi, > > is anyone working on the USB driver? I found that the driver supplied > with the 2.3.x kernel is very very simple (i.e. many features simply > aren't implemented) and either my camera is broken or the YUV->RGB > conversion doesn't work correctly. > > I took a look at the PPC2-driver and at the first glance it didn't > seem to be very difficult to merge the kernel usb/cpia.c to the dummy > cpia_usb.c - well actually it isn't that easy, because the IRQ is > handled differently and the PPC2-driver doesn't support hot-plug. I'd > take a closer look at it if really noone else works on the driver. > > Bye, > Jochen > > -- > new signature coming RSN (tm) > > _______________________________________________ > cpia mailing list - cpia@risc.uni-linz.ac.at > http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia > Greetings, __ naresh@mantra.nl Naresh. __________/ F Ph: +31.40.2910125 c'____---__=_/ fax: +31.40.2910126 Dr. Ir. N. Sharma_____o_____o________http://www.mantra.nl Defining the Art and Science of Design Automation From Peter.Pregler@risc.uni-linz.ac.at Sun, 16 Jan 2000 11:18:18 +0100 (CET) Date: Sun, 16 Jan 2000 11:18:18 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] USB anyone? On 15-Jan-00 Jochen Scharrlach wrote: > > I took a look at the PPC2-driver and at the first glance it didn't > seem to be very difficult to merge the kernel usb/cpia.c to the dummy > cpia_usb.c - well actually it isn't that easy, because the IRQ is > handled differently and the PPC2-driver doesn't support hot-plug. I'd > take a closer look at it if really noone else works on the driver. Actually the API of the modules cpia/cpia_pp was designed in a way to allow the addition of the usb stuff. The irq-stuff should not be any problem at all. Right now the cpia-module implements a synchronous read model from the camera. As far as I can judge this must be independant of what you do with interrupts/dma or whatsoever in the low-level cpia_pp/cpia_usb modul. If irqs are a problem the API is broken. What is a problem is hot-plug. The API was desinged based on features available for PPC-cameras. If need be just try to extend the API. I do know of nobody who is working on a PPC/USB merge. I won't do it since I have no USB-camera at hand. Scott is working on a port for 2.3.X. I think you should base your work on his code. The cpia.c needs some changes in order to work with 2.3.x. As for me I will clean up the control-client and see if implementing some sort of asynchronous streaming read (in a kernel thread) gives any significant performance gain. -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 From Nick.Holloway@alfie.demon.co.uk 15 Jan 2000 12:10:44 -0000 Date: 15 Jan 2000 12:10:44 -0000 From: Nick Holloway Nick.Holloway@alfie.demon.co.uk Subject: [cpia] GTK 1.1 compatability for gqcam client Owing to the byte order changing with 0.5.0, I've had to recompile the client. Here is a less intrusive patch than my last one to enable it to compile and run with GTK 1.1 (which is the version with the current stable Debian release). diff -u frontend.h~ frontend.h --- frontend.h~ Wed Nov 10 22:50:23 1999 +++ frontend.h Sat Jan 15 12:05:03 2000 @@ -23,3 +23,10 @@ extern unsigned char pic[MAX_RGBA_IMAGE_SIZE]; extern int frozen; extern guint timeoutid; + +#if GTK_MAJOR_VERSION == 1 && GTK_MINOR_VERSION == 1 +# define gtk_container_set_border_width gtk_container_border_width +# define gtk_toggle_button_set_active gtk_toggle_button_set_state +# define gtk_notebook_get_current_page gtk_notebook_current_page +#endif + -- `O O' | Nick.Holloway@alfie.demon.co.uk // ^ \\ | http://www.alfie.demon.co.uk/ From Jochen.Scharrlach@schwaben.de Sun, 16 Jan 2000 12:47:39 +0100 (CET) Date: Sun, 16 Jan 2000 12:47:39 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB anyone? Naresh Sharma writes: > My usb cpia ezcam crashes the system after a few minutes of running. I > you want help in fixing the usb-cpia cam, I'll be happy to help. Which kernel revision do you have? 2.3.35 was the first that worked for me at all and I tried many 2.3.x kernels! (my partitions are fsck'ed rather often :-/) Bye, Jochen -- new signature coming RSN (tm) From Jochen.Scharrlach@schwaben.de Sun, 16 Jan 2000 13:03:17 +0100 (CET) Date: Sun, 16 Jan 2000 13:03:17 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB anyone? Peter Pregler writes: > Actually the API of the modules cpia/cpia_pp was designed in a way to allow the > addition of the usb stuff. The irq-stuff should not be any problem at all. As I said, I didn't took a very close look at it, but it seems that the USB-API uses it's own model of buffering (so the IRQ-handler has to copy the stuff around), while the PP-code (AFAIR) seems to use the IRQ handler only to trigger the rest of the code. Maybe I misinterpreted it and everything is handled within cpia_pp.c. Another problem is hot-plug: the current cpia.c recognizes only cameras that are plugged while the driver is loaded. But the USB-cpias can be plugged and unlugged any time (which is quite useful if the driver crashes), so the strategy with the two arrays in cpia.c and cpia_pp.c to recognize the correct camera won't work. The only elegant way would be to hide the lowlevel-stuff somewhere in video_device, which makes it necessary to change cpia.c. > I do know of nobody who is working on a PPC/USB merge. I won't do it since > I have no USB-camera at hand. Scott is working on a port for 2.3.X. I think you He was even faster than you :) Bye, Jochen -- new signature coming RSN (tm) From naresh@mantra.nl Sun, 16 Jan 2000 13:31:57 +0100 (CET) Date: Sun, 16 Jan 2000 13:31:57 +0100 (CET) From: Naresh Sharma naresh@mantra.nl Subject: [cpia] USB anyone? > > My usb cpia ezcam crashes the system after a few minutes of running. I > > you want help in fixing the usb-cpia cam, I'll be happy to help. > > Which kernel revision do you have? 2.3.35 was the first that worked > for me at all and I tried many 2.3.x kernels! (my partitions are > fsck'ed rather often :-/) I've tried it with 2.3.38->2.3.40-pre-3, in addition to 2.2.14+back-ported-usb drivers for 2.3.39->2.2.14. All crash after a while. Initially it works, but it soon drops dead. I can fix it up so that you can see the w3cam rendering jpegs from outside. Its not stable and will make me fsck the file system. I dont want my system fscking that often :-)... I'm hoping that the 2.3.40 will have a more stable usb stack. Greetings, __ naresh@mantra.nl Naresh. __________/ F Ph: +31.40.2910125 c'____---__=_/ fax: +31.40.2910126 Dr. Ir. N. Sharma_____o_____o________http://www.mantra.nl Defining the Art and Science of Design Automation From Peter.Pregler@risc.uni-linz.ac.at Sun, 16 Jan 2000 14:40:24 +0100 (CET) Date: Sun, 16 Jan 2000 14:40:24 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] USB anyone? On 16-Jan-00 Jochen Scharrlach wrote: > Peter Pregler writes: > > Actually the API of the modules cpia/cpia_pp was designed in a way to > allow the > > addition of the usb stuff. The irq-stuff should not be any problem at all. > > As I said, I didn't took a very close look at it, but it seems that > the USB-API uses it's own model of buffering (so the IRQ-handler has > to copy the stuff around), while the PP-code (AFAIR) seems to use the > IRQ handler only to trigger the rest of the code. Maybe I > misinterpreted it and everything is handled within cpia_pp.c. Right now the interrupt handler is only used to notify DMA-transfer ends. And that is done completly within cpia_pp.c. Have a look at cpia_pp_irq_handler in cpia_pp.c. There is a api-function to register an additional image-ready interrupt handler for usage within cpia.c (cpia_pp_registerCallback) which would be used to implement asynchronous streaming (i.e. the interrupt would flag a 'image ready' condition) which would be handled by a kernel thread. But right now the interrupt handling for that case is not correct in the ppc-driver. So I have removed that code from cpia.c and changed it to synchronous read. And for that you need no interrupt handling at all. As for buffering: the camera-frame buffer is allocated in cpia.c and passed to the parport driver. It is up to your usb-code to grab directly to that buffer or use your own additional buffer. In the parport case grabbing happens either directly to that buffer (in PIO mode) or to a special DMA-buffer of PAGE_SIZE that is copied in the bottom-half interrupt handler (dma_handler) to the actual camera-frame buffer. > Another problem is hot-plug: the current cpia.c recognizes only > cameras that are plugged while the driver is loaded. But the USB-cpias > can be plugged and unlugged any time (which is quite useful if the > driver crashes), so the strategy with the two arrays in cpia.c and > cpia_pp.c to recognize the correct camera won't work. The only elegant > way would be to hide the lowlevel-stuff somewhere in video_device, > which makes it necessary to change cpia.c. That is fine with me as long as it does not blur the destinction between cpia.c and cpia_XXX.c. I don't mind where internal structures are connected to. Can you show me some code? Also note that I made sure that I cannot crash the box if the parport-camera is removed during operation. So cpia.c should be hot-plug safe. I did quite some testing with that. I guess one should not unplug a working parport-camera because it might be damaged. But you will not crash the kernel/driver right now. -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 From sbertin@mindspring.com Sun, 16 Jan 2000 11:07:11 -0500 (EST) Date: Sun, 16 Jan 2000 11:07:11 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: Fwd: Re: [cpia] USB anyone? --1037094400-846930886-948038866=:728 Content-Type: TEXT/plain; charset=us-ascii On 16 Jan, Peter Pregler wrote: > What is a problem is hot-plug. The API was desinged based on > features available for PPC-cameras. If need be just try to extend the > API. cpia.c was designed to support hot-plug. That is what the cpia_register_camera and cpia_unregister_camera functions are for. I assume USB provides some way to determine when a device is added/removed. There isn't a good way to do that with the parallel port, so hot plugging there isn't implemented. Since this is becoming such a hot topic, I've attached a patch to allow cpia.c to compile on 2.3 kernels. This has not been well tested, so use it at your own risk. Scott J. Bertin sbertin@mindspring.com --1037094400-846930886-948038866=:728 Content-Type: TEXT/plain; CHARSET=US-ASCII Content-Description: 2.3-cpia.patch diff -r -c --exclude=linux cpia-0.5.0/module/cpia.c work/module/cpia.c *** cpia-0.5.0/module/cpia.c Wed Jan 12 16:04:26 2000 --- work/module/cpia.c Sun Jan 16 00:36:52 2000 *************** *** 34,39 **** --- 34,40 ---- #include #include #include + #include #include #include #include *************** *** 344,349 **** --- 345,351 ---- /* forward declaration of local function */ static void reset_camera_struct(struct cam_data *cam); + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)) /********************************************************************** * * Memory management *************** *** 374,426 **** return 0; } ! static inline unsigned long kvirt_to_phys(unsigned long adr) { return uvirt_to_phys(VMALLOC_VMADDR(adr)); } ! static void * rvmalloc(unsigned long size) { ! void * mem; unsigned long adr, page; size += (PAGE_SIZE - 1); size &= ~(PAGE_SIZE - 1); ! mem=vmalloc(size); ! if (mem) { ! /* Clear the ram out, no junk to the user */ ! memset(mem, 0, size); ! adr=(unsigned long) mem; ! while (size > 0) { ! page = kvirt_to_phys(adr); ! mem_map_reserve(MAP_NR(phys_to_virt(page))); ! adr+=PAGE_SIZE; ! if (size > PAGE_SIZE) size-=PAGE_SIZE; ! else size=0; ! } } return mem; } ! static void rvfree(void * mem, unsigned long size) { unsigned long adr, page; ! size += (PAGE_SIZE - 1); size &= ~(PAGE_SIZE - 1); ! if (mem) { ! adr=(unsigned long) mem; ! while (size > 0) { ! page = kvirt_to_phys(adr); ! mem_map_unreserve(MAP_NR(phys_to_virt(page))); ! adr+=PAGE_SIZE; ! if (size > PAGE_SIZE) size-=PAGE_SIZE; ! else size=0; ! } ! vfree(mem); } } /********************************************************************** --- 376,490 ---- return 0; } ! static inline unsigned long kvirt_to_pa(unsigned long adr) { return uvirt_to_phys(VMALLOC_VMADDR(adr)); } ! #else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)) */ ! ! /********************************************************************** ! * ! * Memory management ! * ! * This is a shameless copy from the USB-cpia driver (linux kernel ! * version 2.3.29 or so, I have no idea what this code actually does ;). ! * Actually it seems to be a copy of a shameless copy of the bttv-driver. ! * Or that is a copy of a shameless copy of ... (To the powers: is there ! * no generic kernel-function to do this sort of stuff?) ! * ! **********************************************************************/ ! ! /* Given PGD from the address space's page table, return the kernel ! * virtual mapping of the physical memory mapped at ADR. ! */ ! static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr) { ! unsigned long ret = 0UL; ! pmd_t *pmd; ! pte_t *ptep, pte; ! ! if (!pgd_none(*pgd)) { ! pmd = pmd_offset(pgd, adr); ! if (!pmd_none(*pmd)) { ! ptep = pte_offset(pmd, adr); ! pte = *ptep; ! if (pte_present(pte)) ! ret = page_address(pte_page(pte)) | ! (adr & (PAGE_SIZE-1)); ! } ! } ! return ret; ! } ! ! /* Here we want the physical address of the memory. ! * This is used when initializing the contents of the ! * area and marking the pages as reserved. ! */ ! static inline unsigned long kvirt_to_pa(unsigned long adr) ! { ! unsigned long va, kva, ret; ! ! va = VMALLOC_VMADDR(adr); ! kva = uvirt_to_kva(pgd_offset_k(va), va); ! ret = __pa(kva); ! return ret; ! } ! #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)) */ ! ! static void *rvmalloc(unsigned long size) ! { ! void *mem; unsigned long adr, page; + /* Round it off to PAGE_SIZE */ size += (PAGE_SIZE - 1); size &= ~(PAGE_SIZE - 1); ! mem = vmalloc(size); ! if (!mem) ! return NULL; ! ! memset(mem, 0, size); /* Clear the ram out, no junk to the user */ ! adr = (unsigned long) mem; ! while (size > 0) { ! page = kvirt_to_pa(adr); ! #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)) ! mem_map_reserve(MAP_NR(phys_to_virt(page))); ! #else ! mem_map_reserve(MAP_NR(__va(page))); ! #endif ! adr += PAGE_SIZE; ! if (size > PAGE_SIZE) ! size -= PAGE_SIZE; ! else ! size = 0; } + return mem; } ! static void rvfree(void *mem, unsigned long size) { unsigned long adr, page; ! ! if (!mem) ! return; ! size += (PAGE_SIZE - 1); size &= ~(PAGE_SIZE - 1); ! adr=(unsigned long) mem; ! while (size > 0) { ! page = kvirt_to_pa(adr); ! mem_map_unreserve(MAP_NR(__va(page))); ! adr += PAGE_SIZE; ! if (size > PAGE_SIZE) ! size -= PAGE_SIZE; ! else ! size = 0; } + vfree(mem); } *************** *** 3108,3114 **** } pos = (unsigned long)(cam->frame_buf); while (size > 0) { ! page = kvirt_to_phys(pos); if (remap_page_range(start, page, PAGE_SIZE, PAGE_SHARED)) { up(&cam->busy_lock); return -EAGAIN; --- 3187,3193 ---- } pos = (unsigned long)(cam->frame_buf); while (size > 0) { ! page = kvirt_to_pa(pos); if (remap_page_range(start, page, PAGE_SIZE, PAGE_SHARED)) { up(&cam->busy_lock); return -EAGAIN; --1037094400-846930886-948038866=:728-- From Jochen.Scharrlach@schwaben.de Sun, 16 Jan 2000 22:18:55 +0100 (CET) Date: Sun, 16 Jan 2000 22:18:55 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB anyone? --Multipart_Sun_Jan_16_22:18:55_2000-1 Content-Type: text/plain; charset=US-ASCII Peter Pregler writes: > That is fine with me as long as it does not blur the destinction between cpia.c > and cpia_XXX.c. I don't mind where internal structures are connected to. Can > you show me some code? My idea is to add an argument to cpia_register_camera(), so I can stuff the driver-struct into the video_device->lowlevel much sooner. What I am missing is a cpia_unregister_camera()! I have added my first try on cpia_usb.c, so you can take a look at it. DISCLAIMER: I am 99.999% sure that it won't even compile, it's just the result of two Sunday afternoons of hacking. The hard job will be to get it to work - I am not even sure if the logic is correct, the USB-stack isn't very well documented :-/ Bye, Jochen -- new signature coming RSN (tm) --Multipart_Sun_Jan_16_22:18:55_2000-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="cpia_usb.c" Content-Transfer-Encoding: 7bit #include #include #include static int cpia_usb_open(int camnr, void **privdata); static int cpia_usb_registerCallback(void *privdata, void (*cb) (void *cbdata), void *cbdata); static int cpia_usb_transferCmd(void *privdata, u8 *command, u8 *data); static int cpia_usb_streamStart(void *privdata); static int cpia_usb_streamStop(void *privdata); static int cpia_usb_streamRead(void *privdata, u8 *frame, int noblock); static int cpia_usb_close(void *privdata); #define ABOUT "USB driver for Vision CPiA based cameras" static struct cpia_camera_ops cpia_usb_ops = { cpia_usb_open, cpia_usb_registerCallback, cpia_usb_transferCmd, cpia_usb_streamStart, cpia_usb_streamStop, cpia_usb_streamRead, cpia_usb_close }; struct cpia_sbuf { char *data; urb_t *urb; }; struct usb_cpia { /* Device structure */ struct usb_device *dev; unsigned char iface; struct wait_queue *wq_stream; }; static int cpia_usb_open(int camnr, usb_cpia **privdata) { usb_cpia *cpia = NULL; if (privdata == NULL) return -EINVAL; cpia = *privdata; if (cpia == NULL) return -EINVAL; if (usb_set_interface(cpia->dev, cpia->iface, 3) < 0) { printk(KERN_ERR "usb_set_interface error\n"); return -EBUSY; } return 0; } static int cpia_usb_transferCmd(void *privdata, u8 *command, u8 *data) { int err; int retval=0; int databytes; struct usb_device *cam = ((usb_cpia)privdata)->dev; if(cam == NULL) { DBG("Internal driver error: cam is NULL\n"); return -EINVAL; } if(command == NULL) { DBG("Internal driver error: command is NULL\n"); return -EINVAL; } databytes = (((int)command[7])<<8) | command[6]; if(command[0] == DATA_IN) { u8 buffer[8]; if(data == NULL) { DBG("Internal driver error: data is NULL\n"); return -EINVAL; } err = ReadPacket(cam, command, buffer, 8); if(err < 0) { return err; } memcpy(data, buffer, databytes); } else if(command[0] == DATA_OUT) { WritePacket(cam, command); } } else { DBG("Unexpected first byte of command: %x\n", command[0]); retval = -EINVAL; } return retval; } static int cpia_usb_registerCallback(void *privdata, void (*cb) (void *cbdata), void *cbdata) { return -ENODEV; } static int cpia_usb_streamStart(void *privdata) { return -ENODEV; } static int cpia_usb_streamStop(void *privdata) { return -ENODEV; } static int cpia_usb_streamRead(usb_cpia *cpia, u8 *frame, int noblock) { int len = 0; struct urb *urb = usb_alloc_urb(1); if (!urb) { printk(KERN_ERR "cpia_init_isoc: usb_init_isoc ret %d\n", 0); return -ENOMEM; } FILL_BULK_URB(urb, cpia->dev, usb_rcvbulkpipe(cpia->dev, 1), frame, CPIA_MAX_IMAGE_SIZE, cpia_usb_complete, cpia); err = usb_submit_urb(urb); if (err) { printk(KERN_ERR "cpia_init_isoc: usb_run_isoc(0) ret %d\n", err); return err; } interruptible_sleep_on(&cpia->wq_stream); len = urb->actual_length; usb_unlink_urb(urb); usb_free_urb(urb); return len; } static int cpia_usb_close(void *privdata) { return 0; } int cpia_usb_init(void) { /* return -ENODEV; */ return 0; } static void cpia_usb_complete(usb_cpia *cpia) { if (waitqueue_active(&cpia->wq_stream)) { /* FIXME */ wake_up(&cpia->wq_stream); } } // // convenience functions // /**************************************************************************** * * WritePacket * ***************************************************************************/ static int WritePacket(struct usb_device *cam, const u8 *packet) { if (packet == NULL) { return -EINVAL; } return usb_control_msg(cpia->dev, usb_sndctrlpipe(cpia->dev, 0), packet[1] + (packet[0] << 8), USB_TYPE_VENDOR | USB_RECIP_DEVICE, packet[2] + (packet[3] << 8), packet[4] + (packet[5] << 8), NULL, 0, HZ); } /**************************************************************************** * * ReadPacket * ***************************************************************************/ static int ReadPacket(struct usb_device *cam, u8 *packet, u8 *buf, size_t size) { if (packet == NULL || size <= 0) { return -EINVAL; } return usb_control_msg(cpia->dev, usb_rcvctrlpipe(cpia->dev, 0), packet[1] + (packet[0] << 8), USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, packet[2] + (packet[3] << 8), packet[4] + (packet[5] << 8), buf, size, HZ); } // // Probing and initializing // static void * cpia_probe(struct usb_device *dev, unsigned int ifnum) { struct usb_interface_descriptor *interface; struct usb_cpia *cpia; /* We don't handle multi-config cameras */ if (dev->descriptor.bNumConfigurations != 1) return NULL; interface = &dev->actconfig->interface[ifnum].altsetting[0]; /* Is it a CPiA? */ if (dev->descriptor.idVendor != 0x0553) return NULL; if (dev->descriptor.idProduct != 0x0002) return NULL; /* Checking vendor/product should be enough, but what the hell */ if (interface->bInterfaceClass != 0xFF) return NULL; if (interface->bInterfaceSubClass != 0x00) return NULL; /* We found a CPiA */ printk(KERN_INFO "USB CPiA camera found\n"); if ((cpia = kmalloc(sizeof(*cpia), GFP_KERNEL)) == NULL) { printk(KERN_ERR "couldn't kmalloc cpia struct\n"); return NULL; } memset(cpia, 0, sizeof(*cpia)); cpia->dev = dev; cpia->iface = interface->bInterfaceNumber; init_waitqueue(&cpia->wq_stream); if (usb_set_interface(dev, iface, 0) < 0) { printk(KERN_ERR "usb_set_interface error\n"); return NULL; } if(cpia_register_camera(&cpia_usb_ops, cpia)<0) { LOG("failed to cpia_register_camera\n"); return NULL; } return cpia; } static void cpia_disconnect(struct usb_device *dev, void *ptr) { struct usb_cpia *cpia = (struct usb_cpia *) ptr; // cpia_unregister_camera(cpia); usb_driver_release_interface(&cpia_driver, &cpia->dev->actconfig->interface[0]); /* Free the memory */ kfree(cpia); } static struct usb_driver cpia_driver = { "cpia", cpia_probe, cpia_disconnect, { NULL, NULL } }; int usb_cpia_init(void) { return usb_register(&cpia_driver); } void usb_cpia_cleanup(void) { usb_deregister(&cpia_driver); } #ifdef MODULE int init_module(void) { return usb_cpia_init(); } void cleanup_module(void) { usb_cpia_cleanup(); } #else /* !MODULE */ __initfunc(void cpia_usb_setup(char *str, int *ints)) { } #endif /* !MODULE */ --Multipart_Sun_Jan_16_22:18:55_2000-1-- From Peter.Pregler@risc.uni-linz.ac.at Sun, 16 Jan 2000 23:03:42 +0100 (CET) Date: Sun, 16 Jan 2000 23:03:42 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] USB anyone? On 16-Jan-00 Jochen Scharrlach wrote: > My idea is to add an argument to cpia_register_camera(), so I can > stuff the driver-struct into the video_device->lowlevel much > sooner. What I am missing is a cpia_unregister_camera()! Hmmm, I don't understand that. There is a cpia_unregister_camera in the current driver. Actually AFAIR it is there since Scott's major rewrite of the init-routines. It is used in cpia_pp.c in the cleanup_module routine. And I see not much of a destinction between cleanup_module and hot-plugging. It is just a different way to trigger it. I'll have a look at your code in the next days. Maybe I miss something basic. -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 From Chris@informinteractive.com Mon, 17 Jan 2000 14:10:12 -0500 Date: Mon, 17 Jan 2000 14:10:12 -0500 From: Chris Whiteford Chris@informinteractive.com Subject: [cpia] Happy Report This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF611E.7AD82940 Content-Type: text/plain; charset="iso-8859-1" -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Well I have just finished running through my usually little hardness script and i am happy to report that this version is working wounderfully with a v1.02 camera. I opened and closed the camera 1600 times and every picture was ok (execpt for the fact that my camera was out of focus) :-) Nice. I was running it on a Libretto 70CT on Kernel 2.2.14 It was running in PIO Mode, and I will be venturing into the land of DMA later tonight and I will post my results after that test. Good job guys. const programmer* chris = NULL; return chris; -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.1 for non-commercial use iQA/AwUBOINqB3CyV2ve66GWEQL9mwCfWP/GLcHcu4bTr5eMFRQ6+ktRDPIAn3Wj w7nAfyI8wSZ4gc0UBDiiWljQ =jtfO -----END PGP SIGNATURE----- ------_=_NextPart_001_01BF611E.7AD82940 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Happy Report

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well I have just finished running through my usually = little hardness script and i am happy to report that this version is = working wounderfully with a v1.02 camera.  I opened and closed the = camera 1600 times and every picture was ok (execpt for the fact that my = camera was out of focus) :-)

Nice.
I was running it on a Libretto 70CT on Kernel = 2.2.14
It was running in PIO Mode, and I will be venturing = into the land of DMA later tonight and I will post my results after = that test.

Good job guys.

const programmer* chris =3D NULL;
return chris;



-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use = <http://www.pgp.com>

iQA/AwUBOINqB3CyV2ve66GWEQL9mwCfWP/GLcHcu4bTr5eMFRQ6+ktRDPIAn3W= j
w7nAfyI8wSZ4gc0UBDiiWljQ
=3DjtfO
-----END PGP SIGNATURE-----

------_=_NextPart_001_01BF611E.7AD82940-- From Jochen.Scharrlach@schwaben.de Mon, 17 Jan 2000 20:55:16 +0100 (CET) Date: Mon, 17 Jan 2000 20:55:16 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB anyone? Peter Pregler writes: > Hmmm, I don't understand that. There is a cpia_unregister_camera in the current ok, I must have been dreaming about this one. I just patched my cpia.c and found that the patch needed a small fix before it could be applied, at least "patch -p2 < ..." didn't like it :) There is one thing I still don't understand: video_register_device() is called in cpia_register_camera(), while video_unregister_device() is called by cpia_close() - doesn't this make the device a one-way street, i.e. after closing your app you'll have to reload the module to start it again? If I am wrong again, the stuff below won't make much sense :*) > not much of a destinction between cleanup_module and hot-plugging. It is just a It seems to take some time until I understand the driver. Sorry, it *is* be possible to use your scheme, but I have to admit that I don't like it: there are two more or less redundant fixed-size arrays to keep track of the cameras. So I'll take this problem in two steps: first I'll make a driver that works with the current cpia.c and then I'll try to convince you to change the array-stuff... The theory: the highlevel cpia.c either gets called by the lowlevel-driver to (un)register a camera or it is called by the v4l-API to do something with an existing driver - I don't think it's ever needed that the cpia.c tells the lowlevel-driver to (un)register a camera, assuming that it is not possible to unload cpia.o *before* cpia_*.o (which wouldn't make sense IMHO). So only the lowlevel-drivers have to keep track of the cameras and no camera[] and camnr's are needed by cpia.c. The lowlevel-drivers could use a linked list for this. The following could be in cpia.h (keep in mind that my C is a bit rusty): struct cam_lowlevel; /* defined in the lowlevel driver */ struct cam_data { struct cam_data **previous; struct cam_data *next; struct cam_lowlevel *lowlevel; [...] }; // // adding a highlevel-struct to the list // #define cam_list_add(drv) \ {\ (drv)->previous = &cam_list;\ (drv)->next = cam_list;\ if (cam_list != NULL)\ cam_list->previous = &(drv)->next;\ cam_data = drv;\ } while (0) // // removing a highlevel-struct from the list // #define cam_list_remove(drv) \ {\ *(drv)->previous=(drv)->next;\ if ((drv)->next != NULL)\ (drv)->next->previous = (drv)->previous;\ } while (0) // // searching the highlevel-struct for the given camera object // and calling unregister_driver() with it // #define cam_unregister(cam) \ {\ struct cam_data *drv = cam_list;\ while (drv != NULL && drv->cam_lowlevel->camera != cam)\ drv = drv->next;\ if (drv != NULL)\ unregister_driver(drv);\ } while(0) The following would be in the lowlevel driver: static struct cam_data *cam_list = NULL; struct cam_lowlevel{ struct myTypeOfCamera *camera; [...] }; unregister_driver(cam_data *drv) { struct cam_lowlevel *mystuff = drv->cam_lowlevel; cam_list_remove(drv); cpia_unregister(drv); /* cleaning up mystuff */ } cpia_xyz_register(struct myTypeOfCamera *camera) { struct cam_data *drv = NULL; struct cam_lowlevel *cam; /* Initializing cam */ drv = cpia_register(cam); cam_list_add(drv); } cpia_xyz_unregister(struct myTypeOfCamera *camera) { cam_unregister(camera); } cpia_xyz_cleanup() { while (cam_list != NULL) unregister_driver(cam_list); /* and so on */ } It's certainly not in the best possible form, but I really think that *one* *linked list* could reduce the complexity and would make it mouch easier to write new lowlevel-drivers and maintain the existing ones. Just my $0.02, Jochen -- new signature coming RSN (tm) From sbertin@mindspring.com Mon, 17 Jan 2000 22:04:44 -0500 (EST) Date: Mon, 17 Jan 2000 22:04:44 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] USB anyone? On 17 Jan, Jochen Scharrlach wrote: > There is one thing I still don't understand: video_register_device() > is called in cpia_register_camera(), while video_unregister_device() > is called by cpia_close() That call is redundant (maybe) and will only occur if the the camera is open when cpia_unregister_camera is called. cam->ops will only be NULL if the camera was removed. See the FIXME comment in cpia_unregister_camera. This either needs to be made conditional on cam->open_count == 0 or removed from cpia_close. Until this can be tested with a USB camera I can't tell which is correct. Having it called twice is clearly wrong though. > It seems to take some time until I understand the driver. Sorry, it > *is* be possible to use your scheme, but I have to admit that I don't > like it: there are two more or less redundant fixed-size arrays to > keep track of the cameras. So I'll take this problem in two steps: > first I'll make a driver that works with the current cpia.c and then > I'll try to convince you to change the array-stuff... Feel free to get rid of the array stuff if you have a better solution. I had briefly eliminated the arrays, but the code became more complex and I didn't think it was worth saving the space of 8 pointers, so I put it back. > The theory: the highlevel cpia.c either gets called by the > lowlevel-driver to (un)register a camera or it is called by the > v4l-API to do something with an existing driver - I don't think it's > ever needed that the cpia.c tells the lowlevel-driver to (un)register > camera, assuming that it is not possible to unload cpia.o *before* > cpia_*.o (which wouldn't make sense IMHO). So only the > lowlevel-drivers have to keep track of the cameras and no camera[] and > camnr's are needed by cpia.c. The lowlevel-drivers could use a linked > list for this. The following could be in cpia.h (keep in mind that my > C is a bit rusty): That's correct, but imcomplete. The problem case is where the camera is removed when it is open. The low level driver should get rid of its information about the camera, but the higher level still needs some information until close is called. I don't want to discourge you, but keep this case in mind as you design something to replace the existing system. Scott J. Bertin sbertin@mindspring.com From Jochen.Scharrlach@schwaben.de Tue, 18 Jan 2000 17:48:15 +0100 (CET) Date: Tue, 18 Jan 2000 17:48:15 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB anyone? sbertin@mindspring.com writes: > That call is redundant (maybe) and will only occur if the the camera is > open when cpia_unregister_camera is called. cam->ops will only be NULL > if the camera was removed. See the FIXME comment in > cpia_unregister_camera. This either needs to be made conditional on > cam->open_count == 0 or removed from cpia_close. Until this can be > tested with a USB camera I can't tell which is correct. Having it > called twice is clearly wrong though. Have you asked the i4l-crowd about this? I don't think that a close() on an unregistered video_device would be *possible*! The code looks like this: static int video_release(struct inode *inode, struct file *file) { struct video_device *vfl=video_device[MINOR(inode->i_rdev)]; if(vfl->close) vfl->close(vfl); vfl->busy=0; return 0; } void video_unregister_device(struct video_device *vfd) { if(video_device[vfd->minor]!=vfd) panic("vfd: bad unregister"); video_device[vfd->minor]=NULL; MOD_DEC_USE_COUNT; } As soon as you unregister a device it is not possible to jump into the close()-command (via video_release()) of the v4l-driver, because the entry in video_device[] is set to NULL! If it makes trouble, it'll make *real* trouble (testing vfl->close if vfl is NULL? ouch!) when you disconnect an open camera and I don't think you're code will be able to save the day... > That's correct, but imcomplete. The problem case is where the camera is > removed when it is open. The low level driver should get rid of its > information about the camera, but the higher level still needs some > information until close is called. I don't want to discourge you, but > keep this case in mind as you design something to replace the existing > system. As I said, the 2.3.37 i4l-code makes it impossible to call the close()-function of an unregistered i4l-device and I don't see any reason why they should change this :) Bye, Jochen -- new signature coming RSN (tm) From ziegler@schlund.de Tue, 18 Jan 2000 18:35:58 +0100 Date: Tue, 18 Jan 2000 18:35:58 +0100 From: Thorsten Ziegler ziegler@schlund.de Subject: [cpia] Webcam-Tool? Hi... i donīt know wether this question is directly related to the driver-development, but Iīm loocking for a small script oder piece of code which provides support for remote/auto-capture... Using the clients provided by the driver-package, thereīs always some sort of user-action necessary. So i was wondering if there isīn any software existent (iīve found two links at freshmeat, but both where dead - i knew that one of the packages offered at freshmeat did work with an version of the cpia (around Aug/Sep. 1999), but iīm not able to find the sources any more...) If none of you knows somekind of software i may use iīll try modifing one of the clients for this kind of use. Yours sincerly.. :) ZiG -- PGP-Public Key: http://hell.ghb.fh-furtwangen.de/zig/zig.asc From Chris@informinteractive.com Tue, 18 Jan 2000 13:31:30 -0500 Date: Tue, 18 Jan 2000 13:31:30 -0500 From: Chris Whiteford Chris@informinteractive.com Subject: [cpia] Webcam-Tool? This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF61E2.3EF31E70 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I have been using both w3cam and camserv reliably for a while now, = since 0.4.4 They both seam to work. I can't seam to find the URLs right = now. Sorry. =20 const programmer* chris =3D NULL; return chris; - -----Original Message----- From: Thorsten Ziegler [mailto:ziegler@schlund.de] Sent: Tuesday, January 18, 2000 12:36 PM To: cpia@risc.uni-linz.ac.at Subject: [cpia] Webcam-Tool? Hi... i don=B4t know wether this question is directly related to the driver-development, but I=B4m loocking for a small script oder piece of code which provides support for remote/auto-capture... Using the clients provided by the driver-package, there=B4s always some sort of user-action necessary. So i was wondering if there is=B4n any software existent (i=B4ve found = two links at freshmeat, but both where dead - i knew that one of the packages offered at freshmeat did work with an version of the cpia (around Aug/Sep. 1999), but i=B4m not able to find the sources any more...) If none of you knows somekind of software i may use i=B4ll try modifing one of the clients for this kind of use. Yours sincerly.. :) ZiG - --=20 PGP-Public Key: http://hell.ghb.fh-furtwangen.de/zig/zig.asc _______________________________________________ cpia mailing list - cpia@risc.uni-linz.ac.at http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.1 for non-commercial use iQA/AwUBOISyeHCyV2ve66GWEQKKqwCeJWN0dHxKnFgAeBR4F8gLlFeGMrsAoN5Z SUI0tCFDJBYqj5/hrWa+v+Hv =3D2dCI -----END PGP SIGNATURE----- ------_=_NextPart_001_01BF61E2.3EF31E70 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [cpia] Webcam-Tool?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have been using both w3cam and camserv reliably for = a while now, since 0.4.4  They both seam to work.  I can't = seam to find the URLs right now. Sorry. 

const programmer* chris =3D NULL;
return chris;



- -----Original Message-----
From: Thorsten Ziegler [mailto:ziegler@schlund.de]=
Sent: Tuesday, January 18, 2000 12:36 PM
To: cpia@risc.uni-linz.ac.at
Subject: [cpia] Webcam-Tool?


Hi...

i don=B4t know wether this question is directly = related to the
driver-development, but I=B4m loocking for a small = script oder piece of
code which provides support for = remote/auto-capture...
Using the clients provided by the driver-package, = there=B4s always some
sort of user-action necessary.
So i was wondering if there is=B4n any software = existent (i=B4ve found two
links at freshmeat, but both where dead - i knew = that one of the
packages offered at freshmeat did work with an = version of the cpia
(around Aug/Sep. 1999), but i=B4m not able to find = the sources any
more...)
If none of you knows somekind of software i may use = i=B4ll try modifing
one of the clients for this kind of use.

Yours sincerly.. :)

ZiG
- --
PGP-Public Key: http://hell.ghb.fh-furtwangen.de/zig/zig.asc

_______________________________________________
cpia mailing list  -  = cpia@risc.uni-linz.ac.at
http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/lis= tinfo/cpia

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use = <http://www.pgp.com>

iQA/AwUBOISyeHCyV2ve66GWEQKKqwCeJWN0dHxKnFgAeBR4F8gLlFeGMrsAoN5= Z
SUI0tCFDJBYqj5/hrWa+v+Hv
=3D2dCI
-----END PGP SIGNATURE-----

------_=_NextPart_001_01BF61E2.3EF31E70-- From c64c128@hotmail.com Tue, 18 Jan 2000 13:44:40 PST Date: Tue, 18 Jan 2000 13:44:40 PST From: Kyle Summers c64c128@hotmail.com Subject: [cpia] Jump right in here Hi. I have been looking for information on the 'intelplay QX3' microscope. Basically I wonder if anyone knows if the picture element inside it's workings is similar or identical to any other USB camera. If so then getting this thing to work in Linux (or also MacOS 8, please don't shoot me for saying that, I'm new here =) will be a lot easier. The driver states that it is made by 'VLSI Vision Ltd.' tho I s'pose that isn't the greatest amount of help. Anyway, I also own a creative webcam go which happily enough only has a driver for windows98, but I imagine you all know this too. Whelp, I got my linux stuff ready and able, and I hope to join you all in getting something good done. Regards, Kyle University of Michigan Department of Computer Science ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com From Nick.Holloway@alfie.demon.co.uk 18 Jan 2000 19:45:30 -0000 Date: 18 Jan 2000 19:45:30 -0000 From: Nick Holloway Nick.Holloway@alfie.demon.co.uk Subject: [cpia] Happy Report Chris@informinteractive.com (Chris Whiteford) writes: > Well I have just finished running through my usually little hardness script > and i am happy to report that this version is working wounderfully with a > v1.02 camera. I opened and closed the camera 1600 times and every picture > was ok (execpt for the fact that my camera was out of focus) :-) I've not had the same luck. I've got a v1.20 camera, and with compression enabled, I'm getting I/O errors about 1/4 of the time when first opening the camera with gqcam. The errors are from parse_picture, and relate to problems decoding the lines: line length was not 1 but -1 after 757/194241 bytes line length was not 1 but 0 after 278/194449 bytes line length was not 1 but 0 after 762/203617 bytes EOL not found giving up after 751/201537 bytes line length was not 1 but -1 after 761/202289 bytes line length was not 1 but 0 after 70/2705 bytes EOL not found giving up after 215/38049 bytes line length was not 1 but 0 after 142/132065 bytes EOL not found giving up after 211/77889 bytes line length was not 1 but 0 after 70/74801 bytes line length was not 1 but -1 after 233/174465 bytes line length was not 1 but 0 after 162/51889 bytes line length was not 1 but 0 after 70/2257 bytes line length was not 1 but -1 after 145/88145 bytes line length was not 1 but -2 after 292/12369 bytes EOL not found giving up after 159/117057 bytes line length was not 1 but -2 after 136/200161 bytes EOL not found giving up after 159/173713 bytes EOL not found giving up after 107/5057 bytes EOL not found giving up after 111/194305 bytes line length was not 1 but -1 after 141/198817 bytes line length was not 1 but -2 after 104/162897 bytes line length was not 1 but -2 after 108/141265 bytes line length was not 1 but 0 after 102/58753 bytes line length was not 1 but -1 after 121/58097 bytes line length was not 1 but -2 after 664/20353 bytes line length was not 1 but -2 after 768/203569 bytes line length was not 1 but -1 after 765/164993 bytes I found that if I arranged for cpia_read to call fetch_frame again on error (with a nasty goto), then everything continued. I've added some further debug, and it appears to happen on the first frame. The camera status has vpStatus==e0, and errorCode==97. I'm at a bit of a loss as to what to look at next. Any ideas? -- `O O' | Nick.Holloway@alfie.demon.co.uk // ^ \\ | http://www.alfie.demon.co.uk/ From sbertin@mindspring.com Tue, 18 Jan 2000 17:35:25 -0500 (EST) Date: Tue, 18 Jan 2000 17:35:25 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] USB anyone? On 18 Jan, Jochen Scharrlach wrote: > Have you asked the i4l-crowd about this? I don't think that a close() > on an unregistered video_device would be *possible*! The code looks > like this: I hadn't looked at what v4l does. The video_unregister_device call in cpia_unregister_camera definately should not happen if the camera is open. Just put an if(cam->open_count == 0) in front of it. Scott J. Bertin sbertin@mindspring.com From Peter.Pregler@risc.uni-linz.ac.at Wed, 19 Jan 2000 09:22:56 +0100 (CET) Date: Wed, 19 Jan 2000 09:22:56 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] Webcam-Tool? On 18-Jan-2000 Chris Whiteford wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have been using both w3cam and camserv reliably for a while now, since > 0.4.4 They both seam to work. I can't seam to find the URLs right now. > Sorry. w3cam - http://www.hdk-berlin.de/~rasca/w3cam/ camserv - http://cse.unl.edu/~jtravis/camserv.php3 There is also a webcam in xawtv. The w3cam is running at my desk (http://lugburz.risc.uni-linz.ac.at/) for a few weeks now. -Peter > > const programmer* chris = NULL; > return chris; > > > > - -----Original Message----- > From: Thorsten Ziegler [mailto:ziegler@schlund.de] > Sent: Tuesday, January 18, 2000 12:36 PM > To: cpia@risc.uni-linz.ac.at > Subject: [cpia] Webcam-Tool? > > > Hi... > > i donīt know wether this question is directly related to the > driver-development, but Iīm loocking for a small script oder piece of > code which provides support for remote/auto-capture... > Using the clients provided by the driver-package, thereīs always some > sort of user-action necessary. > So i was wondering if there isīn any software existent (iīve found two > links at freshmeat, but both where dead - i knew that one of the > packages offered at freshmeat did work with an version of the cpia > (around Aug/Sep. 1999), but iīm not able to find the sources any > more...) > If none of you knows somekind of software i may use iīll try modifing > one of the clients for this kind of use. > > Yours sincerly.. :) > > ZiG > - -- > PGP-Public Key: http://hell.ghb.fh-furtwangen.de/zig/zig.asc > > _______________________________________________ > cpia mailing list - cpia@risc.uni-linz.ac.at > http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia > > -----BEGIN PGP SIGNATURE----- > Version: PGPfreeware 6.5.1 for non-commercial use > > iQA/AwUBOISyeHCyV2ve66GWEQKKqwCeJWN0dHxKnFgAeBR4F8gLlFeGMrsAoN5Z > SUI0tCFDJBYqj5/hrWa+v+Hv > =2dCI > -----END PGP SIGNATURE----- ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From Jochen.Scharrlach@schwaben.de Wed, 19 Jan 2000 21:36:41 +0100 (CET) Date: Wed, 19 Jan 2000 21:36:41 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB anyone? sbertin@mindspring.com writes: > I hadn't looked at what v4l does. The video_unregister_device call in > cpia_unregister_camera definately should not happen if the camera is > open. Just put an if(cam->open_count == 0) in front of it. That's still not enough - the driver must not unregister an open video_device, even if the module should be unloaded. I'm not familiar with the module system, but isn't it possible to reject an rmmod-request? I'd propose the following: whenever an open device needs to be unregistered (e.g. because of a physical disconnect), the vectors of the corresponding video_device are overwritten: a special close() cares about the cleanup, while all other calls simply return -ENODEV. In addition to this the cam_data-struct will be added to a cleanup-list - the module won't unload before this list is empty, i.e. all devices are closed. Bye, Jochen -- new signature coming RSN (tm) From sbertin@mindspring.com Wed, 19 Jan 2000 17:46:35 -0500 (EST) Date: Wed, 19 Jan 2000 17:46:35 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] USB anyone? --1037094400-1804289383-948322032=:816 Content-Type: TEXT/plain; charset=us-ascii On 19 Jan, Jochen Scharrlach wrote: > sbertin@mindspring.com writes: > > I hadn't looked at what v4l does. The video_unregister_device call > > in cpia_unregister_camera definately should not happen if the > > camera is open. Just put an if(cam->open_count == 0) in front of > > it. > > That's still not enough - the driver must not unregister an open > video_device, even if the module should be unloaded. That should be enough. It will delay the call to video_unregister_device until the device is closed. Ioctls and mmap will fail (oops, there's a bug. They should return -ENODEV if cam->ops is NULL). /proc/cpia/videox will go away. cpia_read will return -ENODEV. No need to go through the gymnastics you describe below. > I'm not familiar > with the module system, but isn't it possible to reject an > rmmod-request? I'd propose the following: whenever an open device > needs to be unregistered (e.g. because of a physical disconnect), the > vectors of the corresponding video_device are overwritten: a special > close() cares about the cleanup, while all other calls simply return > -ENODEV. In addition to this the cam_data-struct will be added to a > cleanup-list - the module won't unload before this list is empty, > i.e. all devices are closed. rmmod will fail if the usage count is > 0. This means that it is not possible to remove the module if a camera is open. I've attached a patch that should fix these issues with removing an open camera. If you're happy with it, I'll put together a patch combining this and the memory management changes needed for 2.3 kernels and we can call it 0.5.1. Scott J. Bertin sbertin@mindspring.com --1037094400-1804289383-948322032=:816 Content-Type: TEXT/plain; CHARSET=US-ASCII Content-Description: unregister.patch diff -r -c --exclude=linux cpia-0.5.0/module/cpia.c cpia-0.5.1/module/cpia.c *** cpia-0.5.0/module/cpia.c Wed Jan 12 16:04:26 2000 --- cpia-0.5.1/module/cpia.c Wed Jan 19 17:39:11 2000 *************** *** 2738,2743 **** --- 2738,2747 ---- struct cam_data *cam = dev->priv; int retval = 0; + if(!cam || !cam->ops) { + return -ENODEV; + } + /* make this _really_ smp-safe */ if( down_interruptible(&cam->busy_lock) ) { return -EINTR; *************** *** 3084,3100 **** { unsigned long start = (unsigned long)adr; unsigned long page, pos; ! struct cam_data *cam; int retval; DBG("cpia_mmap: %ld\n", size); if(size > FRAME_NUM*CPIA_MAX_FRAME_SIZE){ return -EINVAL; } - cam = dev->priv; - /* make this _really_ smp-safe */ if( down_interruptible(&cam->busy_lock) ) { return -EINTR; --- 3088,3106 ---- { unsigned long start = (unsigned long)adr; unsigned long page, pos; ! struct cam_data *cam = dev->priv; int retval; + if(!cam || !cam->ops) { + return -ENODEV; + } + DBG("cpia_mmap: %ld\n", size); if(size > FRAME_NUM*CPIA_MAX_FRAME_SIZE){ return -EINVAL; } /* make this _really_ smp-safe */ if( down_interruptible(&cam->busy_lock) ) { return -EINTR; *************** *** 3347,3355 **** if(camnr >= CPIA_MAXCAMS || camera[camnr] == NULL) return; cam = camera[camnr]; ! DBG("unregistering video\n"); ! /* FIXME: Is this safe if the device is open? */ ! video_unregister_device(&cam->vdev); /* Need a lock when adding/removing cameras. This doesn't happen * often and doesn't take very long, so grabbing the kernel lock --- 3353,3365 ---- if(camnr >= CPIA_MAXCAMS || camera[camnr] == NULL) return; cam = camera[camnr]; ! if(cam->open_count == 0) { ! DBG("unregistering video\n"); ! video_unregister_device(&cam->vdev); ! } else { ! LOG("/dev/video%d removed while open, " ! "deferring video_unregister_device\n", cam->vdev.minor); ! } /* Need a lock when adding/removing cameras. This doesn't happen * often and doesn't take very long, so grabbing the kernel lock --1037094400-1804289383-948322032=:816-- From Peter.Pregler@risc.uni-linz.ac.at Thu, 20 Jan 2000 08:28:46 +0100 (CET) Date: Thu, 20 Jan 2000 08:28:46 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] USB anyone? On 19-Jan-2000 sbertin@mindspring.com wrote: > > I've attached a patch that should fix these issues with removing an open > camera. If you're happy with it, I'll put together a patch combining > this and the memory management changes needed for 2.3 kernels and we can > call it 0.5.1. Please call it 0.6 or higher since 0.5.X is the stable feature freezed stuff for the official 2.2.X kernel. I suggest 1.0 as a goal for the 2.3/usb version. :) -Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From Jochen.Scharrlach@schwaben.de Thu, 20 Jan 2000 19:38:31 +0100 Date: Thu, 20 Jan 2000 19:38:31 +0100 From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB anyone? sbertin@mindspring.com writes: > That should be enough. It will delay the call to > video_unregister_device until the device is closed. Ioctls and mmap > will fail (oops, there's a bug. They should return -ENODEV if cam->ops > is NULL). /proc/cpia/videox will go away. cpia_read will return > -ENODEV. No need to go through the gymnastics you describe below. If you'd ever met me in real life, you'd know that I won't do any gymnastics if I can avoid it :) Ok, let's get back to the array-problem: my suggestion was to trigger the unregister-stuff from the lowlevel driver with the follwing function: unregister_driver(cam_data *drv) { struct cam_lowlevel *mystuff = drv->cam_lowlevel; // getting the lowlevel-stuff cam_list_remove(drv); // removing the camera from the list cpia_unregister(drv); // telling the highlevel-driver to clean up /* cleaning up mystuff */ // cleaning up the lowlevel-stuff } The only thing cpia_unregister() has to do is to make sure that it won't try to access the lowlevel-driver for this camera anymore. The cpia_close() function in cpia.c would simply look like this: static void cpia_close(struct video_device *dev) { struct cam_data *cam; DBG("cpia_close\n"); cam = dev->priv; if (cam->ops != NULL) { /* Return ownership of /proc/cpia/videoX to root */ cam->proc_entry->uid = 0; /* save camera state for later open (developers guide ch 3.5.3) */ save_camera_state(cam); /* GotoLoPower */ goto_low_power(cam); /* Update the camera ststus */ do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); /* cleanup internal state stuff */ free_frames(cam->frame); /* close cpia */ cam->ops->close(cam->lowlevel_data); } if(--cam->open_count == 0) { /* clean up capture-buffers */ if(cam->raw_image) { rvfree(cam->raw_image, CPIA_MAX_IMAGE_SIZE); cam->raw_image = 0; } if(cam->decompressed_frame.data) { rvfree(cam->decompressed_frame.data, CPIA_MAX_FRAME_SIZE); cam->decompressed_frame.data = 0; } if(cam->frame_buf) { free_frame_buf(cam); } if(cam->ops == NULL) { video_unregister_device(dev); kfree(cam); } } #ifdef MODULE MOD_DEC_USE_COUNT; #endif return; } Yes, the kernel_(un)lock is missing - did you use it only to protect the array operations or are there other critical parts? Bye, Jochen -- new signature coming RSN (tm) From sbertin@mindspring.com Thu, 20 Jan 2000 22:29:17 -0500 (EST) Date: Thu, 20 Jan 2000 22:29:17 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] USB anyone? On 20 Jan, Jochen Scharrlach wrote: > Ok, let's get back to the array-problem: It looks like you have a good plan, but I have a few suggestions: Keep the pointer to the list head in the high level driver, otherwise you end up with a list in each lowlevel driver. This will require keeping track of which lowlevel driver is responsible for the camera. struct cam_lowlevel { int type; /* CPIA_TYPE_PP or CPIA_TYPE_USB */ }; struct cam_data { struct cam_data **previous; struct cam_data *next; struct cam_lowlevel *lowlevel; [...] }; Because we are using a pointer, there is no need for more detail. Each lowlevel driver will have a structure that starts with the type. A typecast from struct cam_lowlevel * to the actual type will be needed in the lowlevel driver. This is somewhat like the way struct sockaddr is handled. cam_list_add and cam_list_remove could be functions provided by the high level driver. cam_unregister should be handled in each lowlevel driver. (Can you tell I don't like macros used as functions.) [ code snipped ] Nice cpia_close implementation. I like it :) > Yes, the kernel_(un)lock is missing - did you use it only to protect > the array operations or are there other critical parts? That's what it was there for, but I just realized that we probably need a lock around the if(--cam->open_count == 0) block to prevent an open of the camera before the cleanup is complete. Scott J. Bertin sbertin@mindspring.com From liv@duke.edu Fri, 21 Jan 2000 00:59:19 -0500 (EST) Date: Fri, 21 Jan 2000 00:59:19 -0500 (EST) From: Luis Villa liv@duke.edu Subject: [cpia] Hi! Hi! I'm a newbie with Linux-based webcams (been using Linux for two years now), and it looks like this is probably the best place to ask some quick questions. Hope nobody minds too much. First, here's what I need- a web-cam that'll plug into my laptop, which has both a parport and USB (I'd prefer USB.) From what I can tell the old QuickCams and the various VLSI cameras are my only options. So- first question then- am I right in thinking that these are my only options, or do I have other driver options? Second question- since I can't seem to find any old Creative WebCam IIs for sale, what HW would you all recommend that I look at? Has anyone had any bad experiences with particular vendors, or particular reasons not to buy a particular model? Finally, what is the state of the drivers? I know I need to upgrade to 2.3.x for this, but what does "semi-functional" mean, exactly? I don't need anything particularly fast or efficient, but I really don't want to write any C just to get a web-cam up and running. All I really want is something that'll dump an image to a file every few seconds so that I can ftp it to a server. Is that reasonably easy to do, or will that require a lot of work? Oh yeah, one other thing. Performance. My laptop is only a Pentium 200- will that be able to handle the driver and a reasonable frame rate? I would think so, but just in case... Anyway, thanks for putting up with all these questions- Luis Villa ####################################################################### Profanity is the one language that all programmers understand. -Anonymous ####################################################################### From jmmerliot@free.fr Fri, 21 Jan 2000 07:52:22 +0100 (CET) Date: Fri, 21 Jan 2000 07:52:22 +0100 (CET) From: Jean-Michel Merliot jmmerliot@free.fr Subject: [cpia] cpia-control Hi everybody, Driver 0.5.0 works perfectly on my SMP box, by I have problems with the cpia-control program, the gqcam client seems unaware of whatever changes I make to the compression mode, and it seems not to take care of whatever change I can do by hand in the /proc/cpia interface. By the way, I use the cpia cam in /dev/video1, in cased that could change something. Any idea of what I can do wrong ? JMM E-Mail: Jean-Michel Merliot Deadly Opponent To microsoft Misconception Of Computing Art From Peter.Pregler@risc.uni-linz.ac.at Fri, 21 Jan 2000 08:06:42 +0100 (CET) Date: Fri, 21 Jan 2000 08:06:42 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] Hi! On 21-Jan-2000 Luis Villa wrote: > Finally, what is the state of the drivers? I know I need to > upgrade to 2.3.x for this, but what does "semi-functional" mean, > exactly? That is wrong. The driver is not yet working with 2.3.x though the port is underway. The 0.5-version is submitted to Alan and might appear in the kernel in version 2.2.16. For the tarball available right now any 2.2.X will do. > I don't need anything particularly fast or efficient, but I really don't > want to write any C just to get a web-cam up and running. All I really > want is something that'll dump an image to a file every few seconds so > that I can ftp it to a server. Is that reasonably easy to do, or will > that require a lot of work? W3cam, webcam and camserv are working for months now. Of cause I cannot guarantee anything. You might be the one that encounters the latest bug in the latest and brightes firmware release etc. But that's life. :) > Oh yeah, one other thing. Performance. My laptop is only a > Pentium 200- will that be able to handle the driver and a reasonable > frame rate? I would think so, but just in case... In the parport case if you can use DMA for sure. As for PIO mode it might suck all your CPU. But taking a picuture every second should be no problem. -Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From Peter.Pregler@risc.uni-linz.ac.at Fri, 21 Jan 2000 08:12:52 +0100 (CET) Date: Fri, 21 Jan 2000 08:12:52 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] cpia-control On 21-Jan-2000 Jean-Michel Merliot wrote: > > Hi everybody, > > Driver 0.5.0 works perfectly on my SMP box, by I have problems > with the > cpia-control program, the gqcam client seems unaware of whatever changes > I make to the > compression mode, and it seems not to take care of whatever change I can > do by hand in > the /proc/cpia interface. > > By the way, I use the cpia cam in /dev/video1, in cased that > could change > something. > > Any idea of what I can do wrong ? To be honest, no. Do the values in the /proc/cpia/videoX change? Any successfull change will be immediatly visibile in the next read. Do you get error-messages in the system-log (something about error -22 IIRC)? That would signify invalid values. Is it possible to change the color of the image with the slider? That is about the most visible thing you can change. As for changing things by hand with echo to /proc/cpia/videoX: note that the number of spaces between token and value is significant. I just do a copy/paste in case I want to try out something. -Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From chris@black-sun.co.uk Fri, 21 Jan 2000 11:59:11 GMT Date: Fri, 21 Jan 2000 11:59:11 GMT From: Chris Jones chris@black-sun.co.uk Subject: [cpia] Hi! Hi Luis Villa wrote: > > which has both a parport and USB (I'd prefer USB.) From what I can tell If you want it to work now get a parallel version of the WC-II, the USB support is a bit sketchy at the moment - some people can get it to work, but only for a short while and others (myself included) can't get it to work at all. There is some kind of driver unification effort underway at the moment that will hopefully bring the USB driver up to scratch. -- _____ _ _ _____ | __ | |___ ___| |_ ___| __|_ _ ___ Chris "Ng" Jones | __ -| | .'| _| '_|___|__ | | | | chris@black-sun.co.uk |_____|_|__,|___|_,_| |_____|___|_|_| www.black-sun.co.uk S o f t w a r e From Henry.BRUCE@st.com Fri, 21 Jan 2000 16:41:31 GMT Date: Fri, 21 Jan 2000 16:41:31 GMT From: Henry Bruce Henry.BRUCE@st.com Subject: [cpia] Jump right in here > Hi. I have been looking for information on the 'Intel Play QX3' > microscope. Basically I wonder if anyone knows if the picture element > inside it's workings is similar or identical to any other USB camera. If > so then getting this thing to work in Linux (or also MacOS 8, please don't > shoot me for saying that, I'm new here =) will be a lot easier. The Intel Play QX3 microscope is based on CPiA, but has a different PnP ID. There are a few extra commands that control illumination and enable snapshot buttons - I can provide details to whoever is interested. Regards, Henry Bruce From liv@duke.edu Fri, 21 Jan 2000 13:04:00 -0500 (EST) Date: Fri, 21 Jan 2000 13:04:00 -0500 (EST) From: Luis Villa liv@duke.edu Subject: [cpia] Hi! On Fri, 21 Jan 2000, Peter Pregler wrote: > On 21-Jan-2000 Luis Villa wrote: > > Finally, what is the state of the drivers? I know I need to > > upgrade to 2.3.x for this, but what does "semi-functional" mean, > > exactly? > > That is wrong. The driver is not yet working with 2.3.x though the port is > underway. The 0.5-version is submitted to Alan and might appear in the > kernel in version 2.2.16. For the tarball available right now any 2.2.X > will do. I thought the 0.5 version was for parport only. Does this mean there is no USB support at this time? Not a big deal, but it would be nice to have the option. > > I don't need anything particularly fast or efficient, but I really don't > > want to write any C just to get a web-cam up and running. All I really > > want is something that'll dump an image to a file every few seconds so > > that I can ftp it to a server. Is that reasonably easy to do, or will > > that require a lot of work? > > W3cam, webcam and camserv are working for months now. Of cause I cannot > guarantee anything. You might be the one that encounters the latest bug in > the latest and brightes firmware release etc. But that's life. :) Yep. I know all about the problems with "free" software- I'm not worried about that. > > Oh yeah, one other thing. Performance. My laptop is only a > > Pentium 200- will that be able to handle the driver and a reasonable > > frame rate? I would think so, but just in case... > > In the parport case if you can use DMA for sure. As for PIO mode it might > suck all your CPU. But taking a picuture every second should be no problem. Great! Thanks again for all the answers- Luis ####################################################################### Profanity is the one language that all programmers understand. -Anonymous ####################################################################### From Chris@informinteractive.com Fri, 21 Jan 2000 13:44:56 -0500 Date: Fri, 21 Jan 2000 13:44:56 -0500 From: Chris Whiteford Chris@informinteractive.com Subject: [cpia] Hi! This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF643F.9F613650 Content-Type: text/plain; charset="windows-1252" -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Well I am jumping in here to add my $0.02 about the laptop part of your question. I run Linux on my we little Libretto and it is only a P120. It does "ok" At the smallest image size it will do about 8 fps. And for use as a web can it is great. const programmer* chris = NULL; return chris; - -----Original Message----- From: Luis Villa [mailto:liv@duke.edu] Sent: Friday, January 21, 2000 12:59 AM To: cpia@risc.uni-linz.ac.at Subject: [cpia] Hi! Hi! I'm a newbie with Linux-based webcams (been using Linux for two years now), and it looks like this is probably the best place to ask some quick questions. Hope nobody minds too much. First, here's what I need- a web-cam that'll plug into my laptop, which has both a parport and USB (I'd prefer USB.) From what I can tell the old QuickCams and the various VLSI cameras are my only options. So- first question then- am I right in thinking that these are my only options, or do I have other driver options? Second question- since I can't seem to find any old Creative WebCam IIs for sale, what HW would you all recommend that I look at? Has anyone had any bad experiences with particular vendors, or particular reasons not to buy a particular model? Finally, what is the state of the drivers? I know I need to upgrade to 2.3.x for this, but what does "semi-functional" mean, exactly? I don't need anything particularly fast or efficient, but I really don't want to write any C just to get a web-cam up and running. All I really want is something that'll dump an image to a file every few seconds so that I can ftp it to a server. Is that reasonably easy to do, or will that require a lot of work? Oh yeah, one other thing. Performance. My laptop is only a Pentium 200- will that be able to handle the driver and a reasonable frame rate? I would think so, but just in case... Anyway, thanks for putting up with all these questions- Luis Villa ####################################################################### Profanity is the one language that all programmers understand. -Anonymous ####################################################################### _______________________________________________ cpia mailing list - cpia@risc.uni-linz.ac.at http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.1 for non-commercial use iQA/AwUBOIiqJ3CyV2ve66GWEQKbvwCfSn8jnDP/cWnMfJC6F3Nc5v48IU4AnRz+ +A7kcOA6j63AY7ul/OjjzgUi =6/BM -----END PGP SIGNATURE----- ------_=_NextPart_001_01BF643F.9F613650 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: quoted-printable RE: [cpia] Hi!

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well I am jumping in here to add my $0.02 about the = laptop part of your question.  I run Linux on my we little = Libretto and it is only a P120.  It does "ok"  At = the smallest image size it will do about 8 fps.  And for use as a = web can it is great. 

const programmer* chris =3D NULL;
return chris;



- -----Original Message-----
From: Luis Villa [mailto:liv@duke.edu]
Sent: Friday, January 21, 2000 12:59 AM
To: cpia@risc.uni-linz.ac.at
Subject: [cpia] Hi!


        Hi! I'm a = newbie with Linux-based webcams (been using Linux for
two years now), and it looks like this is probably = the best place to ask
some quick questions. Hope nobody minds too much. =
        First, = here's what I need- a web-cam that'll plug into my laptop,
which has both a parport and USB (I'd prefer USB.) = From what I can tell
the old QuickCams and the various VLSI cameras are = my only options. So-
first question then- am I right in thinking that = these are my only
options, or do I have other driver options?
        Second = question- since I can't seem to find any old Creative WebCam
IIs for sale, what HW would you all recommend that I = look at? Has anyone
had any bad experiences with particular vendors, or = particular reasons
not to buy a particular model?
        Finally, = what is the state of the drivers? I know I need to
upgrade to 2.3.x for this, but what does = "semi-functional" mean, exactly?
I don't need anything particularly fast or = efficient, but I really don't
want to write any C just to get a web-cam up and = running. All I really
want is something that'll dump an image to a file = every few seconds so
that I can ftp it to a server. Is that reasonably = easy to do, or will
that require a lot of work?
        Oh yeah, = one other thing. Performance. My laptop is only a
Pentium 200- will that be able to handle the driver = and a reasonable
frame rate? I would think so, but just in case... =
        Anyway, = thanks for putting up with all these questions-
        Luis = Villa

###############################################################= ########

     Profanity is the one = language that all programmers understand.
                  &nb= sp;       -Anonymous

###############################################################= ########



_______________________________________________
cpia mailing list  -  = cpia@risc.uni-linz.ac.at
http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/lis= tinfo/cpia

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use = <http://www.pgp.com>

iQA/AwUBOIiqJ3CyV2ve66GWEQKbvwCfSn8jnDP/cWnMfJC6F3Nc5v48IU4AnRz= +
+A7kcOA6j63AY7ul/OjjzgUi
=3D6/BM
-----END PGP SIGNATURE-----

------_=_NextPart_001_01BF643F.9F613650-- From Peter.Pregler@risc.uni-linz.ac.at Fri, 21 Jan 2000 19:53:46 +0100 (CET) Date: Fri, 21 Jan 2000 19:53:46 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] Hi! On 21-Jan-00 Luis Villa wrote: > On Fri, 21 Jan 2000, Peter Pregler wrote: >> On 21-Jan-2000 Luis Villa wrote: >> > Finally, what is the state of the drivers? I know I need to >> > upgrade to 2.3.x for this, but what does "semi-functional" mean, >> > exactly? >> >> That is wrong. The driver is not yet working with 2.3.x though the port is >> underway. The 0.5-version is submitted to Alan and might appear in the >> kernel in version 2.2.16. For the tarball available right now any 2.2.X >> will do. > > I thought the 0.5 version was for parport only. Does this mean there is no > USB support at this time? Not a big deal, but it would be nice to have the > option. Yes, 0.5 is parport and 2.2.X only. People are working on adding the usb-code that is in 2.3.x and porting the 0.5-version to 2.3.x. AFAIK there are no plans to do any usb-stuff with 2.2.x 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 From jmmerliot@free.fr Sat, 22 Jan 2000 01:05:56 +0100 (CET) Date: Sat, 22 Jan 2000 01:05:56 +0100 (CET) From: Jean-Michel Merliot jmmerliot@free.fr Subject: [cpia] cpia-control in fact, here is my /proc/cpia/video1 : read-only ----------------------- CPIA Version: 1.02 (1.0) CPIA PnP-ID: 0553:0001:0100 VP-Version: 1.0 0100 system_state: 0x03 grab_state: 0x00 stream_state: 0x01 fatal_error: 0x00 cmd_error: 0x20 debug_flags: 0x00 vp_status: 0x60 error_code: 0x97 video_size: CIF sub_sample: 422 yuv_order: YUYV roi: ( 0, 0) to (352, 288) actual_fps: 5 transfer_rate: 623kB/s read-write ----------------------- current min max default comment brightness: 50 0 100 50 contrast: 48 0 80 48 steps of 8 saturation: 50 0 100 50 sensor_fps: 15.000 3 30 15 stream_start_line: 240 0 288 240 ecp_timing: normal slow normal normal color_balance_mode: auto manual auto auto red_gain: 3 0 212 32 green_gain: 47 0 212 6 blue_gain: 212 0 212 92 max_gain: 2 1 2 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: 0 0 255 0 coarse_exp: 302 0 255 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: 0x1c 0x0 0xff 0x1c apcor_gain2: 0x1a 0x0 0xff 0x1a apcor_gain4: 0x2d 0x0 0xff 0x2d apcor_gain8: 0x2a 0x0 0xff 0x2a vl_offset_gain1: 24 0 255 24 vl_offset_gain2: 28 0 255 28 vl_offset_gain4: 30 0 255 30 vl_offset_gain8: 30 0 255 30 flicker_control: on off on off mains_frequency: 50 50 60 50 only 50/60 allowable_overexposure: 0 0 255 0 compression_mode: auto none,auto,manual auto decimation: off off off off compression_target: framerate framerate quality quality target_framerate: 20 0 30 7 target_quality: 10 0 255 10 y_threshold: 11 0 31 15 uv_threshold: 10 0 31 15 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 The changes are correctly set into the /proc/cpia/video1 file ( or pseudo file... ) There is no error message in the logs. Changing contrast or color works OK. Changing compression does not work. ( starts at none, stays there... ) Look at the actual framerate, and the targetted one, they are quiet different... More than this, I obtain a better transfer rate ( > 600 Kb/s ) in pio mode than in dma mode ( < 550 kb/s ) but I'm not sure this is not a normal behaviour. And sometimes, when I initialize the whole stuff ( unloading modules, reloading them again ), the image is very dark, but I get a much better framerate ( around 15 fps. ) And the image is kind of grainy ( dunno how to tell it better ;-( ). but my main problem is the lack of compression, it is very slow and the machine is slowing every little while ( frequency around a second ) being somehow sloppy. As I have a dual PII 450 and am just Seti@home'ing on both CPU, I can't see why ( well maybe I'm getting CPU cycles greedy ;-) ) On 21-Jan-00 Peter Pregler wrote: > > On 21-Jan-2000 Jean-Michel Merliot wrote: >> >> Hi everybody, >> >> Driver 0.5.0 works perfectly on my SMP box, by I have problems >> with the >> cpia-control program, the gqcam client seems unaware of whatever changes >> I make to the >> compression mode, and it seems not to take care of whatever change I can >> do by hand in >> the /proc/cpia interface. >> >> By the way, I use the cpia cam in /dev/video1, in cased that >> could change >> something. >> >> Any idea of what I can do wrong ? > > To be honest, no. Do the values in the /proc/cpia/videoX change? Any > successfull change will be immediatly visibile in the next read. Do you > get error-messages in the system-log (something about error -22 IIRC)? > That would signify invalid values. Is it possible to change the color of > the image with the slider? That is about the most visible thing you can > change. As for changing things by hand with echo to /proc/cpia/videoX: > note that the number of spaces between token and value is significant. I > just do a copy/paste in case I want to try out something. > > -Peter > > ------------------------------- > Email: Peter.Pregler@risc.uni-linz.ac.at > WWW: http://www.risc.uni-linz.ac.at/people/ppregler From halset@pvv.ntnu.no Sat, 22 Jan 2000 10:43:56 +0100 (MET) Date: Sat, 22 Jan 2000 10:43:56 +0100 (MET) From: Tore Halset halset@pvv.ntnu.no Subject: [cpia] USB cpia and "scratch buf overflow" I am using linux-2.3.39 whith a Webcam II camera. It is working stable with "camserv". There are coming som errors on the console. cpia: scratch buf overflow!scr_len: 32574, n: 960 cpia: scratch buf overflow!scr_len: 32574, n: 960 cpia: scratch buf overflow!scr_len: 32574, n: 960 cpia: scratch buf overflow!scr_len: 32574, n: 960 cpia: scratch buf overflow!scr_len: 32574, n: 960 cpia: scratch buf overflow!scr_len: 32574, n: 960 cpia: scratch buf overflow!scr_len: 32574, n: 960 cpia: scratch buf overflow!scr_len: 32291, n: 960 cpia: scratch buf overflow!scr_len: 32291, n: 960 cpia: scratch buf overflow!scr_len: 32291, n: 960 cpia: scratch buf overflow!scr_len: 32291, n: 960 cpia: scratch buf overflow!scr_len: 32291, n: 960 cpia: scratch buf overflow!scr_len: 32291, n: 960 cpia: scratch buf overflow!scr_len: 32291, n: 960 - Tore. From sbertin@mindspring.com Sat, 22 Jan 2000 22:40:51 -0500 (EST) Date: Sat, 22 Jan 2000 22:40:51 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] cpia-control On 21-Jan-2000 Jean-Michel Merliot wrote: > cpia-control program, the gqcam client seems unaware of whatever > changes I make to the compression mode, and it seems not to take care > of whatever change I can do by hand in the /proc/cpia interface. > > By the way, I use the cpia cam in /dev/video1, in cased that > could change cpia-control assumes that the camera is /dev/video0. Change the filename in libcpia.py to /proc/cpia/video1 and it should work. On 21 Jan, Peter Pregler wrote: > As for changing things by hand with echo to > /proc/cpia/videoX: note that the number of spaces between token and > value is significant. The number of spaces is NOT significant. Scott J. Bertin sbertin@mindspring.com From jmmerliot@free.fr Sun, 23 Jan 2000 10:09:40 +0100 (CET) Date: Sun, 23 Jan 2000 10:09:40 +0100 (CET) From: Jean-Michel Merliot jmmerliot@free.fr Subject: [cpia] cpia-control Yes, that's it, I forgot to change that when I downloaded the new cpia-client, thank you vety much , I'm flooded with shame ;-) That apart, has any of you tried Broadcast 2000 with the cpia camera ? JMM On 23-Jan-00 sbertin@mindspring.com wrote: > On 21-Jan-2000 Jean-Michel Merliot wrote: >> cpia-control program, the gqcam client seems unaware of whatever >> changes I make to the compression mode, and it seems not to take care >> of whatever change I can do by hand in the /proc/cpia interface. >> >> By the way, I use the cpia cam in /dev/video1, in cased that >> could change > > cpia-control assumes that the camera is /dev/video0. Change the filename > in libcpia.py to /proc/cpia/video1 and it should work. > > On 21 Jan, Peter Pregler wrote: >> As for changing things by hand with echo to >> /proc/cpia/videoX: note that the number of spaces between token and >> value is significant. > > The number of spaces is NOT significant. > > Scott J. Bertin > sbertin@mindspring.com From Jochen.Scharrlach@schwaben.de Sun, 23 Jan 2000 23:10:32 +0100 (MET) Date: Sun, 23 Jan 2000 23:10:32 +0100 (MET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB works... a bit... sbertin@mindspring.com writes: > Keep the pointer to the list head in the high level driver, otherwise > you end up with a list in each lowlevel driver. This will require > keeping track of which lowlevel driver is responsible for the camera. Well I *want* to have one list per lowlevel-driver because this makes life much easier. With my macros in the header-file you actually have very few references in the cpia_xx.c: 1. the static listpointer: static struct cam_data *cam_list; 2. adding the driver after registration: if((cam=cpia_register_camera(&cpia_usb_ops, cpia))==NULL) { LOG("failed to cpia_register_camera\n"); return NULL; } ADD_TO_LIST(cam_list, cam); 3. removing the driver by a disconnect-call: REMOVE_FROM_LIST(cpia); 4. the cleanup: struct cam_data *cam; while((cam = cam_list) != NULL) cpia_disconnect(NULL, cam); Well, we can talk about this, after you solved my other problem - I have trouble with rvmalloc. Installing the driver seems to be ok: [...] V4L-Driver for Vision CPiA based cameras v0.5.0 usbcore: Registered new driver cpia USB CPiA camera found cpia.c(1104460):goto_low_power(2264):camera now in LOW power state cpia.c(1104469):goto_high_power(2252):camera now in HIGH power state cpia.c(1104481):dispatch_commands(2021):1 1 0 0 1 1 1 1 cpia.c(1104481):dispatch_commands(2022):0 1 1 1 1 1 0 1 cpia.c(1104486):save_camera_state(2284):1/0/0/1/0/0/0/128 cpia.c(1104486):save_camera_state(2288):32/6/92 CPiA Version: 1.20 (2.0) CPiA PnP-ID: 0553:0002:0100 VP-Version: 1.0 0100 usbcore: cpia driver claimed interface c0df8d80 [...] but then it crashes in rvmalloc. I changed rvmalloc to get more info: [...] DBG("vmalloc ok.\n"); memset(mem, 0, size); /* Clear the ram out, no junk to the user */ adr = (unsigned long) mem; while (size > 0) { DBG("size = %d, adr = %d\n", size, adr); page = kvirt_to_pa(adr); #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)) mem_map_reserve(MAP_NR(phys_to_virt(page))); #else DBG("page = %d\n", page); mem_map_reserve(MAP_NR(__va(page))); #endif adr += PAGE_SIZE; if (size > PAGE_SIZE) size -= PAGE_SIZE; else size = 0; } DBG("rvmalloc done.\n"); [...] After starting gqcam I get the following kernel-messages: [...] cpia.c(1104793):rvmalloc(266):vmalloc ok. cpia.c(1104794):rvmalloc(271):size = 204800, adr = -936071168 cpia.c(1104794):rvmalloc(277):page = 1073741872 cpia.c(1104794):rvmalloc(271):size = 200704, adr = -936067072 cpia.c(1104794):rvmalloc(277):page = 19242972 cpia.c(1104794):rvmalloc(271):size = 196608, adr = -936062976 cpia.c(1104794):rvmalloc(277):page = 1073741826 cpia.c(1104794):rvmalloc(271):size = 192512, adr = -936058880 cpia.c(1104794):rvmalloc(277):page = 1073741832 cpia.c(1104794):rvmalloc(271):size = 188416, adr = -936054784 cpia.c(1104794):rvmalloc(277):page = 18708540 cpia.c(1104794):rvmalloc(271):size = 184320, adr = -936050688 cpia.c(1104794):rvmalloc(277):page = 17215444 cpia.c(1104794):rvmalloc(271):size = 180224, adr = -936046592 kernel BUG at cpia.c:225! invalid operand: 0000 CPU: 1 EIP: 0010:[] EFLAGS: 00010292 eax: 0000001a ebx: 00064c68 ecx: c0250150 edx: c5aedf84 esi: 0002c000 edi: c8351000 ebp: c834b000 esp: c1f93f18 ds: 0018 es: 0018 ss: 0018 Process gqcam (pid: 1379, stackpage=c1f93000) Stack: c6050780 c60515e0 00000000 0010db99 c80ad048 00031ba5 c5a5a4d8 00000000 c80a31b3 c5a5a4d8 00000000 00000000 c274a7e0 00000051 00000000 000000ff c021e89e c0252e04 c014065e c6050780 c274a7e0 c274a7e0 00000000 c6050780 Call Trace: [] [] [] [] [] [] [] [] Code: 0f 0b 8b 15 d8 15 25 c0 89 f8 25 ff 0f 00 00 0b 44 1a 40 89 [...] The number of loops until it crashes differs with each try. Any idea? I am currently using 2.3.37, BTW. Bye, Jochen -- new signature coming RSN (tm) From sbertin@mindspring.com Sun, 23 Jan 2000 18:45:21 -0500 (EST) Date: Sun, 23 Jan 2000 18:45:21 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] USB works... a bit... On 23 Jan, Jochen Scharrlach wrote: > Well I *want* to have one list per lowlevel-driver because this makes > life much easier. OK, I misunderstood your intent. > Well, we can talk about this, after you solved my other problem - I > have trouble with rvmalloc. Which kernel version are you using? I've been using 2.3.40 successfully today with the parallel port code and 2.3.35 earlier. Scott J. Bertin sbertin@mindspring.com From lunarbard@moonman.com Sun, 23 Jan 2000 19:58:48 -0600 (CST) Date: Sun, 23 Jan 2000 19:58:48 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] creative webcam II I got a creative webcam II. Is it possible to use it with kernel 2.2.14? What programs exist to use it to take snapshots? -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From lunarbard@moonman.com Sun, 23 Jan 2000 20:15:33 -0600 (CST) Date: Sun, 23 Jan 2000 20:15:33 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] btw mine is usb:) -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From sbertin@mindspring.com Sun, 23 Jan 2000 21:44:10 -0500 (EST) Date: Sun, 23 Jan 2000 21:44:10 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] creative webcam II On 23 Jan, David Cougle wrote: > > I got a creative webcam II. Is it possible to use it with kernel > 2.2.14? What programs exist to use it to take snapshots? > > mine is usb:) No. You need a 2.3 kernel for USB support. Scott J. Bertin sbertin@mindspring.com From lunarbard@moonman.com Sun, 23 Jan 2000 21:19:00 -0600 (CST) Date: Sun, 23 Jan 2000 21:19:00 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] 2.3.40 and usb webcam ii well, i compiled 2.3.40 and everything, but it says "no signature" on boot. I guess the only way to use usb cam is with 2.3.40, so anyone know how to fix? -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From lunarbard@moonman.com Sun, 23 Jan 2000 23:49:06 -0600 (CST) Date: Sun, 23 Jan 2000 23:49:06 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] sorry that last post was not relevent to list, but to my ata/66 card config. thanx for the help with cam. -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From Peter.Pregler@risc.uni-linz.ac.at Mon, 24 Jan 2000 09:36:51 +0100 (CET) Date: Mon, 24 Jan 2000 09:36:51 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] cpia-control On 23-Jan-2000 sbertin@mindspring.com wrote: > On 21-Jan-2000 Jean-Michel Merliot wrote: >> cpia-control program, the gqcam client seems unaware of whatever >> changes I make to the compression mode, and it seems not to take care >> of whatever change I can do by hand in the /proc/cpia interface. >> >> By the way, I use the cpia cam in /dev/video1, in cased that >> could change > > cpia-control assumes that the camera is /dev/video0. Change the > filename > in libcpia.py to /proc/cpia/video1 and it should work. Since version 0.2, the one on my webpage, I have implemented a command line switch: [lugburz:control-client-0.2!118] ./cpia-control -h Usage: ./cpia-control [-h] [proc-file] That version should also scan for files in that directory and open the first one. So I did not consider that as a source for the problem. Is there a bug lurking here? Which versions are you using? The URL to my latest client is: http://www.risc.uni-linz.ac.at/people/ppregler/cpia/ Ooops, there is no reference on the web-page. Jarl, can you add a link to that web-page? -Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From maxwell@reading.sgi.com Mon, 24 Jan 2000 10:16:11 +0000 Date: Mon, 24 Jan 2000 10:16:11 +0000 From: Maxwell Lock maxwell@reading.sgi.com Subject: [cpia] 0.5.0 installation help?.. Hi Folks, I've been following the list with interest for the last few months. I have the parallel port version of the camera, and I'm trying to install the actual cpia-0.5.0 software. I have mcam working just fine, but couldn't figure out how to install the cpia software. Are there any instructions or help pages at all? -Thanks Max. -- Maxwell Lock, IRIX Specialist, SGI. maxwell@sgi.com [ Linux: Because a penguin makes a better mascot than Satan. ] From lunarbard@moonman.com Mon, 24 Jan 2000 08:44:42 -0600 (CST) Date: Mon, 24 Jan 2000 08:44:42 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] got 2.3.x working, but no /dev/video? I compiled in video4linux support, cpia support and everything, and loaded modules, but it says, when i run gqcam... gqcam /dev/video: No such device even though... ls /dev/video lrwxrwxrwx 1 root root 6 Jan 7 10:38 /dev/video -> video0 also, when i run usbview, it says... cannot open /proc/bus/usb/devices... that usb dir doesn't even exist, although i loaded usb modules. Any ideas? -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From jerdfelt@sventech.com Mon, 24 Jan 2000 11:38:18 -0500 Date: Mon, 24 Jan 2000 11:38:18 -0500 From: Johannes Erdfelt jerdfelt@sventech.com Subject: [cpia] got 2.3.x working, but no /dev/video? On Mon, Jan 24, 2000, David Cougle wrote: > I compiled in video4linux support, cpia support and everything, and loaded > modules, but it says, when i run gqcam... > > > gqcam > /dev/video: No such device > > even though... > > ls /dev/video > lrwxrwxrwx 1 root root 6 Jan 7 10:38 /dev/video -> > video0 > > also, when i run usbview, it says... > > cannot open /proc/bus/usb/devices... > that usb dir doesn't even exist, although i loaded usb modules. > > Any ideas? Did you check to see if /proc/bus/usb/devices exists? If it's a recent kernel, did you mount the usbdevfs filesystem there? JE From jmmerliot@free.fr Mon, 24 Jan 2000 19:42:44 +0100 (CET) Date: Mon, 24 Jan 2000 19:42:44 +0100 (CET) From: Jean-Michel Merliot jmmerliot@free.fr Subject: [cpia] cpia-control On 24-Jan-00 Peter Pregler wrote: > > On 23-Jan-2000 sbertin@mindspring.com wrote: >> On 21-Jan-2000 Jean-Michel Merliot wrote: >>> cpia-control program, the gqcam client seems unaware of whatever >>> changes I make to the compression mode, and it seems not to take care >>> of whatever change I can do by hand in the /proc/cpia interface. >>> >>> By the way, I use the cpia cam in /dev/video1, in cased that >>> could change >> >> cpia-control assumes that the camera is /dev/video0. Change the >> filename >> in libcpia.py to /proc/cpia/video1 and it should work. > > Since version 0.2, the one on my webpage, I have implemented a command > line switch: > > [lugburz:control-client-0.2!118] ./cpia-control -h > Usage: ./cpia-control [-h] [proc-file] > > That version should also scan for files in that directory and open the > first one. So I did not consider that as a source for the problem. Is > there a bug lurking here? Which versions are you using? The URL to my > latest client is: > I'm using your version 0.2... > http://www.risc.uni-linz.ac.at/people/ppregler/cpia/ > > Ooops, there is no reference on the web-page. Jarl, can you add a link to > that web-page? > > -Peter > > ------------------------------- > Email: Peter.Pregler@risc.uni-linz.ac.at > WWW: http://www.risc.uni-linz.ac.at/people/ppregler From lunarbard@moonman.com Mon, 24 Jan 2000 14:54:06 -0800 (PST) Date: Mon, 24 Jan 2000 14:54:06 -0800 (PST) From: lunarbard@moonman.com lunarbard@moonman.com Subject: [cpia] got 2.3.x working, but no /dev/video? no, the usb dir does not exist, i didnt understand why, as i had modprobed several usb modules, i thought i had done the usb file system as well. You wrote: > From: Johannes Erdfelt > To: David Cougle > Cc: cpia@risc.uni-linz.ac.at > Date: Mon, 24 Jan 2000 10:50:34 CST > Subject: Re: [cpia] got 2.3.x working, but no /dev/video? > > > On Mon, Jan 24, 2000, David Cougle wrote: > > I compiled in video4linux support, cpia support and everything, and loaded > > modules, but it says, when i run gqcam... > > > > > > gqcam > > /dev/video: No such device > > > > even though... > > > > ls /dev/video > > lrwxrwxrwx 1 root root 6 Jan 7 10:38 /dev/video -> > > video0 > > > > also, when i run usbview, it says... > > > > cannot open /proc/bus/usb/devices... > > that usb dir doesn't even exist, although i loaded usb modules. > > > > Any ideas? > > Did you check to see if /proc/bus/usb/devices exists? > > If it's a recent kernel, did you mount the usbdevfs filesystem there? > > JE > > > _______________________________________________ > cpia mailing list - cpia@risc.uni-linz.ac.at > http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia > > From sbertin@mindspring.com Mon, 24 Jan 2000 18:37:14 -0500 (EST) Date: Mon, 24 Jan 2000 18:37:14 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] cpia-0.6.0 cpia-0.6.0 is now available. The biggest change is support for 2.3.x kernels. 2000-01-23 v0.6.0 Patches from Scott J. Bertin - Updates for kernel 2.3.x. CPU usage is way up because neither the FIFO or DMA are used for reads. This should be fixed in parport_pc. - Fixed several problems in cpia_write_proc - renamed decimation to decimation_enable in /proc/cpia/videoX - Retry if there is an error reading or parsing an image - Fixed problems if a camera was removed while open - moved intended location of cpia.h from /usr/src/linux/include/linux to /usr/src/linux/drivers/char because it no longer contains anything that should be accessed from user space. Scott J. Bertin sbertin@mindspring.com From lunarbard@moonman.com Mon, 24 Jan 2000 23:57:07 -0600 (CST) Date: Mon, 24 Jan 2000 23:57:07 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] gee willikers! I have usb webcam 2... here are the modules I have loaded... usb-uhci 17540 0 (unused) ide-cd 24524 1 (autoclean) cdrom 27356 0 (autoclean) [ide-cd] mousedev 2996 0 (unused) evdev 2380 0 (unused) input 1784 0 [mousedev evdev] serial 38820 1 (autoclean) ppp_async 7116 1 ppp_deflate 40580 0 ppp_generic 11304 1 [ppp_async ppp_deflate] slhc 4488 0 [ppp_generic] usbcore 44256 0 [usb-uhci] videodev 2656 0 unix 14364 34 (autoclean) but STILL, even though /proc/bus/usb exists, it's empty! And i know i have cam plugged in to usb slot. still gqcam says gqcam /dev/video: No such device and ls /dev/video lrwxrwxrwx 1 root root 6 Jan 7 10:38 /dev/video -> video0 [root@localhost lunarbard]# ls /dev/video0 crw------- 1 lunarbar root 81, 0 Sep 21 09:05 /dev/video0 any ideas anyone? -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From jerdfelt@sventech.com Tue, 25 Jan 2000 01:08:21 -0500 Date: Tue, 25 Jan 2000 01:08:21 -0500 From: Johannes Erdfelt jerdfelt@sventech.com Subject: [cpia] gee willikers! On Mon, Jan 24, 2000, David Cougle wrote: > > I have usb webcam 2... > here are the modules I have loaded... > > > usb-uhci 17540 0 (unused) > ide-cd 24524 1 (autoclean) > cdrom 27356 0 (autoclean) [ide-cd] > mousedev 2996 0 (unused) > evdev 2380 0 (unused) > input 1784 0 [mousedev evdev] > serial 38820 1 (autoclean) > ppp_async 7116 1 > ppp_deflate 40580 0 > ppp_generic 11304 1 [ppp_async ppp_deflate] > slhc 4488 0 [ppp_generic] > usbcore 44256 0 [usb-uhci] > videodev 2656 0 > unix 14364 34 (autoclean) > > > but STILL, even though /proc/bus/usb exists, it's empty! > And i know i have cam plugged in to usb slot. mount -t usbdevfs none /proc/bus/usb > still gqcam says > gqcam > /dev/video: No such device > > and > > ls /dev/video > lrwxrwxrwx 1 root root 6 Jan 7 10:38 /dev/video -> > video0 > [root@localhost lunarbard]# ls /dev/video0 > crw------- 1 lunarbar root 81, 0 Sep 21 09:05 /dev/video0 > > any ideas anyone? Anything in the kernel logs? JE From lunarbard@moonman.com Tue, 25 Jan 2000 01:09:57 -0600 (CST) Date: Tue, 25 Jan 2000 01:09:57 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] fwiw i couldnt get gqcam working on my old parallel port quickcam, same video error. -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From lunarbard@moonman.com Tue, 25 Jan 2000 01:39:44 -0600 (CST) Date: Tue, 25 Jan 2000 01:39:44 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] wowzers ok, i have a webcam ii usb and it's displayed in /proc/bus/usb/devices and everything, but gqcam still says gqcam /dev/video: No such device even though the videodev 2656 0 module is loaded, and /dev/video is linked to /dev/video0 any ideas on how to remedy this? -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From Peter.Pregler@risc.uni-linz.ac.at Tue, 25 Jan 2000 08:54:09 +0100 (CET) Date: Tue, 25 Jan 2000 08:54:09 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] 0.5.0 installation help?.. On 24-Jan-2000 Maxwell Lock wrote: > I've been following the list with interest for the last few months. I > have the > parallel port version of the camera, and I'm trying to install the > actual > cpia-0.5.0 software. I have mcam working just fine, but couldn't figure > out how > to install the cpia software. > > Are there any instructions or help pages at all? The readme in the tarball is the only source right now. -Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From Peter.Pregler@risc.uni-linz.ac.at Tue, 25 Jan 2000 09:00:51 +0100 (CET) Date: Tue, 25 Jan 2000 09:00:51 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] Happy Report On 18-Jan-2000 Nick Holloway wrote: > I found that if I arranged for cpia_read to call fetch_frame again on > error (with a nasty goto), then everything continued. I've added some > further debug, and it appears to happen on the first frame. The camera > status has vpStatus==e0, and errorCode==97. > > I'm at a bit of a loss as to what to look at next. Any ideas? Can you check if this is still present with Scotts new 0.6? If yes please send me the logs for such an unsuccessful run. IIRC the code above is not that special. Greetings, Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From sbertin@mindspring.com Tue, 25 Jan 2000 07:55:15 -0500 (EST) Date: Tue, 25 Jan 2000 07:55:15 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] Happy Report On 25 Jan, Peter Pregler wrote: > > On 18-Jan-2000 Nick Holloway wrote: >> I found that if I arranged for cpia_read to call fetch_frame again on >> >> error (with a nasty goto), then everything continued. I've added >> some further debug, and it appears to happen on the first frame. The >> camera status has vpStatus==e0, and errorCode==97. >> >> I'm at a bit of a loss as to what to look at next. Any ideas? > > Can you check if this is still present with Scotts new 0.6? If yes > please send me the logs for such an unsuccessful run. IIRC the code > above is not that special. cpia-0.6.0 does call fetch_frame up to 3 times before giving up. I had encountered a similar problem until I got the code right for 2.3.x kernels, but I'm not seeing it anymore. I don't really know what caused it, but I left the retry in just to be safe. Scott J. Bertin sbertin@mindspring.com From sbertin@mindspring.com Tue, 25 Jan 2000 07:57:40 -0500 (EST) Date: Tue, 25 Jan 2000 07:57:40 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] gee willikers! On 24 Jan, David Cougle wrote: > > I have usb webcam 2... > here are the modules I have loaded... > > > usb-uhci 17540 0 (unused) > ide-cd 24524 1 (autoclean) > cdrom 27356 0 (autoclean) [ide-cd] > mousedev 2996 0 (unused) > evdev 2380 0 (unused) > input 1784 0 [mousedev evdev] > serial 38820 1 (autoclean) > ppp_async 7116 1 > ppp_deflate 40580 0 > ppp_generic 11304 1 [ppp_async ppp_deflate] > slhc 4488 0 [ppp_generic] > usbcore 44256 0 [usb-uhci] > videodev 2656 0 > unix 14364 34 (autoclean) Hmm. I don't see cpia anywhere in that list. Scott J. Bertin sbertin@mindspring.com From hfisselier@unilog.fr Tue, 25 Jan 2000 17:25:38 -0000 Date: Tue, 25 Jan 2000 17:25:38 -0000 From: FISSELIER Hubert hfisselier@unilog.fr Subject: [cpia] Problem to load cpia_pp Hi. I have a WebCam II with parallel port. As explain in the INSTALL file, I've load the videodev module with "modprobe -a videodev", parport module, parport_pc. I've load the cpia.o with the command "insmod cpia.o" but i can't load the cpia_pp.o because he said me that the periphical is already used. Why? Is the manipulation is bad? Regards. Hubert FISSELIER UNILOG Tel: 02-40-52-50-44 Fax: 02-40-49-84-25 mailto:hfisselier@unilog.fr From Jochen.Scharrlach@schwaben.de Tue, 25 Jan 2000 18:23:53 +0100 (MET) Date: Tue, 25 Jan 2000 18:23:53 +0100 (MET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB works... a bit... Hi, ok, my rvmalloc-problem *might* be caused by my SMP-system, my shiny and new UP-2.3.40 works fine B-) Well, at least it works better. But I am still not able to feed the highlevel-code correctly. My readStream() looks like this: static int cpia_usb_streamRead(void *privdata, u8 *frame, int noblock) { struct usb_cpia *cpia = (struct usb_cpia *) privdata; cpia->buffer = frame; cpia->buffer_length = 0; cpia->buffer_maxlength = CPIA_MAX_IMAGE_SIZE; DBG ("waiting...\n"); interruptible_sleep_on(&cpia->wq_stream); DBG("read done, %d bytes\n", cpia->buffer_length); if (cpia->buffer_length == 0 || cpia->buffer == NULL) return 0; cpia->buffer = NULL; DBG("Header: %x/%x, Footer: %x%x%x%x\n", frame[0], frame[1], frame[cpia->buffer_length-4], frame[cpia->buffer_length-3], frame[cpia->buffer_length-2], frame[cpia->buffer_length-1]); return cpia->buffer_length; } And I get as result in dmesg (I added some debugging to parse_picture): cpia_usb.c(237495):cpia_usb_streamRead(322):waiting... cpia_usb.c(237518):cpia_usb_complete(115):Let's get it on! cpia_usb.c(237518):cpia_usb_complete(115):Let's get it on! cpia_usb.c(237518):cpia_usb_complete(115):Let's get it on! cpia_usb.c(237518):cpia_usb_complete(115):Let's get it on! cpia_usb.c(237518):cpia_usb_streamRead(326):read done, 203684 bytes cpia_usb.c(237518):cpia_usb_streamRead(336):Header: 19/68, Footer: ffffffff cpia.c(237519):parse_picture(1865):Start cpia.c(237519):parse_picture(1922):params cpia.c(237519):parse_picture(1994):loop done cpia.c(237519):fetch_frame(2189):parse frame failed Do I have to prepare the received data somehow? BTW, the loop where you are waiting for a "STREAM_READY" from the camera before you call readStream() should go into the lowlevel-PP driver, because it doesn't work this way with an USB-cam. Bye, Jochen -- new signature coming RSN (tm) From claudio@helllabs.org Tue, 25 Jan 2000 14:28:52 -0200 (EDT) Date: Tue, 25 Jan 2000 14:28:52 -0200 (EDT) From: Claudio Matsuoka claudio@helllabs.org Subject: [cpia] Unified patch for recent kernels I'm installing the CPiA module in my Debian slink box but for some reason the bundled patch(1) complains about "malformed patch at line 43". I applied it by hand over 2.3.39 but it didn't work -- it seems that videodev didn't include CPiA support. Now I'm installing a vanilla 2.3.40, and to avoid the tedious work of manual patching (and possible errors), is an unified diff available for one of the recent kernels? From lunarbard@moonman.com Tue, 25 Jan 2000 12:22:48 -0600 (CST) Date: Tue, 25 Jan 2000 12:22:48 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] gee willikers! [root@localhost 2.3.40]# gqcam ioctl (VIDIOCSPICT): Invalid argument it seems to say that no matter which setting i try to change. any ideas? anyone have some sample shots of their usb webcam 2 on the web? im wondering what's the best you can expect from the cam. -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From lunarbard@moonman.com Tue, 25 Jan 2000 13:38:11 -0600 (CST) Date: Tue, 25 Jan 2000 13:38:11 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] hmm Well, I got the cam working, but I'm curious about how it matches up with the quality of my old parallel port quickcam 2, which seems, at least from the pictures i've taken on windows and linux so far, to be better than webcam ii. I was considering buying webcam 3, but does anyone have any shots that show how good a webcam 2 can do? www.slidellweb.com/dcougle/test.jpg is the best i got in linux, and i look like a giraffe alien in it:) -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From lunarbard@moonman.com Tue, 25 Jan 2000 13:38:44 -0600 (CST) Date: Tue, 25 Jan 2000 13:38:44 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] oh yeah anyone know why /lib/modules/2.3.40/usb wont show up in modules.dep no matter what? depmod -a all i want, same prob. -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From lunarbard@moonman.com Tue, 25 Jan 2000 13:55:02 -0600 (CST) Date: Tue, 25 Jan 2000 13:55:02 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] stupid me:) ok, i had to change the focus on the cam to get a better picture, but there still is the thing with the color, me looking like an alien(cuz weird colors), and stuff when i try to adjust color, it says, in console... ioctl (VIDIOCSPICT): Invalid argument is this fixable, or do we just need to wait? It seems i cant change any gqcam controls. -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From claudio@helllabs.org Tue, 25 Jan 2000 17:08:37 -0200 (EDT) Date: Tue, 25 Jan 2000 17:08:37 -0200 (EDT) From: Claudio Matsuoka claudio@helllabs.org Subject: [cpia] hmm On Tue, 25 Jan 2000, David Cougle wrote: > Well, I got the cam working, but I'm curious about how it matches up with > the quality of my old parallel port quickcam 2, which seems, at least from > the pictures i've taken on windows and linux so far, to be better than > webcam ii. I was considering buying webcam 3, but does anyone have any > shots that show how good a webcam 2 can do? I have the webcam 2 and 3 here. You can check a couple of webcam 3 shots in http://helllabs.org/~claudio/junk/w3/. I'll have webcam 2 shots as soon as I make videodev recognize the CPiA driver. > www.slidellweb.com/dcougle/test.jpg is the best i got in linux, and i look > like a giraffe alien in it:) How does it compare with the best you can get in Windows? From Peter.Pregler@risc.uni-linz.ac.at Tue, 25 Jan 2000 21:16:23 +0100 (CET) Date: Tue, 25 Jan 2000 21:16:23 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] hmm On 25-Jan-00 David Cougle wrote: > Well, I got the cam working, but I'm curious about how it matches up with > the quality of my old parallel port quickcam 2, which seems, at least from > the pictures i've taken on windows and linux so far, to be better than > webcam ii. I was considering buying webcam 3, but does anyone have any > shots that show how good a webcam 2 can do? See lugburz.risc.uni-linz.ac.at for my test-webcam. The quality really depends on the lighting. Things get grainy for in-house lighting. > www.slidellweb.com/dcougle/test.jpg is the best i got in linux, and i look > like a giraffe alien in it:) This is a byte-order problem (rgb24 vs. bgr24). Since I have no idea what version of what you are using things are complicated. As for the parport camera: use the version of gqcam that comes with the driver. -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 From lunarbard@moonman.com Tue, 25 Jan 2000 14:22:52 -0600 (CST) Date: Tue, 25 Jan 2000 14:22:52 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] die die die! pstree -p |grep gqcam |-gqcam(899) |-gqcam(996) i cant kill them, i've tried everything:) -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From jerdfelt@sventech.com Tue, 25 Jan 2000 15:43:15 -0500 Date: Tue, 25 Jan 2000 15:43:15 -0500 From: Johannes Erdfelt jerdfelt@sventech.com Subject: [cpia] stupid me:) On Tue, Jan 25, 2000, David Cougle wrote: > ok, i had to change the focus on the cam to get a better picture, but > there still is the thing with the color, me looking like an alien(cuz > weird colors), and stuff > when i try to adjust color, it says, in console... > ioctl (VIDIOCSPICT): Invalid argument > > is this fixable, or do we just need to wait? > It seems i cant change any gqcam controls. A patch has been developed but it broke a couple of other things. It will be added soon. JE From jerdfelt@sventech.com Tue, 25 Jan 2000 15:44:47 -0500 Date: Tue, 25 Jan 2000 15:44:47 -0500 From: Johannes Erdfelt jerdfelt@sventech.com Subject: [cpia] oh yeah On Tue, Jan 25, 2000, David Cougle wrote: > anyone know why /lib/modules/2.3.40/usb wont show up in modules.dep no > matter what? > depmod -a all i want, same prob. echo "path[usb]=/lib/modules/\`uname -r\`" >> /etc/conf.modules Or modules.conf if it's named that. This is in the new version of the module tools. JE From lunarbard@moonman.com Tue, 25 Jan 2000 14:46:02 -0600 (CST) Date: Tue, 25 Jan 2000 14:46:02 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] hmm www.slidellweb.com/dcougle/test.jpg i fixed it up a bit with changing the focus, but is this the best quality the webcam 2 can do? if it is, it doesn't seem to get as good as b&w quickcam or color quickcam 2. -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From lunarbard@moonman.com Tue, 25 Jan 2000 14:58:04 -0600 (CST) Date: Tue, 25 Jan 2000 14:58:04 -0600 (CST) From: David Cougle lunarbard@moonman.com Subject: [cpia] 640x480? I plugged the cam into a linux box, and it looks SWELL at 640x480. Is it possible to achieve this resolution presently in linux, or change FPS? -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 Linux, operating system of the future "We will not be the alternative, we will set the trend" From jerdfelt@sventech.com Tue, 25 Jan 2000 16:09:43 -0500 Date: Tue, 25 Jan 2000 16:09:43 -0500 From: Johannes Erdfelt jerdfelt@sventech.com Subject: [cpia] hmm On Tue, Jan 25, 2000, David Cougle wrote: > www.slidellweb.com/dcougle/test.jpg > i fixed it up a bit with changing the focus, but is this the best quality > the webcam 2 can do? if it is, it doesn't seem to get as good as b&w > quickcam or color quickcam 2. There's been some connfusion how the RGB data is suspposed to come. All of the V4L programs do it differently. This problem you're seeing with the colors is the RGB data being interpreted as BGR. I'm still trying to figure out exactly how it's supposed to be interpreted. JE From jerdfelt@sventech.com Tue, 25 Jan 2000 16:11:14 -0500 Date: Tue, 25 Jan 2000 16:11:14 -0500 From: Johannes Erdfelt jerdfelt@sventech.com Subject: [cpia] 640x480? On Tue, Jan 25, 2000, David Cougle wrote: > I plugged the cam into a linux box, and it looks SWELL at 640x480. Is it > possible to achieve this resolution presently in linux, or change FPS? CPiA can't do more thn 352x288. Or are you talking about the Webcam 3? If so, the Webcam 3 isn't a CPiA, it's a OV511 IIRC. JE From sbertin@mindspring.com Tue, 25 Jan 2000 17:39:44 -0500 (EST) Date: Tue, 25 Jan 2000 17:39:44 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] Problem to load cpia_pp On 25 Jan, FISSELIER Hubert wrote: > I have a WebCam II with parallel port. As explain in the INSTALL file, > I've load the videodev module with "modprobe -a videodev", parport > module, parport_pc. I've load the cpia.o with the command "insmod > cpia.o" but i can't load the cpia_pp.o because he said me that the > periphical is already used. > > Why? Is the manipulation is bad? I think you will get that error message regardless of why it actually fails. The most likely reason for this to happen is if you do not have the camera on an ECP port. Afer installing the parport_pc module, type dmesg. At the end you should see a line that looks like: parport0: PC-style at 0x3bc, irq 7, dma 3 [SPP,ECP,ECPPS2] If it doesn't say ECP for the port you have the camera connected to, it will not work. Soctt J. Bertin sbertin@mindspring.com From zioivy@libero.it Tue, 25 Jan 2000 23:58:14 +0100 Date: Tue, 25 Jan 2000 23:58:14 +0100 From: ZioIvy zioivy@libero.it Subject: [cpia] Help about two cameras I must use two cameras at the same time because I have to take two stereo images. Does anyone can help me? Please... 8-( From sbertin@mindspring.com Tue, 25 Jan 2000 18:07:22 -0500 (EST) Date: Tue, 25 Jan 2000 18:07:22 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] Unified patch for recent kernels On 25 Jan, Claudio Matsuoka wrote: > I'm installing the CPiA module in my Debian slink box but for some > reason the bundled patch(1) complains about "malformed patch at line > 43". I applied it by hand over 2.3.39 but it didn't work -- it seems > that videodev didn't include CPiA support. > > Now I'm installing a vanilla 2.3.40, and to avoid the tedious work > of manual patching (and possible errors), is an unified diff available > for one of the recent kernels? You're probably the first to apply that patch to one of the recent development kernels. I'm not suprised that there are problems. If you don't need it compiled into the kernel, the patch is unnecessary, just type make in the cpia/modules directory and the modules will be built there. I'll have a look later tonight and try to put together a patch for 2.3.40. Scott J. Bertin sbertin@mindspring.com From sbertin@mindspring.com Tue, 25 Jan 2000 18:19:21 -0500 (EST) Date: Tue, 25 Jan 2000 18:19:21 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] Help about two cameras On 25 Jan, ZioIvy wrote: > I must use two cameras at the same time because I have to take two > stereo images. > Does anyone can help me? It should work fine. The cameras will be /dev/video0 and /dev/video1 if they are the only 4vl devices on your system. If there are any problems, please send a bug report. Scott J. Bertin sbertin@mindspring.com From claudio@helllabs.org Tue, 25 Jan 2000 20:35:47 -0200 (EDT) Date: Tue, 25 Jan 2000 20:35:47 -0200 (EDT) From: Claudio Matsuoka claudio@helllabs.org Subject: [cpia] Unified patch for recent kernels On Tue, 25 Jan 2000 sbertin@mindspring.com wrote: > You're probably the first to apply that patch to one of the recent > development kernels. I'm not suprised that there are problems. If you > don't need it compiled into the kernel, the patch is unnecessary, just > type make in the cpia/modules directory and the modules will be built > there. I'll have a look later tonight and try to put together a patch > for 2.3.40. I tried to just build and install the modules, but here's what happened: Linux dexter 2.3.39 #2 Mon Jan 17 17:55:25 EDT 2000 i686 unknown Jan 24 20:02:40 dexter kernel: parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,ECP,DMA] Jan 24 20:02:40 dexter kernel: parport0: cpp_daisy: aa5500ff(10) Jan 24 20:02:40 dexter kernel: parport0: assign_addrs: aa5500ff(10) Jan 24 20:03:46 dexter kernel: Linux video capture interface: v1.00 Jan 24 20:03:50 dexter kernel: V4L-Driver for Vision CPiA based cameras v0.6.0 Jan 24 20:03:58 dexter kernel: Parallel port driver for Vision CPiA based cameras v0.6.0 open("/dev/video", O_RDWR) = -1 ENOSYS (Function not implemented) open("/dev/video", O_RDWR) = -1 ENOSYS (Function not implemented) open("/dev/video", O_RDWR) = -1 ENODEV (Operation not supported by device) write(2, "/dev/video: Operation not suppor"..., 46/dev/video: Operation not supported by device # lsmod Module Size Used by cpia_pp 4556 0 (autoclean) (unused) cpia 50684 0 [cpia_pp] videodev 2880 0 [cpia] parport_pc 15004 0 parport 29632 0 [cpia_pp parport_pc] serial 40484 1 (autoclean) ne 7868 1 8390 6916 0 [ne] isa-pnp 28404 0 [ne] I quickly browsed through videodev.c yesterday and probably missed the hook to the CPiA driver, if(vfl==NULL) { char modname[20]; sprintf (modname, "char-major-%d-%d", VIDEO_MAJOR, minor); request_module(modname); vfl=video_device[minor]; if (vfl==NULL) return -ENODEV; } I tried the kernel patch as a last resort since the module itself didn't seem to work. I'm compiling 2.3.40 now and I can provide a patch (if nobody else needs it with real urgency), as soon as I get the modules working. Anyway, that ENOSYS when opening /dev/video0 is strange. claudio From sbertin@mindspring.com Tue, 25 Jan 2000 20:46:06 -0500 (EST) Date: Tue, 25 Jan 2000 20:46:06 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] Unified patch for recent kernels On 25 Jan, Claudio Matsuoka wrote: > I tried to just build and install the modules, but here's what > happened: > > Linux dexter 2.3.39 #2 Mon Jan 17 17:55:25 EDT 2000 i686 unknown > > Jan 24 20:02:40 dexter kernel: parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,ECP,DMA] > Jan 24 20:02:40 dexter kernel: parport0: cpp_daisy: aa5500ff(10) > Jan 24 20:02:40 dexter kernel: parport0: assign_addrs: aa5500ff(10) > Jan 24 20:03:46 dexter kernel: Linux video capture interface: v1.00 > Jan 24 20:03:50 dexter kernel: V4L-Driver for Vision CPiA based cameras v0.6.0 > Jan 24 20:03:58 dexter kernel: Parallel port driver for Vision CPiA based cameras v0.6.0 After this I also get Jan 25 20:18:01 adsl-61-0-206 kernel: cpia_pp.c(555746):cpia_pp_open(1367):Found camera[0] Jan 25 20:18:01 adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 20:18:01 adsl-61-0-206 kernel: cpia.c(555748):goto_low_power(2452):camera now in LOW power state Jan 25 20:18:01 adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 20:18:01 adsl-61-0-206 last message repeated 2 times Jan 25 20:18:01 adsl-61-0-206 kernel: cpia.c(555760):goto_high_power(2440):camera now in HIGH power state Jan 25 20:18:01 adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 20:18:01 adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 20:18:02 adsl-61-0-206 kernel: cpia.c(555772):dispatch_commands(2197):1 1 0 0 1 1 1 1 Jan 25 20:18:02 adsl-61-0-206 kernel: cpia.c(555772):dispatch_commands(2198):0 1 1 1 1 1 0 1 Jan 25 20:18:02 adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 20:18:02 adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 20:18:02 adsl-61-0-206 kernel: cpia.c(555777):save_camera_state(2472):0/0/185/0/220/214/214/230 Jan 25 20:18:02 adsl-61-0-206 kernel: cpia.c(555777):save_camera_state(2476):32/6/92 Jan 25 20:18:02 adsl-61-0-206 kernel: CPiA Version: 1.20 (2.0) Jan 25 20:18:02 adsl-61-0-206 kernel: CPiA PnP-ID: 0553:0002:0100 Jan 25 20:18:02 adsl-61-0-206 kernel: VP-Version: 1.0 0100 If you don't get that or any error messages, then something is going wrong in cpia_pp_attach. It looks like the only cause of failure would be if port->probe_info had the wrong information. What does cat /proc/sys/dev/parport/parport0/autoprobe tell you? Scott J. Bertin sbertin@mindspring.com From Peter.Pregler@risc.uni-linz.ac.at Wed, 26 Jan 2000 08:52:40 +0100 (CET) Date: Wed, 26 Jan 2000 08:52:40 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] hmm On 25-Jan-2000 Johannes Erdfelt wrote: > On Tue, Jan 25, 2000, David Cougle wrote: >> www.slidellweb.com/dcougle/test.jpg >> i fixed it up a bit with changing the focus, but is this the best >> quality >> the webcam 2 can do? if it is, it doesn't seem to get as good as b&w >> quickcam or color quickcam 2. > > There's been some connfusion how the RGB data is suspposed to come. All > of the V4L programs do it differently. This problem you're seeing with > the colors is the RGB data being interpreted as BGR. I'm still trying to > figure out exactly how it's supposed to be interpreted. I discussed this on the v4l list. The 'correct' way is: - for read: rgb is just rgb - for mmap: rgb24/32 is actually bgr24/32, rgb15/16 is rgb There is no reasoning for the above except history and misunderstanding by the programmers. I suggest you stick to this for the simple reason that one would break either all mmap-based applications or all read-based application to do it right. For this very reason there is no intention to change this from the v4l-guys side. For v4l2 things are different. You have the correct palettes there (PALETTE_RGB and PALETTE_BGR). As for the parport cpia driver the situation is the following: - up to version 0.4X the read byte order was wrong, the ported gqcam did swap the colors to compensate for that - beginning with 0.5 the driver and the ported gqcam behave as described above (different byte order for read/mmap), I have seen no wrong colors with v4l-applications since driver version 0.5 As for the usb-driver you have to fill in the details. :) Greetings, Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From debugger@bigfoot.com Wed, 26 Jan 2000 14:11:03 +0500 Date: Wed, 26 Jan 2000 14:11:03 +0500 From: Tasnim Ahmed debugger@bigfoot.com Subject: [cpia] Unified patch for recent kernels Hello I compiled cpia-0.6.0 modules with kernel 2.3.40 and getting similar kernel messages however on launching gqcam I get series of ECP direction: reverse messages and gqcam hangs I have to press Ctrl-C in terminal. However, when I loaded the same module for the first time forced into a 2.3.39 kernel it did work very poorly 2 fps on a Celeron 333 MHz. Besides the point I am not getting even that anymore. -- Tasnim On Wed, 26 Jan 2000, you wrote: > 20:18:01 adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 > 20:18:01 adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 > adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 20:18:02 > adsl-61-0-206 kernel: parport0: ECP direction: reverse Jan 25 20:18:02 > adsl-61-0-206 kernel: > cpia.c(555777):save_camera_state(2472):0/0/185/0/220/214/214/230 Jan 25 > 20:18:02 adsl-61-0-206 kernel: > cpia.c(555777):save_camera_state(2476):32/6/92 Jan 25 20:18:02 > adsl-61-0-206 kernel: CPiA Version: 1.20 (2.0) > Jan 25 20:18:02 adsl-61-0-206 kernel: CPiA PnP-ID: 0553:0002:0100 > Jan 25 20:18:02 adsl-61-0-206 kernel: VP-Version: 1.0 0100 > > If you don't get that or any error messages, then something is going > wrong in cpia_pp_attach. It looks like the only cause of failure would > be if port->probe_info had the wrong information. What does > cat /proc/sys/dev/parport/parport0/autoprobe tell you? > > Scott J. Bertin > sbertin@mindspring.com From sbertin@mindspring.com Wed, 26 Jan 2000 06:36:19 -0500 (EST) Date: Wed, 26 Jan 2000 06:36:19 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] Unified patch for recent kernels On 26 Jan, Tasnim Ahmed wrote: > I compiled cpia-0.6.0 modules with kernel 2.3.40 and getting similar > kernel messages however on launching gqcam I get series of ECP > direction: reverse messages and gqcam hangs I have to press Ctrl-C in > terminal. However, when I loaded the same module for the first time > forced into a 2.3.39 kernel it did work very poorly 2 fps on a > Celeron 333 MHz. Besides the point I am not getting even that > anymore. The ECP direction: reverse messages are just the kernel telling you it is doing a read. The low frame rate is also normal right now. I'm assuming it is beacuse the FIFO and DMA are unused. I plan to look into this and hopefully get a patch into parport_pc before the 2.4 kernel is released. I don't know why gqcam is hanging, are there any messages in the logs? Scott J. Bertin sbertin@mindspring.com From Peter.Pregler@risc.uni-linz.ac.at Wed, 26 Jan 2000 13:17:43 +0100 (CET) Date: Wed, 26 Jan 2000 13:17:43 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] Unified patch for recent kernels On 26-Jan-2000 sbertin@mindspring.com wrote: > The ECP direction: reverse messages are just the kernel telling you it > is doing a read. The low frame rate is also normal right now. I'm > assuming it is beacuse the FIFO and DMA are unused. I plan to look into > this and hopefully get a patch into parport_pc before the 2.4 kernel is > released. I had a look at your code yesterday and it worked at first try. Good work! I noticed that they implemented fifo-read/write in parport_pc but only dma-write and no dma-read. Did you try out the fifo-read? The patch would be about the dma-write then. Is that correct? I would not mind to do the dma-read stuff. I guess I have some practice with that and their dma-write code looked quite similar to my 2.2 dma-read code. :) -Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From nikom@merl.com Wed, 26 Jan 2000 11:35:30 -0500 Date: Wed, 26 Jan 2000 11:35:30 -0500 From: Jacob Nikom nikom@merl.com Subject: [cpia] Unified patch for recent kernels Sorry Scott for little unrelevant question - do you know when 2.4 kernel is going to come out? Thank you, Jacob Nikom sbertin@mindspring.com wrote: > > On 26 Jan, Tasnim Ahmed wrote: > > I compiled cpia-0.6.0 modules with kernel 2.3.40 and getting similar > > kernel messages however on launching gqcam I get series of ECP > > direction: reverse messages and gqcam hangs I have to press Ctrl-C in > > terminal. However, when I loaded the same module for the first time > > forced into a 2.3.39 kernel it did work very poorly 2 fps on a > > Celeron 333 MHz. Besides the point I am not getting even that > > anymore. > > The ECP direction: reverse messages are just the kernel telling you it > is doing a read. The low frame rate is also normal right now. I'm > assuming it is beacuse the FIFO and DMA are unused. I plan to look into > this and hopefully get a patch into parport_pc before the 2.4 kernel is > released. I don't know why gqcam is hanging, are there any messages in > the logs? > > Scott J. Bertin > sbertin@mindspring.com > > _______________________________________________ > cpia mailing list - cpia@risc.uni-linz.ac.at > http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia From claudio@helllabs.org Wed, 26 Jan 2000 14:31:11 -0200 (EDT) Date: Wed, 26 Jan 2000 14:31:11 -0200 (EDT) From: Claudio Matsuoka claudio@helllabs.org Subject: [cpia] Unified patch for recent kernels On Tue, 25 Jan 2000 sbertin@mindspring.com wrote: > After this I also get > Jan 25 20:18:01 adsl-61-0-206 kernel: cpia_pp.c(555746):cpia_pp_open > (1367):Found camera[0] > Jan 25 20:18:01 adsl-61-0-206 kernel: parport0: ECP direction: reverse No such messages here, in 2.3.39 or 2.3.40. > If you don't get that or any error messages, then something is going > wrong in cpia_pp_attach. It looks like the only cause of failure would > be if port->probe_info had the wrong information. I presume this is the relevant piece of code? 1568 case PPCPIA_PARPORT_AUTO: 1569 if (port->probe_info[0].class != PARPORT_CLASS_MEDIA || 1570 port->probe_info[0].cmdset == NULL || 1571 strncmp(port->probe_info[0].cmdset, "CPIA_1", 6) != 0) 1572 return; > What does cat /proc/sys/dev/parport/parport0/autoprobe tell you? Nothing. Umm. I'm installing the camera in a Windows box to see if it is working properly (which I suppose it is). If the camera is OK, perhaps something bad happened to my parallel port. Ouch. Best regards, claudio From claudio@helllabs.org Wed, 26 Jan 2000 16:29:55 -0200 (EDT) Date: Wed, 26 Jan 2000 16:29:55 -0200 (EDT) From: Claudio Matsuoka claudio@helllabs.org Subject: [cpia] Much better now, but no 100% success I tested the camera in a Windows box and it worked perfectly. I assumed the problem was in my parallel port and replaced the cables, and now I get: Linux dexter 2.3.40 #1 Tue Jan 25 20:20:53 EDT 2000 i686 unknown Jan 26 16:14:49 dexter kernel: 0x378: FIFO is 16 bytes Jan 26 16:14:49 dexter kernel: 0x378: writeIntrThreshold is 16 Jan 26 16:14:49 dexter kernel: 0x378: readIntrThreshold is 16 Jan 26 16:14:49 dexter kernel: 0x378: PWord is 8 bits Jan 26 16:14:49 dexter kernel: 0x378: Interrupts are ISA-Pulses Jan 26 16:14:49 dexter kernel: parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,ECP] Jan 26 16:14:49 dexter kernel: parport0: cpp_daisy: aa5500ff(10) Jan 26 16:14:49 dexter kernel: parport0: assign_addrs: aa5500ff(10) Jan 26 16:14:49 dexter kernel: parport0: Multimedia device, VLSI Vision Ltd DUAL Camera Jan 26 16:14:49 dexter kernel: Linux video capture interface: v1.00 Jan 26 16:14:49 dexter kernel: V4L-Driver for Vision CPiA based cameras v0.6.0 Jan 26 16:14:49 dexter modprobe: can't locate module cpia_pp Jan 26 16:14:49 dexter modprobe: can't locate module cpia_usb Jan 26 16:14:49 dexter kernel: Parallel port driver for Vision CPiA based cameras v0.6.0 Jan 26 16:14:49 dexter kernel: cpia_pp.c(11634):cpia_pp_open(1367):Found camera[0] Jan 26 16:14:49 dexter kernel: parport0: ECP direction: reverse Jan 26 16:14:49 dexter kernel: cpia.c(11636):goto_low_power(2452):camera now in LOW power state Jan 26 16:14:49 dexter kernel: parport0: ECP direction: reverse Jan 26 16:14:49 dexter last message repeated 2 times Jan 26 16:14:49 dexter kernel: cpia.c(11648):goto_high_power(2440):camera now in HIGH power state Jan 26 16:14:49 dexter kernel: parport0: ECP direction: reverse Jan 26 16:14:49 dexter kernel: cpia.c(11650):reset_camera(2586):fatal_error: 0x11 Jan 26 16:14:49 dexter kernel: cpia.c(11650):reset_camera(2588):vp_status: 0x00 Jan 26 16:14:49 dexter kernel: cpia_pp.c:cpia_pp_register(1544):failed to cpia_register_camera It looks much better now, but it still fails to reset the camera. Any ideas? From Jochen.Scharrlach@schwaben.de Wed, 26 Jan 2000 22:09:03 +0100 (CET) Date: Wed, 26 Jan 2000 22:09:03 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB - First Contact (1/2) Message-ID: <14479.25199.424385.796051@localhost.localdomain> Date: Wed, 26 Jan 2000 22:09:03 +0100 (CET) To: cpia@risc.uni-linz.ac.at Subject: USB - First Contact X-Mailer: VM 6.72 under 21.1 (patch 8) "Bryce Canyon" XEmacs Lucid Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart_Wed_Jan_26_22:09:03_2000-1" Content-Transfer-Encoding: 7bit --Multipart_Wed_Jan_26_22:09:03_2000-1 Content-Type: text/plain; charset=US-ASCII Hi, no, this is not a stable+clean driver. It has more of a demo and many things are only there because I had a little fight with my version of gqcam... Your computer might crash&burn if you try it. If you can't resist, use the patch to modify the cpia-0.6.0 "cpia.c" and "cpia.h". Then put the cpia_usb.c into the module-directory and compile the whole thing. You'll probably need kernel 2.3.35 or above. YOU CAN'T COMPILE cpia_pp.c AFTERWARDS!! Initialization should go this way: 1. load your usb-drivers, e.g. "modprobe usb-uhci" 2. load videodev, e.g. "modprobe videodev" 3. load the cpia modules with insmod cpia.o insmod cpia_usb.o 4. look in dmesg if something went wrong, somewhere there should be something like this: Jan 26 21:33:16 roger kernel: CPiA Version: 1.20 (2.0) Jan 26 21:33:16 roger kernel: CPiA PnP-ID: 0553:0002:0100 Jan 26 21:33:16 roger kernel: VP-Version: 1.0 0100 Jan 26 21:33:16 roger kernel: usb.c: cpia driver claimed interface c747d880 Now you should be able to startup your client. If you want to crash your computer hard, keep your client running, unplug the camera, close the client and try to unload cpia_usb.o and cpia.o... I hope Scott+Peter won't be too shocked about my changes :) Bye, Jochen -- new signature coming RSN (tm) --Multipart_Wed_Jan_26_22:09:03_2000-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="usb-patch" Content-Transfer-Encoding: 7bit --- cpia-0.6.0/module/cpia.c Sun Jan 23 20:47:55 2000 +++ cpia-usb/module/cpia.c Wed Jan 26 21:29:41 2000 @@ -22,28 +22,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef CONFIG_KMOD -#include -#endif - /* #define _CPIA_DEBUG_ define for verbose debug output */ +/* #include */ #include "cpia.h" #ifdef CONFIG_VIDEO_CPIA_PP @@ -141,117 +121,6 @@ #define CPIA_COMMAND_AbortStream (OUTPUT | CPIA_MODULE_DEBUG | 9) #define CPIA_COMMAND_DownloadDRAM (OUTPUT | CPIA_MODULE_DEBUG | 10) -struct cam_params { - struct { - u8 firmwareVersion; - u8 firmwareRevision; - u8 vcVersion; - u8 vcRevision; - } version; - struct { - u16 vendor; - u16 product; - u16 deviceRevision; - } pnpID; - struct { - u8 vpVersion; - u8 vpRevision; - u16 cameraHeadID; - } vpVersion; - struct { - u8 systemState; - u8 grabState; - u8 streamState; - u8 fatalError; - u8 cmdError; - u8 debugFlags; - u8 vpStatus; - u8 errorCode; - } status; - struct { - u8 brightness; - u8 contrast; - u8 saturation; - } colourParams; - struct { - u8 gainMode; - u8 expMode; - u8 compMode; - u8 centreWeight; - u8 gain; - u8 fineExp; - u8 coarseExpLo; - u8 coarseExpHi; - u8 redComp; - u8 green1Comp; - u8 green2Comp; - u8 blueComp; - } exposure; - struct { - u8 balanceMode; - u8 redGain; - u8 greenGain; - u8 blueGain; - } colourBalance; - struct { - u8 divisor; - u8 baserate; - } sensorFps; - struct { - u8 gain1; - u8 gain2; - u8 gain4; - u8 gain8; - } apcor; - struct { - u8 flickerMode; - u8 coarseJump; - u8 allowableOverExposure; - } flickerControl; - struct { - u8 gain1; - u8 gain2; - u8 gain4; - u8 gain8; - } vlOffset; - struct { - u8 mode; - u8 decimation; - } compression; - struct { - u8 frTargeting; - u8 targetFR; - u8 targetQ; - } compressionTarget; - struct { - u8 yThreshold; - u8 uvThreshold; - } yuvThreshold; - struct { - u8 hysteresis; - u8 threshMax; - u8 smallStep; - u8 largeStep; - u8 decimationHysteresis; - u8 frDiffStepThresh; - u8 qDiffStepThresh; - u8 decimationThreshMod; - } compressionParams; - struct { - u8 videoSize; /* CIF/QCIF */ - u8 subSample; - u8 yuvOrder; - } format; - struct { - u8 colStart; /* skip first 8*colStart pixels */ - u8 colEnd; /* finish at 8*colEnd pixels */ - u8 rowStart; /* skip first 4*rowStart lines */ - u8 rowEnd; /* finish at 4*rowEnd lines */ - } roi; - u8 ecpTiming; - u8 streamStartLine; -}; - enum { FRAME_READY, /* Ready to grab into */ FRAME_GRABBING, /* In the process of being grabbed into */ @@ -259,24 +128,6 @@ FRAME_UNUSED, /* Unused (no MCAPTURE) */ }; -#define FRAME_NUM 2 /* double buffering for now */ -struct cpia_frame { - u8 *data; - int count; - int width; - int height; - volatile int state; -}; - -enum v4l_camstates { - CPIA_V4L_IDLE = 0, - CPIA_V4L_ERROR, - CPIA_V4L_COMMAND, - CPIA_V4L_GRABBING, - CPIA_V4L_STREAMING, - CPIA_V4L_STREAMING_PAUSED, -}; - #define COMMAND_NONE 0x0000 #define COMMAND_SETCOMPRESSION 0x0001 #define COMMAND_SETCOMPRESSIONTARGET 0x0002 @@ -294,46 +145,7 @@ #define COMMAND_SETFLICKERCTRL 0x2000 #define COMMAND_SETVLOFFSET 0x4000 -struct cam_data { - int index; /* which camera is this */ - struct semaphore busy_lock; /* guard against SMP multithreading */ - struct cpia_camera_ops *ops; /* lowlevel driver operations */ - void *lowlevel_data; /* private data for lowlevel driver */ - u8 *raw_image; /* buffer for raw image data */ - struct cpia_frame decompressed_frame; - /* buffer to hold decompressed frame */ - int image_size; /* sizeof last decompressed image */ - int open_count; /* # of process that have camera open */ - - /* camera status */ - int fps; /* actual fps reported by the camera */ - int transfer_rate; /* transfer rate from camera in kB/s */ - u8 mainsFreq; /* for flicker control */ - - /* proc interface */ - struct semaphore param_lock; /* params lock for this camera */ - struct cam_params params; /* camera settings */ - struct proc_dir_entry *proc_entry; /* /proc/cpia/videoX */ - - /* v4l */ - int video_size; /* VIDEO_SIZE_ */ - volatile enum v4l_camstates camstate; /* v4l layer status */ - struct video_device vdev; /* v4l videodev */ - struct video_picture vp; /* v4l camera settings */ - struct video_window vw; /* v4l capture area */ - - /* mmap interface */ - int curframe; /* the current frame to grab into */ - u8 *frame_buf; /* frame buffer data */ - struct cpia_frame frame[FRAME_NUM]; - /* FRAME_NUM-buffering, so we need a array */ - - int first_frame; - int mmap_kludge; /* 'wrong' byte order for mmap */ - volatile u32 cmd_queue; /* queued commands */ -}; - -static struct cam_data *camera[CPIA_MAXCAMS] ={ [0 ... CPIA_MAXCAMS-1] = NULL }; +/* static struct cam_data *camera[CPIA_MAXCAMS] ={ [0 ... CPIA_MAXCAMS-1] = NULL }; */ /* Developer's Guide Table 5 p 3-34 * indexed by [mains][sensorFps.baserate][sensorFps.divisor]*/ @@ -443,7 +255,10 @@ mem = vmalloc(size); if (!mem) - return NULL; + { + DBG("vmalloc not ok!\n"); + return NULL; + } memset(mem, 0, size); /* Clear the ram out, no junk to the user */ adr = (unsigned long) mem; @@ -460,7 +275,7 @@ else size = 0; } - + return mem; } @@ -503,7 +318,7 @@ struct cam_data *cam = data; char tmpstr[20]; - /* IMPORTANT: This output MUST be kept under PAGE_SIZE + /* IMPORTANT: This output MUST be kept under 4k (FIXME: PAGE_SIZE?) * or we need to get more sophisticated. */ out += sprintf(out, "read-only\n-----------------------\n"); @@ -550,8 +365,8 @@ cam->params.roi.rowStart*4, cam->params.roi.colEnd*8, cam->params.roi.rowEnd*4); - out += sprintf(out, "actual_fps: %3d\n", cam->fps); - out += sprintf(out, "transfer_rate: %4dkB/s\n", + out += sprintf(out, "actual_fps: %d\n", cam->fps); + out += sprintf(out, "transfer_rate: %dkB/s\n", cam->transfer_rate); out += sprintf(out, "\nread-write\n"); @@ -585,7 +400,7 @@ switch(cam->params.colourBalance.balanceMode) { case 1: - // FIXME case 3: + // FIXME case 3: sprintf(tmpstr, "manual"); break; case 2: @@ -706,7 +521,7 @@ break; } out += sprintf(out, " none,auto,manual auto\n"); - out += sprintf(out, "decimation_enable: %8s %8s %8s %8s\n", + out += sprintf(out, "decimation: %8s %8s %8s %8s\n", cam->params.compression.decimation == DECIMATION_ENAB ? "on":"off", "off", "off", "off"); @@ -1294,7 +1109,7 @@ } command_flags |= COMMAND_SETCOMPRESSION; FIND_END - } else if(MATCH("decimation_enable")) { + } else if(MATCH("decimation")) { FIND_VALUE if(!retval && MATCH("off")) { buffer += len; @@ -1359,7 +1174,7 @@ FIND_VALUE if(!retval) { val = VALUE } if(!retval) { - if(val <= 0xff) + if(retval <= 0xff) new_params.compressionParams.hysteresis=val; else retval = -EINVAL; } @@ -1369,7 +1184,7 @@ FIND_VALUE if(!retval) { val = VALUE } if(!retval) { - if(val <= 0xff) + if(retval <= 0xff) new_params.compressionParams.threshMax=val; else retval = -EINVAL; } @@ -1379,7 +1194,7 @@ FIND_VALUE if(!retval) { val = VALUE } if(!retval) { - if(val <= 0xff) + if(retval <= 0xff) new_params.compressionParams.smallStep=val; else retval = -EINVAL; } @@ -1389,7 +1204,7 @@ FIND_VALUE if(!retval) { val = VALUE } if(!retval) { - if(val <= 0xff) + if(retval <= 0xff) new_params.compressionParams.largeStep=val; else retval = -EINVAL; } @@ -1399,7 +1214,7 @@ FIND_VALUE if(!retval) { val = VALUE } if(!retval) { - if(val <= 0xff) + if(retval <= 0xff) new_params.compressionParams. decimationHysteresis = val; else retval = -EINVAL; @@ -1410,7 +1225,7 @@ FIND_VALUE if(!retval) { val = VALUE } if(!retval) { - if(val <= 0xff) + if(retval <= 0xff) new_params.compressionParams. frDiffStepThresh = val; else retval = -EINVAL; @@ -1421,18 +1236,18 @@ FIND_VALUE if(!retval) { val = VALUE } if(!retval) { - if(val <= 0xff) + if(retval <= 0xff) new_params.compressionParams. qDiffStepThresh = val; else retval = -EINVAL; - } command_flags |= COMMAND_SETCOMPRESSIONPARAMS; FIND_END } else if(MATCH("decimation_thresh_mod")) { + } FIND_VALUE if(!retval) { val = VALUE } if(!retval) { - if(val <= 0xff) + if(retval <= 0xff) new_params.compressionParams. decimationThreshMod = val; else retval = -EINVAL; @@ -1440,7 +1255,6 @@ command_flags |= COMMAND_SETCOMPRESSIONPARAMS; FIND_END } else { - DBG("No match found\n"); retval = -EINVAL; } } @@ -1488,7 +1302,7 @@ ent->data = cam; ent->read_proc = cpia_read_proc; ent->write_proc = cpia_write_proc; - ent->size = 3626; + ent->size = 3623; cam->proc_entry = ent; } @@ -2018,6 +1832,7 @@ *rgb = y1; return 4; default: + DBG("Empty: %d\n", out_fmt); return 0; } } @@ -2047,7 +1862,7 @@ /* make sure params don't change while we are decoding */ down(&cam->param_lock); - + obuf = cam->decompressed_frame.data; end_obuf = obuf+CPIA_MAX_FRAME_SIZE; ibuf = cam->raw_image; @@ -2116,11 +1931,13 @@ cam->params.status.errorCode = ibuf[39]; cam->fps = ibuf[41]; - ibuf += FRAME_HEADER_SIZE; - size -= FRAME_HEADER_SIZE; + ibuf += 64; + size -= 64; ll = ibuf[0] | (ibuf[1] << 8); ibuf += 2; + while(size > 0) { + size -= (ll+2); if(size < 0) { LOG("Insufficient data in buffer\n"); @@ -2129,8 +1946,9 @@ } while(ll > 1) { if(!compressed || (compressed && !(*ibuf & 1))) { - obuf += yuvconvert(ibuf, obuf, out_fmt, - in_uyvy, cam->mmap_kludge); + obuf += + yuvconvert(ibuf,obuf,out_fmt,in_uyvy, + cam->mmap_kludge); ibuf += 4; ll -= 4; } else { @@ -2305,102 +2123,93 @@ /* kernel thread function to read image from camera */ static void fetch_frame(void *data) { - int image_size, retry; + int image_size; struct cam_data *cam = (struct cam_data *)data; unsigned long oldjif, rate, diff; - - /* Allow up to two bad images in a row to be read and - * ignored before an error is reported */ - for(retry=0; retry<3; ++retry) { - if(retry != 0) { - DBG("retry=%d\n", retry); - } - /* load first frame always uncompressed */ - if( cam->first_frame && - cam->params.compression.mode != CPIA_COMPRESSION_NONE ) { - DBG("first frame\n"); - do_command(cam, CPIA_COMMAND_SetCompression, - CPIA_COMPRESSION_NONE, - NO_DECIMATION, 0, 0); - } - - /* init camera upload */ - if(do_command(cam, CPIA_COMMAND_SetGrabMode, CPIA_GRAB_CONTINUOUS, - 0, 0, 0)) continue; - if(do_command(cam, CPIA_COMMAND_GrabFrame, 0, - cam->params.streamStartLine, 0, 0)) continue; + /* load first frame always uncompressed */ + if( cam->first_frame && + cam->params.compression.mode != CPIA_COMPRESSION_NONE ) { + do_command(cam, CPIA_COMMAND_SetCompression, + CPIA_COMPRESSION_NONE, + NO_DECIMATION, 0, 0); + } + + /* init camera upload */ + + if(do_command(cam, CPIA_COMMAND_SetGrabMode, CPIA_GRAB_CONTINUOUS, + 0, 0, 0)) goto end; + if(do_command(cam, CPIA_COMMAND_GrabFrame, 0, + cam->params.streamStartLine, 0, 0)) goto end; + + /* loop until image ready */ + +/* do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); */ +/* while(cam->params.status.streamState != STREAM_READY) { */ +/* DBG("loop: %d\n", cam->params.status.streamState); */ +/* if(current->need_resched) {schedule();} */ +/* current->state=TASK_INTERRUPTIBLE; */ +/* schedule_timeout(10*HZ/1000); /* 10 ms, hopefully ;) * / */ +/* if(signal_pending(current)) { */ +/* goto end; */ +/* } */ +/* do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); */ +/* } */ + + /* grab image from camera */ + if(current->need_resched) {schedule();} + oldjif = jiffies; + image_size=cam->ops->streamRead(cam->lowlevel_data, cam->raw_image, 0); + if(image_size<=0) { + DBG("read frame failed\n"); + goto end; + } + rate = image_size * HZ / 1024; + diff = jiffies-oldjif; + cam->transfer_rate = diff==0 ? rate : rate/diff; + /* diff==0 ? unlikely but possible */ - /* loop until image ready */ - do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); - while(cam->params.status.streamState != STREAM_READY) { - if(current->need_resched) {schedule();} - current->state=TASK_INTERRUPTIBLE; - schedule_timeout(10*HZ/1000); /* 10 ms, hopefully ;) */ - if(signal_pending(current)) { - return; - } - do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); - } - - /* grab image from camera */ - if(current->need_resched) {schedule();} - oldjif = jiffies; - image_size=cam->ops->streamRead(cam->lowlevel_data, - cam->raw_image, 0); - if(image_size<=0) { - DBG("streamRead failed: %d\n", image_size); - continue; - } - rate = image_size * HZ / 1024; - diff = jiffies-oldjif; - cam->transfer_rate = diff==0 ? rate : rate/diff; - /* diff==0 ? unlikely but possible */ - - /* camera idle now so dispatch queued commands */ - dispatch_commands( cam ); - - /* Update our knowledge of the camera state - FIXME: necessary? */ - do_command(cam, CPIA_COMMAND_GetColourBalance, 0, 0, 0, 0); - do_command(cam, CPIA_COMMAND_GetExposure, 0, 0, 0, 0); + /* camera idle now so dispatch queued commands */ + dispatch_commands( cam ); - /* decompress and convert image to by copying it from - * raw_image to decompressed_frame - */ - if(current->need_resched) {schedule();} - cam->image_size = parse_picture(cam, image_size); - if( cam->image_size <= 0 ) { - DBG("parse_picture failed %d\n", cam->image_size); - } else { - break; - } + /* Update our knowledge of the camera state - FIXME: necessary? */ + do_command(cam, CPIA_COMMAND_GetColourBalance, 0, 0, 0, 0); + do_command(cam, CPIA_COMMAND_GetExposure, 0, 0, 0, 0); + + /* decompress and convert image to by copying it from + * raw_image to decompressed_frame + */ + if(current->need_resched) {schedule();} + cam->image_size = parse_picture(cam, image_size); + if( cam->image_size <= 0 ) { + DBG("parse frame failed\n"); + goto end; } - if(retry < 3) { - /* FIXME: this only works for double buffering */ - if( cam->frame[cam->curframe].state == FRAME_READY ) { - memcpy(cam->frame[cam->curframe].data, - cam->decompressed_frame.data, - cam->decompressed_frame.count); - cam->frame[cam->curframe].state = FRAME_DONE; - } else { - cam->decompressed_frame.state = FRAME_DONE; - } + /* FIXME: this only works for double buffering */ + if( cam->frame[cam->curframe].state == FRAME_READY ) { + memcpy(cam->frame[cam->curframe].data, + cam->decompressed_frame.data, + cam->decompressed_frame.count); + cam->frame[cam->curframe].state = FRAME_DONE; + } else { + cam->decompressed_frame.state = FRAME_DONE; + } #if 0 - if( cam->first_frame && - cam->params.compression.mode != CPIA_COMPRESSION_NONE ) { - cam->first_frame = 0; - cam->cmd_queue |= COMMAND_SETCOMPRESSION; - } + if( cam->first_frame && + cam->params.compression.mode != CPIA_COMPRESSION_NONE ) { + cam->first_frame = 0; + cam->cmd_queue |= COMMAND_SETCOMPRESSION; + } #else - if( cam->first_frame ) { - cam->first_frame = 0; - cam->cmd_queue |= COMMAND_SETCOMPRESSION; - cam->cmd_queue |= COMMAND_SETEXPOSURE; - } -#endif + if( cam->first_frame ) { + cam->first_frame = 0; + cam->cmd_queue |= COMMAND_SETCOMPRESSION; + cam->cmd_queue |= COMMAND_SETEXPOSURE; } +#endif +end: return; } @@ -2420,10 +2229,10 @@ (exposure, color balance, ...) */ if(cam->first_frame) { - cam->curframe = vm->frame; - cam->frame[cam->curframe].state = FRAME_READY; - fetch_frame(cam); - if(cam->frame[cam->curframe].state != FRAME_DONE) retval=-EIO; + cam->curframe = vm->frame; + cam->frame[cam->curframe].state = FRAME_READY; + fetch_frame(cam); + if(cam->frame[cam->curframe].state != FRAME_DONE) retval=-EIO; } cam->curframe = vm->frame; cam->frame[cam->curframe].state = FRAME_READY; @@ -2565,9 +2374,8 @@ if(cam->params.version.firmwareVersion != 1) { return -ENODEV; } - - /* The fatal error checking should be done after - * the camera powers up (developer's guide p 3-38) */ + + /* The fatal error checking should be done after the camera powers up (developer's guide p 3-38) */ /* Set streamState before transition to high power to avoid bug * in firmware 1-02 */ @@ -2578,14 +2386,13 @@ if(goto_high_power(cam)) return -ENODEV; + /* Check the camera status */ if(do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0)) return -EIO; if(cam->params.status.fatalError) { - DBG("fatal_error: %#04x\n", - cam->params.status.fatalError); - DBG("vp_status: %#04x\n", - cam->params.status.vpStatus); + DBG("fatal_error: %#04x\n",cam->params.status.fatalError); + DBG("vp_status: %#04x\n",cam->params.status.vpStatus); if(cam->params.status.fatalError & ~(COM_FLAG|CPIA_FLAG)) { /* Fatal error in camera */ return -EIO; @@ -2596,7 +2403,7 @@ FATALERROR, ~(COM_FLAG|CPIA_FLAG), 0, 0); } } - + /* Check the camera status again */ if(cam->params.status.fatalError) { if(cam->params.status.fatalError) @@ -2619,10 +2426,14 @@ int i; struct cam_data *cam = dev->priv; - DBG("cpia_open\n"); - + if (cam == NULL) + { + DBG("Internal error, cam_data not found!\n"); + return -EBUSY; + } + if(cam->open_count > 0) { - DBG("Camera[%d] already open\n",cam->index); + DBG("Camera already open\n"); return -EBUSY; } @@ -2641,7 +2452,7 @@ } /* open cpia */ - if (cam->ops->open(cam->index, &cam->lowlevel_data)) { + if (cam->ops->open(cam->lowlevel_data)) { rvfree(cam->decompressed_frame.data, CPIA_MAX_FRAME_SIZE); cam->decompressed_frame.data=NULL; rvfree(cam->raw_image, CPIA_MAX_IMAGE_SIZE); @@ -2675,66 +2486,32 @@ return 0; } -/* FIXME */ static void cpia_close(struct video_device *dev) { struct cam_data *cam; - DBG("cpia_close\n"); cam = dev->priv; - if(cam->ops == NULL) { - if(--cam->open_count == 0) { - int i; - video_unregister_device(dev); - /* Need a lock when adding/removing cameras */ - lock_kernel(); - if(cam->raw_image) { - rvfree(cam->raw_image, CPIA_MAX_IMAGE_SIZE); - cam->raw_image=0; - } - if(cam->decompressed_frame.data) { - rvfree(cam->decompressed_frame.data, - CPIA_MAX_FRAME_SIZE); - cam->decompressed_frame.data=0; - } - if(cam->frame_buf) { - free_frame_buf(cam); - } - for(i=0; iproc_entry->uid = 0; + if (cam->ops != NULL) { + /* Return ownership of /proc/cpia/videoX to root */ + cam->proc_entry->uid = 0; - /* save camera state for later open (developers guide ch 3.5.3) */ - save_camera_state(cam); + /* save camera state for later open (developers guide ch 3.5.3) */ + save_camera_state(cam); - /* GotoLoPower */ - goto_low_power(cam); + /* GotoLoPower */ + goto_low_power(cam); - /* Update the camera ststus */ - do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); - - /* cleanup internal state stuff */ - free_frames(cam->frame); + /* Update the camera ststus */ + do_command(cam, CPIA_COMMAND_GetCameraStatus, 0, 0, 0, 0); - /* close cpia */ - cam->ops->close(cam->lowlevel_data); + /* cleanup internal state stuff */ + free_frames(cam->frame); - if(--cam->open_count == 0) { + /* close cpia */ + cam->ops->close(cam->lowlevel_data); + } + if(--cam->open_count == 0) { /* clean up capture-buffers */ if(cam->raw_image) { rvfree(cam->raw_image, CPIA_MAX_IMAGE_SIZE); @@ -2747,6 +2524,10 @@ if(cam->frame_buf) { free_frame_buf(cam); } + if(cam->ops == NULL) { + video_unregister_device(dev); + kfree(cam); + } } @@ -2761,7 +2542,9 @@ { struct cam_data *cam = dev->priv; - /* make this _really_ smp and multithread safe */ + DBG("go!\n"); + + /* make this _really_ smp and multithredi-safe */ if( down_interruptible(&cam->busy_lock) ) { return -EINTR; } @@ -2796,7 +2579,7 @@ /* copy data to user space */ if(cam->decompressed_frame.count > count) { - DBG("count wrong\n"); + DBG("count wrong: %d, %d\n", cam->decompressed_frame.count, count); up(&cam->busy_lock); return -EFAULT; } @@ -3025,7 +2808,7 @@ retval = -EFAULT; break; } -#if 0 +#if 1 DBG("VIDIOCMCAPTURE: %d / %d / %dx%d\n", vm.format, vm.frame, vm.width, vm.height); #endif @@ -3281,7 +3064,8 @@ cam->params.compressionParams.decimationThreshMod = 2; /* End of default values from Software Developer's Guide */ - cam->transfer_rate = 0; + /* Start with a reasonable transfer rate */ + cam->transfer_rate = 500; /* Set Sensor FPS to 15fps. This seems better than 30fps * for indoor lighting. */ @@ -3308,7 +3092,7 @@ cam->vp.contrast = 32768; /* 50% */ cam->vp.whiteness = 0; /* not used -> grayscale only */ cam->vp.depth = 0; /* FIXME: to be set by user? */ - cam->vp.palette = 0; /* FIXME: to be set by user? */ + cam->vp.palette = VIDEO_PALETTE_RGB24; /* FIXME: to be set by user? */ cam->vw.x = 0; cam->vw.y = 0; @@ -3359,103 +3143,86 @@ return; } -int cpia_register_camera(struct cpia_camera_ops *ops) +struct cam_data *cpia_register_camera(struct cpia_camera_ops *ops, void *lowlevel) { - int i; + struct cam_data *camera; + /* Need a lock when adding/removing cameras. This doesn't happen * often and doesn't take very long, so grabbing the kernel lock * should be OK. */ - lock_kernel(); - for(i=0; i < CPIA_MAXCAMS && camera[i] != NULL; ++i); /* no loop body */ - if(i == CPIA_MAXCAMS) { - unlock_kernel(); - return -ENODEV; - } - if((camera[i] = kmalloc(sizeof(struct cam_data), GFP_KERNEL)) == NULL) { + if((camera = kmalloc(sizeof(struct cam_data), GFP_KERNEL)) == NULL) { unlock_kernel(); - return -ENOMEM; + return NULL; } - init_camera_struct( camera[i], ops ); - camera[i]->index = i; - + init_camera_struct( camera, ops ); + camera->lowlevel_data = lowlevel; + /* register v4l device */ - if (video_register_device(&camera[i]->vdev, VFL_TYPE_GRABBER) == -1) { - kfree(camera[i]); - camera[i] = NULL; + if (video_register_device(&camera->vdev, VFL_TYPE_GRABBER) == -1) { + kfree(camera); unlock_kernel(); printk(KERN_DEBUG "video_register_device failed\n"); - return -ENODEV; + return NULL; } - unlock_kernel(); - /* get version information from camera: open/reset/close */ /* open cpia */ - if (camera[i]->ops->open(camera[i]->index, &camera[i]->lowlevel_data)) { - return -ENXIO; + if (camera->ops->open(camera->lowlevel_data)) { + return camera; } /* reset the camera */ - if(reset_camera(camera[i]) != 0) { - camera[i]->ops->close(camera[i]->lowlevel_data); - return -ENXIO; + if(reset_camera(camera) != 0) { + camera->ops->close(camera->lowlevel_data); + return camera; } /* close cpia */ - camera[i]->ops->close(camera[i]->lowlevel_data); + camera->ops->close(camera->lowlevel_data); + camera->ops->open(camera->lowlevel_data); + camera->ops->close(camera->lowlevel_data); + printk(KERN_INFO " CPiA Version: %d.%02d (%d.%d)\n", - camera[i]->params.version.firmwareVersion, - camera[i]->params.version.firmwareRevision, - camera[i]->params.version.vcVersion, - camera[i]->params.version.vcRevision); + camera->params.version.firmwareVersion, + camera->params.version.firmwareRevision, + camera->params.version.vcVersion, + camera->params.version.vcRevision); printk(KERN_INFO " CPiA PnP-ID: %04x:%04x:%04x\n", - camera[i]->params.pnpID.vendor, - camera[i]->params.pnpID.product, - camera[i]->params.pnpID.deviceRevision); + camera->params.pnpID.vendor, + camera->params.pnpID.product, + camera->params.pnpID.deviceRevision); printk(KERN_INFO " VP-Version: %d.%d %04x\n", - camera[i]->params.vpVersion.vpVersion, - camera[i]->params.vpVersion.vpRevision, - camera[i]->params.vpVersion.cameraHeadID); + camera->params.vpVersion.vpVersion, + camera->params.vpVersion.vpRevision, + camera->params.vpVersion.cameraHeadID); - return i; + return camera; } -void cpia_unregister_camera(int camnr) +void cpia_unregister_camera(struct cam_data *cam) { - struct cam_data *cam; - if(camnr >= CPIA_MAXCAMS || camera[camnr] == NULL) return; - cam = camera[camnr]; - From Jochen.Scharrlach@schwaben.de Wed, 26 Jan 2000 22:09:03 +0100 (CET) Date: Wed, 26 Jan 2000 22:09:03 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB - First Contact (2/2) if(cam->open_count == 0) { DBG("unregistering video\n"); video_unregister_device(&cam->vdev); } else { LOG("/dev/video%d removed while open, " "deferring video_unregister_device\n", cam->vdev.minor); + DBG("camera open -- setting ops to NULL\n"); + cam->ops = NULL; } - /* Need a lock when adding/removing cameras. This doesn't happen - * often and doesn't take very long, so grabbing the kernel lock - * should be OK. */ - lock_kernel(); - #ifdef CONFIG_PROC_FS DBG("destroying /proc/cpia/video%d\n", cam->vdev.minor); destroy_proc_cpia_cam(cam); #endif if(cam->open_count == 0) { DBG("freeing camera\n"); - kfree(camera[camnr]); - camera[camnr] = NULL; - } else { - DBG("camera open -- setting ops to NULL\n"); - cam->ops = NULL; + kfree(cam); } - unlock_kernel(); } /**************************************************************************** --- cpia-0.6.0/module/cpia.h Sat Jan 22 18:43:05 2000 +++ cpia-usb/module/cpia.h Sun Jan 23 21:25:04 2000 @@ -26,12 +26,33 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_KMOD +#include +#endif + #define CPIA_MAJ_VER 0 -#define CPIA_MIN_VER 6 +#define CPIA_MIN_VER 5 #define CPIA_PATCH_VER 0 #define CPIA_PP_MAJ_VER 0 -#define CPIA_PP_MIN_VER 6 +#define CPIA_PP_MIN_VER 5 #define CPIA_PP_PATCH_VER 0 #define CPIA_MAX_FRAME_SIZE_UNALIGNED (352 * 288 * 4) /* CIF at RGB32 */ @@ -46,7 +67,7 @@ /* open sets privdata to point to structure for this camera. * Returns negative value on error, otherwise 0. */ - int (*open)(int camnr, void **privdata); + int (*open)(void *privdata); /* Registers callback function cb to be called with cbdata * when an image is ready. If cb is NULL, only single image grabs @@ -88,13 +109,184 @@ int (*close)(void *privdata); }; +struct cpia_frame { + u8 *data; + int count; + int width; + int height; + volatile int state; +}; + +struct cam_params { + struct { + u8 firmwareVersion; + u8 firmwareRevision; + u8 vcVersion; + u8 vcRevision; + } version; + struct { + u16 vendor; + u16 product; + u16 deviceRevision; + } pnpID; + struct { + u8 vpVersion; + u8 vpRevision; + u16 cameraHeadID; + } vpVersion; + struct { + u8 systemState; + u8 grabState; + u8 streamState; + u8 fatalError; + u8 cmdError; + u8 debugFlags; + u8 vpStatus; + u8 errorCode; + } status; + struct { + u8 brightness; + u8 contrast; + u8 saturation; + } colourParams; + struct { + u8 gainMode; + u8 expMode; + u8 compMode; + u8 centreWeight; + u8 gain; + u8 fineExp; + u8 coarseExpLo; + u8 coarseExpHi; + u8 redComp; + u8 green1Comp; + u8 green2Comp; + u8 blueComp; + } exposure; + struct { + u8 balanceMode; + u8 redGain; + u8 greenGain; + u8 blueGain; + } colourBalance; + struct { + u8 divisor; + u8 baserate; + } sensorFps; + struct { + u8 gain1; + u8 gain2; + u8 gain4; + u8 gain8; + } apcor; + struct { + u8 flickerMode; + u8 coarseJump; + u8 allowableOverExposure; + } flickerControl; + struct { + u8 gain1; + u8 gain2; + u8 gain4; + u8 gain8; + } vlOffset; + struct { + u8 mode; + u8 decimation; + } compression; + struct { + u8 frTargeting; + u8 targetFR; + u8 targetQ; + } compressionTarget; + struct { + u8 yThreshold; + u8 uvThreshold; + } yuvThreshold; + struct { + u8 hysteresis; + u8 threshMax; + u8 smallStep; + u8 largeStep; + u8 decimationHysteresis; + u8 frDiffStepThresh; + u8 qDiffStepThresh; + u8 decimationThreshMod; + } compressionParams; + struct { + u8 videoSize; /* CIF/QCIF */ + u8 subSample; + u8 yuvOrder; + } format; + struct { + u8 colStart; /* skip first 8*colStart pixels */ + u8 colEnd; /* finish at 8*colEnd pixels */ + u8 rowStart; /* skip first 4*rowStart lines */ + u8 rowEnd; /* finish at 4*rowEnd lines */ + } roi; + u8 ecpTiming; + u8 streamStartLine; +}; + +enum v4l_camstates { + CPIA_V4L_IDLE = 0, + CPIA_V4L_ERROR, + CPIA_V4L_COMMAND, + CPIA_V4L_GRABBING, + CPIA_V4L_STREAMING, + CPIA_V4L_STREAMING_PAUSED, +}; + +#define FRAME_NUM 2 /* double buffering for now */ + +struct cam_data { + struct cam_data **previous; + struct cam_data *next; + + struct semaphore busy_lock; /* guard against SMP multithreading */ + struct cpia_camera_ops *ops; /* lowlevel driver operations */ + void *lowlevel_data; /* private data for lowlevel driver */ + u8 *raw_image; /* buffer for raw image data */ + struct cpia_frame decompressed_frame; + /* buffer to hold decompressed frame */ + int image_size; /* sizeof last decompressed image */ + int open_count; /* # of process that have camera open */ + + /* camera status */ + int fps; /* actual fps reported by the camera */ + int transfer_rate; /* transfer rate from camera in kB/s */ + u8 mainsFreq; /* for flicker control */ + + /* proc interface */ + struct semaphore param_lock; /* params lock for this camera */ + struct cam_params params; /* camera settings */ + struct proc_dir_entry *proc_entry; /* /proc/cpia/videoX */ + + /* v4l */ + int video_size; /* VIDEO_SIZE_ */ + volatile enum v4l_camstates camstate; /* v4l layer status */ + struct video_device vdev; /* v4l videodev */ + struct video_picture vp; /* v4l camera settings */ + struct video_window vw; /* v4l capture area */ + + /* mmap interface */ + int curframe; /* the current frame to grab into */ + u8 *frame_buf; /* frame buffer data */ + struct cpia_frame frame[FRAME_NUM]; + /* FRAME_NUM-buffering, so we need a array */ + + int first_frame; + int mmap_kludge; /* 'wrong' byte order for mmap */ + volatile u32 cmd_queue; /* queued commands */ +}; + /* cpia_register_camera is called by low level driver for each camera. * A unique camera number is returned, or a negative value on error */ -int cpia_register_camera(struct cpia_camera_ops *ops); +struct cam_data *cpia_register_camera(struct cpia_camera_ops *ops, void *lowlevel); /* cpia_unregister_camera is called by low level driver when a camera * is removed. This must not fail. */ -void cpia_unregister_camera(int camnr); +void cpia_unregister_camera(struct cam_data *cam); #define CPIA_MAXCAMS 4 @@ -134,7 +326,6 @@ #define DECIMATION_ENAB 1 #define EOI 0xff /* End Of Image */ #define EOL 0xfd /* End Of Line */ -#define FRAME_HEADER_SIZE 64 /* Image grab modes */ #define CPIA_GRAB_SINGLE 0 @@ -216,6 +407,38 @@ DBG("%1d %1d %1d %1d %1d %1d %1d %1d \n",\ (p)&0x80?1:0, (p)&0x40?1:0, (p)&0x20?1:0, (p)&0x10?1:0,\ (p)&0x08?1:0, (p)&0x04?1:0, (p)&0x02?1:0, (p)&0x01?1:0); + +#define ADD_TO_LIST(l, drv) \ + {\ + lock_kernel();\ + (drv)->next = l;\ + (drv)->previous = &(l);\ + (l) = drv;\ + unlock_kernel();\ + } while(0) + +#define REMOVE_FROM_LIST(drv) \ + {\ + if ((drv)->previous != NULL) {\ + lock_kernel();\ + if ((drv)->next != NULL)\ + (drv)->next->previous = (drv)->previous;\ + *((drv)->previous) = (drv)->next;\ + (drv)->previous = NULL;\ + (drv)->next = NULL;\ + unlock_kernel();\ + }\ + } while (0) + +#define SEARCH_LIST(l, attr, i, ret) \ + {\ + lock_kernel();\ + for (ret=l; ret != NULL && ret->lowlevel_data->attr != i; \ + ret = ret->next); /* empty body */ \ + unlock_kernel();\ + } while (0) + + #endif /* __KERNEL__ */ --Multipart_Wed_Jan_26_22:09:03_2000-1 Content-Type: application/octet-stream Content-Disposition: attachment; filename="cpia_usb.c" Content-Transfer-Encoding: 7bit #include #include #include #include #include #include #include #include "cpia.h" #include "/usr/src/linux/drivers/usb/usb.h" #define USB_REQ_CPIA_GRAB_FRAME 0xC1 #define USB_REQ_CPIA_UPLOAD_FRAME 0xC2 #define WAIT_FOR_NEXT_FRAME 0 #define FORCE_FRAME_UPLOAD 1 #define FRAMES_PER_DESC 10 #define FRAME_SIZE_PER_DESC 960 /* Shouldn't be hardcoded */ #define CPIA_NUMSBUF 2 #define STREAM_BUF_SIZE (PAGE_SIZE * 4) #define SCRATCH_BUF_SIZE (STREAM_BUF_SIZE * 2) struct cpia_sbuf { char *data; urb_t *urb; }; #define FRAMEBUF_LEN (CPIA_MAX_FRAME_SIZE+100) enum framebuf_status { FRAME_EMPTY, FRAME_READING, FRAME_READY, }; struct framebuf { int length; enum framebuf_status status; u8 data[FRAMEBUF_LEN]; struct framebuf *next; }; struct usb_cpia { /* Device structure */ struct usb_device *dev; unsigned char iface; wait_queue_head_t wq_stream; int cursbuf; /* Current receiving sbuf */ struct cpia_sbuf sbuf[CPIA_NUMSBUF]; /* Double buffering */ /* u8 *buffer; */ /* int buffer_length; */ /* int buffer_maxlength; */ /* unsigned char scratch[SCRATCH_BUF_SIZE]; */ /* int scratchlen; */ int streaming; struct framebuf *buffers[3]; struct framebuf *curbuff, *workbuff; }; static int cpia_usb_open(void *privdata); static int cpia_usb_registerCallback(void *privdata, void (*cb) (void *cbdata), void *cbdata); static int cpia_usb_transferCmd(void *privdata, u8 *command, u8 *data); static int cpia_usb_streamStart(void *privdata); static int cpia_usb_streamStop(void *privdata); static int cpia_usb_streamRead(void *privdata, u8 *frame, int noblock); static int cpia_usb_close(void *privdata); #define ABOUT "USB driver for Vision CPiA based cameras" static struct cpia_camera_ops cpia_usb_ops = { cpia_usb_open, cpia_usb_registerCallback, cpia_usb_transferCmd, cpia_usb_streamStart, cpia_usb_streamStop, cpia_usb_streamRead, cpia_usb_close }; static struct cam_data *cam_list; static void cpia_usb_complete(struct urb *urb) { int i; char *cdata; struct usb_cpia *cpia = (struct usb_cpia *) urb->context; if (cpia->workbuff->status == FRAME_EMPTY) { cpia->workbuff->status = FRAME_READING; cpia->workbuff->length = 0; } for (i = 0; i < urb->number_of_packets; i++) { int n = urb->iso_frame_desc[i].actual_length; int st = urb->iso_frame_desc[i].status; cdata = urb->transfer_buffer + urb->iso_frame_desc[i].offset; if (st) printk(KERN_DEBUG "cpia data error: [%d] len=%d, status=%X\n", i, n, st); if (FRAMEBUF_LEN < cpia->workbuff->length+n) { printk(KERN_DEBUG "cpia: scratch buf overflow!scr_len: %d, n: %d\n",cpia->workbuff->length, n ); return; } if (n) { if (cpia->workbuff->length >0 || (0x19 == cdata[0] && 0x68 == cdata[1])) { memcpy(cpia->workbuff->data+cpia->workbuff->length, cdata, n); cpia->workbuff->length += n; } else DBG ("Ignoring packet!\n"); } else { if (cpia->workbuff->length > 4 && 0xff == cpia->workbuff->data[cpia->workbuff->length-1] && 0xff == cpia->workbuff->data[cpia->workbuff->length-2] && 0xff == cpia->workbuff->data[cpia->workbuff->length-3] && 0xff == cpia->workbuff->data[cpia->workbuff->length-4]) { cpia->workbuff->status = FRAME_READY; cpia->curbuff = cpia->workbuff; cpia->workbuff = cpia->workbuff->next; cpia->workbuff->status = FRAME_EMPTY; cpia->workbuff->length = 0; if (waitqueue_active(&cpia->wq_stream)) { wake_up_interruptible(&cpia->wq_stream); } } } } } static int cpia_usb_open(void *privdata) { struct usb_cpia *cpia = (struct usb_cpia *) privdata; urb_t *urb; int fx, err; if (cpia == NULL) return -EINVAL; cpia->sbuf[0].data = kmalloc (FRAMES_PER_DESC * FRAME_SIZE_PER_DESC, GFP_KERNEL); if (!cpia->sbuf[0].data) return -EINVAL; cpia->sbuf[1].data = kmalloc (FRAMES_PER_DESC * FRAME_SIZE_PER_DESC, GFP_KERNEL); if (!cpia->sbuf[1].data) { kfree (cpia->sbuf[0].data); return -EINVAL; } if (usb_set_interface(cpia->dev, cpia->iface, 3) < 0) { printk(KERN_ERR "usb_set_interface error\n"); kfree (cpia->sbuf[0].data); kfree (cpia->sbuf[1].data); return -EBUSY; } cpia->buffers[0]->status = FRAME_EMPTY; cpia->buffers[0]->length = 0; cpia->buffers[1]->status = FRAME_EMPTY; cpia->buffers[1]->length = 0; cpia->buffers[2]->status = FRAME_EMPTY; cpia->buffers[2]->length = 0; cpia->curbuff = cpia->buffers[0]; cpia->workbuff = cpia->buffers[1]; /* We double buffer the Iso lists */ // err = usb_init_isoc(dev, usb_rcvisocpipe(dev, 1), FRAMES_PER_DESC, cpia, &cpia->sbuf[0].isodesc); urb = usb_alloc_urb(FRAMES_PER_DESC); if (!urb) { printk(KERN_ERR "cpia_init_isoc: usb_init_isoc ret %d\n", 0); kfree (cpia->sbuf[0].data); kfree (cpia->sbuf[1].data); return -ENOMEM; } cpia->sbuf[0].urb = urb; urb->dev = cpia->dev; urb->context = cpia; urb->pipe = usb_rcvisocpipe(cpia->dev, 1); urb->transfer_flags = USB_ISO_ASAP; urb->transfer_buffer = cpia->sbuf[0].data; urb->complete = cpia_usb_complete; urb->number_of_packets = FRAMES_PER_DESC; urb->transfer_buffer_length = FRAME_SIZE_PER_DESC * FRAMES_PER_DESC; for (fx = 0; fx < FRAMES_PER_DESC; fx++) { urb->iso_frame_desc[fx].offset = FRAME_SIZE_PER_DESC * fx; urb->iso_frame_desc[fx].length = FRAME_SIZE_PER_DESC; } urb = usb_alloc_urb(FRAMES_PER_DESC); if (!urb) { printk(KERN_ERR "cpia_init_isoc: usb_init_isoc ret %d\n", 0); kfree (cpia->sbuf[0].data); kfree (cpia->sbuf[1].data); return -ENOMEM; } cpia->sbuf[1].urb = urb; urb->dev = cpia->dev; urb->context = cpia; urb->pipe = usb_rcvisocpipe(cpia->dev, 1); urb->transfer_flags = USB_ISO_ASAP; urb->transfer_buffer = cpia->sbuf[1].data; urb->complete = cpia_usb_complete; urb->number_of_packets = FRAMES_PER_DESC; urb->transfer_buffer_length = FRAME_SIZE_PER_DESC * FRAMES_PER_DESC; for (fx = 0; fx < FRAMES_PER_DESC; fx++) { urb->iso_frame_desc[fx].offset = FRAME_SIZE_PER_DESC * fx; urb->iso_frame_desc[fx].length = FRAME_SIZE_PER_DESC; } cpia->sbuf[1].urb->next = cpia->sbuf[0].urb; cpia->sbuf[0].urb->next = cpia->sbuf[1].urb; err = usb_submit_urb(cpia->sbuf[0].urb); if (err) printk(KERN_ERR "cpia_init_isoc: usb_run_isoc(0) ret %d\n", err); err = usb_submit_urb(cpia->sbuf[1].urb); if (err) printk(KERN_ERR "cpia_init_isoc: usb_run_isoc(1) ret %d\n", err); cpia->streaming = 1; return 0; } // // convenience functions // /**************************************************************************** * * WritePacket * ***************************************************************************/ static int WritePacket(struct usb_device *cam, const u8 *packet) { if (packet == NULL) { return -EINVAL; } return usb_control_msg(cam, usb_sndctrlpipe(cam, 0), packet[1] + (packet[0] << 8), USB_TYPE_VENDOR | USB_RECIP_DEVICE, packet[2] + (packet[3] << 8), packet[4] + (packet[5] << 8), NULL, 0, HZ); } /**************************************************************************** * * ReadPacket * ***************************************************************************/ static int ReadPacket(struct usb_device *cam, u8 *packet, u8 *buf, size_t size) { if (packet == NULL || size <= 0) { return -EINVAL; } return usb_control_msg(cam, usb_rcvctrlpipe(cam, 0), packet[1] + (packet[0] << 8), USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, packet[2] + (packet[3] << 8), packet[4] + (packet[5] << 8), buf, size, HZ); } static int cpia_usb_transferCmd(void *privdata, u8 *command, u8 *data) { int err=0; int databytes; struct usb_device *cam = ((struct usb_cpia*)privdata)->dev; if(cam == NULL) { DBG("Internal driver error: cam is NULL\n"); return -EINVAL; } if(command == NULL) { DBG("Internal driver error: command is NULL\n"); return -EINVAL; } databytes = (((int)command[7])<<8) | command[6]; if(command[0] == DATA_IN) { u8 buffer[8]; if(data == NULL) { DBG("Internal driver error: data is NULL\n"); return -EINVAL; } err = ReadPacket(cam, command, buffer, 8); if(err < 0) { return err; } memcpy(data, buffer, databytes); } else if(command[0] == DATA_OUT) { WritePacket(cam, command); } else { DBG("Unexpected first byte of command: %x\n", command[0]); err = -EINVAL; } return 0; } static int cpia_usb_registerCallback(void *privdata, void (*cb) (void *cbdata), void *cbdata) { return -ENODEV; } static int cpia_usb_streamStart(void *privdata) { return -ENODEV; } static int cpia_usb_streamStop(void *privdata) { return -ENODEV; } static int cpia_usb_streamRead(void *privdata, u8 *frame, int noblock) { struct usb_cpia *cpia = (struct usb_cpia *) privdata; struct framebuf *mybuff; if (cpia->curbuff->status != FRAME_READY) { interruptible_sleep_on(&cpia->wq_stream); } else DBG ("Frame already waiting!\n"); mybuff = cpia->curbuff; if (mybuff->status != FRAME_READY || mybuff->length < 4) { DBG ("Something went wrong!\n"); return -1; } memcpy (frame, mybuff->data, mybuff->length); mybuff->status = FRAME_EMPTY; /* DBG("read done, %d bytes, Header: %x/%x, Footer: %x%x%x%x\n", */ /* mybuff->length, frame[0], frame[1], */ /* frame[mybuff->length-4], frame[mybuff->length-3], */ /* frame[mybuff->length-2], frame[mybuff->length-1]); */ return mybuff->length; } static int cpia_usb_close(void *privdata) { struct usb_cpia *cpia = (struct usb_cpia *) privdata; if (!cpia->streaming) return 0; /* Set packet size to 0 */ if (usb_set_interface(cpia->dev, cpia->iface, 0) < 0) { printk(KERN_ERR "usb_set_interface error\n"); return -EINVAL; } /* Unschedule all of the iso td's */ usb_unlink_urb(cpia->sbuf[1].urb); usb_unlink_urb(cpia->sbuf[0].urb); cpia->streaming = 0; /* Delete them all */ usb_free_urb(cpia->sbuf[1].urb); usb_free_urb(cpia->sbuf[0].urb); return 0; } int cpia_usb_init(void) { /* return -ENODEV; */ return 0; } // // Probing and initializing // static void * cpia_probe(struct usb_device *dev, unsigned int ifnum) { struct usb_interface_descriptor *interface; struct usb_cpia *cpia; struct cam_data *cam; /* We don't handle multi-config cameras */ if (dev->descriptor.bNumConfigurations != 1) return NULL; interface = &dev->actconfig->interface[ifnum].altsetting[0]; /* Is it a CPiA? */ if (dev->descriptor.idVendor != 0x0553) return NULL; if (dev->descriptor.idProduct != 0x0002) return NULL; /* Checking vendor/product should be enough, but what the hell */ if (interface->bInterfaceClass != 0xFF) return NULL; if (interface->bInterfaceSubClass != 0x00) return NULL; /* We found a CPiA */ printk(KERN_INFO "USB CPiA camera found\n"); if ((cpia = kmalloc(sizeof(*cpia), GFP_KERNEL)) == NULL) { printk(KERN_ERR "couldn't kmalloc cpia struct\n"); return NULL; } memset(cpia, 0, sizeof(*cpia)); cpia->dev = dev; cpia->iface = interface->bInterfaceNumber; init_waitqueue_head(&cpia->wq_stream); cpia->buffers[0] = vmalloc(sizeof(struct framebuf)); cpia->buffers[1] = vmalloc(sizeof(struct framebuf)); cpia->buffers[2] = vmalloc(sizeof(struct framebuf)); if (cpia->buffers[0] == NULL || cpia->buffers[1] == NULL || cpia->buffers[2] == NULL) { printk(KERN_ERR "couldn't kmalloc frame buffers\n"); return NULL; } cpia->buffers[0]->next = cpia->buffers[1]; cpia->buffers[1]->next = cpia->buffers[2]; cpia->buffers[2]->next = cpia->buffers[0]; if (usb_set_interface(dev, interface->bInterfaceNumber, 0) < 0) { printk(KERN_ERR "usb_set_interface error\n"); return NULL; } if((cam=cpia_register_camera(&cpia_usb_ops, cpia))==NULL) { LOG("failed to cpia_register_camera\n"); return NULL; } ADD_TO_LIST(cam_list, cam); return cam; } static void cpia_disconnect(struct usb_device *dev, void *ptr); static struct usb_driver cpia_driver = { "cpia", cpia_probe, cpia_disconnect, { NULL, NULL } }; /* don't use dev, it may be NULL! (see usb_cpia_cleanup) */ static void cpia_disconnect(struct usb_device *dev, void *ptr) { struct cam_data *cpia = (struct cam_data *) ptr; struct usb_cpia *cam = (struct usb_cpia *) cpia->lowlevel_data; REMOVE_FROM_LIST(cpia); cpia_unregister_camera(cpia); usb_driver_release_interface(&cpia_driver, &cam->dev->actconfig->interface[0]); /* Free the memory */ kfree(cam); } int usb_cpia_init(void) { cam_list = NULL; return usb_register(&cpia_driver); } void usb_cpia_cleanup(void) { struct cam_data *cam; while((cam = cam_list) != NULL) cpia_disconnect(NULL, cam); usb_deregister(&cpia_driver); } #ifdef MODULE int init_module(void) { return usb_cpia_init(); } void cleanup_module(void) { usb_cpia_cleanup(); } #else /* !MODULE */ __initfunc(void cpia_usb_setup(char *str, int *ints)) { } #endif /* !MODULE */ --Multipart_Wed_Jan_26_22:09:03_2000-1-- From jerdfelt@sventech.com Wed, 26 Jan 2000 16:22:09 -0500 Date: Wed, 26 Jan 2000 16:22:09 -0500 From: Johannes Erdfelt jerdfelt@sventech.com Subject: [cpia] USB - First Contact (1/2) Umm, a mime type of message/partial? What is that? My mailer can't read that at all. JE From c64c128@hotmail.com Wed, 26 Jan 2000 13:40:19 PST Date: Wed, 26 Jan 2000 13:40:19 PST From: Kyle Summers c64c128@hotmail.com Subject: [cpia] Jump right in here Henry, Yeah I am _VERY_ interested. =) Regards, kyle (c64c128@hotmail.com) >From: Henry Bruce >To: c64c128@hotmail.com, cpia@risc.uni-linz.ac.at >Subject: Re: [cpia] Jump right in here >Date: Fri, 21 Jan 2000 16:41:31 GMT > > > Hi. I have been looking for information on the 'Intel Play QX3' > > microscope. Basically I wonder if anyone knows if the picture element > > inside it's workings is similar or identical to any other USB camera. If > > so then getting this thing to work in Linux (or also MacOS 8, please >don't > > shoot me for saying that, I'm new here =) will be a lot easier. > >The Intel Play QX3 microscope is based on CPiA, but has a different PnP ID. > >There are a few extra commands that control illumination and enable >snapshot >buttons - I can provide details to whoever is interested. > >Regards, > > >Henry Bruce > ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com From sbertin@mindspring.com Wed, 26 Jan 2000 18:04:04 -0500 (EST) Date: Wed, 26 Jan 2000 18:04:04 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] Unified patch for recent kernels On 26 Jan, Jacob Nikom wrote: > Sorry Scott for little unrelevant question - do you know when 2.4 > kernel is going to come out? No. Scott J. Bertin sbertin@mindspring.com From sbertin@mindspring.com Wed, 26 Jan 2000 18:04:43 -0500 (EST) Date: Wed, 26 Jan 2000 18:04:43 -0500 (EST) From: sbertin@mindspring.com sbertin@mindspring.com Subject: [cpia] Unified patch for recent kernels On 26 Jan, Peter Pregler wrote: > I had a look at your code yesterday and it worked at first try. Good > work! I noticed that they implemented fifo-read/write in parport_pc > but only dma-write and no dma-read. Did you try out the fifo-read? The > patch would be about the dma-write then. Is that correct? I haven't tried the fifo-read. It is disabled by default right now because of some issues with data loss if there is data in the fifo when ECP mode is terminated. This shouldn't be a problem for us, but is for parallel port SCSI devices. > I would not > mind to do the dma-read stuff. I guess I have some practice with that > and their dma-write code looked quite similar to my 2.2 dma-read code. > :) Have you looked at what Michal Kral did (kralcpia-0.1.tgz on the archive)? It looks like taht could be dropped almost directly into parprot_pc. It may have the same data loss issues that the fifo code has though. I haven't looked into it enough yet to say for sure. Scott J. Bertin sbertin@mindspring.com From Nick.Holloway@alfie.demon.co.uk 26 Jan 2000 21:15:59 -0000 Date: 26 Jan 2000 21:15:59 -0000 From: Nick Holloway Nick.Holloway@alfie.demon.co.uk Subject: [cpia] Happy Report sbertin@mindspring.com writes: > On 25 Jan, Peter Pregler wrote: > > Can you check if this is still present with Scotts new 0.6? If yes > > please send me the logs for such an unsuccessful run. IIRC the code > > above is not that special. > > cpia-0.6.0 does call fetch_frame up to 3 times before giving up. I had > encountered a similar problem until I got the code right for 2.3.x > kernels, but I'm not seeing it anymore. I don't really know what caused > it, but I left the retry in just to be safe. I've just fired up 0.6.0. I can report that the retry code is being triggered, and is doing it's job. This means that grabbing is working reliably with gqcam and vidcat. cpia.c(16702502):fetch_frame(2322):first frame cpia.c:parse_picture(2171):line length was not 1 but -2 after 676/155041 bytes cpia.c(16702533):fetch_frame(2373):parse_picture failed -1 cpia.c(16702533):fetch_frame(2317):retry=1 cpia.c(16702533):fetch_frame(2322):first frame Cheers, -- `O O' | Nick.Holloway@alfie.demon.co.uk // ^ \\ | http://www.alfie.demon.co.uk/ From Peter.Pregler@risc.uni-linz.ac.at Thu, 27 Jan 2000 08:56:16 +0100 (CET) Date: Thu, 27 Jan 2000 08:56:16 +0100 (CET) From: Peter Pregler Peter.Pregler@risc.uni-linz.ac.at Subject: [cpia] USB - First Contact (1/2) On 26-Jan-2000 Johannes Erdfelt wrote: > Umm, a mime type of message/partial? What is that? The actual content is distributed in various small sized chuncks, just like the big multipart usenet-postings. I have set a limit of 30K to messages sent to the list. Guess that triggered the multipart-switch in Jochen. :) Anyway, doing a gzip would have compressed it to less than 10K. So remember compression is your friend. > My mailer can't read that at all. My mailer apparently could reassemble the stuff. I have put the patch at http://www.risc.uni-linz.ac.at/people/ppregler/cpia/ for your convenience. -Peter ------------------------------- Email: Peter.Pregler@risc.uni-linz.ac.at WWW: http://www.risc.uni-linz.ac.at/people/ppregler From Jochen.Scharrlach@schwaben.de Thu, 27 Jan 2000 19:37:42 +0100 (CET) Date: Thu, 27 Jan 2000 19:37:42 +0100 (CET) From: Jochen Scharrlach Jochen.Scharrlach@schwaben.de Subject: [cpia] USB - First Contact (1/2) --Multipart_Thu_Jan_27_19:37:42_2000-1 Content-Type: text/plain; charset=US-ASCII Hi, ok, I'll use gzip in the future - but you forgot the second attachment! I have repacked it, see below. Bye, Jochen -- new signature coming RSN (tm) --Multipart_Thu_Jan_27_19:37:42_2000-1 Content-Type: application/octet-stream; type=tar+gzip Content-Disposition: attachment; filename="usb-addon.tgz" Content-Transfer-Encoding: base64 H4sIAASQkDgAA+w8+1MbR9L5VfwVY6fsSCBAEgJjy/gig3B0AUQkcJLjo7ZWqxHaY7Wr7INH HP73rx8zu7PSCtuxk6pUHZeztDM9PT3dPf2aWTkz17aSaLjhfPOX/dXqtdpOs/ZNDf5e7DRz n7XaVv1F88U3tRe1ZrNee7G9vY3wO9v1b0TtryMp+0ui2A6F+Oa/0eNwH+v/h/596/qOl4yk eO25fnK36QT+2L3amLxZme+ZBqPEk0U91zL0pVfUc2u7cVF75EzkqKjDc6PiATPX9wLnGvuy zqcOaO/G5KnRsplE4WYUOps8bhS6NzKMoHWI/0fYlW9Hcuz6UpwP3lr9zk/W/mm3bb3rt99a h/32cadUKtXu9uvFYOenR732gQYEuEYKJ35ud8+sw17fOun8cpbhygCgb7/DHQoR9Nczgqhn YJ12+tZBZ7APfbV8nzXo/qeT9b/cqZU2V8VgEiTeyP8uFkMpJnY4coKRHInVzXQwkX5yfjx4 e35YyigenPU77WMLGglxqVQ+bb/jScSqaFYywP1++2z/hwyyPDcUwBuVlZUoDhMnFigVKxom Y/FhpeQARWJ1ZMd2a6WUhEMrFqvw0Vp5aM2tHJEddU5Emcg9bv9iZYteAxNSWZF+MhXj0J5K QG7Bxo2TCOYQijud49OzX6vpI1B40D15l2+AfpxYUapxiRXE4vqx8KR/FU9a8FQ4GX9gd7Ir cFEXJumX2DGPetWXdzEvV08Lmmghk4h2kOCBvHEdqUYmoUTZpYgQeMQAq/AJaGByP3KvfBAy cdcd247EqXG7Wb8lMpHWRNojYPXtb0B5KO0pDcMFOkmIommVUHX2kzCU0BhKR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