frontend.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. /*
  2. * frontend.h
  3. *
  4. * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
  5. * Ralph Metzler <ralph@convergence.de>
  6. * Holger Waechtler <holger@convergence.de>
  7. * Andre Draszik <ad@convergence.de>
  8. * for convergence integrated media GmbH
  9. *
  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. #ifndef _DVBFRONTEND_H_
  26. #define _DVBFRONTEND_H_
  27. #include <linux/types.h>
  28. enum fe_type {
  29. FE_QPSK,
  30. FE_QAM,
  31. FE_OFDM,
  32. FE_ATSC
  33. };
  34. typedef enum fe_type fe_type_t;
  35. enum fe_caps {
  36. FE_IS_STUPID = 0,
  37. FE_CAN_INVERSION_AUTO = 0x1,
  38. FE_CAN_FEC_1_2 = 0x2,
  39. FE_CAN_FEC_2_3 = 0x4,
  40. FE_CAN_FEC_3_4 = 0x8,
  41. FE_CAN_FEC_4_5 = 0x10,
  42. FE_CAN_FEC_5_6 = 0x20,
  43. FE_CAN_FEC_6_7 = 0x40,
  44. FE_CAN_FEC_7_8 = 0x80,
  45. FE_CAN_FEC_8_9 = 0x100,
  46. FE_CAN_FEC_AUTO = 0x200,
  47. FE_CAN_QPSK = 0x400,
  48. FE_CAN_QAM_16 = 0x800,
  49. FE_CAN_QAM_32 = 0x1000,
  50. FE_CAN_QAM_64 = 0x2000,
  51. FE_CAN_QAM_128 = 0x4000,
  52. FE_CAN_QAM_256 = 0x8000,
  53. FE_CAN_QAM_AUTO = 0x10000,
  54. FE_CAN_TRANSMISSION_MODE_AUTO = 0x20000,
  55. FE_CAN_BANDWIDTH_AUTO = 0x40000,
  56. FE_CAN_GUARD_INTERVAL_AUTO = 0x80000,
  57. FE_CAN_HIERARCHY_AUTO = 0x100000,
  58. FE_CAN_8VSB = 0x200000,
  59. FE_CAN_16VSB = 0x400000,
  60. FE_HAS_EXTENDED_CAPS = 0x800000, /* We need more bitspace for newer APIs, indicate this. */
  61. FE_CAN_MULTISTREAM = 0x4000000, /* frontend supports multistream filtering */
  62. FE_CAN_TURBO_FEC = 0x8000000, /* frontend supports "turbo fec modulation" */
  63. FE_CAN_2G_MODULATION = 0x10000000, /* frontend supports "2nd generation modulation" (DVB-S2) */
  64. FE_NEEDS_BENDING = 0x20000000, /* not supported anymore, don't use (frontend requires frequency bending) */
  65. FE_CAN_RECOVER = 0x40000000, /* frontend can recover from a cable unplug automatically */
  66. FE_CAN_MUTE_TS = 0x80000000 /* frontend can stop spurious TS data output */
  67. };
  68. typedef enum fe_caps fe_caps_t;
  69. struct dvb_frontend_info {
  70. char name[128];
  71. fe_type_t type; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
  72. __u32 frequency_min;
  73. __u32 frequency_max;
  74. __u32 frequency_stepsize;
  75. __u32 frequency_tolerance;
  76. __u32 symbol_rate_min;
  77. __u32 symbol_rate_max;
  78. __u32 symbol_rate_tolerance; /* ppm */
  79. __u32 notifier_delay; /* DEPRECATED */
  80. fe_caps_t caps;
  81. };
  82. /**
  83. * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
  84. * the meaning of this struct...
  85. */
  86. struct dvb_diseqc_master_cmd {
  87. __u8 msg [6]; /* { framing, address, command, data [3] } */
  88. __u8 msg_len; /* valid values are 3...6 */
  89. };
  90. struct dvb_diseqc_slave_reply {
  91. __u8 msg [4]; /* { framing, data [3] } */
  92. __u8 msg_len; /* valid values are 0...4, 0 means no msg */
  93. int timeout; /* return from ioctl after timeout ms with */
  94. }; /* errorcode when no message was received */
  95. enum fe_sec_voltage {
  96. SEC_VOLTAGE_13,
  97. SEC_VOLTAGE_18,
  98. SEC_VOLTAGE_OFF
  99. };
  100. typedef enum fe_sec_voltage fe_sec_voltage_t;
  101. enum fe_sec_tone_mode {
  102. SEC_TONE_ON,
  103. SEC_TONE_OFF
  104. };
  105. typedef enum fe_sec_tone_mode fe_sec_tone_mode_t;
  106. enum fe_sec_mini_cmd {
  107. SEC_MINI_A,
  108. SEC_MINI_B
  109. };
  110. typedef enum fe_sec_mini_cmd fe_sec_mini_cmd_t;
  111. /**
  112. * enum fe_status - enumerates the possible frontend status
  113. * @FE_HAS_SIGNAL: found something above the noise level
  114. * @FE_HAS_CARRIER: found a DVB signal
  115. * @FE_HAS_VITERBI: FEC is stable
  116. * @FE_HAS_SYNC: found sync bytes
  117. * @FE_HAS_LOCK: everything's working
  118. * @FE_TIMEDOUT: no lock within the last ~2 seconds
  119. * @FE_REINIT: frontend was reinitialized, application is recommended
  120. * to reset DiSEqC, tone and parameters
  121. */
  122. enum fe_status {
  123. FE_HAS_SIGNAL = 0x01,
  124. FE_HAS_CARRIER = 0x02,
  125. FE_HAS_VITERBI = 0x04,
  126. FE_HAS_SYNC = 0x08,
  127. FE_HAS_LOCK = 0x10,
  128. FE_TIMEDOUT = 0x20,
  129. FE_REINIT = 0x40,
  130. };
  131. typedef enum fe_status fe_status_t;
  132. enum fe_spectral_inversion {
  133. INVERSION_OFF,
  134. INVERSION_ON,
  135. INVERSION_AUTO
  136. };
  137. typedef enum fe_spectral_inversion fe_spectral_inversion_t;
  138. enum fe_code_rate {
  139. FEC_NONE = 0,
  140. FEC_1_2,
  141. FEC_2_3,
  142. FEC_3_4,
  143. FEC_4_5,
  144. FEC_5_6,
  145. FEC_6_7,
  146. FEC_7_8,
  147. FEC_8_9,
  148. FEC_AUTO,
  149. FEC_3_5,
  150. FEC_9_10,
  151. FEC_2_5,
  152. };
  153. typedef enum fe_code_rate fe_code_rate_t;
  154. enum fe_modulation {
  155. QPSK,
  156. QAM_16,
  157. QAM_32,
  158. QAM_64,
  159. QAM_128,
  160. QAM_256,
  161. QAM_AUTO,
  162. VSB_8,
  163. VSB_16,
  164. PSK_8,
  165. APSK_16,
  166. APSK_32,
  167. DQPSK,
  168. QAM_4_NR,
  169. };
  170. typedef enum fe_modulation fe_modulation_t;
  171. enum fe_transmit_mode {
  172. TRANSMISSION_MODE_2K,
  173. TRANSMISSION_MODE_8K,
  174. TRANSMISSION_MODE_AUTO,
  175. TRANSMISSION_MODE_4K,
  176. TRANSMISSION_MODE_1K,
  177. TRANSMISSION_MODE_16K,
  178. TRANSMISSION_MODE_32K,
  179. TRANSMISSION_MODE_C1,
  180. TRANSMISSION_MODE_C3780,
  181. };
  182. typedef enum fe_transmit_mode fe_transmit_mode_t;
  183. #if defined(__DVB_CORE__) || !defined (__KERNEL__)
  184. enum fe_bandwidth {
  185. BANDWIDTH_8_MHZ,
  186. BANDWIDTH_7_MHZ,
  187. BANDWIDTH_6_MHZ,
  188. BANDWIDTH_AUTO,
  189. BANDWIDTH_5_MHZ,
  190. BANDWIDTH_10_MHZ,
  191. BANDWIDTH_1_712_MHZ,
  192. };
  193. typedef enum fe_bandwidth fe_bandwidth_t;
  194. #endif
  195. enum fe_guard_interval {
  196. GUARD_INTERVAL_1_32,
  197. GUARD_INTERVAL_1_16,
  198. GUARD_INTERVAL_1_8,
  199. GUARD_INTERVAL_1_4,
  200. GUARD_INTERVAL_AUTO,
  201. GUARD_INTERVAL_1_128,
  202. GUARD_INTERVAL_19_128,
  203. GUARD_INTERVAL_19_256,
  204. GUARD_INTERVAL_PN420,
  205. GUARD_INTERVAL_PN595,
  206. GUARD_INTERVAL_PN945,
  207. };
  208. typedef enum fe_guard_interval fe_guard_interval_t;
  209. enum fe_hierarchy {
  210. HIERARCHY_NONE,
  211. HIERARCHY_1,
  212. HIERARCHY_2,
  213. HIERARCHY_4,
  214. HIERARCHY_AUTO
  215. };
  216. typedef enum fe_hierarchy fe_hierarchy_t;
  217. enum fe_interleaving {
  218. INTERLEAVING_NONE,
  219. INTERLEAVING_AUTO,
  220. INTERLEAVING_240,
  221. INTERLEAVING_720,
  222. };
  223. #if defined(__DVB_CORE__) || !defined (__KERNEL__)
  224. struct dvb_qpsk_parameters {
  225. __u32 symbol_rate; /* symbol rate in Symbols per second */
  226. fe_code_rate_t fec_inner; /* forward error correction (see above) */
  227. };
  228. struct dvb_qam_parameters {
  229. __u32 symbol_rate; /* symbol rate in Symbols per second */
  230. fe_code_rate_t fec_inner; /* forward error correction (see above) */
  231. fe_modulation_t modulation; /* modulation type (see above) */
  232. };
  233. struct dvb_vsb_parameters {
  234. fe_modulation_t modulation; /* modulation type (see above) */
  235. };
  236. struct dvb_ofdm_parameters {
  237. fe_bandwidth_t bandwidth;
  238. fe_code_rate_t code_rate_HP; /* high priority stream code rate */
  239. fe_code_rate_t code_rate_LP; /* low priority stream code rate */
  240. fe_modulation_t constellation; /* modulation type (see above) */
  241. fe_transmit_mode_t transmission_mode;
  242. fe_guard_interval_t guard_interval;
  243. fe_hierarchy_t hierarchy_information;
  244. };
  245. struct dvb_frontend_parameters {
  246. __u32 frequency; /* (absolute) frequency in Hz for QAM/OFDM/ATSC */
  247. /* intermediate frequency in kHz for QPSK */
  248. fe_spectral_inversion_t inversion;
  249. union {
  250. struct dvb_qpsk_parameters qpsk;
  251. struct dvb_qam_parameters qam;
  252. struct dvb_ofdm_parameters ofdm;
  253. struct dvb_vsb_parameters vsb;
  254. } u;
  255. };
  256. struct dvb_frontend_event {
  257. fe_status_t status;
  258. struct dvb_frontend_parameters parameters;
  259. };
  260. #endif
  261. /* S2API Commands */
  262. #define DTV_UNDEFINED 0
  263. #define DTV_TUNE 1
  264. #define DTV_CLEAR 2
  265. #define DTV_FREQUENCY 3
  266. #define DTV_MODULATION 4
  267. #define DTV_BANDWIDTH_HZ 5
  268. #define DTV_INVERSION 6
  269. #define DTV_DISEQC_MASTER 7
  270. #define DTV_SYMBOL_RATE 8
  271. #define DTV_INNER_FEC 9
  272. #define DTV_VOLTAGE 10
  273. #define DTV_TONE 11
  274. #define DTV_PILOT 12
  275. #define DTV_ROLLOFF 13
  276. #define DTV_DISEQC_SLAVE_REPLY 14
  277. /* Basic enumeration set for querying unlimited capabilities */
  278. #define DTV_FE_CAPABILITY_COUNT 15
  279. #define DTV_FE_CAPABILITY 16
  280. #define DTV_DELIVERY_SYSTEM 17
  281. /* ISDB-T and ISDB-Tsb */
  282. #define DTV_ISDBT_PARTIAL_RECEPTION 18
  283. #define DTV_ISDBT_SOUND_BROADCASTING 19
  284. #define DTV_ISDBT_SB_SUBCHANNEL_ID 20
  285. #define DTV_ISDBT_SB_SEGMENT_IDX 21
  286. #define DTV_ISDBT_SB_SEGMENT_COUNT 22
  287. #define DTV_ISDBT_LAYERA_FEC 23
  288. #define DTV_ISDBT_LAYERA_MODULATION 24
  289. #define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25
  290. #define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26
  291. #define DTV_ISDBT_LAYERB_FEC 27
  292. #define DTV_ISDBT_LAYERB_MODULATION 28
  293. #define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29
  294. #define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30
  295. #define DTV_ISDBT_LAYERC_FEC 31
  296. #define DTV_ISDBT_LAYERC_MODULATION 32
  297. #define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33
  298. #define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34
  299. #define DTV_API_VERSION 35
  300. #define DTV_CODE_RATE_HP 36
  301. #define DTV_CODE_RATE_LP 37
  302. #define DTV_GUARD_INTERVAL 38
  303. #define DTV_TRANSMISSION_MODE 39
  304. #define DTV_HIERARCHY 40
  305. #define DTV_ISDBT_LAYER_ENABLED 41
  306. #define DTV_STREAM_ID 42
  307. #define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID
  308. #define DTV_DVBT2_PLP_ID_LEGACY 43
  309. #define DTV_ENUM_DELSYS 44
  310. /* ATSC-MH */
  311. #define DTV_ATSCMH_FIC_VER 45
  312. #define DTV_ATSCMH_PARADE_ID 46
  313. #define DTV_ATSCMH_NOG 47
  314. #define DTV_ATSCMH_TNOG 48
  315. #define DTV_ATSCMH_SGN 49
  316. #define DTV_ATSCMH_PRC 50
  317. #define DTV_ATSCMH_RS_FRAME_MODE 51
  318. #define DTV_ATSCMH_RS_FRAME_ENSEMBLE 52
  319. #define DTV_ATSCMH_RS_CODE_MODE_PRI 53
  320. #define DTV_ATSCMH_RS_CODE_MODE_SEC 54
  321. #define DTV_ATSCMH_SCCC_BLOCK_MODE 55
  322. #define DTV_ATSCMH_SCCC_CODE_MODE_A 56
  323. #define DTV_ATSCMH_SCCC_CODE_MODE_B 57
  324. #define DTV_ATSCMH_SCCC_CODE_MODE_C 58
  325. #define DTV_ATSCMH_SCCC_CODE_MODE_D 59
  326. #define DTV_INTERLEAVING 60
  327. #define DTV_LNA 61
  328. /* Quality parameters */
  329. #define DTV_STAT_SIGNAL_STRENGTH 62
  330. #define DTV_STAT_CNR 63
  331. #define DTV_STAT_PRE_ERROR_BIT_COUNT 64
  332. #define DTV_STAT_PRE_TOTAL_BIT_COUNT 65
  333. #define DTV_STAT_POST_ERROR_BIT_COUNT 66
  334. #define DTV_STAT_POST_TOTAL_BIT_COUNT 67
  335. #define DTV_STAT_ERROR_BLOCK_COUNT 68
  336. #define DTV_STAT_TOTAL_BLOCK_COUNT 69
  337. #define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT
  338. enum fe_pilot {
  339. PILOT_ON,
  340. PILOT_OFF,
  341. PILOT_AUTO,
  342. };
  343. typedef enum fe_pilot fe_pilot_t;
  344. enum fe_rolloff {
  345. ROLLOFF_35, /* Implied value in DVB-S, default for DVB-S2 */
  346. ROLLOFF_20,
  347. ROLLOFF_25,
  348. ROLLOFF_AUTO,
  349. };
  350. typedef enum fe_rolloff fe_rolloff_t;
  351. enum fe_delivery_system {
  352. SYS_UNDEFINED,
  353. SYS_DVBC_ANNEX_A,
  354. SYS_DVBC_ANNEX_B,
  355. SYS_DVBT,
  356. SYS_DSS,
  357. SYS_DVBS,
  358. SYS_DVBS2,
  359. SYS_DVBH,
  360. SYS_ISDBT,
  361. SYS_ISDBS,
  362. SYS_ISDBC,
  363. SYS_ATSC,
  364. SYS_ATSCMH,
  365. SYS_DTMB,
  366. SYS_CMMB,
  367. SYS_DAB,
  368. SYS_DVBT2,
  369. SYS_TURBO,
  370. SYS_DVBC_ANNEX_C,
  371. };
  372. typedef enum fe_delivery_system fe_delivery_system_t;
  373. /* backward compatibility */
  374. #define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A
  375. #define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB instead */
  376. /* ATSC-MH */
  377. enum atscmh_sccc_block_mode {
  378. ATSCMH_SCCC_BLK_SEP = 0,
  379. ATSCMH_SCCC_BLK_COMB = 1,
  380. ATSCMH_SCCC_BLK_RES = 2,
  381. };
  382. enum atscmh_sccc_code_mode {
  383. ATSCMH_SCCC_CODE_HLF = 0,
  384. ATSCMH_SCCC_CODE_QTR = 1,
  385. ATSCMH_SCCC_CODE_RES = 2,
  386. };
  387. enum atscmh_rs_frame_ensemble {
  388. ATSCMH_RSFRAME_ENS_PRI = 0,
  389. ATSCMH_RSFRAME_ENS_SEC = 1,
  390. };
  391. enum atscmh_rs_frame_mode {
  392. ATSCMH_RSFRAME_PRI_ONLY = 0,
  393. ATSCMH_RSFRAME_PRI_SEC = 1,
  394. ATSCMH_RSFRAME_RES = 2,
  395. };
  396. enum atscmh_rs_code_mode {
  397. ATSCMH_RSCODE_211_187 = 0,
  398. ATSCMH_RSCODE_223_187 = 1,
  399. ATSCMH_RSCODE_235_187 = 2,
  400. ATSCMH_RSCODE_RES = 3,
  401. };
  402. #define NO_STREAM_ID_FILTER (~0U)
  403. #define LNA_AUTO (~0U)
  404. struct dtv_cmds_h {
  405. char *name; /* A display name for debugging purposes */
  406. __u32 cmd; /* A unique ID */
  407. /* Flags */
  408. __u32 set:1; /* Either a set or get property */
  409. __u32 buffer:1; /* Does this property use the buffer? */
  410. __u32 reserved:30; /* Align */
  411. };
  412. /**
  413. * Scale types for the quality parameters.
  414. * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That
  415. * could indicate a temporary or a permanent
  416. * condition.
  417. * @FE_SCALE_DECIBEL: The scale is measured in 0.001 dB steps, typically
  418. * used on signal measures.
  419. * @FE_SCALE_RELATIVE: The scale is a relative percentual measure,
  420. * ranging from 0 (0%) to 0xffff (100%).
  421. * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like
  422. * bit error, block error, lapsed time.
  423. */
  424. enum fecap_scale_params {
  425. FE_SCALE_NOT_AVAILABLE = 0,
  426. FE_SCALE_DECIBEL,
  427. FE_SCALE_RELATIVE,
  428. FE_SCALE_COUNTER
  429. };
  430. /**
  431. * struct dtv_stats - Used for reading a DTV status property
  432. *
  433. * @value: value of the measure. Should range from 0 to 0xffff;
  434. * @scale: Filled with enum fecap_scale_params - the scale
  435. * in usage for that parameter
  436. *
  437. * For most delivery systems, this will return a single value for each
  438. * parameter.
  439. * It should be noticed, however, that new OFDM delivery systems like
  440. * ISDB can use different modulation types for each group of carriers.
  441. * On such standards, up to 8 groups of statistics can be provided, one
  442. * for each carrier group (called "layer" on ISDB).
  443. * In order to be consistent with other delivery systems, the first
  444. * value refers to the entire set of carriers ("global").
  445. * dtv_status:scale should use the value FE_SCALE_NOT_AVAILABLE when
  446. * the value for the entire group of carriers or from one specific layer
  447. * is not provided by the hardware.
  448. * st.len should be filled with the latest filled status + 1.
  449. *
  450. * In other words, for ISDB, those values should be filled like:
  451. * u.st.stat.svalue[0] = global statistics;
  452. * u.st.stat.scale[0] = FE_SCALE_DECIBELS;
  453. * u.st.stat.value[1] = layer A statistics;
  454. * u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available);
  455. * u.st.stat.svalue[2] = layer B statistics;
  456. * u.st.stat.scale[2] = FE_SCALE_DECIBELS;
  457. * u.st.stat.svalue[3] = layer C statistics;
  458. * u.st.stat.scale[3] = FE_SCALE_DECIBELS;
  459. * u.st.len = 4;
  460. */
  461. struct dtv_stats {
  462. __u8 scale; /* enum fecap_scale_params type */
  463. union {
  464. __u64 uvalue; /* for counters and relative scales */
  465. __s64 svalue; /* for 0.001 dB measures */
  466. };
  467. } __attribute__ ((packed));
  468. #define MAX_DTV_STATS 4
  469. struct dtv_fe_stats {
  470. __u8 len;
  471. struct dtv_stats stat[MAX_DTV_STATS];
  472. } __attribute__ ((packed));
  473. struct dtv_property {
  474. __u32 cmd;
  475. __u32 reserved[3];
  476. union {
  477. __u32 data;
  478. struct dtv_fe_stats st;
  479. struct {
  480. __u8 data[32];
  481. __u32 len;
  482. __u32 reserved1[3];
  483. void *reserved2;
  484. } buffer;
  485. } u;
  486. int result;
  487. } __attribute__ ((packed));
  488. /* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
  489. #define DTV_IOCTL_MAX_MSGS 64
  490. struct dtv_properties {
  491. __u32 num;
  492. struct dtv_property *props;
  493. };
  494. #define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties)
  495. #define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties)
  496. /**
  497. * When set, this flag will disable any zigzagging or other "normal" tuning
  498. * behaviour. Additionally, there will be no automatic monitoring of the lock
  499. * status, and hence no frontend events will be generated. If a frontend device
  500. * is closed, this flag will be automatically turned off when the device is
  501. * reopened read-write.
  502. */
  503. #define FE_TUNE_MODE_ONESHOT 0x01
  504. #define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info)
  505. #define FE_DISEQC_RESET_OVERLOAD _IO('o', 62)
  506. #define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd)
  507. #define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
  508. #define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */
  509. #define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */
  510. #define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */
  511. #define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */
  512. #define FE_READ_STATUS _IOR('o', 69, fe_status_t)
  513. #define FE_READ_BER _IOR('o', 70, __u32)
  514. #define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16)
  515. #define FE_READ_SNR _IOR('o', 72, __u16)
  516. #define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
  517. #define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters)
  518. #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters)
  519. #define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */
  520. #define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event)
  521. #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
  522. #endif /*_DVBFRONTEND_H_*/