Did you ever manage to find a simple fix to this problem? I am trying to do the same thing, and it seems like there has to be a simpler fix than recompiling the driver.
On Monday, March 25, 2013 1:16:23 AM UTC-5, Linux Omicron wrote: > > I am using the driver supplied with Angstrom for BB-BONE-CAM3-01. (I guess > it is cssp_camera driver) > I am surprised to see that the issue always occurs when I run an OpenCV > application with the cape. > If I run a small application for v4l2 capture, the application would not > throw the error 8 out of 10 times. > More surprising part is that OpenCV application runs perfectly for USB > camera on the same environment. > > Could you please elaborate about "*to allocate memory once during boot > and do not release it*". How do I do that? > > Thank you, > Linux Omicron > > > On Monday, March 25, 2013 1:45:19 PM UTC+9, Hiremath, Vaibhav wrote: >> >> The only reliable way to fix this issue is to allocate memory once >> during boot and do not release it. >> >> I am not sure about the driver you are using, but if driver doesn’t >> support it, you have to modify the driver for the same. >> >> You can refer to the drivers/media/video/omap_vout.c for the reference >> where we do exactly same thing. >> >> >> >> Thanks, >> >> Vaibhav >> >> *From:* [email protected] [mailto:[email protected]] *On >> Behalf Of *[email protected] >> *Sent:* Saturday, March 23, 2013 2:09 PM >> *To:* [email protected] >> *Subject:* [beagleboard] Re: OpenCV : VIDIOC_REQBUFS: Cannot allocate >> memory >> >> >> >> Thank you for your suggestions but I am stuck with OpenCV and have to use >> it. >> >> BTW, I observed following in dmesg when VIDIOC_REQBUFS request is sent to >> ioctl(). >> >> >> >> [ 637.752929] ------------[ cut here ]------------ >> >> [ 637.752990] WARNING: at mm/page_alloc.c:2109 >> __alloc_pages_nodemask+0xf5/0x3de() >> >> [ 637.752990] Modules linked in: fuse joydev bufferclass_ti(O) >> omaplfb(O) pvrsrvkm(O) ip_tables x_tables g_mass_storage rfcomm ircomm_tty >> ircomm irda hidp bluetooth rfkill ipv6 >> >> [ 637.753082] [<c000f8d1>] (unwind_backtrace+0x1/0x8c) from [<c002cd07>] >> (warn_slowpath_common+0x33/0x48) >> >> [ 637.753112] [<c002cd07>] (warn_slowpath_common+0x33/0x48) from >> [<c002cd2b>] (warn_slowpath_null+0xf/0x10) >> >> [ 637.753143] [<c002cd2b>] (warn_slowpath_null+0xf/0x10) from >> [<c007061f>] (__alloc_pages_nodemask+0xf5/0x3de) >> >> [ 637.753173] [<c007061f>] (__alloc_pages_nodemask+0xf5/0x3de) from >> [<c0010e97>] (__dma_alloc+0x87/0x1fc) >> >> [ 637.753204] [<c0010e97>] (__dma_alloc+0x87/0x1fc) from [<c001105b>] >> (dma_alloc_coherent+0x33/0x3c) >> >> [ 637.753234] [<c001105b>] (dma_alloc_coherent+0x33/0x3c) from >> [<c02233bb>] (vb2_dma_contig_alloc+0x29/0x7a) >> >> [ 637.753265] [<c02233bb>] (vb2_dma_contig_alloc+0x29/0x7a) from >> [<c0221c85>] (__vb2_queue_alloc+0x79/0x214) >> >> [ 637.753295] [<c0221c85>] (__vb2_queue_alloc+0x79/0x214) from >> [<c022221b>] (vb2_reqbufs+0x141/0x1da) >> >> [ 637.753326] [<c022221b>] (vb2_reqbufs+0x141/0x1da) from [<c0218559>] >> (__video_do_ioctl+0x102f/0x363e) >> >> [ 637.753356] [<c0218559>] (__video_do_ioctl+0x102f/0x363e) from >> [<c02173e7>] (video_usercopy+0x1f7/0x2f4) >> >> [ 637.753356] [<c02173e7>] (video_usercopy+0x1f7/0x2f4) from >> [<c02169b3>] (v4l2_ioctl+0x3b/0xb0) >> >> [ 637.753387] [<c02169b3>] (v4l2_ioctl+0x3b/0xb0) from [<c00940a3>] >> (do_vfs_ioctl+0x327/0x370) >> >> [ 637.753417] [<c00940a3>] (do_vfs_ioctl+0x327/0x370) from [<c0094119>] >> (sys_ioctl+0x2d/0x44) >> >> [ 637.753448] [<c0094119>] (sys_ioctl+0x2d/0x44) from [<c000c441>] >> (ret_fast_syscall+0x1/0x44) >> >> [ 637.753479] ---[ end trace b53ac4d9fccc31d9 ]--- >> >> [ 637.753479] cssp-camera cssp-camera: dma_alloc_coherent of size 0 >> failed >> >> >> >> Is it because of less memory? I added 1GB swap partition also but no >> change in the behavior. >> >> >> >> Thanks, >> >> Linux Omicron >> >> >> On Friday, March 22, 2013 12:46:19 AM UTC+9, [email protected] wrote: >> >> I don't have any suggestions to your OpenCV issue, but ... >> >> maybe it would help if you try to take pictures with an other software >> like mplayer and than use opencv for imageprocessing. >> >> you can take pictures for example 9 pictures in png format with typing >> into the terminal: >> >> mplayer -vo png -frames 9 tv:// >> >> >> >> if you try to imageprocessing afterwards, please tell if it works, thanks! >> >> >> >> >> >> Am Mittwoch, 20. März 2013 23:28:38 UTC-7 schrieb [email protected]: >> >> Hello All, >> >> >> >> I am working on a project with BeagleBone and 3.1 MP camera cape. >> >> The OS is Angstrorm : Linux beaglebone 3.2.34 #1 Wed Nov 21 14:17:11 CET >> 2012 >> >> I noticed that camera works well with cheese and mplayer but it doesn't >> work with a simple OpenCV application to capture video from the camera. >> >> >> >> My application to capture video returns after following errors. It seems >> that application doesn't able to get past to the call cvCaptureFromCAM. >> >> >> >> VIDIOC_REQBUFS: Cannot allocate memory >> >> munmap: Invalid argument >> >> munmap: Invalid argument >> >> munmap: Invalid argument >> >> munmap: Invalid argument >> >> Unable to stop the stream.: Bad file descriptor >> >> munmap: Invalid argument >> >> munmap: Invalid argument >> >> munmap: Invalid argument >> >> munmap: Invalid argument >> >> Floating point exception >> >> >> >> Running v4l2-ctl gives following information. Is it usual that the camera >> doesn't use libv4l2? >> >> >> >> root@beaglebone:~# v4l2-ctl --info >> >> Driver Info (not using libv4l2): >> >> Driver name : cssp_camera >> >> Card type : cssp_camera >> >> Bus info : cssp_camera-000 >> >> Driver version: 3.2.34 >> >> Capabilities : 0x05000001 >> >> Video Capture >> >> Read/Write >> >> Streaming >> >> >> >> Any direction to make the camera work with OpenCV? >> >> >> >> Thank you, >> >> Linux Omicron >> >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to the Google Groups >> "BeagleBoard" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
