/*1* descriptions for simple tuners.2*/34#ifndef __TUNER_TYPES_H__5#define __TUNER_TYPES_H__67enum param_type {8TUNER_PARAM_TYPE_RADIO,9TUNER_PARAM_TYPE_PAL,10TUNER_PARAM_TYPE_SECAM,11TUNER_PARAM_TYPE_NTSC,12TUNER_PARAM_TYPE_DIGITAL,13};1415struct tuner_range {16unsigned short limit;17unsigned char config;18unsigned char cb;19};2021struct tuner_params {22enum param_type type;2324/* Many Philips based tuners have a comment like this in their25* datasheet:26*27* For channel selection involving band switching, and to ensure28* smooth tuning to the desired channel without causing29* unnecessary charge pump action, it is recommended to consider30* the difference between wanted channel frequency and the31* current channel frequency. Unnecessary charge pump action32* will result in very low tuning voltage which may drive the33* oscillator to extreme conditions.34*35* Set cb_first_if_lower_freq to 1, if this check is36* required for this tuner.37*38* I tested this for PAL by first setting the TV frequency to39* 203 MHz and then switching to 96.6 MHz FM radio. The result was40* static unless the control byte was sent first.41*/42unsigned int cb_first_if_lower_freq:1;43/* Set to 1 if this tuner uses a tda9887 */44unsigned int has_tda9887:1;45/* Many Philips tuners use tda9887 PORT1 to select the FM radio46sensitivity. If this setting is 1, then set PORT1 to 1 to47get proper FM reception. */48unsigned int port1_fm_high_sensitivity:1;49/* Some Philips tuners use tda9887 PORT2 to select the FM radio50sensitivity. If this setting is 1, then set PORT2 to 1 to51get proper FM reception. */52unsigned int port2_fm_high_sensitivity:1;53/* Some Philips tuners use tda9887 cGainNormal to select the FM radio54sensitivity. If this setting is 1, e register will use cGainNormal55instead of cGainLow. */56unsigned int fm_gain_normal:1;57/* Most tuners with a tda9887 use QSS mode. Some (cheaper) tuners58use Intercarrier mode. If this setting is 1, then the tuner59needs to be set to intercarrier mode. */60unsigned int intercarrier_mode:1;61/* This setting sets the default value for PORT1.620 means inactive, 1 means active. Note: the actual bit63value written to the tda9887 is inverted. So a 0 here64means a 1 in the B6 bit. */65unsigned int port1_active:1;66/* This setting sets the default value for PORT2.670 means inactive, 1 means active. Note: the actual bit68value written to the tda9887 is inverted. So a 0 here69means a 1 in the B7 bit. */70unsigned int port2_active:1;71/* Sometimes PORT1 is inverted when the SECAM-L' standard is selected.72Set this bit to 1 if this is needed. */73unsigned int port1_invert_for_secam_lc:1;74/* Sometimes PORT2 is inverted when the SECAM-L' standard is selected.75Set this bit to 1 if this is needed. */76unsigned int port2_invert_for_secam_lc:1;77/* Some cards require PORT1 to be 1 for mono Radio FM and 0 for stereo. */78unsigned int port1_set_for_fm_mono:1;79/* Select 18% (or according to datasheet 0%) L standard PLL gating,80vs the driver default of 36%. */81unsigned int default_pll_gating_18:1;82/* IF to use in radio mode. Tuners with a separate radio IF filter83seem to use 10.7, while those without use 33.3 for PAL/SECAM tuners84and 41.3 for NTSC tuners. 0 = 10.7, 1 = 33.3, 2 = 41.3 */85unsigned int radio_if:2;86/* Default tda9887 TOP value in dB for the low band. Default is 0.87Range: -16:+15 */88signed int default_top_low:5;89/* Default tda9887 TOP value in dB for the mid band. Default is 0.90Range: -16:+15 */91signed int default_top_mid:5;92/* Default tda9887 TOP value in dB for the high band. Default is 0.93Range: -16:+15 */94signed int default_top_high:5;95/* Default tda9887 TOP value in dB for SECAM-L/L' for the low band.96Default is 0. Several tuners require a different TOP value for97the SECAM-L/L' standards. Range: -16:+15 */98signed int default_top_secam_low:5;99/* Default tda9887 TOP value in dB for SECAM-L/L' for the mid band.100Default is 0. Several tuners require a different TOP value for101the SECAM-L/L' standards. Range: -16:+15 */102signed int default_top_secam_mid:5;103/* Default tda9887 TOP value in dB for SECAM-L/L' for the high band.104Default is 0. Several tuners require a different TOP value for105the SECAM-L/L' standards. Range: -16:+15 */106signed int default_top_secam_high:5;107108u16 iffreq;109110unsigned int count;111struct tuner_range *ranges;112};113114struct tunertype {115char *name;116unsigned int count;117struct tuner_params *params;118119u16 min;120u16 max;121u32 stepsize;122123u8 *initdata;124u8 *sleepdata;125};126127extern struct tunertype tuners[];128extern unsigned const int tuner_count;129130#endif131132133