mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
tsync: tunnel mode do not set first vpts for stream mode [1/2]
PD#SWPL-11210 Problem: stream mode set vpts in check in pts Solution: tunnel mode do not set first vpts for stream mode Verify: verify by u212 Change-Id: Ic369b83411051a819eb65ad5d1585e26e0342f3f Signed-off-by: shuanglong.wang <shuanglong.wang@amlogic.com>
This commit is contained in:
committed by
Tao Zeng
parent
432ce85b00
commit
29c4a59b2c
@@ -516,7 +516,7 @@ static int pts_checkin_offset_inline(u8 type, u32 offset, u32 val, u64 uS64)
|
||||
if (tsync_get_debug_apts() && (type == PTS_TYPE_AUDIO))
|
||||
pr_info("init apts[%d] at 0x%x\n", type, val);
|
||||
|
||||
if (type == PTS_TYPE_VIDEO)
|
||||
if (type == PTS_TYPE_VIDEO && !tsync_get_tunnel_mode())
|
||||
timestamp_vpts_set(val);
|
||||
else if (type == PTS_TYPE_AUDIO)
|
||||
timestamp_apts_set(val);
|
||||
|
||||
@@ -214,6 +214,7 @@ static int tsync_dec_reset_flag;
|
||||
static int tsync_dec_reset_video_start;
|
||||
static int tsync_automute_on;
|
||||
static int tsync_video_started;
|
||||
static int is_tunnel_mode;
|
||||
|
||||
static int debug_pts_checkin;
|
||||
static int debug_pts_checkout;
|
||||
@@ -1432,6 +1433,18 @@ int tsync_set_startsync_mode(int mode)
|
||||
}
|
||||
EXPORT_SYMBOL(tsync_set_startsync_mode);
|
||||
|
||||
int tsync_set_tunnel_mode(int mode)
|
||||
{
|
||||
return is_tunnel_mode = mode;
|
||||
}
|
||||
EXPORT_SYMBOL(tsync_set_tunnel_mode);
|
||||
|
||||
int tsync_get_tunnel_mode(void)
|
||||
{
|
||||
return is_tunnel_mode;
|
||||
}
|
||||
EXPORT_SYMBOL(tsync_get_tunnel_mode);
|
||||
|
||||
bool tsync_check_vpts_discontinuity(unsigned int vpts)
|
||||
{
|
||||
unsigned int systemtime;
|
||||
|
||||
@@ -9906,6 +9906,16 @@ static long amvideo_ioctl(struct file *file, unsigned int cmd, ulong arg)
|
||||
break;
|
||||
}
|
||||
|
||||
case AMSTREAM_IOC_SET_TUNNEL_MODE: {
|
||||
u32 tunnelmode = 0;
|
||||
|
||||
if (copy_from_user(&tunnelmode, argp, sizeof(u32)) == 0)
|
||||
tsync_set_tunnel_mode(tunnelmode);
|
||||
else
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
case AMSTREAM_IOC_GET_FIRST_FRAME_TOGGLED:
|
||||
put_user(first_frame_toggled, (u32 __user *)argp);
|
||||
break;
|
||||
@@ -10058,6 +10068,7 @@ static long amvideo_compat_ioctl(struct file *file, unsigned int cmd, ulong arg)
|
||||
case AMSTREAM_IOC_SET_VSYNC_UPINT:
|
||||
case AMSTREAM_IOC_SET_VSYNC_SLOW_FACTOR:
|
||||
case AMSTREAM_IOC_GLOBAL_SET_VIDEO_OUTPUT:
|
||||
case AMSTREAM_IOC_SET_TUNNEL_MODE:
|
||||
case AMSTREAM_IOC_GET_FIRST_FRAME_TOGGLED:
|
||||
case AMSTREAM_IOC_SET_VIDEOPEEK:
|
||||
return amvideo_ioctl(file, cmd, arg);
|
||||
|
||||
@@ -157,6 +157,10 @@ extern int tsync_set_av_threshold_max(int max);
|
||||
|
||||
extern void set_pts_realign(void);
|
||||
|
||||
extern int tsync_set_tunnel_mode(int mode);
|
||||
|
||||
extern int tsync_get_tunnel_mode(void);
|
||||
|
||||
extern void timestamp_set_pcrlatency(u32 latency);
|
||||
extern u32 timestamp_get_pcrlatency(void);
|
||||
extern bool tsync_check_vpts_discontinuity(unsigned int vpts);
|
||||
|
||||
@@ -205,6 +205,7 @@
|
||||
#define AMSTREAM_IOC_GET_OMX_VERSION _IOW((_A_M), 0xb1, int)
|
||||
#define AMSTREAM_IOC_GET_OMX_INFO _IOR((_A_M), 0xb2, unsigned int)
|
||||
#define AMSTREAM_IOC_SET_HDR_INFO _IOW((_A_M), 0xb3, int)
|
||||
#define AMSTREAM_IOC_SET_TUNNEL_MODE _IOR(_A_M, 0xbd, unsigned int)
|
||||
#define AMSTREAM_IOC_GET_FIRST_FRAME_TOGGLED _IOR(_A_M, 0xbe, unsigned int)
|
||||
#define AMSTREAM_IOC_SET_VIDEOPEEK _IOW(_A_M, 0xbf, unsigned int)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user