| Terence Hampson | a6914ca | 2012-04-09 14:06:50 -0400 | [diff] [blame] | 1 | /* 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 Hampson | 7d5bfbc | 2012-05-08 13:33:48 -0400 | [diff] [blame] | 17 | #define V4L2_BUF_TYPE_INTERLACED_IN_DECODER (V4L2_BUF_TYPE_PRIVATE) |
| 18 | #define V4L2_BUF_TYPE_VP_OUT (V4L2_BUF_TYPE_PRIVATE + 1) |
| Terence Hampson | a6914ca | 2012-04-09 14:06:50 -0400 | [diff] [blame] | 19 | |
| 20 | enum hal_vcap_mode { |
| 21 | HAL_VCAP_MODE_PRO = 0, |
| 22 | HAL_VCAP_MODE_INT, |
| 23 | }; |
| 24 | |
| 25 | enum hal_vcap_polar { |
| 26 | HAL_VCAP_POLAR_NEG = 0, |
| 27 | HAL_VCAP_POLAR_POS, |
| 28 | }; |
| 29 | |
| 30 | enum hal_vcap_color { |
| 31 | HAL_VCAP_YUV = 0, |
| 32 | HAL_VCAP_RGB, |
| 33 | }; |
| 34 | |
| Terence Hampson | a6914ca | 2012-04-09 14:06:50 -0400 | [diff] [blame] | 35 | struct v4l2_format_vc_ext { |
| Terence Hampson | a6914ca | 2012-04-09 14:06:50 -0400 | [diff] [blame] | 36 | 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 Hampson | 7d5bfbc | 2012-05-08 13:33:48 -0400 | [diff] [blame] | 59 | uint32_t sizeimage; |
| 60 | uint32_t bytesperline; |
| 61 | }; |
| 62 | |
| 63 | enum vcap_type { |
| 64 | VC_TYPE, |
| 65 | VP_IN_TYPE, |
| 66 | VP_OUT_TYPE, |
| 67 | }; |
| 68 | |
| 69 | struct vcap_priv_fmt { |
| 70 | enum vcap_type type; |
| 71 | union { |
| 72 | struct v4l2_format_vc_ext timing; |
| Terence Hampson | aeb793e | 2012-05-11 11:41:16 -0400 | [diff] [blame] | 73 | struct v4l2_pix_format pix; |
| Terence Hampson | 7d5bfbc | 2012-05-08 13:33:48 -0400 | [diff] [blame] | 74 | /* Once VP is created there will be another type in here */ |
| 75 | } u; |
| Terence Hampson | a6914ca | 2012-04-09 14:06:50 -0400 | [diff] [blame] | 76 | }; |
| 77 | #endif |