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

Commit 52de7be5 authored by Maheshwar Ajja's avatar Maheshwar Ajja
Browse files

msm: vidc: Fix unsupported codec error from video driver



- Client is getting unsupported codec error for set format
  sometimes after opening the video driver because driver
  was not updated with supported codecs information from
  video hardware.
- The same issue can be fixed by waiting for the driver state
  changed to CORE_INIT_DONE, which ensures the supported codecs
  information will be updated in video driver, before checking
  the supported codecs information.

CRs-fixed: 590158
Change-Id: Ia9132fdc01e4fa53533a3c9d14069d49501fa7d7
Signed-off-by: default avatarMaheshwar Ajja <majja@codeaurora.org>
parent 29228509
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1211,11 +1211,17 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
			rc = -EINVAL;
			goto err_invalid_fmt;
		}
		rc = msm_comm_try_state(inst, MSM_VIDC_CORE_INIT_DONE);
		if (rc) {
			dprintk(VIDC_ERR, "Failed to initialize instance\n");
			goto err_invalid_fmt;
		}
		if (!(get_hal_codec_type(fmt->fourcc) &
			inst->core->dec_codec_supported)) {
			dprintk(VIDC_ERR,
				"Codec(0x%x) not supported\n",
				get_hal_codec_type(fmt->fourcc));
				"Codec(0x%x) is not present in the supported codecs list(0x%x)\n",
				get_hal_codec_type(fmt->fourcc),
				inst->core->dec_codec_supported);
			rc = -EINVAL;
			goto err_invalid_fmt;
		}