1 /* Gstreamer MFLD camera source abstract Layer API
2 * Copyright (c) 2010 Intel Corporation
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.
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.
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.
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"
28 #define INDICATOR_INTENSITY 10 /* 10% */
30 void cam_err_print (cam_err_t err);
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);
36 /* **********************************************************
37 * Noise Reduction Part
38 * **********************************************************/
40 /* Fixed Pattern Noise Reduction */
41 cam_err_t cam_driver_set_fpn (int fd, int on);
43 /* Bayer Noise Reduction */
44 cam_err_t cam_driver_set_bnr (int fd, int on);
46 /* YNR (Y Noise Reduction), YEE (Y Edge Enhancement) */
47 cam_err_t cam_driver_set_ynr (int fd, int on);
49 /* Temporal Noise Reduction */
50 cam_err_t cam_driver_set_tnr (int fd, int on);
52 /* Extra Noise Reduction */
53 cam_err_t cam_driver_set_xnr (int fd, int on);
55 /* **********************************************************
56 * Advanced Features Part
57 * **********************************************************/
59 /* Shading Correction */
60 cam_err_t cam_driver_set_sc (int fd, int on);
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);
66 /* False Color Correction, Demosaicing */
67 cam_err_t cam_driver_set_fcc (int fd, int on);
69 /* Edge Enhancement, Sharpness */
70 cam_err_t cam_driver_set_ee (int fd, int on);
72 /* Black Level Compensation */
73 cam_err_t cam_driver_set_blc (int fd, int on);
75 /* Chromatic Aberration Correction */
76 cam_err_t cam_driver_set_cac (int fd, int on);
78 /* GDC : Geometry Distortion Correction */
79 cam_err_t cam_driver_set_gdc (int fd, int on);
81 /* Exposure Value setting */
82 cam_err_t cam_driver_set_exposure(int fd, unsigned int exposure);
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);
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);
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);
100 cam_err_t cam_driver_set_contrast (int fd, int contrast, int brightness);
102 void cam_driver_dbg(const char *format, ...);
104 cam_err_t cam_driver_get_makernote (int fd, unsigned char *buf, unsigned size);
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);
110 cam_err_t cam_driver_get_aperture (int fd, int *aperture);
112 cam_err_t cam_driver_set_flash_mode(int fd,int mode);
114 cam_err_t cam_driver_set_mipi_interrupt(int fd, int enable);
116 cam_err_t cam_driver_set_indication_intensity (int fd,int intensity);
119 #endif /* _MFLD_DRIVER_H */