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

Commit 46f2efd4 authored by Dikshita Agarwal's avatar Dikshita Agarwal
Browse files

msm-vidc: return unknown ctrl for internal cvp client

CVP clients does not set any v4l2 controls on video node.
- Remove the present controls for CVP and keep the
  unknown control alone.
- In get_ctrl calls, directly pass the base control
  inst->ctrls[0] for internal CVP session.

Change-Id: I9a1c9f4638039cd93368b6a1e8335d64985e0e3b
parent 95c55336
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -510,11 +510,11 @@ int msm_vidc_cvp(struct msm_vidc_inst *inst, struct msm_vidc_arg *arg)

static struct msm_vidc_ctrl msm_cvp_ctrls[] = {
	{
		.id = V4L2_CID_MPEG_VIDC_VIDEO_SECURE,
		.name = "Secure mode",
		.type = V4L2_CTRL_TYPE_BUTTON,
		.id = V4L2_CID_MPEG_VIDEO_UNKNOWN,
		.name = "Invalid control",
		.type = V4L2_CTRL_TYPE_INTEGER,
		.minimum = 0,
		.maximum = 1,
		.maximum = 0,
		.default_value = 0,
		.step = 1,
		.menu_skip_mask = 0,
+4 −0
Original line number Diff line number Diff line
@@ -65,6 +65,10 @@ static inline struct v4l2_ctrl *get_ctrl(struct msm_vidc_inst *inst,
{
	int i;

	if (inst->session_type == MSM_VIDC_CVP &&
	    inst->core->resources.cvp_internal)
		return inst->ctrls[0];

	for (i = 0; i < inst->num_ctrls; i++) {
		if (inst->ctrls[i]->id == id)
			return inst->ctrls[i];