tsync: do not operate tsync_mode_switch before first video toggled.
authorshuanglong.wang <shuanglong.wang@amlogic.com>
Mon, 14 May 2018 06:49:39 +0000 (14:49 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Thu, 17 May 2018 13:54:11 +0000 (06:54 -0700)
commit5d61f94ef437a0923304d0cfa620a66f38a37d3c
treee60da84c16240e879ee11abaed2804a2cc944b5e
parent5ab25fe0dbb23ab7ff38e4b821fa0ac6ca5fe72f
tsync: do not operate tsync_mode_switch before first video toggled.

PD#165355: do not operate tsync_mode_switch before first video toggled.
Some stream in tunnel mode, first audio pts is large than
AV_DISCONTINUE_THREDHOLD_MAX(60s). In audio_hw it will check pcr and
apts diff, so large difference between pcr and apts will lead sync mode
from amster to vmaster
[ 2414.316223@3] vdec_init, dev_name:ammvdec_vp9,
vdec_type=VDEC_TYPE_STREAM_PARSER
[ 2414.326361@3] vp9: ver (201602101,0) decinfo: 1920x1080 rate=4000
[ 2414.326827@3] mem_start_virt failed
[ 2414.330600@3] init_pic_list ok, used_buf_num = 12
[ 2414.336555@2] set pts unstable
[ 2414.338121@2] success set parent hevc_p1_composite rate to 666666666
[ 2414.356287@0]
A-discontinue,pcr=1500,vpts=0,apts=1500,diff_pts=16209420,lugsp_5ts6
207920
[ 2414.359685@0] discontinue-tsync_mode:A->Vvptatr:S->adji
ffies=204004utsize 12179
[ 2414.366696@0] debugcnt=0x10,diff_pts=16209420,tsync_mode=0

Change-Id: I7e33abb5e6c27169ecec86fb6e4df33de6bd80cf
Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
drivers/amlogic/media/frame_sync/tsync.c