How to extend a V4L2 control

Showing results for 
Search instead for 
Did you mean: 

How to extend a V4L2 control

Contributor IV


I work with a i.MX6Q and connected an quad video encoder chip over CSI-0 interface. The encoder chip streams the data via BT656 and has a I2C control bus.

On software side I use the mxc_v4l2_capture.c drive and a modified ov5640.c driver.

In basic it works. I can display a stream via Gstreamer.

But I want to add a control for switching between the 4 input lines of my encoder chip.

My first thought was to add new control on base of V4L2_CID_USER_IMX_BASE.

So I call a IOCTL function with VIDIOC_S_CTRL and a parameter maybe V4L2_CID_USER_IMX_BASE.

But in that case I had to modify the mxc_v4l2_capture.c and my driver.

It's a way, but is it the right way? If I do that in that way, is there a possibility to control the capture input of my encoder chip by a standard application like v4l2-ctl?

Are ther other, better, ways to do that?



Labels (3)
0 Kudos
1 Reply

NXP TechSupport
NXP TechSupport

why don't you add the control to the encoder side, you can control the encoder to switch different streams to the imx6Q? imx6Q just handle this stream as it did before

0 Kudos