vpbe_types.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * Copyright (C) 2010 Texas Instruments Inc
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program; if not, write to the Free Software
  15. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. */
  17. #ifndef _VPBE_TYPES_H
  18. #define _VPBE_TYPES_H
  19. enum vpbe_version {
  20. VPBE_VERSION_1 = 1,
  21. VPBE_VERSION_2,
  22. VPBE_VERSION_3,
  23. };
  24. /* vpbe_timing_type - Timing types used in vpbe device */
  25. enum vpbe_enc_timings_type {
  26. VPBE_ENC_STD = 0x1,
  27. VPBE_ENC_DV_TIMINGS = 0x4,
  28. /* Used when set timings through FB device interface */
  29. VPBE_ENC_TIMINGS_INVALID = 0x8,
  30. };
  31. /*
  32. * struct vpbe_enc_mode_info
  33. * @name: ptr to name string of the standard, "NTSC", "PAL" etc
  34. * @std: standard or non-standard mode. 1 - standard, 0 - nonstandard
  35. * @interlaced: 1 - interlaced, 0 - non interlaced/progressive
  36. * @xres: x or horizontal resolution of the display
  37. * @yres: y or vertical resolution of the display
  38. * @fps: frame per second
  39. * @left_margin: left margin of the display
  40. * @right_margin: right margin of the display
  41. * @upper_margin: upper margin of the display
  42. * @lower_margin: lower margin of the display
  43. * @hsync_len: h-sync length
  44. * @vsync_len: v-sync length
  45. * @flags: bit field: bit usage is documented below
  46. *
  47. * Description:
  48. * Structure holding timing and resolution information of a standard.
  49. * Used by vpbe_device to set required non-standard timing in the
  50. * venc when lcd controller output is connected to a external encoder.
  51. * A table of timings is maintained in vpbe device to set this in
  52. * venc when external encoder is connected to lcd controller output.
  53. * Encoder may provide a g_dv_timings() API to override these values
  54. * as needed.
  55. *
  56. * Notes
  57. * ------
  58. * if_type should be used only by encoder manager and encoder.
  59. * flags usage
  60. * b0 (LSB) - hsync polarity, 0 - negative, 1 - positive
  61. * b1 - vsync polarity, 0 - negative, 1 - positive
  62. * b2 - field id polarity, 0 - negative, 1 - positive
  63. */
  64. struct vpbe_enc_mode_info {
  65. unsigned char *name;
  66. enum vpbe_enc_timings_type timings_type;
  67. v4l2_std_id std_id;
  68. struct v4l2_dv_timings dv_timings;
  69. unsigned int interlaced;
  70. unsigned int xres;
  71. unsigned int yres;
  72. struct v4l2_fract aspect;
  73. struct v4l2_fract fps;
  74. unsigned int left_margin;
  75. unsigned int right_margin;
  76. unsigned int upper_margin;
  77. unsigned int lower_margin;
  78. unsigned int hsync_len;
  79. unsigned int vsync_len;
  80. unsigned int flags;
  81. };
  82. #endif