controls.xml 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394
  1. <section id="control">
  2. <title>User Controls</title>
  3. <para>Devices typically have a number of user-settable controls
  4. such as brightness, saturation and so on, which would be presented to
  5. the user on a graphical user interface. But, different devices
  6. will have different controls available, and furthermore, the range of
  7. possible values, and the default value will vary from device to
  8. device. The control ioctls provide the information and a mechanism to
  9. create a nice user interface for these controls that will work
  10. correctly with any device.</para>
  11. <para>All controls are accessed using an ID value. V4L2 defines
  12. several IDs for specific purposes. Drivers can also implement their
  13. own custom controls using <constant>V4L2_CID_PRIVATE_BASE</constant>
  14. and higher values. The pre-defined control IDs have the prefix
  15. <constant>V4L2_CID_</constant>, and are listed in <xref
  16. linkend="control-id" />. The ID is used when querying the attributes of
  17. a control, and when getting or setting the current value.</para>
  18. <para>Generally applications should present controls to the user
  19. without assumptions about their purpose. Each control comes with a
  20. name string the user is supposed to understand. When the purpose is
  21. non-intuitive the driver writer should provide a user manual, a user
  22. interface plug-in or a driver specific panel application. Predefined
  23. IDs were introduced to change a few controls programmatically, for
  24. example to mute a device during a channel switch.</para>
  25. <para>Drivers may enumerate different controls after switching
  26. the current video input or output, tuner or modulator, or audio input
  27. or output. Different in the sense of other bounds, another default and
  28. current value, step size or other menu items. A control with a certain
  29. <emphasis>custom</emphasis> ID can also change name and
  30. type.<footnote>
  31. <para>It will be more convenient for applications if drivers
  32. make use of the <constant>V4L2_CTRL_FLAG_DISABLED</constant> flag, but
  33. that was never required.</para>
  34. </footnote> Control values are stored globally, they do not
  35. change when switching except to stay within the reported bounds. They
  36. also do not change &eg; when the device is opened or closed, when the
  37. tuner radio frequency is changed or generally never without
  38. application request. Since V4L2 specifies no event mechanism, panel
  39. applications intended to cooperate with other panel applications (be
  40. they built into a larger application, as a TV viewer) may need to
  41. regularly poll control values to update their user
  42. interface.<footnote>
  43. <para>Applications could call an ioctl to request events.
  44. After another process called &VIDIOC-S-CTRL; or another ioctl changing
  45. shared properties the &func-select; function would indicate
  46. readability until any ioctl (querying the properties) is
  47. called.</para>
  48. </footnote></para>
  49. <para>
  50. All controls use machine endianness.
  51. </para>
  52. <table pgwide="1" frame="none" id="control-id">
  53. <title>Control IDs</title>
  54. <tgroup cols="3">
  55. &cs-def;
  56. <thead>
  57. <row>
  58. <entry>ID</entry>
  59. <entry>Type</entry>
  60. <entry>Description</entry>
  61. </row>
  62. </thead>
  63. <tbody valign="top">
  64. <row>
  65. <entry><constant>V4L2_CID_BASE</constant></entry>
  66. <entry></entry>
  67. <entry>First predefined ID, equal to
  68. <constant>V4L2_CID_BRIGHTNESS</constant>.</entry>
  69. </row>
  70. <row>
  71. <entry><constant>V4L2_CID_USER_BASE</constant></entry>
  72. <entry></entry>
  73. <entry>Synonym of <constant>V4L2_CID_BASE</constant>.</entry>
  74. </row>
  75. <row>
  76. <entry><constant>V4L2_CID_BRIGHTNESS</constant></entry>
  77. <entry>integer</entry>
  78. <entry>Picture brightness, or more precisely, the black
  79. level.</entry>
  80. </row>
  81. <row>
  82. <entry><constant>V4L2_CID_CONTRAST</constant></entry>
  83. <entry>integer</entry>
  84. <entry>Picture contrast or luma gain.</entry>
  85. </row>
  86. <row>
  87. <entry><constant>V4L2_CID_SATURATION</constant></entry>
  88. <entry>integer</entry>
  89. <entry>Picture color saturation or chroma gain.</entry>
  90. </row>
  91. <row>
  92. <entry><constant>V4L2_CID_HUE</constant></entry>
  93. <entry>integer</entry>
  94. <entry>Hue or color balance.</entry>
  95. </row>
  96. <row>
  97. <entry><constant>V4L2_CID_AUDIO_VOLUME</constant></entry>
  98. <entry>integer</entry>
  99. <entry>Overall audio volume. Note some drivers also
  100. provide an OSS or ALSA mixer interface.</entry>
  101. </row>
  102. <row>
  103. <entry><constant>V4L2_CID_AUDIO_BALANCE</constant></entry>
  104. <entry>integer</entry>
  105. <entry>Audio stereo balance. Minimum corresponds to all
  106. the way left, maximum to right.</entry>
  107. </row>
  108. <row>
  109. <entry><constant>V4L2_CID_AUDIO_BASS</constant></entry>
  110. <entry>integer</entry>
  111. <entry>Audio bass adjustment.</entry>
  112. </row>
  113. <row>
  114. <entry><constant>V4L2_CID_AUDIO_TREBLE</constant></entry>
  115. <entry>integer</entry>
  116. <entry>Audio treble adjustment.</entry>
  117. </row>
  118. <row>
  119. <entry><constant>V4L2_CID_AUDIO_MUTE</constant></entry>
  120. <entry>boolean</entry>
  121. <entry>Mute audio, &ie; set the volume to zero, however
  122. without affecting <constant>V4L2_CID_AUDIO_VOLUME</constant>. Like
  123. ALSA drivers, V4L2 drivers must mute at load time to avoid excessive
  124. noise. Actually the entire device should be reset to a low power
  125. consumption state.</entry>
  126. </row>
  127. <row>
  128. <entry><constant>V4L2_CID_AUDIO_LOUDNESS</constant></entry>
  129. <entry>boolean</entry>
  130. <entry>Loudness mode (bass boost).</entry>
  131. </row>
  132. <row>
  133. <entry><constant>V4L2_CID_BLACK_LEVEL</constant></entry>
  134. <entry>integer</entry>
  135. <entry>Another name for brightness (not a synonym of
  136. <constant>V4L2_CID_BRIGHTNESS</constant>). This control is deprecated
  137. and should not be used in new drivers and applications.</entry>
  138. </row>
  139. <row>
  140. <entry><constant>V4L2_CID_AUTO_WHITE_BALANCE</constant></entry>
  141. <entry>boolean</entry>
  142. <entry>Automatic white balance (cameras).</entry>
  143. </row>
  144. <row>
  145. <entry><constant>V4L2_CID_DO_WHITE_BALANCE</constant></entry>
  146. <entry>button</entry>
  147. <entry>This is an action control. When set (the value is
  148. ignored), the device will do a white balance and then hold the current
  149. setting. Contrast this with the boolean
  150. <constant>V4L2_CID_AUTO_WHITE_BALANCE</constant>, which, when
  151. activated, keeps adjusting the white balance.</entry>
  152. </row>
  153. <row>
  154. <entry><constant>V4L2_CID_RED_BALANCE</constant></entry>
  155. <entry>integer</entry>
  156. <entry>Red chroma balance.</entry>
  157. </row>
  158. <row>
  159. <entry><constant>V4L2_CID_BLUE_BALANCE</constant></entry>
  160. <entry>integer</entry>
  161. <entry>Blue chroma balance.</entry>
  162. </row>
  163. <row>
  164. <entry><constant>V4L2_CID_GAMMA</constant></entry>
  165. <entry>integer</entry>
  166. <entry>Gamma adjust.</entry>
  167. </row>
  168. <row>
  169. <entry><constant>V4L2_CID_WHITENESS</constant></entry>
  170. <entry>integer</entry>
  171. <entry>Whiteness for grey-scale devices. This is a synonym
  172. for <constant>V4L2_CID_GAMMA</constant>. This control is deprecated
  173. and should not be used in new drivers and applications.</entry>
  174. </row>
  175. <row>
  176. <entry><constant>V4L2_CID_EXPOSURE</constant></entry>
  177. <entry>integer</entry>
  178. <entry>Exposure (cameras). [Unit?]</entry>
  179. </row>
  180. <row>
  181. <entry><constant>V4L2_CID_AUTOGAIN</constant></entry>
  182. <entry>boolean</entry>
  183. <entry>Automatic gain/exposure control.</entry>
  184. </row>
  185. <row>
  186. <entry><constant>V4L2_CID_GAIN</constant></entry>
  187. <entry>integer</entry>
  188. <entry>Gain control.</entry>
  189. </row>
  190. <row>
  191. <entry><constant>V4L2_CID_HFLIP</constant></entry>
  192. <entry>boolean</entry>
  193. <entry>Mirror the picture horizontally.</entry>
  194. </row>
  195. <row>
  196. <entry><constant>V4L2_CID_VFLIP</constant></entry>
  197. <entry>boolean</entry>
  198. <entry>Mirror the picture vertically.</entry>
  199. </row>
  200. <row>
  201. <entry><constant>V4L2_CID_HCENTER_DEPRECATED</constant> (formerly <constant>V4L2_CID_HCENTER</constant>)</entry>
  202. <entry>integer</entry>
  203. <entry>Horizontal image centering. This control is
  204. deprecated. New drivers and applications should use the <link
  205. linkend="camera-controls">Camera class controls</link>
  206. <constant>V4L2_CID_PAN_ABSOLUTE</constant>,
  207. <constant>V4L2_CID_PAN_RELATIVE</constant> and
  208. <constant>V4L2_CID_PAN_RESET</constant> instead.</entry>
  209. </row>
  210. <row>
  211. <entry><constant>V4L2_CID_VCENTER_DEPRECATED</constant>
  212. (formerly <constant>V4L2_CID_VCENTER</constant>)</entry>
  213. <entry>integer</entry>
  214. <entry>Vertical image centering. Centering is intended to
  215. <emphasis>physically</emphasis> adjust cameras. For image cropping see
  216. <xref linkend="crop" />, for clipping <xref linkend="overlay" />. This
  217. control is deprecated. New drivers and applications should use the
  218. <link linkend="camera-controls">Camera class controls</link>
  219. <constant>V4L2_CID_TILT_ABSOLUTE</constant>,
  220. <constant>V4L2_CID_TILT_RELATIVE</constant> and
  221. <constant>V4L2_CID_TILT_RESET</constant> instead.</entry>
  222. </row>
  223. <row id="v4l2-power-line-frequency">
  224. <entry><constant>V4L2_CID_POWER_LINE_FREQUENCY</constant></entry>
  225. <entry>enum</entry>
  226. <entry>Enables a power line frequency filter to avoid
  227. flicker. Possible values for <constant>enum v4l2_power_line_frequency</constant> are:
  228. <constant>V4L2_CID_POWER_LINE_FREQUENCY_DISABLED</constant> (0),
  229. <constant>V4L2_CID_POWER_LINE_FREQUENCY_50HZ</constant> (1) and
  230. <constant>V4L2_CID_POWER_LINE_FREQUENCY_60HZ</constant> (2).</entry>
  231. </row>
  232. <row>
  233. <entry><constant>V4L2_CID_HUE_AUTO</constant></entry>
  234. <entry>boolean</entry>
  235. <entry>Enables automatic hue control by the device. The
  236. effect of setting <constant>V4L2_CID_HUE</constant> while automatic
  237. hue control is enabled is undefined, drivers should ignore such
  238. request.</entry>
  239. </row>
  240. <row>
  241. <entry><constant>V4L2_CID_WHITE_BALANCE_TEMPERATURE</constant></entry>
  242. <entry>integer</entry>
  243. <entry>This control specifies the white balance settings
  244. as a color temperature in Kelvin. A driver should have a minimum of
  245. 2800 (incandescent) to 6500 (daylight). For more information about
  246. color temperature see <ulink
  247. url="http://en.wikipedia.org/wiki/Color_temperature">Wikipedia</ulink>.</entry>
  248. </row>
  249. <row>
  250. <entry><constant>V4L2_CID_SHARPNESS</constant></entry>
  251. <entry>integer</entry>
  252. <entry>Adjusts the sharpness filters in a camera. The
  253. minimum value disables the filters, higher values give a sharper
  254. picture.</entry>
  255. </row>
  256. <row>
  257. <entry><constant>V4L2_CID_BACKLIGHT_COMPENSATION</constant></entry>
  258. <entry>integer</entry>
  259. <entry>Adjusts the backlight compensation in a camera. The
  260. minimum value disables backlight compensation.</entry>
  261. </row>
  262. <row>
  263. <entry><constant>V4L2_CID_CHROMA_AGC</constant></entry>
  264. <entry>boolean</entry>
  265. <entry>Chroma automatic gain control.</entry>
  266. </row>
  267. <row>
  268. <entry><constant>V4L2_CID_CHROMA_GAIN</constant></entry>
  269. <entry>integer</entry>
  270. <entry>Adjusts the Chroma gain control (for use when chroma AGC
  271. is disabled).</entry>
  272. </row>
  273. <row>
  274. <entry><constant>V4L2_CID_COLOR_KILLER</constant></entry>
  275. <entry>boolean</entry>
  276. <entry>Enable the color killer (&ie; force a black &amp; white image in case of a weak video signal).</entry>
  277. </row>
  278. <row id="v4l2-colorfx">
  279. <entry><constant>V4L2_CID_COLORFX</constant></entry>
  280. <entry>enum</entry>
  281. <entry>Selects a color effect. Possible values for
  282. <constant>enum v4l2_colorfx</constant> are:
  283. <constant>V4L2_COLORFX_NONE</constant> (0),
  284. <constant>V4L2_COLORFX_BW</constant> (1),
  285. <constant>V4L2_COLORFX_SEPIA</constant> (2),
  286. <constant>V4L2_COLORFX_NEGATIVE</constant> (3),
  287. <constant>V4L2_COLORFX_EMBOSS</constant> (4),
  288. <constant>V4L2_COLORFX_SKETCH</constant> (5),
  289. <constant>V4L2_COLORFX_SKY_BLUE</constant> (6),
  290. <constant>V4L2_COLORFX_GRASS_GREEN</constant> (7),
  291. <constant>V4L2_COLORFX_SKIN_WHITEN</constant> (8) and
  292. <constant>V4L2_COLORFX_VIVID</constant> (9).</entry>
  293. </row>
  294. <row>
  295. <entry><constant>V4L2_CID_ROTATE</constant></entry>
  296. <entry>integer</entry>
  297. <entry>Rotates the image by specified angle. Common angles are 90,
  298. 270 and 180. Rotating the image to 90 and 270 will reverse the height
  299. and width of the display window. It is necessary to set the new height and
  300. width of the picture using the &VIDIOC-S-FMT; ioctl according to
  301. the rotation angle selected.</entry>
  302. </row>
  303. <row>
  304. <entry><constant>V4L2_CID_BG_COLOR</constant></entry>
  305. <entry>integer</entry>
  306. <entry>Sets the background color on the current output device.
  307. Background color needs to be specified in the RGB24 format. The
  308. supplied 32 bit value is interpreted as bits 0-7 Red color information,
  309. bits 8-15 Green color information, bits 16-23 Blue color
  310. information and bits 24-31 must be zero.</entry>
  311. </row>
  312. <row>
  313. <entry><constant>V4L2_CID_ILLUMINATORS_1</constant>
  314. <constant>V4L2_CID_ILLUMINATORS_2</constant></entry>
  315. <entry>boolean</entry>
  316. <entry>Switch on or off the illuminator 1 or 2 of the device
  317. (usually a microscope).</entry>
  318. </row>
  319. <row>
  320. <entry><constant>V4L2_CID_LASTP1</constant></entry>
  321. <entry></entry>
  322. <entry>End of the predefined control IDs (currently
  323. <constant>V4L2_CID_ILLUMINATORS_2</constant> + 1).</entry>
  324. </row>
  325. <row>
  326. <entry><constant>V4L2_CID_PRIVATE_BASE</constant></entry>
  327. <entry></entry>
  328. <entry>ID of the first custom (driver specific) control.
  329. Applications depending on particular custom controls should check the
  330. driver name and version, see <xref linkend="querycap" />.</entry>
  331. </row>
  332. </tbody>
  333. </tgroup>
  334. </table>
  335. <para>Applications can enumerate the available controls with the
  336. &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls, get and set a
  337. control value with the &VIDIOC-G-CTRL; and &VIDIOC-S-CTRL; ioctls.
  338. Drivers must implement <constant>VIDIOC_QUERYCTRL</constant>,
  339. <constant>VIDIOC_G_CTRL</constant> and
  340. <constant>VIDIOC_S_CTRL</constant> when the device has one or more
  341. controls, <constant>VIDIOC_QUERYMENU</constant> when it has one or
  342. more menu type controls.</para>
  343. <example>
  344. <title>Enumerating all controls</title>
  345. <programlisting>
  346. &v4l2-queryctrl; queryctrl;
  347. &v4l2-querymenu; querymenu;
  348. static void
  349. enumerate_menu (void)
  350. {
  351. printf (" Menu items:\n");
  352. memset (&amp;querymenu, 0, sizeof (querymenu));
  353. querymenu.id = queryctrl.id;
  354. for (querymenu.index = queryctrl.minimum;
  355. querymenu.index &lt;= queryctrl.maximum;
  356. querymenu.index++) {
  357. if (0 == ioctl (fd, &VIDIOC-QUERYMENU;, &amp;querymenu)) {
  358. printf (" %s\n", querymenu.name);
  359. }
  360. }
  361. }
  362. memset (&amp;queryctrl, 0, sizeof (queryctrl));
  363. for (queryctrl.id = V4L2_CID_BASE;
  364. queryctrl.id &lt; V4L2_CID_LASTP1;
  365. queryctrl.id++) {
  366. if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
  367. if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
  368. continue;
  369. printf ("Control %s\n", queryctrl.name);
  370. if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
  371. enumerate_menu ();
  372. } else {
  373. if (errno == EINVAL)
  374. continue;
  375. perror ("VIDIOC_QUERYCTRL");
  376. exit (EXIT_FAILURE);
  377. }
  378. }
  379. for (queryctrl.id = V4L2_CID_PRIVATE_BASE;;
  380. queryctrl.id++) {
  381. if (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
  382. if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED)
  383. continue;
  384. printf ("Control %s\n", queryctrl.name);
  385. if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
  386. enumerate_menu ();
  387. } else {
  388. if (errno == EINVAL)
  389. break;
  390. perror ("VIDIOC_QUERYCTRL");
  391. exit (EXIT_FAILURE);
  392. }
  393. }
  394. </programlisting>
  395. </example>
  396. <example>
  397. <title>Changing controls</title>
  398. <programlisting>
  399. &v4l2-queryctrl; queryctrl;
  400. &v4l2-control; control;
  401. memset (&amp;queryctrl, 0, sizeof (queryctrl));
  402. queryctrl.id = V4L2_CID_BRIGHTNESS;
  403. if (-1 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;queryctrl)) {
  404. if (errno != EINVAL) {
  405. perror ("VIDIOC_QUERYCTRL");
  406. exit (EXIT_FAILURE);
  407. } else {
  408. printf ("V4L2_CID_BRIGHTNESS is not supported\n");
  409. }
  410. } else if (queryctrl.flags &amp; V4L2_CTRL_FLAG_DISABLED) {
  411. printf ("V4L2_CID_BRIGHTNESS is not supported\n");
  412. } else {
  413. memset (&amp;control, 0, sizeof (control));
  414. control.id = V4L2_CID_BRIGHTNESS;
  415. control.value = queryctrl.default_value;
  416. if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)) {
  417. perror ("VIDIOC_S_CTRL");
  418. exit (EXIT_FAILURE);
  419. }
  420. }
  421. memset (&amp;control, 0, sizeof (control));
  422. control.id = V4L2_CID_CONTRAST;
  423. if (0 == ioctl (fd, &VIDIOC-G-CTRL;, &amp;control)) {
  424. control.value += 1;
  425. /* The driver may clamp the value or return ERANGE, ignored here */
  426. if (-1 == ioctl (fd, &VIDIOC-S-CTRL;, &amp;control)
  427. &amp;&amp; errno != ERANGE) {
  428. perror ("VIDIOC_S_CTRL");
  429. exit (EXIT_FAILURE);
  430. }
  431. /* Ignore if V4L2_CID_CONTRAST is unsupported */
  432. } else if (errno != EINVAL) {
  433. perror ("VIDIOC_G_CTRL");
  434. exit (EXIT_FAILURE);
  435. }
  436. control.id = V4L2_CID_AUDIO_MUTE;
  437. control.value = TRUE; /* silence */
  438. /* Errors ignored */
  439. ioctl (fd, VIDIOC_S_CTRL, &amp;control);
  440. </programlisting>
  441. </example>
  442. </section>
  443. <section id="extended-controls">
  444. <title>Extended Controls</title>
  445. <section>
  446. <title>Introduction</title>
  447. <para>The control mechanism as originally designed was meant
  448. to be used for user settings (brightness, saturation, etc). However,
  449. it turned out to be a very useful model for implementing more
  450. complicated driver APIs where each driver implements only a subset of
  451. a larger API.</para>
  452. <para>The MPEG encoding API was the driving force behind
  453. designing and implementing this extended control mechanism: the MPEG
  454. standard is quite large and the currently supported hardware MPEG
  455. encoders each only implement a subset of this standard. Further more,
  456. many parameters relating to how the video is encoded into an MPEG
  457. stream are specific to the MPEG encoding chip since the MPEG standard
  458. only defines the format of the resulting MPEG stream, not how the
  459. video is actually encoded into that format.</para>
  460. <para>Unfortunately, the original control API lacked some
  461. features needed for these new uses and so it was extended into the
  462. (not terribly originally named) extended control API.</para>
  463. <para>Even though the MPEG encoding API was the first effort
  464. to use the Extended Control API, nowadays there are also other classes
  465. of Extended Controls, such as Camera Controls and FM Transmitter Controls.
  466. The Extended Controls API as well as all Extended Controls classes are
  467. described in the following text.</para>
  468. </section>
  469. <section>
  470. <title>The Extended Control API</title>
  471. <para>Three new ioctls are available: &VIDIOC-G-EXT-CTRLS;,
  472. &VIDIOC-S-EXT-CTRLS; and &VIDIOC-TRY-EXT-CTRLS;. These ioctls act on
  473. arrays of controls (as opposed to the &VIDIOC-G-CTRL; and
  474. &VIDIOC-S-CTRL; ioctls that act on a single control). This is needed
  475. since it is often required to atomically change several controls at
  476. once.</para>
  477. <para>Each of the new ioctls expects a pointer to a
  478. &v4l2-ext-controls;. This structure contains a pointer to the control
  479. array, a count of the number of controls in that array and a control
  480. class. Control classes are used to group similar controls into a
  481. single class. For example, control class
  482. <constant>V4L2_CTRL_CLASS_USER</constant> contains all user controls
  483. (&ie; all controls that can also be set using the old
  484. <constant>VIDIOC_S_CTRL</constant> ioctl). Control class
  485. <constant>V4L2_CTRL_CLASS_MPEG</constant> contains all controls
  486. relating to MPEG encoding, etc.</para>
  487. <para>All controls in the control array must belong to the
  488. specified control class. An error is returned if this is not the
  489. case.</para>
  490. <para>It is also possible to use an empty control array (count
  491. == 0) to check whether the specified control class is
  492. supported.</para>
  493. <para>The control array is a &v4l2-ext-control; array. The
  494. <structname>v4l2_ext_control</structname> structure is very similar to
  495. &v4l2-control;, except for the fact that it also allows for 64-bit
  496. values and pointers to be passed.</para>
  497. <para>It is important to realize that due to the flexibility of
  498. controls it is necessary to check whether the control you want to set
  499. actually is supported in the driver and what the valid range of values
  500. is. So use the &VIDIOC-QUERYCTRL; and &VIDIOC-QUERYMENU; ioctls to
  501. check this. Also note that it is possible that some of the menu
  502. indices in a control of type <constant>V4L2_CTRL_TYPE_MENU</constant>
  503. may not be supported (<constant>VIDIOC_QUERYMENU</constant> will
  504. return an error). A good example is the list of supported MPEG audio
  505. bitrates. Some drivers only support one or two bitrates, others
  506. support a wider range.</para>
  507. <para>
  508. All controls use machine endianness.
  509. </para>
  510. </section>
  511. <section>
  512. <title>Enumerating Extended Controls</title>
  513. <para>The recommended way to enumerate over the extended
  514. controls is by using &VIDIOC-QUERYCTRL; in combination with the
  515. <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag:</para>
  516. <informalexample>
  517. <programlisting>
  518. &v4l2-queryctrl; qctrl;
  519. qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
  520. while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
  521. /* ... */
  522. qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
  523. }
  524. </programlisting>
  525. </informalexample>
  526. <para>The initial control ID is set to 0 ORed with the
  527. <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant> flag. The
  528. <constant>VIDIOC_QUERYCTRL</constant> ioctl will return the first
  529. control with a higher ID than the specified one. When no such controls
  530. are found an error is returned.</para>
  531. <para>If you want to get all controls within a specific control
  532. class, then you can set the initial
  533. <structfield>qctrl.id</structfield> value to the control class and add
  534. an extra check to break out of the loop when a control of another
  535. control class is found:</para>
  536. <informalexample>
  537. <programlisting>
  538. qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
  539. while (0 == ioctl (fd, &VIDIOC-QUERYCTRL;, &amp;qctrl)) {
  540. if (V4L2_CTRL_ID2CLASS (qctrl.id) != V4L2_CTRL_CLASS_MPEG)
  541. break;
  542. /* ... */
  543. qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
  544. }
  545. </programlisting>
  546. </informalexample>
  547. <para>The 32-bit <structfield>qctrl.id</structfield> value is
  548. subdivided into three bit ranges: the top 4 bits are reserved for
  549. flags (&eg; <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>) and are not
  550. actually part of the ID. The remaining 28 bits form the control ID, of
  551. which the most significant 12 bits define the control class and the
  552. least significant 16 bits identify the control within the control
  553. class. It is guaranteed that these last 16 bits are always non-zero
  554. for controls. The range of 0x1000 and up are reserved for
  555. driver-specific controls. The macro
  556. <constant>V4L2_CTRL_ID2CLASS(id)</constant> returns the control class
  557. ID based on a control ID.</para>
  558. <para>If the driver does not support extended controls, then
  559. <constant>VIDIOC_QUERYCTRL</constant> will fail when used in
  560. combination with <constant>V4L2_CTRL_FLAG_NEXT_CTRL</constant>. In
  561. that case the old method of enumerating control should be used (see
  562. 1.8). But if it is supported, then it is guaranteed to enumerate over
  563. all controls, including driver-private controls.</para>
  564. </section>
  565. <section>
  566. <title>Creating Control Panels</title>
  567. <para>It is possible to create control panels for a graphical
  568. user interface where the user can select the various controls.
  569. Basically you will have to iterate over all controls using the method
  570. described above. Each control class starts with a control of type
  571. <constant>V4L2_CTRL_TYPE_CTRL_CLASS</constant>.
  572. <constant>VIDIOC_QUERYCTRL</constant> will return the name of this
  573. control class which can be used as the title of a tab page within a
  574. control panel.</para>
  575. <para>The flags field of &v4l2-queryctrl; also contains hints on
  576. the behavior of the control. See the &VIDIOC-QUERYCTRL; documentation
  577. for more details.</para>
  578. </section>
  579. <section id="mpeg-controls">
  580. <title>MPEG Control Reference</title>
  581. <para>Below all controls within the MPEG control class are
  582. described. First the generic controls, then controls specific for
  583. certain hardware.</para>
  584. <section>
  585. <title>Generic MPEG Controls</title>
  586. <table pgwide="1" frame="none" id="mpeg-control-id">
  587. <title>MPEG Control IDs</title>
  588. <tgroup cols="4">
  589. <colspec colname="c1" colwidth="1*" />
  590. <colspec colname="c2" colwidth="6*" />
  591. <colspec colname="c3" colwidth="2*" />
  592. <colspec colname="c4" colwidth="6*" />
  593. <spanspec namest="c1" nameend="c2" spanname="id" />
  594. <spanspec namest="c2" nameend="c4" spanname="descr" />
  595. <thead>
  596. <row>
  597. <entry spanname="id" align="left">ID</entry>
  598. <entry align="left">Type</entry>
  599. </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
  600. </row>
  601. </thead>
  602. <tbody valign="top">
  603. <row><entry></entry></row>
  604. <row>
  605. <entry spanname="id"><constant>V4L2_CID_MPEG_CLASS</constant>&nbsp;</entry>
  606. <entry>class</entry>
  607. </row><row><entry spanname="descr">The MPEG class
  608. descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
  609. description of this control class. This description can be used as the
  610. caption of a Tab page in a GUI, for example.</entry>
  611. </row>
  612. <row><entry></entry></row>
  613. <row id="v4l2-mpeg-stream-type">
  614. <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_TYPE</constant>&nbsp;</entry>
  615. <entry>enum&nbsp;v4l2_mpeg_stream_type</entry>
  616. </row><row><entry spanname="descr">The MPEG-1, -2 or -4
  617. output stream type. One cannot assume anything here. Each hardware
  618. MPEG encoder tends to support different subsets of the available MPEG
  619. stream types. The currently defined stream types are:</entry>
  620. </row>
  621. <row>
  622. <entrytbl spanname="descr" cols="2">
  623. <tbody valign="top">
  624. <row>
  625. <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_PS</constant>&nbsp;</entry>
  626. <entry>MPEG-2 program stream</entry>
  627. </row>
  628. <row>
  629. <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_TS</constant>&nbsp;</entry>
  630. <entry>MPEG-2 transport stream</entry>
  631. </row>
  632. <row>
  633. <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_SS</constant>&nbsp;</entry>
  634. <entry>MPEG-1 system stream</entry>
  635. </row>
  636. <row>
  637. <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_DVD</constant>&nbsp;</entry>
  638. <entry>MPEG-2 DVD-compatible stream</entry>
  639. </row>
  640. <row>
  641. <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG1_VCD</constant>&nbsp;</entry>
  642. <entry>MPEG-1 VCD-compatible stream</entry>
  643. </row>
  644. <row>
  645. <entry><constant>V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD</constant>&nbsp;</entry>
  646. <entry>MPEG-2 SVCD-compatible stream</entry>
  647. </row>
  648. </tbody>
  649. </entrytbl>
  650. </row>
  651. <row><entry></entry></row>
  652. <row>
  653. <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PMT</constant>&nbsp;</entry>
  654. <entry>integer</entry>
  655. </row><row><entry spanname="descr">Program Map Table
  656. Packet ID for the MPEG transport stream (default 16)</entry>
  657. </row>
  658. <row><entry></entry></row>
  659. <row>
  660. <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_AUDIO</constant>&nbsp;</entry>
  661. <entry>integer</entry>
  662. </row><row><entry spanname="descr">Audio Packet ID for
  663. the MPEG transport stream (default 256)</entry>
  664. </row>
  665. <row><entry></entry></row>
  666. <row>
  667. <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_VIDEO</constant>&nbsp;</entry>
  668. <entry>integer</entry>
  669. </row><row><entry spanname="descr">Video Packet ID for
  670. the MPEG transport stream (default 260)</entry>
  671. </row>
  672. <row><entry></entry></row>
  673. <row>
  674. <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PID_PCR</constant>&nbsp;</entry>
  675. <entry>integer</entry>
  676. </row><row><entry spanname="descr">Packet ID for the
  677. MPEG transport stream carrying PCR fields (default 259)</entry>
  678. </row>
  679. <row><entry></entry></row>
  680. <row>
  681. <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_AUDIO</constant>&nbsp;</entry>
  682. <entry>integer</entry>
  683. </row><row><entry spanname="descr">Audio ID for MPEG
  684. PES</entry>
  685. </row>
  686. <row><entry></entry></row>
  687. <row>
  688. <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_PES_ID_VIDEO</constant>&nbsp;</entry>
  689. <entry>integer</entry>
  690. </row><row><entry spanname="descr">Video ID for MPEG
  691. PES</entry>
  692. </row>
  693. <row><entry></entry></row>
  694. <row id="v4l2-mpeg-stream-vbi-fmt">
  695. <entry spanname="id"><constant>V4L2_CID_MPEG_STREAM_VBI_FMT</constant>&nbsp;</entry>
  696. <entry>enum&nbsp;v4l2_mpeg_stream_vbi_fmt</entry>
  697. </row><row><entry spanname="descr">Some cards can embed
  698. VBI data (&eg; Closed Caption, Teletext) into the MPEG stream. This
  699. control selects whether VBI data should be embedded, and if so, what
  700. embedding method should be used. The list of possible VBI formats
  701. depends on the driver. The currently defined VBI format types
  702. are:</entry>
  703. </row>
  704. <row>
  705. <entrytbl spanname="descr" cols="2">
  706. <tbody valign="top">
  707. <row>
  708. <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_NONE</constant>&nbsp;</entry>
  709. <entry>No VBI in the MPEG stream</entry>
  710. </row>
  711. <row>
  712. <entry><constant>V4L2_MPEG_STREAM_VBI_FMT_IVTV</constant>&nbsp;</entry>
  713. <entry>VBI in private packets, IVTV format (documented
  714. in the kernel sources in the file <filename>Documentation/video4linux/cx2341x/README.vbi</filename>)</entry>
  715. </row>
  716. </tbody>
  717. </entrytbl>
  718. </row>
  719. <row><entry></entry></row>
  720. <row id="v4l2-mpeg-audio-sampling-freq">
  721. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ</constant>&nbsp;</entry>
  722. <entry>enum&nbsp;v4l2_mpeg_audio_sampling_freq</entry>
  723. </row><row><entry spanname="descr">MPEG Audio sampling
  724. frequency. Possible values are:</entry>
  725. </row>
  726. <row>
  727. <entrytbl spanname="descr" cols="2">
  728. <tbody valign="top">
  729. <row>
  730. <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100</constant>&nbsp;</entry>
  731. <entry>44.1 kHz</entry>
  732. </row>
  733. <row>
  734. <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000</constant>&nbsp;</entry>
  735. <entry>48 kHz</entry>
  736. </row>
  737. <row>
  738. <entry><constant>V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000</constant>&nbsp;</entry>
  739. <entry>32 kHz</entry>
  740. </row>
  741. </tbody>
  742. </entrytbl>
  743. </row>
  744. <row><entry></entry></row>
  745. <row id="v4l2-mpeg-audio-encoding">
  746. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_ENCODING</constant>&nbsp;</entry>
  747. <entry>enum&nbsp;v4l2_mpeg_audio_encoding</entry>
  748. </row><row><entry spanname="descr">MPEG Audio encoding.
  749. Possible values are:</entry>
  750. </row>
  751. <row>
  752. <entrytbl spanname="descr" cols="2">
  753. <tbody valign="top">
  754. <row>
  755. <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_1</constant>&nbsp;</entry>
  756. <entry>MPEG-1/2 Layer I encoding</entry>
  757. </row>
  758. <row>
  759. <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_2</constant>&nbsp;</entry>
  760. <entry>MPEG-1/2 Layer II encoding</entry>
  761. </row>
  762. <row>
  763. <entry><constant>V4L2_MPEG_AUDIO_ENCODING_LAYER_3</constant>&nbsp;</entry>
  764. <entry>MPEG-1/2 Layer III encoding</entry>
  765. </row>
  766. <row>
  767. <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AAC</constant>&nbsp;</entry>
  768. <entry>MPEG-2/4 AAC (Advanced Audio Coding)</entry>
  769. </row>
  770. <row>
  771. <entry><constant>V4L2_MPEG_AUDIO_ENCODING_AC3</constant>&nbsp;</entry>
  772. <entry>AC-3 aka ATSC A/52 encoding</entry>
  773. </row>
  774. </tbody>
  775. </entrytbl>
  776. </row>
  777. <row><entry></entry></row>
  778. <row id="v4l2-mpeg-audio-l1-bitrate">
  779. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L1_BITRATE</constant>&nbsp;</entry>
  780. <entry>enum&nbsp;v4l2_mpeg_audio_l1_bitrate</entry>
  781. </row><row><entry spanname="descr">MPEG-1/2 Layer I bitrate.
  782. Possible values are:</entry>
  783. </row>
  784. <row>
  785. <entrytbl spanname="descr" cols="2">
  786. <tbody valign="top">
  787. <row>
  788. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_32K</constant>&nbsp;</entry>
  789. <entry>32 kbit/s</entry></row>
  790. <row>
  791. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_64K</constant>&nbsp;</entry>
  792. <entry>64 kbit/s</entry>
  793. </row>
  794. <row>
  795. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_96K</constant>&nbsp;</entry>
  796. <entry>96 kbit/s</entry>
  797. </row>
  798. <row>
  799. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_128K</constant>&nbsp;</entry>
  800. <entry>128 kbit/s</entry>
  801. </row>
  802. <row>
  803. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_160K</constant>&nbsp;</entry>
  804. <entry>160 kbit/s</entry>
  805. </row>
  806. <row>
  807. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_192K</constant>&nbsp;</entry>
  808. <entry>192 kbit/s</entry>
  809. </row>
  810. <row>
  811. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_224K</constant>&nbsp;</entry>
  812. <entry>224 kbit/s</entry>
  813. </row>
  814. <row>
  815. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_256K</constant>&nbsp;</entry>
  816. <entry>256 kbit/s</entry>
  817. </row>
  818. <row>
  819. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_288K</constant>&nbsp;</entry>
  820. <entry>288 kbit/s</entry>
  821. </row>
  822. <row>
  823. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_320K</constant>&nbsp;</entry>
  824. <entry>320 kbit/s</entry>
  825. </row>
  826. <row>
  827. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_352K</constant>&nbsp;</entry>
  828. <entry>352 kbit/s</entry>
  829. </row>
  830. <row>
  831. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_384K</constant>&nbsp;</entry>
  832. <entry>384 kbit/s</entry>
  833. </row>
  834. <row>
  835. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_416K</constant>&nbsp;</entry>
  836. <entry>416 kbit/s</entry>
  837. </row>
  838. <row>
  839. <entry><constant>V4L2_MPEG_AUDIO_L1_BITRATE_448K</constant>&nbsp;</entry>
  840. <entry>448 kbit/s</entry>
  841. </row>
  842. </tbody>
  843. </entrytbl>
  844. </row>
  845. <row><entry></entry></row>
  846. <row id="v4l2-mpeg-audio-l2-bitrate">
  847. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L2_BITRATE</constant>&nbsp;</entry>
  848. <entry>enum&nbsp;v4l2_mpeg_audio_l2_bitrate</entry>
  849. </row><row><entry spanname="descr">MPEG-1/2 Layer II bitrate.
  850. Possible values are:</entry>
  851. </row>
  852. <row>
  853. <entrytbl spanname="descr" cols="2">
  854. <tbody valign="top">
  855. <row>
  856. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_32K</constant>&nbsp;</entry>
  857. <entry>32 kbit/s</entry>
  858. </row>
  859. <row>
  860. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_48K</constant>&nbsp;</entry>
  861. <entry>48 kbit/s</entry>
  862. </row>
  863. <row>
  864. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_56K</constant>&nbsp;</entry>
  865. <entry>56 kbit/s</entry>
  866. </row>
  867. <row>
  868. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_64K</constant>&nbsp;</entry>
  869. <entry>64 kbit/s</entry>
  870. </row>
  871. <row>
  872. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_80K</constant>&nbsp;</entry>
  873. <entry>80 kbit/s</entry>
  874. </row>
  875. <row>
  876. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_96K</constant>&nbsp;</entry>
  877. <entry>96 kbit/s</entry>
  878. </row>
  879. <row>
  880. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_112K</constant>&nbsp;</entry>
  881. <entry>112 kbit/s</entry>
  882. </row>
  883. <row>
  884. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_128K</constant>&nbsp;</entry>
  885. <entry>128 kbit/s</entry>
  886. </row>
  887. <row>
  888. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_160K</constant>&nbsp;</entry>
  889. <entry>160 kbit/s</entry>
  890. </row>
  891. <row>
  892. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_192K</constant>&nbsp;</entry>
  893. <entry>192 kbit/s</entry>
  894. </row>
  895. <row>
  896. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_224K</constant>&nbsp;</entry>
  897. <entry>224 kbit/s</entry>
  898. </row>
  899. <row>
  900. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_256K</constant>&nbsp;</entry>
  901. <entry>256 kbit/s</entry>
  902. </row>
  903. <row>
  904. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_320K</constant>&nbsp;</entry>
  905. <entry>320 kbit/s</entry>
  906. </row>
  907. <row>
  908. <entry><constant>V4L2_MPEG_AUDIO_L2_BITRATE_384K</constant>&nbsp;</entry>
  909. <entry>384 kbit/s</entry>
  910. </row>
  911. </tbody>
  912. </entrytbl>
  913. </row>
  914. <row><entry></entry></row>
  915. <row id="v4l2-mpeg-audio-l3-bitrate">
  916. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_L3_BITRATE</constant>&nbsp;</entry>
  917. <entry>enum&nbsp;v4l2_mpeg_audio_l3_bitrate</entry>
  918. </row><row><entry spanname="descr">MPEG-1/2 Layer III bitrate.
  919. Possible values are:</entry>
  920. </row>
  921. <row>
  922. <entrytbl spanname="descr" cols="2">
  923. <tbody valign="top">
  924. <row>
  925. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_32K</constant>&nbsp;</entry>
  926. <entry>32 kbit/s</entry>
  927. </row>
  928. <row>
  929. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_40K</constant>&nbsp;</entry>
  930. <entry>40 kbit/s</entry>
  931. </row>
  932. <row>
  933. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_48K</constant>&nbsp;</entry>
  934. <entry>48 kbit/s</entry>
  935. </row>
  936. <row>
  937. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_56K</constant>&nbsp;</entry>
  938. <entry>56 kbit/s</entry>
  939. </row>
  940. <row>
  941. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_64K</constant>&nbsp;</entry>
  942. <entry>64 kbit/s</entry>
  943. </row>
  944. <row>
  945. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_80K</constant>&nbsp;</entry>
  946. <entry>80 kbit/s</entry>
  947. </row>
  948. <row>
  949. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_96K</constant>&nbsp;</entry>
  950. <entry>96 kbit/s</entry>
  951. </row>
  952. <row>
  953. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_112K</constant>&nbsp;</entry>
  954. <entry>112 kbit/s</entry>
  955. </row>
  956. <row>
  957. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_128K</constant>&nbsp;</entry>
  958. <entry>128 kbit/s</entry>
  959. </row>
  960. <row>
  961. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_160K</constant>&nbsp;</entry>
  962. <entry>160 kbit/s</entry>
  963. </row>
  964. <row>
  965. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_192K</constant>&nbsp;</entry>
  966. <entry>192 kbit/s</entry>
  967. </row>
  968. <row>
  969. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_224K</constant>&nbsp;</entry>
  970. <entry>224 kbit/s</entry>
  971. </row>
  972. <row>
  973. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_256K</constant>&nbsp;</entry>
  974. <entry>256 kbit/s</entry>
  975. </row>
  976. <row>
  977. <entry><constant>V4L2_MPEG_AUDIO_L3_BITRATE_320K</constant>&nbsp;</entry>
  978. <entry>320 kbit/s</entry>
  979. </row>
  980. </tbody>
  981. </entrytbl>
  982. </row>
  983. <row><entry></entry></row>
  984. <row>
  985. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AAC_BITRATE</constant>&nbsp;</entry>
  986. <entry>integer</entry>
  987. </row><row><entry spanname="descr">AAC bitrate in bits per second.</entry>
  988. </row>
  989. <row><entry></entry></row>
  990. <row id="v4l2-mpeg-audio-ac3-bitrate">
  991. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_AC3_BITRATE</constant>&nbsp;</entry>
  992. <entry>enum&nbsp;v4l2_mpeg_audio_ac3_bitrate</entry>
  993. </row><row><entry spanname="descr">AC-3 bitrate.
  994. Possible values are:</entry>
  995. </row>
  996. <row>
  997. <entrytbl spanname="descr" cols="2">
  998. <tbody valign="top">
  999. <row>
  1000. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_32K</constant>&nbsp;</entry>
  1001. <entry>32 kbit/s</entry>
  1002. </row>
  1003. <row>
  1004. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_40K</constant>&nbsp;</entry>
  1005. <entry>40 kbit/s</entry>
  1006. </row>
  1007. <row>
  1008. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_48K</constant>&nbsp;</entry>
  1009. <entry>48 kbit/s</entry>
  1010. </row>
  1011. <row>
  1012. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_56K</constant>&nbsp;</entry>
  1013. <entry>56 kbit/s</entry>
  1014. </row>
  1015. <row>
  1016. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_64K</constant>&nbsp;</entry>
  1017. <entry>64 kbit/s</entry>
  1018. </row>
  1019. <row>
  1020. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_80K</constant>&nbsp;</entry>
  1021. <entry>80 kbit/s</entry>
  1022. </row>
  1023. <row>
  1024. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_96K</constant>&nbsp;</entry>
  1025. <entry>96 kbit/s</entry>
  1026. </row>
  1027. <row>
  1028. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_112K</constant>&nbsp;</entry>
  1029. <entry>112 kbit/s</entry>
  1030. </row>
  1031. <row>
  1032. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_128K</constant>&nbsp;</entry>
  1033. <entry>128 kbit/s</entry>
  1034. </row>
  1035. <row>
  1036. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_160K</constant>&nbsp;</entry>
  1037. <entry>160 kbit/s</entry>
  1038. </row>
  1039. <row>
  1040. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_192K</constant>&nbsp;</entry>
  1041. <entry>192 kbit/s</entry>
  1042. </row>
  1043. <row>
  1044. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_224K</constant>&nbsp;</entry>
  1045. <entry>224 kbit/s</entry>
  1046. </row>
  1047. <row>
  1048. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_256K</constant>&nbsp;</entry>
  1049. <entry>256 kbit/s</entry>
  1050. </row>
  1051. <row>
  1052. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_320K</constant>&nbsp;</entry>
  1053. <entry>320 kbit/s</entry>
  1054. </row>
  1055. <row>
  1056. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_384K</constant>&nbsp;</entry>
  1057. <entry>384 kbit/s</entry>
  1058. </row>
  1059. <row>
  1060. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_448K</constant>&nbsp;</entry>
  1061. <entry>448 kbit/s</entry>
  1062. </row>
  1063. <row>
  1064. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_512K</constant>&nbsp;</entry>
  1065. <entry>512 kbit/s</entry>
  1066. </row>
  1067. <row>
  1068. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_576K</constant>&nbsp;</entry>
  1069. <entry>576 kbit/s</entry>
  1070. </row>
  1071. <row>
  1072. <entry><constant>V4L2_MPEG_AUDIO_AC3_BITRATE_640K</constant>&nbsp;</entry>
  1073. <entry>640 kbit/s</entry>
  1074. </row>
  1075. </tbody>
  1076. </entrytbl>
  1077. </row>
  1078. <row><entry></entry></row>
  1079. <row id="v4l2-mpeg-audio-mode">
  1080. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE</constant>&nbsp;</entry>
  1081. <entry>enum&nbsp;v4l2_mpeg_audio_mode</entry>
  1082. </row><row><entry spanname="descr">MPEG Audio mode.
  1083. Possible values are:</entry>
  1084. </row>
  1085. <row>
  1086. <entrytbl spanname="descr" cols="2">
  1087. <tbody valign="top">
  1088. <row>
  1089. <entry><constant>V4L2_MPEG_AUDIO_MODE_STEREO</constant>&nbsp;</entry>
  1090. <entry>Stereo</entry>
  1091. </row>
  1092. <row>
  1093. <entry><constant>V4L2_MPEG_AUDIO_MODE_JOINT_STEREO</constant>&nbsp;</entry>
  1094. <entry>Joint Stereo</entry>
  1095. </row>
  1096. <row>
  1097. <entry><constant>V4L2_MPEG_AUDIO_MODE_DUAL</constant>&nbsp;</entry>
  1098. <entry>Bilingual</entry>
  1099. </row>
  1100. <row>
  1101. <entry><constant>V4L2_MPEG_AUDIO_MODE_MONO</constant>&nbsp;</entry>
  1102. <entry>Mono</entry>
  1103. </row>
  1104. </tbody>
  1105. </entrytbl>
  1106. </row>
  1107. <row><entry></entry></row>
  1108. <row id="v4l2-mpeg-audio-mode-extension">
  1109. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MODE_EXTENSION</constant>&nbsp;</entry>
  1110. <entry>enum&nbsp;v4l2_mpeg_audio_mode_extension</entry>
  1111. </row><row><entry spanname="descr">Joint Stereo
  1112. audio mode extension. In Layer I and II they indicate which subbands
  1113. are in intensity stereo. All other subbands are coded in stereo. Layer
  1114. III is not (yet) supported. Possible values
  1115. are:</entry>
  1116. </row>
  1117. <row>
  1118. <entrytbl spanname="descr" cols="2">
  1119. <tbody valign="top">
  1120. <row>
  1121. <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4</constant>&nbsp;</entry>
  1122. <entry>Subbands 4-31 in intensity stereo</entry>
  1123. </row>
  1124. <row>
  1125. <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8</constant>&nbsp;</entry>
  1126. <entry>Subbands 8-31 in intensity stereo</entry>
  1127. </row>
  1128. <row>
  1129. <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12</constant>&nbsp;</entry>
  1130. <entry>Subbands 12-31 in intensity stereo</entry>
  1131. </row>
  1132. <row>
  1133. <entry><constant>V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16</constant>&nbsp;</entry>
  1134. <entry>Subbands 16-31 in intensity stereo</entry>
  1135. </row>
  1136. </tbody>
  1137. </entrytbl>
  1138. </row>
  1139. <row><entry></entry></row>
  1140. <row id="v4l2-mpeg-audio-emphasis">
  1141. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_EMPHASIS</constant>&nbsp;</entry>
  1142. <entry>enum&nbsp;v4l2_mpeg_audio_emphasis</entry>
  1143. </row><row><entry spanname="descr">Audio Emphasis.
  1144. Possible values are:</entry>
  1145. </row>
  1146. <row>
  1147. <entrytbl spanname="descr" cols="2">
  1148. <tbody valign="top">
  1149. <row>
  1150. <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_NONE</constant>&nbsp;</entry>
  1151. <entry>None</entry>
  1152. </row>
  1153. <row>
  1154. <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS</constant>&nbsp;</entry>
  1155. <entry>50/15 microsecond emphasis</entry>
  1156. </row>
  1157. <row>
  1158. <entry><constant>V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17</constant>&nbsp;</entry>
  1159. <entry>CCITT J.17</entry>
  1160. </row>
  1161. </tbody>
  1162. </entrytbl>
  1163. </row>
  1164. <row><entry></entry></row>
  1165. <row id="v4l2-mpeg-audio-crc">
  1166. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_CRC</constant>&nbsp;</entry>
  1167. <entry>enum&nbsp;v4l2_mpeg_audio_crc</entry>
  1168. </row><row><entry spanname="descr">CRC method. Possible
  1169. values are:</entry>
  1170. </row>
  1171. <row>
  1172. <entrytbl spanname="descr" cols="2">
  1173. <tbody valign="top">
  1174. <row>
  1175. <entry><constant>V4L2_MPEG_AUDIO_CRC_NONE</constant>&nbsp;</entry>
  1176. <entry>None</entry>
  1177. </row>
  1178. <row>
  1179. <entry><constant>V4L2_MPEG_AUDIO_CRC_CRC16</constant>&nbsp;</entry>
  1180. <entry>16 bit parity check</entry>
  1181. </row>
  1182. </tbody>
  1183. </entrytbl>
  1184. </row>
  1185. <row><entry></entry></row>
  1186. <row>
  1187. <entry spanname="id"><constant>V4L2_CID_MPEG_AUDIO_MUTE</constant>&nbsp;</entry>
  1188. <entry>boolean</entry>
  1189. </row><row><entry spanname="descr">Mutes the audio when
  1190. capturing. This is not done by muting audio hardware, which can still
  1191. produce a slight hiss, but in the encoder itself, guaranteeing a fixed
  1192. and reproducible audio bitstream. 0 = unmuted, 1 = muted.</entry>
  1193. </row>
  1194. <row><entry></entry></row>
  1195. <row id="v4l2-mpeg-video-encoding">
  1196. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ENCODING</constant>&nbsp;</entry>
  1197. <entry>enum&nbsp;v4l2_mpeg_video_encoding</entry>
  1198. </row><row><entry spanname="descr">MPEG Video encoding
  1199. method. Possible values are:</entry>
  1200. </row>
  1201. <row>
  1202. <entrytbl spanname="descr" cols="2">
  1203. <tbody valign="top">
  1204. <row>
  1205. <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_1</constant>&nbsp;</entry>
  1206. <entry>MPEG-1 Video encoding</entry>
  1207. </row>
  1208. <row>
  1209. <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_2</constant>&nbsp;</entry>
  1210. <entry>MPEG-2 Video encoding</entry>
  1211. </row>
  1212. <row>
  1213. <entry><constant>V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC</constant>&nbsp;</entry>
  1214. <entry>MPEG-4 AVC (H.264) Video encoding</entry>
  1215. </row>
  1216. </tbody>
  1217. </entrytbl>
  1218. </row>
  1219. <row><entry></entry></row>
  1220. <row id="v4l2-mpeg-video-aspect">
  1221. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_ASPECT</constant>&nbsp;</entry>
  1222. <entry>enum&nbsp;v4l2_mpeg_video_aspect</entry>
  1223. </row><row><entry spanname="descr">Video aspect.
  1224. Possible values are:</entry>
  1225. </row>
  1226. <row>
  1227. <entrytbl spanname="descr" cols="2">
  1228. <tbody valign="top">
  1229. <row>
  1230. <entry><constant>V4L2_MPEG_VIDEO_ASPECT_1x1</constant>&nbsp;</entry>
  1231. </row>
  1232. <row>
  1233. <entry><constant>V4L2_MPEG_VIDEO_ASPECT_4x3</constant>&nbsp;</entry>
  1234. </row>
  1235. <row>
  1236. <entry><constant>V4L2_MPEG_VIDEO_ASPECT_16x9</constant>&nbsp;</entry>
  1237. </row>
  1238. <row>
  1239. <entry><constant>V4L2_MPEG_VIDEO_ASPECT_221x100</constant>&nbsp;</entry>
  1240. </row>
  1241. </tbody>
  1242. </entrytbl>
  1243. </row>
  1244. <row><entry></entry></row>
  1245. <row>
  1246. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_B_FRAMES</constant>&nbsp;</entry>
  1247. <entry>integer</entry>
  1248. </row><row><entry spanname="descr">Number of B-Frames
  1249. (default 2)</entry>
  1250. </row>
  1251. <row><entry></entry></row>
  1252. <row>
  1253. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_SIZE</constant>&nbsp;</entry>
  1254. <entry>integer</entry>
  1255. </row><row><entry spanname="descr">GOP size (default
  1256. 12)</entry>
  1257. </row>
  1258. <row><entry></entry></row>
  1259. <row>
  1260. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_GOP_CLOSURE</constant>&nbsp;</entry>
  1261. <entry>boolean</entry>
  1262. </row><row><entry spanname="descr">GOP closure (default
  1263. 1)</entry>
  1264. </row>
  1265. <row><entry></entry></row>
  1266. <row>
  1267. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_PULLDOWN</constant>&nbsp;</entry>
  1268. <entry>boolean</entry>
  1269. </row><row><entry spanname="descr">Enable 3:2 pulldown
  1270. (default 0)</entry>
  1271. </row>
  1272. <row><entry></entry></row>
  1273. <row id="v4l2-mpeg-video-bitrate-mode">
  1274. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_MODE</constant>&nbsp;</entry>
  1275. <entry>enum&nbsp;v4l2_mpeg_video_bitrate_mode</entry>
  1276. </row><row><entry spanname="descr">Video bitrate mode.
  1277. Possible values are:</entry>
  1278. </row>
  1279. <row>
  1280. <entrytbl spanname="descr" cols="2">
  1281. <tbody valign="top">
  1282. <row>
  1283. <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_VBR</constant>&nbsp;</entry>
  1284. <entry>Variable bitrate</entry>
  1285. </row>
  1286. <row>
  1287. <entry><constant>V4L2_MPEG_VIDEO_BITRATE_MODE_CBR</constant>&nbsp;</entry>
  1288. <entry>Constant bitrate</entry>
  1289. </row>
  1290. </tbody>
  1291. </entrytbl>
  1292. </row>
  1293. <row><entry></entry></row>
  1294. <row>
  1295. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE</constant>&nbsp;</entry>
  1296. <entry>integer</entry>
  1297. </row><row><entry spanname="descr">Video bitrate in bits
  1298. per second.</entry>
  1299. </row>
  1300. <row><entry></entry></row>
  1301. <row>
  1302. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_BITRATE_PEAK</constant>&nbsp;</entry>
  1303. <entry>integer</entry>
  1304. </row><row><entry spanname="descr">Peak video bitrate in
  1305. bits per second. Must be larger or equal to the average video bitrate.
  1306. It is ignored if the video bitrate mode is set to constant
  1307. bitrate.</entry>
  1308. </row>
  1309. <row><entry></entry></row>
  1310. <row>
  1311. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION</constant>&nbsp;</entry>
  1312. <entry>integer</entry>
  1313. </row><row><entry spanname="descr">For every captured
  1314. frame, skip this many subsequent frames (default 0).</entry>
  1315. </row>
  1316. <row><entry></entry></row>
  1317. <row>
  1318. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE</constant>&nbsp;</entry>
  1319. <entry>boolean</entry>
  1320. </row>
  1321. <row><entry spanname="descr">"Mutes" the video to a
  1322. fixed color when capturing. This is useful for testing, to produce a
  1323. fixed video bitstream. 0 = unmuted, 1 = muted.</entry>
  1324. </row>
  1325. <row><entry></entry></row>
  1326. <row>
  1327. <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MUTE_YUV</constant>&nbsp;</entry>
  1328. <entry>integer</entry>
  1329. </row><row><entry spanname="descr">Sets the "mute" color
  1330. of the video. The supplied 32-bit integer is interpreted as follows (bit
  1331. 0 = least significant bit):</entry>
  1332. </row>
  1333. <row>
  1334. <entrytbl spanname="descr" cols="2">
  1335. <tbody valign="top">
  1336. <row>
  1337. <entry>Bit 0:7</entry>
  1338. <entry>V chrominance information</entry>
  1339. </row>
  1340. <row>
  1341. <entry>Bit 8:15</entry>
  1342. <entry>U chrominance information</entry>
  1343. </row>
  1344. <row>
  1345. <entry>Bit 16:23</entry>
  1346. <entry>Y luminance information</entry>
  1347. </row>
  1348. <row>
  1349. <entry>Bit 24:31</entry>
  1350. <entry>Must be zero.</entry>
  1351. </row>
  1352. </tbody>
  1353. </entrytbl>
  1354. </row>
  1355. </tbody>
  1356. </tgroup>
  1357. </table>
  1358. </section>
  1359. <section>
  1360. <title>CX2341x MPEG Controls</title>
  1361. <para>The following MPEG class controls deal with MPEG
  1362. encoding settings that are specific to the Conexant CX23415 and
  1363. CX23416 MPEG encoding chips.</para>
  1364. <table pgwide="1" frame="none" id="cx2341x-control-id">
  1365. <title>CX2341x Control IDs</title>
  1366. <tgroup cols="4">
  1367. <colspec colname="c1" colwidth="1*" />
  1368. <colspec colname="c2" colwidth="6*" />
  1369. <colspec colname="c3" colwidth="2*" />
  1370. <colspec colname="c4" colwidth="6*" />
  1371. <spanspec namest="c1" nameend="c2" spanname="id" />
  1372. <spanspec namest="c2" nameend="c4" spanname="descr" />
  1373. <thead>
  1374. <row>
  1375. <entry spanname="id" align="left">ID</entry>
  1376. <entry align="left">Type</entry>
  1377. </row><row><entry spanname="descr" align="left">Description</entry>
  1378. </row>
  1379. </thead>
  1380. <tbody valign="top">
  1381. <row><entry></entry></row>
  1382. <row id="v4l2-mpeg-cx2341x-video-spatial-filter-mode">
  1383. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE</constant>&nbsp;</entry>
  1384. <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_spatial_filter_mode</entry>
  1385. </row><row><entry spanname="descr">Sets the Spatial
  1386. Filter mode (default <constant>MANUAL</constant>). Possible values
  1387. are:</entry>
  1388. </row>
  1389. <row>
  1390. <entrytbl spanname="descr" cols="2">
  1391. <tbody valign="top">
  1392. <row>
  1393. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL</constant>&nbsp;</entry>
  1394. <entry>Choose the filter manually</entry>
  1395. </row>
  1396. <row>
  1397. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO</constant>&nbsp;</entry>
  1398. <entry>Choose the filter automatically</entry>
  1399. </row>
  1400. </tbody>
  1401. </entrytbl>
  1402. </row>
  1403. <row><entry></entry></row>
  1404. <row>
  1405. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER</constant>&nbsp;</entry>
  1406. <entry>integer&nbsp;(0-15)</entry>
  1407. </row><row><entry spanname="descr">The setting for the
  1408. Spatial Filter. 0 = off, 15 = maximum. (Default is 0.)</entry>
  1409. </row>
  1410. <row><entry></entry></row>
  1411. <row id="luma-spatial-filter-type">
  1412. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE</constant>&nbsp;</entry>
  1413. <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_luma_spatial_filter_type</entry>
  1414. </row><row><entry spanname="descr">Select the algorithm
  1415. to use for the Luma Spatial Filter (default
  1416. <constant>1D_HOR</constant>). Possible values:</entry>
  1417. </row>
  1418. <row>
  1419. <entrytbl spanname="descr" cols="2">
  1420. <tbody valign="top">
  1421. <row>
  1422. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF</constant>&nbsp;</entry>
  1423. <entry>No filter</entry>
  1424. </row>
  1425. <row>
  1426. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR</constant>&nbsp;</entry>
  1427. <entry>One-dimensional horizontal</entry>
  1428. </row>
  1429. <row>
  1430. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT</constant>&nbsp;</entry>
  1431. <entry>One-dimensional vertical</entry>
  1432. </row>
  1433. <row>
  1434. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE</constant>&nbsp;</entry>
  1435. <entry>Two-dimensional separable</entry>
  1436. </row>
  1437. <row>
  1438. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE</constant>&nbsp;</entry>
  1439. <entry>Two-dimensional symmetrical
  1440. non-separable</entry>
  1441. </row>
  1442. </tbody>
  1443. </entrytbl>
  1444. </row>
  1445. <row><entry></entry></row>
  1446. <row id="chroma-spatial-filter-type">
  1447. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE</constant>&nbsp;</entry>
  1448. <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type</entry>
  1449. </row><row><entry spanname="descr">Select the algorithm
  1450. for the Chroma Spatial Filter (default <constant>1D_HOR</constant>).
  1451. Possible values are:</entry>
  1452. </row>
  1453. <row>
  1454. <entrytbl spanname="descr" cols="2">
  1455. <tbody valign="top">
  1456. <row>
  1457. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF</constant>&nbsp;</entry>
  1458. <entry>No filter</entry>
  1459. </row>
  1460. <row>
  1461. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR</constant>&nbsp;</entry>
  1462. <entry>One-dimensional horizontal</entry>
  1463. </row>
  1464. </tbody>
  1465. </entrytbl>
  1466. </row>
  1467. <row><entry></entry></row>
  1468. <row id="v4l2-mpeg-cx2341x-video-temporal-filter-mode">
  1469. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE</constant>&nbsp;</entry>
  1470. <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_temporal_filter_mode</entry>
  1471. </row><row><entry spanname="descr">Sets the Temporal
  1472. Filter mode (default <constant>MANUAL</constant>). Possible values
  1473. are:</entry>
  1474. </row>
  1475. <row>
  1476. <entrytbl spanname="descr" cols="2">
  1477. <tbody valign="top">
  1478. <row>
  1479. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL</constant>&nbsp;</entry>
  1480. <entry>Choose the filter manually</entry>
  1481. </row>
  1482. <row>
  1483. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO</constant>&nbsp;</entry>
  1484. <entry>Choose the filter automatically</entry>
  1485. </row>
  1486. </tbody>
  1487. </entrytbl>
  1488. </row>
  1489. <row><entry></entry></row>
  1490. <row>
  1491. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER</constant>&nbsp;</entry>
  1492. <entry>integer&nbsp;(0-31)</entry>
  1493. </row><row><entry spanname="descr">The setting for the
  1494. Temporal Filter. 0 = off, 31 = maximum. (Default is 8 for full-scale
  1495. capturing and 0 for scaled capturing.)</entry>
  1496. </row>
  1497. <row><entry></entry></row>
  1498. <row id="v4l2-mpeg-cx2341x-video-median-filter-type">
  1499. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE</constant>&nbsp;</entry>
  1500. <entry>enum&nbsp;v4l2_mpeg_cx2341x_video_median_filter_type</entry>
  1501. </row><row><entry spanname="descr">Median Filter Type
  1502. (default <constant>OFF</constant>). Possible values are:</entry>
  1503. </row>
  1504. <row>
  1505. <entrytbl spanname="descr" cols="2">
  1506. <tbody valign="top">
  1507. <row>
  1508. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF</constant>&nbsp;</entry>
  1509. <entry>No filter</entry>
  1510. </row>
  1511. <row>
  1512. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR</constant>&nbsp;</entry>
  1513. <entry>Horizontal filter</entry>
  1514. </row>
  1515. <row>
  1516. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT</constant>&nbsp;</entry>
  1517. <entry>Vertical filter</entry>
  1518. </row>
  1519. <row>
  1520. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT</constant>&nbsp;</entry>
  1521. <entry>Horizontal and vertical filter</entry>
  1522. </row>
  1523. <row>
  1524. <entry><constant>V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG</constant>&nbsp;</entry>
  1525. <entry>Diagonal filter</entry>
  1526. </row>
  1527. </tbody>
  1528. </entrytbl>
  1529. </row>
  1530. <row><entry></entry></row>
  1531. <row>
  1532. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_BOTTOM</constant>&nbsp;</entry>
  1533. <entry>integer&nbsp;(0-255)</entry>
  1534. </row><row><entry spanname="descr">Threshold above which
  1535. the luminance median filter is enabled (default 0)</entry>
  1536. </row>
  1537. <row><entry></entry></row>
  1538. <row>
  1539. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP</constant>&nbsp;</entry>
  1540. <entry>integer&nbsp;(0-255)</entry>
  1541. </row><row><entry spanname="descr">Threshold below which
  1542. the luminance median filter is enabled (default 255)</entry>
  1543. </row>
  1544. <row><entry></entry></row>
  1545. <row>
  1546. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM</constant>&nbsp;</entry>
  1547. <entry>integer&nbsp;(0-255)</entry>
  1548. </row><row><entry spanname="descr">Threshold above which
  1549. the chroma median filter is enabled (default 0)</entry>
  1550. </row>
  1551. <row><entry></entry></row>
  1552. <row>
  1553. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP</constant>&nbsp;</entry>
  1554. <entry>integer&nbsp;(0-255)</entry>
  1555. </row><row><entry spanname="descr">Threshold below which
  1556. the chroma median filter is enabled (default 255)</entry>
  1557. </row>
  1558. <row><entry></entry></row>
  1559. <row>
  1560. <entry spanname="id"><constant>V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS</constant>&nbsp;</entry>
  1561. <entry>boolean</entry>
  1562. </row>
  1563. <row><entry spanname="descr">The CX2341X MPEG encoder
  1564. can insert one empty MPEG-2 PES packet into the stream between every
  1565. four video frames. The packet size is 2048 bytes, including the
  1566. packet_start_code_prefix and stream_id fields. The stream_id is 0xBF
  1567. (private stream 2). The payload consists of 0x00 bytes, to be filled
  1568. in by the application. 0 = do not insert, 1 = insert packets.</entry>
  1569. </row>
  1570. </tbody>
  1571. </tgroup>
  1572. </table>
  1573. </section>
  1574. </section>
  1575. <section id="camera-controls">
  1576. <title>Camera Control Reference</title>
  1577. <para>The Camera class includes controls for mechanical (or
  1578. equivalent digital) features of a device such as controllable lenses
  1579. or sensors.</para>
  1580. <table pgwide="1" frame="none" id="camera-control-id">
  1581. <title>Camera Control IDs</title>
  1582. <tgroup cols="4">
  1583. <colspec colname="c1" colwidth="1*" />
  1584. <colspec colname="c2" colwidth="6*" />
  1585. <colspec colname="c3" colwidth="2*" />
  1586. <colspec colname="c4" colwidth="6*" />
  1587. <spanspec namest="c1" nameend="c2" spanname="id" />
  1588. <spanspec namest="c2" nameend="c4" spanname="descr" />
  1589. <thead>
  1590. <row>
  1591. <entry spanname="id" align="left">ID</entry>
  1592. <entry align="left">Type</entry>
  1593. </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
  1594. </row>
  1595. </thead>
  1596. <tbody valign="top">
  1597. <row><entry></entry></row>
  1598. <row>
  1599. <entry spanname="id"><constant>V4L2_CID_CAMERA_CLASS</constant>&nbsp;</entry>
  1600. <entry>class</entry>
  1601. </row><row><entry spanname="descr">The Camera class
  1602. descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
  1603. description of this control class.</entry>
  1604. </row>
  1605. <row><entry></entry></row>
  1606. <row id="v4l2-exposure-auto-type">
  1607. <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO</constant>&nbsp;</entry>
  1608. <entry>enum&nbsp;v4l2_exposure_auto_type</entry>
  1609. </row><row><entry spanname="descr">Enables automatic
  1610. adjustments of the exposure time and/or iris aperture. The effect of
  1611. manual changes of the exposure time or iris aperture while these
  1612. features are enabled is undefined, drivers should ignore such
  1613. requests. Possible values are:</entry>
  1614. </row>
  1615. <row>
  1616. <entrytbl spanname="descr" cols="2">
  1617. <tbody valign="top">
  1618. <row>
  1619. <entry><constant>V4L2_EXPOSURE_AUTO</constant>&nbsp;</entry>
  1620. <entry>Automatic exposure time, automatic iris
  1621. aperture.</entry>
  1622. </row>
  1623. <row>
  1624. <entry><constant>V4L2_EXPOSURE_MANUAL</constant>&nbsp;</entry>
  1625. <entry>Manual exposure time, manual iris.</entry>
  1626. </row>
  1627. <row>
  1628. <entry><constant>V4L2_EXPOSURE_SHUTTER_PRIORITY</constant>&nbsp;</entry>
  1629. <entry>Manual exposure time, auto iris.</entry>
  1630. </row>
  1631. <row>
  1632. <entry><constant>V4L2_EXPOSURE_APERTURE_PRIORITY</constant>&nbsp;</entry>
  1633. <entry>Auto exposure time, manual iris.</entry>
  1634. </row>
  1635. </tbody>
  1636. </entrytbl>
  1637. </row>
  1638. <row><entry></entry></row>
  1639. <row>
  1640. <entry spanname="id"><constant>V4L2_CID_EXPOSURE_ABSOLUTE</constant>&nbsp;</entry>
  1641. <entry>integer</entry>
  1642. </row><row><entry spanname="descr">Determines the exposure
  1643. time of the camera sensor. The exposure time is limited by the frame
  1644. interval. Drivers should interpret the values as 100 &micro;s units,
  1645. where the value 1 stands for 1/10000th of a second, 10000 for 1 second
  1646. and 100000 for 10 seconds.</entry>
  1647. </row>
  1648. <row><entry></entry></row>
  1649. <row>
  1650. <entry spanname="id"><constant>V4L2_CID_EXPOSURE_AUTO_PRIORITY</constant>&nbsp;</entry>
  1651. <entry>boolean</entry>
  1652. </row><row><entry spanname="descr">When
  1653. <constant>V4L2_CID_EXPOSURE_AUTO</constant> is set to
  1654. <constant>AUTO</constant> or <constant>APERTURE_PRIORITY</constant>,
  1655. this control determines if the device may dynamically vary the frame
  1656. rate. By default this feature is disabled (0) and the frame rate must
  1657. remain constant.</entry>
  1658. </row>
  1659. <row><entry></entry></row>
  1660. <row>
  1661. <entry spanname="id"><constant>V4L2_CID_PAN_RELATIVE</constant>&nbsp;</entry>
  1662. <entry>integer</entry>
  1663. </row><row><entry spanname="descr">This control turns the
  1664. camera horizontally by the specified amount. The unit is undefined. A
  1665. positive value moves the camera to the right (clockwise when viewed
  1666. from above), a negative value to the left. A value of zero does not
  1667. cause motion. This is a write-only control.</entry>
  1668. </row>
  1669. <row><entry></entry></row>
  1670. <row>
  1671. <entry spanname="id"><constant>V4L2_CID_TILT_RELATIVE</constant>&nbsp;</entry>
  1672. <entry>integer</entry>
  1673. </row><row><entry spanname="descr">This control turns the
  1674. camera vertically by the specified amount. The unit is undefined. A
  1675. positive value moves the camera up, a negative value down. A value of
  1676. zero does not cause motion. This is a write-only control.</entry>
  1677. </row>
  1678. <row><entry></entry></row>
  1679. <row>
  1680. <entry spanname="id"><constant>V4L2_CID_PAN_RESET</constant>&nbsp;</entry>
  1681. <entry>button</entry>
  1682. </row><row><entry spanname="descr">When this control is set,
  1683. the camera moves horizontally to the default position.</entry>
  1684. </row>
  1685. <row><entry></entry></row>
  1686. <row>
  1687. <entry spanname="id"><constant>V4L2_CID_TILT_RESET</constant>&nbsp;</entry>
  1688. <entry>button</entry>
  1689. </row><row><entry spanname="descr">When this control is set,
  1690. the camera moves vertically to the default position.</entry>
  1691. </row>
  1692. <row><entry></entry></row>
  1693. <row>
  1694. <entry spanname="id"><constant>V4L2_CID_PAN_ABSOLUTE</constant>&nbsp;</entry>
  1695. <entry>integer</entry>
  1696. </row><row><entry spanname="descr">This control
  1697. turns the camera horizontally to the specified position. Positive
  1698. values move the camera to the right (clockwise when viewed from above),
  1699. negative values to the left. Drivers should interpret the values as arc
  1700. seconds, with valid values between -180 * 3600 and +180 * 3600
  1701. inclusive.</entry>
  1702. </row>
  1703. <row><entry></entry></row>
  1704. <row>
  1705. <entry spanname="id"><constant>V4L2_CID_TILT_ABSOLUTE</constant>&nbsp;</entry>
  1706. <entry>integer</entry>
  1707. </row><row><entry spanname="descr">This control
  1708. turns the camera vertically to the specified position. Positive values
  1709. move the camera up, negative values down. Drivers should interpret the
  1710. values as arc seconds, with valid values between -180 * 3600 and +180
  1711. * 3600 inclusive.</entry>
  1712. </row>
  1713. <row><entry></entry></row>
  1714. <row>
  1715. <entry spanname="id"><constant>V4L2_CID_FOCUS_ABSOLUTE</constant>&nbsp;</entry>
  1716. <entry>integer</entry>
  1717. </row><row><entry spanname="descr">This control sets the
  1718. focal point of the camera to the specified position. The unit is
  1719. undefined. Positive values set the focus closer to the camera,
  1720. negative values towards infinity.</entry>
  1721. </row>
  1722. <row><entry></entry></row>
  1723. <row>
  1724. <entry spanname="id"><constant>V4L2_CID_FOCUS_RELATIVE</constant>&nbsp;</entry>
  1725. <entry>integer</entry>
  1726. </row><row><entry spanname="descr">This control moves the
  1727. focal point of the camera by the specified amount. The unit is
  1728. undefined. Positive values move the focus closer to the camera,
  1729. negative values towards infinity. This is a write-only control.</entry>
  1730. </row>
  1731. <row><entry></entry></row>
  1732. <row>
  1733. <entry spanname="id"><constant>V4L2_CID_FOCUS_AUTO</constant>&nbsp;</entry>
  1734. <entry>boolean</entry>
  1735. </row><row><entry spanname="descr">Enables automatic focus
  1736. adjustments. The effect of manual focus adjustments while this feature
  1737. is enabled is undefined, drivers should ignore such requests.</entry>
  1738. </row>
  1739. <row><entry></entry></row>
  1740. <row>
  1741. <entry spanname="id"><constant>V4L2_CID_ZOOM_ABSOLUTE</constant>&nbsp;</entry>
  1742. <entry>integer</entry>
  1743. </row><row><entry spanname="descr">Specify the objective lens
  1744. focal length as an absolute value. The zoom unit is driver-specific and its
  1745. value should be a positive integer.</entry>
  1746. </row>
  1747. <row><entry></entry></row>
  1748. <row>
  1749. <entry spanname="id"><constant>V4L2_CID_ZOOM_RELATIVE</constant>&nbsp;</entry>
  1750. <entry>integer</entry>
  1751. </row><row><entry spanname="descr">Specify the objective lens
  1752. focal length relatively to the current value. Positive values move the zoom
  1753. lens group towards the telephoto direction, negative values towards the
  1754. wide-angle direction. The zoom unit is driver-specific. This is a write-only control.</entry>
  1755. </row>
  1756. <row><entry></entry></row>
  1757. <row>
  1758. <entry spanname="id"><constant>V4L2_CID_ZOOM_CONTINUOUS</constant>&nbsp;</entry>
  1759. <entry>integer</entry>
  1760. </row><row><entry spanname="descr">Move the objective lens group
  1761. at the specified speed until it reaches physical device limits or until an
  1762. explicit request to stop the movement. A positive value moves the zoom lens
  1763. group towards the telephoto direction. A value of zero stops the zoom lens
  1764. group movement. A negative value moves the zoom lens group towards the
  1765. wide-angle direction. The zoom speed unit is driver-specific.</entry>
  1766. </row>
  1767. <row><entry></entry></row>
  1768. <row>
  1769. <entry spanname="id"><constant>V4L2_CID_IRIS_ABSOLUTE</constant>&nbsp;</entry>
  1770. <entry>integer</entry>
  1771. </row><row><entry spanname="descr">This control sets the
  1772. camera's aperture to the specified value. The unit is undefined.
  1773. Larger values open the iris wider, smaller values close it.</entry>
  1774. </row>
  1775. <row><entry></entry></row>
  1776. <row>
  1777. <entry spanname="id"><constant>V4L2_CID_IRIS_RELATIVE</constant>&nbsp;</entry>
  1778. <entry>integer</entry>
  1779. </row><row><entry spanname="descr">This control modifies the
  1780. camera's aperture by the specified amount. The unit is undefined.
  1781. Positive values open the iris one step further, negative values close
  1782. it one step further. This is a write-only control.</entry>
  1783. </row>
  1784. <row><entry></entry></row>
  1785. <row>
  1786. <entry spanname="id"><constant>V4L2_CID_PRIVACY</constant>&nbsp;</entry>
  1787. <entry>boolean</entry>
  1788. </row><row><entry spanname="descr">Prevent video from being acquired
  1789. by the camera. When this control is set to <constant>TRUE</constant> (1), no
  1790. image can be captured by the camera. Common means to enforce privacy are
  1791. mechanical obturation of the sensor and firmware image processing, but the
  1792. device is not restricted to these methods. Devices that implement the privacy
  1793. control must support read access and may support write access.</entry>
  1794. </row>
  1795. <row>
  1796. <entry spanname="id"><constant>V4L2_CID_BAND_STOP_FILTER</constant>&nbsp;</entry>
  1797. <entry>integer</entry>
  1798. </row><row><entry spanname="descr">Switch the band-stop filter of a
  1799. camera sensor on or off, or specify its strength. Such band-stop filters can
  1800. be used, for example, to filter out the fluorescent light component.</entry>
  1801. </row>
  1802. <row><entry></entry></row>
  1803. </tbody>
  1804. </tgroup>
  1805. </table>
  1806. </section>
  1807. <section id="fm-tx-controls">
  1808. <title>FM Transmitter Control Reference</title>
  1809. <para>The FM Transmitter (FM_TX) class includes controls for common features of
  1810. FM transmissions capable devices. Currently this class includes parameters for audio
  1811. compression, pilot tone generation, audio deviation limiter, RDS transmission and
  1812. tuning power features.</para>
  1813. <table pgwide="1" frame="none" id="fm-tx-control-id">
  1814. <title>FM_TX Control IDs</title>
  1815. <tgroup cols="4">
  1816. <colspec colname="c1" colwidth="1*" />
  1817. <colspec colname="c2" colwidth="6*" />
  1818. <colspec colname="c3" colwidth="2*" />
  1819. <colspec colname="c4" colwidth="6*" />
  1820. <spanspec namest="c1" nameend="c2" spanname="id" />
  1821. <spanspec namest="c2" nameend="c4" spanname="descr" />
  1822. <thead>
  1823. <row>
  1824. <entry spanname="id" align="left">ID</entry>
  1825. <entry align="left">Type</entry>
  1826. </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
  1827. </row>
  1828. </thead>
  1829. <tbody valign="top">
  1830. <row><entry></entry></row>
  1831. <row>
  1832. <entry spanname="id"><constant>V4L2_CID_FM_TX_CLASS</constant>&nbsp;</entry>
  1833. <entry>class</entry>
  1834. </row><row><entry spanname="descr">The FM_TX class
  1835. descriptor. Calling &VIDIOC-QUERYCTRL; for this control will return a
  1836. description of this control class.</entry>
  1837. </row>
  1838. <row>
  1839. <entry spanname="id"><constant>V4L2_CID_RDS_TX_DEVIATION</constant>&nbsp;</entry>
  1840. <entry>integer</entry>
  1841. </row>
  1842. <row><entry spanname="descr">Configures RDS signal frequency deviation level in Hz.
  1843. The range and step are driver-specific.</entry>
  1844. </row>
  1845. <row>
  1846. <entry spanname="id"><constant>V4L2_CID_RDS_TX_PI</constant>&nbsp;</entry>
  1847. <entry>integer</entry>
  1848. </row>
  1849. <row><entry spanname="descr">Sets the RDS Programme Identification field
  1850. for transmission.</entry>
  1851. </row>
  1852. <row>
  1853. <entry spanname="id"><constant>V4L2_CID_RDS_TX_PTY</constant>&nbsp;</entry>
  1854. <entry>integer</entry>
  1855. </row>
  1856. <row><entry spanname="descr">Sets the RDS Programme Type field for transmission.
  1857. This encodes up to 31 pre-defined programme types.</entry>
  1858. </row>
  1859. <row>
  1860. <entry spanname="id"><constant>V4L2_CID_RDS_TX_PS_NAME</constant>&nbsp;</entry>
  1861. <entry>string</entry>
  1862. </row>
  1863. <row><entry spanname="descr">Sets the Programme Service name (PS_NAME) for transmission.
  1864. It is intended for static display on a receiver. It is the primary aid to listeners in programme service
  1865. identification and selection. In Annex E of <xref linkend="en50067" />, the RDS specification,
  1866. there is a full description of the correct character encoding for Programme Service name strings.
  1867. Also from RDS specification, PS is usually a single eight character text. However, it is also possible
  1868. to find receivers which can scroll strings sized as 8 x N characters. So, this control must be configured
  1869. with steps of 8 characters. The result is it must always contain a string with size multiple of 8.</entry>
  1870. </row>
  1871. <row>
  1872. <entry spanname="id"><constant>V4L2_CID_RDS_TX_RADIO_TEXT</constant>&nbsp;</entry>
  1873. <entry>string</entry>
  1874. </row>
  1875. <row><entry spanname="descr">Sets the Radio Text info for transmission. It is a textual description of
  1876. what is being broadcasted. RDS Radio Text can be applied when broadcaster wishes to transmit longer PS names,
  1877. programme-related information or any other text. In these cases, RadioText should be used in addition to
  1878. <constant>V4L2_CID_RDS_TX_PS_NAME</constant>. The encoding for Radio Text strings is also fully described
  1879. in Annex E of <xref linkend="en50067" />. The length of Radio Text strings depends on which RDS Block is being
  1880. used to transmit it, either 32 (2A block) or 64 (2B block). However, it is also possible
  1881. to find receivers which can scroll strings sized as 32 x N or 64 x N characters. So, this control must be configured
  1882. with steps of 32 or 64 characters. The result is it must always contain a string with size multiple of 32 or 64. </entry>
  1883. </row>
  1884. <row>
  1885. <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_ENABLED</constant>&nbsp;</entry>
  1886. <entry>boolean</entry>
  1887. </row>
  1888. <row><entry spanname="descr">Enables or disables the audio deviation limiter feature.
  1889. The limiter is useful when trying to maximize the audio volume, minimize receiver-generated
  1890. distortion and prevent overmodulation.
  1891. </entry>
  1892. </row>
  1893. <row>
  1894. <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_RELEASE_TIME</constant>&nbsp;</entry>
  1895. <entry>integer</entry>
  1896. </row>
  1897. <row><entry spanname="descr">Sets the audio deviation limiter feature release time.
  1898. Unit is in useconds. Step and range are driver-specific.</entry>
  1899. </row>
  1900. <row>
  1901. <entry spanname="id"><constant>V4L2_CID_AUDIO_LIMITER_DEVIATION</constant>&nbsp;</entry>
  1902. <entry>integer</entry>
  1903. </row>
  1904. <row><entry spanname="descr">Configures audio frequency deviation level in Hz.
  1905. The range and step are driver-specific.</entry>
  1906. </row>
  1907. <row>
  1908. <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ENABLED</constant>&nbsp;</entry>
  1909. <entry>boolean</entry>
  1910. </row>
  1911. <row><entry spanname="descr">Enables or disables the audio compression feature.
  1912. This feature amplifies signals below the threshold by a fixed gain and compresses audio
  1913. signals above the threshold by the ratio of Threshold/(Gain + Threshold).</entry>
  1914. </row>
  1915. <row>
  1916. <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_GAIN</constant>&nbsp;</entry>
  1917. <entry>integer</entry>
  1918. </row>
  1919. <row><entry spanname="descr">Sets the gain for audio compression feature. It is
  1920. a dB value. The range and step are driver-specific.</entry>
  1921. </row>
  1922. <row>
  1923. <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_THRESHOLD</constant>&nbsp;</entry>
  1924. <entry>integer</entry>
  1925. </row>
  1926. <row><entry spanname="descr">Sets the threshold level for audio compression freature.
  1927. It is a dB value. The range and step are driver-specific.</entry>
  1928. </row>
  1929. <row>
  1930. <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME</constant>&nbsp;</entry>
  1931. <entry>integer</entry>
  1932. </row>
  1933. <row><entry spanname="descr">Sets the attack time for audio compression feature.
  1934. It is a useconds value. The range and step are driver-specific.</entry>
  1935. </row>
  1936. <row>
  1937. <entry spanname="id"><constant>V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME</constant>&nbsp;</entry>
  1938. <entry>integer</entry>
  1939. </row>
  1940. <row><entry spanname="descr">Sets the release time for audio compression feature.
  1941. It is a useconds value. The range and step are driver-specific.</entry>
  1942. </row>
  1943. <row>
  1944. <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_ENABLED</constant>&nbsp;</entry>
  1945. <entry>boolean</entry>
  1946. </row>
  1947. <row><entry spanname="descr">Enables or disables the pilot tone generation feature.</entry>
  1948. </row>
  1949. <row>
  1950. <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_DEVIATION</constant>&nbsp;</entry>
  1951. <entry>integer</entry>
  1952. </row>
  1953. <row><entry spanname="descr">Configures pilot tone frequency deviation level. Unit is
  1954. in Hz. The range and step are driver-specific.</entry>
  1955. </row>
  1956. <row>
  1957. <entry spanname="id"><constant>V4L2_CID_PILOT_TONE_FREQUENCY</constant>&nbsp;</entry>
  1958. <entry>integer</entry>
  1959. </row>
  1960. <row><entry spanname="descr">Configures pilot tone frequency value. Unit is
  1961. in Hz. The range and step are driver-specific.</entry>
  1962. </row>
  1963. <row>
  1964. <entry spanname="id"><constant>V4L2_CID_TUNE_PREEMPHASIS</constant>&nbsp;</entry>
  1965. <entry>integer</entry>
  1966. </row>
  1967. <row id="v4l2-preemphasis"><entry spanname="descr">Configures the pre-emphasis value for broadcasting.
  1968. A pre-emphasis filter is applied to the broadcast to accentuate the high audio frequencies.
  1969. Depending on the region, a time constant of either 50 or 75 useconds is used. The enum&nbsp;v4l2_preemphasis
  1970. defines possible values for pre-emphasis. Here they are:</entry>
  1971. </row><row>
  1972. <entrytbl spanname="descr" cols="2">
  1973. <tbody valign="top">
  1974. <row>
  1975. <entry><constant>V4L2_PREEMPHASIS_DISABLED</constant>&nbsp;</entry>
  1976. <entry>No pre-emphasis is applied.</entry>
  1977. </row>
  1978. <row>
  1979. <entry><constant>V4L2_PREEMPHASIS_50_uS</constant>&nbsp;</entry>
  1980. <entry>A pre-emphasis of 50 uS is used.</entry>
  1981. </row>
  1982. <row>
  1983. <entry><constant>V4L2_PREEMPHASIS_75_uS</constant>&nbsp;</entry>
  1984. <entry>A pre-emphasis of 75 uS is used.</entry>
  1985. </row>
  1986. </tbody>
  1987. </entrytbl>
  1988. </row>
  1989. <row>
  1990. <entry spanname="id"><constant>V4L2_CID_TUNE_POWER_LEVEL</constant>&nbsp;</entry>
  1991. <entry>integer</entry>
  1992. </row>
  1993. <row><entry spanname="descr">Sets the output power level for signal transmission.
  1994. Unit is in dBuV. Range and step are driver-specific.</entry>
  1995. </row>
  1996. <row>
  1997. <entry spanname="id"><constant>V4L2_CID_TUNE_ANTENNA_CAPACITOR</constant>&nbsp;</entry>
  1998. <entry>integer</entry>
  1999. </row>
  2000. <row><entry spanname="descr">This selects the value of antenna tuning capacitor
  2001. manually or automatically if set to zero. Unit, range and step are driver-specific.</entry>
  2002. </row>
  2003. <row><entry></entry></row>
  2004. </tbody>
  2005. </tgroup>
  2006. </table>
  2007. <para>For more details about RDS specification, refer to
  2008. <xref linkend="en50067" /> document, from CENELEC.</para>
  2009. </section>
  2010. <section id="flash-controls">
  2011. <title>Flash Control Reference</title>
  2012. <note>
  2013. <title>Experimental</title>
  2014. <para>This is an <link linkend="experimental">experimental</link>
  2015. interface and may change in the future.</para>
  2016. </note>
  2017. <para>
  2018. The V4L2 flash controls are intended to provide generic access
  2019. to flash controller devices. Flash controller devices are
  2020. typically used in digital cameras.
  2021. </para>
  2022. <para>
  2023. The interface can support both LED and xenon flash devices. As
  2024. of writing this, there is no xenon flash driver using this
  2025. interface.
  2026. </para>
  2027. <section id="flash-controls-use-cases">
  2028. <title>Supported use cases</title>
  2029. <section>
  2030. <title>Unsynchronised LED flash (software strobe)</title>
  2031. <para>
  2032. Unsynchronised LED flash is controlled directly by the
  2033. host as the sensor. The flash must be enabled by the host
  2034. before the exposure of the image starts and disabled once
  2035. it ends. The host is fully responsible for the timing of
  2036. the flash.
  2037. </para>
  2038. <para>Example of such device: Nokia N900.</para>
  2039. </section>
  2040. <section>
  2041. <title>Synchronised LED flash (hardware strobe)</title>
  2042. <para>
  2043. The synchronised LED flash is pre-programmed by the host
  2044. (power and timeout) but controlled by the sensor through a
  2045. strobe signal from the sensor to the flash.
  2046. </para>
  2047. <para>
  2048. The sensor controls the flash duration and timing. This
  2049. information typically must be made available to the
  2050. sensor.
  2051. </para>
  2052. </section>
  2053. <section>
  2054. <title>LED flash as torch</title>
  2055. <para>
  2056. LED flash may be used as torch in conjunction with another
  2057. use case involving camera or individually.
  2058. </para>
  2059. </section>
  2060. </section>
  2061. <table pgwide="1" frame="none" id="flash-control-id">
  2062. <title>Flash Control IDs</title>
  2063. <tgroup cols="4">
  2064. <colspec colname="c1" colwidth="1*" />
  2065. <colspec colname="c2" colwidth="6*" />
  2066. <colspec colname="c3" colwidth="2*" />
  2067. <colspec colname="c4" colwidth="6*" />
  2068. <spanspec namest="c1" nameend="c2" spanname="id" />
  2069. <spanspec namest="c2" nameend="c4" spanname="descr" />
  2070. <thead>
  2071. <row>
  2072. <entry spanname="id" align="left">ID</entry>
  2073. <entry align="left">Type</entry>
  2074. </row><row rowsep="1"><entry spanname="descr" align="left">Description</entry>
  2075. </row>
  2076. </thead>
  2077. <tbody valign="top">
  2078. <row><entry></entry></row>
  2079. <row>
  2080. <entry spanname="id"><constant>V4L2_CID_FLASH_CLASS</constant></entry>
  2081. <entry>class</entry>
  2082. </row>
  2083. <row>
  2084. <entry spanname="descr">The FLASH class descriptor.</entry>
  2085. </row>
  2086. <row>
  2087. <entry spanname="id"><constant>V4L2_CID_FLASH_LED_MODE</constant></entry>
  2088. <entry>menu</entry>
  2089. </row>
  2090. <row id="v4l2-flash-led-mode">
  2091. <entry spanname="descr">Defines the mode of the flash LED,
  2092. the high-power white LED attached to the flash controller.
  2093. Setting this control may not be possible in presence of
  2094. some faults. See V4L2_CID_FLASH_FAULT.</entry>
  2095. </row>
  2096. <row>
  2097. <entrytbl spanname="descr" cols="2">
  2098. <tbody valign="top">
  2099. <row>
  2100. <entry><constant>V4L2_FLASH_LED_MODE_NONE</constant></entry>
  2101. <entry>Off.</entry>
  2102. </row>
  2103. <row>
  2104. <entry><constant>V4L2_FLASH_LED_MODE_FLASH</constant></entry>
  2105. <entry>Flash mode.</entry>
  2106. </row>
  2107. <row>
  2108. <entry><constant>V4L2_FLASH_LED_MODE_TORCH</constant></entry>
  2109. <entry>Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY.</entry>
  2110. </row>
  2111. </tbody>
  2112. </entrytbl>
  2113. </row>
  2114. <row>
  2115. <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_SOURCE</constant></entry>
  2116. <entry>menu</entry>
  2117. </row>
  2118. <row id="v4l2-flash-strobe-source"><entry
  2119. spanname="descr">Defines the source of the flash LED
  2120. strobe.</entry>
  2121. </row>
  2122. <row>
  2123. <entrytbl spanname="descr" cols="2">
  2124. <tbody valign="top">
  2125. <row>
  2126. <entry><constant>V4L2_FLASH_STROBE_SOURCE_SOFTWARE</constant></entry>
  2127. <entry>The flash strobe is triggered by using
  2128. the V4L2_CID_FLASH_STROBE control.</entry>
  2129. </row>
  2130. <row>
  2131. <entry><constant>V4L2_FLASH_STROBE_SOURCE_EXTERNAL</constant></entry>
  2132. <entry>The flash strobe is triggered by an
  2133. external source. Typically this is a sensor,
  2134. which makes it possible to synchronises the
  2135. flash strobe start to exposure start.</entry>
  2136. </row>
  2137. </tbody>
  2138. </entrytbl>
  2139. </row>
  2140. <row>
  2141. <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE</constant></entry>
  2142. <entry>button</entry>
  2143. </row>
  2144. <row>
  2145. <entry spanname="descr">Strobe flash. Valid when
  2146. V4L2_CID_FLASH_LED_MODE is set to
  2147. V4L2_FLASH_LED_MODE_FLASH and V4L2_CID_FLASH_STROBE_SOURCE
  2148. is set to V4L2_FLASH_STROBE_SOURCE_SOFTWARE. Setting this
  2149. control may not be possible in presence of some faults.
  2150. See V4L2_CID_FLASH_FAULT.</entry>
  2151. </row>
  2152. <row>
  2153. <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STOP</constant></entry>
  2154. <entry>button</entry>
  2155. </row>
  2156. <row><entry spanname="descr">Stop flash strobe immediately.</entry>
  2157. </row>
  2158. <row>
  2159. <entry spanname="id"><constant>V4L2_CID_FLASH_STROBE_STATUS</constant></entry>
  2160. <entry>boolean</entry>
  2161. </row>
  2162. <row>
  2163. <entry spanname="descr">Strobe status: whether the flash
  2164. is strobing at the moment or not. This is a read-only
  2165. control.</entry>
  2166. </row>
  2167. <row>
  2168. <entry spanname="id"><constant>V4L2_CID_FLASH_TIMEOUT</constant></entry>
  2169. <entry>integer</entry>
  2170. </row>
  2171. <row>
  2172. <entry spanname="descr">Hardware timeout for flash. The
  2173. flash strobe is stopped after this period of time has
  2174. passed from the start of the strobe.</entry>
  2175. </row>
  2176. <row>
  2177. <entry spanname="id"><constant>V4L2_CID_FLASH_INTENSITY</constant></entry>
  2178. <entry>integer</entry>
  2179. </row>
  2180. <row>
  2181. <entry spanname="descr">Intensity of the flash strobe when
  2182. the flash LED is in flash mode
  2183. (V4L2_FLASH_LED_MODE_FLASH). The unit should be milliamps
  2184. (mA) if possible.</entry>
  2185. </row>
  2186. <row>
  2187. <entry spanname="id"><constant>V4L2_CID_FLASH_TORCH_INTENSITY</constant></entry>
  2188. <entry>integer</entry>
  2189. </row>
  2190. <row>
  2191. <entry spanname="descr">Intensity of the flash LED in
  2192. torch mode (V4L2_FLASH_LED_MODE_TORCH). The unit should be
  2193. milliamps (mA) if possible. Setting this control may not
  2194. be possible in presence of some faults. See
  2195. V4L2_CID_FLASH_FAULT.</entry>
  2196. </row>
  2197. <row>
  2198. <entry spanname="id"><constant>V4L2_CID_FLASH_INDICATOR_INTENSITY</constant></entry>
  2199. <entry>integer</entry>
  2200. </row>
  2201. <row>
  2202. <entry spanname="descr">Intensity of the indicator LED.
  2203. The indicator LED may be fully independent of the flash
  2204. LED. The unit should be microamps (uA) if possible.</entry>
  2205. </row>
  2206. <row>
  2207. <entry spanname="id"><constant>V4L2_CID_FLASH_FAULT</constant></entry>
  2208. <entry>bitmask</entry>
  2209. </row>
  2210. <row>
  2211. <entry spanname="descr">Faults related to the flash. The
  2212. faults tell about specific problems in the flash chip
  2213. itself or the LEDs attached to it. Faults may prevent
  2214. further use of some of the flash controls. In particular,
  2215. V4L2_CID_FLASH_LED_MODE is set to V4L2_FLASH_LED_MODE_NONE
  2216. if the fault affects the flash LED. Exactly which faults
  2217. have such an effect is chip dependent. Reading the faults
  2218. resets the control and returns the chip to a usable state
  2219. if possible.</entry>
  2220. </row>
  2221. <row>
  2222. <entrytbl spanname="descr" cols="2">
  2223. <tbody valign="top">
  2224. <row>
  2225. <entry><constant>V4L2_FLASH_FAULT_OVER_VOLTAGE</constant></entry>
  2226. <entry>Flash controller voltage to the flash LED
  2227. has exceeded the limit specific to the flash
  2228. controller.</entry>
  2229. </row>
  2230. <row>
  2231. <entry><constant>V4L2_FLASH_FAULT_TIMEOUT</constant></entry>
  2232. <entry>The flash strobe was still on when
  2233. the timeout set by the user ---
  2234. V4L2_CID_FLASH_TIMEOUT control --- has expired.
  2235. Not all flash controllers may set this in all
  2236. such conditions.</entry>
  2237. </row>
  2238. <row>
  2239. <entry><constant>V4L2_FLASH_FAULT_OVER_TEMPERATURE</constant></entry>
  2240. <entry>The flash controller has overheated.</entry>
  2241. </row>
  2242. <row>
  2243. <entry><constant>V4L2_FLASH_FAULT_SHORT_CIRCUIT</constant></entry>
  2244. <entry>The short circuit protection of the flash
  2245. controller has been triggered.</entry>
  2246. </row>
  2247. </tbody>
  2248. </entrytbl>
  2249. </row>
  2250. <row>
  2251. <entry spanname="id"><constant>V4L2_CID_FLASH_CHARGE</constant></entry>
  2252. <entry>boolean</entry>
  2253. </row>
  2254. <row><entry spanname="descr">Enable or disable charging of the xenon
  2255. flash capacitor.</entry>
  2256. </row>
  2257. <row>
  2258. <entry spanname="id"><constant>V4L2_CID_FLASH_READY</constant></entry>
  2259. <entry>boolean</entry>
  2260. </row>
  2261. <row>
  2262. <entry spanname="descr">Is the flash ready to strobe?
  2263. Xenon flashes require their capacitors charged before
  2264. strobing. LED flashes often require a cooldown period
  2265. after strobe during which another strobe will not be
  2266. possible. This is a read-only control.</entry>
  2267. </row>
  2268. <row><entry></entry></row>
  2269. </tbody>
  2270. </tgroup>
  2271. </table>
  2272. </section>
  2273. </section>
  2274. <!--
  2275. Local Variables:
  2276. mode: sgml
  2277. sgml-parent-document: "common.sgml"
  2278. indent-tabs-mode: nil
  2279. End:
  2280. -->