stv0299.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. Driver for ST STV0299 demodulator
  3. Copyright (C) 2001-2002 Convergence Integrated Media GmbH
  4. <ralph@convergence.de>,
  5. <holger@convergence.de>,
  6. <js@convergence.de>
  7. Philips SU1278/SH
  8. Copyright (C) 2002 by Peter Schildmann <peter.schildmann@web.de>
  9. LG TDQF-S001F
  10. Copyright (C) 2002 Felix Domke <tmbinc@elitedvb.net>
  11. & Andreas Oberritter <obi@linuxtv.org>
  12. Support for Samsung TBMU24112IMB used on Technisat SkyStar2 rev. 2.6B
  13. Copyright (C) 2003 Vadim Catana <skystar@moldova.cc>:
  14. Support for Philips SU1278 on Technotrend hardware
  15. Copyright (C) 2004 Andrew de Quincey <adq_dvb@lidskialf.net>
  16. This program is free software; you can redistribute it and/or modify
  17. it under the terms of the GNU General Public License as published by
  18. the Free Software Foundation; either version 2 of the License, or
  19. (at your option) any later version.
  20. This program is distributed in the hope that it will be useful,
  21. but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. GNU General Public License for more details.
  24. You should have received a copy of the GNU General Public License
  25. along with this program; if not, write to the Free Software
  26. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  27. */
  28. #ifndef STV0299_H
  29. #define STV0299_H
  30. #include <linux/dvb/frontend.h>
  31. #include "dvb_frontend.h"
  32. #define STV0229_LOCKOUTPUT_0 0
  33. #define STV0229_LOCKOUTPUT_1 1
  34. #define STV0229_LOCKOUTPUT_CF 2
  35. #define STV0229_LOCKOUTPUT_LK 3
  36. #define STV0299_VOLT13_OP0 0
  37. #define STV0299_VOLT13_OP1 1
  38. struct stv0299_config
  39. {
  40. /* the demodulator's i2c address */
  41. u8 demod_address;
  42. /* inittab - array of pairs of values.
  43. * First of each pair is the register, second is the value.
  44. * List should be terminated with an 0xff, 0xff pair.
  45. */
  46. u8* inittab;
  47. /* master clock to use */
  48. u32 mclk;
  49. /* does the inversion require inversion? */
  50. u8 invert:1;
  51. /* Skip reinitialisation? */
  52. u8 skip_reinit:1;
  53. /* LOCK OUTPUT setting */
  54. u8 lock_output:2;
  55. /* Is 13v controlled by OP0 or OP1? */
  56. u8 volt13_op0_op1:1;
  57. /* minimum delay before retuning */
  58. int min_delay_ms;
  59. /* Set the symbol rate */
  60. int (*set_symbol_rate)(struct dvb_frontend* fe, u32 srate, u32 ratio);
  61. /* PLL maintenance */
  62. int (*pll_init)(struct dvb_frontend *fe, struct i2c_adapter *i2c);
  63. int (*pll_set)(struct dvb_frontend *fe, struct i2c_adapter *i2c, struct dvb_frontend_parameters *params);
  64. };
  65. extern int stv0299_writereg (struct dvb_frontend* fe, u8 reg, u8 data);
  66. extern int stv0299_enable_plli2c (struct dvb_frontend* fe);
  67. extern struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
  68. struct i2c_adapter* i2c);
  69. #endif // STV0299_H