tuner-types.h 1.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
/*
 * descriptions for simple tuners.
 */

#ifndef __TUNER_TYPES_H__
#define __TUNER_TYPES_H__

enum param_type {
	TUNER_PARAM_TYPE_RADIO, \
	TUNER_PARAM_TYPE_PAL, \
	TUNER_PARAM_TYPE_SECAM, \
12
	TUNER_PARAM_TYPE_NTSC
13 14 15 16 17 18 19 20 21
};

struct tuner_range {
	unsigned short limit;
	unsigned char cb;
};

struct tuner_params {
	enum param_type type;
22
	unsigned int tda988x;
23 24 25 26 27 28 29 30 31 32 33
	/* Many Philips based tuners have a comment like this in their
	 * datasheet:
	 *
	 *   For channel selection involving band switching, and to ensure
	 *   smooth tuning to the desired channel without causing
	 *   unnecessary charge pump action, it is recommended to consider
	 *   the difference between wanted channel frequency and the
	 *   current channel frequency.  Unnecessary charge pump action
	 *   will result in very low tuning voltage which may drive the
	 *   oscillator to extreme conditions.
	 *
34 35
	 * Set cb_first_if_lower_freq to 1, if this check is 
	 * required for this tuner.
36 37 38 39 40 41
	 *
	 * I tested this for PAL by first setting the TV frequency to
	 * 203 MHz and then switching to 96.6 MHz FM radio. The result was
	 * static unless the control byte was sent first.
	 */
	unsigned int cb_first_if_lower_freq:1;
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
	unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */

	unsigned int count;
	struct tuner_range *ranges;
};

struct tunertype {
	char *name;
	struct tuner_params *params;
};

extern struct tunertype tuners[];
extern unsigned const int tuner_count;

#endif