€•n1Œ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Œ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 ”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”h±h²Œforce”‰Œlanguage”Œc”Œhighlight_args”}”uh1jhŸ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”…””}”(hjJhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjGhž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+)”}”(hjgh]”hŒfd”…””}”(hjihžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hjeubah}”(h]”h ]”h"]”h$]”h&]”uh1jchŸh³h Khj_ubhŒ definition”“”)”}”(hhh]”hé)”}”(hŒ-File descriptor returned by :c:func:`open()`.”h]”(hŒFile descriptor returned by ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:c:func:`open()`”h]”j+)”}”(hj‹h]”hŒopen()”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(Œxref”j#Œc-func”eh"]”h$]”h&]”uh1j*hj‰ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ"userspace-api/media/v4l/func-ioctl”Œ refdomain”j#Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰Œ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”jªŒ ASTIdentifier”“”)”}”Œ identifier”ŒV4L”sbN†”asbŒ reftarget”Œopen”uh1hhŸh³h KhjubhŒ.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h Khj~ubah}”(h]”h ]”h"]”h$]”h&]”uh1j|hj_ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j]hŸh³h KhjZubj^)”}”(hŒp``request`` V4L2 ioctl request code as defined in the ``videodev2.h`` header file, for example VIDIOC_QUERYCAP. ”h]”(jd)”}”(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&]”uh1jchŸ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 ”…””}”(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, for example VIDIOC_QUERYCAP.”…””}”(hjîhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h Khjëubah}”(h]”h ]”h"]”h$]”h&]”uh1j|hjÐubeh}”(h]”h ]”h"]”h$]”h&]”uh1j]hŸh³h K hjZhžhubj^)”}”(hŒ?``argp`` Pointer to a function parameter, usually a structure. ”h]”(jd)”}”(hŒ``argp``”h]”j+)”}”(hj h]”hŒargp”…””}”(hj"hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jchŸh³h K#hjubj})”}”(hhh]”hé)”}”(hŒ5Pointer to a function parameter, usually a structure.”h]”hŒ5Pointer to a function parameter, usually a structure.”…””}”(hj8hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h K#hj5ubah}”(h]”h ]”h"]”h$]”h&]”uh1j|hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j]hŸh³h K#hjZhžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1jXhjGhž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”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhj`hž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 ”…””}”(hjqhžhhŸNh Nubh)”}”(hŒ:ref:`ioctl() `”h]”hŒinline”“”)”}”(hj{h]”hŒioctl()”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(j—Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j}hjyubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j£Œ refdomain”j‰Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj¸Œ func-ioctl”uh1hhŸh³h K(hjqubhŒ8 function is used to program V4L2 devices. The argument ”…””}”(hjqhžhhŸNh Nubj+)”}”(hŒ``fd``”h]”hŒfd”…””}”(hjŸhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hjqubhŒ+ must be an open file descriptor. An ioctl ”…””}”(hjqhžhhŸNh Nubj+)”}”(hŒ ``request``”h]”hŒrequest”…””}”(hj±hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hjqubhŒr has encoded in it whether the argument is an input, output or read/write parameter, and the size of the argument ”…””}”(hjqhžhhŸNh Nubj+)”}”(hŒ``argp``”h]”hŒargp”…””}”(hjÃhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hjqubhŒP in bytes. Macros and defines specifying V4L2 ioctl requests are located in the ”…””}”(hjqhžhhŸNh Nubj+)”}”(hŒ``videodev2.h``”h]”hŒ videodev2.h”…””}”(hjÕhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j*hjqubhŒÖ 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 ”…””}”(hjqhž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(hjqubhŒ.”…””}”(hjqhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h K(hj`hž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”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjhž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”…””}”(hj2hž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~)”}”(hjFh]”hŒGeneric Error Codes”…””}”(hjHhžhhŸNh Nubah}”(h]”h ]”(j—Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j}hjDubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j£Œ refdomain”jRŒ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 K5hjhž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.”…””}”(hjnhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h K9hjhž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Áj‰j†hýhújDjAj]jZjjjj~uŒ nametypes”}”(jŠˆj‰‰hý‰jD‰j]‰j‰j‰uh}”(hÁhÄj†hÄhúh×jAjjZjGjj`j~juŒ 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.”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”uh1hèhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h³Œline”Kuh1jubaŒ transformer”NŒ include_log”]”Œ decoration”Nhžhub.