blob: 0b691f9fcfb31fdd348ef2e345819fecf73ccf02 [file] [log] [blame]
Flemmard50537de2013-05-20 14:28:45 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions
5 * are met:
6 * 1. Redistributions of source code must retain the above copyright
7 * notice, and the entire permission notice in its entirety,
8 * including the disclaimer of warranties.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 3. The name of the author may not be used to endorse or promote
13 * products derived from this software without specific prior
14 * written permission.
15 *
16 * ALTERNATIVELY, this product may be distributed under the terms of
17 * the GNU General Public License, version 2, in which case the provisions
18 * of the GPL version 2 are required INSTEAD OF the BSD license.
19 *
20 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
21 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
23 * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
30 * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
31 * DAMAGE.
32 */
33
34#ifndef __LINUX_RAWCHIP_H
35#define __LINUX_RAWCHIP_H
36
37#include <linux/types.h>
38#include <linux/ioctl.h>
39
40#define RAWCHIP_IOCTL_MAGIC 'g'
41
42#define RAWCHIP_IOCTL_GET_INT \
43 _IOR(RAWCHIP_IOCTL_MAGIC, 1, struct rawchip_stats_event_ctrl *)
44
45#define RAWCHIP_IOCTL_GET_AF_STATUS \
46 _IOR(RAWCHIP_IOCTL_MAGIC, 2, struct rawchip_stats_event_ctrl *)
47
48#define RAWCHIP_IOCTL_UPDATE_AEC_AWB \
49 _IOW(RAWCHIP_IOCTL_MAGIC, 3, struct rawchip_stats_event_ctrl *)
50
51#define RAWCHIP_IOCTL_UPDATE_AF \
52 _IOW(RAWCHIP_IOCTL_MAGIC, 4, struct rawchip_stats_event_ctrl *)
53
54#define RAWCHIP_IOCTL_UPDATE_3A \
55 _IOW(RAWCHIP_IOCTL_MAGIC, 5, struct rawchip_stats_event_ctrl *)
56
57#define RAWCHIP_IOCTL_SET_DXOPRC_AF_STRATEGY \
58 _IOW(RAWCHIP_IOCTL_MAGIC, 6, struct rawchip_stats_event_ctrl *)
59
60#define RAWCHIP_IOCTL_GET_DXOPRC_VER\
61 _IOW(RAWCHIP_IOCTL_MAGIC, 7, struct rawchip_stats_event_ctrl *)
62
63#define RAWCHIP_IOCTL_GET_DXOPRC_FRAMESETTING\
64 _IOW(RAWCHIP_IOCTL_MAGIC, 8, struct rawchip_stats_event_ctrl *)
65
66typedef struct
67{
68 uint8_t orientation;
69 uint16_t xStart;
70 uint16_t yStart;
71 uint16_t xEnd;
72 uint16_t yEnd;
73 uint16_t xEvenInc;
74 uint16_t xOddInc;
75 uint16_t yEvenInc;
76 uint16_t yOddInc;
77 uint8_t binning;
78} rawchip_dxo_frameSetting ;
79
80typedef struct {
81 uint16_t udwDOPUcodeId;
82 uint16_t udwDOPHwId;
83 uint32_t udwDOPCalibId;
84
85 uint16_t udwDPPUcodeId;
86 uint16_t udwDPPHwId;
87 uint32_t udwDPPCalibId;
88
89 uint16_t udwPDPUcodeId;
90 uint16_t udwPDPHwId;
91 uint32_t udwPDPCalibId;
92} rawchip_dxo_version;
93
94struct rawchip_stats_event_ctrl {
95 uint32_t type;
96 uint32_t timeout_ms;
97 uint32_t length;
98 void *data;
99};
100
101#endif
102