From: shuanglong.wang Date: Thu, 17 Jan 2019 09:58:00 +0000 (+0800) Subject: video: video peek do not post video start event [1/1] X-Git-Tag: hardkernel-4.9.236-104~1809 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5d6c8e67dc64a4b42c377786e0739e2b8a1f754;p=platform%2Fkernel%2Flinux-amlogic.git video: video peek do not post video start event [1/1] PD#SWPL-4317 Problem: for video peek, before audio post audio start, video may have rended. Solution: do not post video start for video peek, all wait for audio start to start pcr Verify: verify by p212 Change-Id: If5656154e30613164465f84c44d3fd1ee386d654 Signed-off-by: shuanglong.wang --- diff --git a/drivers/amlogic/media/video_sink/video.c b/drivers/amlogic/media/video_sink/video.c index 29ec179..91db6b1 100644 --- a/drivers/amlogic/media/video_sink/video.c +++ b/drivers/amlogic/media/video_sink/video.c @@ -143,6 +143,7 @@ static int omx_need_drop_frame_num; static bool omx_drop_done; static bool video_start_post; static bool videopeek; +static bool nopostvideostart; /*----omx_info bit0: keep_last_frame, bit1~31: unused----*/ static u32 omx_info = 0x1; @@ -5473,9 +5474,10 @@ static irqreturn_t vsync_isr_in(int irq, void *dev_id) if (vf) { if (hdmi_in_onvideo == 0) { - tsync_avevent_locked(VIDEO_START, - (vf->pts) ? vf->pts : - timestamp_vpts_get()); + if (nopostvideostart == false) + tsync_avevent_locked(VIDEO_START, + (vf->pts) ? vf->pts : + timestamp_vpts_get()); video_start_post = true; } @@ -6908,6 +6910,7 @@ static void video_vf_unreg_provider(void) new_frame_count = 0; first_frame_toggled = 0; videopeek = 0; + nopostvideostart = false; atomic_set(&video_unreg_flag, 1); while (atomic_read(&video_inirq_flag) > 0) @@ -7861,12 +7864,14 @@ static long amvideo_ioctl(struct file *file, unsigned int cmd, ulong arg) put_user(video_onoff_state, (u32 __user *)argp); break; } + case AMSTREAM_IOC_GET_FIRST_FRAME_TOGGLED: put_user(first_frame_toggled, (u32 __user *)argp); break; case AMSTREAM_IOC_SET_VIDEOPEEK: videopeek = true; + nopostvideostart = true; break; default: return -EINVAL;