blob: 51b45acbddd490d1208c968a5a0ee79859ddd90a [file] [log] [blame]
Terence Hampsona6914ca2012-04-09 14:06:50 -04001/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#ifndef VCAP_FMT_H
15#define VCAP_FMT_H
16
Terence Hampson7d5bfbc2012-05-08 13:33:48 -040017#define V4L2_BUF_TYPE_INTERLACED_IN_DECODER (V4L2_BUF_TYPE_PRIVATE)
18#define V4L2_BUF_TYPE_VP_OUT (V4L2_BUF_TYPE_PRIVATE + 1)
Terence Hampsona6914ca2012-04-09 14:06:50 -040019
20enum hal_vcap_mode {
21 HAL_VCAP_MODE_PRO = 0,
22 HAL_VCAP_MODE_INT,
23};
24
25enum hal_vcap_polar {
26 HAL_VCAP_POLAR_NEG = 0,
27 HAL_VCAP_POLAR_POS,
28};
29
30enum hal_vcap_color {
31 HAL_VCAP_YUV = 0,
32 HAL_VCAP_RGB,
33};
34
Terence Hampsona6914ca2012-04-09 14:06:50 -040035struct v4l2_format_vc_ext {
Terence Hampsona6914ca2012-04-09 14:06:50 -040036 enum hal_vcap_mode mode;
37 enum hal_vcap_polar h_polar;
38 enum hal_vcap_polar v_polar;
39 enum hal_vcap_polar d_polar;
40 enum hal_vcap_color color_space;
41
42 float clk_freq;
43 uint32_t vtotal;
44 uint32_t htotal;
45 uint32_t hactive_start;
46 uint32_t hactive_end;
47 uint32_t vactive_start;
48 uint32_t vactive_end;
49 uint32_t vsync_start;
50 uint32_t vsync_end;
51 uint32_t hsync_start;
52 uint32_t hsync_end;
53 uint32_t f2_vactive_start;
54 uint32_t f2_vactive_end;
55 uint32_t f2_vsync_h_start;
56 uint32_t f2_vsync_h_end;
57 uint32_t f2_vsync_v_start;
58 uint32_t f2_vsync_v_end;
Terence Hampson7d5bfbc2012-05-08 13:33:48 -040059 uint32_t sizeimage;
60 uint32_t bytesperline;
61};
62
63enum vcap_type {
64 VC_TYPE,
65 VP_IN_TYPE,
66 VP_OUT_TYPE,
67};
68
69struct vcap_priv_fmt {
70 enum vcap_type type;
71 union {
72 struct v4l2_format_vc_ext timing;
Terence Hampsonaeb793e2012-05-11 11:41:16 -040073 struct v4l2_pix_format pix;
Terence Hampson7d5bfbc2012-05-08 13:33:48 -040074 /* Once VP is created there will be another type in here */
75 } u;
Terence Hampsona6914ca2012-04-09 14:06:50 -040076};
77#endif