vpif_types.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Copyright (C) 2011 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 _VPIF_TYPES_H
  18. #define _VPIF_TYPES_H
  19. #include <linux/i2c.h>
  20. #define VPIF_CAPTURE_MAX_CHANNELS 2
  21. #define VPIF_DISPLAY_MAX_CHANNELS 2
  22. enum vpif_if_type {
  23. VPIF_IF_BT656,
  24. VPIF_IF_BT1120,
  25. VPIF_IF_RAW_BAYER
  26. };
  27. struct vpif_interface {
  28. enum vpif_if_type if_type;
  29. unsigned hd_pol:1;
  30. unsigned vd_pol:1;
  31. unsigned fid_pol:1;
  32. };
  33. struct vpif_subdev_info {
  34. const char *name;
  35. struct i2c_board_info board_info;
  36. };
  37. struct vpif_output {
  38. struct v4l2_output output;
  39. const char *subdev_name;
  40. u32 input_route;
  41. u32 output_route;
  42. };
  43. struct vpif_display_chan_config {
  44. const struct vpif_output *outputs;
  45. int output_count;
  46. bool clip_en;
  47. };
  48. struct vpif_display_config {
  49. int (*set_clock)(int, int);
  50. struct vpif_subdev_info *subdevinfo;
  51. int subdev_count;
  52. struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS];
  53. const char *card_name;
  54. struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
  55. int *asd_sizes; /* 0-terminated array of asd group sizes */
  56. };
  57. struct vpif_input {
  58. struct v4l2_input input;
  59. const char *subdev_name;
  60. u32 input_route;
  61. u32 output_route;
  62. };
  63. struct vpif_capture_chan_config {
  64. struct vpif_interface vpif_if;
  65. const struct vpif_input *inputs;
  66. int input_count;
  67. };
  68. struct vpif_capture_config {
  69. int (*setup_input_channel_mode)(int);
  70. int (*setup_input_path)(int, const char *);
  71. struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS];
  72. struct vpif_subdev_info *subdev_info;
  73. int subdev_count;
  74. const char *card_name;
  75. struct v4l2_async_subdev **asd; /* Flat array, arranged in groups */
  76. int *asd_sizes; /* 0-terminated array of asd group sizes */
  77. };
  78. #endif /* _VPIF_TYPES_H */