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.
We have several essential changes and significantly important new operations has been added.
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)
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)
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 statusint (*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.
As you know, the leading community of V4L2 is 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
| Using your own build script in your VIM (VI iMproved) (0) | 2009/07/31 |
|---|---|
| Where the machine id is defined in Linux kernel? (0) | 2009/07/09 |
| What has been changed in v4l2 subdev per kernel version? (0) | 2009/07/04 |
| Palm pre vs iPhone 3G vs iPhone 3GS (0) | 2009/06/27 |
| AMOLED has RGB color filter!? (0) | 2009/06/27 |
| Configuring your own vim (0) | 2009/06/09 |
Tag : v4l2, v4l2 and camera, v4l2 changes, v4l2 subdev
Send me an instant message!