From 989a9bc31f92f69920c14127330f574bf0ebe7f9 Mon Sep 17 00:00:00 2001 From: Rico Yang Date: Mon, 3 Aug 2020 01:12:16 +0800 Subject: [PATCH] media_modules: make h264 encoder compatible with older socs [1/1] PD#SWPL-25846 Problem: h264 encoder not working on old socs pre-sc2 Solution: make h264 encoder compatible with older socs Verify: verified on franklin Change-Id: I1ddbea32748069be06ee344ec1dbf8987a5b350b Signed-off-by: Rico Yang --- drivers/frame_sink/encoder/h264/encoder.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/frame_sink/encoder/h264/encoder.c b/drivers/frame_sink/encoder/h264/encoder.c index 66a3f6c..9421b93 100644 --- a/drivers/frame_sink/encoder/h264/encoder.c +++ b/drivers/frame_sink/encoder/h264/encoder.c @@ -4496,11 +4496,13 @@ static s32 amvenc_avc_probe(struct platform_device *pdev) #endif } - if (hcodec_clk_prepare(&pdev->dev, &s_hcodec_clks)) { - //err = -ENOENT; - enc_pr(LOG_ERROR, "[%s:%d] probe hcodec enc failed\n", __FUNCTION__, __LINE__); - //goto ERROR_PROBE_DEVICE; - return -EINVAL; + if (get_cpu_type() >= MESON_CPU_MAJOR_ID_SC2) { + if (hcodec_clk_prepare(&pdev->dev, &s_hcodec_clks)) { + //err = -ENOENT; + enc_pr(LOG_ERROR, "[%s:%d] probe hcodec enc failed\n", __FUNCTION__, __LINE__); + //goto ERROR_PROBE_DEVICE; + return -EINVAL; + } } if (get_cpu_type() >= MESON_CPU_MAJOR_ID_SC2) { -- 2.20.1