Search Results for 'v4l2 changes'


1 POSTS

  1. 2009/07/04 What has been changed in v4l2 subdev per kernel version?

You folks reading this article may be v4l2 developers or somebody interested in Linux kernel subsystems.

Here I’m gonna explain some changes made in v4l2 especially about v4l2 subdev, and even more specifically in camera device driver engineer’s point of view.

2.6.29 -> 2.6.30

We have several essential changes and significantly important new operations has been added.

subdev core ops

New

int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data);
    - What for? : Some subdev devices need platform data to get initialized themselves.
    - In case of camera devices, this kind of operation is highly mandatory.


int (*load_fw)(struct v4l2_subdev *sd);
    - What for? : To load device firmware and get initialized.
    - Some of camera devices need to load their own firmware to be initialized or some firmware upgrade can be using this operation for special purpose.

int (*g_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls);
int (*s_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls);
int (*try_ext_ctrls)(struct v4l2_subdev *sd, struct v4l2_ext_controls *ctrls);
    - What for? : To make issued atomically with some control operation at once.
    - Not used for camera devices actually (except for omap3 camera interface)

 

subdev video ops

Changed

int (*s_crystal_freq)(struct v4l2_subdev *sd, struct v4l2_crystal_freq *freq);
=> int (*s_crystal_freq)(struct v4l2_subdev *sd, u32 freq, u32 flags);
    - v4l2_crystal_freq has been deprecated (trivial change)

New

int (*querystd)(struct v4l2_subdev *sd, v4l2_std_id *std);
    - What for? : to query supported video standards
    - Not used for camera actually


int (*g_input_status)(struct v4l2_subdev *sd, u32 *status);
    - What for? : to get status of subdev used as image input device (enum input is using this)
    - Might be useful for camera interface drivers to get external camera module’s status

int (*enum_fmt)(struct v4l2_subdev *sd, struct v4l2_fmtdesc *fmtdesc);
int (*try_fmt)(struct v4l2_subdev *sd, struct v4l2_format *fmt);
int (*g_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
int (*s_parm)(struct v4l2_subdev *sd, struct v4l2_streamparm *param);
int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize);
int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival);
    - For very general purpose. you can figure it out what are those for.

2.6.30 vs v4l-dvb repository in linuxtv

As you know, the leading community of V4L2 is linuxtv.

New features in linuxtv

int (*cropcap)(struct v4l2_subdev *sd, struct v4l2_cropcap *cc);
int (*g_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
int (*s_crop)(struct v4l2_subdev *sd, struct v4l2_crop *crop);
- For crop supporting subdev those might be necessary
- Some of camera devices are supporting crop operation

I tried diff with 2.6.29 and 2.6.30 of Linux kernel and also linuxtv v4l-dvb repository and took a brief look at to the difference been made. If anything wrong with this article, please let me know.
Cheers,

Nate

저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License

Tag : , , ,