From: live.li Date: Wed, 24 Apr 2019 08:12:26 +0000 (+0800) Subject: avsync: tsync: enable the system up function [1/1] X-Git-Tag: khadas-vims-v0.9.6-release~483 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55670e12c0cadd192d611cdeef09b9cd289a5c64;p=platform%2Fkernel%2Flinux-amlogic.git avsync: tsync: enable the system up function [1/1] PD#TV-5140 Problem: when play some ts stream , the video will hold all the time Solution: when the pcr is invalid ,use apts or vpts as system time and enable the system time up funciton Verify: x301 Change-Id: Iec01434ab305be1ea32e03549edd8521a8c4620d Signed-off-by: live.li --- diff --git a/drivers/amlogic/media/frame_sync/tsync_pcr.c b/drivers/amlogic/media/frame_sync/tsync_pcr.c index 60b70d6..7c51001 100644 --- a/drivers/amlogic/media/frame_sync/tsync_pcr.c +++ b/drivers/amlogic/media/frame_sync/tsync_pcr.c @@ -374,7 +374,8 @@ void tsync_pcr_pcrscr_set(void) if (abs(cur_pcr - min_checkinpts) > PLAY_PCR_INVALID_THRESHOLD) { ref_pcr = min_checkinpts; - timestamp_pcrscr_set(ref_pcr); + timestamp_pcrscr_set(ref_pcr); + timestamp_pcrscr_enable(1); tsync_use_demux_pcr = 0; if (tsync_pcr_debug&0x01) { pr_info("check init.first_pcr=0x%x, first_apts=0x%x, ", @@ -412,6 +413,7 @@ void tsync_pcr_pcrscr_set(void) if (abs(cur_pcr - first_apts) > PLAY_PCR_INVALID_THRESHOLD) { ref_pcr = first_apts; timestamp_pcrscr_set(ref_pcr); + timestamp_pcrscr_enable(1); tsync_use_demux_pcr = 0; if (tsync_pcr_debug&0x01) { pr_info("check init.first_pcr=0x%x, first_apts=0x%x, ", @@ -447,6 +449,7 @@ void tsync_pcr_pcrscr_set(void) if (abs(cur_pcr - first_vpts) > PLAY_PCR_INVALID_THRESHOLD) { ref_pcr = min_checkinpts; timestamp_pcrscr_set(ref_pcr); + timestamp_pcrscr_enable(1); tsync_use_demux_pcr = 0; if (tsync_pcr_debug&0x01) { pr_info("check init.first_pcr=0x%x, first_apts=0x%x, ", @@ -979,7 +982,8 @@ static void tsync_pcr_check_timer_func(unsigned long arg) tsync_pcr_check(); spin_unlock_irqrestore(&tsync_pcr_lock, flags); - tsync_pcr_check_timer.expires = jiffies + TEN_MS_INTERVAL; + tsync_pcr_check_timer.expires = + (unsigned long)(jiffies + TEN_MS_INTERVAL); add_timer(&tsync_pcr_check_timer); } @@ -1045,7 +1049,7 @@ int tsync_pcr_start(void) init_timer(&tsync_pcr_check_timer); tsync_pcr_check_timer.function = tsync_pcr_check_timer_func; - tsync_pcr_check_timer.expires = jiffies; + tsync_pcr_check_timer.expires = (unsigned long)jiffies; first_time_record = (jiffies * TIME_UNIT90K) / HZ; tsync_pcr_started = 1;