frontend.h 16 KB

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