tuner-types.h 1.4 KB

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