From spike@ulyssis.org Wed, 18 Oct 2000 23:55:25 +0200 Date: Wed, 18 Oct 2000 23:55:25 +0200 From: Remko Troncon spike@ulyssis.org Subject: [cpia] Compiling against 2.4test9 kernel --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Hi, I think this bug was posted before, but i didn't see any answer, so i will give it a try: Compiling cpia.c against a 2.4test9 kernel results in a compiler error, mentioned earlier on this mailing list. I started looking around and saw that this was due to the removal of the MAP_NR macro from the kernel source, and due to a small cast problem. I modified the code a just a little bit (modifications are attached), and cpia.c compiled nicely. But, when insmodding cpia_usb.o, the kernel paniced somewhere in reset_camera(). Is there a solution to this problem ? Or is this due to my modifications ? thanks, -- Remko ___________________________________________________________________ Remko Troncon http://spike.ulyssis.org --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=cpia_diff 271,272c271,272 < ret = page_address(pte_page(pte)) | < (adr & (PAGE_SIZE-1)); --- > ret = ((unsigned long) page_address(pte_page(pte))) | > (adr & (PAGE_SIZE-1)); 312c312 < #else --- > #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) 313a314,315 > #else > mem_map_reserve(virt_to_page(__va(page))); 340c342 < #else --- > #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) 341a344,345 > #else > mem_map_unreserve(virt_to_page(__va(page))); --AqsLC8rIMeq19msA-- From bernd@broermann.com Thu, 19 Oct 2000 00:08:58 +0200 Date: Thu, 19 Oct 2000 00:08:58 +0200 From: Bernd Broermann bernd@broermann.com Subject: [cpia] char-major-81 ?? Hallo I have a standard linux-2.4.0test9 kernel. when i put in my "Apitek Hyper VCAM Fun in the USB Slot and type modprobe cpia_usb I get following: Oct 19 00:03:54 vanille kernel: usb.c: registered new driver usbdevfs Oct 19 00:03:54 vanille kernel: usb.c: registered new driver hub Oct 19 00:03:54 vanille kernel: Linux video capture interface: v1.00 Oct 19 00:03:54 vanille kernel: V4L-Driver for Vision CPiA based cameras v0.7.4 Oct 19 00:03:54 vanille kernel: Parallel port driver for Vision CPiA based cameras v0.7.4 Oct 19 00:03:54 vanille kernel: usb.c: registered new driver cpia Oct 19 00:04:08 vanille modprobe: modprobe: Can't locate module char-major-81-0 In /etc/modules.conf is alias char-major-81 bttv but I dont know how to compile the bttv.o in with the new Kernelsources. Can you help me ? cu bernd From Peter_Pregler@email.com Thu, 19 Oct 2000 08:36:35 +0200 Date: Thu, 19 Oct 2000 08:36:35 +0200 From: Peter Pregler Peter_Pregler@email.com Subject: [cpia] char-major-81 ?? On Thu, Oct 19, 2000 at 12:08:58AM +0200, Bernd Broermann wrote: > > In /etc/modules.conf is > > alias char-major-81 bttv > > but I dont know how to compile the bttv.o in with the new Kernelsources. > > Can you help me ? Change the bttv to cpia_usb and it will autoload the correct camera driver as soon as you access /dev/video*. As for the bttv, do you have some sort of tv-card in your computer? -Peter -- I will not waste chalk. --Bart Simpson at the blackboard -------------------------------------------------------- Email: Peter_Pregler@email.com WWW: http://www.risc.uni-linz.ac.at/people/ppregler ICQ: 61011460 From Peter_Pregler@email.com Thu, 19 Oct 2000 08:42:12 +0200 Date: Thu, 19 Oct 2000 08:42:12 +0200 From: Peter Pregler Peter_Pregler@email.com Subject: [cpia] Compiling against 2.4test9 kernel Hi, I will have a look at 2.4test9 over the weekend. Since I want to play with DRI and OpenGL a bit this is a good opportunity to try out a new kernel. As a quick fix, the code in question was copied from other drivers (see the comment at the beginning of the routines). Check out the bttv-driver and see what they did. I am pretty sure they fixed it properly. Greetings, Peter On Wed, Oct 18, 2000 at 11:55:25PM +0200, Remko Troncon wrote: > Hi, > > I think this bug was posted before, but i didn't see any answer, so > i will give it a try: > > Compiling cpia.c against a 2.4test9 kernel results in a compiler error, > mentioned earlier on this mailing list. > I started looking around and saw that this was due to the removal of > the MAP_NR macro from the kernel source, and due to a small cast > problem. > I modified the code a just a little bit (modifications are attached), and > cpia.c compiled nicely. But, when insmodding cpia_usb.o, the kernel paniced > somewhere in reset_camera(). > Is there a solution to this problem ? Or is this due to my modifications ? > > thanks, > > > ___________________________________________________________________ > Remko Troncon http://spike.ulyssis.org > 271,272c271,272 > < ret = page_address(pte_page(pte)) | > < (adr & (PAGE_SIZE-1)); > > ret = ((unsigned long) page_address(pte_page(pte))) | > > (adr & (PAGE_SIZE-1)); > 312c312 > < #else > > #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) > 313a314,315 > > #else > > mem_map_reserve(virt_to_page(__va(page))); > 340c342 > < #else > > #elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) > 341a344,345 > > #else > > mem_map_unreserve(virt_to_page(__va(page))); -- I will not waste chalk. --Bart Simpson at the blackboard -------------------------------------------------------- Email: Peter_Pregler@email.com WWW: http://www.risc.uni-linz.ac.at/people/ppregler ICQ: 61011460 From bernd@broermann.com Thu, 19 Oct 2000 09:17:12 +0200 Date: Thu, 19 Oct 2000 09:17:12 +0200 From: Bernd Broermann bernd@broermann.com Subject: [cpia] char-major-81 ?? Peter Pregler wrote: > > On Thu, Oct 19, 2000 at 12:08:58AM +0200, Bernd Broermann wrote: > > > > In /etc/modules.conf is > > > > alias char-major-81 bttv .. > > Change the bttv to cpia_usb and it will autoload the correct camera > driver as soon as you access /dev/video*. As for the bttv, do you have > some sort of tv-card in your computer? No , bttv was the standard setting of SuSE-modules.conf. Thank you Bernd From spike@ulyssis.org Thu, 19 Oct 2000 11:09:24 +0200 Date: Thu, 19 Oct 2000 11:09:24 +0200 From: Remko Troncon spike@ulyssis.org Subject: [cpia] Compiling against 2.4test9 kernel > I will have a look at 2.4test9 over the weekend. Since I want to play > with DRI and OpenGL a bit this is a good opportunity to try out a new > kernel. As a quick fix, the code in question was copied from other > drivers (see the comment at the beginning of the routines). Check out > the bttv-driver and see what they did. I am pretty sure they fixed it > properly. The changes i made to that code seem identical to those of the bttv- driver, so i suppose it's something else that makes my kernel panic. Well, i guess i'll try working with a 2.3 kernel then :-) thanks, -- Remko From bernd@broermann.com Fri, 20 Oct 2000 22:33:30 +0200 Date: Fri, 20 Oct 2000 22:33:30 +0200 From: Bernd Broermann bernd@broermann.com Subject: [cpia] USB Apitek loads parallel driver Hello I went a step forward: kernel 2.4.0test9 , cpia1.1 and cpia_diff from Remko ( Thanks ). When i modeprobe cpia_usb , only the parallel driver is loaded. Oct 20 22:19:12 vanille kernel: usb.c: registered new driver usbdevfs Oct 20 22:19:12 vanille kernel: usb.c: registered new driver hub Oct 20 22:19:12 vanille kernel: Linux video capture interface: v1.00 Oct 20 22:19:12 vanille kernel: V4L-Driver for Vision CPiA based cameras v1.1.0 Oct 20 22:19:12 vanille kernel: Parallel port driver for Vision CPiA based cameras v1.1.0 Oct 20 22:19:12 vanille kernel: usb.c: registered new driver cpia /etc/modules.conf is alias char-major-81 cpia_usb I am not sure to load the correct modules ( after modprobe cpia_usb there is) : cpia_usb 5200 0 (autoclean) (unused) cpia_pp 6192 0 (autoclean) (unused) cpia 59728 0 [cpia_usb cpia_pp] videodev 4448 0 [cpia] usbcore 45440 0 [cpia_usb] And when I do a : vctrl there is in /var/log/messages : Oct 20 22:28:20 vanille modprobe: modprobe: Can't locate module char-major-81-0 I think with your help I get a running camera a step closer. Thank you for your effort Bernd From joncruz@yahoo.com Tue, 24 Oct 2000 12:21:13 -0700 (PDT) Date: Tue, 24 Oct 2000 12:21:13 -0700 (PDT) From: Jon A. Cruz joncruz@yahoo.com Subject: [cpia] cpia driver on RedHat 7.0 Has anyone gotten the usb driver to work on RedHat 7.0? __________________________________________________ Do You Yahoo!? Yahoo! Messenger - Talk while you surf! It's FREE. http://im.yahoo.com/ From joncruz@geocities.com Tue, 24 Oct 2000 14:13:50 -0700 Date: Tue, 24 Oct 2000 14:13:50 -0700 From: Jon A. Cruz joncruz@geocities.com Subject: [cpia] bug in cpia_usb_streamRead I'm usuing an application that sporadically gets an error doing an ioctl call with VIDIOCMCAPTURE when streaming in frames. It looks like there's a bug in cpia_usb_streamRead. It's assuming that once it goes to sleep, it will only be awakend when a frame is ready, but this is not the case. I have a patch that seems to fix this by switching if (ucpia->curbuff->status != FRAME_READY) to while(ucpia->curbuff->status != FRAME_READY) (plus a little checking of other things.) Since cpia.c is calling this with noblock set to 0, but it's not really blocking (due to having that if instead of a while), this seems like the proper fix put put in. So... what's next to get things fixed? And to get the kernel updated also? The project seems quite dormant of late. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com From Peter_Pregler@email.com Fri, 27 Oct 2000 08:34:53 +0200 Date: Fri, 27 Oct 2000 08:34:53 +0200 From: Peter Pregler Peter_Pregler@email.com Subject: [cpia] Compiling against 2.4test9 kernel Hi, I checked out pre-test10 and it is solved there. Since the necessary changes are the ones I described I assume it was a problem specific to test9 and not to the cpia-driver. -Peter On Thu, Oct 19, 2000 at 11:09:24AM +0200, Remko Troncon wrote: > > I will have a look at 2.4test9 over the weekend. Since I want to play > > with DRI and OpenGL a bit this is a good opportunity to try out a new > > kernel. As a quick fix, the code in question was copied from other > > drivers (see the comment at the beginning of the routines). Check out > > the bttv-driver and see what they did. I am pretty sure they fixed it > > properly. > > The changes i made to that code seem identical to those of the bttv- > driver, so i suppose it's something else that makes my kernel panic. > Well, i guess i'll try working with a 2.3 kernel then :-) > > thanks, > > > _______________________________________________ > cpia mailing list - cpia@risc.uni-linz.ac.at > http://mailman.risc.uni-linz.ac.at/mailman/cgi-bin/listinfo/cpia > -- I will not waste chalk. --Bart Simpson at the blackboard -------------------------------------------------------- Email: Peter_Pregler@email.com WWW: http://www.risc.uni-linz.ac.at/people/ppregler ICQ: 61011460 From Peter_Pregler@email.com Fri, 27 Oct 2000 08:40:12 +0200 Date: Fri, 27 Oct 2000 08:40:12 +0200 From: Peter Pregler Peter_Pregler@email.com Subject: [cpia] bug in cpia_usb_streamRead On Tue, Oct 24, 2000 at 02:13:50PM -0700, Jon A. Cruz wrote: > > So... what's next to get things fixed? And to get the kernel updated > also? The project seems quite dormant of late. I take care that things go into 2.2.x. AFAIK, Johannes does the same for 2.4.x and Scott did all the checkins to the CVS-tree I wanted to make. As soon as I get my hand on a second USB-camera I will check out the glitches that were reported with that one. That is about all I want to do for the driver in the not so near future. Greetings, Peter -- I will not waste chalk. --Bart Simpson at the blackboard -------------------------------------------------------- Email: Peter_Pregler@email.com WWW: http://www.risc.uni-linz.ac.at/people/ppregler ICQ: 61011460 From johannes@erdfelt.com Fri, 27 Oct 2000 13:41:41 -0400 Date: Fri, 27 Oct 2000 13:41:41 -0400 From: Johannes Erdfelt johannes@erdfelt.com Subject: [cpia] bug in cpia_usb_streamRead On Fri, Oct 27, 2000, Peter Pregler wrote: > On Tue, Oct 24, 2000 at 02:13:50PM -0700, Jon A. Cruz wrote: > > > > So... what's next to get things fixed? And to get the kernel updated > > also? The project seems quite dormant of late. > > I take care that things go into 2.2.x. AFAIK, Johannes does the same > for 2.4.x and Scott did all the checkins to the CVS-tree I wanted to > make. As soon as I get my hand on a second USB-camera I will check out > the glitches that were reported with that one. That is about all I > want to do for the driver in the not so near future. I haven't synced the CVS repository to the 2.4 code in a while (since the initial merge?). I'll do that soon and send a patch to Linus. JE