€•.CŒ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ŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”ŒH/translations/pt_BR/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”auh1j%hjh²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”…”�”}”(hjOh²hh³Nh´Nubah}”(h]”h ]”Œn”ah"]”h$]”h&]”uh1jMhjIubah}”(h]”h ]”(Œsig-name”Œdescname”eh"]”h$]”h&]”hÅhÆuh1jGhjCh²hh³hÇh´Kubah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒ add_permalink”ˆuh1jAŒsphinx_line_type”Œ declarator”hj=h²hh³hÇh´Kubah}”(h]”j4ah ]”(Œsig”Œ sig-object”eh"]”h$]”h&]”Œ is_multiline”ˆŒ _toc_parts”)Œ _toc_name”huh1j;h³hÇh´Khj8h²hubhŒ desc_content”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”uh1jyhj8h²hh³hÇh´Kubeh}”(h]”h ]”(Œc”Œmacro”eh"]”h$]”h&]”Œdomain”j‡Œobjtype”jˆŒdesctype”jˆŒnoindex”‰Œ noindexentry”‰Œnocontentsentry”‰uh1j6h²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”j‡Œc-func”eh"]”h$]”h&]”uh1j–hjõubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ4userspace-api/media/mediactl/media-ioc-request-alloc”Œ refdomain”j‡Œ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—)�”}”(hjBh]”hŒargp”…”�”}”(hjDh²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.”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KhjWubah}”(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”…”�”}”(hj…h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj‚h²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 ”…”�”}”(hj“h²hh³Nh´Nubh)�”}”(hŒ#:ref:`requests `”h]”hŒinline”“”)�”}”(hj�h]”hŒrequests”…”�”}”(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-api”uh1hh³hÇh´K"hj“ubhŒR, then this ioctl can be used to allocate a request. If it is not supported, then ”…”�”}”(hj“h²hh³Nh´Nubj—)�”}”(hŒ ``errno``”h]”hŒerrno”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j–hj“ubhŒ is set to ”…”�”}”(hj“h²hh³Nh´Nubj—)�”}”(hŒ ``ENOTTY``”h]”hŒENOTTY”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j–hj“ubhŒF. A request is accessed through a file descriptor that is returned in ”…”�”}”(hj“h²hh³Nh´Nubj—)�”}”(hŒ ``*argp``”h]”hŒ*argp”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j–hj“ubhŒ.”…”�”}”(hj“h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K"hj‚h²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 )�”}”(hjh]”hŒ VIDIOC_QBUF”…”�”}”(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$Œ vidioc_qbuf”uh1hh³hÇh´K'hjýubhŒ, ”…”�”}”(hjýh²hh³Nh´Nubh)�”}”(hŒ.:ref:`VIDIOC_G_EXT_CTRLS `”h]”j )�”}”(hj+h]”hŒVIDIOC_G_EXT_CTRLS”…”�”}”(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”j7Œ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 )�”}”(hjOh]”hŒVIDIOC_S_EXT_CTRLS”…”�”}”(hjQh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jŸhjMubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j[Œ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 )�”}”(hjsh]”hŒVIDIOC_TRY_EXT_CTRLS”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jŸhjqubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒ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'hj‚h²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Ÿhj£ubah}”(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-hj‚h²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´K1hj‚h²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 ”…”�”}”(hj#h²hh³Nh´Nubh)�”}”(hŒ:c:func:`close()`”h]”j—)�”}”(hj-h]”hŒclose()”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”(jj‡Œc-func”eh"]”h$]”h&]”uh1j–hj+ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j‡Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjj$Œclose”uh1hh³hÇh´K4hj#ubhŒ@ and the driver no longer uses the request internally. See also ”…”�”}”(hj#h²hh³Nh´Nubh)�”}”(hŒ%:ref:`here `”h]”j )�”}”(hjPh]”hŒhere”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jŸhjNubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j\Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj$Œmedia-request-life-time”uh1hh³hÇh´K4hj#ubhŒ for more information.”…”�”}”(hj#h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K4hj‚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”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj€h²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