xref: /linux/drivers/media/test-drivers/vivid/vivid-meta-cap.h (revision 26fbb4c8c7c3ee9a4c3b4de555a8587b5a19154e)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * vivid-meta-cap.h - meta capture support functions.
4  */
5 #ifndef _VIVID_META_CAP_H_
6 #define _VIVID_META_CAP_H_
7 
8 #define VIVID_META_CLOCK_UNIT	10 /* 100 MHz */
9 
10 struct vivid_uvc_meta_buf {
11 	__u64 ns;
12 	__u16 sof;
13 	__u8 length;
14 	__u8 flags;
15 	__u8 buf[10]; /* PTS(4)+STC(4)+SOF(2) */
16 } __packed;
17 
18 void vivid_meta_cap_fillbuff(struct vivid_dev *dev,
19 			     struct vivid_buffer *buf, u64 soe);
20 
21 int vidioc_enum_fmt_meta_cap(struct file *file, void  *priv,
22 			     struct v4l2_fmtdesc *f);
23 
24 int vidioc_g_fmt_meta_cap(struct file *file, void *priv,
25 			  struct v4l2_format *f);
26 
27 extern const struct vb2_ops vivid_meta_cap_qops;
28 
29 #endif
30