18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: LGPL-2.1+ WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * frontend.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
68c2ecf20Sopenharmony_ci *		    Ralph  Metzler <ralph@convergence.de>
78c2ecf20Sopenharmony_ci *		    Holger Waechtler <holger@convergence.de>
88c2ecf20Sopenharmony_ci *		    Andre Draszik <ad@convergence.de>
98c2ecf20Sopenharmony_ci *		    for convergence integrated media GmbH
108c2ecf20Sopenharmony_ci *
118c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or
128c2ecf20Sopenharmony_ci * modify it under the terms of the GNU Lesser General Public License
138c2ecf20Sopenharmony_ci * as published by the Free Software Foundation; either version 2.1
148c2ecf20Sopenharmony_ci * of the License, or (at your option) any later version.
158c2ecf20Sopenharmony_ci *
168c2ecf20Sopenharmony_ci * This program is distributed in the hope that it will be useful,
178c2ecf20Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of
188c2ecf20Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
198c2ecf20Sopenharmony_ci * GNU General Public License for more details.
208c2ecf20Sopenharmony_ci *
218c2ecf20Sopenharmony_ci * You should have received a copy of the GNU Lesser General Public License
228c2ecf20Sopenharmony_ci * along with this program; if not, write to the Free Software
238c2ecf20Sopenharmony_ci * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
248c2ecf20Sopenharmony_ci *
258c2ecf20Sopenharmony_ci */
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#ifndef _DVBFRONTEND_H_
288c2ecf20Sopenharmony_ci#define _DVBFRONTEND_H_
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#include <linux/types.h>
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci/**
338c2ecf20Sopenharmony_ci * enum fe_caps - Frontend capabilities
348c2ecf20Sopenharmony_ci *
358c2ecf20Sopenharmony_ci * @FE_IS_STUPID:			There's something wrong at the
368c2ecf20Sopenharmony_ci *					frontend, and it can't report its
378c2ecf20Sopenharmony_ci *					capabilities.
388c2ecf20Sopenharmony_ci * @FE_CAN_INVERSION_AUTO:		Can auto-detect frequency spectral
398c2ecf20Sopenharmony_ci *					band inversion
408c2ecf20Sopenharmony_ci * @FE_CAN_FEC_1_2:			Supports FEC 1/2
418c2ecf20Sopenharmony_ci * @FE_CAN_FEC_2_3:			Supports FEC 2/3
428c2ecf20Sopenharmony_ci * @FE_CAN_FEC_3_4:			Supports FEC 3/4
438c2ecf20Sopenharmony_ci * @FE_CAN_FEC_4_5:			Supports FEC 4/5
448c2ecf20Sopenharmony_ci * @FE_CAN_FEC_5_6:			Supports FEC 5/6
458c2ecf20Sopenharmony_ci * @FE_CAN_FEC_6_7:			Supports FEC 6/7
468c2ecf20Sopenharmony_ci * @FE_CAN_FEC_7_8:			Supports FEC 7/8
478c2ecf20Sopenharmony_ci * @FE_CAN_FEC_8_9:			Supports FEC 8/9
488c2ecf20Sopenharmony_ci * @FE_CAN_FEC_AUTO:			Can auto-detect FEC
498c2ecf20Sopenharmony_ci * @FE_CAN_QPSK:			Supports QPSK modulation
508c2ecf20Sopenharmony_ci * @FE_CAN_QAM_16:			Supports 16-QAM modulation
518c2ecf20Sopenharmony_ci * @FE_CAN_QAM_32:			Supports 32-QAM modulation
528c2ecf20Sopenharmony_ci * @FE_CAN_QAM_64:			Supports 64-QAM modulation
538c2ecf20Sopenharmony_ci * @FE_CAN_QAM_128:			Supports 128-QAM modulation
548c2ecf20Sopenharmony_ci * @FE_CAN_QAM_256:			Supports 256-QAM modulation
558c2ecf20Sopenharmony_ci * @FE_CAN_QAM_AUTO:			Can auto-detect QAM modulation
568c2ecf20Sopenharmony_ci * @FE_CAN_TRANSMISSION_MODE_AUTO:	Can auto-detect transmission mode
578c2ecf20Sopenharmony_ci * @FE_CAN_BANDWIDTH_AUTO:		Can auto-detect bandwidth
588c2ecf20Sopenharmony_ci * @FE_CAN_GUARD_INTERVAL_AUTO:		Can auto-detect guard interval
598c2ecf20Sopenharmony_ci * @FE_CAN_HIERARCHY_AUTO:		Can auto-detect hierarchy
608c2ecf20Sopenharmony_ci * @FE_CAN_8VSB:			Supports 8-VSB modulation
618c2ecf20Sopenharmony_ci * @FE_CAN_16VSB:			Supporta 16-VSB modulation
628c2ecf20Sopenharmony_ci * @FE_HAS_EXTENDED_CAPS:		Unused
638c2ecf20Sopenharmony_ci * @FE_CAN_MULTISTREAM:			Supports multistream filtering
648c2ecf20Sopenharmony_ci * @FE_CAN_TURBO_FEC:			Supports "turbo FEC" modulation
658c2ecf20Sopenharmony_ci * @FE_CAN_2G_MODULATION:		Supports "2nd generation" modulation,
668c2ecf20Sopenharmony_ci *					e. g. DVB-S2, DVB-T2, DVB-C2
678c2ecf20Sopenharmony_ci * @FE_NEEDS_BENDING:			Unused
688c2ecf20Sopenharmony_ci * @FE_CAN_RECOVER:			Can recover from a cable unplug
698c2ecf20Sopenharmony_ci *					automatically
708c2ecf20Sopenharmony_ci * @FE_CAN_MUTE_TS:			Can stop spurious TS data output
718c2ecf20Sopenharmony_ci */
728c2ecf20Sopenharmony_cienum fe_caps {
738c2ecf20Sopenharmony_ci	FE_IS_STUPID			= 0,
748c2ecf20Sopenharmony_ci	FE_CAN_INVERSION_AUTO		= 0x1,
758c2ecf20Sopenharmony_ci	FE_CAN_FEC_1_2			= 0x2,
768c2ecf20Sopenharmony_ci	FE_CAN_FEC_2_3			= 0x4,
778c2ecf20Sopenharmony_ci	FE_CAN_FEC_3_4			= 0x8,
788c2ecf20Sopenharmony_ci	FE_CAN_FEC_4_5			= 0x10,
798c2ecf20Sopenharmony_ci	FE_CAN_FEC_5_6			= 0x20,
808c2ecf20Sopenharmony_ci	FE_CAN_FEC_6_7			= 0x40,
818c2ecf20Sopenharmony_ci	FE_CAN_FEC_7_8			= 0x80,
828c2ecf20Sopenharmony_ci	FE_CAN_FEC_8_9			= 0x100,
838c2ecf20Sopenharmony_ci	FE_CAN_FEC_AUTO			= 0x200,
848c2ecf20Sopenharmony_ci	FE_CAN_QPSK			= 0x400,
858c2ecf20Sopenharmony_ci	FE_CAN_QAM_16			= 0x800,
868c2ecf20Sopenharmony_ci	FE_CAN_QAM_32			= 0x1000,
878c2ecf20Sopenharmony_ci	FE_CAN_QAM_64			= 0x2000,
888c2ecf20Sopenharmony_ci	FE_CAN_QAM_128			= 0x4000,
898c2ecf20Sopenharmony_ci	FE_CAN_QAM_256			= 0x8000,
908c2ecf20Sopenharmony_ci	FE_CAN_QAM_AUTO			= 0x10000,
918c2ecf20Sopenharmony_ci	FE_CAN_TRANSMISSION_MODE_AUTO	= 0x20000,
928c2ecf20Sopenharmony_ci	FE_CAN_BANDWIDTH_AUTO		= 0x40000,
938c2ecf20Sopenharmony_ci	FE_CAN_GUARD_INTERVAL_AUTO	= 0x80000,
948c2ecf20Sopenharmony_ci	FE_CAN_HIERARCHY_AUTO		= 0x100000,
958c2ecf20Sopenharmony_ci	FE_CAN_8VSB			= 0x200000,
968c2ecf20Sopenharmony_ci	FE_CAN_16VSB			= 0x400000,
978c2ecf20Sopenharmony_ci	FE_HAS_EXTENDED_CAPS		= 0x800000,
988c2ecf20Sopenharmony_ci	FE_CAN_MULTISTREAM		= 0x4000000,
998c2ecf20Sopenharmony_ci	FE_CAN_TURBO_FEC		= 0x8000000,
1008c2ecf20Sopenharmony_ci	FE_CAN_2G_MODULATION		= 0x10000000,
1018c2ecf20Sopenharmony_ci	FE_NEEDS_BENDING		= 0x20000000,
1028c2ecf20Sopenharmony_ci	FE_CAN_RECOVER			= 0x40000000,
1038c2ecf20Sopenharmony_ci	FE_CAN_MUTE_TS			= 0x80000000
1048c2ecf20Sopenharmony_ci};
1058c2ecf20Sopenharmony_ci
1068c2ecf20Sopenharmony_ci/*
1078c2ecf20Sopenharmony_ci * DEPRECATED: Should be kept just due to backward compatibility.
1088c2ecf20Sopenharmony_ci */
1098c2ecf20Sopenharmony_cienum fe_type {
1108c2ecf20Sopenharmony_ci	FE_QPSK,
1118c2ecf20Sopenharmony_ci	FE_QAM,
1128c2ecf20Sopenharmony_ci	FE_OFDM,
1138c2ecf20Sopenharmony_ci	FE_ATSC
1148c2ecf20Sopenharmony_ci};
1158c2ecf20Sopenharmony_ci
1168c2ecf20Sopenharmony_ci/**
1178c2ecf20Sopenharmony_ci * struct dvb_frontend_info - Frontend properties and capabilities
1188c2ecf20Sopenharmony_ci *
1198c2ecf20Sopenharmony_ci * @name:			Name of the frontend
1208c2ecf20Sopenharmony_ci * @type:			**DEPRECATED**.
1218c2ecf20Sopenharmony_ci *				Should not be used on modern programs,
1228c2ecf20Sopenharmony_ci *				as a frontend may have more than one type.
1238c2ecf20Sopenharmony_ci *				In order to get the support types of a given
1248c2ecf20Sopenharmony_ci *				frontend, use :c:type:`DTV_ENUM_DELSYS`
1258c2ecf20Sopenharmony_ci *				instead.
1268c2ecf20Sopenharmony_ci * @frequency_min:		Minimal frequency supported by the frontend.
1278c2ecf20Sopenharmony_ci * @frequency_max:		Minimal frequency supported by the frontend.
1288c2ecf20Sopenharmony_ci * @frequency_stepsize:		All frequencies are multiple of this value.
1298c2ecf20Sopenharmony_ci * @frequency_tolerance:	Frequency tolerance.
1308c2ecf20Sopenharmony_ci * @symbol_rate_min:		Minimal symbol rate, in bauds
1318c2ecf20Sopenharmony_ci *				(for Cable/Satellite systems).
1328c2ecf20Sopenharmony_ci * @symbol_rate_max:		Maximal symbol rate, in bauds
1338c2ecf20Sopenharmony_ci *				(for Cable/Satellite systems).
1348c2ecf20Sopenharmony_ci * @symbol_rate_tolerance:	Maximal symbol rate tolerance, in ppm
1358c2ecf20Sopenharmony_ci *				(for Cable/Satellite systems).
1368c2ecf20Sopenharmony_ci * @notifier_delay:		**DEPRECATED**. Not used by any driver.
1378c2ecf20Sopenharmony_ci * @caps:			Capabilities supported by the frontend,
1388c2ecf20Sopenharmony_ci *				as specified in &enum fe_caps.
1398c2ecf20Sopenharmony_ci *
1408c2ecf20Sopenharmony_ci * .. note:
1418c2ecf20Sopenharmony_ci *
1428c2ecf20Sopenharmony_ci *    #. The frequencies are specified in Hz for Terrestrial and Cable
1438c2ecf20Sopenharmony_ci *       systems.
1448c2ecf20Sopenharmony_ci *    #. The frequencies are specified in kHz for Satellite systems.
1458c2ecf20Sopenharmony_ci */
1468c2ecf20Sopenharmony_cistruct dvb_frontend_info {
1478c2ecf20Sopenharmony_ci	char       name[128];
1488c2ecf20Sopenharmony_ci	enum fe_type type;	/* DEPRECATED. Use DTV_ENUM_DELSYS instead */
1498c2ecf20Sopenharmony_ci	__u32      frequency_min;
1508c2ecf20Sopenharmony_ci	__u32      frequency_max;
1518c2ecf20Sopenharmony_ci	__u32      frequency_stepsize;
1528c2ecf20Sopenharmony_ci	__u32      frequency_tolerance;
1538c2ecf20Sopenharmony_ci	__u32      symbol_rate_min;
1548c2ecf20Sopenharmony_ci	__u32      symbol_rate_max;
1558c2ecf20Sopenharmony_ci	__u32      symbol_rate_tolerance;
1568c2ecf20Sopenharmony_ci	__u32      notifier_delay;		/* DEPRECATED */
1578c2ecf20Sopenharmony_ci	enum fe_caps caps;
1588c2ecf20Sopenharmony_ci};
1598c2ecf20Sopenharmony_ci
1608c2ecf20Sopenharmony_ci/**
1618c2ecf20Sopenharmony_ci * struct dvb_diseqc_master_cmd - DiSEqC master command
1628c2ecf20Sopenharmony_ci *
1638c2ecf20Sopenharmony_ci * @msg:
1648c2ecf20Sopenharmony_ci *	DiSEqC message to be sent. It contains a 3 bytes header with:
1658c2ecf20Sopenharmony_ci *	framing + address + command, and an optional argument
1668c2ecf20Sopenharmony_ci *	of up to 3 bytes of data.
1678c2ecf20Sopenharmony_ci * @msg_len:
1688c2ecf20Sopenharmony_ci *	Length of the DiSEqC message. Valid values are 3 to 6.
1698c2ecf20Sopenharmony_ci *
1708c2ecf20Sopenharmony_ci * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
1718c2ecf20Sopenharmony_ci * the possible messages that can be used.
1728c2ecf20Sopenharmony_ci */
1738c2ecf20Sopenharmony_cistruct dvb_diseqc_master_cmd {
1748c2ecf20Sopenharmony_ci	__u8 msg[6];
1758c2ecf20Sopenharmony_ci	__u8 msg_len;
1768c2ecf20Sopenharmony_ci};
1778c2ecf20Sopenharmony_ci
1788c2ecf20Sopenharmony_ci/**
1798c2ecf20Sopenharmony_ci * struct dvb_diseqc_slave_reply - DiSEqC received data
1808c2ecf20Sopenharmony_ci *
1818c2ecf20Sopenharmony_ci * @msg:
1828c2ecf20Sopenharmony_ci *	DiSEqC message buffer to store a message received via DiSEqC.
1838c2ecf20Sopenharmony_ci *	It contains one byte header with: framing and
1848c2ecf20Sopenharmony_ci *	an optional argument of up to 3 bytes of data.
1858c2ecf20Sopenharmony_ci * @msg_len:
1868c2ecf20Sopenharmony_ci *	Length of the DiSEqC message. Valid values are 0 to 4,
1878c2ecf20Sopenharmony_ci *	where 0 means no message.
1888c2ecf20Sopenharmony_ci * @timeout:
1898c2ecf20Sopenharmony_ci *	Return from ioctl after timeout ms with errorcode when
1908c2ecf20Sopenharmony_ci *	no message was received.
1918c2ecf20Sopenharmony_ci *
1928c2ecf20Sopenharmony_ci * Check out the DiSEqC bus spec available on http://www.eutelsat.org/ for
1938c2ecf20Sopenharmony_ci * the possible messages that can be used.
1948c2ecf20Sopenharmony_ci */
1958c2ecf20Sopenharmony_cistruct dvb_diseqc_slave_reply {
1968c2ecf20Sopenharmony_ci	__u8 msg[4];
1978c2ecf20Sopenharmony_ci	__u8 msg_len;
1988c2ecf20Sopenharmony_ci	int  timeout;
1998c2ecf20Sopenharmony_ci};
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci/**
2028c2ecf20Sopenharmony_ci * enum fe_sec_voltage - DC Voltage used to feed the LNBf
2038c2ecf20Sopenharmony_ci *
2048c2ecf20Sopenharmony_ci * @SEC_VOLTAGE_13:	Output 13V to the LNBf
2058c2ecf20Sopenharmony_ci * @SEC_VOLTAGE_18:	Output 18V to the LNBf
2068c2ecf20Sopenharmony_ci * @SEC_VOLTAGE_OFF:	Don't feed the LNBf with a DC voltage
2078c2ecf20Sopenharmony_ci */
2088c2ecf20Sopenharmony_cienum fe_sec_voltage {
2098c2ecf20Sopenharmony_ci	SEC_VOLTAGE_13,
2108c2ecf20Sopenharmony_ci	SEC_VOLTAGE_18,
2118c2ecf20Sopenharmony_ci	SEC_VOLTAGE_OFF
2128c2ecf20Sopenharmony_ci};
2138c2ecf20Sopenharmony_ci
2148c2ecf20Sopenharmony_ci/**
2158c2ecf20Sopenharmony_ci * enum fe_sec_tone_mode - Type of tone to be send to the LNBf.
2168c2ecf20Sopenharmony_ci * @SEC_TONE_ON:	Sends a 22kHz tone burst to the antenna.
2178c2ecf20Sopenharmony_ci * @SEC_TONE_OFF:	Don't send a 22kHz tone to the antenna (except
2188c2ecf20Sopenharmony_ci *			if the ``FE_DISEQC_*`` ioctls are called).
2198c2ecf20Sopenharmony_ci */
2208c2ecf20Sopenharmony_cienum fe_sec_tone_mode {
2218c2ecf20Sopenharmony_ci	SEC_TONE_ON,
2228c2ecf20Sopenharmony_ci	SEC_TONE_OFF
2238c2ecf20Sopenharmony_ci};
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci/**
2268c2ecf20Sopenharmony_ci * enum fe_sec_mini_cmd - Type of mini burst to be sent
2278c2ecf20Sopenharmony_ci *
2288c2ecf20Sopenharmony_ci * @SEC_MINI_A:		Sends a mini-DiSEqC 22kHz '0' Tone Burst to select
2298c2ecf20Sopenharmony_ci *			satellite-A
2308c2ecf20Sopenharmony_ci * @SEC_MINI_B:		Sends a mini-DiSEqC 22kHz '1' Data Burst to select
2318c2ecf20Sopenharmony_ci *			satellite-B
2328c2ecf20Sopenharmony_ci */
2338c2ecf20Sopenharmony_cienum fe_sec_mini_cmd {
2348c2ecf20Sopenharmony_ci	SEC_MINI_A,
2358c2ecf20Sopenharmony_ci	SEC_MINI_B
2368c2ecf20Sopenharmony_ci};
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_ci/**
2398c2ecf20Sopenharmony_ci * enum fe_status - Enumerates the possible frontend status.
2408c2ecf20Sopenharmony_ci * @FE_NONE:		The frontend doesn't have any kind of lock.
2418c2ecf20Sopenharmony_ci *			That's the initial frontend status
2428c2ecf20Sopenharmony_ci * @FE_HAS_SIGNAL:	Has found something above the noise level.
2438c2ecf20Sopenharmony_ci * @FE_HAS_CARRIER:	Has found a signal.
2448c2ecf20Sopenharmony_ci * @FE_HAS_VITERBI:	FEC inner coding (Viterbi, LDPC or other inner code).
2458c2ecf20Sopenharmony_ci *			is stable.
2468c2ecf20Sopenharmony_ci * @FE_HAS_SYNC:	Synchronization bytes was found.
2478c2ecf20Sopenharmony_ci * @FE_HAS_LOCK:	Digital TV were locked and everything is working.
2488c2ecf20Sopenharmony_ci * @FE_TIMEDOUT:	Fo lock within the last about 2 seconds.
2498c2ecf20Sopenharmony_ci * @FE_REINIT:		Frontend was reinitialized, application is recommended
2508c2ecf20Sopenharmony_ci *			to reset DiSEqC, tone and parameters.
2518c2ecf20Sopenharmony_ci */
2528c2ecf20Sopenharmony_cienum fe_status {
2538c2ecf20Sopenharmony_ci	FE_NONE			= 0x00,
2548c2ecf20Sopenharmony_ci	FE_HAS_SIGNAL		= 0x01,
2558c2ecf20Sopenharmony_ci	FE_HAS_CARRIER		= 0x02,
2568c2ecf20Sopenharmony_ci	FE_HAS_VITERBI		= 0x04,
2578c2ecf20Sopenharmony_ci	FE_HAS_SYNC		= 0x08,
2588c2ecf20Sopenharmony_ci	FE_HAS_LOCK		= 0x10,
2598c2ecf20Sopenharmony_ci	FE_TIMEDOUT		= 0x20,
2608c2ecf20Sopenharmony_ci	FE_REINIT		= 0x40,
2618c2ecf20Sopenharmony_ci};
2628c2ecf20Sopenharmony_ci
2638c2ecf20Sopenharmony_ci/**
2648c2ecf20Sopenharmony_ci * enum fe_spectral_inversion - Type of inversion band
2658c2ecf20Sopenharmony_ci *
2668c2ecf20Sopenharmony_ci * @INVERSION_OFF:	Don't do spectral band inversion.
2678c2ecf20Sopenharmony_ci * @INVERSION_ON:	Do spectral band inversion.
2688c2ecf20Sopenharmony_ci * @INVERSION_AUTO:	Autodetect spectral band inversion.
2698c2ecf20Sopenharmony_ci *
2708c2ecf20Sopenharmony_ci * This parameter indicates if spectral inversion should be presumed or
2718c2ecf20Sopenharmony_ci * not. In the automatic setting (``INVERSION_AUTO``) the hardware will try
2728c2ecf20Sopenharmony_ci * to figure out the correct setting by itself. If the hardware doesn't
2738c2ecf20Sopenharmony_ci * support, the %dvb_frontend will try to lock at the carrier first with
2748c2ecf20Sopenharmony_ci * inversion off. If it fails, it will try to enable inversion.
2758c2ecf20Sopenharmony_ci */
2768c2ecf20Sopenharmony_cienum fe_spectral_inversion {
2778c2ecf20Sopenharmony_ci	INVERSION_OFF,
2788c2ecf20Sopenharmony_ci	INVERSION_ON,
2798c2ecf20Sopenharmony_ci	INVERSION_AUTO
2808c2ecf20Sopenharmony_ci};
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_ci/**
2838c2ecf20Sopenharmony_ci * enum fe_code_rate - Type of Forward Error Correction (FEC)
2848c2ecf20Sopenharmony_ci *
2858c2ecf20Sopenharmony_ci *
2868c2ecf20Sopenharmony_ci * @FEC_NONE: No Forward Error Correction Code
2878c2ecf20Sopenharmony_ci * @FEC_1_2:  Forward Error Correction Code 1/2
2888c2ecf20Sopenharmony_ci * @FEC_2_3:  Forward Error Correction Code 2/3
2898c2ecf20Sopenharmony_ci * @FEC_3_4:  Forward Error Correction Code 3/4
2908c2ecf20Sopenharmony_ci * @FEC_4_5:  Forward Error Correction Code 4/5
2918c2ecf20Sopenharmony_ci * @FEC_5_6:  Forward Error Correction Code 5/6
2928c2ecf20Sopenharmony_ci * @FEC_6_7:  Forward Error Correction Code 6/7
2938c2ecf20Sopenharmony_ci * @FEC_7_8:  Forward Error Correction Code 7/8
2948c2ecf20Sopenharmony_ci * @FEC_8_9:  Forward Error Correction Code 8/9
2958c2ecf20Sopenharmony_ci * @FEC_AUTO: Autodetect Error Correction Code
2968c2ecf20Sopenharmony_ci * @FEC_3_5:  Forward Error Correction Code 3/5
2978c2ecf20Sopenharmony_ci * @FEC_9_10: Forward Error Correction Code 9/10
2988c2ecf20Sopenharmony_ci * @FEC_2_5:  Forward Error Correction Code 2/5
2998c2ecf20Sopenharmony_ci *
3008c2ecf20Sopenharmony_ci * Please note that not all FEC types are supported by a given standard.
3018c2ecf20Sopenharmony_ci */
3028c2ecf20Sopenharmony_cienum fe_code_rate {
3038c2ecf20Sopenharmony_ci	FEC_NONE = 0,
3048c2ecf20Sopenharmony_ci	FEC_1_2,
3058c2ecf20Sopenharmony_ci	FEC_2_3,
3068c2ecf20Sopenharmony_ci	FEC_3_4,
3078c2ecf20Sopenharmony_ci	FEC_4_5,
3088c2ecf20Sopenharmony_ci	FEC_5_6,
3098c2ecf20Sopenharmony_ci	FEC_6_7,
3108c2ecf20Sopenharmony_ci	FEC_7_8,
3118c2ecf20Sopenharmony_ci	FEC_8_9,
3128c2ecf20Sopenharmony_ci	FEC_AUTO,
3138c2ecf20Sopenharmony_ci	FEC_3_5,
3148c2ecf20Sopenharmony_ci	FEC_9_10,
3158c2ecf20Sopenharmony_ci	FEC_2_5,
3168c2ecf20Sopenharmony_ci};
3178c2ecf20Sopenharmony_ci
3188c2ecf20Sopenharmony_ci/**
3198c2ecf20Sopenharmony_ci * enum fe_modulation - Type of modulation/constellation
3208c2ecf20Sopenharmony_ci * @QPSK:	QPSK modulation
3218c2ecf20Sopenharmony_ci * @QAM_16:	16-QAM modulation
3228c2ecf20Sopenharmony_ci * @QAM_32:	32-QAM modulation
3238c2ecf20Sopenharmony_ci * @QAM_64:	64-QAM modulation
3248c2ecf20Sopenharmony_ci * @QAM_128:	128-QAM modulation
3258c2ecf20Sopenharmony_ci * @QAM_256:	256-QAM modulation
3268c2ecf20Sopenharmony_ci * @QAM_AUTO:	Autodetect QAM modulation
3278c2ecf20Sopenharmony_ci * @VSB_8:	8-VSB modulation
3288c2ecf20Sopenharmony_ci * @VSB_16:	16-VSB modulation
3298c2ecf20Sopenharmony_ci * @PSK_8:	8-PSK modulation
3308c2ecf20Sopenharmony_ci * @APSK_16:	16-APSK modulation
3318c2ecf20Sopenharmony_ci * @APSK_32:	32-APSK modulation
3328c2ecf20Sopenharmony_ci * @DQPSK:	DQPSK modulation
3338c2ecf20Sopenharmony_ci * @QAM_4_NR:	4-QAM-NR modulation
3348c2ecf20Sopenharmony_ci *
3358c2ecf20Sopenharmony_ci * Please note that not all modulations are supported by a given standard.
3368c2ecf20Sopenharmony_ci *
3378c2ecf20Sopenharmony_ci */
3388c2ecf20Sopenharmony_cienum fe_modulation {
3398c2ecf20Sopenharmony_ci	QPSK,
3408c2ecf20Sopenharmony_ci	QAM_16,
3418c2ecf20Sopenharmony_ci	QAM_32,
3428c2ecf20Sopenharmony_ci	QAM_64,
3438c2ecf20Sopenharmony_ci	QAM_128,
3448c2ecf20Sopenharmony_ci	QAM_256,
3458c2ecf20Sopenharmony_ci	QAM_AUTO,
3468c2ecf20Sopenharmony_ci	VSB_8,
3478c2ecf20Sopenharmony_ci	VSB_16,
3488c2ecf20Sopenharmony_ci	PSK_8,
3498c2ecf20Sopenharmony_ci	APSK_16,
3508c2ecf20Sopenharmony_ci	APSK_32,
3518c2ecf20Sopenharmony_ci	DQPSK,
3528c2ecf20Sopenharmony_ci	QAM_4_NR,
3538c2ecf20Sopenharmony_ci};
3548c2ecf20Sopenharmony_ci
3558c2ecf20Sopenharmony_ci/**
3568c2ecf20Sopenharmony_ci * enum fe_transmit_mode - Transmission mode
3578c2ecf20Sopenharmony_ci *
3588c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_AUTO:
3598c2ecf20Sopenharmony_ci *	Autodetect transmission mode. The hardware will try to find the
3608c2ecf20Sopenharmony_ci *	correct FFT-size (if capable) to fill in the missing parameters.
3618c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_1K:
3628c2ecf20Sopenharmony_ci *	Transmission mode 1K
3638c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_2K:
3648c2ecf20Sopenharmony_ci *	Transmission mode 2K
3658c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_8K:
3668c2ecf20Sopenharmony_ci *	Transmission mode 8K
3678c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_4K:
3688c2ecf20Sopenharmony_ci *	Transmission mode 4K
3698c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_16K:
3708c2ecf20Sopenharmony_ci *	Transmission mode 16K
3718c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_32K:
3728c2ecf20Sopenharmony_ci *	Transmission mode 32K
3738c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_C1:
3748c2ecf20Sopenharmony_ci *	Single Carrier (C=1) transmission mode (DTMB only)
3758c2ecf20Sopenharmony_ci * @TRANSMISSION_MODE_C3780:
3768c2ecf20Sopenharmony_ci *	Multi Carrier (C=3780) transmission mode (DTMB only)
3778c2ecf20Sopenharmony_ci *
3788c2ecf20Sopenharmony_ci * Please note that not all transmission modes are supported by a given
3798c2ecf20Sopenharmony_ci * standard.
3808c2ecf20Sopenharmony_ci */
3818c2ecf20Sopenharmony_cienum fe_transmit_mode {
3828c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_2K,
3838c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_8K,
3848c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_AUTO,
3858c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_4K,
3868c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_1K,
3878c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_16K,
3888c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_32K,
3898c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_C1,
3908c2ecf20Sopenharmony_ci	TRANSMISSION_MODE_C3780,
3918c2ecf20Sopenharmony_ci};
3928c2ecf20Sopenharmony_ci
3938c2ecf20Sopenharmony_ci/**
3948c2ecf20Sopenharmony_ci * enum fe_guard_interval - Guard interval
3958c2ecf20Sopenharmony_ci *
3968c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_AUTO:	Autodetect the guard interval
3978c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_1_128:	Guard interval 1/128
3988c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_1_32:	Guard interval 1/32
3998c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_1_16:	Guard interval 1/16
4008c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_1_8:		Guard interval 1/8
4018c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_1_4:		Guard interval 1/4
4028c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_19_128:	Guard interval 19/128
4038c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_19_256:	Guard interval 19/256
4048c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_PN420:	PN length 420 (1/4)
4058c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_PN595:	PN length 595 (1/6)
4068c2ecf20Sopenharmony_ci * @GUARD_INTERVAL_PN945:	PN length 945 (1/9)
4078c2ecf20Sopenharmony_ci *
4088c2ecf20Sopenharmony_ci * Please note that not all guard intervals are supported by a given standard.
4098c2ecf20Sopenharmony_ci */
4108c2ecf20Sopenharmony_cienum fe_guard_interval {
4118c2ecf20Sopenharmony_ci	GUARD_INTERVAL_1_32,
4128c2ecf20Sopenharmony_ci	GUARD_INTERVAL_1_16,
4138c2ecf20Sopenharmony_ci	GUARD_INTERVAL_1_8,
4148c2ecf20Sopenharmony_ci	GUARD_INTERVAL_1_4,
4158c2ecf20Sopenharmony_ci	GUARD_INTERVAL_AUTO,
4168c2ecf20Sopenharmony_ci	GUARD_INTERVAL_1_128,
4178c2ecf20Sopenharmony_ci	GUARD_INTERVAL_19_128,
4188c2ecf20Sopenharmony_ci	GUARD_INTERVAL_19_256,
4198c2ecf20Sopenharmony_ci	GUARD_INTERVAL_PN420,
4208c2ecf20Sopenharmony_ci	GUARD_INTERVAL_PN595,
4218c2ecf20Sopenharmony_ci	GUARD_INTERVAL_PN945,
4228c2ecf20Sopenharmony_ci};
4238c2ecf20Sopenharmony_ci
4248c2ecf20Sopenharmony_ci/**
4258c2ecf20Sopenharmony_ci * enum fe_hierarchy - Hierarchy
4268c2ecf20Sopenharmony_ci * @HIERARCHY_NONE:	No hierarchy
4278c2ecf20Sopenharmony_ci * @HIERARCHY_AUTO:	Autodetect hierarchy (if supported)
4288c2ecf20Sopenharmony_ci * @HIERARCHY_1:	Hierarchy 1
4298c2ecf20Sopenharmony_ci * @HIERARCHY_2:	Hierarchy 2
4308c2ecf20Sopenharmony_ci * @HIERARCHY_4:	Hierarchy 4
4318c2ecf20Sopenharmony_ci *
4328c2ecf20Sopenharmony_ci * Please note that not all hierarchy types are supported by a given standard.
4338c2ecf20Sopenharmony_ci */
4348c2ecf20Sopenharmony_cienum fe_hierarchy {
4358c2ecf20Sopenharmony_ci	HIERARCHY_NONE,
4368c2ecf20Sopenharmony_ci	HIERARCHY_1,
4378c2ecf20Sopenharmony_ci	HIERARCHY_2,
4388c2ecf20Sopenharmony_ci	HIERARCHY_4,
4398c2ecf20Sopenharmony_ci	HIERARCHY_AUTO
4408c2ecf20Sopenharmony_ci};
4418c2ecf20Sopenharmony_ci
4428c2ecf20Sopenharmony_ci/**
4438c2ecf20Sopenharmony_ci * enum fe_interleaving - Interleaving
4448c2ecf20Sopenharmony_ci * @INTERLEAVING_NONE:	No interleaving.
4458c2ecf20Sopenharmony_ci * @INTERLEAVING_AUTO:	Auto-detect interleaving.
4468c2ecf20Sopenharmony_ci * @INTERLEAVING_240:	Interleaving of 240 symbols.
4478c2ecf20Sopenharmony_ci * @INTERLEAVING_720:	Interleaving of 720 symbols.
4488c2ecf20Sopenharmony_ci *
4498c2ecf20Sopenharmony_ci * Please note that, currently, only DTMB uses it.
4508c2ecf20Sopenharmony_ci */
4518c2ecf20Sopenharmony_cienum fe_interleaving {
4528c2ecf20Sopenharmony_ci	INTERLEAVING_NONE,
4538c2ecf20Sopenharmony_ci	INTERLEAVING_AUTO,
4548c2ecf20Sopenharmony_ci	INTERLEAVING_240,
4558c2ecf20Sopenharmony_ci	INTERLEAVING_720,
4568c2ecf20Sopenharmony_ci};
4578c2ecf20Sopenharmony_ci
4588c2ecf20Sopenharmony_ci/* DVBv5 property Commands */
4598c2ecf20Sopenharmony_ci
4608c2ecf20Sopenharmony_ci#define DTV_UNDEFINED		0
4618c2ecf20Sopenharmony_ci#define DTV_TUNE		1
4628c2ecf20Sopenharmony_ci#define DTV_CLEAR		2
4638c2ecf20Sopenharmony_ci#define DTV_FREQUENCY		3
4648c2ecf20Sopenharmony_ci#define DTV_MODULATION		4
4658c2ecf20Sopenharmony_ci#define DTV_BANDWIDTH_HZ	5
4668c2ecf20Sopenharmony_ci#define DTV_INVERSION		6
4678c2ecf20Sopenharmony_ci#define DTV_DISEQC_MASTER	7
4688c2ecf20Sopenharmony_ci#define DTV_SYMBOL_RATE		8
4698c2ecf20Sopenharmony_ci#define DTV_INNER_FEC		9
4708c2ecf20Sopenharmony_ci#define DTV_VOLTAGE		10
4718c2ecf20Sopenharmony_ci#define DTV_TONE		11
4728c2ecf20Sopenharmony_ci#define DTV_PILOT		12
4738c2ecf20Sopenharmony_ci#define DTV_ROLLOFF		13
4748c2ecf20Sopenharmony_ci#define DTV_DISEQC_SLAVE_REPLY	14
4758c2ecf20Sopenharmony_ci
4768c2ecf20Sopenharmony_ci/* Basic enumeration set for querying unlimited capabilities */
4778c2ecf20Sopenharmony_ci#define DTV_FE_CAPABILITY_COUNT	15
4788c2ecf20Sopenharmony_ci#define DTV_FE_CAPABILITY	16
4798c2ecf20Sopenharmony_ci#define DTV_DELIVERY_SYSTEM	17
4808c2ecf20Sopenharmony_ci
4818c2ecf20Sopenharmony_ci/* ISDB-T and ISDB-Tsb */
4828c2ecf20Sopenharmony_ci#define DTV_ISDBT_PARTIAL_RECEPTION	18
4838c2ecf20Sopenharmony_ci#define DTV_ISDBT_SOUND_BROADCASTING	19
4848c2ecf20Sopenharmony_ci
4858c2ecf20Sopenharmony_ci#define DTV_ISDBT_SB_SUBCHANNEL_ID	20
4868c2ecf20Sopenharmony_ci#define DTV_ISDBT_SB_SEGMENT_IDX	21
4878c2ecf20Sopenharmony_ci#define DTV_ISDBT_SB_SEGMENT_COUNT	22
4888c2ecf20Sopenharmony_ci
4898c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERA_FEC			23
4908c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERA_MODULATION		24
4918c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERA_SEGMENT_COUNT		25
4928c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERA_TIME_INTERLEAVING	26
4938c2ecf20Sopenharmony_ci
4948c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERB_FEC			27
4958c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERB_MODULATION		28
4968c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERB_SEGMENT_COUNT		29
4978c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERB_TIME_INTERLEAVING	30
4988c2ecf20Sopenharmony_ci
4998c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERC_FEC			31
5008c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERC_MODULATION		32
5018c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERC_SEGMENT_COUNT		33
5028c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYERC_TIME_INTERLEAVING	34
5038c2ecf20Sopenharmony_ci
5048c2ecf20Sopenharmony_ci#define DTV_API_VERSION		35
5058c2ecf20Sopenharmony_ci
5068c2ecf20Sopenharmony_ci#define DTV_CODE_RATE_HP	36
5078c2ecf20Sopenharmony_ci#define DTV_CODE_RATE_LP	37
5088c2ecf20Sopenharmony_ci#define DTV_GUARD_INTERVAL	38
5098c2ecf20Sopenharmony_ci#define DTV_TRANSMISSION_MODE	39
5108c2ecf20Sopenharmony_ci#define DTV_HIERARCHY		40
5118c2ecf20Sopenharmony_ci
5128c2ecf20Sopenharmony_ci#define DTV_ISDBT_LAYER_ENABLED	41
5138c2ecf20Sopenharmony_ci
5148c2ecf20Sopenharmony_ci#define DTV_STREAM_ID		42
5158c2ecf20Sopenharmony_ci#define DTV_ISDBS_TS_ID_LEGACY	DTV_STREAM_ID
5168c2ecf20Sopenharmony_ci#define DTV_DVBT2_PLP_ID_LEGACY	43
5178c2ecf20Sopenharmony_ci
5188c2ecf20Sopenharmony_ci#define DTV_ENUM_DELSYS		44
5198c2ecf20Sopenharmony_ci
5208c2ecf20Sopenharmony_ci/* ATSC-MH */
5218c2ecf20Sopenharmony_ci#define DTV_ATSCMH_FIC_VER		45
5228c2ecf20Sopenharmony_ci#define DTV_ATSCMH_PARADE_ID		46
5238c2ecf20Sopenharmony_ci#define DTV_ATSCMH_NOG			47
5248c2ecf20Sopenharmony_ci#define DTV_ATSCMH_TNOG			48
5258c2ecf20Sopenharmony_ci#define DTV_ATSCMH_SGN			49
5268c2ecf20Sopenharmony_ci#define DTV_ATSCMH_PRC			50
5278c2ecf20Sopenharmony_ci#define DTV_ATSCMH_RS_FRAME_MODE	51
5288c2ecf20Sopenharmony_ci#define DTV_ATSCMH_RS_FRAME_ENSEMBLE	52
5298c2ecf20Sopenharmony_ci#define DTV_ATSCMH_RS_CODE_MODE_PRI	53
5308c2ecf20Sopenharmony_ci#define DTV_ATSCMH_RS_CODE_MODE_SEC	54
5318c2ecf20Sopenharmony_ci#define DTV_ATSCMH_SCCC_BLOCK_MODE	55
5328c2ecf20Sopenharmony_ci#define DTV_ATSCMH_SCCC_CODE_MODE_A	56
5338c2ecf20Sopenharmony_ci#define DTV_ATSCMH_SCCC_CODE_MODE_B	57
5348c2ecf20Sopenharmony_ci#define DTV_ATSCMH_SCCC_CODE_MODE_C	58
5358c2ecf20Sopenharmony_ci#define DTV_ATSCMH_SCCC_CODE_MODE_D	59
5368c2ecf20Sopenharmony_ci
5378c2ecf20Sopenharmony_ci#define DTV_INTERLEAVING			60
5388c2ecf20Sopenharmony_ci#define DTV_LNA					61
5398c2ecf20Sopenharmony_ci
5408c2ecf20Sopenharmony_ci/* Quality parameters */
5418c2ecf20Sopenharmony_ci#define DTV_STAT_SIGNAL_STRENGTH	62
5428c2ecf20Sopenharmony_ci#define DTV_STAT_CNR			63
5438c2ecf20Sopenharmony_ci#define DTV_STAT_PRE_ERROR_BIT_COUNT	64
5448c2ecf20Sopenharmony_ci#define DTV_STAT_PRE_TOTAL_BIT_COUNT	65
5458c2ecf20Sopenharmony_ci#define DTV_STAT_POST_ERROR_BIT_COUNT	66
5468c2ecf20Sopenharmony_ci#define DTV_STAT_POST_TOTAL_BIT_COUNT	67
5478c2ecf20Sopenharmony_ci#define DTV_STAT_ERROR_BLOCK_COUNT	68
5488c2ecf20Sopenharmony_ci#define DTV_STAT_TOTAL_BLOCK_COUNT	69
5498c2ecf20Sopenharmony_ci
5508c2ecf20Sopenharmony_ci/* Physical layer scrambling */
5518c2ecf20Sopenharmony_ci#define DTV_SCRAMBLING_SEQUENCE_INDEX	70
5528c2ecf20Sopenharmony_ci
5538c2ecf20Sopenharmony_ci#define DTV_MAX_COMMAND		DTV_SCRAMBLING_SEQUENCE_INDEX
5548c2ecf20Sopenharmony_ci
5558c2ecf20Sopenharmony_ci/**
5568c2ecf20Sopenharmony_ci * enum fe_pilot - Type of pilot tone
5578c2ecf20Sopenharmony_ci *
5588c2ecf20Sopenharmony_ci * @PILOT_ON:	Pilot tones enabled
5598c2ecf20Sopenharmony_ci * @PILOT_OFF:	Pilot tones disabled
5608c2ecf20Sopenharmony_ci * @PILOT_AUTO:	Autodetect pilot tones
5618c2ecf20Sopenharmony_ci */
5628c2ecf20Sopenharmony_cienum fe_pilot {
5638c2ecf20Sopenharmony_ci	PILOT_ON,
5648c2ecf20Sopenharmony_ci	PILOT_OFF,
5658c2ecf20Sopenharmony_ci	PILOT_AUTO,
5668c2ecf20Sopenharmony_ci};
5678c2ecf20Sopenharmony_ci
5688c2ecf20Sopenharmony_ci/**
5698c2ecf20Sopenharmony_ci * enum fe_rolloff - Rolloff factor
5708c2ecf20Sopenharmony_ci * @ROLLOFF_35:		Roloff factor: α=35%
5718c2ecf20Sopenharmony_ci * @ROLLOFF_20:		Roloff factor: α=20%
5728c2ecf20Sopenharmony_ci * @ROLLOFF_25:		Roloff factor: α=25%
5738c2ecf20Sopenharmony_ci * @ROLLOFF_AUTO:	Auto-detect the roloff factor.
5748c2ecf20Sopenharmony_ci *
5758c2ecf20Sopenharmony_ci * .. note:
5768c2ecf20Sopenharmony_ci *
5778c2ecf20Sopenharmony_ci *    Roloff factor of 35% is implied on DVB-S. On DVB-S2, it is default.
5788c2ecf20Sopenharmony_ci */
5798c2ecf20Sopenharmony_cienum fe_rolloff {
5808c2ecf20Sopenharmony_ci	ROLLOFF_35,
5818c2ecf20Sopenharmony_ci	ROLLOFF_20,
5828c2ecf20Sopenharmony_ci	ROLLOFF_25,
5838c2ecf20Sopenharmony_ci	ROLLOFF_AUTO,
5848c2ecf20Sopenharmony_ci};
5858c2ecf20Sopenharmony_ci
5868c2ecf20Sopenharmony_ci/**
5878c2ecf20Sopenharmony_ci * enum fe_delivery_system - Type of the delivery system
5888c2ecf20Sopenharmony_ci *
5898c2ecf20Sopenharmony_ci * @SYS_UNDEFINED:
5908c2ecf20Sopenharmony_ci *	Undefined standard. Generally, indicates an error
5918c2ecf20Sopenharmony_ci * @SYS_DVBC_ANNEX_A:
5928c2ecf20Sopenharmony_ci *	Cable TV: DVB-C following ITU-T J.83 Annex A spec
5938c2ecf20Sopenharmony_ci * @SYS_DVBC_ANNEX_B:
5948c2ecf20Sopenharmony_ci *	Cable TV: DVB-C following ITU-T J.83 Annex B spec (ClearQAM)
5958c2ecf20Sopenharmony_ci * @SYS_DVBC_ANNEX_C:
5968c2ecf20Sopenharmony_ci *	Cable TV: DVB-C following ITU-T J.83 Annex C spec
5978c2ecf20Sopenharmony_ci * @SYS_ISDBC:
5988c2ecf20Sopenharmony_ci *	Cable TV: ISDB-C (no drivers yet)
5998c2ecf20Sopenharmony_ci * @SYS_DVBT:
6008c2ecf20Sopenharmony_ci *	Terrestrial TV: DVB-T
6018c2ecf20Sopenharmony_ci * @SYS_DVBT2:
6028c2ecf20Sopenharmony_ci *	Terrestrial TV: DVB-T2
6038c2ecf20Sopenharmony_ci * @SYS_ISDBT:
6048c2ecf20Sopenharmony_ci *	Terrestrial TV: ISDB-T
6058c2ecf20Sopenharmony_ci * @SYS_ATSC:
6068c2ecf20Sopenharmony_ci *	Terrestrial TV: ATSC
6078c2ecf20Sopenharmony_ci * @SYS_ATSCMH:
6088c2ecf20Sopenharmony_ci *	Terrestrial TV (mobile): ATSC-M/H
6098c2ecf20Sopenharmony_ci * @SYS_DTMB:
6108c2ecf20Sopenharmony_ci *	Terrestrial TV: DTMB
6118c2ecf20Sopenharmony_ci * @SYS_DVBS:
6128c2ecf20Sopenharmony_ci *	Satellite TV: DVB-S
6138c2ecf20Sopenharmony_ci * @SYS_DVBS2:
6148c2ecf20Sopenharmony_ci *	Satellite TV: DVB-S2
6158c2ecf20Sopenharmony_ci * @SYS_TURBO:
6168c2ecf20Sopenharmony_ci *	Satellite TV: DVB-S Turbo
6178c2ecf20Sopenharmony_ci * @SYS_ISDBS:
6188c2ecf20Sopenharmony_ci *	Satellite TV: ISDB-S
6198c2ecf20Sopenharmony_ci * @SYS_DAB:
6208c2ecf20Sopenharmony_ci *	Digital audio: DAB (not fully supported)
6218c2ecf20Sopenharmony_ci * @SYS_DSS:
6228c2ecf20Sopenharmony_ci *	Satellite TV: DSS (not fully supported)
6238c2ecf20Sopenharmony_ci * @SYS_CMMB:
6248c2ecf20Sopenharmony_ci *	Terrestrial TV (mobile): CMMB (not fully supported)
6258c2ecf20Sopenharmony_ci * @SYS_DVBH:
6268c2ecf20Sopenharmony_ci *	Terrestrial TV (mobile): DVB-H (standard deprecated)
6278c2ecf20Sopenharmony_ci */
6288c2ecf20Sopenharmony_cienum fe_delivery_system {
6298c2ecf20Sopenharmony_ci	SYS_UNDEFINED,
6308c2ecf20Sopenharmony_ci	SYS_DVBC_ANNEX_A,
6318c2ecf20Sopenharmony_ci	SYS_DVBC_ANNEX_B,
6328c2ecf20Sopenharmony_ci	SYS_DVBT,
6338c2ecf20Sopenharmony_ci	SYS_DSS,
6348c2ecf20Sopenharmony_ci	SYS_DVBS,
6358c2ecf20Sopenharmony_ci	SYS_DVBS2,
6368c2ecf20Sopenharmony_ci	SYS_DVBH,
6378c2ecf20Sopenharmony_ci	SYS_ISDBT,
6388c2ecf20Sopenharmony_ci	SYS_ISDBS,
6398c2ecf20Sopenharmony_ci	SYS_ISDBC,
6408c2ecf20Sopenharmony_ci	SYS_ATSC,
6418c2ecf20Sopenharmony_ci	SYS_ATSCMH,
6428c2ecf20Sopenharmony_ci	SYS_DTMB,
6438c2ecf20Sopenharmony_ci	SYS_CMMB,
6448c2ecf20Sopenharmony_ci	SYS_DAB,
6458c2ecf20Sopenharmony_ci	SYS_DVBT2,
6468c2ecf20Sopenharmony_ci	SYS_TURBO,
6478c2ecf20Sopenharmony_ci	SYS_DVBC_ANNEX_C,
6488c2ecf20Sopenharmony_ci};
6498c2ecf20Sopenharmony_ci
6508c2ecf20Sopenharmony_ci/* backward compatibility definitions for delivery systems */
6518c2ecf20Sopenharmony_ci#define SYS_DVBC_ANNEX_AC	SYS_DVBC_ANNEX_A
6528c2ecf20Sopenharmony_ci#define SYS_DMBTH		SYS_DTMB /* DMB-TH is legacy name, use DTMB */
6538c2ecf20Sopenharmony_ci
6548c2ecf20Sopenharmony_ci/* ATSC-MH specific parameters */
6558c2ecf20Sopenharmony_ci
6568c2ecf20Sopenharmony_ci/**
6578c2ecf20Sopenharmony_ci * enum atscmh_sccc_block_mode - Type of Series Concatenated Convolutional
6588c2ecf20Sopenharmony_ci *				 Code Block Mode.
6598c2ecf20Sopenharmony_ci *
6608c2ecf20Sopenharmony_ci * @ATSCMH_SCCC_BLK_SEP:
6618c2ecf20Sopenharmony_ci *	Separate SCCC: the SCCC outer code mode shall be set independently
6628c2ecf20Sopenharmony_ci *	for each Group Region (A, B, C, D)
6638c2ecf20Sopenharmony_ci * @ATSCMH_SCCC_BLK_COMB:
6648c2ecf20Sopenharmony_ci *	Combined SCCC: all four Regions shall have the same SCCC outer
6658c2ecf20Sopenharmony_ci *	code mode.
6668c2ecf20Sopenharmony_ci * @ATSCMH_SCCC_BLK_RES:
6678c2ecf20Sopenharmony_ci *	Reserved. Shouldn't be used.
6688c2ecf20Sopenharmony_ci */
6698c2ecf20Sopenharmony_cienum atscmh_sccc_block_mode {
6708c2ecf20Sopenharmony_ci	ATSCMH_SCCC_BLK_SEP      = 0,
6718c2ecf20Sopenharmony_ci	ATSCMH_SCCC_BLK_COMB     = 1,
6728c2ecf20Sopenharmony_ci	ATSCMH_SCCC_BLK_RES      = 2,
6738c2ecf20Sopenharmony_ci};
6748c2ecf20Sopenharmony_ci
6758c2ecf20Sopenharmony_ci/**
6768c2ecf20Sopenharmony_ci * enum atscmh_sccc_code_mode - Type of Series Concatenated Convolutional
6778c2ecf20Sopenharmony_ci *				Code Rate.
6788c2ecf20Sopenharmony_ci *
6798c2ecf20Sopenharmony_ci * @ATSCMH_SCCC_CODE_HLF:
6808c2ecf20Sopenharmony_ci *	The outer code rate of a SCCC Block is 1/2 rate.
6818c2ecf20Sopenharmony_ci * @ATSCMH_SCCC_CODE_QTR:
6828c2ecf20Sopenharmony_ci *	The outer code rate of a SCCC Block is 1/4 rate.
6838c2ecf20Sopenharmony_ci * @ATSCMH_SCCC_CODE_RES:
6848c2ecf20Sopenharmony_ci *	Reserved. Should not be used.
6858c2ecf20Sopenharmony_ci */
6868c2ecf20Sopenharmony_cienum atscmh_sccc_code_mode {
6878c2ecf20Sopenharmony_ci	ATSCMH_SCCC_CODE_HLF     = 0,
6888c2ecf20Sopenharmony_ci	ATSCMH_SCCC_CODE_QTR     = 1,
6898c2ecf20Sopenharmony_ci	ATSCMH_SCCC_CODE_RES     = 2,
6908c2ecf20Sopenharmony_ci};
6918c2ecf20Sopenharmony_ci
6928c2ecf20Sopenharmony_ci/**
6938c2ecf20Sopenharmony_ci * enum atscmh_rs_frame_ensemble - Reed Solomon(RS) frame ensemble.
6948c2ecf20Sopenharmony_ci *
6958c2ecf20Sopenharmony_ci * @ATSCMH_RSFRAME_ENS_PRI:	Primary Ensemble.
6968c2ecf20Sopenharmony_ci * @ATSCMH_RSFRAME_ENS_SEC:	Secondary Ensemble.
6978c2ecf20Sopenharmony_ci */
6988c2ecf20Sopenharmony_cienum atscmh_rs_frame_ensemble {
6998c2ecf20Sopenharmony_ci	ATSCMH_RSFRAME_ENS_PRI   = 0,
7008c2ecf20Sopenharmony_ci	ATSCMH_RSFRAME_ENS_SEC   = 1,
7018c2ecf20Sopenharmony_ci};
7028c2ecf20Sopenharmony_ci
7038c2ecf20Sopenharmony_ci/**
7048c2ecf20Sopenharmony_ci * enum atscmh_rs_frame_mode - Reed Solomon (RS) frame mode.
7058c2ecf20Sopenharmony_ci *
7068c2ecf20Sopenharmony_ci * @ATSCMH_RSFRAME_PRI_ONLY:
7078c2ecf20Sopenharmony_ci *	Single Frame: There is only a primary RS Frame for all Group
7088c2ecf20Sopenharmony_ci *	Regions.
7098c2ecf20Sopenharmony_ci * @ATSCMH_RSFRAME_PRI_SEC:
7108c2ecf20Sopenharmony_ci *	Dual Frame: There are two separate RS Frames: Primary RS Frame for
7118c2ecf20Sopenharmony_ci *	Group Region A and B and Secondary RS Frame for Group Region C and
7128c2ecf20Sopenharmony_ci *	D.
7138c2ecf20Sopenharmony_ci * @ATSCMH_RSFRAME_RES:
7148c2ecf20Sopenharmony_ci *	Reserved. Shouldn't be used.
7158c2ecf20Sopenharmony_ci */
7168c2ecf20Sopenharmony_cienum atscmh_rs_frame_mode {
7178c2ecf20Sopenharmony_ci	ATSCMH_RSFRAME_PRI_ONLY  = 0,
7188c2ecf20Sopenharmony_ci	ATSCMH_RSFRAME_PRI_SEC   = 1,
7198c2ecf20Sopenharmony_ci	ATSCMH_RSFRAME_RES       = 2,
7208c2ecf20Sopenharmony_ci};
7218c2ecf20Sopenharmony_ci
7228c2ecf20Sopenharmony_ci/**
7238c2ecf20Sopenharmony_ci * enum atscmh_rs_code_mode
7248c2ecf20Sopenharmony_ci * @ATSCMH_RSCODE_211_187:	Reed Solomon code (211,187).
7258c2ecf20Sopenharmony_ci * @ATSCMH_RSCODE_223_187:	Reed Solomon code (223,187).
7268c2ecf20Sopenharmony_ci * @ATSCMH_RSCODE_235_187:	Reed Solomon code (235,187).
7278c2ecf20Sopenharmony_ci * @ATSCMH_RSCODE_RES:		Reserved. Shouldn't be used.
7288c2ecf20Sopenharmony_ci */
7298c2ecf20Sopenharmony_cienum atscmh_rs_code_mode {
7308c2ecf20Sopenharmony_ci	ATSCMH_RSCODE_211_187    = 0,
7318c2ecf20Sopenharmony_ci	ATSCMH_RSCODE_223_187    = 1,
7328c2ecf20Sopenharmony_ci	ATSCMH_RSCODE_235_187    = 2,
7338c2ecf20Sopenharmony_ci	ATSCMH_RSCODE_RES        = 3,
7348c2ecf20Sopenharmony_ci};
7358c2ecf20Sopenharmony_ci
7368c2ecf20Sopenharmony_ci#define NO_STREAM_ID_FILTER	(~0U)
7378c2ecf20Sopenharmony_ci#define LNA_AUTO                (~0U)
7388c2ecf20Sopenharmony_ci
7398c2ecf20Sopenharmony_ci/**
7408c2ecf20Sopenharmony_ci * enum fecap_scale_params - scale types for the quality parameters.
7418c2ecf20Sopenharmony_ci *
7428c2ecf20Sopenharmony_ci * @FE_SCALE_NOT_AVAILABLE: That QoS measure is not available. That
7438c2ecf20Sopenharmony_ci *			    could indicate a temporary or a permanent
7448c2ecf20Sopenharmony_ci *			    condition.
7458c2ecf20Sopenharmony_ci * @FE_SCALE_DECIBEL: The scale is measured in 0.001 dB steps, typically
7468c2ecf20Sopenharmony_ci *		      used on signal measures.
7478c2ecf20Sopenharmony_ci * @FE_SCALE_RELATIVE: The scale is a relative percentual measure,
7488c2ecf20Sopenharmony_ci *		       ranging from 0 (0%) to 0xffff (100%).
7498c2ecf20Sopenharmony_ci * @FE_SCALE_COUNTER: The scale counts the occurrence of an event, like
7508c2ecf20Sopenharmony_ci *		      bit error, block error, lapsed time.
7518c2ecf20Sopenharmony_ci */
7528c2ecf20Sopenharmony_cienum fecap_scale_params {
7538c2ecf20Sopenharmony_ci	FE_SCALE_NOT_AVAILABLE = 0,
7548c2ecf20Sopenharmony_ci	FE_SCALE_DECIBEL,
7558c2ecf20Sopenharmony_ci	FE_SCALE_RELATIVE,
7568c2ecf20Sopenharmony_ci	FE_SCALE_COUNTER
7578c2ecf20Sopenharmony_ci};
7588c2ecf20Sopenharmony_ci
7598c2ecf20Sopenharmony_ci/**
7608c2ecf20Sopenharmony_ci * struct dtv_stats - Used for reading a DTV status property
7618c2ecf20Sopenharmony_ci *
7628c2ecf20Sopenharmony_ci * @scale:
7638c2ecf20Sopenharmony_ci *	Filled with enum fecap_scale_params - the scale in usage
7648c2ecf20Sopenharmony_ci *	for that parameter
7658c2ecf20Sopenharmony_ci *
7668c2ecf20Sopenharmony_ci * @svalue:
7678c2ecf20Sopenharmony_ci *	integer value of the measure, for %FE_SCALE_DECIBEL,
7688c2ecf20Sopenharmony_ci *	used for dB measures. The unit is 0.001 dB.
7698c2ecf20Sopenharmony_ci *
7708c2ecf20Sopenharmony_ci * @uvalue:
7718c2ecf20Sopenharmony_ci *	unsigned integer value of the measure, used when @scale is
7728c2ecf20Sopenharmony_ci *	either %FE_SCALE_RELATIVE or %FE_SCALE_COUNTER.
7738c2ecf20Sopenharmony_ci *
7748c2ecf20Sopenharmony_ci * For most delivery systems, this will return a single value for each
7758c2ecf20Sopenharmony_ci * parameter.
7768c2ecf20Sopenharmony_ci *
7778c2ecf20Sopenharmony_ci * It should be noticed, however, that new OFDM delivery systems like
7788c2ecf20Sopenharmony_ci * ISDB can use different modulation types for each group of carriers.
7798c2ecf20Sopenharmony_ci * On such standards, up to 8 groups of statistics can be provided, one
7808c2ecf20Sopenharmony_ci * for each carrier group (called "layer" on ISDB).
7818c2ecf20Sopenharmony_ci *
7828c2ecf20Sopenharmony_ci * In order to be consistent with other delivery systems, the first
7838c2ecf20Sopenharmony_ci * value refers to the entire set of carriers ("global").
7848c2ecf20Sopenharmony_ci *
7858c2ecf20Sopenharmony_ci * @scale should use the value %FE_SCALE_NOT_AVAILABLE when
7868c2ecf20Sopenharmony_ci * the value for the entire group of carriers or from one specific layer
7878c2ecf20Sopenharmony_ci * is not provided by the hardware.
7888c2ecf20Sopenharmony_ci *
7898c2ecf20Sopenharmony_ci * @len should be filled with the latest filled status + 1.
7908c2ecf20Sopenharmony_ci *
7918c2ecf20Sopenharmony_ci * In other words, for ISDB, those values should be filled like::
7928c2ecf20Sopenharmony_ci *
7938c2ecf20Sopenharmony_ci *	u.st.stat.svalue[0] = global statistics;
7948c2ecf20Sopenharmony_ci *	u.st.stat.scale[0] = FE_SCALE_DECIBEL;
7958c2ecf20Sopenharmony_ci *	u.st.stat.value[1] = layer A statistics;
7968c2ecf20Sopenharmony_ci *	u.st.stat.scale[1] = FE_SCALE_NOT_AVAILABLE (if not available);
7978c2ecf20Sopenharmony_ci *	u.st.stat.svalue[2] = layer B statistics;
7988c2ecf20Sopenharmony_ci *	u.st.stat.scale[2] = FE_SCALE_DECIBEL;
7998c2ecf20Sopenharmony_ci *	u.st.stat.svalue[3] = layer C statistics;
8008c2ecf20Sopenharmony_ci *	u.st.stat.scale[3] = FE_SCALE_DECIBEL;
8018c2ecf20Sopenharmony_ci *	u.st.len = 4;
8028c2ecf20Sopenharmony_ci */
8038c2ecf20Sopenharmony_cistruct dtv_stats {
8048c2ecf20Sopenharmony_ci	__u8 scale;	/* enum fecap_scale_params type */
8058c2ecf20Sopenharmony_ci	union {
8068c2ecf20Sopenharmony_ci		__u64 uvalue;	/* for counters and relative scales */
8078c2ecf20Sopenharmony_ci		__s64 svalue;	/* for 0.001 dB measures */
8088c2ecf20Sopenharmony_ci	};
8098c2ecf20Sopenharmony_ci} __attribute__ ((packed));
8108c2ecf20Sopenharmony_ci
8118c2ecf20Sopenharmony_ci
8128c2ecf20Sopenharmony_ci#define MAX_DTV_STATS   4
8138c2ecf20Sopenharmony_ci
8148c2ecf20Sopenharmony_ci/**
8158c2ecf20Sopenharmony_ci * struct dtv_fe_stats - store Digital TV frontend statistics
8168c2ecf20Sopenharmony_ci *
8178c2ecf20Sopenharmony_ci * @len:	length of the statistics - if zero, stats is disabled.
8188c2ecf20Sopenharmony_ci * @stat:	array with digital TV statistics.
8198c2ecf20Sopenharmony_ci *
8208c2ecf20Sopenharmony_ci * On most standards, @len can either be 0 or 1. However, for ISDB, each
8218c2ecf20Sopenharmony_ci * layer is modulated in separate. So, each layer may have its own set
8228c2ecf20Sopenharmony_ci * of statistics. If so, stat[0] carries on a global value for the property.
8238c2ecf20Sopenharmony_ci * Indexes 1 to 3 means layer A to B.
8248c2ecf20Sopenharmony_ci */
8258c2ecf20Sopenharmony_cistruct dtv_fe_stats {
8268c2ecf20Sopenharmony_ci	__u8 len;
8278c2ecf20Sopenharmony_ci	struct dtv_stats stat[MAX_DTV_STATS];
8288c2ecf20Sopenharmony_ci} __attribute__ ((packed));
8298c2ecf20Sopenharmony_ci
8308c2ecf20Sopenharmony_ci/**
8318c2ecf20Sopenharmony_ci * struct dtv_property - store one of frontend command and its value
8328c2ecf20Sopenharmony_ci *
8338c2ecf20Sopenharmony_ci * @cmd:		Digital TV command.
8348c2ecf20Sopenharmony_ci * @reserved:		Not used.
8358c2ecf20Sopenharmony_ci * @u:			Union with the values for the command.
8368c2ecf20Sopenharmony_ci * @u.data:		A unsigned 32 bits integer with command value.
8378c2ecf20Sopenharmony_ci * @u.buffer:		Struct to store bigger properties.
8388c2ecf20Sopenharmony_ci *			Currently unused.
8398c2ecf20Sopenharmony_ci * @u.buffer.data:	an unsigned 32-bits array.
8408c2ecf20Sopenharmony_ci * @u.buffer.len:	number of elements of the buffer.
8418c2ecf20Sopenharmony_ci * @u.buffer.reserved1:	Reserved.
8428c2ecf20Sopenharmony_ci * @u.buffer.reserved2:	Reserved.
8438c2ecf20Sopenharmony_ci * @u.st:		a &struct dtv_fe_stats array of statistics.
8448c2ecf20Sopenharmony_ci * @result:		Currently unused.
8458c2ecf20Sopenharmony_ci *
8468c2ecf20Sopenharmony_ci */
8478c2ecf20Sopenharmony_cistruct dtv_property {
8488c2ecf20Sopenharmony_ci	__u32 cmd;
8498c2ecf20Sopenharmony_ci	__u32 reserved[3];
8508c2ecf20Sopenharmony_ci	union {
8518c2ecf20Sopenharmony_ci		__u32 data;
8528c2ecf20Sopenharmony_ci		struct dtv_fe_stats st;
8538c2ecf20Sopenharmony_ci		struct {
8548c2ecf20Sopenharmony_ci			__u8 data[32];
8558c2ecf20Sopenharmony_ci			__u32 len;
8568c2ecf20Sopenharmony_ci			__u32 reserved1[3];
8578c2ecf20Sopenharmony_ci			void *reserved2;
8588c2ecf20Sopenharmony_ci		} buffer;
8598c2ecf20Sopenharmony_ci	} u;
8608c2ecf20Sopenharmony_ci	int result;
8618c2ecf20Sopenharmony_ci} __attribute__ ((packed));
8628c2ecf20Sopenharmony_ci
8638c2ecf20Sopenharmony_ci/* num of properties cannot exceed DTV_IOCTL_MAX_MSGS per ioctl */
8648c2ecf20Sopenharmony_ci#define DTV_IOCTL_MAX_MSGS 64
8658c2ecf20Sopenharmony_ci
8668c2ecf20Sopenharmony_ci/**
8678c2ecf20Sopenharmony_ci * struct dtv_properties - a set of command/value pairs.
8688c2ecf20Sopenharmony_ci *
8698c2ecf20Sopenharmony_ci * @num:	amount of commands stored at the struct.
8708c2ecf20Sopenharmony_ci * @props:	a pointer to &struct dtv_property.
8718c2ecf20Sopenharmony_ci */
8728c2ecf20Sopenharmony_cistruct dtv_properties {
8738c2ecf20Sopenharmony_ci	__u32 num;
8748c2ecf20Sopenharmony_ci	struct dtv_property *props;
8758c2ecf20Sopenharmony_ci};
8768c2ecf20Sopenharmony_ci
8778c2ecf20Sopenharmony_ci/*
8788c2ecf20Sopenharmony_ci * When set, this flag will disable any zigzagging or other "normal" tuning
8798c2ecf20Sopenharmony_ci * behavior. Additionally, there will be no automatic monitoring of the lock
8808c2ecf20Sopenharmony_ci * status, and hence no frontend events will be generated. If a frontend device
8818c2ecf20Sopenharmony_ci * is closed, this flag will be automatically turned off when the device is
8828c2ecf20Sopenharmony_ci * reopened read-write.
8838c2ecf20Sopenharmony_ci */
8848c2ecf20Sopenharmony_ci#define FE_TUNE_MODE_ONESHOT 0x01
8858c2ecf20Sopenharmony_ci
8868c2ecf20Sopenharmony_ci/* Digital TV Frontend API calls */
8878c2ecf20Sopenharmony_ci
8888c2ecf20Sopenharmony_ci#define FE_GET_INFO		   _IOR('o', 61, struct dvb_frontend_info)
8898c2ecf20Sopenharmony_ci
8908c2ecf20Sopenharmony_ci#define FE_DISEQC_RESET_OVERLOAD   _IO('o', 62)
8918c2ecf20Sopenharmony_ci#define FE_DISEQC_SEND_MASTER_CMD  _IOW('o', 63, struct dvb_diseqc_master_cmd)
8928c2ecf20Sopenharmony_ci#define FE_DISEQC_RECV_SLAVE_REPLY _IOR('o', 64, struct dvb_diseqc_slave_reply)
8938c2ecf20Sopenharmony_ci#define FE_DISEQC_SEND_BURST       _IO('o', 65)  /* fe_sec_mini_cmd_t */
8948c2ecf20Sopenharmony_ci
8958c2ecf20Sopenharmony_ci#define FE_SET_TONE		   _IO('o', 66)  /* fe_sec_tone_mode_t */
8968c2ecf20Sopenharmony_ci#define FE_SET_VOLTAGE		   _IO('o', 67)  /* fe_sec_voltage_t */
8978c2ecf20Sopenharmony_ci#define FE_ENABLE_HIGH_LNB_VOLTAGE _IO('o', 68)  /* int */
8988c2ecf20Sopenharmony_ci
8998c2ecf20Sopenharmony_ci#define FE_READ_STATUS		   _IOR('o', 69, fe_status_t)
9008c2ecf20Sopenharmony_ci#define FE_READ_BER		   _IOR('o', 70, __u32)
9018c2ecf20Sopenharmony_ci#define FE_READ_SIGNAL_STRENGTH    _IOR('o', 71, __u16)
9028c2ecf20Sopenharmony_ci#define FE_READ_SNR		   _IOR('o', 72, __u16)
9038c2ecf20Sopenharmony_ci#define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32)
9048c2ecf20Sopenharmony_ci
9058c2ecf20Sopenharmony_ci#define FE_SET_FRONTEND_TUNE_MODE  _IO('o', 81) /* unsigned int */
9068c2ecf20Sopenharmony_ci#define FE_GET_EVENT		   _IOR('o', 78, struct dvb_frontend_event)
9078c2ecf20Sopenharmony_ci
9088c2ecf20Sopenharmony_ci#define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */
9098c2ecf20Sopenharmony_ci
9108c2ecf20Sopenharmony_ci#define FE_SET_PROPERTY		   _IOW('o', 82, struct dtv_properties)
9118c2ecf20Sopenharmony_ci#define FE_GET_PROPERTY		   _IOR('o', 83, struct dtv_properties)
9128c2ecf20Sopenharmony_ci
9138c2ecf20Sopenharmony_ci#if defined(__DVB_CORE__) || !defined(__KERNEL__)
9148c2ecf20Sopenharmony_ci
9158c2ecf20Sopenharmony_ci/*
9168c2ecf20Sopenharmony_ci * DEPRECATED: Everything below is deprecated in favor of DVBv5 API
9178c2ecf20Sopenharmony_ci *
9188c2ecf20Sopenharmony_ci * The DVBv3 only ioctls, structs and enums should not be used on
9198c2ecf20Sopenharmony_ci * newer programs, as it doesn't support the second generation of
9208c2ecf20Sopenharmony_ci * digital TV standards, nor supports newer delivery systems.
9218c2ecf20Sopenharmony_ci * They also don't support modern frontends with usually support multiple
9228c2ecf20Sopenharmony_ci * delivery systems.
9238c2ecf20Sopenharmony_ci *
9248c2ecf20Sopenharmony_ci * Drivers shouldn't use them.
9258c2ecf20Sopenharmony_ci *
9268c2ecf20Sopenharmony_ci * New applications should use DVBv5 delivery system instead
9278c2ecf20Sopenharmony_ci */
9288c2ecf20Sopenharmony_ci
9298c2ecf20Sopenharmony_ci/*
9308c2ecf20Sopenharmony_ci */
9318c2ecf20Sopenharmony_ci
9328c2ecf20Sopenharmony_cienum fe_bandwidth {
9338c2ecf20Sopenharmony_ci	BANDWIDTH_8_MHZ,
9348c2ecf20Sopenharmony_ci	BANDWIDTH_7_MHZ,
9358c2ecf20Sopenharmony_ci	BANDWIDTH_6_MHZ,
9368c2ecf20Sopenharmony_ci	BANDWIDTH_AUTO,
9378c2ecf20Sopenharmony_ci	BANDWIDTH_5_MHZ,
9388c2ecf20Sopenharmony_ci	BANDWIDTH_10_MHZ,
9398c2ecf20Sopenharmony_ci	BANDWIDTH_1_712_MHZ,
9408c2ecf20Sopenharmony_ci};
9418c2ecf20Sopenharmony_ci
9428c2ecf20Sopenharmony_ci/* This is kept for legacy userspace support */
9438c2ecf20Sopenharmony_citypedef enum fe_sec_voltage fe_sec_voltage_t;
9448c2ecf20Sopenharmony_citypedef enum fe_caps fe_caps_t;
9458c2ecf20Sopenharmony_citypedef enum fe_type fe_type_t;
9468c2ecf20Sopenharmony_citypedef enum fe_sec_tone_mode fe_sec_tone_mode_t;
9478c2ecf20Sopenharmony_citypedef enum fe_sec_mini_cmd fe_sec_mini_cmd_t;
9488c2ecf20Sopenharmony_citypedef enum fe_status fe_status_t;
9498c2ecf20Sopenharmony_citypedef enum fe_spectral_inversion fe_spectral_inversion_t;
9508c2ecf20Sopenharmony_citypedef enum fe_code_rate fe_code_rate_t;
9518c2ecf20Sopenharmony_citypedef enum fe_modulation fe_modulation_t;
9528c2ecf20Sopenharmony_citypedef enum fe_transmit_mode fe_transmit_mode_t;
9538c2ecf20Sopenharmony_citypedef enum fe_bandwidth fe_bandwidth_t;
9548c2ecf20Sopenharmony_citypedef enum fe_guard_interval fe_guard_interval_t;
9558c2ecf20Sopenharmony_citypedef enum fe_hierarchy fe_hierarchy_t;
9568c2ecf20Sopenharmony_citypedef enum fe_pilot fe_pilot_t;
9578c2ecf20Sopenharmony_citypedef enum fe_rolloff fe_rolloff_t;
9588c2ecf20Sopenharmony_citypedef enum fe_delivery_system fe_delivery_system_t;
9598c2ecf20Sopenharmony_ci
9608c2ecf20Sopenharmony_ci/* DVBv3 structs */
9618c2ecf20Sopenharmony_ci
9628c2ecf20Sopenharmony_cistruct dvb_qpsk_parameters {
9638c2ecf20Sopenharmony_ci	__u32		symbol_rate;  /* symbol rate in Symbols per second */
9648c2ecf20Sopenharmony_ci	fe_code_rate_t	fec_inner;    /* forward error correction (see above) */
9658c2ecf20Sopenharmony_ci};
9668c2ecf20Sopenharmony_ci
9678c2ecf20Sopenharmony_cistruct dvb_qam_parameters {
9688c2ecf20Sopenharmony_ci	__u32		symbol_rate; /* symbol rate in Symbols per second */
9698c2ecf20Sopenharmony_ci	fe_code_rate_t	fec_inner;   /* forward error correction (see above) */
9708c2ecf20Sopenharmony_ci	fe_modulation_t	modulation;  /* modulation type (see above) */
9718c2ecf20Sopenharmony_ci};
9728c2ecf20Sopenharmony_ci
9738c2ecf20Sopenharmony_cistruct dvb_vsb_parameters {
9748c2ecf20Sopenharmony_ci	fe_modulation_t	modulation;  /* modulation type (see above) */
9758c2ecf20Sopenharmony_ci};
9768c2ecf20Sopenharmony_ci
9778c2ecf20Sopenharmony_cistruct dvb_ofdm_parameters {
9788c2ecf20Sopenharmony_ci	fe_bandwidth_t      bandwidth;
9798c2ecf20Sopenharmony_ci	fe_code_rate_t      code_rate_HP;  /* high priority stream code rate */
9808c2ecf20Sopenharmony_ci	fe_code_rate_t      code_rate_LP;  /* low priority stream code rate */
9818c2ecf20Sopenharmony_ci	fe_modulation_t     constellation; /* modulation type (see above) */
9828c2ecf20Sopenharmony_ci	fe_transmit_mode_t  transmission_mode;
9838c2ecf20Sopenharmony_ci	fe_guard_interval_t guard_interval;
9848c2ecf20Sopenharmony_ci	fe_hierarchy_t      hierarchy_information;
9858c2ecf20Sopenharmony_ci};
9868c2ecf20Sopenharmony_ci
9878c2ecf20Sopenharmony_cistruct dvb_frontend_parameters {
9888c2ecf20Sopenharmony_ci	__u32 frequency;  /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
9898c2ecf20Sopenharmony_ci			  /* intermediate frequency in kHz for DVB-S */
9908c2ecf20Sopenharmony_ci	fe_spectral_inversion_t inversion;
9918c2ecf20Sopenharmony_ci	union {
9928c2ecf20Sopenharmony_ci		struct dvb_qpsk_parameters qpsk;	/* DVB-S */
9938c2ecf20Sopenharmony_ci		struct dvb_qam_parameters  qam;		/* DVB-C */
9948c2ecf20Sopenharmony_ci		struct dvb_ofdm_parameters ofdm;	/* DVB-T */
9958c2ecf20Sopenharmony_ci		struct dvb_vsb_parameters vsb;		/* ATSC */
9968c2ecf20Sopenharmony_ci	} u;
9978c2ecf20Sopenharmony_ci};
9988c2ecf20Sopenharmony_ci
9998c2ecf20Sopenharmony_cistruct dvb_frontend_event {
10008c2ecf20Sopenharmony_ci	fe_status_t status;
10018c2ecf20Sopenharmony_ci	struct dvb_frontend_parameters parameters;
10028c2ecf20Sopenharmony_ci};
10038c2ecf20Sopenharmony_ci
10048c2ecf20Sopenharmony_ci/* DVBv3 API calls */
10058c2ecf20Sopenharmony_ci
10068c2ecf20Sopenharmony_ci#define FE_SET_FRONTEND		   _IOW('o', 76, struct dvb_frontend_parameters)
10078c2ecf20Sopenharmony_ci#define FE_GET_FRONTEND		   _IOR('o', 77, struct dvb_frontend_parameters)
10088c2ecf20Sopenharmony_ci
10098c2ecf20Sopenharmony_ci#endif
10108c2ecf20Sopenharmony_ci
10118c2ecf20Sopenharmony_ci#endif /*_DVBFRONTEND_H_*/
1012