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