Merge tag 'media/v5.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[sfrench/cifs-2.6.git] / drivers / media / platform / vivid / vivid-core.h
index 7ebb14673c759e5e8b50aa7fa12f95cf3e509de7..59192b67231cca8207766e1ebd23abe23b48ecb6 100644 (file)
@@ -131,6 +131,8 @@ struct vivid_dev {
        struct media_pad                vbi_cap_pad;
        struct media_pad                vbi_out_pad;
        struct media_pad                sdr_cap_pad;
+       struct media_pad                meta_cap_pad;
+       struct media_pad                meta_out_pad;
 #endif
        struct v4l2_ctrl_handler        ctrl_hdl_user_gen;
        struct v4l2_ctrl_handler        ctrl_hdl_user_vid;
@@ -153,6 +155,11 @@ struct vivid_dev {
        struct v4l2_ctrl_handler        ctrl_hdl_radio_tx;
        struct video_device             sdr_cap_dev;
        struct v4l2_ctrl_handler        ctrl_hdl_sdr_cap;
+       struct video_device             meta_cap_dev;
+       struct v4l2_ctrl_handler        ctrl_hdl_meta_cap;
+       struct video_device             meta_out_dev;
+       struct v4l2_ctrl_handler        ctrl_hdl_meta_out;
+
        spinlock_t                      slock;
        struct mutex                    mutex;
 
@@ -164,6 +171,8 @@ struct vivid_dev {
        u32                             sdr_cap_caps;
        u32                             radio_rx_caps;
        u32                             radio_tx_caps;
+       u32                             meta_cap_caps;
+       u32                             meta_out_caps;
 
        /* supported features */
        bool                            multiplanar;
@@ -189,6 +198,9 @@ struct vivid_dev {
        bool                            has_radio_tx;
        bool                            has_sdr_cap;
        bool                            has_fb;
+       bool                            has_meta_cap;
+       bool                            has_meta_out;
+       bool                            has_tv_tuner;
 
        bool                            can_loop_video;
 
@@ -390,6 +402,8 @@ struct vivid_dev {
        struct list_head                vid_cap_active;
        struct vb2_queue                vb_vbi_cap_q;
        struct list_head                vbi_cap_active;
+       struct vb2_queue                vb_meta_cap_q;
+       struct list_head                meta_cap_active;
 
        /* thread for generating video capture stream */
        struct task_struct              *kthread_vid_cap;
@@ -407,6 +421,9 @@ struct vivid_dev {
        u32                             vbi_cap_seq_count;
        bool                            vbi_cap_streaming;
        bool                            stream_sliced_vbi_cap;
+       u32                             meta_cap_seq_start;
+       u32                             meta_cap_seq_count;
+       bool                            meta_cap_streaming;
 
        /* video output */
        const struct vivid_fmt          *fmt_out;
@@ -421,6 +438,8 @@ struct vivid_dev {
        struct list_head                vid_out_active;
        struct vb2_queue                vb_vbi_out_q;
        struct list_head                vbi_out_active;
+       struct vb2_queue                vb_meta_out_q;
+       struct list_head                meta_out_active;
 
        /* video loop precalculated rectangles */
 
@@ -461,6 +480,9 @@ struct vivid_dev {
        u32                             vbi_out_seq_count;
        bool                            vbi_out_streaming;
        bool                            stream_sliced_vbi_out;
+       u32                             meta_out_seq_start;
+       u32                             meta_out_seq_count;
+       bool                            meta_out_streaming;
 
        /* SDR capture */
        struct vb2_queue                vb_sdr_cap_q;
@@ -527,6 +549,9 @@ struct vivid_dev {
        /* CEC OSD String */
        char                            osd[14];
        unsigned long                   osd_jiffies;
+
+       bool                            meta_pts;
+       bool                            meta_scr;
 };
 
 static inline bool vivid_is_webcam(const struct vivid_dev *dev)