Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0792bc4 authored by Vaibhav Deshu Venkatesh's avatar Vaibhav Deshu Venkatesh Committed by Gerrit - the friendly Code Review server
Browse files

msm: vidc: venc: v4l2 checks for extended controls.



Extended control calls are not routed through v4l2 now.
This change uses v4l2 framework to check for extended
control range and clip if the values are out of range.

CRs-Fixed: 1010707
Change-Id: I5ada818c45511362b4ca5c0526e26cdb3fafa387
Signed-off-by: default avatarVaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
parent 345c814e
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -886,6 +886,16 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = {
		.step = 1,
		.qmenu = NULL,
	},
	{
		.id = V4L2_CID_MPEG_VIDC_VIDEO_LAYER_ID,
		.name = "Layer ID for different settings",
		.type = V4L2_CTRL_TYPE_INTEGER,
		.minimum = 0,
		.maximum = 6,
		.default_value = 0,
		.step = 1,
		.qmenu = NULL,
	},
	{
		.id = V4L2_CID_MPEG_VIDC_VENC_PARAM_SAR_WIDTH,
		.name = "SAR Width",
@@ -2437,6 +2447,9 @@ int msm_venc_s_ext_ctrl(struct msm_vidc_inst *inst,
		return -EINVAL;
	}

	/* This will check the range for contols and clip if necessary */
	v4l2_try_ext_ctrls(&inst->ctrl_handler, ctrl);

	hdev = inst->core->device;
	cap = &inst->capability;