diff options
author | Manu Abraham <manu@linuxtv.org> | 2006-05-05 22:24:46 +0400 |
---|---|---|
committer | Manu Abraham <manu@linuxtv.org> | 2006-05-05 22:24:46 +0400 |
commit | b4d9770fbc462b4f10ebbf8950e94654309352c2 (patch) | |
tree | 659caa7a704f54b44396e7122e80cf0c494d5d19 /linux/include | |
parent | 1c961da3e212de0774ee0b7690d00f79bb2a1c2a (diff) | |
download | mediapointer-dvb-s2-b4d9770fbc462b4f10ebbf8950e94654309352c2.tar.gz mediapointer-dvb-s2-b4d9770fbc462b4f10ebbf8950e94654309352c2.tar.bz2 |
Add frontend support for new Delivery systems and modulations
-DVB-S2, 8PSK and higher order modulations, some advanced
DVB-S2 features require additional support at the
demux level
-DVB-T, Add support for HP/LP stream selection
-DVB-H, Add basic support to the frontend API
-DSS, basic frontend API support only,
will require additional support at the demux level
Ack'd by: Marcel Siegert <mws@linuxtv.org>
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Ack'd by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Diffstat (limited to 'linux/include')
-rw-r--r-- | linux/include/linux/dvb/frontend.h | 530 |
1 files changed, 529 insertions, 1 deletions
diff --git a/linux/include/linux/dvb/frontend.h b/linux/include/linux/dvb/frontend.h index c8cbd90ba..fe3b69605 100644 --- a/linux/include/linux/dvb/frontend.h +++ b/linux/include/linux/dvb/frontend.h @@ -7,6 +7,8 @@ * Andre Draszik <ad@convergence.de> * for convergence integrated media GmbH * + * Copyright (C) 2006 Manu Abraham <abraham.manu@gmail.com> + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 @@ -249,7 +251,9 @@ struct dvb_frontend_event { */ #define FE_TUNE_MODE_ONESHOT 0x01 - +/** + * FE_GET_INFO, is now a legacy IOCTL as well + */ #define FE_GET_INFO _IOR('o', 61, struct dvb_frontend_info) #define FE_DISEQC_RESET_OVERLOAD _IO('o', 62) @@ -267,6 +271,9 @@ struct dvb_frontend_event { #define FE_READ_SNR _IOR('o', 72, __u16) #define FE_READ_UNCORRECTED_BLOCKS _IOR('o', 73, __u32) +/** + * Legacy IOCTL's + */ #define FE_SET_FRONTEND _IOW('o', 76, struct dvb_frontend_parameters) #define FE_GET_FRONTEND _IOR('o', 77, struct dvb_frontend_parameters) #define FE_SET_FRONTEND_TUNE_MODE _IO('o', 81) /* unsigned int */ @@ -274,4 +281,525 @@ struct dvb_frontend_event { #define FE_DISHNETWORK_SEND_LEGACY_CMD _IO('o', 80) /* unsigned int */ +/** + * New operations for new and multiple delivery systems. + * + * References: + * DVB-S: ISO 13818-1/ITU H.222, EN 300 468 + * DVB-S2: EN 300 468, EN 301 210, TR 102 376 + * DVB-C: ISO 13818-1/ITU H.222, EN 300 468, EN 300 429 + * DVB-T: ISO 13818-1/ITU H.222, EN 300 468, EN 300 744 + * DVB-H: EN 300 468, EN 302 304 + */ + +/** + * Supported Delivery systems, some devices + * are capable of supporting multiple delivery systems. + * + * FE_DELSYS_IGNORE, causes the delivery system + * not to be queried. + * + * FE_DELSYS_AUTO, Some devices/drivers, might in + * future be capable of detectinng the delivery system. + */ +enum fe_delsys { + FE_DELSYS_IGNORE = (0 << 0), + FE_DELSYS_DVBS = (1 << 0), + FE_DELSYS_DVBS2 = (1 << 1), + FE_DELSYS_DSS = (1 << 2), + FE_DELSYS_DVBC = (1 << 3), + FE_DELSYS_DVBT = (1 << 4), + FE_DELSYS_DVBH = (1 << 5), + FE_DELSYS_ATSC = (1 << 6), + FE_DELSYS_AUTO = (1 << 31) +}; + +/** + * Supported Transport types, some delivery systems + * support multiple transports too. + * + * FE_MATYPE_IGNORE, causes the transport type not + * to be queried. + * + * FE_MATYPE_AUTO, Some devices/drivers, might + * support auto detecting the transport type, depending + * on some other settings and or hardware features. + * + * NOTE: This is specified by the DVB-S2 specifications + * This change of transport type might require an additional + * change at the PCI bridge level, for some implementations. + */ +enum fe_matype { + FE_MATYPE_IGNORE = (0 << 0), + FE_MATYPE_TRANSPORT = (1 << 0), + FE_MATYPE_GENERIC_PACKET = (1 << 1), + FE_MATYPE_GENERIC_CONTINUOUS = (1 << 2), + FE_MATYPE_RESERVED = (1 << 3), + FE_MATYPE_AUTO = (1 << 31) +}; + +/** + * Supported Stream Priorities + * + * Some delivery systems do have streams having + * different priorities. ie, High priority/Low priority. + * + * NOTE: The default should be the High priority stream. + */ +enum fe_stream { + FE_STREAM_HP = (1 << 0), + FE_STREAM_LP = (1 << 1) +}; + +/** + * Supported Modulations. + * Some devices support multiple modulation types + * + * FE_MOD_IGNORE, causes the modulation type not + * to be queried. + * + * FE_MOD_AUTO, Some devices/drivers, might support + * auto detecting the modulation type, depending on + * some other settings and or hardware features. + */ +enum fe_modulations { + FE_MOD_IGNORE = (0 << 0), + FE_MOD_NONE = (1 << 0), + FE_MOD_BPSK = (1 << 1), + FE_MOD_QPSK = (1 << 2), + FE_MOD_OQPSK = (1 << 3), + FE_MOD_8PSK = (1 << 4), + FE_MOD_16APSK = (1 << 5), + FE_MOD_32APSK = (1 << 6), + FE_MOD_QAM16 = (1 << 7), + FE_MOD_QAM32 = (1 << 8), + FE_MOD_QAM64 = (1 << 9), + FE_MOD_QAM128 = (1 << 10), + FE_MOD_QAM256 = (1 << 11), + FE_MOD_QAM512 = (1 << 12), + FE_MOD_QAM1024 = (1 << 13), + FE_MOD_QAMAUTO = (1 << 14), + FE_MOD_OFDM = (1 << 15), + FE_MOD_COFDM = (1 << 16), + FE_MOD_VSB8 = (1 << 17), + FE_MOD_VSB16 = (1 << 18), + FE_MOD_RSVD = (1 << 19), + FE_MOD_AUTO = (1 << 31) +}; + +/** + * Supported FEC (Forward Error Correction) Code rates + * + * FE_FECRATE_IGNORE, causes the FECRATE type not + * to be queried. + * + * FE_FECRATE_AUTO, Some devices/drivers, might + * support auto detecting the FEC code rate type, depending + * on some other hardware settings and or hardware features. + */ +enum fe_fecrates { + FE_FECRATE_IGNORE = (0 << 0), + FE_FECRATE_NONE = (1 << 0), + FE_FECRATE_1_4 = (1 << 1), + FE_FECRATE_1_3 = (1 << 2), + FE_FECRATE_2_5 = (1 << 3), + FE_FECRATE_1_2 = (1 << 4), + FE_FECRATE_3_5 = (1 << 5), + FE_FECRATE_2_3 = (1 << 6), + FE_FECRATE_3_4 = (1 << 7), + FE_FECRATE_4_5 = (1 << 8), + FE_FECRATE_5_6 = (1 << 9), + FE_FECRATE_6_7 = (1 << 10), + FE_FECRATE_7_8 = (1 << 11), + FE_FECRATE_8_9 = (1 << 12), + FE_FECRATE_9_10 = (1 << 13), + FE_FECRATE_RSVD = (1 << 14), + FE_FECRATE_AUTO = (1 << 31) +}; + +/** + * Supported MODCOD types + * + * The MODCOD types are specific to the DVB-S2 specification + * Some devices directly take the MODCOD values as an input + * or just output the same. + * + * In any case a single frontend will not be able to do + * multiple modulations/code rates at any given point of time. + */ +enum fe_modcod { + FE_MODCOD_DUMMY_PLFRAME = 0, + FE_MODCOD_QPSK_1_4, + FE_MODCOD_QPSK_1_3, + FE_MODCOD_QPSK_2_5, + FE_MODCOD_QPSK_1_2, + FE_MODCOD_QPSK_3_5, + FE_MODCOD_QPSK_2_3, + FE_MODCOD_QPSK_3_4, + FE_MODCOD_QPSK_4_5, + FE_MODCOD_QPSK_5_6, + FE_MODCOD_QPSK_8_9, + FE_MODCOD_QPSK_9_10, + FE_MODCOD_8PSK_3_5, + FE_MODCOD_8PSK_2_3, + FE_MODCOD_8PSK_3_4, + FE_MODCOD_8PSK_5_6, + FE_MODCOD_8PSK_8_9, + FE_MODCOD_8PSK_9_10, + FE_MODCOD_16APSK_2_3, + FE_MODCOD_16APSK_3_4, + FE_MODCOD_16APSK_4_5, + FE_MODCOD_16APSK_5_6, + FE_MODCOD_16APSK_8_9, + FE_MODCOD_16APSK_9_10, + FE_MODCOD_32APSK_3_4, + FE_MODCOD_32APSK_4_5, + FE_MODCOD_32APSK_5_6, + FE_MODCOD_32APSK_8_9, + FE_MODCOD_32APSK_9_10, + FE_MODCOD_RESERVED_1, + FE_MODCOD_BPSK_1_3, + FE_MODCOD_BPSK_1_4, + FE_MODCOD_RESERVED_2 +}; + +/** + * Supported Bandwidth modes + * + * FE_BANDWIDTH_IGNORE, causes the bandwidth not + * to be queried. + * + * FE_BANDWIDTH_AUTO, Some devices/drivers, might + * support auto detecting the Bandwidth, depending + * on some other hardware settings and or hardware features. + */ +enum fe_bandwidths { + FE_BANDWIDTH_IGNORE = (0 << 0), + FE_BANDWIDTH_8_MHZ = (1 << 1), + FE_BANDWIDTH_7_MHZ = (1 << 2), + FE_BANDWIDTH_6_MHZ = (1 << 3), + FE_BANDWIDTH_5_MHZ = (1 << 4), + FE_BANDWIDTH_RESERVED = (1 << 5), + FE_BANDWIDTH_AUTO = (1 << 31) +}; + +/** + * Supported Inversion modes + * + * FE_INVERSION_IGNORE, causes the inversion not + * to be queried. + * + * FE_INVERSION_AUTO, Some devices/drivers, might + * support auto detecting the Inversion, depending + * on some other hardware settings and or hardware features. + * + * NOTE: All current delivery systems need inversion in some + * way or the other, due to hardware implementation specifics. + * and/or others. + */ +enum fe_inversion { + FE_INVERSION_IGNORE = (0 << 0), + FE_INVERSION_OFF = (1 << 0), + FE_INVERSION_ON = (1 << 1), + FE_INVERSION_AUTO = (1 << 31) +}; + +/** + * Supported Transmission modes + * + * FE_TRANSMISSION_MODE_IGNORE, causes the transmission mode + * not to be queried. + * + * FE_TRANSMISSION_MODE_AUTO, Some devices/drivers, might + * support auto detecting the Transmission Mode, depending + * on some other hardware settings and or hardware features. + * + * NOTE: Currently applies to DVB-T and DVB-H only. + */ +enum fe_transmit_modes { + FE_TRANSMISSION_MODE_IGNORE = (0 << 0), + FE_TRANSMISSION_MODE_2K = (1 << 1), + FE_TRANSMISSION_MODE_4K = (1 << 2), + FE_TRANSMISSION_MODE_8K = (1 << 3), + FE_TRANSMISSION_MODE_RESERVED = (1 << 4), + FE_TRANSMISSION_MODE_AUTO = (1 << 31) +}; + +/** + * Supported Guard Intervals + * + * FE_GUARD_INTERVAL_IGNORE, causes the guard interval + * not to be queried. + * + * FE_GUARD_INTERVAL_AUTO, Some devices/drivers, might + * support auto detecting the Transmission Mode, depending + * on some other hardware settings and or hardware features. + * + * NOTE: Currently applies to DVB-T and DVB-H only. + */ +enum fe_guard_intervals { + FE_GUARD_INTERVAL_IGNORE = (0 << 0), + FE_GUARD_INTERVAL_1_32 = (1 << 1), + FE_GUARD_INTERVAL_1_16 = (1 << 2), + FE_GUARD_INTERVAL_1_8 = (1 << 3), + FE_GUARD_INTERVAL_1_4 = (1 << 4), + FE_GUARD_INTERVAL_AUTO = (1 << 31) +}; + +/** + * Supported Hierarchial Modulations + * + * FE_HIERARCHY_IGNORE, causes the hierarchy + * not to be queried. + * + * FE_HIERARCHY_AUTO, Some devices/drivers, might + * support auto detecting the hierarchial modulation, depending + * on some other hardware settings and or hardware features. + * + * NOTE: Currently applies to DVB-T and DVB-H only. + */ +enum fe_hierarchy_info { + FE_HIERARCHY_IGNORE = (0 << 0), + FE_HIERARCHY_OFF = (1 << 1), + FE_HIERARCHY_ON = (1 << 2), + FE_HIERARCHY_AUTO = (1 << 31) +}; + +/** + * Supported Rolloff Rates + * + * FE_ROLLOFF_IGNORE, causes the hierarchy + * not to be queried. + * + * FE_ROLLOFF_AUTO, Some devices/drivers, might + * support auto detecting the hierarchial modulation, depending + * on some other hardware settings and or hardware features. + * + * NOTE: Currently applies to DVB-T and DVB-H only, + * not applicable to DVB-S2, DVB-S2 uses fe_matype + */ +enum fe_rolloff { + FE_ROLLOFF_IGNORE = (0 << 0), + FE_ROLLOFF_1 = (1 << 1), + FE_ROLLOFF_2 = (1 << 2), + FE_ROLLOFF_4 = (1 << 3), + FE_ROLLOFF_AUTO = (1 << 31) +}; + +/** + * Supported Interleaver types + * + * FE_INTERLEAVER_IGNORE, causes the hierarchy + * not to be queried. + * + * FE_INTERLEAVER_AUTO, Some devices/drivers, might + * support auto detecting the hierarchial modulation, depending + * on some other hardware settings and or hardware features. + * + * NOTE: Currently applies only to DVB-H. + */ +enum fe_interleaver { + FE_INTERLEAVER_IGNORE = (0 << 0), + FE_INTERLEAVER_NATIVE = (1 << 1), + FE_INTERLEAVER_INDEPTH = (1 << 2), + FE_INTERLEAVER_AUTO = (1 << 31) +}; + + +/** + * Supported MPE-FEC modes + * + * FE_MPEFEC_IGNORE, causes the mpefec indicator + * not to be queried. + * + * NOTE: MPE-FEC is an indicator according to EN 300 468 + * Currently applies only to DVB-H. + */ +enum fe_mpefec { + FE_MPEFEC_IGNORE = (0 << 0), + FE_MPEFEC_ON = (1 << 1), + FE_MPEFEC_OFF = (1 << 2) +}; + +/** + * Supported Timeslicing mode + * + * FE_TIMESLICING_IGNORE, causes the timeslicing indicator + * not to be queried. + * + * NOTE: Timeslicing is an indicator according to EN 300 468 + * Currently applies only to DVB-H. + */ +enum fe_timeslicing { + FE_TIMESLICING_IGNORE = (0 << 0), + FE_TIMESLICING_ON = (1 << 1), + FE_TIMESLICING_OFF = (1 << 2) +}; + +/** + * DVB-S parameters + */ +struct dvbs_params { + __u32 symbol_rate; + + enum fe_modulations modulation; + enum fe_fecrates fecrate; +}; + +/** + * DVB-S2 parameters + */ +struct dvbs2_params { + __u32 symbol_rate; + + enum fe_modulations modulation; + enum fe_fecrates fecrate; + enum fe_stream streamtype; + enum fe_fecrates coderate_HP; + enum fe_fecrates coderate_LP; +}; + +/** + * DSS parameters + */ +struct dss_params { + __u32 symbol_rate; + + enum fe_modulations modulation; + enum fe_fecrates fecrate; +}; + +/** + * DVB-C parameters + */ +struct dvbc_params { + __u32 symbol_rate; + + enum fe_modulations modulation; + enum fe_fecrates fecrate; +}; + +/** + * DVB-T parameters + */ +struct dvbt_params { + enum fe_modulations constellation; + enum fe_bandwidths bandwidth; + enum fe_fecrates code_rate_HP; + enum fe_fecrates code_rate_LP; + enum fe_transmit_modes transmission_mode; + enum fe_guard_intervals guard_interval; + enum fe_hierarchy_info hierarchy; + enum fe_rolloff alpha; + enum fe_stream stream; +}; + +/** + * DVB-H parameters + */ +struct dvbh_params { + enum fe_modulations constellation; + enum fe_fecrates code_rate_HP; + enum fe_fecrates code_rate_LP; + enum fe_transmit_modes transmission_mode; + enum fe_guard_intervals guard_interval; + enum fe_hierarchy_info hierarchy; + enum fe_rolloff alpha; + enum fe_interleaver interleaver; + enum fe_mpefec mpefec; + enum fe_timeslicing timeslicing; + enum fe_stream stream; + __u32 bandwidth; +}; + +/** + * ATSC parameters + */ +struct atsc_params { + enum fe_modulations modulation; +}; + +/** + * Padding to handle future binary compatibility issues. + * + * NOTE: The padding is a dummy parameter ! + */ +struct pad_params { + __u8 pad[512]; +}; + +/** + * Frontend capability information + */ +struct dvb_frontend_cap { + char name[128]; + + __u32 frequency_min; + __u32 frequency_max; + __u32 frequency_stepsize; + __u32 frequency_tolerance; + __u32 symbol_rate_min; + __u32 symbol_rate_max; + __u32 symbol_rate_tolerance; + + enum fe_delsys delivery; + enum fe_inversion inversion; + + union { + struct dvbs_params dvbs; + struct dvbs2_params dvbs2; + struct dss_params dss; + struct dvbc_params dvbc; + struct dvbt_params dvbt; + struct dvbh_params dvbh; + struct atsc_params atsc; + struct pad_params pad; + } delsys; +}; + +/** + * We have the NEW IOCTL's defined now. This IOCTL + * is supposed to handle all the new delivery systems + * FE_GET_CAPS, gets all the capabilities in one go. + * + * For the GET IOCTL's ie FE_GET_PARAMS and FE_GET_CAPS + * some of the parameters maybe selectively queried by + * setting that relevant parameter to IGNORE. + */ +#define FE_GET_CAPS _IOR('o', 84, struct dvb_frontend_cap) + +/** + * Frontend parameters + */ +struct dvb_frontend_params { + __u32 frequency; + + enum fe_delsys delivery; + enum fe_inversion inversion; + + union { + struct dvbs_params dvbs; + struct dvbs2_params dvbs2; + struct dss_params dss; + struct dvbc_params dvbc; + struct dvbt_params dvbt; + struct dvbh_params dvbh; + struct atsc_params atsc; + struct pad_params pad; + } delsys; +}; + +/** + * We have the NEW IOCTL's defined now. These IOCTL's + * are supposed to handle all the new delivery systems. + * FE_SET_PARAMS, sets all the parameters in one go. + * FE_GET_PARAMS, gets all the parameters in one go. + * + * For the GET IOCTL's ie FE_GET_PARAMS and FE_GET_CAPS + * some of the parameters maybe selectively queried by + * setting that relevant parameter to IGNORE. + */ +#define FE_SET_PARAMS _IOW('o', 82, struct dvb_frontend_params) +#define FE_GET_PARAMS _IOR('o', 83, struct dvb_frontend_params) + #endif /*_DVBFRONTEND_H_*/ |