1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>v4l2_ctrl_auto_cluster</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-v4l2-ctrl-cluster.html" title="v4l2_ctrl_cluster"><link rel="next" href="API-v4l2-ctrl-find.html" title="v4l2_ctrl_find"></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">v4l2_ctrl_auto_cluster</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-v4l2-ctrl-cluster.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-v4l2-ctrl-find.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-v4l2-ctrl-auto-cluster"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>v4l2_ctrl_auto_cluster — 2 Mark all controls in the cluster as belonging to that cluster and set it up for autofoo/foo-type handling. 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">v4l2_ctrl_auto_cluster </b>(</code></td><td>unsigned <var class="pdparam">ncontrols</var>, </td></tr><tr><td> </td><td>struct v4l2_ctrl ** <var class="pdparam">controls</var>, </td></tr><tr><td> </td><td>u8 <var class="pdparam">manual_val</var>, </td></tr><tr><td> </td><td>bool <var class="pdparam">set_volatile</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.8.2.35.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>ncontrols</code></em></span></dt><dd><p> 4 The number of controls in this cluster. 5 </p></dd><dt><span class="term"><em class="parameter"><code>controls</code></em></span></dt><dd><p> 6 The cluster control array of size <em class="parameter"><code>ncontrols</code></em>. The first control 7 must be the 'auto' control (e.g. autogain, autoexposure, etc.) 8 </p></dd><dt><span class="term"><em class="parameter"><code>manual_val</code></em></span></dt><dd><p> 9 The value for the first control in the cluster that equals the 10 manual setting. 11 </p></dd><dt><span class="term"><em class="parameter"><code>set_volatile</code></em></span></dt><dd><p> 12 If true, then all controls except the first auto control will 13 be volatile. 14 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.8.2.35.6"></a><h2>Description</h2><p> 15 Use for control groups where one control selects some automatic feature and 16 the other controls are only active whenever the automatic feature is turned 17 off (manual mode). Typical examples: autogain vs gain, auto-whitebalance vs 18 red and blue balance, etc. 19</p></div><div class="refsect1"><a name="id-1.8.2.35.7"></a><h2>The behavior of such controls is as follows</h2><p> 20 </p><p> 21 22 When the autofoo control is set to automatic, then any manual controls 23 are set to inactive and any reads will call g_volatile_ctrl (if the control 24 was marked volatile). 25 </p><p> 26 27 When the autofoo control is set to manual, then any manual controls will 28 be marked active, and any reads will just return the current value without 29 going through g_volatile_ctrl. 30 </p><p> 31 32 In addition, this function will set the V4L2_CTRL_FLAG_UPDATE flag 33 on the autofoo control and V4L2_CTRL_FLAG_INACTIVE on the foo control(s) 34 if autofoo is in auto mode. 35</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-v4l2-ctrl-cluster.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-v4l2-ctrl-find.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">v4l2_ctrl_cluster</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">v4l2_ctrl_find</span></td></tr></table></div></body></html> 36