}
EXPORT_SYMBOL(timestamp_pcrscr_get);
+void timestamp_set_pcrlatency(u32 latency)
+{
+ if (latency < 500 * 90)
+ pcrscr_lantcy = latency;
+}
+EXPORT_SYMBOL(timestamp_set_pcrlatency);
+
+u32 timestamp_get_pcrlatency(void)
+{
+ return pcrscr_lantcy;
+}
+EXPORT_SYMBOL(timestamp_get_pcrlatency);
+
u32 timestamp_tsdemux_pcr_get(void)
{
if (tsdemux_pcrscr_get_cb)
return sprintf(buf, "0x%x\n", tsync_get_startsync_mode());
}
+static ssize_t show_latency(struct class *class,
+ struct class_attribute *attr, char *buf)
+{
+ return sprintf(buf, "%u\n", timestamp_get_pcrlatency());
+}
+
+static ssize_t store_latency(struct class *class,
+ struct class_attribute *attr,
+ const char *buf, size_t size)
+{
+ unsigned int latency = 0;
+ ssize_t r;
+
+ r = kstrtoint(buf, 0, &latency);
+ if (r != 0)
+ return -EINVAL;
+ timestamp_set_pcrlatency(latency);
+ return size;
+}
static ssize_t show_apts_lookup(struct class *class,
struct class_attribute *attrr, char *buf)
NULL),
__ATTR(checkin_firstapts, 0644, show_checkin_firstapts,
NULL),
+ __ATTR(pts_latency, 0664, show_latency, store_latency),
__ATTR_NULL
};
extern void set_pts_realign(void);
+extern void timestamp_set_pcrlatency(u32 latency);
+extern u32 timestamp_get_pcrlatency(void);
+
static inline u32 tsync_vpts_discontinuity_margin(void)
{
return tsync_get_av_threshold_min();