avsync: fix the avsync issue when pcrmaster [1/1]
authorXiaoming Sui <xiaoming.sui@amlogic.com>
Fri, 26 Apr 2019 10:42:46 +0000 (18:42 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Tue, 7 May 2019 07:17:44 +0000 (00:17 -0700)
commit099f0e2c4b4b7f0dae998dfe9cdfe6bd979d4a02
tree2343da5b10fd7b535de40fba65f80b6f8a8ed33b
parent671b3b914dfc7410b9d1cc4fb22faaf671fa8914
avsync: fix the avsync issue when pcrmaster [1/1]

PD#SWPL-7775

Problem:
dtv video freeze when the stream is replayed

Solution:
when replay at pcrmaster, check the vpts and systime,
if the vpts > systime and the diff > margin,
then adjust the sysclk to make playback smooth.

Verify:
X301

Change-Id: Id1474db030e06fff6ce425a54562cfa4e02ceaa9
Signed-off-by: Xiaoming Sui <xiaoming.sui@amlogic.com>
drivers/amlogic/media/frame_sync/tsync.c
drivers/amlogic/media/frame_sync/tsync_pcr.c
drivers/amlogic/media/video_sink/video.c
include/linux/amlogic/media/frame_sync/tsync.h