1 /* Copyright (c) 2012-2015, The Linux Foundation. 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 are
5  * met:
6  *     * Redistributions of source code must retain the above copyright
7  *       notice, this list of conditions and the following disclaimer.
8  *     * Redistributions in binary form must reproduce the above
9  *       copyright notice, this list of conditions and the following
10  *       disclaimer in the documentation and/or other materials provided
11  *       with the distribution.
12  *     * Neither the name of The Linux Foundation nor the names of its
13  *       contributors may be used to endorse or promote products derived
14  *       from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  */
29 
30 #include "cam_intf.h"
31 
get_pointer_of(cam_intf_parm_type_t meta_id,const metadata_buffer_t * metadata)32 void *get_pointer_of(cam_intf_parm_type_t meta_id,
33         const metadata_buffer_t* metadata)
34 {
35     switch(meta_id) {
36         case CAM_INTF_META_HISTOGRAM:
37             return POINTER_OF_META(CAM_INTF_META_HISTOGRAM, metadata);
38         case CAM_INTF_META_FACE_DETECTION:
39             return POINTER_OF_META(CAM_INTF_META_FACE_DETECTION, metadata);
40         case CAM_INTF_META_AUTOFOCUS_DATA:
41             return POINTER_OF_META(CAM_INTF_META_AUTOFOCUS_DATA, metadata);
42         case CAM_INTF_PARM_UPDATE_DEBUG_LEVEL:
43             return POINTER_OF_META(CAM_INTF_PARM_UPDATE_DEBUG_LEVEL, metadata);
44         case CAM_INTF_META_CROP_DATA:
45             return POINTER_OF_META(CAM_INTF_META_CROP_DATA, metadata);
46         case CAM_INTF_META_PREP_SNAPSHOT_DONE:
47             return POINTER_OF_META(CAM_INTF_META_PREP_SNAPSHOT_DONE, metadata);
48         case CAM_INTF_META_GOOD_FRAME_IDX_RANGE:
49             return POINTER_OF_META(CAM_INTF_META_GOOD_FRAME_IDX_RANGE, metadata);
50         case CAM_INTF_META_ASD_HDR_SCENE_DATA:
51             return POINTER_OF_META(CAM_INTF_META_ASD_HDR_SCENE_DATA, metadata);
52         case CAM_INTF_META_ASD_SCENE_TYPE:
53             return POINTER_OF_META(CAM_INTF_META_ASD_SCENE_TYPE, metadata);
54         case CAM_INTF_META_CHROMATIX_LITE_ISP:
55             return POINTER_OF_META(CAM_INTF_META_CHROMATIX_LITE_ISP, metadata);
56         case CAM_INTF_META_CHROMATIX_LITE_PP:
57             return POINTER_OF_META(CAM_INTF_META_CHROMATIX_LITE_PP, metadata);
58         case CAM_INTF_META_CHROMATIX_LITE_AE:
59             return POINTER_OF_META(CAM_INTF_META_CHROMATIX_LITE_AE, metadata);
60         case CAM_INTF_META_CHROMATIX_LITE_AWB:
61             return POINTER_OF_META(CAM_INTF_META_CHROMATIX_LITE_AWB, metadata);
62         case CAM_INTF_META_CHROMATIX_LITE_AF:
63             return POINTER_OF_META(CAM_INTF_META_CHROMATIX_LITE_AF, metadata);
64         case CAM_INTF_META_CHROMATIX_LITE_ASD:
65             return POINTER_OF_META(CAM_INTF_META_CHROMATIX_LITE_ASD, metadata);
66         case CAM_INTF_BUF_DIVERT_INFO:
67             return POINTER_OF_META(CAM_INTF_BUF_DIVERT_INFO, metadata);
68         case CAM_INTF_META_FRAME_NUMBER_VALID:
69             return POINTER_OF_META(CAM_INTF_META_FRAME_NUMBER_VALID, metadata);
70         case CAM_INTF_META_URGENT_FRAME_NUMBER_VALID:
71             return POINTER_OF_META(CAM_INTF_META_URGENT_FRAME_NUMBER_VALID, metadata);
72         case CAM_INTF_META_FRAME_DROPPED:
73             return POINTER_OF_META(CAM_INTF_META_FRAME_DROPPED, metadata);
74         case CAM_INTF_META_FRAME_NUMBER:
75             return POINTER_OF_META(CAM_INTF_META_FRAME_NUMBER, metadata);
76         case CAM_INTF_META_URGENT_FRAME_NUMBER:
77             return POINTER_OF_META(CAM_INTF_META_URGENT_FRAME_NUMBER, metadata);
78         case CAM_INTF_META_COLOR_CORRECT_MODE:
79             return POINTER_OF_META(CAM_INTF_META_COLOR_CORRECT_MODE, metadata);
80         case CAM_INTF_META_COLOR_CORRECT_TRANSFORM:
81             return POINTER_OF_META(CAM_INTF_META_COLOR_CORRECT_TRANSFORM, metadata);
82         case CAM_INTF_META_COLOR_CORRECT_GAINS:
83             return POINTER_OF_META(CAM_INTF_META_COLOR_CORRECT_GAINS, metadata);
84         case CAM_INTF_META_PRED_COLOR_CORRECT_TRANSFORM:
85             return POINTER_OF_META(CAM_INTF_META_PRED_COLOR_CORRECT_TRANSFORM, metadata);
86         case CAM_INTF_META_PRED_COLOR_CORRECT_GAINS:
87             return POINTER_OF_META(CAM_INTF_META_PRED_COLOR_CORRECT_GAINS, metadata);
88         case CAM_INTF_META_AEC_ROI:
89             return POINTER_OF_META(CAM_INTF_META_AEC_ROI, metadata);
90         case CAM_INTF_META_AEC_STATE:
91             return POINTER_OF_META(CAM_INTF_META_AEC_STATE, metadata);
92         case CAM_INTF_PARM_FOCUS_MODE:
93             return POINTER_OF_META(CAM_INTF_PARM_FOCUS_MODE, metadata);
94         case CAM_INTF_PARM_MANUAL_FOCUS_POS:
95             return POINTER_OF_META(CAM_INTF_PARM_MANUAL_FOCUS_POS, metadata);
96         case CAM_INTF_META_AF_ROI:
97             return POINTER_OF_META(CAM_INTF_META_AF_ROI, metadata);
98         case CAM_INTF_META_AF_STATE:
99             return POINTER_OF_META(CAM_INTF_META_AF_STATE, metadata);
100         case CAM_INTF_PARM_WHITE_BALANCE:
101             return POINTER_OF_META(CAM_INTF_PARM_WHITE_BALANCE, metadata);
102         case CAM_INTF_META_AWB_REGIONS:
103             return POINTER_OF_META(CAM_INTF_META_AWB_REGIONS, metadata);
104         case CAM_INTF_META_AWB_STATE:
105             return POINTER_OF_META(CAM_INTF_META_AWB_STATE, metadata);
106         case CAM_INTF_META_BLACK_LEVEL_LOCK:
107             return POINTER_OF_META(CAM_INTF_META_BLACK_LEVEL_LOCK, metadata);
108         case CAM_INTF_META_MODE:
109             return POINTER_OF_META(CAM_INTF_META_MODE, metadata);
110         case CAM_INTF_META_EDGE_MODE:
111             return POINTER_OF_META(CAM_INTF_META_EDGE_MODE, metadata);
112         case CAM_INTF_META_FLASH_POWER:
113             return POINTER_OF_META(CAM_INTF_META_FLASH_POWER, metadata);
114         case CAM_INTF_META_FLASH_FIRING_TIME:
115             return POINTER_OF_META(CAM_INTF_META_FLASH_FIRING_TIME, metadata);
116         case CAM_INTF_META_FLASH_MODE:
117             return POINTER_OF_META(CAM_INTF_META_FLASH_MODE, metadata);
118         case CAM_INTF_META_FLASH_STATE:
119             return POINTER_OF_META(CAM_INTF_META_FLASH_STATE, metadata);
120         case CAM_INTF_META_HOTPIXEL_MODE:
121             return POINTER_OF_META(CAM_INTF_META_HOTPIXEL_MODE, metadata);
122         case CAM_INTF_META_LENS_APERTURE:
123             return POINTER_OF_META(CAM_INTF_META_LENS_APERTURE, metadata);
124         case CAM_INTF_META_LENS_FILTERDENSITY:
125             return POINTER_OF_META(CAM_INTF_META_LENS_FILTERDENSITY, metadata);
126         case CAM_INTF_META_LENS_FOCAL_LENGTH:
127             return POINTER_OF_META(CAM_INTF_META_LENS_FOCAL_LENGTH, metadata);
128         case CAM_INTF_META_LENS_FOCUS_DISTANCE:
129             return POINTER_OF_META(CAM_INTF_META_LENS_FOCUS_DISTANCE, metadata);
130         case CAM_INTF_META_LENS_FOCUS_RANGE:
131             return POINTER_OF_META(CAM_INTF_META_LENS_FOCUS_RANGE, metadata);
132         case CAM_INTF_META_LENS_STATE:
133             return POINTER_OF_META(CAM_INTF_META_LENS_STATE, metadata);
134         case CAM_INTF_META_LENS_OPT_STAB_MODE:
135             return POINTER_OF_META(CAM_INTF_META_LENS_OPT_STAB_MODE, metadata);
136         case CAM_INTF_META_VIDEO_STAB_MODE:
137             return POINTER_OF_META(CAM_INTF_META_VIDEO_STAB_MODE, metadata);
138         case CAM_INTF_META_NOISE_REDUCTION_MODE:
139             return POINTER_OF_META(CAM_INTF_META_NOISE_REDUCTION_MODE, metadata);
140         case CAM_INTF_META_NOISE_REDUCTION_STRENGTH:
141             return POINTER_OF_META(CAM_INTF_META_NOISE_REDUCTION_STRENGTH, metadata);
142         case CAM_INTF_META_EFFECTIVE_EXPOSURE_FACTOR:
143             return POINTER_OF_META(CAM_INTF_META_EFFECTIVE_EXPOSURE_FACTOR, metadata);
144         case CAM_INTF_META_SCALER_CROP_REGION:
145             return POINTER_OF_META(CAM_INTF_META_SCALER_CROP_REGION, metadata);
146         case CAM_INTF_META_SCENE_FLICKER:
147             return POINTER_OF_META(CAM_INTF_META_SCENE_FLICKER, metadata);
148         case CAM_INTF_META_SENSOR_EXPOSURE_TIME:
149             return POINTER_OF_META(CAM_INTF_META_SENSOR_EXPOSURE_TIME, metadata);
150         case CAM_INTF_META_SENSOR_FRAME_DURATION:
151             return POINTER_OF_META(CAM_INTF_META_SENSOR_FRAME_DURATION, metadata);
152         case CAM_INTF_META_SENSOR_SENSITIVITY:
153             return POINTER_OF_META(CAM_INTF_META_SENSOR_SENSITIVITY, metadata);
154         case CAM_INTF_META_SENSOR_TIMESTAMP:
155             return POINTER_OF_META(CAM_INTF_META_SENSOR_TIMESTAMP, metadata);
156         case CAM_INTF_META_SENSOR_ROLLING_SHUTTER_SKEW:
157             return POINTER_OF_META(CAM_INTF_META_SENSOR_ROLLING_SHUTTER_SKEW, metadata);
158         case CAM_INTF_META_SHADING_MODE:
159             return POINTER_OF_META(CAM_INTF_META_SHADING_MODE, metadata);
160         case CAM_INTF_META_STATS_FACEDETECT_MODE:
161             return POINTER_OF_META(CAM_INTF_META_STATS_FACEDETECT_MODE, metadata);
162         case CAM_INTF_META_STATS_HISTOGRAM_MODE:
163             return POINTER_OF_META(CAM_INTF_META_STATS_HISTOGRAM_MODE, metadata);
164         case CAM_INTF_META_STATS_SHARPNESS_MAP_MODE:
165             return POINTER_OF_META(CAM_INTF_META_STATS_SHARPNESS_MAP_MODE, metadata);
166         case CAM_INTF_META_STATS_SHARPNESS_MAP:
167             return POINTER_OF_META(CAM_INTF_META_STATS_SHARPNESS_MAP, metadata);
168         case CAM_INTF_META_TONEMAP_CURVES:
169             return POINTER_OF_META(CAM_INTF_META_TONEMAP_CURVES, metadata);
170         case CAM_INTF_META_LENS_SHADING_MAP:
171             return POINTER_OF_META(CAM_INTF_META_LENS_SHADING_MAP, metadata);
172         case CAM_INTF_META_AEC_INFO:
173             return POINTER_OF_META(CAM_INTF_META_AEC_INFO, metadata);
174         case CAM_INTF_META_SENSOR_INFO:
175             return POINTER_OF_META(CAM_INTF_META_SENSOR_INFO, metadata);
176         case CAM_INTF_META_ASD_SCENE_CAPTURE_TYPE:
177             return POINTER_OF_META(CAM_INTF_META_ASD_SCENE_CAPTURE_TYPE, metadata);
178         case CAM_INTF_PARM_EFFECT:
179             return POINTER_OF_META(CAM_INTF_PARM_EFFECT, metadata);
180         case CAM_INTF_META_PRIVATE_DATA:
181             return POINTER_OF_META(CAM_INTF_META_PRIVATE_DATA, metadata);
182         case CAM_INTF_PARM_HAL_VERSION:
183             return POINTER_OF_META(CAM_INTF_PARM_HAL_VERSION, metadata);
184         case CAM_INTF_PARM_ANTIBANDING:
185             return POINTER_OF_META(CAM_INTF_PARM_ANTIBANDING, metadata);
186         case CAM_INTF_PARM_EXPOSURE_COMPENSATION:
187             return POINTER_OF_META(CAM_INTF_PARM_EXPOSURE_COMPENSATION, metadata);
188         case CAM_INTF_PARM_EV_STEP:
189             return POINTER_OF_META(CAM_INTF_PARM_EV_STEP, metadata);
190         case CAM_INTF_PARM_AEC_LOCK:
191             return POINTER_OF_META(CAM_INTF_PARM_AEC_LOCK, metadata);
192         case CAM_INTF_PARM_FPS_RANGE:
193             return POINTER_OF_META(CAM_INTF_PARM_FPS_RANGE, metadata);
194         case CAM_INTF_PARM_AWB_LOCK:
195             return POINTER_OF_META(CAM_INTF_PARM_AWB_LOCK, metadata);
196         case CAM_INTF_PARM_BESTSHOT_MODE:
197             return POINTER_OF_META(CAM_INTF_PARM_BESTSHOT_MODE, metadata);
198         case CAM_INTF_PARM_DIS_ENABLE:
199             return POINTER_OF_META(CAM_INTF_PARM_DIS_ENABLE, metadata);
200         case CAM_INTF_PARM_LED_MODE:
201             return POINTER_OF_META(CAM_INTF_PARM_LED_MODE, metadata);
202         case CAM_INTF_META_LED_MODE_OVERRIDE:
203             return POINTER_OF_META(CAM_INTF_META_LED_MODE_OVERRIDE, metadata);
204         case CAM_INTF_PARM_QUERY_FLASH4SNAP:
205             return POINTER_OF_META(CAM_INTF_PARM_QUERY_FLASH4SNAP, metadata);
206         case CAM_INTF_PARM_EXPOSURE:
207             return POINTER_OF_META(CAM_INTF_PARM_EXPOSURE, metadata);
208         case CAM_INTF_PARM_SHARPNESS:
209             return POINTER_OF_META(CAM_INTF_PARM_SHARPNESS, metadata);
210         case CAM_INTF_PARM_CONTRAST:
211             return POINTER_OF_META(CAM_INTF_PARM_CONTRAST, metadata);
212         case CAM_INTF_PARM_SATURATION:
213             return POINTER_OF_META(CAM_INTF_PARM_SATURATION, metadata);
214         case CAM_INTF_PARM_BRIGHTNESS:
215             return POINTER_OF_META(CAM_INTF_PARM_BRIGHTNESS, metadata);
216         case CAM_INTF_PARM_ISO:
217             return POINTER_OF_META(CAM_INTF_PARM_ISO, metadata);
218         case CAM_INTF_PARM_EXPOSURE_TIME:
219             return POINTER_OF_META(CAM_INTF_PARM_EXPOSURE_TIME, metadata);
220         case CAM_INTF_PARM_ZOOM:
221             return POINTER_OF_META(CAM_INTF_PARM_ZOOM, metadata);
222         case CAM_INTF_PARM_ROLLOFF:
223             return POINTER_OF_META(CAM_INTF_PARM_ROLLOFF, metadata);
224         case CAM_INTF_PARM_MODE:
225             return POINTER_OF_META(CAM_INTF_PARM_MODE, metadata);
226         case CAM_INTF_PARM_AEC_ALGO_TYPE:
227             return POINTER_OF_META(CAM_INTF_PARM_AEC_ALGO_TYPE, metadata);
228         case CAM_INTF_PARM_FOCUS_ALGO_TYPE:
229             return POINTER_OF_META(CAM_INTF_PARM_FOCUS_ALGO_TYPE, metadata);
230         case CAM_INTF_PARM_AEC_ROI:
231             return POINTER_OF_META(CAM_INTF_PARM_AEC_ROI, metadata);
232         case CAM_INTF_PARM_AF_ROI:
233             return POINTER_OF_META(CAM_INTF_PARM_AF_ROI, metadata);
234         case CAM_INTF_PARM_SCE_FACTOR:
235             return POINTER_OF_META(CAM_INTF_PARM_SCE_FACTOR, metadata);
236         case CAM_INTF_PARM_FD:
237             return POINTER_OF_META(CAM_INTF_PARM_FD, metadata);
238         case CAM_INTF_PARM_MCE:
239             return POINTER_OF_META(CAM_INTF_PARM_MCE, metadata);
240         case CAM_INTF_PARM_HFR:
241             return POINTER_OF_META(CAM_INTF_PARM_HFR, metadata);
242         case CAM_INTF_PARM_REDEYE_REDUCTION:
243             return POINTER_OF_META(CAM_INTF_PARM_REDEYE_REDUCTION, metadata);
244         case CAM_INTF_PARM_WAVELET_DENOISE:
245             return POINTER_OF_META(CAM_INTF_PARM_WAVELET_DENOISE, metadata);
246         case CAM_INTF_PARM_TEMPORAL_DENOISE:
247             return POINTER_OF_META(CAM_INTF_PARM_TEMPORAL_DENOISE, metadata);
248         case CAM_INTF_PARM_HISTOGRAM:
249             return POINTER_OF_META(CAM_INTF_PARM_HISTOGRAM, metadata);
250         case CAM_INTF_PARM_ASD_ENABLE:
251             return POINTER_OF_META(CAM_INTF_PARM_ASD_ENABLE, metadata);
252         case CAM_INTF_PARM_RECORDING_HINT:
253             return POINTER_OF_META(CAM_INTF_PARM_RECORDING_HINT, metadata);
254         case CAM_INTF_PARM_HDR:
255             return POINTER_OF_META(CAM_INTF_PARM_HDR, metadata);
256         case CAM_INTF_PARM_FRAMESKIP:
257             return POINTER_OF_META(CAM_INTF_PARM_FRAMESKIP, metadata);
258         case CAM_INTF_PARM_ZSL_MODE:
259             return POINTER_OF_META(CAM_INTF_PARM_ZSL_MODE, metadata);
260         case CAM_INTF_PARM_HDR_NEED_1X:
261             return POINTER_OF_META(CAM_INTF_PARM_HDR_NEED_1X, metadata);
262         case CAM_INTF_PARM_LOCK_CAF:
263             return POINTER_OF_META(CAM_INTF_PARM_LOCK_CAF, metadata);
264         case CAM_INTF_PARM_VIDEO_HDR:
265             return POINTER_OF_META(CAM_INTF_PARM_VIDEO_HDR, metadata);
266         case CAM_INTF_PARM_VT:
267             return POINTER_OF_META(CAM_INTF_PARM_VT, metadata);
268         case CAM_INTF_PARM_GET_CHROMATIX:
269             return POINTER_OF_META(CAM_INTF_PARM_GET_CHROMATIX, metadata);
270         case CAM_INTF_PARM_SET_RELOAD_CHROMATIX:
271             return POINTER_OF_META(CAM_INTF_PARM_SET_RELOAD_CHROMATIX, metadata);
272         case CAM_INTF_PARM_GET_AFTUNE:
273             return POINTER_OF_META(CAM_INTF_PARM_GET_AFTUNE, metadata);
274         case CAM_INTF_PARM_SET_RELOAD_AFTUNE:
275             return POINTER_OF_META(CAM_INTF_PARM_SET_RELOAD_AFTUNE, metadata);
276         case CAM_INTF_PARM_SET_AUTOFOCUSTUNING:
277             return POINTER_OF_META(CAM_INTF_PARM_SET_AUTOFOCUSTUNING, metadata);
278         case CAM_INTF_PARM_SET_VFE_COMMAND:
279             return POINTER_OF_META(CAM_INTF_PARM_SET_VFE_COMMAND, metadata);
280         case CAM_INTF_PARM_SET_PP_COMMAND:
281             return POINTER_OF_META(CAM_INTF_PARM_SET_PP_COMMAND, metadata);
282         case CAM_INTF_PARM_MAX_DIMENSION:
283             return POINTER_OF_META(CAM_INTF_PARM_MAX_DIMENSION, metadata);
284         case CAM_INTF_PARM_RAW_DIMENSION:
285             return POINTER_OF_META(CAM_INTF_PARM_RAW_DIMENSION, metadata);
286         case CAM_INTF_PARM_TINTLESS:
287             return POINTER_OF_META(CAM_INTF_PARM_TINTLESS, metadata);
288         case CAM_INTF_PARM_WB_MANUAL:
289             return POINTER_OF_META(CAM_INTF_PARM_WB_MANUAL, metadata);
290         case CAM_INTF_PARM_EZTUNE_CMD:
291             return POINTER_OF_META(CAM_INTF_PARM_EZTUNE_CMD, metadata);
292         case CAM_INTF_PARM_INT_EVT:
293             return POINTER_OF_META(CAM_INTF_PARM_INT_EVT, metadata);
294         case CAM_INTF_PARM_RDI_MODE:
295             return POINTER_OF_META(CAM_INTF_PARM_RDI_MODE, metadata);
296         case CAM_INTF_PARM_BURST_NUM:
297             return POINTER_OF_META(CAM_INTF_PARM_BURST_NUM, metadata);
298         case CAM_INTF_PARM_RETRO_BURST_NUM:
299             return POINTER_OF_META(CAM_INTF_PARM_RETRO_BURST_NUM, metadata);
300         case CAM_INTF_PARM_BURST_LED_ON_PERIOD:
301             return POINTER_OF_META(CAM_INTF_PARM_BURST_LED_ON_PERIOD, metadata);
302         case CAM_INTF_PARM_LONGSHOT_ENABLE:
303             return POINTER_OF_META(CAM_INTF_PARM_LONGSHOT_ENABLE, metadata);
304         case CAM_INTF_META_STREAM_INFO:
305             return POINTER_OF_META(CAM_INTF_META_STREAM_INFO, metadata);
306         case CAM_INTF_META_AEC_MODE:
307             return POINTER_OF_META(CAM_INTF_META_AEC_MODE, metadata);
308         case CAM_INTF_META_AEC_PRECAPTURE_TRIGGER:
309             return POINTER_OF_META(CAM_INTF_META_AEC_PRECAPTURE_TRIGGER, metadata);
310         case CAM_INTF_META_AF_TRIGGER:
311             return POINTER_OF_META(CAM_INTF_META_AF_TRIGGER, metadata);
312         case CAM_INTF_META_CAPTURE_INTENT:
313             return POINTER_OF_META(CAM_INTF_META_CAPTURE_INTENT, metadata);
314         case CAM_INTF_META_DEMOSAIC:
315             return POINTER_OF_META(CAM_INTF_META_DEMOSAIC, metadata);
316         case CAM_INTF_META_SHARPNESS_STRENGTH:
317             return POINTER_OF_META(CAM_INTF_META_SHARPNESS_STRENGTH, metadata);
318         case CAM_INTF_META_GEOMETRIC_MODE:
319             return POINTER_OF_META(CAM_INTF_META_GEOMETRIC_MODE, metadata);
320         case CAM_INTF_META_GEOMETRIC_STRENGTH:
321             return POINTER_OF_META(CAM_INTF_META_GEOMETRIC_STRENGTH, metadata);
322         case CAM_INTF_META_LENS_SHADING_MAP_MODE:
323             return POINTER_OF_META(CAM_INTF_META_LENS_SHADING_MAP_MODE, metadata);
324         case CAM_INTF_META_SHADING_STRENGTH:
325             return POINTER_OF_META(CAM_INTF_META_SHADING_STRENGTH, metadata);
326         case CAM_INTF_META_TONEMAP_MODE:
327             return POINTER_OF_META(CAM_INTF_META_TONEMAP_MODE, metadata);
328         case CAM_INTF_META_AWB_INFO:
329             return POINTER_OF_META(CAM_INTF_META_AWB_INFO, metadata);
330         case CAM_INTF_META_FOCUS_POSITION:
331             return POINTER_OF_META(CAM_INTF_META_FOCUS_POSITION, metadata);
332         case CAM_INTF_META_STREAM_ID:
333             return POINTER_OF_META(CAM_INTF_META_STREAM_ID, metadata);
334         case CAM_INTF_PARM_STATS_DEBUG_MASK:
335             return POINTER_OF_META(CAM_INTF_PARM_STATS_DEBUG_MASK, metadata);
336         case CAM_INTF_PARM_STATS_AF_PAAF:
337             return POINTER_OF_META(CAM_INTF_PARM_STATS_AF_PAAF, metadata);
338         case CAM_INTF_PARM_FOCUS_BRACKETING:
339             return POINTER_OF_META(CAM_INTF_PARM_FOCUS_BRACKETING, metadata);
340         case CAM_INTF_PARM_FLASH_BRACKETING:
341             return POINTER_OF_META(CAM_INTF_PARM_FLASH_BRACKETING, metadata);
342         case CAM_INTF_META_JPEG_GPS_COORDINATES:
343             return POINTER_OF_META(CAM_INTF_META_JPEG_GPS_COORDINATES, metadata);
344         case CAM_INTF_META_JPEG_GPS_PROC_METHODS:
345             return POINTER_OF_META(CAM_INTF_META_JPEG_GPS_PROC_METHODS, metadata);
346         case CAM_INTF_META_JPEG_GPS_TIMESTAMP:
347             return POINTER_OF_META(CAM_INTF_META_JPEG_GPS_TIMESTAMP, metadata);
348         case CAM_INTF_META_JPEG_ORIENTATION:
349             return POINTER_OF_META(CAM_INTF_META_JPEG_ORIENTATION, metadata);
350         case CAM_INTF_META_JPEG_QUALITY:
351             return POINTER_OF_META(CAM_INTF_META_JPEG_QUALITY, metadata);
352         case CAM_INTF_META_JPEG_THUMB_QUALITY:
353             return POINTER_OF_META(CAM_INTF_META_JPEG_THUMB_QUALITY, metadata);
354         case CAM_INTF_META_JPEG_THUMB_SIZE:
355             return POINTER_OF_META(CAM_INTF_META_JPEG_THUMB_SIZE, metadata);
356         case CAM_INTF_META_TEST_PATTERN_DATA:
357             return POINTER_OF_META(CAM_INTF_META_TEST_PATTERN_DATA, metadata);
358         case CAM_INTF_META_PROFILE_TONE_CURVE:
359             return POINTER_OF_META(CAM_INTF_META_PROFILE_TONE_CURVE, metadata);
360         case CAM_INTF_META_OTP_WB_GRGB:
361             return POINTER_OF_META(CAM_INTF_META_OTP_WB_GRGB, metadata);
362         case CAM_INTF_PARM_CAC:
363             return POINTER_OF_META(CAM_INTF_PARM_CAC, metadata);
364         case CAM_INTF_META_NEUTRAL_COL_POINT:
365             return POINTER_OF_META(CAM_INTF_META_NEUTRAL_COL_POINT, metadata);
366         case CAM_INTF_PARM_CDS_MODE:
367             return POINTER_OF_META(CAM_INTF_PARM_CDS_MODE, metadata);
368         case CAM_INTF_PARM_ROTATION:
369           return POINTER_OF_META(CAM_INTF_PARM_ROTATION, metadata);
370         case CAM_INTF_PARM_TONE_MAP_MODE:
371           return POINTER_OF_META(CAM_INTF_PARM_TONE_MAP_MODE, metadata);
372         case CAM_INTF_META_IMGLIB:
373           return POINTER_OF_META(CAM_INTF_META_IMGLIB, metadata);
374         case CAM_INTF_META_USE_AV_TIMER:
375             return POINTER_OF_META(CAM_INTF_META_USE_AV_TIMER, metadata);
376         default:
377             return NULL;
378     }
379 }
380 
get_size_of(cam_intf_parm_type_t param_id)381 uint32_t get_size_of(cam_intf_parm_type_t param_id)
382 {
383     metadata_buffer_t* metadata = NULL;
384     switch(param_id) {
385         case CAM_INTF_META_HISTOGRAM:
386             return SIZE_OF_PARAM(CAM_INTF_META_HISTOGRAM, metadata);
387         case CAM_INTF_META_FACE_DETECTION:
388             return SIZE_OF_PARAM(CAM_INTF_META_FACE_DETECTION, metadata);
389         case CAM_INTF_META_AUTOFOCUS_DATA:
390             return SIZE_OF_PARAM(CAM_INTF_META_AUTOFOCUS_DATA, metadata);
391         case CAM_INTF_PARM_UPDATE_DEBUG_LEVEL:
392             return SIZE_OF_PARAM(CAM_INTF_PARM_UPDATE_DEBUG_LEVEL, metadata);
393         case CAM_INTF_META_CROP_DATA:
394             return SIZE_OF_PARAM(CAM_INTF_META_CROP_DATA, metadata);
395         case CAM_INTF_META_PREP_SNAPSHOT_DONE:
396             return SIZE_OF_PARAM(CAM_INTF_META_PREP_SNAPSHOT_DONE, metadata);
397         case CAM_INTF_META_GOOD_FRAME_IDX_RANGE:
398             return SIZE_OF_PARAM(CAM_INTF_META_GOOD_FRAME_IDX_RANGE, metadata);
399         case CAM_INTF_META_ASD_HDR_SCENE_DATA:
400             return SIZE_OF_PARAM(CAM_INTF_META_ASD_HDR_SCENE_DATA, metadata);
401         case CAM_INTF_META_ASD_SCENE_TYPE:
402             return SIZE_OF_PARAM(CAM_INTF_META_ASD_SCENE_TYPE, metadata);
403         case CAM_INTF_META_CHROMATIX_LITE_ISP:
404             return SIZE_OF_PARAM(CAM_INTF_META_CHROMATIX_LITE_ISP, metadata);
405         case CAM_INTF_META_CHROMATIX_LITE_PP:
406             return SIZE_OF_PARAM(CAM_INTF_META_CHROMATIX_LITE_PP, metadata);
407         case CAM_INTF_META_CHROMATIX_LITE_AE:
408             return SIZE_OF_PARAM(CAM_INTF_META_CHROMATIX_LITE_AE, metadata);
409         case CAM_INTF_META_CHROMATIX_LITE_AWB:
410             return SIZE_OF_PARAM(CAM_INTF_META_CHROMATIX_LITE_AWB, metadata);
411         case CAM_INTF_META_CHROMATIX_LITE_AF:
412             return SIZE_OF_PARAM(CAM_INTF_META_CHROMATIX_LITE_AF, metadata);
413         case CAM_INTF_META_CHROMATIX_LITE_ASD:
414             return SIZE_OF_PARAM(CAM_INTF_META_CHROMATIX_LITE_ASD, metadata);
415         case CAM_INTF_BUF_DIVERT_INFO:
416             return SIZE_OF_PARAM(CAM_INTF_BUF_DIVERT_INFO, metadata);
417         case CAM_INTF_META_FRAME_NUMBER_VALID:
418             return SIZE_OF_PARAM(CAM_INTF_META_FRAME_NUMBER_VALID, metadata);
419         case CAM_INTF_META_URGENT_FRAME_NUMBER_VALID:
420             return SIZE_OF_PARAM(CAM_INTF_META_URGENT_FRAME_NUMBER_VALID, metadata);
421         case CAM_INTF_META_FRAME_DROPPED:
422             return SIZE_OF_PARAM(CAM_INTF_META_FRAME_DROPPED, metadata);
423         case CAM_INTF_META_FRAME_NUMBER:
424             return SIZE_OF_PARAM(CAM_INTF_META_FRAME_NUMBER, metadata);
425         case CAM_INTF_META_URGENT_FRAME_NUMBER:
426             return SIZE_OF_PARAM(CAM_INTF_META_URGENT_FRAME_NUMBER, metadata);
427         case CAM_INTF_META_COLOR_CORRECT_MODE:
428             return SIZE_OF_PARAM(CAM_INTF_META_COLOR_CORRECT_MODE, metadata);
429         case CAM_INTF_META_COLOR_CORRECT_TRANSFORM:
430             return SIZE_OF_PARAM(CAM_INTF_META_COLOR_CORRECT_TRANSFORM, metadata);
431         case CAM_INTF_META_COLOR_CORRECT_GAINS:
432             return SIZE_OF_PARAM(CAM_INTF_META_COLOR_CORRECT_GAINS, metadata);
433         case CAM_INTF_META_PRED_COLOR_CORRECT_TRANSFORM:
434             return SIZE_OF_PARAM(CAM_INTF_META_PRED_COLOR_CORRECT_TRANSFORM, metadata);
435         case CAM_INTF_META_PRED_COLOR_CORRECT_GAINS:
436             return SIZE_OF_PARAM(CAM_INTF_META_PRED_COLOR_CORRECT_GAINS, metadata);
437         case CAM_INTF_META_AEC_ROI:
438             return SIZE_OF_PARAM(CAM_INTF_META_AEC_ROI, metadata);
439         case CAM_INTF_META_AEC_STATE:
440             return SIZE_OF_PARAM(CAM_INTF_META_AEC_STATE, metadata);
441         case CAM_INTF_PARM_FOCUS_MODE:
442             return SIZE_OF_PARAM(CAM_INTF_PARM_FOCUS_MODE, metadata);
443         case CAM_INTF_PARM_MANUAL_FOCUS_POS:
444             return SIZE_OF_PARAM(CAM_INTF_PARM_MANUAL_FOCUS_POS, metadata);
445         case CAM_INTF_META_AF_ROI:
446             return SIZE_OF_PARAM(CAM_INTF_META_AF_ROI, metadata);
447         case CAM_INTF_META_AF_STATE:
448             return SIZE_OF_PARAM(CAM_INTF_META_AF_STATE, metadata);
449         case CAM_INTF_PARM_WHITE_BALANCE:
450             return SIZE_OF_PARAM(CAM_INTF_PARM_WHITE_BALANCE, metadata);
451         case CAM_INTF_META_AWB_REGIONS:
452             return SIZE_OF_PARAM(CAM_INTF_META_AWB_REGIONS, metadata);
453         case CAM_INTF_META_AWB_STATE:
454             return SIZE_OF_PARAM(CAM_INTF_META_AWB_STATE, metadata);
455         case CAM_INTF_META_BLACK_LEVEL_LOCK:
456             return SIZE_OF_PARAM(CAM_INTF_META_BLACK_LEVEL_LOCK, metadata);
457         case CAM_INTF_META_MODE:
458             return SIZE_OF_PARAM(CAM_INTF_META_MODE, metadata);
459         case CAM_INTF_META_EDGE_MODE:
460             return SIZE_OF_PARAM(CAM_INTF_META_EDGE_MODE, metadata);
461         case CAM_INTF_META_FLASH_POWER:
462             return SIZE_OF_PARAM(CAM_INTF_META_FLASH_POWER, metadata);
463         case CAM_INTF_META_FLASH_FIRING_TIME:
464             return SIZE_OF_PARAM(CAM_INTF_META_FLASH_FIRING_TIME, metadata);
465         case CAM_INTF_META_FLASH_MODE:
466             return SIZE_OF_PARAM(CAM_INTF_META_FLASH_MODE, metadata);
467         case CAM_INTF_META_FLASH_STATE:
468             return SIZE_OF_PARAM(CAM_INTF_META_FLASH_STATE, metadata);
469         case CAM_INTF_META_HOTPIXEL_MODE:
470             return SIZE_OF_PARAM(CAM_INTF_META_HOTPIXEL_MODE, metadata);
471         case CAM_INTF_META_LENS_APERTURE:
472             return SIZE_OF_PARAM(CAM_INTF_META_LENS_APERTURE, metadata);
473         case CAM_INTF_META_LENS_FILTERDENSITY:
474             return SIZE_OF_PARAM(CAM_INTF_META_LENS_FILTERDENSITY, metadata);
475         case CAM_INTF_META_LENS_FOCAL_LENGTH:
476             return SIZE_OF_PARAM(CAM_INTF_META_LENS_FOCAL_LENGTH, metadata);
477         case CAM_INTF_META_LENS_FOCUS_DISTANCE:
478             return SIZE_OF_PARAM(CAM_INTF_META_LENS_FOCUS_DISTANCE, metadata);
479         case CAM_INTF_META_LENS_FOCUS_RANGE:
480             return SIZE_OF_PARAM(CAM_INTF_META_LENS_FOCUS_RANGE, metadata);
481         case CAM_INTF_META_LENS_STATE:
482             return SIZE_OF_PARAM(CAM_INTF_META_LENS_STATE, metadata);
483         case CAM_INTF_META_LENS_OPT_STAB_MODE:
484             return SIZE_OF_PARAM(CAM_INTF_META_LENS_OPT_STAB_MODE, metadata);
485         case CAM_INTF_META_VIDEO_STAB_MODE:
486             return SIZE_OF_PARAM(CAM_INTF_META_VIDEO_STAB_MODE, metadata);
487         case CAM_INTF_META_NOISE_REDUCTION_MODE:
488             return SIZE_OF_PARAM(CAM_INTF_META_NOISE_REDUCTION_MODE, metadata);
489         case CAM_INTF_META_NOISE_REDUCTION_STRENGTH:
490             return SIZE_OF_PARAM(CAM_INTF_META_NOISE_REDUCTION_STRENGTH, metadata);
491         case CAM_INTF_META_EFFECTIVE_EXPOSURE_FACTOR:
492             return SIZE_OF_PARAM(CAM_INTF_META_EFFECTIVE_EXPOSURE_FACTOR, metadata);
493         case CAM_INTF_META_SCALER_CROP_REGION:
494             return SIZE_OF_PARAM(CAM_INTF_META_SCALER_CROP_REGION, metadata);
495         case CAM_INTF_META_SCENE_FLICKER:
496             return SIZE_OF_PARAM(CAM_INTF_META_SCENE_FLICKER, metadata);
497         case CAM_INTF_META_SENSOR_EXPOSURE_TIME:
498             return SIZE_OF_PARAM(CAM_INTF_META_SENSOR_EXPOSURE_TIME, metadata);
499         case CAM_INTF_META_SENSOR_FRAME_DURATION:
500             return SIZE_OF_PARAM(CAM_INTF_META_SENSOR_FRAME_DURATION, metadata);
501         case CAM_INTF_META_SENSOR_SENSITIVITY:
502             return SIZE_OF_PARAM(CAM_INTF_META_SENSOR_SENSITIVITY, metadata);
503         case CAM_INTF_META_SENSOR_TIMESTAMP:
504             return SIZE_OF_PARAM(CAM_INTF_META_SENSOR_TIMESTAMP, metadata);
505         case CAM_INTF_META_SENSOR_ROLLING_SHUTTER_SKEW:
506             return SIZE_OF_PARAM(CAM_INTF_META_SENSOR_ROLLING_SHUTTER_SKEW, metadata);
507         case CAM_INTF_META_SHADING_MODE:
508             return SIZE_OF_PARAM(CAM_INTF_META_SHADING_MODE, metadata);
509         case CAM_INTF_META_STATS_FACEDETECT_MODE:
510             return SIZE_OF_PARAM(CAM_INTF_META_STATS_FACEDETECT_MODE, metadata);
511         case CAM_INTF_META_STATS_HISTOGRAM_MODE:
512             return SIZE_OF_PARAM(CAM_INTF_META_STATS_HISTOGRAM_MODE, metadata);
513         case CAM_INTF_META_STATS_SHARPNESS_MAP_MODE:
514             return SIZE_OF_PARAM(CAM_INTF_META_STATS_SHARPNESS_MAP_MODE, metadata);
515         case CAM_INTF_META_STATS_SHARPNESS_MAP:
516             return SIZE_OF_PARAM(CAM_INTF_META_STATS_SHARPNESS_MAP, metadata);
517         case CAM_INTF_META_TONEMAP_CURVES:
518             return SIZE_OF_PARAM(CAM_INTF_META_TONEMAP_CURVES, metadata);
519         case CAM_INTF_META_LENS_SHADING_MAP:
520             return SIZE_OF_PARAM(CAM_INTF_META_LENS_SHADING_MAP, metadata);
521         case CAM_INTF_META_AEC_INFO:
522             return SIZE_OF_PARAM(CAM_INTF_META_AEC_INFO, metadata);
523         case CAM_INTF_META_SENSOR_INFO:
524             return SIZE_OF_PARAM(CAM_INTF_META_SENSOR_INFO, metadata);
525         case CAM_INTF_META_ASD_SCENE_CAPTURE_TYPE:
526             return SIZE_OF_PARAM(CAM_INTF_META_ASD_SCENE_CAPTURE_TYPE, metadata);
527         case CAM_INTF_PARM_EFFECT:
528             return SIZE_OF_PARAM(CAM_INTF_PARM_EFFECT, metadata);
529         case CAM_INTF_META_PRIVATE_DATA:
530             return SIZE_OF_PARAM(CAM_INTF_META_PRIVATE_DATA, metadata);
531         case CAM_INTF_PARM_HAL_VERSION:
532             return SIZE_OF_PARAM(CAM_INTF_PARM_HAL_VERSION, metadata);
533         case CAM_INTF_PARM_ANTIBANDING:
534             return SIZE_OF_PARAM(CAM_INTF_PARM_ANTIBANDING, metadata);
535         case CAM_INTF_PARM_EXPOSURE_COMPENSATION:
536             return SIZE_OF_PARAM(CAM_INTF_PARM_EXPOSURE_COMPENSATION, metadata);
537         case CAM_INTF_PARM_EV_STEP:
538             return SIZE_OF_PARAM(CAM_INTF_PARM_EV_STEP, metadata);
539         case CAM_INTF_PARM_AEC_LOCK:
540             return SIZE_OF_PARAM(CAM_INTF_PARM_AEC_LOCK, metadata);
541         case CAM_INTF_PARM_FPS_RANGE:
542             return SIZE_OF_PARAM(CAM_INTF_PARM_FPS_RANGE, metadata);
543         case CAM_INTF_PARM_AWB_LOCK:
544             return SIZE_OF_PARAM(CAM_INTF_PARM_AWB_LOCK, metadata);
545         case CAM_INTF_PARM_BESTSHOT_MODE:
546             return SIZE_OF_PARAM(CAM_INTF_PARM_BESTSHOT_MODE, metadata);
547         case CAM_INTF_PARM_DIS_ENABLE:
548             return SIZE_OF_PARAM(CAM_INTF_PARM_DIS_ENABLE, metadata);
549         case CAM_INTF_PARM_LED_MODE:
550             return SIZE_OF_PARAM(CAM_INTF_PARM_LED_MODE, metadata);
551         case CAM_INTF_META_LED_MODE_OVERRIDE:
552             return SIZE_OF_PARAM(CAM_INTF_META_LED_MODE_OVERRIDE, metadata);
553         case CAM_INTF_PARM_QUERY_FLASH4SNAP:
554             return SIZE_OF_PARAM(CAM_INTF_PARM_QUERY_FLASH4SNAP, metadata);
555         case CAM_INTF_PARM_EXPOSURE:
556             return SIZE_OF_PARAM(CAM_INTF_PARM_EXPOSURE, metadata);
557         case CAM_INTF_PARM_SHARPNESS:
558             return SIZE_OF_PARAM(CAM_INTF_PARM_SHARPNESS, metadata);
559         case CAM_INTF_PARM_CONTRAST:
560             return SIZE_OF_PARAM(CAM_INTF_PARM_CONTRAST, metadata);
561         case CAM_INTF_PARM_SATURATION:
562             return SIZE_OF_PARAM(CAM_INTF_PARM_SATURATION, metadata);
563         case CAM_INTF_PARM_BRIGHTNESS:
564             return SIZE_OF_PARAM(CAM_INTF_PARM_BRIGHTNESS, metadata);
565         case CAM_INTF_PARM_ISO:
566             return SIZE_OF_PARAM(CAM_INTF_PARM_ISO, metadata);
567         case CAM_INTF_PARM_EXPOSURE_TIME:
568             return SIZE_OF_PARAM(CAM_INTF_PARM_EXPOSURE_TIME, metadata);
569         case CAM_INTF_PARM_ZOOM:
570             return SIZE_OF_PARAM(CAM_INTF_PARM_ZOOM, metadata);
571         case CAM_INTF_PARM_ROLLOFF:
572             return SIZE_OF_PARAM(CAM_INTF_PARM_ROLLOFF, metadata);
573         case CAM_INTF_PARM_MODE:
574             return SIZE_OF_PARAM(CAM_INTF_PARM_MODE, metadata);
575         case CAM_INTF_PARM_AEC_ALGO_TYPE:
576             return SIZE_OF_PARAM(CAM_INTF_PARM_AEC_ALGO_TYPE, metadata);
577         case CAM_INTF_PARM_FOCUS_ALGO_TYPE:
578             return SIZE_OF_PARAM(CAM_INTF_PARM_FOCUS_ALGO_TYPE, metadata);
579         case CAM_INTF_PARM_AEC_ROI:
580             return SIZE_OF_PARAM(CAM_INTF_PARM_AEC_ROI, metadata);
581         case CAM_INTF_PARM_AF_ROI:
582             return SIZE_OF_PARAM(CAM_INTF_PARM_AF_ROI, metadata);
583         case CAM_INTF_PARM_SCE_FACTOR:
584             return SIZE_OF_PARAM(CAM_INTF_PARM_SCE_FACTOR, metadata);
585         case CAM_INTF_PARM_FD:
586             return SIZE_OF_PARAM(CAM_INTF_PARM_FD, metadata);
587         case CAM_INTF_PARM_MCE:
588             return SIZE_OF_PARAM(CAM_INTF_PARM_MCE, metadata);
589         case CAM_INTF_PARM_HFR:
590             return SIZE_OF_PARAM(CAM_INTF_PARM_HFR, metadata);
591         case CAM_INTF_PARM_REDEYE_REDUCTION:
592             return SIZE_OF_PARAM(CAM_INTF_PARM_REDEYE_REDUCTION, metadata);
593         case CAM_INTF_PARM_WAVELET_DENOISE:
594             return SIZE_OF_PARAM(CAM_INTF_PARM_WAVELET_DENOISE, metadata);
595         case CAM_INTF_PARM_TEMPORAL_DENOISE:
596             return SIZE_OF_PARAM(CAM_INTF_PARM_TEMPORAL_DENOISE, metadata);
597         case CAM_INTF_PARM_HISTOGRAM:
598             return SIZE_OF_PARAM(CAM_INTF_PARM_HISTOGRAM, metadata);
599         case CAM_INTF_PARM_ASD_ENABLE:
600             return SIZE_OF_PARAM(CAM_INTF_PARM_ASD_ENABLE, metadata);
601         case CAM_INTF_PARM_RECORDING_HINT:
602             return SIZE_OF_PARAM(CAM_INTF_PARM_RECORDING_HINT, metadata);
603         case CAM_INTF_PARM_HDR:
604             return SIZE_OF_PARAM(CAM_INTF_PARM_HDR, metadata);
605         case CAM_INTF_PARM_FRAMESKIP:
606             return SIZE_OF_PARAM(CAM_INTF_PARM_FRAMESKIP, metadata);
607         case CAM_INTF_PARM_ZSL_MODE:
608             return SIZE_OF_PARAM(CAM_INTF_PARM_ZSL_MODE, metadata);
609         case CAM_INTF_PARM_HDR_NEED_1X:
610             return SIZE_OF_PARAM(CAM_INTF_PARM_HDR_NEED_1X, metadata);
611         case CAM_INTF_PARM_LOCK_CAF:
612             return SIZE_OF_PARAM(CAM_INTF_PARM_LOCK_CAF, metadata);
613         case CAM_INTF_PARM_VIDEO_HDR:
614             return SIZE_OF_PARAM(CAM_INTF_PARM_VIDEO_HDR, metadata);
615         case CAM_INTF_PARM_VT:
616             return SIZE_OF_PARAM(CAM_INTF_PARM_VT, metadata);
617         case CAM_INTF_PARM_GET_CHROMATIX:
618             return SIZE_OF_PARAM(CAM_INTF_PARM_GET_CHROMATIX, metadata);
619         case CAM_INTF_PARM_SET_RELOAD_CHROMATIX:
620             return SIZE_OF_PARAM(CAM_INTF_PARM_SET_RELOAD_CHROMATIX, metadata);
621         case CAM_INTF_PARM_GET_AFTUNE:
622             return SIZE_OF_PARAM(CAM_INTF_PARM_GET_AFTUNE, metadata);
623         case CAM_INTF_PARM_SET_RELOAD_AFTUNE:
624             return SIZE_OF_PARAM(CAM_INTF_PARM_SET_RELOAD_AFTUNE, metadata);
625         case CAM_INTF_PARM_SET_AUTOFOCUSTUNING:
626             return SIZE_OF_PARAM(CAM_INTF_PARM_SET_AUTOFOCUSTUNING, metadata);
627         case CAM_INTF_PARM_SET_VFE_COMMAND:
628             return SIZE_OF_PARAM(CAM_INTF_PARM_SET_VFE_COMMAND, metadata);
629         case CAM_INTF_PARM_SET_PP_COMMAND:
630             return SIZE_OF_PARAM(CAM_INTF_PARM_SET_PP_COMMAND, metadata);
631         case CAM_INTF_PARM_MAX_DIMENSION:
632             return SIZE_OF_PARAM(CAM_INTF_PARM_MAX_DIMENSION, metadata);
633         case CAM_INTF_PARM_RAW_DIMENSION:
634             return SIZE_OF_PARAM(CAM_INTF_PARM_RAW_DIMENSION, metadata);
635         case CAM_INTF_PARM_TINTLESS:
636             return SIZE_OF_PARAM(CAM_INTF_PARM_TINTLESS, metadata);
637         case CAM_INTF_PARM_WB_MANUAL:
638             return SIZE_OF_PARAM(CAM_INTF_PARM_WB_MANUAL, metadata);
639         case CAM_INTF_PARM_EZTUNE_CMD:
640             return SIZE_OF_PARAM(CAM_INTF_PARM_EZTUNE_CMD, metadata);
641         case CAM_INTF_PARM_INT_EVT:
642             return SIZE_OF_PARAM(CAM_INTF_PARM_INT_EVT, metadata);
643         case CAM_INTF_PARM_RDI_MODE:
644             return SIZE_OF_PARAM(CAM_INTF_PARM_RDI_MODE, metadata);
645         case CAM_INTF_PARM_BURST_NUM:
646             return SIZE_OF_PARAM(CAM_INTF_PARM_BURST_NUM, metadata);
647         case CAM_INTF_PARM_RETRO_BURST_NUM:
648             return SIZE_OF_PARAM(CAM_INTF_PARM_RETRO_BURST_NUM, metadata);
649         case CAM_INTF_PARM_BURST_LED_ON_PERIOD:
650             return SIZE_OF_PARAM(CAM_INTF_PARM_BURST_LED_ON_PERIOD, metadata);
651         case CAM_INTF_PARM_LONGSHOT_ENABLE:
652             return SIZE_OF_PARAM(CAM_INTF_PARM_LONGSHOT_ENABLE, metadata);
653         case CAM_INTF_META_STREAM_INFO:
654             return SIZE_OF_PARAM(CAM_INTF_META_STREAM_INFO, metadata);
655         case CAM_INTF_META_AEC_MODE:
656             return SIZE_OF_PARAM(CAM_INTF_META_AEC_MODE, metadata);
657         case CAM_INTF_META_AEC_PRECAPTURE_TRIGGER:
658             return SIZE_OF_PARAM(CAM_INTF_META_AEC_PRECAPTURE_TRIGGER, metadata);
659         case CAM_INTF_META_AF_TRIGGER:
660             return SIZE_OF_PARAM(CAM_INTF_META_AF_TRIGGER, metadata);
661         case CAM_INTF_META_CAPTURE_INTENT:
662             return SIZE_OF_PARAM(CAM_INTF_META_CAPTURE_INTENT, metadata);
663         case CAM_INTF_META_DEMOSAIC:
664             return SIZE_OF_PARAM(CAM_INTF_META_DEMOSAIC, metadata);
665         case CAM_INTF_META_SHARPNESS_STRENGTH:
666             return SIZE_OF_PARAM(CAM_INTF_META_SHARPNESS_STRENGTH, metadata);
667         case CAM_INTF_META_GEOMETRIC_MODE:
668             return SIZE_OF_PARAM(CAM_INTF_META_GEOMETRIC_MODE, metadata);
669         case CAM_INTF_META_GEOMETRIC_STRENGTH:
670             return SIZE_OF_PARAM(CAM_INTF_META_GEOMETRIC_STRENGTH, metadata);
671         case CAM_INTF_META_LENS_SHADING_MAP_MODE:
672             return SIZE_OF_PARAM(CAM_INTF_META_LENS_SHADING_MAP_MODE, metadata);
673         case CAM_INTF_META_SHADING_STRENGTH:
674             return SIZE_OF_PARAM(CAM_INTF_META_SHADING_STRENGTH, metadata);
675         case CAM_INTF_META_TONEMAP_MODE:
676             return SIZE_OF_PARAM(CAM_INTF_META_TONEMAP_MODE, metadata);
677         case CAM_INTF_META_AWB_INFO:
678             return SIZE_OF_PARAM(CAM_INTF_META_AWB_INFO, metadata);
679         case CAM_INTF_META_FOCUS_POSITION:
680             return SIZE_OF_PARAM(CAM_INTF_META_FOCUS_POSITION, metadata);
681         case CAM_INTF_META_STREAM_ID:
682             return SIZE_OF_PARAM(CAM_INTF_META_STREAM_ID, metadata);
683         case CAM_INTF_PARM_STATS_DEBUG_MASK:
684             return SIZE_OF_PARAM(CAM_INTF_PARM_STATS_DEBUG_MASK, metadata);
685         case CAM_INTF_PARM_STATS_AF_PAAF:
686             return SIZE_OF_PARAM(CAM_INTF_PARM_STATS_AF_PAAF, metadata);
687         case CAM_INTF_PARM_FOCUS_BRACKETING:
688             return SIZE_OF_PARAM(CAM_INTF_PARM_FOCUS_BRACKETING, metadata);
689         case CAM_INTF_PARM_FLASH_BRACKETING:
690             return SIZE_OF_PARAM(CAM_INTF_PARM_FLASH_BRACKETING, metadata);
691         case CAM_INTF_META_JPEG_GPS_COORDINATES:
692             return SIZE_OF_PARAM(CAM_INTF_META_JPEG_GPS_COORDINATES, metadata);
693         case CAM_INTF_META_JPEG_GPS_PROC_METHODS:
694             return SIZE_OF_PARAM(CAM_INTF_META_JPEG_GPS_PROC_METHODS, metadata);
695         case CAM_INTF_META_JPEG_GPS_TIMESTAMP:
696             return SIZE_OF_PARAM(CAM_INTF_META_JPEG_GPS_TIMESTAMP, metadata);
697         case CAM_INTF_META_JPEG_ORIENTATION:
698             return SIZE_OF_PARAM(CAM_INTF_META_JPEG_ORIENTATION, metadata);
699         case CAM_INTF_META_JPEG_QUALITY:
700             return SIZE_OF_PARAM(CAM_INTF_META_JPEG_QUALITY, metadata);
701         case CAM_INTF_META_JPEG_THUMB_QUALITY:
702             return SIZE_OF_PARAM(CAM_INTF_META_JPEG_THUMB_QUALITY, metadata);
703         case CAM_INTF_META_JPEG_THUMB_SIZE:
704             return SIZE_OF_PARAM(CAM_INTF_META_JPEG_THUMB_SIZE, metadata);
705         case CAM_INTF_META_TEST_PATTERN_DATA:
706             return SIZE_OF_PARAM(CAM_INTF_META_TEST_PATTERN_DATA, metadata);
707         case CAM_INTF_META_PROFILE_TONE_CURVE:
708             return SIZE_OF_PARAM(CAM_INTF_META_PROFILE_TONE_CURVE, metadata);
709         case CAM_INTF_META_OTP_WB_GRGB:
710             return SIZE_OF_PARAM(CAM_INTF_META_OTP_WB_GRGB, metadata);
711         case CAM_INTF_PARM_CAC:
712             return SIZE_OF_PARAM(CAM_INTF_PARM_CAC, metadata);
713         case CAM_INTF_META_NEUTRAL_COL_POINT:
714             return SIZE_OF_PARAM(CAM_INTF_META_NEUTRAL_COL_POINT, metadata);
715         case CAM_INTF_PARM_CDS_MODE:
716             return SIZE_OF_PARAM(CAM_INTF_PARM_CDS_MODE, metadata);
717         case CAM_INTF_PARM_ROTATION:
718           return SIZE_OF_PARAM(CAM_INTF_PARM_ROTATION, metadata);
719         case CAM_INTF_PARM_TONE_MAP_MODE:
720           return SIZE_OF_PARAM(CAM_INTF_PARM_TONE_MAP_MODE, metadata);
721         case CAM_INTF_META_IMGLIB:
722           return SIZE_OF_PARAM(CAM_INTF_META_IMGLIB, metadata);
723         case CAM_INTF_META_USE_AV_TIMER:
724             return SIZE_OF_PARAM(CAM_INTF_META_USE_AV_TIMER, metadata);
725         default:
726             return 0;
727     }
728     return 0;
729 }
730