tuner-types.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 config;
  15. unsigned char cb;
  16. };
  17. struct tuner_params {
  18. enum param_type type;
  19. /* Many Philips based tuners have a comment like this in their
  20. * datasheet:
  21. *
  22. * For channel selection involving band switching, and to ensure
  23. * smooth tuning to the desired channel without causing
  24. * unnecessary charge pump action, it is recommended to consider
  25. * the difference between wanted channel frequency and the
  26. * current channel frequency. Unnecessary charge pump action
  27. * will result in very low tuning voltage which may drive the
  28. * oscillator to extreme conditions.
  29. *
  30. * Set cb_first_if_lower_freq to 1, if this check is
  31. * required for this tuner.
  32. *
  33. * I tested this for PAL by first setting the TV frequency to
  34. * 203 MHz and then switching to 96.6 MHz FM radio. The result was
  35. * static unless the control byte was sent first.
  36. */
  37. unsigned int cb_first_if_lower_freq:1;
  38. unsigned int count;
  39. struct tuner_range *ranges;
  40. };
  41. struct tunertype {
  42. char *name;
  43. unsigned int count;
  44. struct tuner_params *params;
  45. };
  46. extern struct tunertype tuners[];
  47. extern unsigned const int tuner_count;
  48. #endif