• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * include/linux/amlogic/media/frame_sync/timestamp.h
3  *
4  * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  */
17 
18 #ifndef TIMESTAMP_H
19 #define TIMESTAMP_H
20 
21 #ifdef CONFIG_AMAUDIO
22 extern int resample_delta;
23 #endif
24 
25 extern u32 timestamp_vpts_get(void);
26 
27 extern void timestamp_vpts_set(u32 pts);
28 
29 extern void timestamp_vpts_inc(s32 val);
30 
31 u64 timestamp_vpts_get_u64(void);
32 
33 void timestamp_vpts_set_u64(u64 pts);
34 
35 void timestamp_vpts_inc_u64(s32 val);
36 
37 extern u32 timestamp_apts_get(void);
38 
39 u64 timestamp_apts_get_u64(void);
40 
41 extern void timestamp_apts_set(u32 pts);
42 
43 extern void timestamp_apts_inc(s32 val);
44 
45 extern u32 timestamp_pcrscr_get(void);
46 
47 u64 timestamp_pcrscr_get_u64(void);
48 
49 extern void timestamp_pcrscr_set(u32 pts);
50 
51 extern void timestamp_pcrscr_inc(s32 val);
52 
53 extern void timestamp_pcrscr_inc_scale(s32 inc, u32 base);
54 
55 extern void timestamp_pcrscr_enable(u32 enable);
56 
57 extern u32 timestamp_pcrscr_enable_state(void);
58 
59 extern void timestamp_pcrscr_set_adj(s32 inc);
60 
61 extern void timestamp_pcrscr_set_adj_pcr(s32 inc);
62 
63 extern void timestamp_apts_enable(u32 enable);
64 
65 extern void timestamp_apts_start(u32 enable);
66 
67 extern u32 timestamp_apts_started(void);
68 
69 extern void timestamp_firstvpts_set(u32 pts);
70 
71 extern u32 timestamp_firstvpts_get(void);
72 
73 extern void timestamp_checkin_firstvpts_set(u32 pts);
74 
75 extern u32 timestamp_checkin_firstvpts_get(void);
76 
77 extern void timestamp_checkin_firstapts_set(u32 pts);
78 
79 extern u32 timestamp_checkin_firstapts_get(void);
80 
81 extern void timestamp_firstapts_set(u32 pts);
82 
83 extern u32 timestamp_firstapts_get(void);
84 
85 extern u32 timestamp_tsdemux_pcr_get(void);
86 
87 #endif /* TIMESTAMP_H */
88