4 * Qualcomm MSM Camera Subsystem - V4L2 device node
6 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
7 * Copyright (C) 2015-2017 Linaro Ltd.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 and
11 * only version 2 as published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 #ifndef QC_MSM_CAMSS_VIDEO_H
19 #define QC_MSM_CAMSS_VIDEO_H
21 #include <linux/mutex.h>
22 #include <linux/videodev2.h>
23 #include <media/media-entity.h>
24 #include <media/v4l2-dev.h>
25 #include <media/v4l2-device.h>
26 #include <media/v4l2-fh.h>
27 #include <media/v4l2-mediabus.h>
28 #include <media/videobuf2-v4l2.h>
31 struct vb2_v4l2_buffer vb
;
33 struct list_head queue
;
38 struct camss_video_ops
{
39 int (*queue_buffer
)(struct camss_video
*vid
, struct camss_buffer
*buf
);
40 int (*flush_buffers
)(struct camss_video
*vid
,
41 enum vb2_buffer_state state
);
44 struct camss_format_info
;
48 struct vb2_queue vb2_q
;
49 struct video_device vdev
;
51 struct v4l2_format active_fmt
;
52 enum v4l2_buf_type type
;
53 struct media_pipeline pipe
;
54 const struct camss_video_ops
*ops
;
57 unsigned int bpl_alignment
;
58 unsigned int line_based
;
59 const struct camss_format_info
*formats
;
60 unsigned int nformats
;
63 void msm_video_stop_streaming(struct camss_video
*video
);
65 int msm_video_register(struct camss_video
*video
, struct v4l2_device
*v4l2_dev
,
66 const char *name
, int is_pix
);
68 void msm_video_unregister(struct camss_video
*video
);
70 #endif /* QC_MSM_CAMSS_VIDEO_H */