Ssphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget4/translations/zh_CN/userspace-api/media/dvb/dmx-qbufmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/zh_TW/userspace-api/media/dvb/dmx-qbufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/it_IT/userspace-api/media/dvb/dmx-qbufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/ja_JP/userspace-api/media/dvb/dmx-qbufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/ko_KR/userspace-api/media/dvb/dmx-qbufmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/sp_SP/userspace-api/media/dvb/dmx-qbufmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhN/var/lib/git/docbuild/linux/Documentation/userspace-api/media/dvb/dmx-qbuf.rsthKubhtarget)}(h .. _DMX_QBUF:h]h}(h]h ]h"]h$]h&]refiddmx-qbufuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hioctl DMX_QBUF, DMX_DQBUFh]hioctl DMX_QBUF, DMX_DQBUF}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(h8DMX_QBUF - DMX_DQBUF - Exchange a buffer with the driverh]h8DMX_QBUF - DMX_DQBUF - Exchange a buffer with the driver}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubhwarning)}(hthis API is still experimentalh]h)}(hhh]hthis API is still experimental}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhNubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleDTV.dmx.DMX_QBUF (C macro)c.DTV.dmx.DMX_QBUFhNtauh1j*hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(hDMX_QBUFh]hdesc_signature_line)}(hDMX_QBUFh]h desc_name)}(hDMX_QBUFh]h desc_sig_name)}(hjDh]hDMX_QBUF}(hjThhhNhNubah}(h]h ]nah"]h$]h&]uh1jRhjNubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jLhjHhhhhhKubah}(h]h ]h"]h$]h&]hh add_permalinkuh1jFsphinx_line_type declaratorhjBhhhhhKubah}(h]j9ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j@hhhKhj=hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1j~hj=hhhhhKubeh}(h]h ](cmacroeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j;hhhjhNhNubh)}(h8``int ioctl(int fd, DMX_QBUF, struct dmx_buffer *argp)``h]hliteral)}(hjh]h4int ioctl(int fd, DMX_QBUF, struct dmx_buffer *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj+)}(hhh]h}(h]h ]h"]h$]h&]entries](j7DTV.dmx.DMX_DQBUF (C macro)c.DTV.dmx.DMX_DQBUFhNtauh1j*hjhhhNhNubj<)}(hhh](jA)}(h DMX_DQBUFh]jG)}(h DMX_DQBUFh]jM)}(h DMX_DQBUFh]jS)}(hjh]h DMX_DQBUF}(hjhhhNhNubah}(h]h ]j^ah"]h$]h&]uh1jRhjubah}(h]h ](jejfeh"]h$]h&]hhuh1jLhjhhhhhKubah}(h]h ]h"]h$]h&]hhjpuh1jFjqjrhjhhhhhKubah}(h]jah ](jvjweh"]h$]h&]j{j|)j}huh1j@hhhKhjhhubj)}(hhh]h}(h]h ]h"]h$]h&]uh1j~hjhhhhhKubeh}(h]h ](jmacroeh"]h$]h&]jjjjjjjjjuh1j;hhhjhNhNubh)}(h9``int ioctl(int fd, DMX_DQBUF, struct dmx_buffer *argp)``h]j)}(hjh]h5int ioctl(int fd, DMX_DQBUF, struct dmx_buffer *argp)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h5``fd`` File descriptor returned by :c:func:`open()`. h](hterm)}(h``fd``h]j)}(hj;h]hfd}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubah}(h]h ]h"]h$]h&]uh1j7hhhK hj3ubh definition)}(hhh]h)}(h-File descriptor returned by :c:func:`open()`.h](hFile descriptor returned by }(hjUhhhNhNubh)}(h:c:func:`open()`h]j)}(hj_h]hopen()}(hjahhhNhNubah}(h]h ](xrefjc-funceh"]h$]h&]uh1jhj]ubah}(h]h ]h"]h$]h&]refdoc userspace-api/media/dvb/dmx-qbuf refdomainjreftypefunc refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data](j~ ASTIdentifier)} identifierDTVsbNj)}jdmxsbNesb reftargetopenuh1hhhhK hjUubh.}(hjUhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hjRubah}(h]h ]h"]h$]h&]uh1jPhj3ubeh}(h]h ]h"]h$]h&]uh1j1hhhK hj.ubj2)}(h1``argp`` Pointer to struct :c:type:`dmx_buffer`. h](j8)}(h``argp``h]j)}(hjh]hargp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1j7hhhK#hjubjQ)}(hhh]h)}(h'Pointer to struct :c:type:`dmx_buffer`.h](hPointer to struct }(hjhhhNhNubh)}(h:c:type:`dmx_buffer`h]j)}(hjh]h dmx_buffer}(hjhhhNhNubah}(h]h ](jkjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjw refdomainjreftypetype refexplicitrefwarnj}jj dmx_bufferuh1hhhhK#hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]uh1j1hhhK#hj.hhubeh}(h]h ]h"]h$]h&]uh1j,hjhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK&ubh)}(hApplications call the ``DMX_QBUF`` ioctl to enqueue an empty (capturing) or filled (output) buffer in the driver's incoming queue. The semantics depend on the selected I/O method.h](hApplications call the }(hj"hhhNhNubj)}(h ``DMX_QBUF``h]hDMX_QBUF}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh ioctl to enqueue an empty (capturing) or filled (output) buffer in the driver’s incoming queue. The semantics depend on the selected I/O method.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK(hjhhubh)}(hX<To enqueue a buffer applications set the ``index`` field. Valid index numbers range from zero to the number of buffers allocated with :ref:`DMX_REQBUFS` (struct :c:type:`dmx_requestbuffers` ``count``) minus one. The contents of the struct :c:type:`dmx_buffer` returned by a :ref:`DMX_QUERYBUF` ioctl will do as well.h](h)To enqueue a buffer applications set the }(hjBhhhNhNubj)}(h ``index``h]hindex}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubhT field. Valid index numbers range from zero to the number of buffers allocated with }(hjBhhhNhNubh)}(h:ref:`DMX_REQBUFS`h]hinline)}(hj^h]h DMX_REQBUFS}(hjbhhhNhNubah}(h]h ](jkstdstd-refeh"]h$]h&]uh1j`hj\ubah}(h]h ]h"]h$]h&]refdocjw refdomainjlreftyperef refexplicitrefwarnj dmx_reqbufsuh1hhhhK,hjBubh (struct }(hjBhhhNhNubh)}(h:c:type:`dmx_requestbuffers`h]j)}(hjh]hdmx_requestbuffers}(hjhhhNhNubah}(h]h ](jkjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjw refdomainjreftypetype refexplicitrefwarnj}jjdmx_requestbuffersuh1hhhhK,hjBubh }(hjBhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjBubh() minus one. The contents of the struct }(hjBhhhNhNubh)}(h:c:type:`dmx_buffer`h]j)}(hjh]h dmx_buffer}(hjhhhNhNubah}(h]h ](jkjc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjw refdomainjreftypetype refexplicitrefwarnj}jj dmx_bufferuh1hhhhK,hjBubh returned by a }(hjBhhhNhNubh)}(h:ref:`DMX_QUERYBUF`h]ja)}(hjh]h DMX_QUERYBUF}(hjhhhNhNubah}(h]h ](jkstdstd-refeh"]h$]h&]uh1j`hjubah}(h]h ]h"]h$]h&]refdocjw refdomainjreftyperef refexplicitrefwarnj dmx_querybufuh1hhhhK,hjBubh ioctl will do as well.}(hjBhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK,hjhhubh)}(hWhen ``DMX_QBUF`` is called with a pointer to this structure, it locks the memory pages of the buffer in physical memory, so they cannot be swapped out to disk. Buffers remain locked until dequeued, until the device is closed.h](hWhen }(hjhhhNhNubj)}(h ``DMX_QBUF``h]hDMX_QBUF}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is called with a pointer to this structure, it locks the memory pages of the buffer in physical memory, so they cannot be swapped out to disk. Buffers remain locked until dequeued, until the device is closed.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK2hjhhubh)}(hXAApplications call the ``DMX_DQBUF`` ioctl to dequeue a filled (capturing) buffer from the driver's outgoing queue. They just set the ``index`` field with the buffer ID to be queued. When ``DMX_DQBUF`` is called with a pointer to struct :c:type:`dmx_buffer`, the driver fills the remaining fields or returns an error code.h](hApplications call the }(hj$hhhNhNubj)}(h ``DMX_DQBUF``h]h DMX_DQBUF}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubhd ioctl to dequeue a filled (capturing) buffer from the driver’s outgoing queue. They just set the }(hj$hhhNhNubj)}(h ``index``h]hindex}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh- field with the buffer ID to be queued. When }(hj$hhhNhNubj)}(h ``DMX_DQBUF``h]h DMX_DQBUF}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ubh$ is called with a pointer to struct }(hj$hhhNhNubh)}(h:c:type:`dmx_buffer`h]j)}(hjdh]h dmx_buffer}(hjfhhhNhNubah}(h]h ](jkjc-typeeh"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]refdocjw refdomainjreftypetype refexplicitrefwarnj}jj dmx_bufferuh1hhhhK7hj$ubhA, the driver fills the remaining fields or returns an error code.}(hj$hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK7hjhhubh)}(hBy default ``DMX_DQBUF`` blocks when no buffer is in the outgoing queue. When the ``O_NONBLOCK`` flag was given to the :c:func:`open()` function, ``DMX_DQBUF`` returns immediately with an ``EAGAIN`` error code when no buffer is available.h](h By default }(hjhhhNhNubj)}(h ``DMX_DQBUF``h]h DMX_DQBUF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh: blocks when no buffer is in the outgoing queue. When the }(hjhhhNhNubj)}(h``O_NONBLOCK``h]h O_NONBLOCK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flag was given to the }(hjhhhNhNubh)}(h:c:func:`open()`h]j)}(hjh]hopen()}(hjhhhNhNubah}(h]h ](jkjc-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocjw refdomainjreftypefunc refexplicitrefwarnj}jjopenuh1hhhhK=hjubh function, }(hjhhhNhNubj)}(h ``DMX_DQBUF``h]h DMX_DQBUF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh returns immediately with an }(hjhhhNhNubj)}(h ``EAGAIN``h]hEAGAIN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh( error code when no buffer is available.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubh)}(hHThe struct :c:type:`dmx_buffer` structure is specified in :ref:`buffer`.h](h The struct }(hjhhhNhNubh)}(h:c:type:`dmx_buffer`h]j)}(hjh]h dmx_buffer}(hjhhhNhNubah}(h]h ](jkjc-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocjw refdomainjreftypetype refexplicitrefwarnj}jj dmx_bufferuh1hhhhKBhjubh structure is specified in }(hjhhhNhNubh)}(h :ref:`buffer`h]ja)}(hj1h]hbuffer}(hj3hhhNhNubah}(h]h ](jkstdstd-refeh"]h$]h&]uh1j`hj/ubah}(h]h ]h"]h$]h&]refdocjw refdomainj=reftyperef refexplicitrefwarnjbufferuh1hhhhKBhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKBhjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK&ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahhhhhKFubh)}(hOn 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 }(hjrhhhNhNubj)}(h ``errno``h]herrno}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjrubhM variable is set appropriately. The generic error codes are described at the }(hjrhhhNhNubh)}(h':ref:`Generic Error Codes `h]ja)}(hjh]hGeneric Error Codes}(hjhhhNhNubah}(h]h ](jkstdstd-refeh"]h$]h&]uh1j`hjubah}(h]h ]h"]h$]h&]refdocjw refdomainjreftyperef refexplicitrefwarnj gen-errorsuh1hhhhKHhjrubh chapter.}(hjrhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKHhjahhubj-)}(hhh](j2)}(hhEAGAIN Non-blocking I/O has been selected using ``O_NONBLOCK`` and no buffer was in the outgoing queue. h](j8)}(hEAGAINh]hEAGAIN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j7hhhKNhjubjQ)}(hhh]h)}(h`Non-blocking I/O has been selected using ``O_NONBLOCK`` and no buffer was in the outgoing queue.h](h)Non-blocking I/O has been selected using }(hjhhhNhNubj)}(h``O_NONBLOCK``h]h O_NONBLOCK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh) and no buffer was in the outgoing queue.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKMhjubah}(h]h ]h"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]uh1j1hhhKNhjubj2)}(hNEINVAL The ``index`` is out of bounds, or no buffers have been allocated yet. h](j8)}(hEINVALh]hEINVAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j7hhhKQhjubjQ)}(hhh]h)}(hFThe ``index`` is out of bounds, or no buffers have been allocated yet.h](hThe }(hjhhhNhNubj)}(h ``index``h]hindex}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh9 is out of bounds, or no buffers have been allocated yet.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKQhj ubah}(h]h ]h"]h$]h&]uh1jPhjubeh}(h]h ]h"]h$]h&]uh1j1hhhKQhjhhubj2)}(hwEIO ``DMX_DQBUF`` failed due to an internal error. Can also indicate temporary problems like signal loss or CRC errors.h](j8)}(hEIOh]hEIO}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j7hhhKThj;ubjQ)}(hhh]h)}(hs``DMX_DQBUF`` failed due to an internal error. Can also indicate temporary problems like signal loss or CRC errors.h](j)}(h ``DMX_DQBUF``h]h DMX_DQBUF}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jhjPubhf failed due to an internal error. Can also indicate temporary problems like signal loss or CRC errors.}(hjPhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKThjMubah}(h]h ]h"]h$]h&]uh1jPhj;ubeh}(h]h ]h"]h$]h&]uh1j1hhhKThjhhubeh}(h]h ]h"]h$]h&]uh1j,hjahhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhKFubeh}(h](ioctl-dmx-qbuf-dmx-dqbufheh ]h"](ioctl dmx_qbuf, dmx_dqbufdmx_qbufeh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}jhsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}h]hasnameids}(jhjjjjjjjj j^j[jju nametypes}(jjjjjj^juh}(hhjhjhjjj9jBjjj jj[jjjau footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h.Hyperlink target "dmx-qbuf" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1juba transformerN include_log] decorationNhhub.