blob: 32351578aab6bd16c5efa2bd1d6be52773bfa121 [file] [log] [blame]
Zhiqiang Hana67a8252023-02-25 18:23:48 +08001/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +08002/*
3 * frontend.h
4 *
5 * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
hualing chen002e5b92022-02-23 17:51:21 +08006 * Ralph Metzler <ralph@convergence.de>
7 * Holger Waechtler <holger@convergence.de>
8 * Andre Draszik <ad@convergence.de>
9 * for convergence integrated media GmbH
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080010 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 *
25 */
26
27#ifndef _DVBFRONTEND_H_
28#define _DVBFRONTEND_H_
29
30#define CONFIG_AMLOGIC_DVB_COMPAT
31#include <linux/types.h>
32#ifdef CONFIG_AMLOGIC_DVB_COMPAT
33#include <linux/videodev2.h>
34#endif
35
36enum fe_type {
hualing chen002e5b92022-02-23 17:51:21 +080037 FE_QPSK,
38 FE_QAM,
39 FE_OFDM,
40 FE_ATSC,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080041#ifdef CONFIG_AMLOGIC_DVB_COMPAT
hualing chen002e5b92022-02-23 17:51:21 +080042 FE_ANALOG,
43 FE_DTMB,
44 FE_ISDBT
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080045#endif
46};
47
48enum fe_caps {
hualing chen002e5b92022-02-23 17:51:21 +080049 FE_IS_STUPID = 0,
50 FE_CAN_INVERSION_AUTO = 0x1,
51 FE_CAN_FEC_1_2 = 0x2,
52 FE_CAN_FEC_2_3 = 0x4,
53 FE_CAN_FEC_3_4 = 0x8,
54 FE_CAN_FEC_4_5 = 0x10,
55 FE_CAN_FEC_5_6 = 0x20,
56 FE_CAN_FEC_6_7 = 0x40,
57 FE_CAN_FEC_7_8 = 0x80,
58 FE_CAN_FEC_8_9 = 0x100,
59 FE_CAN_FEC_AUTO = 0x200,
60 FE_CAN_QPSK = 0x400,
61 FE_CAN_QAM_16 = 0x800,
62 FE_CAN_QAM_32 = 0x1000,
63 FE_CAN_QAM_64 = 0x2000,
64 FE_CAN_QAM_128 = 0x4000,
65 FE_CAN_QAM_256 = 0x8000,
66 FE_CAN_QAM_AUTO = 0x10000,
67 FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
68 FE_CAN_BANDWIDTH_AUTO = 0x40000,
69 FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
70 FE_CAN_HIERARCHY_AUTO = 0x100000,
71 FE_CAN_8VSB = 0x200000,
72 FE_CAN_16VSB = 0x400000,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080073/* We need more bitspace for newer APIs, indicate this. */
hualing chen002e5b92022-02-23 17:51:21 +080074 FE_HAS_EXTENDED_CAPS = 0x800000,
75 FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
76 FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080077/* frontend supports "2nd generation modulation" (DVB-S2) */
hualing chen002e5b92022-02-23 17:51:21 +080078 FE_CAN_2G_MODULATION = 0x10000000,
79 FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
80 FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
81 FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080082};
83#ifdef CONFIG_AMLOGIC_DVB_COMPAT
84#define FE_CAN_3_LAYER FE_CAN_MULTISTREAM
85#endif
86struct dvb_frontend_info {
hualing chen002e5b92022-02-23 17:51:21 +080087 char name[128];
88 enum fe_type type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
89 __u32 frequency_min;
90 __u32 frequency_max;
91 __u32 frequency_stepsize;
92 __u32 frequency_tolerance;
93 __u32 symbol_rate_min;
94 __u32 symbol_rate_max;
95 __u32 symbol_rate_tolerance; /* ppm */
96 __u32 notifier_delay; /* DEPRECATED */
97 enum fe_caps caps;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +080098};
99
100
101/**
102 * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
103 * the meaning of this struct...
104 */
105struct dvb_diseqc_master_cmd {
hualing chen002e5b92022-02-23 17:51:21 +0800106 __u8 msg [6]; /* { framing, address, command, data [3] } */
107 __u8 msg_len; /* valid values are 3...6 */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800108};
109
110struct dvb_diseqc_slave_reply {
hualing chen002e5b92022-02-23 17:51:21 +0800111 __u8 msg [4]; /* { framing, data [3] } */
112 __u8 msg_len; /* valid values are 0...4, 0 means no msg */
113 int timeout; /* return from ioctl after timeout ms with */
114}; /* errorcode when no message was received */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800115
116enum fe_sec_voltage {
hualing chen002e5b92022-02-23 17:51:21 +0800117 SEC_VOLTAGE_13,
118 SEC_VOLTAGE_18,
119 SEC_VOLTAGE_OFF,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800120};
121
122enum fe_sec_tone_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800123 SEC_TONE_ON,
124 SEC_TONE_OFF
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800125};
126
127enum fe_sec_mini_cmd {
hualing chen002e5b92022-02-23 17:51:21 +0800128 SEC_MINI_A,
129 SEC_MINI_B
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800130};
131
132/**
133 * enum fe_status - enumerates the possible frontend status
hualing chen002e5b92022-02-23 17:51:21 +0800134 * @FE_HAS_SIGNAL: found something above the noise level
135 * @FE_HAS_CARRIER: found a DVB signal
136 * @FE_HAS_VITERBI: FEC is stable
137 * @FE_HAS_SYNC: found sync bytes
138 * @FE_HAS_LOCK: everything's working
139 * @FE_TIMEDOUT: no lock within the last ~2 seconds
140 * @FE_REINIT: frontend was reinitialized, application is recommended
141 * to reset DiSEqC, tone and parameters
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800142 */
143enum fe_status {
hualing chen002e5b92022-02-23 17:51:21 +0800144 FE_HAS_SIGNAL = 0x01, /* found something above the noise level */
145 FE_HAS_CARRIER = 0x02, /* found a DVB signal */
146 FE_HAS_VITERBI = 0x04, /* FEC is stable */
147 FE_HAS_SYNC = 0x08, /* found sync bytes */
148 FE_HAS_LOCK = 0x10, /* everything's working... */
149 FE_TIMEDOUT = 0x20, /* no lock within the last ~2 seconds */
150 FE_REINIT = 0x40, /* frontend was reinitialized, */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800151#ifdef CONFIG_AMLOGIC_DVB_COMPAT
hualing chen002e5b92022-02-23 17:51:21 +0800152 BLINDSCAN_NONEDO = 0x80, /* not blind scan */
153 BLINDSCAN_UPDATESTARTFREQ = 0x100, /* blind scan update start freq */
154 BLINDSCAN_UPDATEPROCESS = 0x200, /* blind scan update process */
155 BLINDSCAN_UPDATERESULTFREQ = 0x400/* blind scan update result */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800156#endif
157}; /* application is recommended to reset */
158/* DiSEqC, tone and parameters */
159
160enum fe_spectral_inversion {
hualing chen002e5b92022-02-23 17:51:21 +0800161 INVERSION_OFF,
162 INVERSION_ON,
163 INVERSION_AUTO
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800164};
165
166enum fe_code_rate {
hualing chen002e5b92022-02-23 17:51:21 +0800167 FEC_NONE = 0,
168 FEC_1_2,
169 FEC_2_3,
170 FEC_3_4,
171 FEC_4_5,
172 FEC_5_6,
173 FEC_6_7,
174 FEC_7_8,
175 FEC_8_9,
176 FEC_AUTO,
177 FEC_3_5,
178 FEC_9_10,
179 FEC_2_5,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800180};
181
182enum fe_modulation {
hualing chen002e5b92022-02-23 17:51:21 +0800183 QPSK,
184 QAM_16,
185 QAM_32,
186 QAM_64,
187 QAM_128,
188 QAM_256,
189 QAM_AUTO,
190 VSB_8,
191 VSB_16,
192 PSK_8,
193 APSK_16,
194 APSK_32,
195 DQPSK,
196 QAM_4_NR,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800197};
198
199enum fe_transmit_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800200 TRANSMISSION_MODE_2K,
201 TRANSMISSION_MODE_8K,
202 TRANSMISSION_MODE_AUTO,
203 TRANSMISSION_MODE_4K,
204 TRANSMISSION_MODE_1K,
205 TRANSMISSION_MODE_16K,
206 TRANSMISSION_MODE_32K,
207 TRANSMISSION_MODE_C1,
208 TRANSMISSION_MODE_C3780,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800209};
210
211enum fe_guard_interval {
hualing chen002e5b92022-02-23 17:51:21 +0800212 GUARD_INTERVAL_1_32,
213 GUARD_INTERVAL_1_16,
214 GUARD_INTERVAL_1_8,
215 GUARD_INTERVAL_1_4,
216 GUARD_INTERVAL_AUTO,
217 GUARD_INTERVAL_1_128,
218 GUARD_INTERVAL_19_128,
219 GUARD_INTERVAL_19_256,
220 GUARD_INTERVAL_PN420,
221 GUARD_INTERVAL_PN595,
222 GUARD_INTERVAL_PN945,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800223};
224
225enum fe_hierarchy {
hualing chen002e5b92022-02-23 17:51:21 +0800226 HIERARCHY_NONE,
227 HIERARCHY_1,
228 HIERARCHY_2,
229 HIERARCHY_4,
230 HIERARCHY_AUTO
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800231};
232
233enum fe_interleaving {
hualing chen002e5b92022-02-23 17:51:21 +0800234 INTERLEAVING_NONE,
235 INTERLEAVING_AUTO,
236 INTERLEAVING_240,
237 INTERLEAVING_720,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800238};
239
240#ifdef CONFIG_AMLOGIC_DVB_COMPAT
241struct fe_blind_scan_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800242 /* minimum tuner frequency in kHz */
243 __u32 min_frequency;
244 /* maximum tuner frequency in kHz */
245 __u32 max_frequency;
246 /* minimum symbol rate in sym/sec */
247 __u32 min_symbol_rate;
248 /* maximum symbol rate in sym/sec */
249 __u32 max_symbol_rate;
250 /* search range in kHz. freq -/+freqRange will be searched */
251 __u32 frequency_range;
252 /* tuner step frequency in kHz */
253 __u32 frequency_step;
254 /* blindscan event timeout */
255 __s32 timeout;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800256};
257#endif
258
259/* S2API Commands */
hualing chen002e5b92022-02-23 17:51:21 +0800260#define DTV_UNDEFINED 0
261#define DTV_TUNE 1
262#define DTV_CLEAR 2
263#define DTV_FREQUENCY 3
264#define DTV_MODULATION 4
265#define DTV_BANDWIDTH_HZ 5
266#define DTV_INVERSION 6
267#define DTV_DISEQC_MASTER 7
268#define DTV_SYMBOL_RATE 8
269#define DTV_INNER_FEC 9
270#define DTV_VOLTAGE 10
271#define DTV_TONE 11
272#define DTV_PILOT 12
273#define DTV_ROLLOFF 13
274#define DTV_DISEQC_SLAVE_REPLY 14
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800275
276/* Basic enumeration set for querying unlimited capabilities */
hualing chen002e5b92022-02-23 17:51:21 +0800277#define DTV_FE_CAPABILITY_COUNT 15
278#define DTV_FE_CAPABILITY 16
279#define DTV_DELIVERY_SYSTEM 17
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800280
281/* ISDB-T and ISDB-Tsb */
hualing chen002e5b92022-02-23 17:51:21 +0800282#define DTV_ISDBT_PARTIAL_RECEPTION 18
283#define DTV_ISDBT_SOUND_BROADCASTING 19
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800284
hualing chen002e5b92022-02-23 17:51:21 +0800285#define DTV_ISDBT_SB_SUBCHANNEL_ID 20
286#define DTV_ISDBT_SB_SEGMENT_IDX 21
287#define DTV_ISDBT_SB_SEGMENT_COUNT 22
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800288
hualing chen002e5b92022-02-23 17:51:21 +0800289#define DTV_ISDBT_LAYERA_FEC 23
290#define DTV_ISDBT_LAYERA_MODULATION 24
291#define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25
292#define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800293
hualing chen002e5b92022-02-23 17:51:21 +0800294#define DTV_ISDBT_LAYERB_FEC 27
295#define DTV_ISDBT_LAYERB_MODULATION 28
296#define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29
297#define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800298
hualing chen002e5b92022-02-23 17:51:21 +0800299#define DTV_ISDBT_LAYERC_FEC 31
300#define DTV_ISDBT_LAYERC_MODULATION 32
301#define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33
302#define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800303
hualing chen002e5b92022-02-23 17:51:21 +0800304#define DTV_API_VERSION 35
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800305
hualing chen002e5b92022-02-23 17:51:21 +0800306#define DTV_CODE_RATE_HP 36
307#define DTV_CODE_RATE_LP 37
308#define DTV_GUARD_INTERVAL 38
309#define DTV_TRANSMISSION_MODE 39
310#define DTV_HIERARCHY 40
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800311
hualing chen002e5b92022-02-23 17:51:21 +0800312#define DTV_ISDBT_LAYER_ENABLED 41
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800313
hualing chen002e5b92022-02-23 17:51:21 +0800314#define DTV_STREAM_ID 42
315#define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID
316#define DTV_DVBT2_PLP_ID_LEGACY 43
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800317
hualing chen002e5b92022-02-23 17:51:21 +0800318#define DTV_ENUM_DELSYS 44
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800319#ifdef CONFIG_AMLOGIC_DVB_COMPAT
320#define DTV_DVBT2_PLP_ID DTV_DVBT2_PLP_ID_LEGACY
321#endif
322/* ATSC-MH */
hualing chen002e5b92022-02-23 17:51:21 +0800323#define DTV_ATSCMH_FIC_VER 45
324#define DTV_ATSCMH_PARADE_ID 46
325#define DTV_ATSCMH_NOG 47
326#define DTV_ATSCMH_TNOG 48
327#define DTV_ATSCMH_SGN 49
328#define DTV_ATSCMH_PRC 50
329#define DTV_ATSCMH_RS_FRAME_MODE 51
330#define DTV_ATSCMH_RS_FRAME_ENSEMBLE 52
331#define DTV_ATSCMH_RS_CODE_MODE_PRI 53
332#define DTV_ATSCMH_RS_CODE_MODE_SEC 54
333#define DTV_ATSCMH_SCCC_BLOCK_MODE 55
334#define DTV_ATSCMH_SCCC_CODE_MODE_A 56
335#define DTV_ATSCMH_SCCC_CODE_MODE_B 57
336#define DTV_ATSCMH_SCCC_CODE_MODE_C 58
337#define DTV_ATSCMH_SCCC_CODE_MODE_D 59
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800338
hualing chen002e5b92022-02-23 17:51:21 +0800339#define DTV_INTERLEAVING 60
340#define DTV_LNA 61
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800341
342/* Quality parameters */
hualing chen002e5b92022-02-23 17:51:21 +0800343#define DTV_STAT_SIGNAL_STRENGTH 62
344#define DTV_STAT_CNR 63
345#define DTV_STAT_PRE_ERROR_BIT_COUNT 64
346#define DTV_STAT_PRE_TOTAL_BIT_COUNT 65
347#define DTV_STAT_POST_ERROR_BIT_COUNT 66
348#define DTV_STAT_POST_TOTAL_BIT_COUNT 67
349#define DTV_STAT_ERROR_BLOCK_COUNT 68
350#define DTV_STAT_TOTAL_BLOCK_COUNT 69
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800351
352#ifdef CONFIG_AMLOGIC_DVB_COMPAT
353
354/* Get tne TS input of the frontend */
Chuangcheng Peng6a9df482020-12-29 13:50:48 +0800355#define DTV_TS_INPUT 100
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800356/* Blind scan */
Chuangcheng Peng6a9df482020-12-29 13:50:48 +0800357#define DTV_START_BLIND_SCAN 101
358#define DTV_CANCEL_BLIND_SCAN 102
359#define DTV_BLIND_SCAN_MIN_FRE 103
360#define DTV_BLIND_SCAN_MAX_FRE 104
361#define DTV_BLIND_SCAN_MIN_SRATE 105
362#define DTV_BLIND_SCAN_MAX_SRATE 106
363#define DTV_BLIND_SCAN_FRE_RANGE 107
364#define DTV_BLIND_SCAN_FRE_STEP 108
365#define DTV_BLIND_SCAN_TIMEOUT 109
zhicheng.huangf92bcce2022-10-12 20:13:20 +0800366#define DTV_SINGLE_CABLE_VER 110
367#define DTV_SINGLE_CABLE_USER_BAND 111
368#define DTV_SINGLE_CABLE_BAND_FRE 112
369#define DTV_SINGLE_CABLE_BANK 113
370#define DTV_SINGLE_CABLE_UNCOMMITTED 114
371#define DTV_SINGLE_CABLE_COMMITTED 115
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800372/* Blind scan end*/
zhicheng.huangf92bcce2022-10-12 20:13:20 +0800373#define DTV_DELIVERY_SUB_SYSTEM 116
hualing chen002e5b92022-02-23 17:51:21 +0800374#define DTV_MAX_COMMAND DTV_DELIVERY_SUB_SYSTEM
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800375
376#else /*!defined(CONFIG_AMLOGIC_DVB_COMPAT)*/
377
hualing chen002e5b92022-02-23 17:51:21 +0800378#define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800379
380#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
381
382
383enum fe_pilot {
hualing chen002e5b92022-02-23 17:51:21 +0800384 PILOT_ON,
385 PILOT_OFF,
386 PILOT_AUTO,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800387};
388
389enum fe_rolloff {
hualing chen002e5b92022-02-23 17:51:21 +0800390 ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
391 ROLLOFF_20,
392 ROLLOFF_25,
393 ROLLOFF_AUTO,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800394};
395
396enum fe_delivery_system {
hualing chen002e5b92022-02-23 17:51:21 +0800397 SYS_UNDEFINED,
398 SYS_DVBC_ANNEX_A,
399 SYS_DVBC_ANNEX_B,
400 SYS_DVBT,
401 SYS_DSS,
402 SYS_DVBS,
403 SYS_DVBS2,
404 SYS_DVBH,
405 SYS_ISDBT,
406 SYS_ISDBS,
407 SYS_ISDBC,
408 SYS_ATSC,
409 SYS_ATSCMH,
410 SYS_DTMB,
411 SYS_CMMB,
412 SYS_DAB,
413 SYS_DVBT2,
414 SYS_TURBO,
415 SYS_DVBC_ANNEX_C,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800416#ifdef CONFIG_AMLOGIC_DVB_COMPAT
hualing chen002e5b92022-02-23 17:51:21 +0800417 SYS_ANALOG
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800418#endif
419};
420
421/* backward compatibility */
hualing chen002e5b92022-02-23 17:51:21 +0800422#define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800423#define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB instead */
424
425/* ATSC-MH */
426
427enum atscmh_sccc_block_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800428 ATSCMH_SCCC_BLK_SEP = 0,
429 ATSCMH_SCCC_BLK_COMB = 1,
430 ATSCMH_SCCC_BLK_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800431};
432
433enum atscmh_sccc_code_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800434 ATSCMH_SCCC_CODE_HLF = 0,
435 ATSCMH_SCCC_CODE_QTR = 1,
436 ATSCMH_SCCC_CODE_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800437};
438
439enum atscmh_rs_frame_ensemble {
hualing chen002e5b92022-02-23 17:51:21 +0800440 ATSCMH_RSFRAME_ENS_PRI = 0,
441 ATSCMH_RSFRAME_ENS_SEC = 1,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800442};
443
444enum atscmh_rs_frame_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800445 ATSCMH_RSFRAME_PRI_ONLY = 0,
446 ATSCMH_RSFRAME_PRI_SEC = 1,
447 ATSCMH_RSFRAME_RES = 2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800448};
449
450enum atscmh_rs_code_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800451 ATSCMH_RSCODE_211_187 = 0,
452 ATSCMH_RSCODE_223_187 = 1,
453 ATSCMH_RSCODE_235_187 = 2,
454 ATSCMH_RSCODE_RES = 3,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800455};
456
hualing chen002e5b92022-02-23 17:51:21 +0800457#define NO_STREAM_ID_FILTER (~0U)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800458#define LNA_AUTO (~0U)
459
460struct dtv_cmds_h {
hualing chen002e5b92022-02-23 17:51:21 +0800461 char *name; /* A display name for debugging purposes */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800462
hualing chen002e5b92022-02-23 17:51:21 +0800463 __u32 cmd; /* A unique ID */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800464
hualing chen002e5b92022-02-23 17:51:21 +0800465 /* Flags */
466 __u32 set:1; /* Either a set or get property */
467 __u32 buffer:1; /* Does this property use the buffer? */
468 __u32 reserved:30; /* Align */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800469};
470
471/**
472 * Scale types for the quality parameters.
473 * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That
hualing chen002e5b92022-02-23 17:51:21 +0800474 * could indicate a temporary or a permanent
475 * condition.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800476 * @FE_SCALE_DECIBEL: The scale is measured in 0.001 dB steps, typically
hualing chen002e5b92022-02-23 17:51:21 +0800477 * used on signal measures.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800478 * @FE_SCALE_RELATIVE: The scale is a relative percentual measure,
hualing chen002e5b92022-02-23 17:51:21 +0800479 * ranging from 0 (0%) to 0xffff (100%).
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800480 * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like
hualing chen002e5b92022-02-23 17:51:21 +0800481 * bit error, block error, lapsed time.
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800482 */
483enum fecap_scale_params {
hualing chen002e5b92022-02-23 17:51:21 +0800484 FE_SCALE_NOT_AVAILABLE = 0,
485 FE_SCALE_DECIBEL,
486 FE_SCALE_RELATIVE,
487 FE_SCALE_COUNTER
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800488};
489
490/**
491 * struct dtv_stats - Used for reading a DTV status property
492 *
hualing chen002e5b92022-02-23 17:51:21 +0800493 * @value: value of the measure. Should range from 0 to 0xffff;
494 * @scale: Filled with enum fecap_scale_params - the scale
495 * in usage for that parameter
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800496 *
497 * For most delivery systems, this will return a single value for each
498 * parameter.
499 * It should be noticed, however, that new OFDM delivery systems like
500 * ISDB can use different modulation types for each group of carriers.
501 * On such standards, up to 8 groups of statistics can be provided, one
502 * for each carrier group (called "layer" on ISDB).
503 * In order to be consistent with other delivery systems, the first
504 * value refers to the entire set of carriers ("global").
505 * dtv_status:scale should use the value FE_SCALE_NOT_AVAILABLE when
506 * the value for the entire group of carriers or from one specific layer
507 * is not provided by the hardware.
508 * st.len should be filled with the latest filled status + 1.
509 *
510 * In other words, for ISDB, those values should be filled like:
hualing chen002e5b92022-02-23 17:51:21 +0800511 * u.st.stat.svalue[0] = global statistics;
512 * u.st.stat.scale[0] = FE_SCALE_DECIBEL;
513 * u.st.stat.value[1] = layer A statistics;
514 * u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available);
515 * u.st.stat.svalue[2] = layer B statistics;
516 * u.st.stat.scale[2] = FE_SCALE_DECIBEL;
517 * u.st.stat.svalue[3] = layer C statistics;
518 * u.st.stat.scale[3] = FE_SCALE_DECIBEL;
519 * u.st.len = 4;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800520 */
521struct dtv_stats {
hualing chen002e5b92022-02-23 17:51:21 +0800522 __u8 scale; /* enum fecap_scale_params type */
523 union {
524 __u64 uvalue; /* for counters and relative scales */
525 __s64 svalue; /* for 0.001 dB measures */
526 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800527} __attribute__ ((packed));
528
529
530#define MAX_DTV_STATS 4
531
532struct dtv_fe_stats {
hualing chen002e5b92022-02-23 17:51:21 +0800533 __u8 len;
534 struct dtv_stats stat[MAX_DTV_STATS];
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800535} __attribute__ ((packed));
536
537struct dtv_property {
hualing chen002e5b92022-02-23 17:51:21 +0800538 __u32 cmd;
539 __u32 reserved[3];
540 union {
541 __u32 data;
542 struct dtv_fe_stats st;
543 struct {
544 __u8 data[32];
545 __u32 len;
546 __u32 reserved1[3];
547 void *reserved2;
548 } buffer;
549 } u;
550 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800551} __attribute__ ((packed));
552
553struct dtv_property_32 {
hualing chen002e5b92022-02-23 17:51:21 +0800554 __u32 cmd;
555 __u32 reserved[3];
556 union {
557 __u32 data;
558 struct dtv_fe_stats st;
559 struct {
560 __u8 data[32];
561 __u32 len;
562 __u32 reserved1[3];
563 __u32 reserved2;
564 } buffer;
565 } u;
566 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800567} __attribute__ ((packed));
568
569struct dtv_property_64 {
hualing chen002e5b92022-02-23 17:51:21 +0800570 __u32 cmd;
571 __u32 reserved[3];
572 union {
573 __u32 data;
574 struct dtv_fe_stats st;
575 struct {
576 __u8 data[32];
577 __u32 len;
578 __u32 reserved1[3];
579 __u64 reserved2;
580 } buffer;
581 } u;
582 int result;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800583} __attribute__ ((packed));
584
585/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
586#define DTV_IOCTL_MAX_MSGS 64
587
588struct dtv_properties {
hualing chen002e5b92022-02-23 17:51:21 +0800589 __u32 num;
590 struct dtv_property *props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800591};
592
593struct dtv_properties_32 {
hualing chen002e5b92022-02-23 17:51:21 +0800594 __u32 num;
595 __u32 props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800596};
597
598struct dtv_properties_64 {
hualing chen002e5b92022-02-23 17:51:21 +0800599 __u32 num;
600 __u64 props;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800601};
602
603#if defined(__DVB_CORE__) || !defined (__KERNEL__)
604
605/*
606 * DEPRECATED: The DVBv3 ioctls, structs and enums should not be used on
607 * newer programs, as it doesn't support the second generation of digital
608 * TV standards, nor supports newer delivery systems.
609 */
610
611enum fe_bandwidth {
hualing chen002e5b92022-02-23 17:51:21 +0800612 BANDWIDTH_8_MHZ,
613 BANDWIDTH_7_MHZ,
614 BANDWIDTH_6_MHZ,
615 BANDWIDTH_AUTO,
616 BANDWIDTH_5_MHZ,
617 BANDWIDTH_10_MHZ,
618 BANDWIDTH_1_712_MHZ,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800619};
620
621/* This is needed for legacy userspace support */
622typedef enum fe_sec_voltage fe_sec_voltage_t;
623typedef enum fe_caps fe_caps_t;
624typedef enum fe_type fe_type_t;
625typedef enum fe_sec_tone_mode fe_sec_tone_mode_t;
626typedef enum fe_sec_mini_cmd fe_sec_mini_cmd_t;
627typedef enum fe_status fe_status_t;
628typedef enum fe_spectral_inversion fe_spectral_inversion_t;
629typedef enum fe_code_rate fe_code_rate_t;
630typedef enum fe_modulation fe_modulation_t;
631typedef enum fe_transmit_mode fe_transmit_mode_t;
632typedef enum fe_bandwidth fe_bandwidth_t;
633typedef enum fe_guard_interval fe_guard_interval_t;
634typedef enum fe_hierarchy fe_hierarchy_t;
635typedef enum fe_pilot fe_pilot_t;
636typedef enum fe_rolloff fe_rolloff_t;
637typedef enum fe_delivery_system fe_delivery_system_t;
638
639#ifdef CONFIG_AMLOGIC_DVB_COMPAT
640enum fe_ofdm_mode {
hualing chen002e5b92022-02-23 17:51:21 +0800641 OFDM_DVBT,
642 OFDM_DVBT2,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800643};
644#endif
645
646struct dvb_qpsk_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800647 __u32 symbol_rate; /* symbol rate in Symbols per second */
648 fe_code_rate_t fec_inner; /* forward error correction (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800649};
650
651struct dvb_qam_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800652 __u32 symbol_rate; /* symbol rate in Symbols per second */
653 fe_code_rate_t fec_inner; /* forward error correction (see above) */
654 fe_modulation_t modulation; /* modulation type (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800655};
656
657struct dvb_vsb_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800658 fe_modulation_t modulation; /* modulation type (see above) */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800659};
660
661struct dvb_ofdm_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800662 fe_bandwidth_t bandwidth;
663 fe_code_rate_t code_rate_HP; /* high priority stream code rate */
664 fe_code_rate_t code_rate_LP; /* low priority stream code rate */
665 fe_modulation_t constellation; /* modulation type (see above) */
666 fe_transmit_mode_t transmission_mode;
667 fe_guard_interval_t guard_interval;
668 fe_hierarchy_t hierarchy_information;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800669};
670
671#ifdef CONFIG_AMLOGIC_DVB_COMPAT
672#define ANALOG_FLAG_ENABLE_AFC 0X00000001
673#define ANALOG_FLAG_MANUL_SCAN 0x00000011
674struct dvb_analog_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800675 /*V4L2_TUNER_MODE_MONO,V4L2_TUNER_MODE_STEREO,*/
676 /*V4L2_TUNER_MODE_LANG2,V4L2_TUNER_MODE_SAP,*/
677 /*V4L2_TUNER_MODE_LANG1,V4L2_TUNER_MODE_LANG1_LANG2 */
678 unsigned int audmode;
679 unsigned int soundsys; /*A2,BTSC,EIAJ,NICAM */
680 v4l2_std_id std;
681 unsigned int flag;
682 unsigned int afc_range;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800683};
684#endif
685
686struct dvb_frontend_parameters {
hualing chen002e5b92022-02-23 17:51:21 +0800687 /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
688 __u32 frequency;
689 /* intermediate frequency in kHz for DVB-S */
690 fe_spectral_inversion_t inversion;
691 union {
692 struct dvb_qpsk_parameters qpsk; /* DVB-S */
693 struct dvb_qam_parameters qam; /* DVB-C */
694 struct dvb_ofdm_parameters ofdm; /* DVB-T */
695 struct dvb_vsb_parameters vsb; /* ATSC */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800696#if 0 && defined(CONFIG_AMLOGIC_DVB_COMPAT)
hualing chen002e5b92022-02-23 17:51:21 +0800697 struct dvb_analog_parameters analog;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800698#endif
hualing chen002e5b92022-02-23 17:51:21 +0800699 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800700};
701
702#ifdef CONFIG_AMLOGIC_DVB_COMPAT
703
704struct dvb_frontend_parameters_ex {
hualing chen002e5b92022-02-23 17:51:21 +0800705 __u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
706 /* intermediate frequency in kHz for DVB-S */
707 fe_spectral_inversion_t inversion;
708 union {
709 struct dvb_qpsk_parameters qpsk; /* DVB-S */
710 struct dvb_qam_parameters qam; /* DVB-C */
711 struct dvb_ofdm_parameters ofdm; /* DVB-T */
712 struct dvb_vsb_parameters vsb; /* ATSC */
713 struct dvb_analog_parameters analog;
Wentao MA270dc0f2022-08-23 13:17:26 +0800714 /* Add extension data here */
hualing chen002e5b92022-02-23 17:51:21 +0800715 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800716};
717
718/*
719static char dvb_check_frontend_parameters_size[
hualing chen002e5b92022-02-23 17:51:21 +0800720 (sizeof(struct dvb_frontend_parameters_ex)
721 == sizeof(struct dvb_frontend_parameters)) ? 1 : -1]
722 __attribute__((__unused__));
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800723*/
724
725#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
726
727struct dvb_frontend_event {
hualing chen002e5b92022-02-23 17:51:21 +0800728 fe_status_t status;
729 struct dvb_frontend_parameters parameters;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800730};
731#ifdef CONFIG_AMLOGIC_DVB_COMPAT
732/* Satellite blind scan event */
733struct dvbsx_blindscanevent {
hualing chen002e5b92022-02-23 17:51:21 +0800734 enum fe_status status;
735 union {
736 /* The percentage completion of the*/
737 /*blind scan procedure. A value of*/
738 /*100 indicates that the blind scan*/
739 /*is finished. */
740 __u16 m_uiprogress;
741 /*The start scan frequency in units of kHz.*/
742 /*The minimum value depends on the tuner*/
743 /*specification.*/
744 __u32 m_uistartfreq_khz;
745 /* Blind scan channel info. */
746 struct dvb_frontend_parameters parameters;
747 } u;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800748};
749#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
750#endif
751
hualing chen002e5b92022-02-23 17:51:21 +0800752#define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties)
753#define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800754
755#define FE_SET_PROPERTY_32 _IOW('o', 82, struct dtv_properties_32)
756#define FE_GET_PROPERTY_32 _IOR('o', 83, struct dtv_properties_32)
757
758#define FE_SET_PROPERTY_64 _IOW('o', 82, struct dtv_properties_64)
759#define FE_GET_PROPERTY_64 _IOR('o', 83, struct dtv_properties_64)
760
761#ifdef CONFIG_AMLOGIC_DVB_COMPAT
762/*for atv*/
763struct tuner_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800764 unsigned int frequency;
765 unsigned int rssi;
766 unsigned char mode;/*dtv:0 or atv:1*/
767 unsigned char tuner_locked;/*notlocked:0,locked:1*/
768 union {
769 void *ressrved;
770 __u64 reserved1;
771 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800772};
773
774
775struct atv_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800776 unsigned char atv_lock;/*notlocked:0,locked 1*/
777 v4l2_std_id std;
778 unsigned int audmode;
779 int snr;
780 int afc;
781 union {
782 void *resrvred;
783 __u64 reserved1;
784 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800785};
786
787struct sound_status_s {
hualing chen002e5b92022-02-23 17:51:21 +0800788 unsigned short sound_sys;/*A2DK/A2BG/NICAM BG/NICAM DK/BTSC/EIAJ*/
789 unsigned short sound_mode;/*SETERO/DUAL/MONO/SAP*/
790 union {
791 void *resrvred;
792 __u64 reserved1;
793 };
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800794};
795
796
797enum tuner_param_cmd_e {
hualing chen002e5b92022-02-23 17:51:21 +0800798 TUNER_CMD_AUDIO_MUTE = 0x0000,
799 TUNER_CMD_AUDIO_ON,
800 TUNER_CMD_TUNER_POWER_ON,
801 TUNER_CMD_TUNER_POWER_DOWN,
802 TUNER_CMD_SET_VOLUME,
803 TUNER_CMD_SET_LEAP_SETP_SIZE,
804 TUNER_CMD_GET_MONO_MODE,
805 TUNER_CMD_SET_BEST_LOCK_RANGE,
806 TUNER_CMD_GET_BEST_LOCK_RANGE,
807 TUNER_CMD_SET_CVBS_AMP_OUT,
808 TUNER_CMD_GET_CVBS_AMP_OUT,
809 TUNER_CMD_NULL,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800810};
811
812
813/*parameter for set param box*/
814struct tuner_param_s {
hualing chen002e5b92022-02-23 17:51:21 +0800815 enum tuner_param_cmd_e cmd;
816 unsigned int parm;
Wentao MA270dc0f2022-08-23 13:17:26 +0800817 unsigned int reserved;
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800818};
819
820
821enum fe_layer {
hualing chen002e5b92022-02-23 17:51:21 +0800822 Layer_A_B_C,
823 Layer_A,
824 Layer_B,
825 Layer_C,
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800826};
827
828// typedef struct dvb_analog_parameters dvb_analog_parameters_t;
829// typedef struct tuner_status_s tuner_status_t;
830// typedef struct atv_status_s atv_status_t;
831// typedef struct sound_status_s sound_status_t;
832// typedef enum tuner_param_cmd_e tuner_param_cmd_t;
833// typedef struct tuner_param_s tuner_param_t;
834// typedef enum fe_layer fe_layer_t;
835// typedef enum fe_ofdm_mode fe_ofdm_mode_t;
836
837
838/* Satellite blind scan settings */
839struct dvbsx_blindscanpara {
hualing chen002e5b92022-02-23 17:51:21 +0800840 __u32 minfrequency;/* minimum tuner frequency in kHz */
841 __u32 maxfrequency;/* maximum tuner frequency in kHz */
842 __u32 minSymbolRate;/* minimum symbol rate in sym/sec */
843 __u32 maxSymbolRate;/* maximum symbol rate in sym/sec */
844 /*search range in kHz. freq -/+freqRange will be searched */
845 __u32 frequencyRange;
846 __u32 frequencyStep;/* tuner step frequency in kHz */
847 __s32 timeout;/* blindscan event timeout*/
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800848};
zhicheng.huangf92bcce2022-10-12 20:13:20 +0800849
850struct dvbsx_singlecable_parameters {
851 /* not singlecable: 0, 1.0X - 1(EN50494), 2.0X - 2(EN50607) */
852 __u32 version;
853 __u32 userband; /* 1.0X: 0 - 7, 2.0X: 0 - 31 */
854 __u32 frequency; /* KHz */
855 __u32 bank;
856 /*
857 * Uncommitted switches setting for SCD2 (Similar to DiSEqC WriteN1 command,
858 * but lower 4 bits only)
859 * Bit[0] : Switch 1 Position A or B
860 * Bit[1] : Switch 2 Position A or B
861 * Bit[2] : Switch 3 Position A or B
862 * Bit[3] : Switch 4 Position A or B
863 */
864 __u32 uncommitted;
865 /*
866 * Committed switches setting for SCD2 (Similar to DiSEqC WriteN0 command,
867 * but lower 4 bits only)
868 * Bit[0] : Low or High Band
869 * Bit[1] : Vertical or Horizontal Polarization
870 * Bit[2] : Satellite Position A or B
871 * Bit[3] : Option Switch Position A or B
872 */
873 __u32 committed;
874};
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800875#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
876/**
877 * When set, this flag will disable any zigzagging or other "normal" tuning
878 * behaviour. Additionally, there will be no automatic monitoring of the lock
879 * status, and hence no frontend events will be generated. If a frontend device
880 * is closed, this flag will be automatically turned off when the device is
881 * reopened read-write.
882 */
883#define FE_TUNE_MODE_ONESHOT 0x01
884
hualing chen002e5b92022-02-23 17:51:21 +0800885#define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800886
887#define FE_DISEQC_RESET_OVERLOAD _IO('o', 62)
888#define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd)
889#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
890#define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */
891
hualing chen002e5b92022-02-23 17:51:21 +0800892#define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */
893#define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800894#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */
895
hualing chen002e5b92022-02-23 17:51:21 +0800896#define FE_READ_STATUS _IOR('o', 69, fe_status_t)
897#define FE_READ_BER _IOR('o', 70, __u32)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800898#define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16)
hualing chen002e5b92022-02-23 17:51:21 +0800899#define FE_READ_SNR _IOR('o', 72, __u16)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800900#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
901
hualing chen002e5b92022-02-23 17:51:21 +0800902#define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters)
903#define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800904#define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */
hualing chen002e5b92022-02-23 17:51:21 +0800905#define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event)
Chuanzhi Wang10a382f2020-09-03 15:34:38 +0800906
907#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
908
909#ifdef CONFIG_AMLOGIC_DVB_COMPAT
910/*need del this ioctl, used set PROPERTY instead*/
911#define FE_SET_DELAY _IO('o', 100)
912#define FE_READ_AFC _IOR('o', 91, __u32)
913#define FE_FINE_TUNE _IOW('o', 92, __u32)
914#define FE_READ_TUNER_STATUS _IOR('o', 93, struct tuner_status_s)
915#define FE_READ_ANALOG_STATUS _IOR('o', 94, struct atv_status_s)
916#define FE_READ_SD_STATUS _IOR('o', 95, struct sound_status_s)
917/*set & get the tuner parameters only atv*/
918#define FE_SET_PARAM_BOX _IOWR('o', 97, struct tuner_param_s)
919#define FE_SET_AFC _IOW('o', 98, __u32)
920#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
921
922#endif /*_DVBFRONTEND_H_*/