Camera Drive Debugging Small note

Source: Internet
Author: User
Camera Drive Debugging small note

Applications using the V4L2 API to operate Camera devices are more uniform, but implementations of the Camera drive are diverse, such as UVC (USB-free-drive camera) and Soc-camera.

The former does not require additional drivers, so don't worry too much; the latter is supported by the camera system. The standard document for the Soc-camera kernel is linux-3.0-soc-camera. Soc-camera and ASOC are the same ideas, ultimately implementing the SOC side of the host driver and the guest side of the separation, so it is easy to link to the independent host-side drive and independent guest-side drive to unite. So it can be divided into three parts:
Machine, platform and sensor. Where platform is the camera interface driver on the CPU (provided by the CPU manufacturer), sensor is specific camera module driver (provided by the module manufacturer), and the machine driver is relevant for the specific custom PCB motherboard, Connect the platform and sensor drivers (developed by the specific motherboard designer).

drivers/media/video/rk30_camera_oneframe.c static struct Soc_camera_host_ops rk_soc_camera_host_ops = {. Owner
    = This_module,. Add = Rk_camera_add_device,. remove = Rk_camera_remove_device, . Suspend = Rk_camera_suspend,. Resume = Rk_camera_resume,. enum_frameinervals = Rk_camera_enum_fr Ameintervals,. Cropcap = Rk_camera_cropcap,. Set_crop = Rk_camera_set_crop,. Get_crop = Rk_camera_get_c ROP,. get_formats = Rk_camera_get_formats,. put_formats = Rk_camera_put_formats,. set_fmt = R    K_camera_set_fmt,. try_fmt = rk_camera_try_fmt,. init_videobuf = Rk_camera_init_videobuf,. Reqbufs      = Rk_camera_reqbufs,. Poll = Rk_camera_poll,. Querycap = Rk_camera_querycap,. Set_bus_param 
    = Rk_camera_set_bus_param,. S_stream = Rk_camera_s_stream,/* Ddl@rock-chips.com:add stream Control for host */ . Set_ctrl = Rk_cameRa_set_ctrl,. Controls = Rk_camera_controls,. Num_controls = Array_size (rk_camera_controls)}; 

Imagination is good, the realization is cruel. Domestic manufacturers do not exactly follow the same line. such as a model of sensor if you want to apply to the Rockchip and Allwinner platform, you should have provided the same driver, but the current situation is that sensor vendors to provide their respective platform for the driver. Did not achieve the design thought of the effect of their own duties, but eventually in the direction of a good way.

Debug Order:

1. (Do not connect the module) on the electric timing according to the manual timing will be AVDD,DVDD,IOVDD.

2. (Do not connect the module) on the normal, detect mclk is normal, generally for 24mhz/48mhz.

3. (not connecting the module) PWDN and RESTB signal is normal, the focus is on the level of switching is not at the right time point.

4. (not connecting module) I2C signal is normal, the main observation I2C address is correct.

5. (Need to connect the module) I2C signal signal 9th pulse corresponding to the SDA is a low level, is the representative has an ACK, conversely none.

6. (Open camera application) test if there are pclk/h/v/these three signals fatal, if not normal will cause the image can not be displayed

7. (Open camera application) The data signal completely does not make the green screen (not necessarily all the same), the image shows normal or not and data.

The reference documentation also has the video for Linux Two (V4L2)-Driver Authoring Guide, the test tools have v4l-utils, and the V4L2 Soc-camera subsystem.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.