1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct v4l2_subdev_video_ops</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="mediadev.html#id-1.8.2" title="Video2Linux devices"><link rel="prev" href="API-struct-v4l2-mbus-frame-desc.html" title="struct v4l2_mbus_frame_desc"><link rel="next" href="API-struct-v4l2-subdev-vbi-ops.html" title="struct v4l2_subdev_vbi_ops"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct v4l2_subdev_video_ops</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-v4l2-mbus-frame-desc.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-v4l2-subdev-vbi-ops.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-v4l2-subdev-video-ops"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct v4l2_subdev_video_ops — 2 Callbacks used when v4l device was opened in video mode. 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct v4l2_subdev_video_ops { 5 int (* s_routing) (struct v4l2_subdev *sd, u32 input, u32 output, u32 config); 6 int (* s_crystal_freq) (struct v4l2_subdev *sd, u32 freq, u32 flags); 7 int (* g_std) (struct v4l2_subdev *sd, v4l2_std_id *norm); 8 int (* s_std) (struct v4l2_subdev *sd, v4l2_std_id norm); 9 int (* s_std_output) (struct v4l2_subdev *sd, v4l2_std_id std); 10 int (* g_std_output) (struct v4l2_subdev *sd, v4l2_std_id *std); 11 int (* querystd) (struct v4l2_subdev *sd, v4l2_std_id *std); 12 int (* g_tvnorms) (struct v4l2_subdev *sd, v4l2_std_id *std); 13 int (* g_tvnorms_output) (struct v4l2_subdev *sd, v4l2_std_id *std); 14 int (* g_input_status) (struct v4l2_subdev *sd, u32 *status); 15 int (* s_stream) (struct v4l2_subdev *sd, int enable); 16 int (* cropcap) (struct v4l2_subdev *sd, struct v4l2_cropcap *cc); 17 int (* g_crop) (struct v4l2_subdev *sd, struct v4l2_crop *crop); 18 int (* s_crop) (struct v4l2_subdev *sd, const struct v4l2_crop *crop); 19 int (* g_parm) (struct v4l2_subdev *sd, struct v4l2_streamparm *param); 20 int (* s_parm) (struct v4l2_subdev *sd, struct v4l2_streamparm *param); 21 int (* g_frame_interval) (struct v4l2_subdev *sd,struct v4l2_subdev_frame_interval *interval); 22 int (* s_frame_interval) (struct v4l2_subdev *sd,struct v4l2_subdev_frame_interval *interval); 23 int (* s_dv_timings) (struct v4l2_subdev *sd,struct v4l2_dv_timings *timings); 24 int (* g_dv_timings) (struct v4l2_subdev *sd,struct v4l2_dv_timings *timings); 25 int (* query_dv_timings) (struct v4l2_subdev *sd,struct v4l2_dv_timings *timings); 26 int (* g_mbus_config) (struct v4l2_subdev *sd,struct v4l2_mbus_config *cfg); 27 int (* s_mbus_config) (struct v4l2_subdev *sd,const struct v4l2_mbus_config *cfg); 28 int (* s_rx_buffer) (struct v4l2_subdev *sd, void *buf,unsigned int *size); 29}; </pre></div><div class="refsect1"><a name="id-1.8.2.84.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">s_routing</span></dt><dd><p> 30 see s_routing in audio_ops, except this version is for video 31 devices. 32 </p></dd><dt><span class="term">s_crystal_freq</span></dt><dd><p> 33 sets the frequency of the crystal used to generate the 34 clocks in Hz. An extra flags field allows device specific configuration 35 regarding clock frequency dividers, etc. If not used, then set flags 36 to 0. If the frequency is not supported, then -EINVAL is returned. 37 </p></dd><dt><span class="term">g_std</span></dt><dd><p> 38 callback for VIDIOC_G_STD ioctl handler code. 39 </p></dd><dt><span class="term">s_std</span></dt><dd><p> 40 callback for VIDIOC_S_STD ioctl handler code. 41 </p></dd><dt><span class="term">s_std_output</span></dt><dd><p> 42 set v4l2_std_id for video OUTPUT devices. This is ignored by 43 video input devices. 44 </p></dd><dt><span class="term">g_std_output</span></dt><dd><p> 45 get current standard for video OUTPUT devices. This is ignored 46 by video input devices. 47 </p></dd><dt><span class="term">querystd</span></dt><dd><p> 48 callback for VIDIOC_QUERYSTD ioctl handler code. 49 </p></dd><dt><span class="term">g_tvnorms</span></dt><dd><p> 50 get v4l2_std_id with all standards supported by the video 51 CAPTURE device. This is ignored by video output devices. 52 </p></dd><dt><span class="term">g_tvnorms_output</span></dt><dd><p> 53 get v4l2_std_id with all standards supported by the video 54 OUTPUT device. This is ignored by video capture devices. 55 </p></dd><dt><span class="term">g_input_status</span></dt><dd><p> 56 get input status. Same as the status field in the v4l2_input 57 struct. 58 </p></dd><dt><span class="term">s_stream</span></dt><dd><p> 59 used to notify the driver that a video stream will start or has 60 stopped. 61 </p></dd><dt><span class="term">cropcap</span></dt><dd><p> 62 callback for VIDIOC_CROPCAP ioctl handler code. 63 </p></dd><dt><span class="term">g_crop</span></dt><dd><p> 64 callback for VIDIOC_G_CROP ioctl handler code. 65 </p></dd><dt><span class="term">s_crop</span></dt><dd><p> 66 callback for VIDIOC_S_CROP ioctl handler code. 67 </p></dd><dt><span class="term">g_parm</span></dt><dd><p> 68 callback for VIDIOC_G_PARM ioctl handler code. 69 </p></dd><dt><span class="term">s_parm</span></dt><dd><p> 70 callback for VIDIOC_S_PARM ioctl handler code. 71 </p></dd><dt><span class="term">g_frame_interval</span></dt><dd><p> 72 callback for VIDIOC_G_FRAMEINTERVAL ioctl handler code. 73 </p></dd><dt><span class="term">s_frame_interval</span></dt><dd><p> 74 callback for VIDIOC_S_FRAMEINTERVAL ioctl handler code. 75 </p></dd><dt><span class="term">s_dv_timings</span></dt><dd><p> 76 Set custom dv timings in the sub device. This is used 77 when sub device is capable of setting detailed timing information 78 in the hardware to generate/detect the video signal. 79 </p></dd><dt><span class="term">g_dv_timings</span></dt><dd><p> 80 Get custom dv timings in the sub device. 81 </p></dd><dt><span class="term">query_dv_timings</span></dt><dd><p> 82 callback for VIDIOC_QUERY_DV_TIMINGS ioctl handler code. 83 </p></dd><dt><span class="term">g_mbus_config</span></dt><dd><p> 84 get supported mediabus configurations 85 </p></dd><dt><span class="term">s_mbus_config</span></dt><dd><p> 86 set a certain mediabus configuration. This operation is added 87 for compatibility with soc-camera drivers and should not be used by new 88 software. 89 </p></dd><dt><span class="term">s_rx_buffer</span></dt><dd><p> 90 set a host allocated memory buffer for the subdev. The subdev 91 can adjust <em class="parameter"><code>size</code></em> to a lower value and must not write more data to the 92 buffer starting at <em class="parameter"><code>data</code></em> than the original value of <em class="parameter"><code>size</code></em>. 93 </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-v4l2-mbus-frame-desc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mediadev.html#id-1.8.2">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-v4l2-subdev-vbi-ops.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct v4l2_mbus_frame_desc</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct v4l2_subdev_vbi_ops</span></td></tr></table></div></body></html> 94