aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/dream/include/mach/qdsp5/qdsp5vfemsg.h
blob: 0053cfb65ba18fc0e31a7cbe105c378a82a26347 (plain)
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
#ifndef QDSP5VFEMSGI_H
#define QDSP5VFEMSGI_H

/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*

    V F E   I N T E R N A L   M E S S A G E S

GENERAL DESCRIPTION
  This file contains defintions of format blocks of commands
  that are sent by VFE Task

REFERENCES
  None

EXTERNALIZED FUNCTIONS
  None

Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated.

This software is licensed under the terms of the GNU General Public
License version 2, as published by the Free Software Foundation, and
may be copied, distributed, and modified under those terms.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
/*===========================================================================

                      EDIT HISTORY FOR FILE

This section contains comments describing changes made to this file.
Notice that changes are listed in reverse chronological order.

$Header: //source/qcom/qct/multimedia2/AdspSvc/7XXX/qdsp5cmd/video/qdsp5vfemsg.h#2 $ $DateTime: 2008/07/30 10:50:23 $ $Author: pavanr $
Revision History:

when       who     what, where, why
--------   ---     ----------------------------------------------------------
06/12/08   sv      initial version
===========================================================================*/


/*
 * Message to acknowledge CMD_VFE_REST command
 */

#define	VFE_MSG_RESET_ACK	0x0000
#define	VFE_MSG_RESET_ACK_LEN	sizeof(vfe_msg_reset_ack)

typedef struct {
} __attribute__((packed)) vfe_msg_reset_ack;


/*
 * Message to acknowledge CMD_VFE_START command
 */

#define	VFE_MSG_START_ACK	0x0001
#define	VFE_MSG_START_ACK_LEN	sizeof(vfe_msg_start_ack)

typedef struct {
} __attribute__((packed)) vfe_msg_start_ack;

/*
 * Message to acknowledge CMD_VFE_STOP	command
 */

#define	VFE_MSG_STOP_ACK	0x0002
#define	VFE_MSG_STOP_ACK_LEN	sizeof(vfe_msg_stop_ack)

typedef struct {
} __attribute__((packed)) vfe_msg_stop_ack;


/*
 * Message to acknowledge CMD_VFE_UPDATE command
 */

#define	VFE_MSG_UPDATE_ACK	0x0003
#define	VFE_MSG_UPDATE_ACK_LEN	sizeof(vfe_msg_update_ack)

typedef struct {
} __attribute__((packed)) vfe_msg_update_ack;


/*
 * Message to notify the ARM that snapshot processing is complete
 * and that the VFE is now STATE_VFE_IDLE
 */

#define	VFE_MSG_SNAPSHOT_DONE		0x0004
#define	VFE_MSG_SNAPSHOT_DONE_LEN	\
	sizeof(vfe_msg_snapshot_done)

typedef struct {
} __attribute__((packed)) vfe_msg_snapshot_done;



/*
 * Message to notify ARM that illegal cmd was received and
 * system is in the IDLE state
 */

#define	VFE_MSG_ILLEGAL_CMD	0x0005
#define	VFE_MSG_ILLEGAL_CMD_LEN	\
	sizeof(vfe_msg_illegal_cmd)

typedef struct {
	unsigned int	status;
} __attribute__((packed)) vfe_msg_illegal_cmd;


/*
 * Message to notify ARM that op1 buf is full and ready
 */

#define	VFE_MSG_OP1		0x0006
#define	VFE_MSG_OP1_LEN		sizeof(vfe_msg_op1)

typedef struct {
	unsigned int	op1_buf_y_addr;
	unsigned int	op1_buf_cbcr_addr;
	unsigned int	black_level_even_col;
	unsigned int	black_level_odd_col;
	unsigned int	defect_pixels_detected;
	unsigned int	asf_max_edge;
} __attribute__((packed)) vfe_msg_op1;


/*
 * Message to notify ARM that op2 buf is full and ready
 */

#define	VFE_MSG_OP2		0x0007
#define	VFE_MSG_OP2_LEN		sizeof(vfe_msg_op2)

typedef struct {
	unsigned int	op2_buf_y_addr;
	unsigned int	op2_buf_cbcr_addr;
	unsigned int	black_level_even_col;
	unsigned int	black_level_odd_col;
	unsigned int	defect_pixels_detected;
	unsigned int	asf_max_edge;
} __attribute__((packed)) vfe_msg_op2;


/*
 * Message to notify ARM that autofocus(af) stats are ready
 */

#define	VFE_MSG_STATS_AF	0x0008
#define	VFE_MSG_STATS_AF_LEN	sizeof(vfe_msg_stats_af)

typedef struct {
	unsigned int	af_stats_op_buffer;
} __attribute__((packed)) vfe_msg_stats_af;


