From 3e7994b2a02019dce8a17e4c77dd9e6c13041948 Mon Sep 17 00:00:00 2001 From: Shi Zhongbo Date: Mon, 14 Sep 2020 16:38:32 +0800 Subject: [PATCH] msm: venc: enable VUI timing for native recorder Enable VUI timing info when using native recorder by default. Change-Id: I1edb9d8b9bcd84e06bcd0f52429bda96af5d0de3 Signed-off-by: Shi Zhongbo --- msm/vidc/msm_venc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/msm/vidc/msm_venc.c b/msm/vidc/msm_venc.c index 00296c346b95..faea1871f65f 100644 --- a/msm/vidc/msm_venc.c +++ b/msm/vidc/msm_venc.c @@ -4161,7 +4161,7 @@ int msm_venc_set_vui_timing_info(struct msm_vidc_inst *inst) struct hfi_device *hdev; struct v4l2_ctrl *ctrl; struct hfi_vui_timing_info timing_info; - bool cfr; + bool cfr, native_recorder; u32 codec; if (!inst || !inst->core) { @@ -4174,8 +4174,13 @@ int msm_venc_set_vui_timing_info(struct msm_vidc_inst *inst) if (codec != V4L2_PIX_FMT_H264 && codec != V4L2_PIX_FMT_HEVC) return 0; + native_recorder = false; + ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VENC_NATIVE_RECORDER); + if (ctrl->val == V4L2_MPEG_MSM_VIDC_ENABLE) + native_recorder = true; + ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_VUI_TIMING_INFO); - if (ctrl->val == V4L2_MPEG_MSM_VIDC_DISABLE) + if (ctrl->val == V4L2_MPEG_MSM_VIDC_DISABLE && native_recorder == false) return 0; switch (inst->rc_type) {