0001
0002
0003
0004
0005 #ifndef _VPIF_TYPES_H
0006 #define _VPIF_TYPES_H
0007
0008 #include <linux/i2c.h>
0009
0010 #define VPIF_CAPTURE_MAX_CHANNELS 2
0011 #define VPIF_DISPLAY_MAX_CHANNELS 2
0012
0013 enum vpif_if_type {
0014 VPIF_IF_BT656,
0015 VPIF_IF_BT1120,
0016 VPIF_IF_RAW_BAYER
0017 };
0018
0019 struct vpif_interface {
0020 enum vpif_if_type if_type;
0021 unsigned hd_pol:1;
0022 unsigned vd_pol:1;
0023 unsigned fid_pol:1;
0024 };
0025
0026 struct vpif_subdev_info {
0027 const char *name;
0028 struct i2c_board_info board_info;
0029 };
0030
0031 struct vpif_output {
0032 struct v4l2_output output;
0033 const char *subdev_name;
0034 u32 input_route;
0035 u32 output_route;
0036 };
0037
0038 struct vpif_display_chan_config {
0039 const struct vpif_output *outputs;
0040 int output_count;
0041 bool clip_en;
0042 };
0043
0044 struct vpif_display_config {
0045 int (*set_clock)(int, int);
0046 struct vpif_subdev_info *subdevinfo;
0047 int subdev_count;
0048 int i2c_adapter_id;
0049 struct vpif_display_chan_config chan_config[VPIF_DISPLAY_MAX_CHANNELS];
0050 const char *card_name;
0051 };
0052
0053 struct vpif_input {
0054 struct v4l2_input input;
0055 char *subdev_name;
0056 u32 input_route;
0057 u32 output_route;
0058 };
0059
0060 struct vpif_capture_chan_config {
0061 struct vpif_interface vpif_if;
0062 struct vpif_input *inputs;
0063 int input_count;
0064 };
0065
0066 struct vpif_capture_config {
0067 int (*setup_input_channel_mode)(int);
0068 int (*setup_input_path)(int, const char *);
0069 struct vpif_capture_chan_config chan_config[VPIF_CAPTURE_MAX_CHANNELS];
0070 struct vpif_subdev_info *subdev_info;
0071 int subdev_count;
0072 int i2c_adapter_id;
0073 const char *card_name;
0074
0075 struct v4l2_async_subdev *asd[VPIF_CAPTURE_MAX_CHANNELS];
0076 int asd_sizes[VPIF_CAPTURE_MAX_CHANNELS];
0077 };
0078 #endif