标签:v4l2

Overview of the V4L2 driver framework

This text documents the various structures provided by the V4L2 framework and their relationships.

The V4L2 drivers tend to be very complex due to the complexity of the hardware: most devices have multiple ICs, export multiple device nodes in /dev, and create also non-V4L2 devices such as DVB, ALSA, FB, I2C and input (IR) devices.

Especially the fact that V4L2 drivers have to setup supporting ICs to do audio/video muxing/encoding/decoding makes it more complex than most. Usually these ICs are connected to the main bridge driver through one or more I2C busses, but other busses can also be used. S...

v4l2 driver framework code review

如上启动顺序

  • csi、cci、mipi 等外设初始化;
  • vfe控制 v4l2 启动;

    vfe在初始化 v4l2-device启动的时候已经同sub-device ov5640 通信,但是此时ov5640 启动还没有加载,这部分需要详细走读下代码;

  • sub-device camera sensor ov5640 加载;

  1. vfe模块加载,加载csi、mipi、isp、cci模块,同时从sys_config读出sensor的配置;
  2. 创建v4l2-device;
  3. ov5640 通过cci/i2c 向上注册sub-device(先前行为),此时vfe通过已经注册接口测试sensor是否激活。
  4. 创建video 设备节点 ;
  • libv4l2 源码可以通过sudo apt-get source libv4l2rds0 下载。