blob: 457133bf6751cfc5d91c8705e15552c81460c57f [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
zhicheng.huangf92bcce2022-10-12 20:13:20 +0800365#define DTV_SINGLE_CABLE_VER 110
366#define DTV_SINGLE_CABLE_USER_BAND 111
367#define DTV_SINGLE_CABLE_BAND_FRE 112
368#define DTV_SINGLE_CABLE_BANK 113
369#define DTV_SINGLE_CABLE_UNCOMMITTED 114
370#define DTV_SINGLE_CABLE_COMMITTED 115
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800371/* Blind scan end*/
zhicheng.huangf92bcce2022-10-12 20:13:20 +0800372#define DTV_DELIVERY_SUB_SYSTEM 116
hualing chen002e5b92022-02-23 17:51:21 +0800373#define DTV_MAX_COMMAND DTV_DELIVERY_SUB_SYSTEM
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800374
375#else /*!defined(CONFIG_AMLOGIC_DVB_COMPAT)*/
376
hualing chen002e5b92022-02-23 17:51:21 +0800377#define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800378
379#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
380
381
382enum fe_pilot {
hualing chen002e5b92022-02-23 17:51:21 +0800383 PILOT_ON,
384 PILOT_OFF,
385 PILOT_AUTO,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800386};
387
388enum fe_rolloff {
hualing chen002e5b92022-02-23 17:51:21 +0800389 ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
390 ROLLOFF_20,
391 ROLLOFF_25,
392 ROLLOFF_AUTO,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800393};
394
395enum fe_delivery_system {
hualing chen002e5b92022-02-23 17:51:21 +0800396 SYS_UNDEFINED,
397 SYS_DVBC_ANNEX_A,
398 SYS_DVBC_ANNEX_B,
399 SYS_DVBT,
400 SYS_DSS,
401 SYS_DVBS,
402 SYS_DVBS2,
403 SYS_DVBH,
404 SYS_ISDBT,
405 SYS_ISDBS,
406 SYS_ISDBC,
407 SYS_ATSC,
408 SYS_ATSCMH,
409 SYS_DTMB,
410 SYS_CMMB,
411 SYS_DAB,
412 SYS_DVBT2,
413 SYS_TURBO,
414 SYS_DVBC_ANNEX_C,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800415#ifdef CONFIG_AMLOGIC_DVB_COMPAT
hualing chen002e5b92022-02-23 17:51:21 +0800416 SYS_ANALOG
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800417#endif
418};
419
420/* backward compatibility */
hualing chen002e5b92022-02-23 17:51:21 +0800421#define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800422#define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB instead */
423
424/* ATSC-MH */
425
426enum atscmh_sccc_block_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800427 ATSCMH_SCCC_BLK_SEP = 0,
428 ATSCMH_SCCC_BLK_COMB = 1,
429 ATSCMH_SCCC_BLK_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800430};
431
432enum atscmh_sccc_code_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800433 ATSCMH_SCCC_CODE_HLF = 0,
434 ATSCMH_SCCC_CODE_QTR = 1,
435 ATSCMH_SCCC_CODE_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800436};
437
438enum atscmh_rs_frame_ensemble {
hualing chen002e5b92022-02-23 17:51:21 +0800439 ATSCMH_RSFRAME_ENS_PRI = 0,
440 ATSCMH_RSFRAME_ENS_SEC = 1,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800441};
442
443enum atscmh_rs_frame_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800444 ATSCMH_RSFRAME_PRI_ONLY = 0,
445 ATSCMH_RSFRAME_PRI_SEC = 1,
446 ATSCMH_RSFRAME_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800447};
448
449enum atscmh_rs_code_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800450 ATSCMH_RSCODE_211_187 = 0,
451 ATSCMH_RSCODE_223_187 = 1,
452 ATSCMH_RSCODE_235_187 = 2,
453 ATSCMH_RSCODE_RES = 3,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800454};
455
hualing chen002e5b92022-02-23 17:51:21 +0800456#define NO_STREAM_ID_FILTER (~0U)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800457#define LNA_AUTO (~0U)
458
459struct dtv_cmds_h {
hualing chen002e5b92022-02-23 17:51:21 +0800460 char *name; /* A display name for debugging purposes */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800461
hualing chen002e5b92022-02-23 17:51:21 +0800462 __u32 cmd; /* A unique ID */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800463
hualing chen002e5b92022-02-23 17:51:21 +0800464 /* Flags */
465 __u32 set:1; /* Either a set or get property */
466 __u32 buffer:1; /* Does this property use the buffer? */
467 __u32 reserved:30; /* Align */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800468};
469
470/**
471 * Scale types for the quality parameters.
472 * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That
hualing chen002e5b92022-02-23 17:51:21 +0800473 * could indicate a temporary or a permanent
474 * condition.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800475 * @FE_SCALE_DECIBEL: The scale is measured in 0.001 dB steps, typically
hualing chen002e5b92022-02-23 17:51:21 +0800476 * used on signal measures.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800477 * @FE_SCALE_RELATIVE: The scale is a relative percentual measure,
hualing chen002e5b92022-02-23 17:51:21 +0800478 * ranging from 0 (0%) to 0xffff (100%).
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800479 * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like
hualing chen002e5b92022-02-23 17:51:21 +0800480 * bit error, block error, lapsed time.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800481 */
482enum fecap_scale_params {
hualing chen002e5b92022-02-23 17:51:21 +0800483 FE_SCALE_NOT_AVAILABLE = 0,
484 FE_SCALE_DECIBEL,
485 FE_SCALE_RELATIVE,
486 FE_SCALE_COUNTER
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800487};
488
489/**
490 * struct dtv_stats - Used for reading a DTV status property
491 *
hualing chen002e5b92022-02-23 17:51:21 +0800492 * @value: value of the measure. Should range from 0 to 0xffff;
493 * @scale: Filled with enum fecap_scale_params - the scale
494 * in usage for that parameter
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800495 *
496 * For most delivery systems, this will return a single value for each
497 * parameter.
498 * It should be noticed, however, that new OFDM delivery systems like
499 * ISDB can use different modulation types for each group of carriers.
500 * On such standards, up to 8 groups of statistics can be provided, one
501 * for each carrier group (called "layer" on ISDB).
502 * In order to be consistent with other delivery systems, the first
503 * value refers to the entire set of carriers ("global").
504 * dtv_status:scale should use the value FE_SCALE_NOT_AVAILABLE when
505 * the value for the entire group of carriers or from one specific layer
506 * is not provided by the hardware.
507 * st.len should be filled with the latest filled status + 1.
508 *
509 * In other words, for ISDB, those values should be filled like:
hualing chen002e5b92022-02-23 17:51:21 +0800510 * u.st.stat.svalue[0] = global statistics;
511 * u.st.stat.scale[0] = FE_SCALE_DECIBEL;
512 * u.st.stat.value[1] = layer A statistics;
513 * u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available);
514 * u.st.stat.svalue[2] = layer B statistics;
515 * u.st.stat.scale[2] = FE_SCALE_DECIBEL;
516 * u.st.stat.svalue[3] = layer C statistics;
517 * u.st.stat.scale[3] = FE_SCALE_DECIBEL;
518 * u.st.len = 4;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800519 */
520struct dtv_stats {
hualing chen002e5b92022-02-23 17:51:21 +0800521 __u8 scale; /* enum fecap_scale_params type */
522 union {
523 __u64 uvalue; /* for counters and relative scales */
524 __s64 svalue; /* for 0.001 dB measures */
525 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800526} __attribute__ ((packed));
527
528
529#define MAX_DTV_STATS 4
530
531struct dtv_fe_stats {
hualing chen002e5b92022-02-23 17:51:21 +0800532 __u8 len;
533 struct dtv_stats stat[MAX_DTV_STATS];
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800534} __attribute__ ((packed));
535
536struct dtv_property {
hualing chen002e5b92022-02-23 17:51:21 +0800537 __u32 cmd;
538 __u32 reserved[3];
539 union {
540 __u32 data;
541 struct dtv_fe_stats st;
542 struct {
543 __u8 data[32];
544 __u32 len;
545 __u32 reserved1[3];
546 void *reserved2;
547 } buffer;
548 } u;
549 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800550} __attribute__ ((packed));
551
552struct dtv_property_32 {
hualing chen002e5b92022-02-23 17:51:21 +0800553 __u32 cmd;
554 __u32 reserved[3];
555 union {
556 __u32 data;
557 struct dtv_fe_stats st;
558 struct {
559 __u8 data[32];
560 __u32 len;
561 __u32 reserved1[3];
562 __u32 reserved2;
563 } buffer;
564 } u;
565 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800566} __attribute__ ((packed));
567
568struct dtv_property_64 {
hualing chen002e5b92022-02-23 17:51:21 +0800569 __u32 cmd;
570 __u32 reserved[3];
571 union {
572 __u32 data;
573 struct dtv_fe_stats st;
574 struct {
575 __u8 data[32];
576 __u32 len;
577 __u32 reserved1[3];
578 __u64 reserved2;
579 } buffer;
580 } u;
581 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800582} __attribute__ ((packed));
583
584/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
585#define DTV_IOCTL_MAX_MSGS 64
586
587struct dtv_properties {
hualing chen002e5b92022-02-23 17:51:21 +0800588 __u32 num;
589 struct dtv_property *props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800590};
591
592struct dtv_properties_32 {
hualing chen002e5b92022-02-23 17:51:21 +0800593 __u32 num;
594 __u32 props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800595};
596
597struct dtv_properties_64 {
hualing chen002e5b92022-02-23 17:51:21 +0800598 __u32 num;
599 __u64 props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800600};
601
602#if defined(__DVB_CORE__) || !defined (__KERNEL__)
603
604/*
605 * DEPRECATED: The DVBv3 ioctls, structs and enums should not be used on
606 * newer programs, as it doesn't support the second generation of digital
607 * TV standards, nor supports newer delivery systems.
608 */
609
610enum fe_bandwidth {
hualing chen002e5b92022-02-23 17:51:21 +0800611 BANDWIDTH_8_MHZ,
612 BANDWIDTH_7_MHZ,
613 BANDWIDTH_6_MHZ,
614 BANDWIDTH_AUTO,
615 BANDWIDTH_5_MHZ,
616 BANDWIDTH_10_MHZ,
617 BANDWIDTH_1_712_MHZ,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800618};
619
620/* This is needed for legacy userspace support */
621typedef enum fe_sec_voltage fe_sec_voltage_t;
622typedef enum fe_caps fe_caps_t;
623typedef enum fe_type fe_type_t;
624typedef enum fe_sec_tone_mode fe_sec_tone_mode_t;
625typedef enum fe_sec_mini_cmd fe_sec_mini_cmd_t;
626typedef enum fe_status fe_status_t;
627typedef enum fe_spectral_inversion fe_spectral_inversion_t;
628typedef enum fe_code_rate fe_code_rate_t;
629typedef enum fe_modulation fe_modulation_t;
630typedef enum fe_transmit_mode fe_transmit_mode_t;
631typedef enum fe_bandwidth fe_bandwidth_t;
632typedef enum fe_guard_interval fe_guard_interval_t;
633typedef enum fe_hierarchy fe_hierarchy_t;
634typedef enum fe_pilot fe_pilot_t;
635typedef enum fe_rolloff fe_rolloff_t;
636typedef enum fe_delivery_system fe_delivery_system_t;
637
638#ifdef CONFIG_AMLOGIC_DVB_COMPAT
639enum fe_ofdm_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800640 OFDM_DVBT,
641 OFDM_DVBT2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800642};
643#endif
644
645struct dvb_qpsk_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800646 __u32 symbol_rate; /* symbol rate in Symbols per second */
647 fe_code_rate_t fec_inner; /* forward error correction (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800648};
649
650struct dvb_qam_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800651 __u32 symbol_rate; /* symbol rate in Symbols per second */
652 fe_code_rate_t fec_inner; /* forward error correction (see above) */
653 fe_modulation_t modulation; /* modulation type (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800654};
655
656struct dvb_vsb_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800657 fe_modulation_t modulation; /* modulation type (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800658};
659
660struct dvb_ofdm_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800661 fe_bandwidth_t bandwidth;
662 fe_code_rate_t code_rate_HP; /* high priority stream code rate */
663 fe_code_rate_t code_rate_LP; /* low priority stream code rate */
664 fe_modulation_t constellation; /* modulation type (see above) */
665 fe_transmit_mode_t transmission_mode;
666 fe_guard_interval_t guard_interval;
667 fe_hierarchy_t hierarchy_information;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800668};
669
670#ifdef CONFIG_AMLOGIC_DVB_COMPAT
671#define ANALOG_FLAG_ENABLE_AFC 0X00000001
672#define ANALOG_FLAG_MANUL_SCAN 0x00000011
673struct dvb_analog_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800674 /*V4L2_TUNER_MODE_MONO,V4L2_TUNER_MODE_STEREO,*/
675 /*V4L2_TUNER_MODE_LANG2,V4L2_TUNER_MODE_SAP,*/
676 /*V4L2_TUNER_MODE_LANG1,V4L2_TUNER_MODE_LANG1_LANG2 */
677 unsigned int audmode;
678 unsigned int soundsys; /*A2,BTSC,EIAJ,NICAM */
679 v4l2_std_id std;
680 unsigned int flag;
681 unsigned int afc_range;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800682};
683#endif
684
685struct dvb_frontend_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800686 /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
687 __u32 frequency;
688 /* intermediate frequency in kHz for DVB-S */
689 fe_spectral_inversion_t inversion;
690 union {
691 struct dvb_qpsk_parameters qpsk; /* DVB-S */
692 struct dvb_qam_parameters qam; /* DVB-C */
693 struct dvb_ofdm_parameters ofdm; /* DVB-T */
694 struct dvb_vsb_parameters vsb; /* ATSC */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800695#if 0 && defined(CONFIG_AMLOGIC_DVB_COMPAT)
hualing chen002e5b92022-02-23 17:51:21 +0800696 struct dvb_analog_parameters analog;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800697#endif
hualing chen002e5b92022-02-23 17:51:21 +0800698 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800699};
700
701#ifdef CONFIG_AMLOGIC_DVB_COMPAT
702
703struct dvb_frontend_parameters_ex {
hualing chen002e5b92022-02-23 17:51:21 +0800704 __u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
705 /* intermediate frequency in kHz for DVB-S */
706 fe_spectral_inversion_t inversion;
707 union {
708 struct dvb_qpsk_parameters qpsk; /* DVB-S */
709 struct dvb_qam_parameters qam; /* DVB-C */
710 struct dvb_ofdm_parameters ofdm; /* DVB-T */
711 struct dvb_vsb_parameters vsb; /* ATSC */
712 struct dvb_analog_parameters analog;
Wentao MA270dc0f2022-08-23 13:17:26 +0800713 /* Add extension data here */
hualing chen002e5b92022-02-23 17:51:21 +0800714 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800715};
716
717/*
718static char dvb_check_frontend_parameters_size[
hualing chen002e5b92022-02-23 17:51:21 +0800719 (sizeof(struct dvb_frontend_parameters_ex)
720 == sizeof(struct dvb_frontend_parameters)) ? 1 : -1]
721 __attribute__((__unused__));
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800722*/
723
724#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
725
726struct dvb_frontend_event {
hualing chen002e5b92022-02-23 17:51:21 +0800727 fe_status_t status;
728 struct dvb_frontend_parameters parameters;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800729};
730#ifdef CONFIG_AMLOGIC_DVB_COMPAT
731/* Satellite blind scan event */
732struct dvbsx_blindscanevent {
hualing chen002e5b92022-02-23 17:51:21 +0800733 enum fe_status status;
734 union {
735 /* The percentage completion of the*/
736 /*blind scan procedure. A value of*/
737 /*100 indicates that the blind scan*/
738 /*is finished. */
739 __u16 m_uiprogress;
740 /*The start scan frequency in units of kHz.*/
741 /*The minimum value depends on the tuner*/
742 /*specification.*/
743 __u32 m_uistartfreq_khz;
744 /* Blind scan channel info. */
745 struct dvb_frontend_parameters parameters;
746 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800747};
748#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
749#endif
750
hualing chen002e5b92022-02-23 17:51:21 +0800751#define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties)
752#define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800753
754#define FE_SET_PROPERTY_32 _IOW('o', 82, struct dtv_properties_32)
755#define FE_GET_PROPERTY_32 _IOR('o', 83, struct dtv_properties_32)
756
757#define FE_SET_PROPERTY_64 _IOW('o', 82, struct dtv_properties_64)
758#define FE_GET_PROPERTY_64 _IOR('o', 83, struct dtv_properties_64)
759
760#ifdef CONFIG_AMLOGIC_DVB_COMPAT
761/*for atv*/
762struct tuner_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800763 unsigned int frequency;
764 unsigned int rssi;
765 unsigned char mode;/*dtv:0 or atv:1*/
766 unsigned char tuner_locked;/*notlocked:0,locked:1*/
767 union {
768 void *ressrved;
769 __u64 reserved1;
770 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800771};
772
773
774struct atv_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800775 unsigned char atv_lock;/*notlocked:0,locked 1*/
776 v4l2_std_id std;
777 unsigned int audmode;
778 int snr;
779 int afc;
780 union {
781 void *resrvred;
782 __u64 reserved1;
783 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800784};
785
786struct sound_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800787 unsigned short sound_sys;/*A2DK/A2BG/NICAM BG/NICAM DK/BTSC/EIAJ*/
788 unsigned short sound_mode;/*SETERO/DUAL/MONO/SAP*/
789 union {
790 void *resrvred;
791 __u64 reserved1;
792 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800793};
794
795
796enum tuner_param_cmd_e {
hualing chen002e5b92022-02-23 17:51:21 +0800797 TUNER_CMD_AUDIO_MUTE = 0x0000,
798 TUNER_CMD_AUDIO_ON,
799 TUNER_CMD_TUNER_POWER_ON,
800 TUNER_CMD_TUNER_POWER_DOWN,
801 TUNER_CMD_SET_VOLUME,
802 TUNER_CMD_SET_LEAP_SETP_SIZE,
803 TUNER_CMD_GET_MONO_MODE,
804 TUNER_CMD_SET_BEST_LOCK_RANGE,
805 TUNER_CMD_GET_BEST_LOCK_RANGE,
806 TUNER_CMD_SET_CVBS_AMP_OUT,
807 TUNER_CMD_GET_CVBS_AMP_OUT,
808 TUNER_CMD_NULL,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800809};
810
811
812/*parameter for set param box*/
813struct tuner_param_s {
hualing chen002e5b92022-02-23 17:51:21 +0800814 enum tuner_param_cmd_e cmd;
815 unsigned int parm;
Wentao MA270dc0f2022-08-23 13:17:26 +0800816 unsigned int reserved;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800817};
818
819
820enum fe_layer {
hualing chen002e5b92022-02-23 17:51:21 +0800821 Layer_A_B_C,
822 Layer_A,
823 Layer_B,
824 Layer_C,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800825};
826
827// typedef struct dvb_analog_parameters dvb_analog_parameters_t;
828// typedef struct tuner_status_s tuner_status_t;
829// typedef struct atv_status_s atv_status_t;
830// typedef struct sound_status_s sound_status_t;
831// typedef enum tuner_param_cmd_e tuner_param_cmd_t;
832// typedef struct tuner_param_s tuner_param_t;
833// typedef enum fe_layer fe_layer_t;
834// typedef enum fe_ofdm_mode fe_ofdm_mode_t;
835
836
837/* Satellite blind scan settings */
838struct dvbsx_blindscanpara {
hualing chen002e5b92022-02-23 17:51:21 +0800839 __u32 minfrequency;/* minimum tuner frequency in kHz */
840 __u32 maxfrequency;/* maximum tuner frequency in kHz */
841 __u32 minSymbolRate;/* minimum symbol rate in sym/sec */
842 __u32 maxSymbolRate;/* maximum symbol rate in sym/sec */
843 /*search range in kHz. freq -/+freqRange will be searched */
844 __u32 frequencyRange;
845 __u32 frequencyStep;/* tuner step frequency in kHz */
846 __s32 timeout;/* blindscan event timeout*/
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800847};
zhicheng.huangf92bcce2022-10-12 20:13:20 +0800848
849struct dvbsx_singlecable_parameters {
850 /* not singlecable: 0, 1.0X - 1(EN50494), 2.0X - 2(EN50607) */
851 __u32 version;
852 __u32 userband; /* 1.0X: 0 - 7, 2.0X: 0 - 31 */
853 __u32 frequency; /* KHz */
854 __u32 bank;
855 /*
856 * Uncommitted switches setting for SCD2 (Similar to DiSEqC WriteN1 command,
857 * but lower 4 bits only)
858 * Bit[0] : Switch 1 Position A or B
859 * Bit[1] : Switch 2 Position A or B
860 * Bit[2] : Switch 3 Position A or B
861 * Bit[3] : Switch 4 Position A or B
862 */
863 __u32 uncommitted;
864 /*
865 * Committed switches setting for SCD2 (Similar to DiSEqC WriteN0 command,
866 * but lower 4 bits only)
867 * Bit[0] : Low or High Band
868 * Bit[1] : Vertical or Horizontal Polarization
869 * Bit[2] : Satellite Position A or B
870 * Bit[3] : Option Switch Position A or B
871 */
872 __u32 committed;
873};
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800874#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
875/**
876 * When set, this flag will disable any zigzagging or other "normal" tuning
877 * behaviour. Additionally, there will be no automatic monitoring of the lock
878 * status, and hence no frontend events will be generated. If a frontend device
879 * is closed, this flag will be automatically turned off when the device is
880 * reopened read-write.
881 */
882#define FE_TUNE_MODE_ONESHOT 0x01
883
hualing chen002e5b92022-02-23 17:51:21 +0800884#define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800885
886#define FE_DISEQC_RESET_OVERLOAD _IO('o', 62)
887#define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd)
888#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
889#define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */
890
hualing chen002e5b92022-02-23 17:51:21 +0800891#define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */
892#define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800893#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */
894
hualing chen002e5b92022-02-23 17:51:21 +0800895#define FE_READ_STATUS _IOR('o', 69, fe_status_t)
896#define FE_READ_BER _IOR('o', 70, __u32)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800897#define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16)
hualing chen002e5b92022-02-23 17:51:21 +0800898#define FE_READ_SNR _IOR('o', 72, __u16)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800899#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
900
hualing chen002e5b92022-02-23 17:51:21 +0800901#define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters)
902#define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800903#define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */
hualing chen002e5b92022-02-23 17:51:21 +0800904#define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800905
906#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
907
908#ifdef CONFIG_AMLOGIC_DVB_COMPAT
909/*need del this ioctl, used set PROPERTY instead*/
910#define FE_SET_DELAY _IO('o', 100)
911#define FE_READ_AFC _IOR('o', 91, __u32)
912#define FE_FINE_TUNE _IOW('o', 92, __u32)
913#define FE_READ_TUNER_STATUS _IOR('o', 93, struct tuner_status_s)
914#define FE_READ_ANALOG_STATUS _IOR('o', 94, struct atv_status_s)
915#define FE_READ_SD_STATUS _IOR('o', 95, struct sound_status_s)
916/*set & get the tuner parameters only atv*/
917#define FE_SET_PARAM_BOX _IOWR('o', 97, struct tuner_param_s)
918#define FE_SET_AFC _IOW('o', 98, __u32)
919#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
920
921#endif /*_DVBFRONTEND_H_*/