xref: /linux/drivers/media/dvb-frontends/cxd2880/cxd2880_tnrdmd_dvbt2_mon.h (revision c13aca79ff3c4af5fd31a5b2743a90eba6e36a26)
1*55e13167SYasunari Takiguchi /* SPDX-License-Identifier: GPL-2.0 */
2*55e13167SYasunari Takiguchi /*
3*55e13167SYasunari Takiguchi  * cxd2880_tnrdmd_dvbt2_mon.h
4*55e13167SYasunari Takiguchi  * Sony CXD2880 DVB-T2/T tuner + demodulator driver
5*55e13167SYasunari Takiguchi  * DVB-T2 monitor interface
6*55e13167SYasunari Takiguchi  *
7*55e13167SYasunari Takiguchi  * Copyright (C) 2016, 2017, 2018 Sony Semiconductor Solutions Corporation
8*55e13167SYasunari Takiguchi  */
9*55e13167SYasunari Takiguchi 
10*55e13167SYasunari Takiguchi #ifndef CXD2880_TNRDMD_DVBT2_MON_H
11*55e13167SYasunari Takiguchi #define CXD2880_TNRDMD_DVBT2_MON_H
12*55e13167SYasunari Takiguchi 
13*55e13167SYasunari Takiguchi #include "cxd2880_tnrdmd.h"
14*55e13167SYasunari Takiguchi #include "cxd2880_dvbt2.h"
15*55e13167SYasunari Takiguchi 
16*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_sync_stat(struct cxd2880_tnrdmd
17*55e13167SYasunari Takiguchi 				       *tnr_dmd, u8 *sync_stat,
18*55e13167SYasunari Takiguchi 				       u8 *ts_lock_stat,
19*55e13167SYasunari Takiguchi 				       u8 *unlock_detected);
20*55e13167SYasunari Takiguchi 
21*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_sync_stat_sub(struct cxd2880_tnrdmd
22*55e13167SYasunari Takiguchi 					   *tnr_dmd,
23*55e13167SYasunari Takiguchi 					   u8 *sync_stat,
24*55e13167SYasunari Takiguchi 					   u8 *unlock_detected);
25*55e13167SYasunari Takiguchi 
26*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_carrier_offset(struct cxd2880_tnrdmd
27*55e13167SYasunari Takiguchi 					    *tnr_dmd, int *offset);
28*55e13167SYasunari Takiguchi 
29*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_carrier_offset_sub(struct
30*55e13167SYasunari Takiguchi 						cxd2880_tnrdmd
31*55e13167SYasunari Takiguchi 						*tnr_dmd,
32*55e13167SYasunari Takiguchi 						int *offset);
33*55e13167SYasunari Takiguchi 
34*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_l1_pre(struct cxd2880_tnrdmd *tnr_dmd,
35*55e13167SYasunari Takiguchi 				    struct cxd2880_dvbt2_l1pre
36*55e13167SYasunari Takiguchi 				    *l1_pre);
37*55e13167SYasunari Takiguchi 
38*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_version(struct cxd2880_tnrdmd
39*55e13167SYasunari Takiguchi 				     *tnr_dmd,
40*55e13167SYasunari Takiguchi 				     enum cxd2880_dvbt2_version
41*55e13167SYasunari Takiguchi 				     *ver);
42*55e13167SYasunari Takiguchi 
43*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_ofdm(struct cxd2880_tnrdmd *tnr_dmd,
44*55e13167SYasunari Takiguchi 				  struct cxd2880_dvbt2_ofdm *ofdm);
45*55e13167SYasunari Takiguchi 
46*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_data_plps(struct cxd2880_tnrdmd
47*55e13167SYasunari Takiguchi 				       *tnr_dmd, u8 *plp_ids,
48*55e13167SYasunari Takiguchi 				       u8 *num_plps);
49*55e13167SYasunari Takiguchi 
50*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_active_plp(struct cxd2880_tnrdmd
51*55e13167SYasunari Takiguchi 					*tnr_dmd,
52*55e13167SYasunari Takiguchi 					enum
53*55e13167SYasunari Takiguchi 					cxd2880_dvbt2_plp_btype
54*55e13167SYasunari Takiguchi 					type,
55*55e13167SYasunari Takiguchi 					struct cxd2880_dvbt2_plp
56*55e13167SYasunari Takiguchi 					*plp_info);
57*55e13167SYasunari Takiguchi 
58*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_data_plp_error(struct cxd2880_tnrdmd
59*55e13167SYasunari Takiguchi 					    *tnr_dmd,
60*55e13167SYasunari Takiguchi 					    u8 *plp_error);
61*55e13167SYasunari Takiguchi 
62*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_l1_change(struct cxd2880_tnrdmd
63*55e13167SYasunari Takiguchi 				       *tnr_dmd, u8 *l1_change);
64*55e13167SYasunari Takiguchi 
65*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_l1_post(struct cxd2880_tnrdmd
66*55e13167SYasunari Takiguchi 				     *tnr_dmd,
67*55e13167SYasunari Takiguchi 				     struct cxd2880_dvbt2_l1post
68*55e13167SYasunari Takiguchi 				     *l1_post);
69*55e13167SYasunari Takiguchi 
70*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_bbheader(struct cxd2880_tnrdmd
71*55e13167SYasunari Takiguchi 				      *tnr_dmd,
72*55e13167SYasunari Takiguchi 				      enum cxd2880_dvbt2_plp_btype
73*55e13167SYasunari Takiguchi 				      type,
74*55e13167SYasunari Takiguchi 				      struct cxd2880_dvbt2_bbheader
75*55e13167SYasunari Takiguchi 				      *bbheader);
76*55e13167SYasunari Takiguchi 
77*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_in_bandb_ts_rate(struct cxd2880_tnrdmd
78*55e13167SYasunari Takiguchi 					      *tnr_dmd,
79*55e13167SYasunari Takiguchi 					      enum
80*55e13167SYasunari Takiguchi 					      cxd2880_dvbt2_plp_btype
81*55e13167SYasunari Takiguchi 					      type,
82*55e13167SYasunari Takiguchi 					      u32 *ts_rate_bps);
83*55e13167SYasunari Takiguchi 
84*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_spectrum_sense(struct cxd2880_tnrdmd
85*55e13167SYasunari Takiguchi 					    *tnr_dmd,
86*55e13167SYasunari Takiguchi 					    enum
87*55e13167SYasunari Takiguchi 					    cxd2880_tnrdmd_spectrum_sense
88*55e13167SYasunari Takiguchi 					    *sense);
89*55e13167SYasunari Takiguchi 
90*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_snr(struct cxd2880_tnrdmd *tnr_dmd,
91*55e13167SYasunari Takiguchi 				 int *snr);
92*55e13167SYasunari Takiguchi 
93*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_snr_diver(struct cxd2880_tnrdmd
94*55e13167SYasunari Takiguchi 				       *tnr_dmd, int *snr,
95*55e13167SYasunari Takiguchi 				       int *snr_main,
96*55e13167SYasunari Takiguchi 				       int *snr_sub);
97*55e13167SYasunari Takiguchi 
98*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_packet_error_number(struct
99*55e13167SYasunari Takiguchi 						 cxd2880_tnrdmd
100*55e13167SYasunari Takiguchi 						 *tnr_dmd,
101*55e13167SYasunari Takiguchi 						 u32 *pen);
102*55e13167SYasunari Takiguchi 
103*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_sampling_offset(struct cxd2880_tnrdmd
104*55e13167SYasunari Takiguchi 					     *tnr_dmd, int *ppm);
105*55e13167SYasunari Takiguchi 
106*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_sampling_offset_sub(struct
107*55e13167SYasunari Takiguchi 						 cxd2880_tnrdmd
108*55e13167SYasunari Takiguchi 						 *tnr_dmd,
109*55e13167SYasunari Takiguchi 						 int *ppm);
110*55e13167SYasunari Takiguchi 
111*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_qam(struct cxd2880_tnrdmd *tnr_dmd,
112*55e13167SYasunari Takiguchi 				 enum cxd2880_dvbt2_plp_btype type,
113*55e13167SYasunari Takiguchi 				 enum cxd2880_dvbt2_plp_constell
114*55e13167SYasunari Takiguchi 				 *qam);
115*55e13167SYasunari Takiguchi 
116*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_code_rate(struct cxd2880_tnrdmd
117*55e13167SYasunari Takiguchi 				       *tnr_dmd,
118*55e13167SYasunari Takiguchi 				       enum cxd2880_dvbt2_plp_btype
119*55e13167SYasunari Takiguchi 				       type,
120*55e13167SYasunari Takiguchi 				       enum
121*55e13167SYasunari Takiguchi 				       cxd2880_dvbt2_plp_code_rate
122*55e13167SYasunari Takiguchi 				       *code_rate);
123*55e13167SYasunari Takiguchi 
124*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_profile(struct cxd2880_tnrdmd
125*55e13167SYasunari Takiguchi 				     *tnr_dmd,
126*55e13167SYasunari Takiguchi 				     enum cxd2880_dvbt2_profile
127*55e13167SYasunari Takiguchi 				     *profile);
128*55e13167SYasunari Takiguchi 
129*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_ssi(struct cxd2880_tnrdmd *tnr_dmd,
130*55e13167SYasunari Takiguchi 				 u8 *ssi);
131*55e13167SYasunari Takiguchi 
132*55e13167SYasunari Takiguchi int cxd2880_tnrdmd_dvbt2_mon_ssi_sub(struct cxd2880_tnrdmd
133*55e13167SYasunari Takiguchi 				     *tnr_dmd, u8 *ssi);
134*55e13167SYasunari Takiguchi 
135*55e13167SYasunari Takiguchi #endif
136