tvp514x.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. * drivers/media/video/tvp514x.h
  3. *
  4. * Copyright (C) 2008 Texas Instruments Inc
  5. * Author: Vaibhav Hiremath <hvaibhav@ti.com>
  6. *
  7. * Contributors:
  8. * Sivaraj R <sivaraj@ti.com>
  9. * Brijesh R Jadav <brijesh.j@ti.com>
  10. * Hardik Shah <hardik.shah@ti.com>
  11. * Manjunath Hadli <mrh@ti.com>
  12. * Karicheri Muralidharan <m-karicheri2@ti.com>
  13. *
  14. * This package is free software; you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License version 2 as
  16. * published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26. *
  27. */
  28. #ifndef _TVP514X_H
  29. #define _TVP514X_H
  30. /*
  31. * Other macros
  32. */
  33. #define TVP514X_MODULE_NAME "tvp514x"
  34. #define TVP514X_XCLK_BT656 (27000000)
  35. /* Number of pixels and number of lines per frame for different standards */
  36. #define NTSC_NUM_ACTIVE_PIXELS (720)
  37. #define NTSC_NUM_ACTIVE_LINES (480)
  38. #define PAL_NUM_ACTIVE_PIXELS (720)
  39. #define PAL_NUM_ACTIVE_LINES (576)
  40. /**
  41. * enum tvp514x_input - enum for different decoder input pin
  42. * configuration.
  43. */
  44. enum tvp514x_input {
  45. /*
  46. * CVBS input selection
  47. */
  48. INPUT_CVBS_VI1A = 0x0,
  49. INPUT_CVBS_VI1B,
  50. INPUT_CVBS_VI1C,
  51. INPUT_CVBS_VI2A = 0x04,
  52. INPUT_CVBS_VI2B,
  53. INPUT_CVBS_VI2C,
  54. INPUT_CVBS_VI3A = 0x08,
  55. INPUT_CVBS_VI3B,
  56. INPUT_CVBS_VI3C,
  57. INPUT_CVBS_VI4A = 0x0C,
  58. /*
  59. * S-Video input selection
  60. */
  61. INPUT_SVIDEO_VI2A_VI1A = 0x44,
  62. INPUT_SVIDEO_VI2B_VI1B,
  63. INPUT_SVIDEO_VI2C_VI1C,
  64. INPUT_SVIDEO_VI2A_VI3A = 0x54,
  65. INPUT_SVIDEO_VI2B_VI3B,
  66. INPUT_SVIDEO_VI2C_VI3C,
  67. INPUT_SVIDEO_VI4A_VI1A = 0x4C,
  68. INPUT_SVIDEO_VI4A_VI1B,
  69. INPUT_SVIDEO_VI4A_VI1C,
  70. INPUT_SVIDEO_VI4A_VI3A = 0x5C,
  71. INPUT_SVIDEO_VI4A_VI3B,
  72. INPUT_SVIDEO_VI4A_VI3C,
  73. /* Need to add entries for
  74. * RGB, YPbPr and SCART.
  75. */
  76. INPUT_INVALID
  77. };
  78. /**
  79. * enum tvp514x_output - enum for output format
  80. * supported.
  81. *
  82. */
  83. enum tvp514x_output {
  84. OUTPUT_10BIT_422_EMBEDDED_SYNC = 0,
  85. OUTPUT_20BIT_422_SEPERATE_SYNC,
  86. OUTPUT_10BIT_422_SEPERATE_SYNC = 3,
  87. OUTPUT_INVALID
  88. };
  89. /**
  90. * struct tvp514x_platform_data - Platform data values and access functions.
  91. * @clk_polarity: Clock polarity of the current interface.
  92. * @hs_polarity: HSYNC Polarity configuration for current interface.
  93. * @vs_polarity: VSYNC Polarity configuration for current interface.
  94. */
  95. struct tvp514x_platform_data {
  96. /* Interface control params */
  97. bool clk_polarity;
  98. bool hs_polarity;
  99. bool vs_polarity;
  100. };
  101. #endif /* ifndef _TVP514X_H */