1 /* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
5 * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
6 * Ralph Metzler <ralph@convergence.de>
7 * Holger Waechtler <holger@convergence.de>
8 * Andre Draszik <ad@convergence.de>
9 * for convergence integrated media GmbH
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.
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.
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.
27 #ifndef _DVBFRONTEND_H_
28 #define _DVBFRONTEND_H_
30 #include <linux/types.h>
33 * enum fe_caps - Frontend capabilities
35 * @FE_IS_STUPID: There's something wrong at the
36 * frontend, and it can't report its
38 * @FE_CAN_INVERSION_AUTO: Can auto-detect frequency spectral
40 * @FE_CAN_FEC_1_2: Supports FEC 1/2
41 * @FE_CAN_FEC_2_3: Supports FEC 2/3
42 * @FE_CAN_FEC_3_4: Supports FEC 3/4
43 * @FE_CAN_FEC_4_5: Supports FEC 4/5
44 * @FE_CAN_FEC_5_6: Supports FEC 5/6
45 * @FE_CAN_FEC_6_7: Supports FEC 6/7
46 * @FE_CAN_FEC_7_8: Supports FEC 7/8
47 * @FE_CAN_FEC_8_9: Supports FEC 8/9
48 * @FE_CAN_FEC_AUTO: Can auto-detect FEC
49 * @FE_CAN_QPSK: Supports QPSK modulation
50 * @FE_CAN_QAM_16: Supports 16-QAM modulation
51 * @FE_CAN_QAM_32: Supports 32-QAM modulation
52 * @FE_CAN_QAM_64: Supports 64-QAM modulation
53 * @FE_CAN_QAM_128: Supports 128-QAM modulation
54 * @FE_CAN_QAM_256: Supports 256-QAM modulation
55 * @FE_CAN_QAM_AUTO: Can auto-detect QAM modulation
56 * @FE_CAN_TRANSMISSION_MODE_AUTO: Can auto-detect transmission mode
57 * @FE_CAN_BANDWIDTH_AUTO: Can auto-detect bandwidth
58 * @FE_CAN_GUARD_INTERVAL_AUTO: Can auto-detect guard interval
59 * @FE_CAN_HIERARCHY_AUTO: Can auto-detect hierarchy
60 * @FE_CAN_8VSB: Supports 8-VSB modulation
61 * @FE_CAN_16VSB: Supporta 16-VSB modulation
62 * @FE_HAS_EXTENDED_CAPS: Unused
63 * @FE_CAN_MULTISTREAM: Supports multistream filtering
64 * @FE_CAN_TURBO_FEC: Supports "turbo FEC" modulation
65 * @FE_CAN_2G_MODULATION: Supports "2nd generation" modulation,
66 * e. g. DVB-S2, DVB-T2, DVB-C2
67 * @FE_NEEDS_BENDING: Unused
68 * @FE_CAN_RECOVER: Can recover from a cable unplug
70 * @FE_CAN_MUTE_TS: Can stop spurious TS data output
74 FE_CAN_INVERSION_AUTO
= 0x1,
78 FE_CAN_FEC_4_5
= 0x10,
79 FE_CAN_FEC_5_6
= 0x20,
80 FE_CAN_FEC_6_7
= 0x40,
81 FE_CAN_FEC_7_8
= 0x80,
82 FE_CAN_FEC_8_9
= 0x100,
83 FE_CAN_FEC_AUTO
= 0x200,
85 FE_CAN_QAM_16
= 0x800,
86 FE_CAN_QAM_32
= 0x1000,
87 FE_CAN_QAM_64
= 0x2000,
88 FE_CAN_QAM_128
= 0x4000,
89 FE_CAN_QAM_256
= 0x8000,
90 FE_CAN_QAM_AUTO
= 0x10000,
91 FE_CAN_TRANSMISSION_MODE_AUTO
= 0x20000,
92 FE_CAN_BANDWIDTH_AUTO
= 0x40000,
93 FE_CAN_GUARD_INTERVAL_AUTO
= 0x80000,
94 FE_CAN_HIERARCHY_AUTO
= 0x100000,
95 FE_CAN_8VSB
= 0x200000,
96 FE_CAN_16VSB
= 0x400000,
97 FE_HAS_EXTENDED_CAPS
= 0x800000,
98 FE_CAN_MULTISTREAM
= 0x4000000,
99 FE_CAN_TURBO_FEC
= 0x8000000,
100 FE_CAN_2G_MODULATION
= 0x10000000,
101 FE_NEEDS_BENDING
= 0x20000000,
102 FE_CAN_RECOVER
= 0x40000000,
103 FE_CAN_MUTE_TS
= 0x80000000
107 * DEPRECATED: Should be kept just due to backward compatibility.
117 * struct dvb_frontend_info - Frontend properties and capabilities
119 * @name: Name of the frontend
120 * @type: **DEPRECATED**.
121 * Should not be used on modern programs,
122 * as a frontend may have more than one type.
123 * In order to get the support types of a given
124 * frontend, use :c:type:`DTV_ENUM_DELSYS`
126 * @frequency_min: Minimal frequency supported by the frontend.
127 * @frequency_max: Minimal frequency supported by the frontend.
128 * @frequency_stepsize: All frequencies are multiple of this value.
129 * @frequency_tolerance: Frequency tolerance.
130 * @symbol_rate_min: Minimal symbol rate, in bauds
131 * (for Cable/Satellite systems).
132 * @symbol_rate_max: Maximal symbol rate, in bauds
133 * (for Cable/Satellite systems).
134 * @symbol_rate_tolerance: Maximal symbol rate tolerance, in ppm
135 * (for Cable/Satellite systems).
136 * @notifier_delay: **DEPRECATED**. Not used by any driver.
137 * @caps: Capabilities supported by the frontend,
138 * as specified in &enum fe_caps.
142 * #. The frequencies are specified in Hz for Terrestrial and Cable
144 * #. The frequencies are specified in kHz for Satellite systems.
146 struct dvb_frontend_info
{
148 enum fe_type type
; /* DEPRECATED. Use DTV_ENUM_DELSYS instead */
151 __u32 frequency_stepsize
;
152 __u32 frequency_tolerance
;
153 __u32 symbol_rate_min
;
154 __u32 symbol_rate_max
;
155 __u32 symbol_rate_tolerance
;
156 __u32 notifier_delay
; /* DEPRECATED */
161 * struct dvb_diseqc_master_cmd - DiSEqC master command
164 * DiSEqC message to be sent. It contains a 3 bytes header with:
165 * framing + address + command, and an optional argument
166 * of up to 3 bytes of data.
168 * Length of the DiSEqC message. Valid values are 3 to 6.
170 * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
171 * the possible messages that can be used.
173 struct dvb_diseqc_master_cmd
{
179 * struct dvb_diseqc_slave_reply - DiSEqC received data
182 * DiSEqC message buffer to store a message received via DiSEqC.
183 * It contains one byte header with: framing and
184 * an optional argument of up to 3 bytes of data.
186 * Length of the DiSEqC message. Valid values are 0 to 4,
187 * where 0 means no message.
189 * Return from ioctl after timeout ms with errorcode when
190 * no message was received.
192 * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
193 * the possible messages that can be used.
195 struct dvb_diseqc_slave_reply
{
202 * enum fe_sec_voltage - DC Voltage used to feed the LNBf
204 * @SEC_VOLTAGE_13: Output 13V to the LNBf
205 * @SEC_VOLTAGE_18: Output 18V to the LNBf
206 * @SEC_VOLTAGE_OFF: Don't feed the LNBf with a DC voltage
208 enum fe_sec_voltage
{
215 * enum fe_sec_tone_mode - Type of tone to be send to the LNBf.
216 * @SEC_TONE_ON: Sends a 22kHz tone burst to the antenna.
217 * @SEC_TONE_OFF: Don't send a 22kHz tone to the antenna (except
218 * if the ``FE_DISEQC_*`` ioctls are called).
220 enum fe_sec_tone_mode
{
226 * enum fe_sec_mini_cmd - Type of mini burst to be sent
228 * @SEC_MINI_A: Sends a mini-DiSEqC 22kHz '0' Tone Burst to select
230 * @SEC_MINI_B: Sends a mini-DiSEqC 22kHz '1' Data Burst to select
233 enum fe_sec_mini_cmd
{
239 * enum fe_status - Enumerates the possible frontend status.
240 * @FE_NONE: The frontend doesn't have any kind of lock.
241 * That's the initial frontend status
242 * @FE_HAS_SIGNAL: Has found something above the noise level.
243 * @FE_HAS_CARRIER: Has found a signal.
244 * @FE_HAS_VITERBI: FEC inner coding (Viterbi, LDPC or other inner code).
246 * @FE_HAS_SYNC: Synchronization bytes was found.
247 * @FE_HAS_LOCK: Digital TV were locked and everything is working.
248 * @FE_TIMEDOUT: Fo lock within the last about 2 seconds.
249 * @FE_REINIT: Frontend was reinitialized, application is recommended
250 * to reset DiSEqC, tone and parameters.
254 FE_HAS_SIGNAL
= 0x01,
255 FE_HAS_CARRIER
= 0x02,
256 FE_HAS_VITERBI
= 0x04,
264 * enum fe_spectral_inversion - Type of inversion band
266 * @INVERSION_OFF: Don't do spectral band inversion.
267 * @INVERSION_ON: Do spectral band inversion.
268 * @INVERSION_AUTO: Autodetect spectral band inversion.
270 * This parameter indicates if spectral inversion should be presumed or
271 * not. In the automatic setting (``INVERSION_AUTO``) the hardware will try
272 * to figure out the correct setting by itself. If the hardware doesn't
273 * support, the %dvb_frontend will try to lock at the carrier first with
274 * inversion off. If it fails, it will try to enable inversion.
276 enum fe_spectral_inversion
{
283 * enum fe_code_rate - Type of Forward Error Correction (FEC)
286 * @FEC_NONE: No Forward Error Correction Code
287 * @FEC_1_2: Forward Error Correction Code 1/2
288 * @FEC_2_3: Forward Error Correction Code 2/3
289 * @FEC_3_4: Forward Error Correction Code 3/4
290 * @FEC_4_5: Forward Error Correction Code 4/5
291 * @FEC_5_6: Forward Error Correction Code 5/6
292 * @FEC_6_7: Forward Error Correction Code 6/7
293 * @FEC_7_8: Forward Error Correction Code 7/8
294 * @FEC_8_9: Forward Error Correction Code 8/9
295 * @FEC_AUTO: Autodetect Error Correction Code
296 * @FEC_3_5: Forward Error Correction Code 3/5
297 * @FEC_9_10: Forward Error Correction Code 9/10
298 * @FEC_2_5: Forward Error Correction Code 2/5
300 * Please note that not all FEC types are supported by a given standard.
319 * enum fe_modulation - Type of modulation/constellation
320 * @QPSK: QPSK modulation
321 * @QAM_16: 16-QAM modulation
322 * @QAM_32: 32-QAM modulation
323 * @QAM_64: 64-QAM modulation
324 * @QAM_128: 128-QAM modulation
325 * @QAM_256: 256-QAM modulation
326 * @QAM_AUTO: Autodetect QAM modulation
327 * @VSB_8: 8-VSB modulation
328 * @VSB_16: 16-VSB modulation
329 * @PSK_8: 8-PSK modulation
330 * @APSK_16: 16-APSK modulation
331 * @APSK_32: 32-APSK modulation
332 * @DQPSK: DQPSK modulation
333 * @QAM_4_NR: 4-QAM-NR modulation
335 * Please note that not all modulations are supported by a given standard.
356 * enum fe_transmit_mode - Transmission mode
358 * @TRANSMISSION_MODE_AUTO:
359 * Autodetect transmission mode. The hardware will try to find the
360 * correct FFT-size (if capable) to fill in the missing parameters.
361 * @TRANSMISSION_MODE_1K:
362 * Transmission mode 1K
363 * @TRANSMISSION_MODE_2K:
364 * Transmission mode 2K
365 * @TRANSMISSION_MODE_8K:
366 * Transmission mode 8K
367 * @TRANSMISSION_MODE_4K:
368 * Transmission mode 4K
369 * @TRANSMISSION_MODE_16K:
370 * Transmission mode 16K
371 * @TRANSMISSION_MODE_32K:
372 * Transmission mode 32K
373 * @TRANSMISSION_MODE_C1:
374 * Single Carrier (C=1) transmission mode (DTMB only)
375 * @TRANSMISSION_MODE_C3780:
376 * Multi Carrier (C=3780) transmission mode (DTMB only)
378 * Please note that not all transmission modes are supported by a given
381 enum fe_transmit_mode
{
382 TRANSMISSION_MODE_2K
,
383 TRANSMISSION_MODE_8K
,
384 TRANSMISSION_MODE_AUTO
,
385 TRANSMISSION_MODE_4K
,
386 TRANSMISSION_MODE_1K
,
387 TRANSMISSION_MODE_16K
,
388 TRANSMISSION_MODE_32K
,
389 TRANSMISSION_MODE_C1
,
390 TRANSMISSION_MODE_C3780
,
394 * enum fe_guard_interval - Guard interval
396 * @GUARD_INTERVAL_AUTO: Autodetect the guard interval
397 * @GUARD_INTERVAL_1_128: Guard interval 1/128
398 * @GUARD_INTERVAL_1_32: Guard interval 1/32
399 * @GUARD_INTERVAL_1_16: Guard interval 1/16
400 * @GUARD_INTERVAL_1_8: Guard interval 1/8
401 * @GUARD_INTERVAL_1_4: Guard interval 1/4
402 * @GUARD_INTERVAL_19_128: Guard interval 19/128
403 * @GUARD_INTERVAL_19_256: Guard interval 19/256
404 * @GUARD_INTERVAL_PN420: PN length 420 (1/4)
405 * @GUARD_INTERVAL_PN595: PN length 595 (1/6)
406 * @GUARD_INTERVAL_PN945: PN length 945 (1/9)
408 * Please note that not all guard intervals are supported by a given standard.
410 enum fe_guard_interval
{
416 GUARD_INTERVAL_1_128
,
417 GUARD_INTERVAL_19_128
,
418 GUARD_INTERVAL_19_256
,
419 GUARD_INTERVAL_PN420
,
420 GUARD_INTERVAL_PN595
,
421 GUARD_INTERVAL_PN945
,
425 * enum fe_hierarchy - Hierarchy
426 * @HIERARCHY_NONE: No hierarchy
427 * @HIERARCHY_AUTO: Autodetect hierarchy (if supported)
428 * @HIERARCHY_1: Hierarchy 1
429 * @HIERARCHY_2: Hierarchy 2
430 * @HIERARCHY_4: Hierarchy 4
432 * Please note that not all hierarchy types are supported by a given standard.
443 * enum fe_interleaving - Interleaving
444 * @INTERLEAVING_NONE: No interleaving.
445 * @INTERLEAVING_AUTO: Auto-detect interleaving.
446 * @INTERLEAVING_240: Interleaving of 240 symbols.
447 * @INTERLEAVING_720: Interleaving of 720 symbols.
449 * Please note that, currently, only DTMB uses it.
451 enum fe_interleaving
{
458 /* DVBv5 property Commands */
460 #define DTV_UNDEFINED 0
463 #define DTV_FREQUENCY 3
464 #define DTV_MODULATION 4
465 #define DTV_BANDWIDTH_HZ 5
466 #define DTV_INVERSION 6
467 #define DTV_DISEQC_MASTER 7
468 #define DTV_SYMBOL_RATE 8
469 #define DTV_INNER_FEC 9
470 #define DTV_VOLTAGE 10
473 #define DTV_ROLLOFF 13
474 #define DTV_DISEQC_SLAVE_REPLY 14
476 /* Basic enumeration set for querying unlimited capabilities */
477 #define DTV_FE_CAPABILITY_COUNT 15
478 #define DTV_FE_CAPABILITY 16
479 #define DTV_DELIVERY_SYSTEM 17
481 /* ISDB-T and ISDB-Tsb */
482 #define DTV_ISDBT_PARTIAL_RECEPTION 18
483 #define DTV_ISDBT_SOUND_BROADCASTING 19
485 #define DTV_ISDBT_SB_SUBCHANNEL_ID 20
486 #define DTV_ISDBT_SB_SEGMENT_IDX 21
487 #define DTV_ISDBT_SB_SEGMENT_COUNT 22
489 #define DTV_ISDBT_LAYERA_FEC 23
490 #define DTV_ISDBT_LAYERA_MODULATION 24
491 #define DTV_ISDBT_LAYERA_SEGMENT_COUNT 25
492 #define DTV_ISDBT_LAYERA_TIME_INTERLEAVING 26
494 #define DTV_ISDBT_LAYERB_FEC 27
495 #define DTV_ISDBT_LAYERB_MODULATION 28
496 #define DTV_ISDBT_LAYERB_SEGMENT_COUNT 29
497 #define DTV_ISDBT_LAYERB_TIME_INTERLEAVING 30
499 #define DTV_ISDBT_LAYERC_FEC 31
500 #define DTV_ISDBT_LAYERC_MODULATION 32
501 #define DTV_ISDBT_LAYERC_SEGMENT_COUNT 33
502 #define DTV_ISDBT_LAYERC_TIME_INTERLEAVING 34
504 #define DTV_API_VERSION 35
506 #define DTV_CODE_RATE_HP 36
507 #define DTV_CODE_RATE_LP 37
508 #define DTV_GUARD_INTERVAL 38
509 #define DTV_TRANSMISSION_MODE 39
510 #define DTV_HIERARCHY 40
512 #define DTV_ISDBT_LAYER_ENABLED 41
514 #define DTV_STREAM_ID 42
515 #define DTV_ISDBS_TS_ID_LEGACY DTV_STREAM_ID
516 #define DTV_DVBT2_PLP_ID_LEGACY 43
518 #define DTV_ENUM_DELSYS 44
521 #define DTV_ATSCMH_FIC_VER 45
522 #define DTV_ATSCMH_PARADE_ID 46
523 #define DTV_ATSCMH_NOG 47
524 #define DTV_ATSCMH_TNOG 48
525 #define DTV_ATSCMH_SGN 49
526 #define DTV_ATSCMH_PRC 50
527 #define DTV_ATSCMH_RS_FRAME_MODE 51
528 #define DTV_ATSCMH_RS_FRAME_ENSEMBLE 52
529 #define DTV_ATSCMH_RS_CODE_MODE_PRI 53
530 #define DTV_ATSCMH_RS_CODE_MODE_SEC 54
531 #define DTV_ATSCMH_SCCC_BLOCK_MODE 55
532 #define DTV_ATSCMH_SCCC_CODE_MODE_A 56
533 #define DTV_ATSCMH_SCCC_CODE_MODE_B 57
534 #define DTV_ATSCMH_SCCC_CODE_MODE_C 58
535 #define DTV_ATSCMH_SCCC_CODE_MODE_D 59
537 #define DTV_INTERLEAVING 60
540 /* Quality parameters */
541 #define DTV_STAT_SIGNAL_STRENGTH 62
542 #define DTV_STAT_CNR 63
543 #define DTV_STAT_PRE_ERROR_BIT_COUNT 64
544 #define DTV_STAT_PRE_TOTAL_BIT_COUNT 65
545 #define DTV_STAT_POST_ERROR_BIT_COUNT 66
546 #define DTV_STAT_POST_TOTAL_BIT_COUNT 67
547 #define DTV_STAT_ERROR_BLOCK_COUNT 68
548 #define DTV_STAT_TOTAL_BLOCK_COUNT 69
550 /* Physical layer scrambling */
551 #define DTV_SCRAMBLING_SEQUENCE_INDEX 70
553 #define DTV_MAX_COMMAND DTV_SCRAMBLING_SEQUENCE_INDEX
556 * enum fe_pilot - Type of pilot tone
558 * @PILOT_ON: Pilot tones enabled
559 * @PILOT_OFF: Pilot tones disabled
560 * @PILOT_AUTO: Autodetect pilot tones
569 * enum fe_rolloff - Rolloff factor
570 * @ROLLOFF_35: Roloff factor: α=35%
571 * @ROLLOFF_20: Roloff factor: α=20%
572 * @ROLLOFF_25: Roloff factor: α=25%
573 * @ROLLOFF_AUTO: Auto-detect the roloff factor.
577 * Roloff factor of 35% is implied on DVB-S. On DVB-S2, it is default.
587 * enum fe_delivery_system - Type of the delivery system
590 * Undefined standard. Generally, indicates an error
592 * Cable TV: DVB-C following ITU-T J.83 Annex A spec
594 * Cable TV: DVB-C following ITU-T J.83 Annex B spec (ClearQAM)
596 * Cable TV: DVB-C following ITU-T J.83 Annex C spec
598 * Cable TV: ISDB-C (no drivers yet)
600 * Terrestrial TV: DVB-T
602 * Terrestrial TV: DVB-T2
604 * Terrestrial TV: ISDB-T
606 * Terrestrial TV: ATSC
608 * Terrestrial TV (mobile): ATSC-M/H
610 * Terrestrial TV: DTMB
612 * Satellite TV: DVB-S
614 * Satellite TV: DVB-S2
616 * Satellite TV: DVB-S Turbo
618 * Satellite TV: ISDB-S
620 * Digital audio: DAB (not fully supported)
622 * Satellite TV: DSS (not fully supported)
624 * Terrestrial TV (mobile): CMMB (not fully supported)
626 * Terrestrial TV (mobile): DVB-H (standard deprecated)
628 enum fe_delivery_system
{
650 /* backward compatibility definitions for delivery systems */
651 #define SYS_DVBC_ANNEX_AC SYS_DVBC_ANNEX_A
652 #define SYS_DMBTH SYS_DTMB /* DMB-TH is legacy name, use DTMB */
654 /* ATSC-MH specific parameters */
657 * enum atscmh_sccc_block_mode - Type of Series Concatenated Convolutional
660 * @ATSCMH_SCCC_BLK_SEP:
661 * Separate SCCC: the SCCC outer code mode shall be set independently
662 * for each Group Region (A, B, C, D)
663 * @ATSCMH_SCCC_BLK_COMB:
664 * Combined SCCC: all four Regions shall have the same SCCC outer
666 * @ATSCMH_SCCC_BLK_RES:
667 * Reserved. Shouldn't be used.
669 enum atscmh_sccc_block_mode
{
670 ATSCMH_SCCC_BLK_SEP
= 0,
671 ATSCMH_SCCC_BLK_COMB
= 1,
672 ATSCMH_SCCC_BLK_RES
= 2,
676 * enum atscmh_sccc_code_mode - Type of Series Concatenated Convolutional
679 * @ATSCMH_SCCC_CODE_HLF:
680 * The outer code rate of a SCCC Block is 1/2 rate.
681 * @ATSCMH_SCCC_CODE_QTR:
682 * The outer code rate of a SCCC Block is 1/4 rate.
683 * @ATSCMH_SCCC_CODE_RES:
684 * Reserved. Should not be used.
686 enum atscmh_sccc_code_mode
{
687 ATSCMH_SCCC_CODE_HLF
= 0,
688 ATSCMH_SCCC_CODE_QTR
= 1,
689 ATSCMH_SCCC_CODE_RES
= 2,
693 * enum atscmh_rs_frame_ensemble - Reed Solomon(RS) frame ensemble.
695 * @ATSCMH_RSFRAME_ENS_PRI: Primary Ensemble.
696 * @ATSCMH_RSFRAME_ENS_SEC: Secondary Ensemble.
698 enum atscmh_rs_frame_ensemble
{
699 ATSCMH_RSFRAME_ENS_PRI
= 0,
700 ATSCMH_RSFRAME_ENS_SEC
= 1,
704 * enum atscmh_rs_frame_mode - Reed Solomon (RS) frame mode.
706 * @ATSCMH_RSFRAME_PRI_ONLY:
707 * Single Frame: There is only a primary RS Frame for all Group
709 * @ATSCMH_RSFRAME_PRI_SEC:
710 * Dual Frame: There are two separate RS Frames: Primary RS Frame for
711 * Group Region A and B and Secondary RS Frame for Group Region C and
713 * @ATSCMH_RSFRAME_RES:
714 * Reserved. Shouldn't be used.
716 enum atscmh_rs_frame_mode
{
717 ATSCMH_RSFRAME_PRI_ONLY
= 0,
718 ATSCMH_RSFRAME_PRI_SEC
= 1,
719 ATSCMH_RSFRAME_RES
= 2,
723 * enum atscmh_rs_code_mode
724 * @ATSCMH_RSCODE_211_187: Reed Solomon code (211,187).
725 * @ATSCMH_RSCODE_223_187: Reed Solomon code (223,187).
726 * @ATSCMH_RSCODE_235_187: Reed Solomon code (235,187).
727 * @ATSCMH_RSCODE_RES: Reserved. Shouldn't be used.
729 enum atscmh_rs_code_mode
{
730 ATSCMH_RSCODE_211_187
= 0,
731 ATSCMH_RSCODE_223_187
= 1,
732 ATSCMH_RSCODE_235_187
= 2,
733 ATSCMH_RSCODE_RES
= 3,
736 #define NO_STREAM_ID_FILTER (~0U)
737 #define LNA_AUTO (~0U)
740 * enum fecap_scale_params - scale types for the quality parameters.
742 * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That
743 * could indicate a temporary or a permanent
745 * @FE_SCALE_DECIBEL: The scale is measured in 0.001 dB steps, typically
746 * used on signal measures.
747 * @FE_SCALE_RELATIVE: The scale is a relative percentual measure,
748 * ranging from 0 (0%) to 0xffff (100%).
749 * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like
750 * bit error, block error, lapsed time.
752 enum fecap_scale_params
{
753 FE_SCALE_NOT_AVAILABLE
= 0,
760 * struct dtv_stats - Used for reading a DTV status property
763 * Filled with enum fecap_scale_params - the scale in usage
767 * integer value of the measure, for %FE_SCALE_DECIBEL,
768 * used for dB measures. The unit is 0.001 dB.
771 * unsigned integer value of the measure, used when @scale is
772 * either %FE_SCALE_RELATIVE or %FE_SCALE_COUNTER.
774 * For most delivery systems, this will return a single value for each
777 * It should be noticed, however, that new OFDM delivery systems like
778 * ISDB can use different modulation types for each group of carriers.
779 * On such standards, up to 8 groups of statistics can be provided, one
780 * for each carrier group (called "layer" on ISDB).
782 * In order to be consistent with other delivery systems, the first
783 * value refers to the entire set of carriers ("global").
785 * @scale should use the value %FE_SCALE_NOT_AVAILABLE when
786 * the value for the entire group of carriers or from one specific layer
787 * is not provided by the hardware.
789 * @len should be filled with the latest filled status + 1.
791 * In other words, for ISDB, those values should be filled like::
793 * u.st.stat.svalue[0] = global statistics;
794 * u.st.stat.scale[0] = FE_SCALE_DECIBEL;
795 * u.st.stat.value[1] = layer A statistics;
796 * u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available);
797 * u.st.stat.svalue[2] = layer B statistics;
798 * u.st.stat.scale[2] = FE_SCALE_DECIBEL;
799 * u.st.stat.svalue[3] = layer C statistics;
800 * u.st.stat.scale[3] = FE_SCALE_DECIBEL;
804 __u8 scale
; /* enum fecap_scale_params type */
806 __u64 uvalue
; /* for counters and relative scales */
807 __s64 svalue
; /* for 0.001 dB measures */
809 } __attribute__ ((packed
));
812 #define MAX_DTV_STATS 4
815 * struct dtv_fe_stats - store Digital TV frontend statistics
817 * @len: length of the statistics - if zero, stats is disabled.
818 * @stat: array with digital TV statistics.
820 * On most standards, @len can either be 0 or 1. However, for ISDB, each
821 * layer is modulated in separate. So, each layer may have its own set
822 * of statistics. If so, stat[0] carries on a global value for the property.
823 * Indexes 1 to 3 means layer A to B.
825 struct dtv_fe_stats
{
827 struct dtv_stats stat
[MAX_DTV_STATS
];
828 } __attribute__ ((packed
));
831 * struct dtv_property - store one of frontend command and its value
833 * @cmd: Digital TV command.
834 * @reserved: Not used.
835 * @u: Union with the values for the command.
836 * @u.data: A unsigned 32 bits integer with command value.
837 * @u.buffer: Struct to store bigger properties.
839 * @u.buffer.data: an unsigned 32-bits array.
840 * @u.buffer.len: number of elements of the buffer.
841 * @u.buffer.reserved1: Reserved.
842 * @u.buffer.reserved2: Reserved.
843 * @u.st: a &struct dtv_fe_stats array of statistics.
844 * @result: Currently unused.
847 struct dtv_property
{
852 struct dtv_fe_stats st
;
861 } __attribute__ ((packed
));
863 /* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
864 #define DTV_IOCTL_MAX_MSGS 64
867 * struct dtv_properties - a set of command/value pairs.
869 * @num: amount of commands stored at the struct.
870 * @props: a pointer to &struct dtv_property.
872 struct dtv_properties
{
874 struct dtv_property
*props
;
878 * When set, this flag will disable any zigzagging or other "normal" tuning
879 * behavior. Additionally, there will be no automatic monitoring of the lock
880 * status, and hence no frontend events will be generated. If a frontend device
881 * is closed, this flag will be automatically turned off when the device is
882 * reopened read-write.
884 #define FE_TUNE_MODE_ONESHOT 0x01
886 /* Digital TV Frontend API calls */
888 #define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info)
890 #define FE_DISEQC_RESET_OVERLOAD _IO('o', 62)
891 #define FE_DISEQC_SEND_MASTER_CMD _IOW('o', 63, struct dvb_diseqc_master_cmd)
892 #define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
893 #define FE_DISEQC_SEND_BURST _IO('o', 65) /* fe_sec_mini_cmd_t */
895 #define FE_SET_TONE _IO('o', 66) /* fe_sec_tone_mode_t */
896 #define FE_SET_VOLTAGE _IO('o', 67) /* fe_sec_voltage_t */
897 #define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68) /* int */
899 #define FE_READ_STATUS _IOR('o', 69, fe_status_t)
900 #define FE_READ_BER _IOR('o', 70, __u32)
901 #define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16)
902 #define FE_READ_SNR _IOR('o', 72, __u16)
903 #define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
905 #define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */
906 #define FE_GET_EVENT _IOR('o', 78, struct dvb_frontend_event)
908 #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
910 #define FE_SET_PROPERTY _IOW('o', 82, struct dtv_properties)
911 #define FE_GET_PROPERTY _IOR('o', 83, struct dtv_properties)
913 #if defined(__DVB_CORE__) || !defined(__KERNEL__)
916 * DEPRECATED: Everything below is deprecated in favor of DVBv5 API
918 * The DVBv3 only ioctls, structs and enums should not be used on
919 * newer programs, as it doesn't support the second generation of
920 * digital TV standards, nor supports newer delivery systems.
921 * They also don't support modern frontends with usually support multiple
924 * Drivers shouldn't use them.
926 * New applications should use DVBv5 delivery system instead
942 /* This is kept for legacy userspace support */
943 typedef enum fe_sec_voltage fe_sec_voltage_t
;
944 typedef enum fe_caps fe_caps_t
;
945 typedef enum fe_type fe_type_t
;
946 typedef enum fe_sec_tone_mode fe_sec_tone_mode_t
;
947 typedef enum fe_sec_mini_cmd fe_sec_mini_cmd_t
;
948 typedef enum fe_status fe_status_t
;
949 typedef enum fe_spectral_inversion fe_spectral_inversion_t
;
950 typedef enum fe_code_rate fe_code_rate_t
;
951 typedef enum fe_modulation fe_modulation_t
;
952 typedef enum fe_transmit_mode fe_transmit_mode_t
;
953 typedef enum fe_bandwidth fe_bandwidth_t
;
954 typedef enum fe_guard_interval fe_guard_interval_t
;
955 typedef enum fe_hierarchy fe_hierarchy_t
;
956 typedef enum fe_pilot fe_pilot_t
;
957 typedef enum fe_rolloff fe_rolloff_t
;
958 typedef enum fe_delivery_system fe_delivery_system_t
;
962 struct dvb_qpsk_parameters
{
963 __u32 symbol_rate
; /* symbol rate in Symbols per second */
964 fe_code_rate_t fec_inner
; /* forward error correction (see above) */
967 struct dvb_qam_parameters
{
968 __u32 symbol_rate
; /* symbol rate in Symbols per second */
969 fe_code_rate_t fec_inner
; /* forward error correction (see above) */
970 fe_modulation_t modulation
; /* modulation type (see above) */
973 struct dvb_vsb_parameters
{
974 fe_modulation_t modulation
; /* modulation type (see above) */
977 struct dvb_ofdm_parameters
{
978 fe_bandwidth_t bandwidth
;
979 fe_code_rate_t code_rate_HP
; /* high priority stream code rate */
980 fe_code_rate_t code_rate_LP
; /* low priority stream code rate */
981 fe_modulation_t constellation
; /* modulation type (see above) */
982 fe_transmit_mode_t transmission_mode
;
983 fe_guard_interval_t guard_interval
;
984 fe_hierarchy_t hierarchy_information
;
987 struct dvb_frontend_parameters
{
988 __u32 frequency
; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
989 /* intermediate frequency in kHz for DVB-S */
990 fe_spectral_inversion_t inversion
;
992 struct dvb_qpsk_parameters qpsk
; /* DVB-S */
993 struct dvb_qam_parameters qam
; /* DVB-C */
994 struct dvb_ofdm_parameters ofdm
; /* DVB-T */
995 struct dvb_vsb_parameters vsb
; /* ATSC */
999 struct dvb_frontend_event
{
1001 struct dvb_frontend_parameters parameters
;
1004 /* DVBv3 API calls */
1006 #define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters)
1007 #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters)
1011 #endif /*_DVBFRONTEND_H_*/