avin: fix av detect issue for tl1 [1/1]
authorNian Jing <nian.jing@amlogic.com>
Wed, 23 Jan 2019 11:54:49 +0000 (19:54 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 25 Jan 2019 09:49:02 +0000 (01:49 -0800)
PD#SWPL-4397

Problem:
hotplug incorrect report when av playing some video

Solution:
when avplay,disable the avdetect

Verify:
verified by x301

Change-Id: Iaa5d2473611ff9c3f0a0787ff74a27982ee72580
Signed-off-by: Nian Jing <nian.jing@amlogic.com>
drivers/amlogic/media/vin/tvin/tvafe/tvafe.c

index 6cd3ff3..d683868 100644 (file)
@@ -352,7 +352,8 @@ void tvafe_dec_start(struct tvin_frontend_s *fe, enum tvin_sig_fmt_e fmt)
                W_APB_REG(CVD2_H_LOOP_MAXSTATE, 0x9);
 
 #ifdef CONFIG_AMLOGIC_MEDIA_TVIN_AVDETECT
-       if (tvafe_cpu_type() == CPU_TYPE_TXLX) {
+       if (tvafe_cpu_type() == CPU_TYPE_TXLX ||
+               tvafe_cpu_type() == CPU_TYPE_TL1) {
                if (port == TVIN_PORT_CVBS1)
                        tvafe_avin_detect_ch1_anlog_enable(0);
                else if (port == TVIN_PORT_CVBS2)
@@ -418,7 +419,8 @@ void tvafe_dec_stop(struct tvin_frontend_s *fe, enum tvin_port_e port)
                tvafe_cvd2_set_default_de(&tvafe->cvd2);
        }
 #ifdef CONFIG_AMLOGIC_MEDIA_TVIN_AVDETECT
-       if (tvafe_cpu_type() == CPU_TYPE_TXLX) {
+       if (tvafe_cpu_type() == CPU_TYPE_TXLX ||
+               tvafe_cpu_type() == CPU_TYPE_TL1) {
                if (port == TVIN_PORT_CVBS1)
                        tvafe_avin_detect_ch1_anlog_enable(1);
                else if (port == TVIN_PORT_CVBS2)