mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
media: vivid: add HDMI Video Guard Band control
Add a vivid control to insert the HDMI Video Guard Band in the image. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
5a531791ed
commit
aabcc21d0b
1 changed files with 14 additions and 0 deletions
|
@ -46,6 +46,7 @@
|
|||
#define VIVID_CID_INSERT_SAV (VIVID_CID_VIVID_BASE + 6)
|
||||
#define VIVID_CID_INSERT_EAV (VIVID_CID_VIVID_BASE + 7)
|
||||
#define VIVID_CID_VBI_CAP_INTERLACED (VIVID_CID_VIVID_BASE + 8)
|
||||
#define VIVID_CID_INSERT_HDMI_VIDEO_GUARD_BAND (VIVID_CID_VIVID_BASE + 9)
|
||||
|
||||
#define VIVID_CID_HFLIP (VIVID_CID_VIVID_BASE + 20)
|
||||
#define VIVID_CID_VFLIP (VIVID_CID_VIVID_BASE + 21)
|
||||
|
@ -474,6 +475,9 @@ static int vivid_vid_cap_s_ctrl(struct v4l2_ctrl *ctrl)
|
|||
case VIVID_CID_INSERT_EAV:
|
||||
tpg_s_insert_eav(&dev->tpg, ctrl->val);
|
||||
break;
|
||||
case VIVID_CID_INSERT_HDMI_VIDEO_GUARD_BAND:
|
||||
tpg_s_insert_hdmi_video_guard_band(&dev->tpg, ctrl->val);
|
||||
break;
|
||||
case VIVID_CID_HFLIP:
|
||||
dev->sensor_hflip = ctrl->val;
|
||||
tpg_s_hflip(&dev->tpg, dev->sensor_hflip ^ dev->hflip);
|
||||
|
@ -660,6 +664,15 @@ static const struct v4l2_ctrl_config vivid_ctrl_insert_eav = {
|
|||
.step = 1,
|
||||
};
|
||||
|
||||
static const struct v4l2_ctrl_config vivid_ctrl_insert_hdmi_video_guard_band = {
|
||||
.ops = &vivid_vid_cap_ctrl_ops,
|
||||
.id = VIVID_CID_INSERT_HDMI_VIDEO_GUARD_BAND,
|
||||
.name = "Insert Video Guard Band",
|
||||
.type = V4L2_CTRL_TYPE_BOOLEAN,
|
||||
.max = 1,
|
||||
.step = 1,
|
||||
};
|
||||
|
||||
static const struct v4l2_ctrl_config vivid_ctrl_hflip = {
|
||||
.ops = &vivid_vid_cap_ctrl_ops,
|
||||
.id = VIVID_CID_HFLIP,
|
||||
|
@ -1638,6 +1651,7 @@ int vivid_create_controls(struct vivid_dev *dev, bool show_ccs_cap,
|
|||
v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_vflip, NULL);
|
||||
v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_insert_sav, NULL);
|
||||
v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_insert_eav, NULL);
|
||||
v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_insert_hdmi_video_guard_band, NULL);
|
||||
v4l2_ctrl_new_custom(hdl_vid_cap, &vivid_ctrl_reduced_fps, NULL);
|
||||
if (show_ccs_cap) {
|
||||
dev->ctrl_has_crop_cap = v4l2_ctrl_new_custom(hdl_vid_cap,
|
||||
|
|
Loading…
Reference in a new issue