blob: d318197a40a8718eaf90d48430359a76aa307526 [file] [log] [blame]
Chuanzhi Wang10a382f2020-09-03 15:34:38 +08001/*
2 * frontend.h
3 *
4 * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
hualing chen002e5b92022-02-23 17:51:21 +08005 * Ralph Metzler <ralph@convergence.de>
6 * Holger Waechtler <holger@convergence.de>
7 * Andre Draszik <ad@convergence.de>
8 * for convergence integrated media GmbH
Chuanzhi Wang10a382f2020-09-03 15:34:38 +08009 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * as published by the Free Software Foundation; either version 2.1
13 * of the License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 *
24 */
25
26#ifndef _DVBFRONTEND_H_
27#define _DVBFRONTEND_H_
28
29#define CONFIG_AMLOGIC_DVB_COMPAT
30#include <linux/types.h>
31#ifdef CONFIG_AMLOGIC_DVB_COMPAT
32#include <linux/videodev2.h>
33#endif
34
35enum fe_type {
hualing chen002e5b92022-02-23 17:51:21 +080036 FE_QPSK,
37 FE_QAM,
38 FE_OFDM,
39 FE_ATSC,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080040#ifdef CONFIG_AMLOGIC_DVB_COMPAT
hualing chen002e5b92022-02-23 17:51:21 +080041 FE_ANALOG,
42 FE_DTMB,
43 FE_ISDBT
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080044#endif
45};
46
47enum fe_caps {
hualing chen002e5b92022-02-23 17:51:21 +080048 FE_IS_STUPID = 0,
49 FE_CAN_INVERSION_AUTO = 0x1,
50 FE_CAN_FEC_1_2 = 0x2,
51 FE_CAN_FEC_2_3 = 0x4,
52 FE_CAN_FEC_3_4 = 0x8,
53 FE_CAN_FEC_4_5 = 0x10,
54 FE_CAN_FEC_5_6 = 0x20,
55 FE_CAN_FEC_6_7 = 0x40,
56 FE_CAN_FEC_7_8 = 0x80,
57 FE_CAN_FEC_8_9 = 0x100,
58 FE_CAN_FEC_AUTO = 0x200,
59 FE_CAN_QPSK = 0x400,
60 FE_CAN_QAM_16 = 0x800,
61 FE_CAN_QAM_32 = 0x1000,
62 FE_CAN_QAM_64 = 0x2000,
63 FE_CAN_QAM_128 = 0x4000,
64 FE_CAN_QAM_256 = 0x8000,
65 FE_CAN_QAM_AUTO = 0x10000,
66 FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
67 FE_CAN_BANDWIDTH_AUTO = 0x40000,
68 FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
69 FE_CAN_HIERARCHY_AUTO = 0x100000,
70 FE_CAN_8VSB = 0x200000,
71 FE_CAN_16VSB = 0x400000,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080072/* We need more bitspace for newer APIs, indicate this. */
hualing chen002e5b92022-02-23 17:51:21 +080073 FE_HAS_EXTENDED_CAPS = 0x800000,
74 FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
75 FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080076/* frontend supports "2nd generation modulation" (DVB-S2) */
hualing chen002e5b92022-02-23 17:51:21 +080077 FE_CAN_2G_MODULATION = 0x10000000,
78 FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
79 FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
80 FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080081};
82#ifdef CONFIG_AMLOGIC_DVB_COMPAT
83#define FE_CAN_3_LAYER FE_CAN_MULTISTREAM
84#endif
85struct dvb_frontend_info {
hualing chen002e5b92022-02-23 17:51:21 +080086 char name[128];
87 enum fe_type type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
88 __u32 frequency_min;
89 __u32 frequency_max;
90 __u32 frequency_stepsize;
91 __u32 frequency_tolerance;
92 __u32 symbol_rate_min;
93 __u32 symbol_rate_max;
94 __u32 symbol_rate_tolerance; /* ppm */
95 __u32 notifier_delay; /* DEPRECATED */
96 enum fe_caps caps;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080097};
98
99
100/**
101 * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
102 * the meaning of this struct...
103 */
104struct dvb_diseqc_master_cmd {
hualing chen002e5b92022-02-23 17:51:21 +0800105 __u8 msg [6]; /* { framing, address, command, data [3] } */
106 __u8 msg_len; /* valid values are 3...6 */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800107};
108
109struct dvb_diseqc_slave_reply {
hualing chen002e5b92022-02-23 17:51:21 +0800110 __u8 msg [4]; /* { framing, data [3] } */
111 __u8 msg_len; /* valid values are 0...4, 0 means no msg */
112 int timeout; /* return from ioctl after timeout ms with */
113}; /* errorcode when no message was received */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800114
115enum fe_sec_voltage {
hualing chen002e5b92022-02-23 17:51:21 +0800116 SEC_VOLTAGE_13,
117 SEC_VOLTAGE_18,
118 SEC_VOLTAGE_OFF,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800119};
120
121enum fe_sec_tone_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800122 SEC_TONE_ON,
123 SEC_TONE_OFF
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800124};
125
126enum fe_sec_mini_cmd {
hualing chen002e5b92022-02-23 17:51:21 +0800127 SEC_MINI_A,
128 SEC_MINI_B
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800129};
130
131/**
132 * enum fe_status - enumerates the possible frontend status
hualing chen002e5b92022-02-23 17:51:21 +0800133 * @FE_HAS_SIGNAL: found something above the noise level
134 * @FE_HAS_CARRIER: found a DVB signal
135 * @FE_HAS_VITERBI: FEC is stable
136 * @FE_HAS_SYNC: found sync bytes
137 * @FE_HAS_LOCK: everything's working
138 * @FE_TIMEDOUT: no lock within the last ~2 seconds
139 * @FE_REINIT: frontend was reinitialized, application is recommended
140 * to reset DiSEqC, tone and parameters
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800141 */
142enum fe_status {
hualing chen002e5b92022-02-23 17:51:21 +0800143 FE_HAS_SIGNAL = 0x01, /* found something above the noise level */
144 FE_HAS_CARRIER = 0x02, /* found a DVB signal */
145 FE_HAS_VITERBI = 0x04, /* FEC is stable */
146 FE_HAS_SYNC = 0x08, /* found sync bytes */
147 FE_HAS_LOCK = 0x10, /* everything's working... */
148 FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */
149 FE_REINIT = 0x40, /* frontend was reinitialized, */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800150#ifdef CONFIG_AMLOGIC_DVB_COMPAT
hualing chen002e5b92022-02-23 17:51:21 +0800151 BLINDSCAN_NONEDO = 0x80, /* not blind scan */
152 BLINDSCAN_UPDATESTARTFREQ = 0x100, /* blind scan update start freq */
153 BLINDSCAN_UPDATEPROCESS = 0x200, /* blind scan update process */
154 BLINDSCAN_UPDATERESULTFREQ = 0x400/* blind scan update result */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800155#endif
156}; /* application is recommended to reset */
157/* DiSEqC, tone and parameters */
158
159enum fe_spectral_inversion {
hualing chen002e5b92022-02-23 17:51:21 +0800160 INVERSION_OFF,
161 INVERSION_ON,
162 INVERSION_AUTO
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800163};
164
165enum fe_code_rate {
hualing chen002e5b92022-02-23 17:51:21 +0800166 FEC_NONE = 0,
167 FEC_1_2,
168 FEC_2_3,
169 FEC_3_4,
170 FEC_4_5,
171 FEC_5_6,
172 FEC_6_7,
173 FEC_7_8,
174 FEC_8_9,
175 FEC_AUTO,
176 FEC_3_5,
177 FEC_9_10,
178 FEC_2_5,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800179};
180
181enum fe_modulation {
hualing chen002e5b92022-02-23 17:51:21 +0800182 QPSK,
183 QAM_16,
184 QAM_32,
185 QAM_64,
186 QAM_128,
187 QAM_256,
188 QAM_AUTO,
189 VSB_8,
190 VSB_16,
191 PSK_8,
192 APSK_16,
193 APSK_32,
194 DQPSK,
195 QAM_4_NR,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800196};
197
198enum fe_transmit_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800199 TRANSMISSION_MODE_2K,
200 TRANSMISSION_MODE_8K,
201 TRANSMISSION_MODE_AUTO,
202 TRANSMISSION_MODE_4K,
203 TRANSMISSION_MODE_1K,
204 TRANSMISSION_MODE_16K,
205 TRANSMISSION_MODE_32K,
206 TRANSMISSION_MODE_C1,
207 TRANSMISSION_MODE_C3780,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800208};
209
210enum fe_guard_interval {
hualing chen002e5b92022-02-23 17:51:21 +0800211 GUARD_INTERVAL_1_32,
212 GUARD_INTERVAL_1_16,
213 GUARD_INTERVAL_1_8,
214 GUARD_INTERVAL_1_4,
215 GUARD_INTERVAL_AUTO,
216 GUARD_INTERVAL_1_128,
217 GUARD_INTERVAL_19_128,
218 GUARD_INTERVAL_19_256,
219 GUARD_INTERVAL_PN420,
220 GUARD_INTERVAL_PN595,
221 GUARD_INTERVAL_PN945,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800222};
223
224enum fe_hierarchy {
hualing chen002e5b92022-02-23 17:51:21 +0800225 HIERARCHY_NONE,
226 HIERARCHY_1,
227 HIERARCHY_2,
228 HIERARCHY_4,
229 HIERARCHY_AUTO
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800230};
231
232enum fe_interleaving {
hualing chen002e5b92022-02-23 17:51:21 +0800233 INTERLEAVING_NONE,
234 INTERLEAVING_AUTO,
235 INTERLEAVING_240,
236 INTERLEAVING_720,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800237};
238
239#ifdef CONFIG_AMLOGIC_DVB_COMPAT
240struct fe_blind_scan_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800241 /* minimum tuner frequency in kHz */
242 __u32 min_frequency;
243 /* maximum tuner frequency in kHz */
244 __u32 max_frequency;
245 /* minimum symbol rate in sym/sec */
246 __u32 min_symbol_rate;
247 /* maximum symbol rate in sym/sec */
248 __u32 max_symbol_rate;
249 /* search range in kHz. freq -/+freqRange will be searched */
250 __u32 frequency_range;
251 /* tuner step frequency in kHz */
252 __u32 frequency_step;
253 /* blindscan event timeout */
254 __s32 timeout;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800255};
256#endif
257
258/* S2API Commands */
hualing chen002e5b92022-02-23 17:51:21 +0800259#define DTV_UNDEFINED 0
260#define DTV_TUNE 1
261#define DTV_CLEAR 2
262#define DTV_FREQUENCY 3
263#define DTV_MODULATION 4
264#define DTV_BANDWIDTH_HZ 5
265#define DTV_INVERSION 6
266#define DTV_DISEQC_MASTER 7
267#define DTV_SYMBOL_RATE 8
268#define DTV_INNER_FEC 9
269#define DTV_VOLTAGE 10
270#define DTV_TONE 11
271#define DTV_PILOT 12
272#define DTV_ROLLOFF 13
273#define DTV_DISEQC_SLAVE_REPLY 14
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800274
275/* Basic enumeration set for querying unlimited capabilities */
hualing chen002e5b92022-02-23 17:51:21 +0800276#define DTV_FE_CAPABILITY_COUNT 15
277#define DTV_FE_CAPABILITY 16
278#define DTV_DELIVERY_SYSTEM 17
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800279
280/* ISDB-T and ISDB-Tsb */
hualing chen002e5b92022-02-23 17:51:21 +0800281#define DTV_ISDBT_PARTIAL_RECEPTION 18
282#define DTV_ISDBT_SOUND_BROADCASTING 19
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800283
hualing chen002e5b92022-02-23 17:51:21 +0800284#define DTV_ISDBT_SB_SUBCHANNEL_ID 20
285#define DTV_ISDBT_SB_SEGMENT_IDX 21
286#define DTV_ISDBT_SB_SEGMENT_COUNT 22
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800287
hualing chen002e5b92022-02-23 17:51:21 +0800288#define DTV_ISDBT_LAYERA_FEC 23
289#define DTV_ISDBT_LAYERA_MODULATION 24
290#define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25
291#define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800292
hualing chen002e5b92022-02-23 17:51:21 +0800293#define DTV_ISDBT_LAYERB_FEC 27
294#define DTV_ISDBT_LAYERB_MODULATION 28
295#define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29
296#define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800297
hualing chen002e5b92022-02-23 17:51:21 +0800298#define DTV_ISDBT_LAYERC_FEC 31
299#define DTV_ISDBT_LAYERC_MODULATION 32
300#define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33
301#define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800302
hualing chen002e5b92022-02-23 17:51:21 +0800303#define DTV_API_VERSION 35
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800304
hualing chen002e5b92022-02-23 17:51:21 +0800305#define DTV_CODE_RATE_HP 36
306#define DTV_CODE_RATE_LP 37
307#define DTV_GUARD_INTERVAL 38
308#define DTV_TRANSMISSION_MODE 39
309#define DTV_HIERARCHY 40
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800310
hualing chen002e5b92022-02-23 17:51:21 +0800311#define DTV_ISDBT_LAYER_ENABLED 41
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800312
hualing chen002e5b92022-02-23 17:51:21 +0800313#define DTV_STREAM_ID 42
314#define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID
315#define DTV_DVBT2_PLP_ID_LEGACY 43
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800316
hualing chen002e5b92022-02-23 17:51:21 +0800317#define DTV_ENUM_DELSYS 44
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800318#ifdef CONFIG_AMLOGIC_DVB_COMPAT
319#define DTV_DVBT2_PLP_ID DTV_DVBT2_PLP_ID_LEGACY
320#endif
321/* ATSC-MH */
hualing chen002e5b92022-02-23 17:51:21 +0800322#define DTV_ATSCMH_FIC_VER 45
323#define DTV_ATSCMH_PARADE_ID 46
324#define DTV_ATSCMH_NOG 47
325#define DTV_ATSCMH_TNOG 48
326#define DTV_ATSCMH_SGN 49
327#define DTV_ATSCMH_PRC 50
328#define DTV_ATSCMH_RS_FRAME_MODE 51
329#define DTV_ATSCMH_RS_FRAME_ENSEMBLE 52
330#define DTV_ATSCMH_RS_CODE_MODE_PRI 53
331#define DTV_ATSCMH_RS_CODE_MODE_SEC 54
332#define DTV_ATSCMH_SCCC_BLOCK_MODE 55
333#define DTV_ATSCMH_SCCC_CODE_MODE_A 56
334#define DTV_ATSCMH_SCCC_CODE_MODE_B 57
335#define DTV_ATSCMH_SCCC_CODE_MODE_C 58
336#define DTV_ATSCMH_SCCC_CODE_MODE_D 59
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800337
hualing chen002e5b92022-02-23 17:51:21 +0800338#define DTV_INTERLEAVING 60
339#define DTV_LNA 61
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800340
341/* Quality parameters */
hualing chen002e5b92022-02-23 17:51:21 +0800342#define DTV_STAT_SIGNAL_STRENGTH 62
343#define DTV_STAT_CNR 63
344#define DTV_STAT_PRE_ERROR_BIT_COUNT 64
345#define DTV_STAT_PRE_TOTAL_BIT_COUNT 65
346#define DTV_STAT_POST_ERROR_BIT_COUNT 66
347#define DTV_STAT_POST_TOTAL_BIT_COUNT 67
348#define DTV_STAT_ERROR_BLOCK_COUNT 68
349#define DTV_STAT_TOTAL_BLOCK_COUNT 69
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800350
351#ifdef CONFIG_AMLOGIC_DVB_COMPAT
352
353/* Get tne TS input of the frontend */
Chuangcheng Peng6a9df482020-12-29 13:50:48 +0800354#define DTV_TS_INPUT 100
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800355/* Blind scan */
Chuangcheng Peng6a9df482020-12-29 13:50:48 +0800356#define DTV_START_BLIND_SCAN 101
357#define DTV_CANCEL_BLIND_SCAN 102
358#define DTV_BLIND_SCAN_MIN_FRE 103
359#define DTV_BLIND_SCAN_MAX_FRE 104
360#define DTV_BLIND_SCAN_MIN_SRATE 105
361#define DTV_BLIND_SCAN_MAX_SRATE 106
362#define DTV_BLIND_SCAN_FRE_RANGE 107
363#define DTV_BLIND_SCAN_FRE_STEP 108
364#define DTV_BLIND_SCAN_TIMEOUT 109
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800365/* Blind scan end*/
hualing chen002e5b92022-02-23 17:51:21 +0800366#define DTV_DELIVERY_SUB_SYSTEM 110
367#define DTV_MAX_COMMAND DTV_DELIVERY_SUB_SYSTEM
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800368
369#else /*!defined(CONFIG_AMLOGIC_DVB_COMPAT)*/
370
hualing chen002e5b92022-02-23 17:51:21 +0800371#define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800372
373#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
374
375
376enum fe_pilot {
hualing chen002e5b92022-02-23 17:51:21 +0800377 PILOT_ON,
378 PILOT_OFF,
379 PILOT_AUTO,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800380};
381
382enum fe_rolloff {
hualing chen002e5b92022-02-23 17:51:21 +0800383 ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
384 ROLLOFF_20,
385 ROLLOFF_25,
386 ROLLOFF_AUTO,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800387};
388
389enum fe_delivery_system {
hualing chen002e5b92022-02-23 17:51:21 +0800390 SYS_UNDEFINED,
391 SYS_DVBC_ANNEX_A,
392 SYS_DVBC_ANNEX_B,
393 SYS_DVBT,
394 SYS_DSS,
395 SYS_DVBS,
396 SYS_DVBS2,
397 SYS_DVBH,
398 SYS_ISDBT,
399 SYS_ISDBS,
400 SYS_ISDBC,
401 SYS_ATSC,
402 SYS_ATSCMH,
403 SYS_DTMB,
404 SYS_CMMB,
405 SYS_DAB,
406 SYS_DVBT2,
407 SYS_TURBO,
408 SYS_DVBC_ANNEX_C,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800409#ifdef CONFIG_AMLOGIC_DVB_COMPAT
hualing chen002e5b92022-02-23 17:51:21 +0800410 SYS_ANALOG
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800411#endif
412};
413
414/* backward compatibility */
hualing chen002e5b92022-02-23 17:51:21 +0800415#define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800416#define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB instead */
417
418/* ATSC-MH */
419
420enum atscmh_sccc_block_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800421 ATSCMH_SCCC_BLK_SEP = 0,
422 ATSCMH_SCCC_BLK_COMB = 1,
423 ATSCMH_SCCC_BLK_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800424};
425
426enum atscmh_sccc_code_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800427 ATSCMH_SCCC_CODE_HLF = 0,
428 ATSCMH_SCCC_CODE_QTR = 1,
429 ATSCMH_SCCC_CODE_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800430};
431
432enum atscmh_rs_frame_ensemble {
hualing chen002e5b92022-02-23 17:51:21 +0800433 ATSCMH_RSFRAME_ENS_PRI = 0,
434 ATSCMH_RSFRAME_ENS_SEC = 1,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800435};
436
437enum atscmh_rs_frame_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800438 ATSCMH_RSFRAME_PRI_ONLY = 0,
439 ATSCMH_RSFRAME_PRI_SEC = 1,
440 ATSCMH_RSFRAME_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800441};
442
443enum atscmh_rs_code_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800444 ATSCMH_RSCODE_211_187 = 0,
445 ATSCMH_RSCODE_223_187 = 1,
446 ATSCMH_RSCODE_235_187 = 2,
447 ATSCMH_RSCODE_RES = 3,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800448};
449
hualing chen002e5b92022-02-23 17:51:21 +0800450#define NO_STREAM_ID_FILTER (~0U)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800451#define LNA_AUTO (~0U)
452
453struct dtv_cmds_h {
hualing chen002e5b92022-02-23 17:51:21 +0800454 char *name; /* A display name for debugging purposes */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800455
hualing chen002e5b92022-02-23 17:51:21 +0800456 __u32 cmd; /* A unique ID */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800457
hualing chen002e5b92022-02-23 17:51:21 +0800458 /* Flags */
459 __u32 set:1; /* Either a set or get property */
460 __u32 buffer:1; /* Does this property use the buffer? */
461 __u32 reserved:30; /* Align */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800462};
463
464/**
465 * Scale types for the quality parameters.
466 * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That
hualing chen002e5b92022-02-23 17:51:21 +0800467 * could indicate a temporary or a permanent
468 * condition.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800469 * @FE_SCALE_DECIBEL: The scale is measured in 0.001 dB steps, typically
hualing chen002e5b92022-02-23 17:51:21 +0800470 * used on signal measures.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800471 * @FE_SCALE_RELATIVE: The scale is a relative percentual measure,
hualing chen002e5b92022-02-23 17:51:21 +0800472 * ranging from 0 (0%) to 0xffff (100%).
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800473 * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like
hualing chen002e5b92022-02-23 17:51:21 +0800474 * bit error, block error, lapsed time.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800475 */
476enum fecap_scale_params {
hualing chen002e5b92022-02-23 17:51:21 +0800477 FE_SCALE_NOT_AVAILABLE = 0,
478 FE_SCALE_DECIBEL,
479 FE_SCALE_RELATIVE,
480 FE_SCALE_COUNTER
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800481};
482
483/**
484 * struct dtv_stats - Used for reading a DTV status property
485 *
hualing chen002e5b92022-02-23 17:51:21 +0800486 * @value: value of the measure. Should range from 0 to 0xffff;
487 * @scale: Filled with enum fecap_scale_params - the scale
488 * in usage for that parameter
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800489 *
490 * For most delivery systems, this will return a single value for each
491 * parameter.
492 * It should be noticed, however, that new OFDM delivery systems like
493 * ISDB can use different modulation types for each group of carriers.
494 * On such standards, up to 8 groups of statistics can be provided, one
495 * for each carrier group (called "layer" on ISDB).
496 * In order to be consistent with other delivery systems, the first
497 * value refers to the entire set of carriers ("global").
498 * dtv_status:scale should use the value FE_SCALE_NOT_AVAILABLE when
499 * the value for the entire group of carriers or from one specific layer
500 * is not provided by the hardware.
501 * st.len should be filled with the latest filled status + 1.
502 *
503 * In other words, for ISDB, those values should be filled like:
hualing chen002e5b92022-02-23 17:51:21 +0800504 * u.st.stat.svalue[0] = global statistics;
505 * u.st.stat.scale[0] = FE_SCALE_DECIBEL;
506 * u.st.stat.value[1] = layer A statistics;
507 * u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available);
508 * u.st.stat.svalue[2] = layer B statistics;
509 * u.st.stat.scale[2] = FE_SCALE_DECIBEL;
510 * u.st.stat.svalue[3] = layer C statistics;
511 * u.st.stat.scale[3] = FE_SCALE_DECIBEL;
512 * u.st.len = 4;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800513 */
514struct dtv_stats {
hualing chen002e5b92022-02-23 17:51:21 +0800515 __u8 scale; /* enum fecap_scale_params type */
516 union {
517 __u64 uvalue; /* for counters and relative scales */
518 __s64 svalue; /* for 0.001 dB measures */
519 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800520} __attribute__ ((packed));
521
522
523#define MAX_DTV_STATS 4
524
525struct dtv_fe_stats {
hualing chen002e5b92022-02-23 17:51:21 +0800526 __u8 len;
527 struct dtv_stats stat[MAX_DTV_STATS];
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800528} __attribute__ ((packed));
529
530struct dtv_property {
hualing chen002e5b92022-02-23 17:51:21 +0800531 __u32 cmd;
532 __u32 reserved[3];
533 union {
534 __u32 data;
535 struct dtv_fe_stats st;
536 struct {
537 __u8 data[32];
538 __u32 len;
539 __u32 reserved1[3];
540 void *reserved2;
541 } buffer;
542 } u;
543 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800544} __attribute__ ((packed));
545
546struct dtv_property_32 {
hualing chen002e5b92022-02-23 17:51:21 +0800547 __u32 cmd;
548 __u32 reserved[3];
549 union {
550 __u32 data;
551 struct dtv_fe_stats st;
552 struct {
553 __u8 data[32];
554 __u32 len;
555 __u32 reserved1[3];
556 __u32 reserved2;
557 } buffer;
558 } u;
559 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800560} __attribute__ ((packed));
561
562struct dtv_property_64 {
hualing chen002e5b92022-02-23 17:51:21 +0800563 __u32 cmd;
564 __u32 reserved[3];
565 union {
566 __u32 data;
567 struct dtv_fe_stats st;
568 struct {
569 __u8 data[32];
570 __u32 len;
571 __u32 reserved1[3];
572 __u64 reserved2;
573 } buffer;
574 } u;
575 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800576} __attribute__ ((packed));
577
578/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
579#define DTV_IOCTL_MAX_MSGS 64
580
581struct dtv_properties {
hualing chen002e5b92022-02-23 17:51:21 +0800582 __u32 num;
583 struct dtv_property *props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800584};
585
586struct dtv_properties_32 {
hualing chen002e5b92022-02-23 17:51:21 +0800587 __u32 num;
588 __u32 props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800589};
590
591struct dtv_properties_64 {
hualing chen002e5b92022-02-23 17:51:21 +0800592 __u32 num;
593 __u64 props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800594};
595
596#if defined(__DVB_CORE__) || !defined (__KERNEL__)
597
598/*
599 * DEPRECATED: The DVBv3 ioctls, structs and enums should not be used on
600 * newer programs, as it doesn't support the second generation of digital
601 * TV standards, nor supports newer delivery systems.
602 */
603
604enum fe_bandwidth {
hualing chen002e5b92022-02-23 17:51:21 +0800605 BANDWIDTH_8_MHZ,
606 BANDWIDTH_7_MHZ,
607 BANDWIDTH_6_MHZ,
608 BANDWIDTH_AUTO,
609 BANDWIDTH_5_MHZ,
610 BANDWIDTH_10_MHZ,
611 BANDWIDTH_1_712_MHZ,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800612};
613
614/* This is needed for legacy userspace support */
615typedef enum fe_sec_voltage fe_sec_voltage_t;
616typedef enum fe_caps fe_caps_t;
617typedef enum fe_type fe_type_t;
618typedef enum fe_sec_tone_mode fe_sec_tone_mode_t;
619typedef enum fe_sec_mini_cmd fe_sec_mini_cmd_t;
620typedef enum fe_status fe_status_t;
621typedef enum fe_spectral_inversion fe_spectral_inversion_t;
622typedef enum fe_code_rate fe_code_rate_t;
623typedef enum fe_modulation fe_modulation_t;
624typedef enum fe_transmit_mode fe_transmit_mode_t;
625typedef enum fe_bandwidth fe_bandwidth_t;
626typedef enum fe_guard_interval fe_guard_interval_t;
627typedef enum fe_hierarchy fe_hierarchy_t;
628typedef enum fe_pilot fe_pilot_t;
629typedef enum fe_rolloff fe_rolloff_t;
630typedef enum fe_delivery_system fe_delivery_system_t;
631
632#ifdef CONFIG_AMLOGIC_DVB_COMPAT
633enum fe_ofdm_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800634 OFDM_DVBT,
635 OFDM_DVBT2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800636};
637#endif
638
639struct dvb_qpsk_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800640 __u32 symbol_rate; /* symbol rate in Symbols per second */
641 fe_code_rate_t fec_inner; /* forward error correction (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800642};
643
644struct dvb_qam_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800645 __u32 symbol_rate; /* symbol rate in Symbols per second */
646 fe_code_rate_t fec_inner; /* forward error correction (see above) */
647 fe_modulation_t modulation; /* modulation type (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800648};
649
650struct dvb_vsb_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800651 fe_modulation_t modulation; /* modulation type (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800652};
653
654struct dvb_ofdm_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800655 fe_bandwidth_t bandwidth;
656 fe_code_rate_t code_rate_HP; /* high priority stream code rate */
657 fe_code_rate_t code_rate_LP; /* low priority stream code rate */
658 fe_modulation_t constellation; /* modulation type (see above) */
659 fe_transmit_mode_t transmission_mode;
660 fe_guard_interval_t guard_interval;
661 fe_hierarchy_t hierarchy_information;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800662};
663
664#ifdef CONFIG_AMLOGIC_DVB_COMPAT
665#define ANALOG_FLAG_ENABLE_AFC 0X00000001
666#define ANALOG_FLAG_MANUL_SCAN 0x00000011
667struct dvb_analog_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800668 /*V4L2_TUNER_MODE_MONO,V4L2_TUNER_MODE_STEREO,*/
669 /*V4L2_TUNER_MODE_LANG2,V4L2_TUNER_MODE_SAP,*/
670 /*V4L2_TUNER_MODE_LANG1,V4L2_TUNER_MODE_LANG1_LANG2 */
671 unsigned int audmode;
672 unsigned int soundsys; /*A2,BTSC,EIAJ,NICAM */
673 v4l2_std_id std;
674 unsigned int flag;
675 unsigned int afc_range;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800676};
677#endif
678
679struct dvb_frontend_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800680 /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
681 __u32 frequency;
682 /* intermediate frequency in kHz for DVB-S */
683 fe_spectral_inversion_t inversion;
684 union {
685 struct dvb_qpsk_parameters qpsk; /* DVB-S */
686 struct dvb_qam_parameters qam; /* DVB-C */
687 struct dvb_ofdm_parameters ofdm; /* DVB-T */
688 struct dvb_vsb_parameters vsb; /* ATSC */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800689#if 0 && defined(CONFIG_AMLOGIC_DVB_COMPAT)
hualing chen002e5b92022-02-23 17:51:21 +0800690 struct dvb_analog_parameters analog;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800691#endif
hualing chen002e5b92022-02-23 17:51:21 +0800692 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800693};
694
695#ifdef CONFIG_AMLOGIC_DVB_COMPAT
696
697struct dvb_frontend_parameters_ex {
hualing chen002e5b92022-02-23 17:51:21 +0800698 __u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
699 /* intermediate frequency in kHz for DVB-S */
700 fe_spectral_inversion_t inversion;
701 union {
702 struct dvb_qpsk_parameters qpsk; /* DVB-S */
703 struct dvb_qam_parameters qam; /* DVB-C */
704 struct dvb_ofdm_parameters ofdm; /* DVB-T */
705 struct dvb_vsb_parameters vsb; /* ATSC */
706 struct dvb_analog_parameters analog;
Wentao MA270dc0f2022-08-23 13:17:26 +0800707 /* Add extension data here */
hualing chen002e5b92022-02-23 17:51:21 +0800708 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800709};
710
711/*
712static char dvb_check_frontend_parameters_size[
hualing chen002e5b92022-02-23 17:51:21 +0800713 (sizeof(struct dvb_frontend_parameters_ex)
714 == sizeof(struct dvb_frontend_parameters)) ? 1 : -1]
715 __attribute__((__unused__));
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800716*/
717
718#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
719
720struct dvb_frontend_event {
hualing chen002e5b92022-02-23 17:51:21 +0800721 fe_status_t status;
722 struct dvb_frontend_parameters parameters;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800723};
724#ifdef CONFIG_AMLOGIC_DVB_COMPAT
725/* Satellite blind scan event */
726struct dvbsx_blindscanevent {
hualing chen002e5b92022-02-23 17:51:21 +0800727 enum fe_status status;
728 union {
729 /* The percentage completion of the*/
730 /*blind scan procedure. A value of*/
731 /*100 indicates that the blind scan*/
732 /*is finished. */
733 __u16 m_uiprogress;
734 /*The start scan frequency in units of kHz.*/
735 /*The minimum value depends on the tuner*/
736 /*specification.*/
737 __u32 m_uistartfreq_khz;
738 /* Blind scan channel info. */
739 struct dvb_frontend_parameters parameters;
740 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800741};
742#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
743#endif
744
hualing chen002e5b92022-02-23 17:51:21 +0800745#define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties)
746#define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800747
748#define FE_SET_PROPERTY_32 _IOW('o', 82, struct dtv_properties_32)
749#define FE_GET_PROPERTY_32 _IOR('o', 83, struct dtv_properties_32)
750
751#define FE_SET_PROPERTY_64 _IOW('o', 82, struct dtv_properties_64)
752#define FE_GET_PROPERTY_64 _IOR('o', 83, struct dtv_properties_64)
753
754#ifdef CONFIG_AMLOGIC_DVB_COMPAT
755/*for atv*/
756struct tuner_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800757 unsigned int frequency;
758 unsigned int rssi;
759 unsigned char mode;/*dtv:0 or atv:1*/
760 unsigned char tuner_locked;/*notlocked:0,locked:1*/
761 union {
762 void *ressrved;
763 __u64 reserved1;
764 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800765};
766
767
768struct atv_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800769 unsigned char atv_lock;/*notlocked:0,locked 1*/
770 v4l2_std_id std;
771 unsigned int audmode;
772 int snr;
773 int afc;
774 union {
775 void *resrvred;
776 __u64 reserved1;
777 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800778};
779
780struct sound_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800781 unsigned short sound_sys;/*A2DK/A2BG/NICAM BG/NICAM DK/BTSC/EIAJ*/
782 unsigned short sound_mode;/*SETERO/DUAL/MONO/SAP*/
783 union {
784 void *resrvred;
785 __u64 reserved1;
786 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800787};
788
789
790enum tuner_param_cmd_e {
hualing chen002e5b92022-02-23 17:51:21 +0800791 TUNER_CMD_AUDIO_MUTE = 0x0000,
792 TUNER_CMD_AUDIO_ON,
793 TUNER_CMD_TUNER_POWER_ON,
794 TUNER_CMD_TUNER_POWER_DOWN,
795 TUNER_CMD_SET_VOLUME,
796 TUNER_CMD_SET_LEAP_SETP_SIZE,
797 TUNER_CMD_GET_MONO_MODE,
798 TUNER_CMD_SET_BEST_LOCK_RANGE,
799 TUNER_CMD_GET_BEST_LOCK_RANGE,
800 TUNER_CMD_SET_CVBS_AMP_OUT,
801 TUNER_CMD_GET_CVBS_AMP_OUT,
802 TUNER_CMD_NULL,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800803};
804
805
806/*parameter for set param box*/
807struct tuner_param_s {
hualing chen002e5b92022-02-23 17:51:21 +0800808 enum tuner_param_cmd_e cmd;
809 unsigned int parm;
Wentao MA270dc0f2022-08-23 13:17:26 +0800810 unsigned int reserved;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800811};
812
813
814enum fe_layer {
hualing chen002e5b92022-02-23 17:51:21 +0800815 Layer_A_B_C,
816 Layer_A,
817 Layer_B,
818 Layer_C,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800819};
820
821// typedef struct dvb_analog_parameters dvb_analog_parameters_t;
822// typedef struct tuner_status_s tuner_status_t;
823// typedef struct atv_status_s atv_status_t;
824// typedef struct sound_status_s sound_status_t;
825// typedef enum tuner_param_cmd_e tuner_param_cmd_t;
826// typedef struct tuner_param_s tuner_param_t;
827// typedef enum fe_layer fe_layer_t;
828// typedef enum fe_ofdm_mode fe_ofdm_mode_t;
829
830
831/* Satellite blind scan settings */
832struct dvbsx_blindscanpara {
hualing chen002e5b92022-02-23 17:51:21 +0800833 __u32 minfrequency;/* minimum tuner frequency in kHz */
834 __u32 maxfrequency;/* maximum tuner frequency in kHz */
835 __u32 minSymbolRate;/* minimum symbol rate in sym/sec */
836 __u32 maxSymbolRate;/* maximum symbol rate in sym/sec */
837 /*search range in kHz. freq -/+freqRange will be searched */
838 __u32 frequencyRange;
839 __u32 frequencyStep;/* tuner step frequency in kHz */
840 __s32 timeout;/* blindscan event timeout*/
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800841};
842#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
843/**
844 * When set, this flag will disable any zigzagging or other "normal" tuning
845 * behaviour. Additionally, there will be no automatic monitoring of the lock
846 * status, and hence no frontend events will be generated. If a frontend device
847 * is closed, this flag will be automatically turned off when the device is
848 * reopened read-write.
849 */
850#define FE_TUNE_MODE_ONESHOT 0x01
851
hualing chen002e5b92022-02-23 17:51:21 +0800852#define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800853
854#define FE_DISEQC_RESET_OVERLOAD _IO('o', 62)
855#define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd)
856#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
857#define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */
858
hualing chen002e5b92022-02-23 17:51:21 +0800859#define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */
860#define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800861#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */
862
hualing chen002e5b92022-02-23 17:51:21 +0800863#define FE_READ_STATUS _IOR('o', 69, fe_status_t)
864#define FE_READ_BER _IOR('o', 70, __u32)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800865#define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16)
hualing chen002e5b92022-02-23 17:51:21 +0800866#define FE_READ_SNR _IOR('o', 72, __u16)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800867#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
868
hualing chen002e5b92022-02-23 17:51:21 +0800869#define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters)
870#define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800871#define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */
hualing chen002e5b92022-02-23 17:51:21 +0800872#define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800873
874#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
875
876#ifdef CONFIG_AMLOGIC_DVB_COMPAT
877/*need del this ioctl, used set PROPERTY instead*/
878#define FE_SET_DELAY _IO('o', 100)
879#define FE_READ_AFC _IOR('o', 91, __u32)
880#define FE_FINE_TUNE _IOW('o', 92, __u32)
881#define FE_READ_TUNER_STATUS _IOR('o', 93, struct tuner_status_s)
882#define FE_READ_ANALOG_STATUS _IOR('o', 94, struct atv_status_s)
883#define FE_READ_SD_STATUS _IOR('o', 95, struct sound_status_s)
884/*set & get the tuner parameters only atv*/
885#define FE_SET_PARAM_BOX _IOWR('o', 97, struct tuner_param_s)
886#define FE_SET_AFC _IOW('o', 98, __u32)
887#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
888
889#endif /*_DVBFRONTEND_H_*/