v4l2 driver framework code review

linux,ubuntu 2018-11-26 906 次浏览 次点赞


v4l2 drvier framework code review

I. 术语解释

术语解释
vfevideo front end driver
ccicamera control interface
csicamera serial interface

II. 启动流程

$dmesg -T |egrep -i 'vfe|ov5640|v4l|csi|cci'

v4l2 driver lod sequecnce

如上启动顺序

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

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

  • sub-device camera sensor ov5640 加载;

III. 驱动框架

v4l2 驱动框架

kernel space

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

userspace

  • libv4l2 源码可以通过sudo apt-get source libv4l2rds0 下载。

    $ cat /etc/apt/sources.list
    deb http://mirrors.tuna.tsinghua.edu.cn/debian/ jessie main non-free contrib
    deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ jessie main non-free contrib
    注意:如上,确定已经添加source 源。


本文由 Jay 创作,采用 知识共享署名 3.0,可自由转载、引用,但需署名作者且注明文章出处,点赞0

还不快抢沙发

添加新评论