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)
committerNick Xie <nick@khadas.com>
Mon, 5 Aug 2019 06:27:06 +0000 (14:27 +0800)
commite9b39122e7d19fe6f0529bda41f1a11dc3baca7a
tree630f8043a74c0cf2ef98a5d2954b1d0e1d0b87ea
parentefbfa2302c56b22a866d783a024966018b4fa3aa
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