/*
 * Message to notify ARM that white balance(wb) and exposure (exp)
 * stats are ready
 */

#define	VFE_MSG_STATS_WB_EXP		0x0009
#define	VFE_MSG_STATS_WB_EXP_LEN	\
	sizeof(vfe_msg_stats_wb_exp)

typedef struct {
	unsigned int	wb_exp_stats_op_buf;
} __attribute__((packed)) vfe_msg_stats_wb_exp;


/*
 * Message to notify the ARM that histogram(hg) stats are ready
 */

#define	VFE_MSG_STATS_HG	0x000A
#define	VFE_MSG_STATS_HG_LEN	sizeof(vfe_msg_stats_hg)

typedef struct {
	unsigned int	hg_stats_op_buf;
} __attribute__((packed)) vfe_msg_stats_hg;


/*
 * Message to notify the ARM that epoch1 event occurred in the CAMIF
 */

#define	VFE_MSG_EPOCH1		0x000B
#define	VFE_MSG_EPOCH1_LEN	sizeof(vfe_msg_epoch1)

typedef struct {
} __attribute__((packed)) vfe_msg_epoch1;


/*
 * Message to notify the ARM that epoch2 event occurred in the CAMIF
 */

#define	VFE_MSG_EPOCH2		0x000C
#define	VFE_MSG_EPOCH2_LEN	sizeof(vfe_msg_epoch2)

typedef struct {
} __attribute__((packed)) vfe_msg_epoch2;


/*
 * Message to notify the ARM that sync timer1 op is completed
 */

#define	VFE_MSG_SYNC_T1_DONE		0x000D
#define	VFE_MSG_SYNC_T1_DONE_LEN	sizeof(vfe_msg_sync_t1_done)

typedef struct {
} __attribute__((packed)) vfe_msg_sync_t1_done;


/*
 * Message to notify the ARM that sync timer2 op is completed
 */

#define	VFE_MSG_SYNC_T2_DONE		0x000E
#define	VFE_MSG_SYNC_T2_DONE_LEN	sizeof(vfe_msg_sync_t2_done)

typedef struct {
} __attribute__((packed)) vfe_msg_sync_t2_done;


/*
 * Message to notify the ARM that async t1 operation completed
 */

#define	VFE_MSG_ASYNC_T1_DONE		0x000F
#define	VFE_MSG_ASYNC_T1_DONE_LEN	sizeof(vfe_msg_async_t1_done)

typedef struct {
} __attribute__((packed)) vfe_msg_async_t1_done;



/*
 * Message to notify the ARM that async t2 operation completed
 */

#define	VFE_MSG_ASYNC_T2_DONE		0x0010
#define	VFE_MSG_ASYNC_T2_DONE_LEN	sizeof(vfe_msg_async_t2_done)

typedef struct {
} __attribute__((packed)) vfe_msg_async_t2_done;



/*
 * Message to notify the ARM that an error has occurred
 */

#define	VFE_MSG_ERROR		0x0011
#define	VFE_MSG_ERROR_LEN	sizeof(vfe_msg_error)

#define	VFE_MSG_ERR_COND_NO_CAMIF_ERR		0x0000
#define	VFE_MSG_ERR_COND_CAMIF_ERR		0x0001
#define	VFE_MSG_ERR_COND_OP1_Y_NO_BUS_OF	0x0000
#define	VFE_MSG_ERR_COND_OP1_Y_BUS_OF		0x0002
#define	VFE_MSG_ERR_COND_OP1_CBCR_NO_BUS_OF	0x0000
#define	VFE_MSG_ERR_COND_OP1_CBCR_BUS_OF	0x0004
#define	VFE_MSG_ERR_COND_OP2_Y_NO_BUS_OF	0x0000
#define	VFE_MSG_ERR_COND_OP2_Y_BUS_OF		0x0008
#define	VFE_MSG_ERR_COND_OP2_CBCR_NO_BUS_OF	0x0000
#define	VFE_MSG_ERR_COND_OP2_CBCR_BUS_OF	0x0010
#define	VFE_MSG_ERR_COND_AF_NO_BUS_OF		0x0000
#define	VFE_MSG_ERR_COND_AF_BUS_OF		0x0020
#define	VFE_MSG_ERR_COND_WB_EXP_NO_BUS_OF	0x0000
#define	VFE_MSG_ERR_COND_WB_EXP_BUS_OF		0x0040
#define	VFE_MSG_ERR_COND_NO_AXI_ERR		0x0000
#define	VFE_MSG_ERR_COND_AXI_ERR		0x0080

#define	VFE_MSG_CAMIF_STS_IDLE			0x0000
#define	VFE_MSG_CAMIF_STS_CAPTURE_DATA		0x0001

typedef struct {
	unsigned int	err_cond;
	unsigned int	camif_sts;
} __attribute__((packed)) vfe_msg_error;


#endif