From 53efc9d267380ba248f7a7bc31f94069a464037e Mon Sep 17 00:00:00 2001 From: "shihong.zheng" Date: Sat, 8 Jun 2019 11:45:51 +0800 Subject: [PATCH] ptsserv: add first pts64 check in. [1/1] PD#OTT-4173 Problem: video stuck after seek. first pts64 is abnormal when lookup failed. Solution: add first pts64 checkin for lookup failed. Verify: w400 Change-Id: Ibb2a15815311598cf47c242cb4c369da0f0cbdd2 Signed-off-by: shihong.zheng --- drivers/amlogic/media/frame_sync/ptsserv.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/amlogic/media/frame_sync/ptsserv.c b/drivers/amlogic/media/frame_sync/ptsserv.c index a900579..7571ccb 100644 --- a/drivers/amlogic/media/frame_sync/ptsserv.c +++ b/drivers/amlogic/media/frame_sync/ptsserv.c @@ -70,6 +70,7 @@ struct pts_table_s { unsigned long buf_start; u32 buf_size; int first_checkin_pts; + u64 first_checkin_pts_uS64; int first_lookup_ok; int first_lookup_is_fail; /*1: first lookup fail;*/ /*0: first lookup success */ @@ -444,25 +445,28 @@ static int pts_checkin_offset_inline(u8 type, u32 offset, u32 val, u64 uS64) if (type == PTS_TYPE_VIDEO && pTable->first_checkin_pts == -1) { pTable->first_checkin_pts = val; + pTable->first_checkin_pts_uS64 = uS64; timestamp_checkin_firstvpts_set(val); /* *if(tsync_get_debug_pts_checkin() && * tsync_get_debug_vpts()) { */ - pr_debug("first check in vpts <0x%x:0x%x> ok!\n", - offset, - val); + pr_debug( + "first check in vpts <0x%x:0x%x(0x%llx)> ok!\n", + offset, val, uS64); /* } */ } if (type == PTS_TYPE_AUDIO && pTable->first_checkin_pts == -1) { pTable->first_checkin_pts = val; + pTable->first_checkin_pts_uS64 = uS64; timestamp_checkin_firstapts_set(val); /* *if (tsync_get_debug_pts_checkin() && * tsync_get_debug_apts()) { */ - pr_info("first check in apts <0x%x:0x%x> ok!\n", offset, - val); + pr_info( + "first check in apts <0x%x:0x%x(0x%llx)> ok!\n", + offset, val, uS64); /* } */ } @@ -928,7 +932,7 @@ static int pts_lookup_offset_inline_locked(u8 type, u32 offset, u32 *val, */ if (!pTable->first_lookup_ok) { *val = pTable->first_checkin_pts; - *uS64 = (u64)(*val) << 32; + *uS64 = pTable->first_checkin_pts_uS64; pTable->first_lookup_ok = 1; pTable->first_lookup_is_fail = 1; -- 2.7.4