1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct v4l2_ctrl_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-ctrl-ptr.html" title="union v4l2_ctrl_ptr"><link rel="next" href="API-struct-v4l2-ctrl-type-ops.html" title="struct v4l2_ctrl_type_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_ctrl_ops</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-v4l2-ctrl-ptr.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-v4l2-ctrl-type-ops.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-v4l2-ctrl-ops"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct v4l2_ctrl_ops — 2 The control operations that the driver has to provide. 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct v4l2_ctrl_ops { 5 int (* g_volatile_ctrl) (struct v4l2_ctrl *ctrl); 6 int (* try_ctrl) (struct v4l2_ctrl *ctrl); 7 int (* s_ctrl) (struct v4l2_ctrl *ctrl); 8}; </pre></div><div class="refsect1"><a name="id-1.8.2.14.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">g_volatile_ctrl</span></dt><dd><p> 9 Get a new value for this control. Generally only relevant 10 for volatile (and usually read-only) controls such as a control 11 that returns the current signal strength which changes 12 continuously. 13 If not set, then the currently cached value will be returned. 14 </p></dd><dt><span class="term">try_ctrl</span></dt><dd><p> 15 Test whether the control's value is valid. Only relevant when 16 the usual min/max/step checks are not sufficient. 17 </p></dd><dt><span class="term">s_ctrl</span></dt><dd><p> 18 Actually set the new control value. s_ctrl is compulsory. The 19 ctrl->handler->lock is held when these ops are called, so no 20 one else can access controls owned by that handler. 21 </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-ctrl-ptr.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-ctrl-type-ops.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">union v4l2_ctrl_ptr</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_ctrl_type_ops</span></td></tr></table></div></body></html> 22