vdin: add reset_tvin_smr.
authorxuhua zhang <xuhua.zhang@amlogic.com>
Thu, 7 Jun 2018 06:15:16 +0000 (14:15 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Thu, 14 Jun 2018 05:29:50 +0000 (22:29 -0700)
PD#167053: vdin: add reset_tvin_smr.

when cutting table, need reset tvin smr.

Change-Id: Ibe95526b696f73c0f17ff456b17cfb11afafac1b
Signed-off-by: xuhua zhang <xuhua.zhang@amlogic.com>
drivers/amlogic/media/vin/tvin/vdin/vdin_drv.c
drivers/amlogic/media/vin/tvin/vdin/vdin_sm.c
drivers/amlogic/media/vin/tvin/vdin/vdin_sm.h

index e3057ec7b081025268c528dfc28d4dcbb4cad505..76814b7343969d968fec0c0b119a324ed6af1455 100644 (file)
@@ -1969,6 +1969,7 @@ static long vdin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                        pr_info("TVIN_IOC_STOP_DEC(%d) port %s, decode stop ok\n\n",
                                parm->index, tvin_port_str(parm->port));
                mutex_unlock(&devp->fe_lock);
+               reset_tvin_smr(parm->index);
                break;
        }
        case TVIN_IOC_VF_REG:
index 0879fb4069067a3ad934a1c5e96ab18beb58ffe5..4e5a98c3951312a10e81edbc2017e9549ae9f2c2 100644 (file)
@@ -287,6 +287,11 @@ static void hdmirx_dv_check(struct vdin_dev_s *devp,
        }
 }
 
+void reset_tvin_smr(unsigned int index)
+{
+       sm_dev[index].sig_status = TVIN_SIG_STATUS_NULL;
+}
+
 /*
  * tvin state machine routine
  *
index 5b289bfdeb3de4d05770ccff3422389ce87abe90..b3009111cc5b67d3e0240302cf890714a428e305 100644 (file)
@@ -51,6 +51,7 @@ struct tvin_sm_s {
 };
 void tvin_smr(struct vdin_dev_s *pdev);
 void tvin_smr_init(int index);
+void reset_tvin_smr(unsigned int index);
 
 enum tvin_sm_status_e tvin_get_sm_status(int index);