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);
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;
}
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;
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;
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);
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);
#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)