Michael Krufky | 7b0ac9c | 2006-01-13 14:10:25 -0200 | [diff] [blame] | 1 | /* |
| 2 | * descriptions for simple tuners. |
| 3 | */ |
| 4 | |
| 5 | #ifndef __TUNER_TYPES_H__ |
| 6 | #define __TUNER_TYPES_H__ |
| 7 | |
| 8 | enum param_type { |
| 9 | TUNER_PARAM_TYPE_RADIO, \ |
| 10 | TUNER_PARAM_TYPE_PAL, \ |
| 11 | TUNER_PARAM_TYPE_SECAM, \ |
Michael Krufky | c943aa85 | 2006-01-13 14:10:26 -0200 | [diff] [blame] | 12 | TUNER_PARAM_TYPE_NTSC |
Michael Krufky | 7b0ac9c | 2006-01-13 14:10:25 -0200 | [diff] [blame] | 13 | }; |
| 14 | |
| 15 | struct tuner_range { |
| 16 | unsigned short limit; |
Michael Krufky | 3fc46d3 | 2006-01-23 17:11:11 -0200 | [diff] [blame] | 17 | unsigned char config; |
Michael Krufky | 7b0ac9c | 2006-01-13 14:10:25 -0200 | [diff] [blame] | 18 | unsigned char cb; |
| 19 | }; |
| 20 | |
| 21 | struct tuner_params { |
| 22 | enum param_type type; |
Hans Verkuil | 27487d4 | 2006-01-15 15:04:52 -0200 | [diff] [blame] | 23 | /* Many Philips based tuners have a comment like this in their |
| 24 | * datasheet: |
| 25 | * |
| 26 | * For channel selection involving band switching, and to ensure |
| 27 | * smooth tuning to the desired channel without causing |
| 28 | * unnecessary charge pump action, it is recommended to consider |
| 29 | * the difference between wanted channel frequency and the |
| 30 | * current channel frequency. Unnecessary charge pump action |
| 31 | * will result in very low tuning voltage which may drive the |
| 32 | * oscillator to extreme conditions. |
| 33 | * |
Michael Krufky | de03d21b | 2006-01-15 16:04:04 -0200 | [diff] [blame] | 34 | * Set cb_first_if_lower_freq to 1, if this check is |
Michael Krufky | 01872c5 | 2006-01-15 15:47:02 -0200 | [diff] [blame] | 35 | * required for this tuner. |
Hans Verkuil | 27487d4 | 2006-01-15 15:04:52 -0200 | [diff] [blame] | 36 | * |
| 37 | * I tested this for PAL by first setting the TV frequency to |
| 38 | * 203 MHz and then switching to 96.6 MHz FM radio. The result was |
| 39 | * static unless the control byte was sent first. |
| 40 | */ |
| 41 | unsigned int cb_first_if_lower_freq:1; |
Michael Krufky | 7b0ac9c | 2006-01-13 14:10:25 -0200 | [diff] [blame] | 42 | |
| 43 | unsigned int count; |
| 44 | struct tuner_range *ranges; |
| 45 | }; |
| 46 | |
| 47 | struct tunertype { |
| 48 | char *name; |
Michael Krufky | 7b0ac9c | 2006-01-13 14:10:25 -0200 | [diff] [blame] | 49 | struct tuner_params *params; |
| 50 | }; |
| 51 | |
| 52 | extern struct tunertype tuners[]; |
| 53 | extern unsigned const int tuner_count; |
| 54 | |
| 55 | #endif |