1e261b06e5488ec06d407512af9edec6725d6b51
[adaptation/intel_mfld/gst-plugins-atomisp.git] / gst-libs / atomisphal / mfld_driver.h
1 /* Gstreamer MFLD camera source abstract Layer API
2  * Copyright (c) 2010 Intel Corporation
3
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 #ifndef _MFLD_DRIVER_H
20 #define _MFLD_DRIVER_H
21 #include <linux/videodev2.h>
22 #include <sys/ioctl.h>
23 #include "mfld_cam_defs.h"
24
25 #define ON 1
26 #define OFF 0
27
28 #define INDICATOR_INTENSITY 10 /* 10% */
29
30 void cam_err_print (cam_err_t err);
31
32 /* Color effect settings */
33 cam_err_t cam_driver_set_tone_mode (int fd, enum v4l2_colorfx colorfx);
34 cam_err_t cam_driver_get_tone_mode (int fd, int *colorfx);
35
36 /* **********************************************************
37  * Noise Reduction Part
38  * **********************************************************/
39
40 /* Fixed Pattern Noise Reduction */
41 cam_err_t cam_driver_set_fpn (int fd, int on);
42
43 /* Bayer Noise Reduction */
44 cam_err_t cam_driver_set_bnr (int fd, int on);
45
46 /* YNR (Y Noise Reduction), YEE (Y Edge Enhancement) */
47 cam_err_t cam_driver_set_ynr (int fd, int on);
48
49 /* Temporal Noise Reduction */
50 cam_err_t cam_driver_set_tnr (int fd, int on);
51
52 /* Extra Noise Reduction */
53 cam_err_t cam_driver_set_xnr (int fd, int on);
54
55 /* **********************************************************
56  * Advanced Features Part
57  * **********************************************************/
58
59 /* Shading Correction */
60 cam_err_t cam_driver_set_sc (int fd, int on);
61
62 /* Bad Pixel Detection */
63 cam_err_t cam_driver_set_bpd (int fd, int on);
64 cam_err_t cam_driver_get_bpd (int fd, int *on);
65
66 /* False Color Correction, Demosaicing */
67 cam_err_t cam_driver_set_fcc (int fd, int on);
68
69 /* Edge Enhancement, Sharpness */
70 cam_err_t cam_driver_set_ee (int fd, int on);
71
72 /* Black Level Compensation */
73 cam_err_t cam_driver_set_blc (int fd, int on);
74
75 /* Chromatic Aberration Correction */
76 cam_err_t cam_driver_set_cac (int fd, int on);
77
78 /* GDC : Geometry Distortion Correction */
79 cam_err_t cam_driver_set_gdc (int fd, int on);
80
81 /* Exposure Value setting */
82 cam_err_t cam_driver_set_exposure(int fd, unsigned int exposure);
83
84 /* aperture settings */
85 cam_err_t cam_driver_set_aperture(int fd, unsigned int aperture);
86 cam_err_t cam_driver_set_ev_compensation(int fd, unsigned int ev_comp);
87 cam_err_t cam_driver_set_iso_speed(int fd, unsigned int iso_speed);
88 cam_err_t cam_driver_set_focus_posi(int fd, int focus);
89
90 cam_err_t cam_driver_set_zoom(int fd, unsigned int zoom);
91 cam_err_t cam_driver_set_dvs(int fd, int on);
92 cam_err_t cam_driver_set_autoexposure(int fd, enum v4l2_exposure_auto_type expo);
93
94 cam_err_t cam_driver_set_gamma (int fd, float gamma);
95 cam_err_t cam_driver_init_gamma(int fd);
96 cam_err_t cam_driver_get_exposure(int fd, int *exposure);
97 cam_err_t cam_driver_get_iso_speed(int fd, int *iso_speed);
98 cam_err_t cam_driver_get_focus_posi(int fd, int *focus);
99
100 cam_err_t cam_driver_set_contrast (int fd, int contrast, int brightness);
101
102 void cam_driver_dbg(const char *format, ...);
103
104 cam_err_t cam_driver_get_makernote (int fd, unsigned char *buf, unsigned size);
105
106 cam_err_t cam_driver_set_led_flash (int fd, int id, int value);
107 void led_flash_trigger (int fd, int duration, int intensity);
108 void led_flash_off (int fd);
109
110 cam_err_t cam_driver_get_aperture (int fd, int *aperture);
111
112 cam_err_t cam_driver_set_flash_mode(int fd,int mode);
113
114 cam_err_t cam_driver_set_mipi_interrupt(int fd, int enable);
115
116 cam_err_t cam_driver_set_indication_intensity (int fd,int intensity);
117
118
119 #endif /* _MFLD_DRIVER_H */