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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
|
/*
* Copyright (C) 2013-2014 Paul Kocialkowski <contact@paulk.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <pthread.h>
#include <videodev2.h>
#include <videodev2_exynos_camera.h>
#include <videodev2_exynos_media.h>
#include <fimc.h>
#include <s5c73m3.h>
#include <jpeg_hal.h>
#include <Exif.h>
#include <hardware/hardware.h>
#include <hardware/camera.h>
#ifndef _SMDK4x12_CAMERA_H_
#define _SMDK4x12_CAMERA_H_
#define SMDK4x12_CAMERA_MAX_V4L2_NODES_COUNT 4
#define SMDK4x12_CAMERA_CAPTURE_BUFFERS_COUNT 6
#define SMDK4x12_CAMERA_PREVIEW_BUFFERS_COUNT 6
#define SMDK4x12_CAMERA_RECORDING_BUFFERS_COUNT 6
#define SMDK4x12_CAMERA_GRALLOC_BUFFERS_COUNT 3
#define SMDK4x12_CAMERA_PICTURE_OUTPUT_FORMAT V4L2_PIX_FMT_YUYV
#define SMDK4x12_CAMERA_MSG_ENABLED(msg) (smdk4x12_camera->messages_enabled & msg)
#define SMDK4x12_CAMERA_CALLBACK_DEFINED(cb) (smdk4x12_camera->callbacks.cb != NULL)
#define SMDK4x12_CAMERA_ALIGN(value) ((value + (0x10000 - 1)) & ~(0x10000 - 1))
/*
* Structures
*/
struct smdk4x12_camera;
struct list_head {
struct list_head *next;
struct list_head *prev;
};
enum smdk4x12_param_type {
EXYNOS_PARAM_INT,
EXYNOS_PARAM_FLOAT,
EXYNOS_PARAM_STRING,
};
union smdk4x12_param_data {
int integer;
float floating;
char *string;
};
struct smdk4x12_param {
struct list_head list;
char *key;
union smdk4x12_param_data data;
enum smdk4x12_param_type type;
};
struct smdk4x12_camera_buffer {
void *pointer;
int address;
int length;
int width;
int height;
int format;
};
struct smdk4x12_camera_capture_listener {
struct list_head list;
int width;
int height;
int format;
int (*callback)(struct smdk4x12_camera *smdk4x12_camera, struct smdk4x12_camera_buffer *buffers, int buffers_count);
int busy;
};
struct smdk4x12_camera_mbus_resolution {
int width;
int height;
int mbus_width;
int mbus_height;
};
struct smdk4x12_camera_params {
char *preview_size_values;
char *preview_size;
char *preview_format_values;
char *preview_format;
char *preview_frame_rate_values;
int preview_frame_rate;
char *preview_fps_range_values;
char *preview_fps_range;
char *picture_size_values;
char *picture_size;
char *picture_format_values;
char *picture_format;
char *jpeg_thumbnail_size_values;
int jpeg_thumbnail_width;
int jpeg_thumbnail_height;
int jpeg_thumbnail_quality;
int jpeg_quality;
int video_snapshot_supported;
int full_video_snap_supported;
char *recording_size;
char *recording_size_values;
char *recording_format;
char *focus_mode;
char *focus_mode_values;
char *focus_distances;
char *focus_areas;
int max_num_focus_areas;
int zoom_supported;
int smooth_zoom_supported;
char *zoom_ratios;
int zoom;
int max_zoom;
int auto_exposure_lock_supported;
int auto_exposure_lock;
int auto_white_balance_lock_supported;
int auto_white_balance_lock;
char *flash_mode;
char *flash_mode_values;
int exposure_compensation;
float exposure_compensation_step;
int min_exposure_compensation;
int max_exposure_compensation;
char *whitebalance;
char *whitebalance_values;
char *antibanding;
char *antibanding_values;
char *scene_mode;
char *scene_mode_values;
char *effect;
char *effect_values;
char *iso;
char *iso_values;
char *image_stabilization;
char *image_stabilization_values;
};
struct smdk4x12_camera_preset {
char *name;
int facing;
int orientation;
int rotation;
int hflip;
int vflip;
int capture_format;
int picture_format;
int fimc_is;
float focal_length;
float horizontal_view_angle;
float vertical_view_angle;
int metering;
struct smdk4x12_camera_params params;
struct smdk4x12_camera_mbus_resolution *mbus_resolutions;
int mbus_resolutions_count;
};
struct smdk4x12_v4l2_node {
int id;
char *node;
};
struct smdk4x12_v4l2_output {
int enabled;
int v4l2_id;
int width;
int height;
int format;
int buffer_width;
int buffer_height;
int buffer_format;
camera_memory_t *memory;
int memory_address;
#ifdef EXYNOS_ION
int memory_ion_fd;
#endif
int memory_index;
int buffers_count;
int buffer_length;
};
struct smdk4x12_exif {
int enabled;
exif_attribute_t attributes;
void *jpeg_thumbnail_data;
int jpeg_thumbnail_size;
camera_memory_t *memory;
int memory_size;
};
struct smdk4x12_jpeg {
int enabled;
int fd;
struct jpeg_buf buffer_in;
struct jpeg_buf buffer_out;
camera_memory_t *memory_in;
void *memory_in_pointer;
#ifdef EXYNOS_ION
int memory_in_ion_fd;
#endif
camera_memory_t *memory_out;
void *memory_out_pointer;
int memory_out_size;
#ifdef EXYNOS_ION
int memory_out_ion_fd;
#endif
int width;
int height;
int format;
int quality;
};
struct exynox_camera_config {
struct smdk4x12_camera_preset *presets;
int presets_count;
struct smdk4x12_v4l2_node *v4l2_nodes;
int v4l2_nodes_count;
};
struct smdk4x12_camera_callbacks {
camera_notify_callback notify;
camera_data_callback data;
camera_data_timestamp_callback data_timestamp;
camera_request_memory request_memory;
void *user;
};
struct smdk4x12_camera {
int v4l2_fds[SMDK4x12_CAMERA_MAX_V4L2_NODES_COUNT];
int ion_fd;
struct exynox_camera_config *config;
struct smdk4x12_param *params;
struct smdk4x12_camera_callbacks callbacks;
int callback_lock;
int messages_enabled;
gralloc_module_t *gralloc;
// Capture
pthread_t capture_thread;
pthread_mutex_t capture_mutex;
pthread_mutex_t capture_lock_mutex;
int capture_thread_running;
int capture_thread_enabled;
int capture_enabled;
struct smdk4x12_camera_capture_listener *capture_listeners;
camera_memory_t *capture_memory;
int capture_memory_address;
int capture_memory_index;
void *capture_yuv_buffer;
void *capture_jpeg_buffer;
int capture_exif_flash;
int capture_exif_iso;
int capture_exif_exposure;
int capture_exif_exposure_bias;
int capture_exif_exposure_time;
int capture_hybrid;
int capture_width;
int capture_height;
int capture_format;
int capture_buffers_count;
int capture_buffer_length;
// Preview
pthread_t preview_thread;
pthread_mutex_t preview_mutex;
pthread_mutex_t preview_lock_mutex;
int preview_thread_running;
int preview_thread_enabled;
int preview_output_enabled;
struct smdk4x12_camera_capture_listener *preview_listener;
struct preview_stream_ops *preview_window;
struct smdk4x12_camera_buffer preview_buffer;
struct smdk4x12_v4l2_output preview_output;
// Picture
pthread_t picture_thread;
pthread_mutex_t picture_mutex;
pthread_mutex_t picture_lock_mutex;
int picture_thread_running;
int picture_thread_enabled;
int picture_enabled;
int picture_completed;
struct smdk4x12_camera_capture_listener *picture_listener;
camera_memory_t *picture_memory;
struct smdk4x12_camera_buffer picture_jpeg_buffer;
struct smdk4x12_camera_buffer picture_jpeg_thumbnail_buffer;
struct smdk4x12_camera_buffer picture_yuv_buffer;
struct smdk4x12_camera_buffer picture_yuv_thumbnail_buffer;
time_t picture_focus_timestamp;
// Recording
pthread_t recording_thread;
pthread_mutex_t recording_mutex;
pthread_mutex_t recording_lock_mutex;
int recording_thread_running;
int recording_thread_enabled;
int recording_output_enabled;
struct smdk4x12_camera_capture_listener *recording_listener;
camera_memory_t *recording_memory;
int recording_memory_index;
struct smdk4x12_camera_buffer recording_buffer;
struct smdk4x12_v4l2_output recording_output;
int recording_buffers_count;
int recording_buffer_length;
int recording_metadata;
// Auto-focus
pthread_t auto_focus_thread;
pthread_mutex_t auto_focus_mutex;
int auto_focus_thread_enabled;
int auto_focus_thread_running;
int auto_focus_result;
// Camera params
int camera_rotation;
int camera_hflip;
int camera_vflip;
int camera_capture_format;
int camera_picture_format;
int camera_fimc_is;
int camera_focal_length;
int camera_metering;
struct smdk4x12_camera_mbus_resolution *camera_mbus_resolutions;
int camera_mbus_resolutions_count;
int camera_sensor_mode;
int fimc_is_mode;
// Params
int preview_width;
int preview_height;
int preview_format;
int preview_fps;
int picture_width;
int picture_height;
int picture_format;
int jpeg_thumbnail_width;
int jpeg_thumbnail_height;
int jpeg_thumbnail_quality;
int jpeg_quality;
int recording_width;
int recording_height;
int recording_format;
int focus_mode;
int focus_x;
int focus_y;
int zoom;
int ae_lock;
int awb_lock;
int flash_mode;
int exposure_compensation;
int whitebalance;
int antibanding;
int scene_mode;
int effect;
int iso;
int metering;
int image_stabilization;
};
struct smdk4x12_camera_addrs {
unsigned int type;
unsigned int y;
unsigned int cbcr;
unsigned int index;
unsigned int reserved;
};
// This is because the linux header uses anonymous union
struct smdk4x12_v4l2_ext_control {
__u32 id;
__u32 size;
__u32 reserved2[1];
union {
__s32 value;
__s64 value64;
char *string;
} data;
} __attribute__ ((packed));
/*
* Camera
*/
// Camera
int smdk4x12_camera_start(struct smdk4x12_camera *smdk4x12_camera, int id);
void smdk4x12_camera_stop(struct smdk4x12_camera *smdk4x12_camera);
// Params
int smdk4x12_camera_params_init(struct smdk4x12_camera *smdk4x12_camera, int id);
int smdk4x12_camera_params_apply(struct smdk4x12_camera *smdk4x12_camera, int force);
// Capture
int smdk4x12_camera_capture(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_capture_thread_start(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_camera_capture_thread_stop(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_capture_start(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_camera_capture_stop(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_capture_setup(struct smdk4x12_camera *smdk4x12_camera);
struct smdk4x12_camera_capture_listener *smdk4x12_camera_capture_listener_register(
struct smdk4x12_camera *smdk4x12_camera, int width, int height, int format,
int (*callback)(struct smdk4x12_camera *smdk4x12_camera, struct smdk4x12_camera_buffer *buffers, int buffers_count));
void smdk4x12_camera_capture_listener_unregister(
struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_camera_capture_listener *listener);
// Preview
int smdk4x12_camera_preview_output_start(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_camera_preview_output_stop(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_preview_callback(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_camera_buffer *buffers, int buffers_count);
int smdk4x12_camera_preview(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_preview_thread_start(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_camera_preview_thread_stop(struct smdk4x12_camera *smdk4x12_camera);
// Picture
int smdk4x12_camera_picture_callback(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_camera_buffer *buffers, int buffers_count);
int smdk4x12_camera_picture(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_picture_thread_start(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_camera_picture_thread_stop(struct smdk4x12_camera *smdk4x12_camera);
// Recording
int smdk4x12_camera_recording_output_start(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_camera_recording_output_stop(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_recording_callback(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_camera_buffer *buffers, int buffers_count);
void smdk4x12_camera_recording_frame_release(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_recording(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_camera_recording_thread_start(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_camera_recording_thread_stop(struct smdk4x12_camera *smdk4x12_camera);
// Auto-focus
int smdk4x12_camera_auto_focus(struct smdk4x12_camera *smdk4x12_camera, int auto_focus_status);
int smdk4x12_camera_auto_focus_thread_start(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_camera_auto_focus_thread_stop(struct smdk4x12_camera *smdk4x12_camera);
/*
* EXIF
*/
int smdk4x12_exif_start(struct smdk4x12_camera *smdk4x12_camera, struct smdk4x12_exif *exif);
void smdk4x12_exif_stop(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_exif *exif);
int smdk4x12_exif(struct smdk4x12_camera *smdk4x12_camera, struct smdk4x12_exif *exif);
/*
* ION
*/
#ifdef EXYNOS_ION
int smdk4x12_ion_init(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_ion_open(struct smdk4x12_camera *smdk4x12_camera);
void smdk4x12_ion_close(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_ion_alloc(struct smdk4x12_camera *smdk4x12_camera, int size);
int smdk4x12_ion_free(struct smdk4x12_camera *smdk4x12_camera, int fd);
int smdk4x12_ion_phys(struct smdk4x12_camera *smdk4x12_camera, int fd);
int smdk4x12_ion_msync(struct smdk4x12_camera *smdk4x12_camera, int fd,
int offset, int size);
#endif
/*
* Jpeg
*/
int smdk4x12_jpeg_start(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_jpeg *jpeg);
void smdk4x12_jpeg_stop(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_jpeg *jpeg);
int smdk4x12_jpeg(struct smdk4x12_camera *smdk4x12_camera, struct smdk4x12_jpeg *jpeg);
/*
* Param
*/
int smdk4x12_param_int_get(struct smdk4x12_camera *smdk4x12_camera,
char *key);
float smdk4x12_param_float_get(struct smdk4x12_camera *smdk4x12_camera,
char *key);
char *smdk4x12_param_string_get(struct smdk4x12_camera *smdk4x12_camera,
char *key);
int smdk4x12_param_int_set(struct smdk4x12_camera *smdk4x12_camera,
char *key, int integer);
int smdk4x12_param_float_set(struct smdk4x12_camera *smdk4x12_camera,
char *key, float floating);
int smdk4x12_param_string_set(struct smdk4x12_camera *smdk4x12_camera,
char *key, char *string);
char *smdk4x12_params_string_get(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_params_string_set(struct smdk4x12_camera *smdk4x12_camera, char *string);
/*
* Utils
*/
int list_head_insert(struct list_head *list, struct list_head *prev,
struct list_head *next);
void list_head_remove(struct list_head *list);
int smdk4x12_camera_buffer_length(int width, int height, int format);
void smdk4x12_camera_yuv_planes(int width, int height, int format, int address, int *address_y, int *address_cb, int *address_cr);
int smdk4x12_gralloc_format(int format);
/*
* V4L2
*/
int smdk4x12_v4l2_init(struct smdk4x12_camera *smdk4x12_camera);
int smdk4x12_v4l2_index(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id);
int smdk4x12_v4l2_fd(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id);
int smdk4x12_v4l2_open(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id);
void smdk4x12_v4l2_close(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id);
int smdk4x12_v4l2_ioctl(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int request, void *data);
int smdk4x12_v4l2_poll(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id);
int smdk4x12_v4l2_qbuf(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int type, int memory, int index, unsigned long userptr);
int smdk4x12_v4l2_qbuf_cap(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int index);
int smdk4x12_v4l2_qbuf_out(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int index, unsigned long userptr);
int smdk4x12_v4l2_dqbuf(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int type, int memory);
int smdk4x12_v4l2_dqbuf_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id);
int smdk4x12_v4l2_dqbuf_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id);
int smdk4x12_v4l2_reqbufs(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int type, int memory, int count);
int smdk4x12_v4l2_reqbufs_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int count);
int smdk4x12_v4l2_reqbufs_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int count);
int smdk4x12_v4l2_querybuf(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int type, int memory, int index);
int smdk4x12_v4l2_querybuf_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int index);
int smdk4x12_v4l2_querybuf_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int index);
int smdk4x12_v4l2_querycap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int flags);
int smdk4x12_v4l2_querycap_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id);
int smdk4x12_v4l2_querycap_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id);
int smdk4x12_v4l2_streamon(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int type);
int smdk4x12_v4l2_streamon_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id);
int smdk4x12_v4l2_streamon_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id);
int smdk4x12_v4l2_streamoff(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int type);
int smdk4x12_v4l2_streamoff_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id);
int smdk4x12_v4l2_streamoff_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id);
int smdk4x12_v4l2_g_fmt(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int type, int *width, int *height, int *fmt);
int smdk4x12_v4l2_g_fmt_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int *width, int *height, int *fmt);
int smdk4x12_v4l2_g_fmt_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int *width, int *height, int *fmt);
int smdk4x12_v4l2_s_fmt_pix(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int type, int width, int height, int fmt, int field,
int priv);
int smdk4x12_v4l2_s_fmt_pix_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int width, int height, int fmt, int priv);
int smdk4x12_v4l2_s_fmt_pix_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int width, int height, int fmt, int priv);
int smdk4x12_v4l2_s_fmt_win(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int left, int top, int width, int height);
int smdk4x12_v4l2_enum_fmt(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int type, int fmt);
int smdk4x12_v4l2_enum_fmt_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int fmt);
int smdk4x12_v4l2_enum_fmt_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int fmt);
int smdk4x12_v4l2_enum_input(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int id);
int smdk4x12_v4l2_s_input(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int id);
int smdk4x12_v4l2_g_ext_ctrls(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, struct v4l2_ext_control *control, int count);
int smdk4x12_v4l2_g_ctrl(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int id, int *value);
int smdk4x12_v4l2_s_ctrl(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int id, int value);
int smdk4x12_v4l2_s_parm(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int type, struct v4l2_streamparm *streamparm);
int smdk4x12_v4l2_s_parm_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, struct v4l2_streamparm *streamparm);
int smdk4x12_v4l2_s_parm_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, struct v4l2_streamparm *streamparm);
int smdk4x12_v4l2_s_crop(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
int type, int left, int top, int width, int height);
int smdk4x12_v4l2_s_crop_cap(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int left, int top, int width, int height);
int smdk4x12_v4l2_s_crop_out(struct smdk4x12_camera *smdk4x12_camera,
int smdk4x12_v4l2_id, int left, int top, int width, int height);
int smdk4x12_v4l2_g_fbuf(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
void **base, int *width, int *height, int *fmt);
int smdk4x12_v4l2_s_fbuf(struct smdk4x12_camera *smdk4x12_camera, int smdk4x12_v4l2_id,
void *base, int width, int height, int fmt);
/*
* V4L2 Output
*/
int smdk4x12_v4l2_output_start(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_v4l2_output *output);
void smdk4x12_v4l2_output_stop(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_v4l2_output *output);
int smdk4x12_v4l2_output(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_v4l2_output *output, int buffer_address);
int smdk4x12_v4l2_output_release(struct smdk4x12_camera *smdk4x12_camera,
struct smdk4x12_v4l2_output *output);
#endif
|