€•.BŒ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”ŒH/translations/zh_CN/userspace-api/media/mediactl/media-ioc-request-alloc”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒH/translations/zh_TW/userspace-api/media/mediactl/media-ioc-request-alloc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒH/translations/it_IT/userspace-api/media/mediactl/media-ioc-request-alloc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒH/translations/ja_JP/userspace-api/media/mediactl/media-ioc-request-alloc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒH/translations/ko_KR/userspace-api/media/mediactl/media-ioc-request-alloc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒH/translations/sp_SP/userspace-api/media/mediactl/media-ioc-request-alloc”Œ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ŒCSPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later”h]”hŒCSPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒb/var/lib/git/docbuild/linux/Documentation/userspace-api/media/mediactl/media-ioc-request-alloc.rst”h KubhŒtarget”“”)”}”(hŒ.. _media_ioc_request_alloc:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œmedia-ioc-request-alloc”uh1h´h KhhhžhhŸh³ubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒioctl MEDIA_IOC_REQUEST_ALLOC”h]”hŒioctl MEDIA_IOC_REQUEST_ALLOC”…””}”(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Œ,MEDIA_IOC_REQUEST_ALLOC - Allocate a request”h]”hŒ,MEDIA_IOC_REQUEST_ALLOC - Allocate a request”…””}”(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Œindex”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(Œsingle”Œ$MC.MEDIA_IOC_REQUEST_ALLOC (C macro)”Œc.MC.MEDIA_IOC_REQUEST_ALLOC”hNt”auh1jhjhžhhŸNh NubhŒdesc”“”)”}”(hhh]”(hŒdesc_signature”“”)”}”(hŒMEDIA_IOC_REQUEST_ALLOC”h]”hŒdesc_signature_line”“”)”}”(hŒMEDIA_IOC_REQUEST_ALLOC”h]”hŒ desc_name”“”)”}”(hŒMEDIA_IOC_REQUEST_ALLOC”h]”hŒ desc_sig_name”“”)”}”(hj+h]”hŒMEDIA_IOC_REQUEST_ALLOC”…””}”(hj;hžhhŸNh Nubah}”(h]”h ]”Œn”ah"]”h$]”h&]”uh1j9hj5ubah}”(h]”h ]”(Œsig-name”Œdescname”eh"]”h$]”h&]”h±h²uh1j3hj/hžhhŸh³h Kubah}”(h]”h ]”h"]”h$]”h&]”h±h²Œ add_permalink”ˆuh1j-Œsphinx_line_type”Œ declarator”hj)hžhhŸh³h Kubah}”(h]”j ah ]”(Œsig”Œ sig-object”eh"]”h$]”h&]”Œ is_multiline”ˆŒ _toc_parts”)Œ _toc_name”huh1j'hŸh³h Khj$hžhubhŒ desc_content”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”uh1jehj$hžhhŸh³h Kubeh}”(h]”h ]”(Œc”Œmacro”eh"]”h$]”h&]”Œdomain”jsŒobjtype”jtŒdesctype”jtŒnoindex”‰Œ noindexentry”‰Œnocontentsentry”‰uh1j"hžhhjhŸNh Nubhé)”}”(hŒ9``int ioctl(int fd, MEDIA_IOC_REQUEST_ALLOC, int *argp)``”h]”hŒliteral”“”)”}”(hj€h]”hŒ5int ioctl(int fd, MEDIA_IOC_REQUEST_ALLOC, int *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‚hj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1j»hŸh³h Khj·ubhŒ 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”jsŒc-func”eh"]”h$]”h&]”uh1j‚hjáubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ4userspace-api/media/mediactl/media-ioc-request-alloc”Œ refdomain”jsŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰Œ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”jŒ ASTIdentifier”“”)”}”Œ identifier”ŒMC”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&]”uh1jÔhj·ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jµhŸh³h Khj²ubj¶)”}”(hŒ ``argp`` Pointer to an integer. ”h]”(j¼)”}”(hŒ``argp``”h]”jƒ)”}”(hj.h]”hŒargp”…””}”(hj0hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j‚hj,ubah}”(h]”h ]”h"]”h$]”h&]”uh1j»hŸh³h Khj(ubjÕ)”}”(hhh]”hé)”}”(hŒPointer to an integer.”h]”hŒPointer to an integer.”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h KhjCubah}”(h]”h ]”h"]”h$]”h&]”uh1jÔhj(ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jµhŸh³h Khj²hžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1j°hjŸ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”…””}”(hjqhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjnhžhhŸh³h K ubhé)”}”(hXIf the media device supports :ref:`requests `, then this ioctl can be used to allocate a request. If it is not supported, then ``errno`` is set to ``ENOTTY``. A request is accessed through a file descriptor that is returned in ``*argp``.”h]”(hŒIf the media device supports ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ#:ref:`requests `”h]”hŒinline”“”)”}”(hj‰h]”hŒrequests”…””}”(hjhž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Œmedia-request-api”uh1hhŸh³h K"hjubhŒR, then this ioctl can be used to allocate a request. If it is not supported, then ”…””}”(hjhžhhŸNh Nubjƒ)”}”(hŒ ``errno``”h]”hŒerrno”…””}”(hj­hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j‚hjubhŒ is set to ”…””}”(hjhžhhŸNh Nubjƒ)”}”(hŒ ``ENOTTY``”h]”hŒENOTTY”…””}”(hj¿hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j‚hjubhŒF. A request is accessed through a file descriptor that is returned in ”…””}”(hjhžhhŸNh Nubjƒ)”}”(hŒ ``*argp``”h]”hŒ*argp”…””}”(hjÑhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j‚hjubhŒ.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h K"hjnhžhubhé)”}”(hXIf the request was successfully allocated, then the request file descriptor can be passed to the :ref:`VIDIOC_QBUF `, :ref:`VIDIOC_G_EXT_CTRLS `, :ref:`VIDIOC_S_EXT_CTRLS ` and :ref:`VIDIOC_TRY_EXT_CTRLS ` ioctls.”h]”(hŒaIf the request was successfully allocated, then the request file descriptor can be passed to the ”…””}”(hjéhžhhŸNh Nubh)”}”(hŒ :ref:`VIDIOC_QBUF `”h]”jŒ)”}”(hjóh]”hŒ VIDIOC_QBUF”…””}”(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Œ vidioc_qbuf”uh1hhŸh³h K'hjéubhŒ, ”…””}”(hjéhžhhŸNh Nubh)”}”(hŒ.:ref:`VIDIOC_G_EXT_CTRLS `”h]”jŒ)”}”(hjh]”hŒVIDIOC_G_EXT_CTRLS”…””}”(hjhž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Œvidioc_g_ext_ctrls”uh1hhŸh³h K'hjéubhŒ, ”…””}”hjésbh)”}”(hŒ.:ref:`VIDIOC_S_EXT_CTRLS `”h]”jŒ)”}”(hj;h]”hŒVIDIOC_S_EXT_CTRLS”…””}”(hj=hžhhŸNh Nubah}”(h]”h ]”(jïŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j‹hj9ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jûŒ refdomain”jGŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_g_ext_ctrls”uh1hhŸh³h K'hjéubhŒ and ”…””}”(hjéhžhhŸNh Nubh)”}”(hŒ0:ref:`VIDIOC_TRY_EXT_CTRLS `”h]”jŒ)”}”(hj_h]”hŒVIDIOC_TRY_EXT_CTRLS”…””}”(hjahžhhŸNh Nubah}”(h]”h ]”(jïŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j‹hj]ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jûŒ refdomain”jkŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_g_ext_ctrls”uh1hhŸh³h K'hjéubhŒ ioctls.”…””}”(hjéhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h K'hjnhžhubhé)”}”(hŒIn addition, the request can be queued by calling :ref:`MEDIA_REQUEST_IOC_QUEUE` and re-initialized by calling :ref:`MEDIA_REQUEST_IOC_REINIT`.”h]”(hŒ2In addition, the request can be queued by calling ”…””}”(hj‡hžhhŸNh Nubh)”}”(hŒ:ref:`MEDIA_REQUEST_IOC_QUEUE`”h]”jŒ)”}”(hj‘h]”hŒMEDIA_REQUEST_IOC_QUEUE”…””}”(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Œmedia_request_ioc_queue”uh1hhŸh³h K-hj‡ubhŒ and re-initialized by calling ”…””}”(hj‡hžhhŸNh Nubh)”}”(hŒ:ref:`MEDIA_REQUEST_IOC_REINIT`”h]”jŒ)”}”(hjµh]”hŒMEDIA_REQUEST_IOC_REINIT”…””}”(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Œmedia_request_ioc_reinit”uh1hhŸh³h K-hj‡ubhŒ.”…””}”(hj‡hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h K-hjnhžhubhé)”}”(hŒjFinally, the file descriptor can be :ref:`polled ` to wait for the request to complete.”h]”(hŒ$Finally, the file descriptor can be ”…””}”(hjÝhžhhŸNh Nubh)”}”(hŒ!:ref:`polled `”h]”jŒ)”}”(hjçh]”hŒpolled”…””}”(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Œrequest-func-poll”uh1hhŸh³h K1hjÝubhŒ% to wait for the request to complete.”…””}”(hjÝhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h K1hjnhžhubhé)”}”(hŒîThe request will remain allocated until all the file descriptors associated with it are closed by :c:func:`close()` and the driver no longer uses the request internally. See also :ref:`here ` for more information.”h]”(hŒbThe request will remain allocated until all the file descriptors associated with it are closed by ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:c:func:`close()`”h]”jƒ)”}”(hjh]”hŒclose()”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(jïjsŒc-func”eh"]”h$]”h&]”uh1j‚hjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jûŒ refdomain”jsŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒclose”uh1hhŸh³h K4hjubhŒ@ and the driver no longer uses the request internally. See also ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ%:ref:`here `”h]”jŒ)”}”(hj<h]”hŒhere”…””}”(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”jHŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒmedia-request-life-time”uh1hhŸh³h K4hjubhŒ for more information.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hèhŸh³h K4hjnhž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”…””}”(hjohžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjlhžhhŸh³h K:ubhé)”}”(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”…””}”(hj…hž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Œ)”}”(hj™h]”hŒGeneric Error Codes”…””}”(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Œ gen-errors”uh1hhŸh³h K