V4L/DVB (3359): Redesign tuners struct for maximum flexibility
- Tunertype struct redefined to allow one or more tuner_params structs
per tuner definition, one for each video standard.
- Each tuner_params struct has an element containing an arbitrary
amount of tuner_ranges.
(this is needed for dvb tuners - to be handled later)
- A tuner_range may be referenced by multiple tuner_params structs.
There are many duplicates in here. Reusing tuner_range structs,
rather than defining new ones for each tuner, will cut down on
memory usage, and is preferred when possible.
- tunertype struct contains an element, has_tda988x.
We must set this for all tunertypes that contain a tda988x
chip, and then we can remove this setting from the various
card structs.
- Improves tuners array memory usage efficiency.
- Right now, all tuners are using the first tuner_params[] array element
for analog mode. In the future, we will be merging similar tuner
definitions together, such that each tuner definition will have a
tuner_params struct for each available video standard. At that point,
the tuner_params[] array element will be chosen based on the video
standard in use.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-13 09:10:25 -07:00
|
|
|
/*
|
|
|
|
* 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, \
|
2006-01-13 09:10:26 -07:00
|
|
|
TUNER_PARAM_TYPE_NTSC
|
V4L/DVB (3359): Redesign tuners struct for maximum flexibility
- Tunertype struct redefined to allow one or more tuner_params structs
per tuner definition, one for each video standard.
- Each tuner_params struct has an element containing an arbitrary
amount of tuner_ranges.
(this is needed for dvb tuners - to be handled later)
- A tuner_range may be referenced by multiple tuner_params structs.
There are many duplicates in here. Reusing tuner_range structs,
rather than defining new ones for each tuner, will cut down on
memory usage, and is preferred when possible.
- tunertype struct contains an element, has_tda988x.
We must set this for all tunertypes that contain a tda988x
chip, and then we can remove this setting from the various
card structs.
- Improves tuners array memory usage efficiency.
- Right now, all tuners are using the first tuner_params[] array element
for analog mode. In the future, we will be merging similar tuner
definitions together, such that each tuner definition will have a
tuner_params struct for each available video standard. At that point,
the tuner_params[] array element will be chosen based on the video
standard in use.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-13 09:10:25 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct tuner_range {
|
|
|
|
unsigned short limit;
|
|
|
|
unsigned char cb;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct tuner_params {
|
|
|
|
enum param_type type;
|
2006-01-15 07:46:18 -07:00
|
|
|
unsigned int tda988x;
|
2006-01-15 10:04:52 -07:00
|
|
|
/* 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.
|
|
|
|
*
|
2006-01-15 10:47:02 -07:00
|
|
|
* Set cb_first_if_lower_freq to 1, if this check is
|
|
|
|
* required for this tuner.
|
2006-01-15 10:04:52 -07:00
|
|
|
*
|
|
|
|
* 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;
|
V4L/DVB (3359): Redesign tuners struct for maximum flexibility
- Tunertype struct redefined to allow one or more tuner_params structs
per tuner definition, one for each video standard.
- Each tuner_params struct has an element containing an arbitrary
amount of tuner_ranges.
(this is needed for dvb tuners - to be handled later)
- A tuner_range may be referenced by multiple tuner_params structs.
There are many duplicates in here. Reusing tuner_range structs,
rather than defining new ones for each tuner, will cut down on
memory usage, and is preferred when possible.
- tunertype struct contains an element, has_tda988x.
We must set this for all tunertypes that contain a tda988x
chip, and then we can remove this setting from the various
card structs.
- Improves tuners array memory usage efficiency.
- Right now, all tuners are using the first tuner_params[] array element
for analog mode. In the future, we will be merging similar tuner
definitions together, such that each tuner definition will have a
tuner_params struct for each available video standard. At that point,
the tuner_params[] array element will be chosen based on the video
standard in use.
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-13 09:10:25 -07:00
|
|
|
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
|