8 Replies Latest reply: Mar 18, 2012 11:21 PM by ScottJiang RSS

    V4l2 video0




      I have the following hardware setup:

      cm-bf561, evaluation kit and camera extender board from bluetechnix. camera: ov7670 and ov2640


      Software setup:

      uclinux distribution: 2011R1-RC3.

      menuconfig set up as per http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:v4l2_blackfin_capture

      Did settings as per the above link for ov2640



      No video0 device is created after modprobe bfin-video-capture


      How should I get the v4l2 to work and grab an image?


      Also I tried to port v4l1 from 2010 distribution, but that gives a memory exception while trying to grab an image.

      Is the v4l previous framework compatible with the new kernel?

        • 1. Re: V4l2 video0

          ovXXXX sensors are not enabled and tested in Blackfin Linux kernel. If you want to use them, you should add proper ovXXXX bfin_capture platform data into your cm-bf561 board file by your self.

          • 2. Re: V4l2 video0

            Thank you for your answer.

            Could you please help me as to how I can do that or if there is an example that I can follow?

            Also do you know if V4L1 will be compatible on the new kernel? I have replaced the complete video folder in the drivers/media under the linux kernel tree and compiled the code but when I try to grab an image, it gives me memory errors such as the following:


            Stack info:

            SP: [0x020abf24]  IM `;1

            Memory from 0x020abf20 to 020ac000

            020abf20: 025fff70 [0254ceb0] 00008000  00000000  00000000  020ac000  0254ceb0  0254ceb0

            020abf40: 02082840  001098ec  02003004  0255da6d  0258c5bf  0255da22  0258c5be  00000000

            020abf60: 00000000  00000083  00000000  00000083  00000000  00000000  7ffff000  000000c0

            020abf80: 00000137  00000000  00000000  00000000  00000000  0000005b  00001802  00000001

            020abfa0: fffffffc  00000006  00000003  02082990  02082918  025ffc9c  025ffca8  0253d188

            020abfc0: 025b75b8  0253d188  025b7294  0254cea4  00000036  025fff9d  025fff50  025fff70

            020abfe0: 00000001  0000cea4  025ffcd8  803c7601  00000003  00000003  00000036  00000006

            Return addresses in stack:

            Modules linked in: blackfin_cam videodev v4l1_compat ov7673

            Kernel panic - not syncing: Kernel exception

            Stack info:

            SP: [0x020abcf4] 

            • 3. Re: V4l2 video0

              Please refer to linux-kernel/arch/blackfin/mach-bf561/board/ezkit.c

              Search BLACKFIN_CAPTURE.

              You should match platform data with your hardware design.

              • 4. Re: V4l2 video0

                V4L1 has been removed from the new kernel. You can refer to drivers/media/video/vs6624.c as an example sensor driver.

                • 5. Re: V4l2 video0

                  Thank you everyone for your answers.

                  I have tried to understand the ezkit.c but the parameters related to adv7183 that are present, I am not sure I understand what they are for.

                  static struct v4l2_input adv7183_inputs[] = {

                  static struct bcap_route adv7183_routes[] = {

                  what are these structures used for?

                  Is there a similar configuration for ovXX series present somewhere that I can go through?


                  I also tried to follow the vsXX series but that is not supported in the ezkit.c so I am guessing, it will anyway not work

                  • 6. Re: V4l2 video0

                    ezkit.c is a board file where you pass some board specific parameters to the driver. adv7183.c is the real driver but it is a decoder driver. vs6624.c is a sensor driver which is similar to ov sensors.

                    adv7183_input is the input array adv7183 can support. adv7183_routes is the route of each input.

                    • 7. Re: V4l2 video0

                      Thank you for your reply.

                      So do I need to add anything related to the sensor in the ezkit.c.

                      If yes, then what is it that I need to add, in order to make it work

                      • 8. Re: V4l2 video0

                        Considering you are talking about ov sensors, I have to say I can't tell you details. What you need to do is to write an ov sensor driver and pass in parameters that are requested in your driver. Please refer to Documentation/video4linux/v4l2-framework.txt as a start.