From 4ea2c5aab0cf2ed26ce10dc6edcd45cbdfb81d4a Mon Sep 17 00:00:00 2001 From: "live.li" Date: Mon, 22 Oct 2018 19:10:50 +0800 Subject: [PATCH] tsync: tsync: fix av sync problem random [1/1] PD#SWPL-906 Problem: The video and audio did not synchronous randomly Solution: it seems system time increase not by vsync isr, so change the system time get interface to make sure system time increase by vsync isr when amaster mode Verify: R311&P321 32bit&64bit version Change-Id: Ib3a556ba097fc6f0c51fd4560ab8101c6e7f509c Signed-off-by: live.li --- drivers/amlogic/media/frame_sync/timestamp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/amlogic/media/frame_sync/timestamp.c b/drivers/amlogic/media/frame_sync/timestamp.c index c3e811b..c5bcf05 100644 --- a/drivers/amlogic/media/frame_sync/timestamp.c +++ b/drivers/amlogic/media/frame_sync/timestamp.c @@ -116,6 +116,9 @@ EXPORT_SYMBOL(timestamp_apts_started); u32 timestamp_pcrscr_get(void) { + if (tsync_get_mode() == TSYNC_MODE_AMASTER) + return system_time; + if (tsdemux_pcrscr_valid_cb && tsdemux_pcrscr_valid_cb()) { if (tsync_pcr_demux_pcr_used() == 0) { return system_time; -- 2.7.4