-
Notifications
You must be signed in to change notification settings - Fork 0
/
vc088x_cif_drv.h
173 lines (143 loc) · 5.97 KB
/
vc088x_cif_drv.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#ifndef _VC088X_CIF_DRV_H_
#define _VC088X_CIF_DRV_H_
/****************************************************************************************************/
#include <linux/ioctl.h>
/****************************************************************************************************/
#define SNR_ITEM_NUM 5
/****************************************************************************************************/
typedef enum _CAM_CAP_MODE
{
CAP_NORMAL = 0,
CAP_TRIGER,
CAP_WAITDONE
}CAM_CAP_MODE;
typedef struct _v8cif_snr_info_
{
UINT32 totalItems;
UINT32 type;
UINT32 jpegSupported;
UINT32 width[SNR_ITEM_NUM];
UINT32 height[SNR_ITEM_NUM];
} V8CIFSNRINFO, *PV8CIFSNRINFO;
typedef struct _v8cif_path_info_
{
UINT32 dst_type;
UINT32 dst_width;
UINT32 dst_height;
UINT32 dst_addr[3];
} V8CIFPATHINFO, *PV8CIFPATHINFO;
typedef struct _v8cif_frame_info_
{
UINT32 dst_addr_y;
UINT32 dst_addr_uv;
CAM_CAP_MODE cap_mode;
} V8CIFFRMINFO, *PV8CIFFRMINFO;
struct vtools_reg {
unsigned int addr;
unsigned int value;
};
/****************************************************************************************************/
#define V8CIF_IOC_MAGIC 'c'
/*--------------------------------------------------------------------------
power on the front or back sensor according to the parameter
0: Main(Back) sensor
1: Front sensor
--------------------------------------------------------------------------*/
#define V8CIF_SNR_PWRON _IOR( V8CIF_IOC_MAGIC, 1, UINT32 )
/*--------------------------------------------------------------------------
Get the current sensor's info, such as yuv type, jpeg supported,
item num and size from kernel to hal of android. So the android
could select and set the right item of sensor according to the
application.
--------------------------------------------------------------------------*/
#define V8CIF_SNR_GETINFO _IOR( V8CIF_IOC_MAGIC, 2, V8CIFSNRINFO )
/*--------------------------------------------------------------------------
Config the current sensor's right item according to the parameter.
--------------------------------------------------------------------------*/
#define V8CIF_SNR_CFG _IOR( V8CIF_IOC_MAGIC, 3, UINT32 )
/*--------------------------------------------------------------------------
power down the front or back sensor according to the parameter
0: Main(Back) sensor
1: Front sensor
--------------------------------------------------------------------------*/
#define V8CIF_SNR_PWRDOWN _IOR( V8CIF_IOC_MAGIC, 4, UINT32 )
/*--------------------------------------------------------------------------
Config the cif's preview path according to the parameter.
--------------------------------------------------------------------------*/
#define V8CIF_PREPATH_CFG _IOR( V8CIF_IOC_MAGIC, 5, V8CIFPATHINFO )
/*--------------------------------------------------------------------------
Config the cif's capture path according to the parameter.
--------------------------------------------------------------------------*/
#define V8CIF_CAPPATH_CFG _IOR( V8CIF_IOC_MAGIC, 6, V8CIFPATHINFO )
/*--------------------------------------------------------------------------
Get one frame on the preview path.
--------------------------------------------------------------------------*/
#define V8CIF_PREPATH_GETFRM _IOR( V8CIF_IOC_MAGIC, 7, V8CIFFRMINFO )
/*--------------------------------------------------------------------------
Get one frame on the capture path.
--------------------------------------------------------------------------*/
#define V8CIF_CAPPATH_GETFRM _IOR( V8CIF_IOC_MAGIC, 8, V8CIFFRMINFO )
/*--------------------------------------------------------------------------
Set the preview path special effect.
input:
mode: 0 -- bypass
1 -- specia effect
2 -- special color
3 -- negative
4 -- mono color
5 -- four block
6 -- grid color
7 -- embossing
8 -- selhouette
9 -- pencil draw
10 -- binary effect
--------------------------------------------------------------------------*/
#define V8CIF_PREPATH_SETSE _IOR( V8CIF_IOC_MAGIC, 9, UINT32 )
/*--------------------------------------------------------------------------
Set the capture path special effect.
input:
mode: 0 -- bypass
1 -- specia effect
2 -- special color
3 -- negative
4 -- mono color
5 -- four block
6 -- grid color
7 -- embossing
8 -- selhouette
9 -- pencil draw
10 -- binary effect
--------------------------------------------------------------------------*/
#define V8CIF_CAPPATH_SETSE _IOR( V8CIF_IOC_MAGIC, 10, UINT32 )
/*--------------------------------------------------------------------------
Set the both cap and pre path special effect.
input:
mode: 0 -- bypass
1 -- specia effect
2 -- special color
3 -- negative
4 -- mono color
5 -- four block
6 -- grid color
7 -- embossing
8 -- selhouette
9 -- pencil draw
10 -- binary effect
--------------------------------------------------------------------------*/
#define V8CIF_BOTHPATH_SETSE _IOR( V8CIF_IOC_MAGIC, 11, UINT32 )
/*--------------------------------------------------------------------------
Set both preview and capture path zoom step.
--------------------------------------------------------------------------*/
#define V8CIF_SETZOOM _IOR( V8CIF_IOC_MAGIC, 12, UINT32 )
/*--------------------------------------------------------------------------
Set preview stop.
--------------------------------------------------------------------------*/
#define V8CIF_SETPREVIEWSTOP _IOR( V8CIF_IOC_MAGIC, 13, UINT32 )
#define V8CIF_RECORD_GETFRM _IOR( V8CIF_IOC_MAGIC, 14, V8CIFFRMINFO )
#define V8CIF_REG_RD _IOR( V8CIF_IOC_MAGIC, 55, struct vtools_reg )
#define V8CIF_REG_WR _IOW( V8CIF_IOC_MAGIC, 56, struct vtools_reg )
#define V8CIF_SNR_REG_RD _IOR( V8CIF_IOC_MAGIC, 57, struct vtools_reg )
#define V8CIF_SNR_REG_WR _IOW( V8CIF_IOC_MAGIC, 58, struct vtools_reg )
#define V8CIF_IOC_MAXNR 60
/****************************************************************************************************/
#endif // _VC088X_CIF_DRV_H_