€•\2Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ6/translations/zh_CN/userspace-api/media/v4l/func-ioctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/zh_TW/userspace-api/media/v4l/func-ioctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/it_IT/userspace-api/media/v4l/func-ioctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/ja_JP/userspace-api/media/v4l/func-ioctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/ko_KR/userspace-api/media/v4l/func-ioctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/pt_BR/userspace-api/media/v4l/func-ioctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ6/translations/sp_SP/userspace-api/media/v4l/func-ioctl”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”h]”hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒP/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/func-ioctl.rst”h´KubhŒtarget”“”)”}”(hŒ.. _func-ioctl:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œ func-ioctl”uh1hÈh´Khhh²hh³hÇubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ V4L2 ioctl()”h]”hŒ V4L2 ioctl()”…””}”(hhÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhØh²hh³hÇh´Kubh×)”}”(hhh]”(hÜ)”}”(hŒName”h]”hŒName”…””}”(hhîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhëh²hh³hÇh´K ubhŒ paragraph”“”)”}”(hŒ"v4l2-ioctl - Program a V4L2 device”h]”hŒ"v4l2-ioctl - Program a V4L2 device”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K hhëh²hubeh}”(h]”Œname”ah ]”h"]”Œname”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K ubh×)”}”(hhh]”(hÜ)”}”(hŒSynopsis”h]”hŒSynopsis”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjh²hh³hÇh´KubhŒ literal_block”“”)”}”(hŒ#include ”h]”hŒ#include ”…””}”hj'sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”Œc”Œhighlight_args”}”uh1j%h³hÇh´Khjh²hubhý)”}”(hŒ.``int ioctl(int fd, int request, void *argp)``”h]”hŒliteral”“”)”}”(hj<h]”hŒ*int ioctl(int fd, int request, void *argp)”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjh²hubeh}”(h]”Œsynopsis”ah ]”h"]”Œsynopsis”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Kubh×)”}”(hhh]”(hÜ)”}”(hŒ Arguments”h]”hŒ Arguments”…””}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj[h²hh³hÇh´KubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒ5``fd`` File descriptor returned by :c:func:`open()`. ”h]”(hŒterm”“”)”}”(hŒ``fd``”h]”j?)”}”(hj{h]”hŒfd”…””}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjyubah}”(h]”h ]”h"]”h$]”h&]”uh1jwh³hÇh´KhjsubhŒ definition”“”)”}”(hhh]”hý)”}”(hŒ-File descriptor returned by :c:func:`open()`.”h]”(hŒFile descriptor returned by ”…””}”(hj•h²hh³Nh´Nubh)”}”(hŒ:c:func:`open()`”h]”j?)”}”(hjŸh]”hŒopen()”…””}”(hj¡h²hh³Nh´Nubah}”(h]”h ]”(Œxref”j7Œc-func”eh"]”h$]”h&]”uh1j>hjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ"userspace-api/media/v4l/func-ioctl”Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰Œ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”j¾Œ ASTIdentifier”“”)”}”Œ identifier”ŒV4L”sbN†”asbŒ reftarget”Œopen”uh1hh³hÇh´Khj•ubhŒ.”…””}”(hj•h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khj’ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjsubeh}”(h]”h ]”h"]”h$]”h&]”uh1jqh³hÇh´Khjnubjr)”}”(hŒp``request`` V4L2 ioctl request code as defined in the ``videodev2.h`` header file, for example VIDIOC_QUERYCAP. ”h]”(jx)”}”(hŒ ``request``”h]”j?)”}”(hjêh]”hŒrequest”…””}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjèubah}”(h]”h ]”h"]”h$]”h&]”uh1jwh³hÇh´K hjäubj‘)”}”(hhh]”hý)”}”(hŒcV4L2 ioctl request code as defined in the ``videodev2.h`` header file, for example VIDIOC_QUERYCAP.”h]”(hŒ*V4L2 ioctl request code as defined in the ”…””}”(hjh²hh³Nh´Nubj?)”}”(hŒ``videodev2.h``”h]”hŒ videodev2.h”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hjubhŒ* header file, for example VIDIOC_QUERYCAP.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjÿubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjäubeh}”(h]”h ]”h"]”h$]”h&]”uh1jqh³hÇh´K hjnh²hubjr)”}”(hŒ?``argp`` Pointer to a function parameter, usually a structure. ”h]”(jx)”}”(hŒ``argp``”h]”j?)”}”(hj4h]”hŒargp”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj2ubah}”(h]”h ]”h"]”h$]”h&]”uh1jwh³hÇh´K#hj.ubj‘)”}”(hhh]”hý)”}”(hŒ5Pointer to a function parameter, usually a structure.”h]”hŒ5Pointer to a function parameter, usually a structure.”…””}”(hjLh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K#hjIubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj.ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jqh³hÇh´K#hjnh²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1jlhj[h²hh³hÇh´Nubeh}”(h]”Œ arguments”ah ]”h"]”Œ arguments”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Kubh×)”}”(hhh]”(hÜ)”}”(hŒ Description”h]”hŒ Description”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjth²hh³hÇh´K&ubhý)”}”(hXSThe :ref:`ioctl() ` function is used to program V4L2 devices. The argument ``fd`` must be an open file descriptor. An ioctl ``request`` has encoded in it whether the argument is an input, output or read/write parameter, and the size of the argument ``argp`` in bytes. Macros and defines specifying V4L2 ioctl requests are located in the ``videodev2.h`` header file. Applications should use their own copy, not include the version in the kernel sources on the system they compile on. All V4L2 ioctl requests, their respective function and parameters are specified in :ref:`user-func`.”h]”(hŒThe ”…””}”(hj…h²hh³Nh´Nubh)”}”(hŒ:ref:`ioctl() `”h]”hŒinline”“”)”}”(hjh]”hŒioctl()”…””}”(hj“h²hh³Nh´Nubah}”(h]”h ]”(j«Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j‘hjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j·Œ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjÌŒ func-ioctl”uh1hh³hÇh´K(hj…ubhŒ8 function is used to program V4L2 devices. The argument ”…””}”(hj…h²hh³Nh´Nubj?)”}”(hŒ``fd``”h]”hŒfd”…””}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj…ubhŒ+ must be an open file descriptor. An ioctl ”…””}”(hj…h²hh³Nh´Nubj?)”}”(hŒ ``request``”h]”hŒrequest”…””}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj…ubhŒr has encoded in it whether the argument is an input, output or read/write parameter, and the size of the argument ”…””}”(hj…h²hh³Nh´Nubj?)”}”(hŒ``argp``”h]”hŒargp”…””}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj…ubhŒP in bytes. Macros and defines specifying V4L2 ioctl requests are located in the ”…””}”(hj…h²hh³Nh´Nubj?)”}”(hŒ``videodev2.h``”h]”hŒ videodev2.h”…””}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj…ubhŒÖ header file. Applications should use their own copy, not include the version in the kernel sources on the system they compile on. All V4L2 ioctl requests, their respective function and parameters are specified in ”…””}”(hj…h²hh³Nh´Nubh)”}”(hŒ:ref:`user-func`”h]”j’)”}”(hjýh]”hŒ user-func”…””}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”(j«Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j‘hjûubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j·Œ refdomain”j Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjÌŒ user-func”uh1hh³hÇh´K(hj…ubhŒ.”…””}”(hj…h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K(hjth²hubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K&ubh×)”}”(hhh]”(hÜ)”}”(hŒ Return Value”h]”hŒ Return Value”…””}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj-h²hh³hÇh´K3ubhý)”}”(hŒ´On success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes ` chapter.”h]”(hŒ.On success 0 is returned, on error -1 and the ”…””}”(hj>h²hh³Nh´Nubj?)”}”(hŒ ``errno``”h]”hŒerrno”…””}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j>hj>ubhŒM variable is set appropriately. The generic error codes are described at the ”…””}”(hj>h²hh³Nh´Nubh)”}”(hŒ':ref:`Generic Error Codes `”h]”j’)”}”(hjZh]”hŒGeneric Error Codes”…””}”(hj\h²hh³Nh´Nubah}”(h]”h ]”(j«Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j‘hjXubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j·Œ refdomain”jfŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjÌŒ gen-errors”uh1hh³hÇh´K5hj>ubhŒ chapter.”…””}”(hj>h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K5hj-h²hubhý)”}”(hŒcWhen an ioctl that takes an output or read/write parameter fails, the parameter remains unmodified.”h]”hŒcWhen an ioctl that takes an output or read/write parameter fails, the parameter remains unmodified.”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K9hj-h²hubeh}”(h]”Œ return-value”ah ]”h"]”Œ return value”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K3ubeh}”(h]”(Œ v4l2-ioctl”hÕeh ]”h"]”(Œ v4l2 ioctl()”Œ func-ioctl”eh$]”h&]”uh1hÖhhh²hh³hÇh´KŒexpect_referenced_by_name”}”jžhÊsŒexpect_referenced_by_id”}”hÕhÊsubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÛNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jÈŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”hÕ]”hÊasŒnameids”}”(jžhÕjjšjjjXjUjqjnj*j'j•j’uŒ nametypes”}”(jžˆj‰j‰jX‰jq‰j*‰j•‰uh}”(hÕhØjšhØjhëjUjjnj[j'jtj’j-uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)”}”(hhh]”hý)”}”(hhh]”hŒ0Hyperlink target "func-ioctl" is not referenced.”…””}”hj2sbah}”(h]”h ]”h"]”h$]”h&]”uh1hühj/ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1j-ubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.