tsync: tsync: fix av sync problem random [1/1]
authorlive.li <live.li@amlogic.com>
Mon, 22 Oct 2018 11:10:50 +0000 (19:10 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 24 Oct 2018 05:26:31 +0000 (22:26 -0700)
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 <live.li@amlogic.com>
drivers/amlogic/media/frame_sync/timestamp.c

index c3e811b..c5bcf05 100644 (file)
@@ -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;