€•Œ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/dev-subdev”Œ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/dev-subdev”Œ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/dev-subdev”Œ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/dev-subdev”Œ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/dev-subdev”Œ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/dev-subdev”Œ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/dev-subdev”Œ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/dev-subdev.rst”h´KubhŒtarget”“”)�”}”(hŒ .. _subdev:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œsubdev”uh1hÈh´Khhh²hh³hÇubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒSub-device Interface”h]”hŒSub-device Interface”…”�”}”(hhÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhØh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hXHThe complex nature of V4L2 devices, where hardware is often made of several integrated circuits that need to interact with each other in a controlled way, leads to complex V4L2 drivers. The drivers usually reflect the hardware model in software, and model the different hardware components as software blocks called sub-devices.”h]”hXHThe complex nature of V4L2 devices, where hardware is often made of several integrated circuits that need to interact with each other in a controlled way, leads to complex V4L2 drivers. The drivers usually reflect the hardware model in software, and model the different hardware components as software blocks called sub-devices.”…”�”}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K hhØh²hubhì)�”}”(hX.V4L2 sub-devices are usually kernel-only objects. If the V4L2 driver implements the media device API, they will automatically inherit from media entities. Applications will be able to enumerate the sub-devices and discover the hardware topology using the media entities, pads and links enumeration API.”h]”hX.V4L2 sub-devices are usually kernel-only objects. If the V4L2 driver implements the media device API, they will automatically inherit from media entities. Applications will be able to enumerate the sub-devices and discover the hardware topology using the media entities, pads and links enumeration API.”…”�”}”(hhûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhhØh²hubhì)�”}”(hXIn addition to make sub-devices discoverable, drivers can also choose to make them directly configurable by applications. When both the sub-device driver and the V4L2 device driver support this, sub-devices will feature a character device node on which ioctls can be called to”h]”hXIn addition to make sub-devices discoverable, drivers can also choose to make them directly configurable by applications. When both the sub-device driver and the V4L2 device driver support this, sub-devices will feature a character device node on which ioctls can be called to”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhhØh²hubhŒ bullet_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ+query, read and write sub-devices controls ”h]”hì)�”}”(hŒ*query, read and write sub-devices controls”h]”hŒ*query, read and write sub-devices controls”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)�”}”(hŒ6subscribe and unsubscribe to events and retrieve them ”h]”hì)�”}”(hŒ5subscribe and unsubscribe to events and retrieve them”h]”hŒ5subscribe and unsubscribe to events and retrieve them”…”�”}”(hj:h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Khj6ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)�”}”(hŒ+negotiate image formats on individual pads ”h]”hì)�”}”(hŒ*negotiate image formats on individual pads”h]”hŒ*negotiate image formats on individual pads”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhjNubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubj)�”}”(hŒIinspect and modify internal data routing between pads of the same entity ”h]”hì)�”}”(hŒHinspect and modify internal data routing between pads of the same entity”h]”hŒHinspect and modify internal data routing between pads of the same entity”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K!hjfubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jh³hÇh´KhhØh²hubhì)�”}”(hŒbSub-device character device nodes, conventionally named ``/dev/v4l-subdev*``, use major number 81.”h]”(hŒ8Sub-device character device nodes, conventionally named ”…”�”}”(hj†h²hh³Nh´NubhŒliteral”“”)�”}”(hŒ``/dev/v4l-subdev*``”h]”hŒ/dev/v4l-subdev*”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj†ubhŒ, use major number 81.”…”�”}”(hj†h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K#hhØh²hubhì)�”}”(hXDrivers may opt to limit the sub-device character devices to only expose operations that do not modify the device state. In such a case the sub-devices are referred to as ``read-only`` in the rest of this documentation, and the related restrictions are documented in individual ioctls.”h]”(hŒ«Drivers may opt to limit the sub-device character devices to only expose operations that do not modify the device state. In such a case the sub-devices are referred to as ”…”�”}”(hj¨h²hh³Nh´Nubj�)�”}”(hŒ ``read-only``”h]”hŒ read-only”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj¨ubhŒe in the rest of this documentation, and the related restrictions are documented in individual ioctls.”…”�”}”(hj¨h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K&hhØh²hubh×)�”}”(hhh]”(hÜ)�”}”(hŒControls”h]”hŒControls”…”�”}”(hjËh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjÈh²hh³hÇh´K-ubhì)�”}”(hŒÎMost V4L2 controls are implemented by sub-device hardware. Drivers usually merge all controls and expose them through video device nodes. Applications can control all sub-devices through a single interface.”h]”hŒÎMost V4L2 controls are implemented by sub-device hardware. Drivers usually merge all controls and expose them through video device nodes. Applications can control all sub-devices through a single interface.”…”�”}”(hjÙh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K/hjÈh²hubhì)�”}”(hX§Complex devices sometimes implement the same control in different pieces of hardware. This situation is common in embedded platforms, where both sensors and image processing hardware implement identical functions, such as contrast adjustment, white balance or faulty pixels correction. As the V4L2 controls API doesn't support several identical controls in a single device, all but one of the identical controls are hidden.”h]”hX©Complex devices sometimes implement the same control in different pieces of hardware. This situation is common in embedded platforms, where both sensors and image processing hardware implement identical functions, such as contrast adjustment, white balance or faulty pixels correction. As the V4L2 controls API doesn’t support several identical controls in a single device, all but one of the identical controls are hidden.”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K3hjÈh²hubhì)�”}”(hXApplications can access those hidden controls through the sub-device node with the V4L2 control API described in :ref:`control`. The ioctls behave identically as when issued on V4L2 device nodes, with the exception that they deal only with controls implemented in the sub-device.”h]”(hŒqApplications can access those hidden controls through the sub-device node with the V4L2 control API described in ”…”�”}”(hjõh²hh³Nh´Nubh)�”}”(hŒ:ref:`control`”h]”hŒinline”“”)�”}”(hjÿh]”hŒcontrol”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjýubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ"userspace-api/media/v4l/dev-subdev”Œ refdomain”jŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆŒ reftarget”Œcontrol”uh1hh³hÇh´K:hjõubhŒ˜. The ioctls behave identically as when issued on V4L2 device nodes, with the exception that they deal only with controls implemented in the sub-device.”…”�”}”(hjõh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K:hjÈh²hubhì)�”}”(hŒiDepending on the driver, those controls might also be exposed through one (or several) V4L2 device nodes.”h]”hŒiDepending on the driver, those controls might also be exposed through one (or several) V4L2 device nodes.”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K@hjÈh²hubeh}”(h]”Œcontrols”ah ]”h"]”Œcontrols”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K-ubh×)�”}”(hhh]”(hÜ)�”}”(hŒEvents”h]”hŒEvents”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjBh²hh³hÇh´KEubhì)�”}”(hXBV4L2 sub-devices can notify applications of events as described in :ref:`event`. The API behaves identically as when used on V4L2 device nodes, with the exception that it only deals with events generated by the sub-device. Depending on the driver, those events might also be reported on one (or several) V4L2 device nodes.”h]”(hŒCV4L2 sub-devices can notify applications of events as described in ”…”�”}”(hjSh²hh³Nh´Nubh)�”}”(hŒ :ref:`event`”h]”j)�”}”(hj]h]”hŒevent”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj[ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jiŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œevent”uh1hh³hÇh´KGhjSubhŒó. The API behaves identically as when used on V4L2 device nodes, with the exception that it only deals with events generated by the sub-device. Depending on the driver, those events might also be reported on one (or several) V4L2 device nodes.”…”�”}”(hjSh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KGhjBh²hubhÉ)�”}”(hŒ.. _pad-level-formats:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒpad-level-formats”uh1hÈh´KNhjBh²hh³hÇubeh}”(h]”Œevents”ah ]”h"]”Œevents”ah$]”h&]”uh1hÖhhØh²hh³hÇh´KEubh×)�”}”(hhh]”(hÜ)�”}”(hŒPad-level Formats”h]”hŒPad-level Formats”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj˜h²hh³hÇh´KQubhŒwarning”“”)�”}”(hŒÑPad-level formats are only applicable to very complex devices that need to expose low-level format configuration to user space. Generic V4L2 applications do *not* need to use the API described in this section.”h]”hì)�”}”(hŒÑPad-level formats are only applicable to very complex devices that need to expose low-level format configuration to user space. Generic V4L2 applications do *not* need to use the API described in this section.”h]”(hŒ�Pad-level formats are only applicable to very complex devices that need to expose low-level format configuration to user space. Generic V4L2 applications do ”…”�”}”(hj¯h²hh³Nh´NubhŒemphasis”“”)�”}”(hŒ*not*”h]”hŒnot”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hj¯ubhŒ/ need to use the API described in this section.”…”�”}”(hj¯h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KUhj«ubah}”(h]”h ]”h"]”h$]”h&]”uh1j©hj˜h²hh³hÇh´NubhŒnote”“”)�”}”(hŒ€For the purpose of this section, the term *format* means the combination of media bus data format, frame width and frame height.”h]”hì)�”}”(hŒ€For the purpose of this section, the term *format* means the combination of media bus data format, frame width and frame height.”h]”(hŒ*For the purpose of this section, the term ”…”�”}”(hjÝh²hh³Nh´Nubj¸)�”}”(hŒ*format*”h]”hŒformat”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hjÝubhŒN means the combination of media bus data format, frame width and frame height.”…”�”}”(hjÝh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K\hjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1j×hj˜h²hh³hÇh´Nubhì)�”}”(hX'Image formats are typically negotiated on video capture and output devices using the format and :ref:`selection ` ioctls. The driver is responsible for configuring every block in the video pipeline according to the requested format at the pipeline input and/or output.”h]”(hŒ`Image formats are typically negotiated on video capture and output devices using the format and ”…”�”}”(hjh²hh³Nh´Nubh)�”}”(hŒ,:ref:`selection `”h]”j)�”}”(hj h]”hŒ selection”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_selection”uh1hh³hÇh´K_hjubhŒ› ioctls. The driver is responsible for configuring every block in the video pipeline according to the requested format at the pipeline input and/or output.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K_hj˜h²hubhì)�”}”(hXDFor complex devices, such as often found in embedded systems, identical image sizes at the output of a pipeline can be achieved using different hardware configurations. One such example is shown on :ref:`pipeline-scaling`, where image scaling can be performed on both the video sensor and the host image processing hardware.”h]”(hŒÆFor complex devices, such as often found in embedded systems, identical image sizes at the output of a pipeline can be achieved using different hardware configurations. One such example is shown on ”…”�”}”(hj5h²hh³Nh´Nubh)�”}”(hŒ:ref:`pipeline-scaling`”h]”j)�”}”(hj?h]”hŒpipeline-scaling”…”�”}”(hjAh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj=ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jKŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œpipeline-scaling”uh1hh³hÇh´Kehj5ubhŒg, where image scaling can be performed on both the video sensor and the host image processing hardware.”…”�”}”(hj5h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kehj˜h²hubhÉ)�”}”(hŒ.. _pipeline-scaling:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒpipeline-scaling”uh1hÈh´Klhj˜h²hh³hÇubŒkfigure”Œ kernel_figure”“”)�”}”(hhh]”hŒfigure”“”)�”}”(hhh]”(hŒimage”“”)�”}”(hŒ±.. kernel-figure:: pipeline.dot :alt: pipeline.dot :align: center Image Format Negotiation on Pipelines High quality and high speed pipeline configuration ”h]”h}”(h]”h ]”h"]”h$]”h&]”Œalt”Œ pipeline.dot”Œuri”Œ$userspace-api/media/v4l/pipeline.dot”Œ candidates”}”Œ*”jŒsuh1j}hjzh³hÇh´KubhŒcaption”“”)�”}”(hŒ%Image Format Negotiation on Pipelines”h]”hŒ%Image Format Negotiation on Pipelines”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´KrhjzubhŒlegend”“”)�”}”(hhh]”hì)�”}”(hŒ2High quality and high speed pipeline configuration”h]”hŒ2High quality and high speed pipeline configuration”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kthj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1j hjzubeh}”(h]”Œid2”ah ]”h"]”h$]”h&]”Œalign”Œcenter”uh1jxhjuubah}”(h]”jqah ]”h"]”Œpipeline-scaling”ah$]”h&]”uh1jshj˜h²hh³hÇh´NŒexpect_referenced_by_name”}”jÆjgsŒexpect_referenced_by_id”}”jqjgsubhì)�”}”(hX9The sensor scaler is usually of less quality than the host scaler, but scaling on the sensor is required to achieve higher frame rates. Depending on the use case (quality vs. speed), the pipeline must be configured differently. Applications need to configure the formats at every point in the pipeline explicitly.”h]”hX9The sensor scaler is usually of less quality than the host scaler, but scaling on the sensor is required to achieve higher frame rates. Depending on the use case (quality vs. speed), the pipeline must be configured differently. Applications need to configure the formats at every point in the pipeline explicitly.”…”�”}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kxhj˜h²hubhì)�”}”(hXCDrivers that implement the :ref:`media API ` can expose pad-level image format configuration to applications. When they do, applications can use the :ref:`VIDIOC_SUBDEV_G_FMT ` and :ref:`VIDIOC_SUBDEV_S_FMT ` ioctls. to negotiate formats on a per-pad basis.”h]”(hŒDrivers that implement the ”…”�”}”(hjÛh²hh³Nh´Nubh)�”}”(hŒ):ref:`media API `”h]”j)�”}”(hjåh]”hŒ media API”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjãubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jñŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œmedia-controller-intro”uh1hh³hÇh´K~hjÛubhŒi can expose pad-level image format configuration to applications. When they do, applications can use the ”…”�”}”(hjÛh²hh³Nh´Nubh)�”}”(hŒ0:ref:`VIDIOC_SUBDEV_G_FMT `”h]”j)�”}”(hj h]”hŒVIDIOC_SUBDEV_G_FMT”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´K~hjÛubhŒ and ”…”�”}”(hjÛh²hh³Nh´Nubh)�”}”(hŒ0:ref:`VIDIOC_SUBDEV_S_FMT `”h]”j)�”}”(hj-h]”hŒVIDIOC_SUBDEV_S_FMT”…”�”}”(hj/h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj+ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j9Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´K~hjÛubhŒ1 ioctls. to negotiate formats on a per-pad basis.”…”�”}”(hjÛh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K~hj˜h²hubhì)�”}”(hX@Applications are responsible for configuring coherent parameters on the whole pipeline and making sure that connected pads have compatible formats. The pipeline is checked for formats mismatch at :ref:`VIDIOC_STREAMON ` time, and an ``EPIPE`` error code is then returned if the configuration is invalid.”h]”(hŒÄApplications are responsible for configuring coherent parameters on the whole pipeline and making sure that connected pads have compatible formats. The pipeline is checked for formats mismatch at ”…”�”}”(hjUh²hh³Nh´Nubh)�”}”(hŒ(:ref:`VIDIOC_STREAMON `”h]”j)�”}”(hj_h]”hŒVIDIOC_STREAMON”…”�”}”(hjah²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj]ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jkŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_streamon”uh1hh³hÇh´K…hjUubhŒ time, and an ”…”�”}”(hjUh²hh³Nh´Nubj�)�”}”(hŒ ``EPIPE``”h]”hŒEPIPE”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjUubhŒ= error code is then returned if the configuration is invalid.”…”�”}”(hjUh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K…hj˜h²hubhì)�”}”(hŒæPad-level image format configuration support can be tested by calling the :ref:`VIDIOC_SUBDEV_G_FMT` ioctl on pad 0. If the driver returns an ``EINVAL`` error code pad-level format configuration is not supported by the sub-device.”h]”(hŒJPad-level image format configuration support can be tested by calling the ”…”�”}”(hj™h²hh³Nh´Nubh)�”}”(hŒ:ref:`VIDIOC_SUBDEV_G_FMT`”h]”j)�”}”(hj£h]”hŒVIDIOC_SUBDEV_G_FMT”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj¡ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¯Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´K‹hj™ubhŒ* ioctl on pad 0. If the driver returns an ”…”�”}”(hj™h²hh³Nh´Nubj�)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj™ubhŒN error code pad-level format configuration is not supported by the sub-device.”…”�”}”(hj™h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K‹hj˜h²hubh×)�”}”(hhh]”(hÜ)�”}”(hŒFormat Negotiation”h]”hŒFormat Negotiation”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjÝh²hh³hÇh´K’ubhì)�”}”(hXZAcceptable formats on pads can (and usually do) depend on a number of external parameters, such as formats on other pads, active links, or even controls. Finding a combination of formats on all pads in a video pipeline, acceptable to both application and driver, can't rely on formats enumeration only. A format negotiation mechanism is required.”h]”hX\Acceptable formats on pads can (and usually do) depend on a number of external parameters, such as formats on other pads, active links, or even controls. Finding a combination of formats on all pads in a video pipeline, acceptable to both application and driver, can’t rely on formats enumeration only. A format negotiation mechanism is required.”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K”hjÝh²hubhì)�”}”(hX3Central to the format negotiation mechanism are the get/set format operations. When called with the ``which`` argument set to :ref:`V4L2_SUBDEV_FORMAT_TRY `, the :ref:`VIDIOC_SUBDEV_G_FMT ` and :ref:`VIDIOC_SUBDEV_S_FMT ` ioctls operate on a set of formats parameters that are not connected to the hardware configuration. Modifying those 'try' formats leaves the device state untouched (this applies to both the software state stored in the driver and the hardware state stored in the device itself).”h]”(hŒdCentral to the format negotiation mechanism are the get/set format operations. When called with the ”…”�”}”(hjüh²hh³Nh´Nubj�)�”}”(hŒ ``which``”h]”hŒwhich”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjüubhŒ argument set to ”…”�”}”(hjüh²hh³Nh´Nubh)�”}”(hŒ3:ref:`V4L2_SUBDEV_FORMAT_TRY `”h]”j)�”}”(hjh]”hŒV4L2_SUBDEV_FORMAT_TRY”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j$Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´KšhjüubhŒ, the ”…”�”}”(hjüh²hh³Nh´Nubh)�”}”(hŒ0:ref:`VIDIOC_SUBDEV_G_FMT `”h]”j)�”}”(hj<h]”hŒVIDIOC_SUBDEV_G_FMT”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj:ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jHŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´KšhjüubhŒ and ”…”�”}”(hjüh²hh³Nh´Nubh)�”}”(hŒ0:ref:`VIDIOC_SUBDEV_S_FMT `”h]”j)�”}”(hj`h]”hŒVIDIOC_SUBDEV_S_FMT”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj^ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jlŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´KšhjüubhX ioctls operate on a set of formats parameters that are not connected to the hardware configuration. Modifying those ‘try’ formats leaves the device state untouched (this applies to both the software state stored in the driver and the hardware state stored in the device itself).”…”�”}”(hjüh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KšhjÝh²hubhì)�”}”(hXOWhile not kept as part of the device state, try formats are stored in the sub-device file handles. A :ref:`VIDIOC_SUBDEV_G_FMT ` call will return the last try format set *on the same sub-device file handle*. Several applications querying the same sub-device at the same time will thus not interact with each other.”h]”(hŒeWhile not kept as part of the device state, try formats are stored in the sub-device file handles. A ”…”�”}”(hjˆh²hh³Nh´Nubh)�”}”(hŒ0:ref:`VIDIOC_SUBDEV_G_FMT `”h]”j)�”}”(hj’h]”hŒVIDIOC_SUBDEV_G_FMT”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj�ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jžŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´K¤hjˆubhŒ* call will return the last try format set ”…”�”}”(hjˆh²hh³Nh´Nubj¸)�”}”(hŒ$*on the same sub-device file handle*”h]”hŒ"on the same sub-device file handle”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hjˆubhŒl. Several applications querying the same sub-device at the same time will thus not interact with each other.”…”�”}”(hjˆh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K¤hjÝh²hubhì)�”}”(hXvTo find out whether a particular format is supported by the device, applications use the :ref:`VIDIOC_SUBDEV_S_FMT ` ioctl. Drivers verify and, if needed, change the requested ``format`` based on device requirements and return the possibly modified value. Applications can then choose to try a different format or accept the returned value and continue.”h]”(hŒYTo find out whether a particular format is supported by the device, applications use the ”…”�”}”(hjÌh²hh³Nh´Nubh)�”}”(hŒ0:ref:`VIDIOC_SUBDEV_S_FMT `”h]”j)�”}”(hjÖh]”hŒVIDIOC_SUBDEV_S_FMT”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÔubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jâŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´K«hjÌubhŒ< ioctl. Drivers verify and, if needed, change the requested ”…”�”}”(hjÌh²hh³Nh´Nubj�)�”}”(hŒ ``format``”h]”hŒformat”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjÌubhŒ§ based on device requirements and return the possibly modified value. Applications can then choose to try a different format or accept the returned value and continue.”…”�”}”(hjÌh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K«hjÝh²hubhì)�”}”(hXtFormats returned by the driver during a negotiation iteration are guaranteed to be supported by the device. In particular, drivers guarantee that a returned format will not be further changed if passed to an :ref:`VIDIOC_SUBDEV_S_FMT ` call as-is (as long as external parameters, such as formats on other pads or links' configuration are not changed).”h]”(hŒÐFormats returned by the driver during a negotiation iteration are guaranteed to be supported by the device. In particular, drivers guarantee that a returned format will not be further changed if passed to an ”…”�”}”(hjh²hh³Nh´Nubh)�”}”(hŒ0:ref:`VIDIOC_SUBDEV_S_FMT `”h]”j)�”}”(hjh]”hŒVIDIOC_SUBDEV_S_FMT”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j&Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´K³hjubhŒv call as-is (as long as external parameters, such as formats on other pads or links’ configuration are not changed).”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K³hjÝh²hubhì)�”}”(hXDDrivers automatically propagate formats inside sub-devices. When a try or active format is set on a pad, corresponding formats on other pads of the same sub-device can be modified by the driver. Drivers are free to modify formats as required by the device. However, they should comply with the following rules when possible:”h]”hXDDrivers automatically propagate formats inside sub-devices. When a try or active format is set on a pad, corresponding formats on other pads of the same sub-device can be modified by the driver. Drivers are free to modify formats as required by the device. However, they should comply with the following rules when possible:”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KºhjÝh²hubj)�”}”(hhh]”(j)�”}”(hŒ�Formats should be propagated from sink pads to source pads. Modifying a format on a source pad should not modify the format on any sink pad. ”h]”hì)�”}”(hŒŒFormats should be propagated from sink pads to source pads. Modifying a format on a source pad should not modify the format on any sink pad.”h]”hŒŒFormats should be propagated from sink pads to source pads. Modifying a format on a source pad should not modify the format on any sink pad.”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KÀhjSubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjPh²hh³hÇh´Nubj)�”}”(hXSub-devices that scale frames using variable scaling factors should reset the scale factors to default values when sink pads formats are modified. If the 1:1 scaling ratio is supported, this means that source pads formats should be reset to the sink pads formats. ”h]”hì)�”}”(hXSub-devices that scale frames using variable scaling factors should reset the scale factors to default values when sink pads formats are modified. If the 1:1 scaling ratio is supported, this means that source pads formats should be reset to the sink pads formats.”h]”hXSub-devices that scale frames using variable scaling factors should reset the scale factors to default values when sink pads formats are modified. If the 1:1 scaling ratio is supported, this means that source pads formats should be reset to the sink pads formats.”…”�”}”(hjoh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KÄhjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjPh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”j„j…uh1jh³hÇh´KÀhjÝh²hubhì)�”}”(hX‘Formats are not propagated across links, as that would involve propagating them from one sub-device file handle to another. Applications must then take care to configure both ends of every link explicitly with compatible formats. Identical formats on the two ends of a link are guaranteed to be compatible. Drivers are free to accept different formats matching device requirements as being compatible.”h]”hX‘Formats are not propagated across links, as that would involve propagating them from one sub-device file handle to another. Applications must then take care to configure both ends of every link explicitly with compatible formats. Identical formats on the two ends of a link are guaranteed to be compatible. Drivers are free to accept different formats matching device requirements as being compatible.”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KÉhjÝh²hubhì)�”}”(hŒ¬:ref:`sample-pipeline-config` shows a sample configuration sequence for the pipeline described in :ref:`pipeline-scaling` (table columns list entity names and pad numbers).”h]”(h)�”}”(hŒ:ref:`sample-pipeline-config`”h]”j)�”}”(hj�h]”hŒsample-pipeline-config”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj›ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j©Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œsample-pipeline-config”uh1hh³hÇh´KÐhj—ubhŒE shows a sample configuration sequence for the pipeline described in ”…”�”}”(hj—h²hh³Nh´Nubh)�”}”(hŒ:ref:`pipeline-scaling`”h]”j)�”}”(hjÁh]”hŒpipeline-scaling”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj¿ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÍŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œpipeline-scaling”uh1hh³hÇh´KÐhj—ubhŒ3 (table columns list entity names and pad numbers).”…”�”}”(hj—h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KÐhjÝh²hubhŒraw”“”)�”}”(hŒ3\begingroup \scriptsize \setlength{\tabcolsep}{2pt}”h]”hŒ3\begingroup \scriptsize \setlength{\tabcolsep}{2pt}”…”�”}”hjësbah}”(h]”h ]”h"]”h$]”h&]”Œformat”Œlatex”hÅhÆuh1jéh³hÇh´KÕhjÝh²hubhŒtabular_col_spec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œspec”Œ@|p{2.0cm}|p{2.1cm}|p{2.1cm}|p{2.1cm}|p{2.1cm}|p{2.1cm}|p{2.1cm}|”uh1jûh³hÇh´KÛhjÝh²hubhÉ)�”}”(hŒ.. _sample-pipeline-config:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒsample-pipeline-config”uh1hÈh´KÝhjÝh²hh³hÇubhŒtable”“”)�”}”(hhh]”(hÜ)�”}”(hŒSample Pipeline Configuration”h]”hŒSample Pipeline Configuration”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÇh´KßhjubhŒtgroup”“”)�”}”(hhh]”(hŒcolspec”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj(ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj(ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj(ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj(ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj(ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj(ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj(ubhŒthead”“”)�”}”(hhh]”hŒrow”“”)�”}”(hhh]”(hŒentry”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzubj~)�”}”(hhh]”(hì)�”}”(hŒSensor/0”h]”hŒSensor/0”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kåhjˆubhì)�”}”(hŒformat”h]”hŒformat”…”�”}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kçhjˆubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzubj~)�”}”(hhh]”(hì)�”}”(hŒ Frontend/0”h]”hŒ Frontend/0”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kèhj­ubhì)�”}”(hŒformat”h]”hŒformat”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kêhj­ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzubj~)�”}”(hhh]”(hì)�”}”(hŒ Frontend/1”h]”hŒ Frontend/1”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KëhjÒubhì)�”}”(hŒformat”h]”hŒformat”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KíhjÒubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzubj~)�”}”(hhh]”(hì)�”}”(hŒScaler/0”h]”hŒScaler/0”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kîhj÷ubhì)�”}”(hŒformat”h]”hŒformat”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kðhj÷ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzubj~)�”}”(hhh]”(hì)�”}”(hŒScaler/0”h]”hŒScaler/0”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kñhjubhì)�”}”(hŒcompose selection rectangle”h]”hŒcompose selection rectangle”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kóhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzubj~)�”}”(hhh]”(hì)�”}”(hŒScaler/1”h]”hŒScaler/1”…”�”}”(hjDh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KôhjAubhì)�”}”(hŒformat”h]”hŒformat”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KöhjAubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjzubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjuubah}”(h]”h ]”h"]”h$]”h&]”uh1jshj(ubhŒtbody”“”)�”}”(hhh]”(jy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒ Initial state”h]”hŒ Initial state”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K÷hjzubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”(hì)�”}”(hŒ 2048x1536”h]”hŒ 2048x1536”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Køhj‘ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kúhj‘ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”hì)�”}”(hŒ (default)”h]”hŒ (default)”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kûhj¶ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”hì)�”}”(hŒ (default)”h]”hŒ (default)”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KühjÍubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”hì)�”}”(hŒ (default)”h]”hŒ (default)”…”�”}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kýhjäubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”hì)�”}”(hŒ (default)”h]”hŒ (default)”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kþhjûubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”hì)�”}”(hŒ (default)”h]”hŒ (default)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kÿhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjtubjy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒConfigure frontend sink format”h]”hŒConfigure frontend sink format”…”�”}”(hj5 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj2 ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj/ ubj~)�”}”(hhh]”(hì)�”}”(hŒ 2048x1536”h]”hŒ 2048x1536”…”�”}”(hjL h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MhjI ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hjZ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MhjI ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hj/ ubj~)�”}”(hhh]”(hì)�”}”(hŒ *2048x1536*”h]”j¸)�”}”(hjs h]”hŒ 2048x1536”…”�”}”(hju h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hjq ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhjn ubhì)�”}”(hŒ *SGRBG8_1X8*”h]”j¸)�”}”(hjŠ h]”hŒ SGRBG8_1X8”…”�”}”(hjŒ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hjˆ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhjn ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hj/ ubj~)�”}”(hhh]”(hì)�”}”(hŒ *2046x1534*”h]”j¸)�”}”(hjª h]”hŒ 2046x1534”…”�”}”(hj¬ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hj¨ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj¥ ubhì)�”}”(hŒ *SGRBG8_1X8*”h]”j¸)�”}”(hjÁ h]”hŒ SGRBG8_1X8”…”�”}”(hjà h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hj¿ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M hj¥ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hj/ ubj~)�”}”(hhh]”hì)�”}”(hŒ (default)”h]”hŒ (default)”…”�”}”(hjß h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M hjÜ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj/ ubj~)�”}”(hhh]”hì)�”}”(hŒ (default)”h]”hŒ (default)”…”�”}”(hjö h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M hjó ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj/ ubj~)�”}”(hhh]”hì)�”}”(hŒ (default)”h]”hŒ (default)”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj/ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjtubjy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒConfigure scaler sink format”h]”hŒConfigure scaler sink format”…”�”}”(hj- h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M hj* ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj' ubj~)�”}”(hhh]”(hì)�”}”(hŒ 2048x1536”h]”hŒ 2048x1536”…”�”}”(hjD h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MhjA ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hjR h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MhjA ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hj' ubj~)�”}”(hhh]”(hì)�”}”(hŒ 2048x1536”h]”hŒ 2048x1536”…”�”}”(hji h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhjf ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hjw h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhjf ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hj' ubj~)�”}”(hhh]”(hì)�”}”(hŒ 2046x1534”h]”hŒ 2046x1534”…”�”}”(hjŽ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj‹ ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hjœ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj‹ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hj' ubj~)�”}”(hhh]”(hì)�”}”(hŒ *2046x1534*”h]”j¸)�”}”(hjµ h]”hŒ 2046x1534”…”�”}”(hj· h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hj³ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj° ubhì)�”}”(hŒ *SGRBG8_1X8*”h]”j¸)�”}”(hjÌ h]”hŒ SGRBG8_1X8”…”�”}”(hjÎ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hjÊ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj° ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hj' ubj~)�”}”(hhh]”hì)�”}”(hŒ*0,0/2046x1534*”h]”j¸)�”}”(hjì h]”hŒ 0,0/2046x1534”…”�”}”(hjî h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hjê ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhjç ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj' ubj~)�”}”(hhh]”(hì)�”}”(hŒ *2046x1534*”h]”j¸)�”}”(hj h]”hŒ 2046x1534”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj ubhì)�”}”(hŒ *SGRBG8_1X8*”h]”j¸)�”}”(hj# h]”hŒ SGRBG8_1X8”…”�”}”(hj% h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hj! ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hj' ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjtubjy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒ'Configure scaler sink compose selection”h]”hŒ'Configure scaler sink compose selection”…”�”}”(hjJ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MhjG ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjD ubj~)�”}”(hhh]”(hì)�”}”(hŒ 2048x1536”h]”hŒ 2048x1536”…”�”}”(hja h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj^ ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hjo h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M!hj^ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjD ubj~)�”}”(hhh]”(hì)�”}”(hŒ 2048x1536”h]”hŒ 2048x1536”…”�”}”(hj† h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M"hjƒ ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hj” h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M$hjƒ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjD ubj~)�”}”(hhh]”(hì)�”}”(hŒ 2046x1534”h]”hŒ 2046x1534”…”�”}”(hj« h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M%hj¨ ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hj¹ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M'hj¨ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjD ubj~)�”}”(hhh]”(hì)�”}”(hŒ 2046x1534”h]”hŒ 2046x1534”…”�”}”(hjÐ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M(hjÍ ubhì)�”}”(hŒ SGRBG8_1X8”h]”hŒ SGRBG8_1X8”…”�”}”(hjÞ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M*hjÍ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjD ubj~)�”}”(hhh]”hì)�”}”(hŒ*0,0/1280x960*”h]”j¸)�”}”(hj÷ h]”hŒ 0,0/1280x960”…”�”}”(hjù h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hjõ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M+hjò ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjD ubj~)�”}”(hhh]”(hì)�”}”(hŒ *1280x960*”h]”j¸)�”}”(hj h]”hŒ1280x960”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hj ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M,hj ubhì)�”}”(hŒ *SGRBG8_1X8*”h]”j¸)�”}”(hj. h]”hŒ SGRBG8_1X8”…”�”}”(hj0 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j·hj, ubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M.hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j}hjD ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjtubeh}”(h]”h ]”h"]”h$]”h&]”uh1jrhj(ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j&hjubeh}”(h]”(Œid3”jeh ]”h"]”Œsample-pipeline-config”ah$]”h&]”uh1jhjÝh²hh³Nh´NjÉ}”ja jsjË}”jjsubjê)�”}”(hŒ \endgroup”h]”hŒ \endgroup”…”�”}”hjf sbah}”(h]”h ]”h"]”h$]”h&]”Œformat”Œlatex”hÅhÆuh1jéh³hÇh´M0hjÝh²hubhŒenumerated_list”“”)�”}”(hhh]”(j)�”}”(hXInitial state. The sensor source pad format is set to its native 3MP size and V4L2_MBUS_FMT_SGRBG8_1X8 media bus code. Formats on the host frontend and scaler sink and source pads have the default values, as well as the compose rectangle on the scaler's sink pad. ”h]”hì)�”}”(hXInitial state. The sensor source pad format is set to its native 3MP size and V4L2_MBUS_FMT_SGRBG8_1X8 media bus code. Formats on the host frontend and scaler sink and source pads have the default values, as well as the compose rectangle on the scaler's sink pad.”h]”hX Initial state. The sensor source pad format is set to its native 3MP size and V4L2_MBUS_FMT_SGRBG8_1X8 media bus code. Formats on the host frontend and scaler sink and source pads have the default values, as well as the compose rectangle on the scaler’s sink pad.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M4hj{ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjx h²hh³hÇh´Nubj)�”}”(hŒ¼The application configures the frontend sink pad format's size to 2048x1536 and its media bus code to V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the format to the frontend source pad. ”h]”hì)�”}”(hŒ»The application configures the frontend sink pad format's size to 2048x1536 and its media bus code to V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the format to the frontend source pad.”h]”hŒ½The application configures the frontend sink pad format’s size to 2048x1536 and its media bus code to V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the format to the frontend source pad.”…”�”}”(hj— h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M9hj“ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjx h²hh³hÇh´Nubj)�”}”(hX}The application configures the scaler sink pad format's size to 2046x1534 and the media bus code to V4L2_MBUS_FMT_SGRBG_1X8 to match the frontend source size and media bus code. The media bus code on the sink pad is set to V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the size to the compose selection rectangle on the scaler's sink pad, and the format to the scaler source pad. ”h]”hì)�”}”(hX|The application configures the scaler sink pad format's size to 2046x1534 and the media bus code to V4L2_MBUS_FMT_SGRBG_1X8 to match the frontend source size and media bus code. The media bus code on the sink pad is set to V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the size to the compose selection rectangle on the scaler's sink pad, and the format to the scaler source pad.”h]”hX€The application configures the scaler sink pad format’s size to 2046x1534 and the media bus code to V4L2_MBUS_FMT_SGRBG_1X8 to match the frontend source size and media bus code. The media bus code on the sink pad is set to V4L2_MBUS_FMT_SGRBG_1X8. The driver propagates the size to the compose selection rectangle on the scaler’s sink pad, and the format to the scaler source pad.”…”�”}”(hj¯ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M=hj« ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjx h²hh³hÇh´Nubj)�”}”(hŒ¬The application configures the size of the compose selection rectangle of the scaler's sink pad 1280x960. The driver propagates the size to the scaler's source pad format. ”h]”hì)�”}”(hŒ«The application configures the size of the compose selection rectangle of the scaler's sink pad 1280x960. The driver propagates the size to the scaler's source pad format.”h]”hŒ¯The application configures the size of the compose selection rectangle of the scaler’s sink pad 1280x960. The driver propagates the size to the scaler’s source pad format.”…”�”}”(hjÇ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MDhjà ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjx h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”hŒsuffix”Œ.”uh1jv hjÝh²hh³hÇh´M4ubhì)�”}”(hX When satisfied with the try results, applications can set the active formats by setting the ``which`` argument to ``V4L2_SUBDEV_FORMAT_ACTIVE``. Active formats are changed exactly as try formats by drivers. To avoid modifying the hardware state during format negotiation, applications should negotiate try formats first and then modify the active settings using the try formats returned during the last negotiation iteration. This guarantees that the active format will be applied as-is by the driver without being modified.”h]”(hŒ\When satisfied with the try results, applications can set the active formats by setting the ”…”�”}”(hjæ h²hh³Nh´Nubj�)�”}”(hŒ ``which``”h]”hŒwhich”…”�”}”(hjî h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjæ ubhŒ argument to ”…”�”}”(hjæ h²hh³Nh´Nubj�)�”}”(hŒ``V4L2_SUBDEV_FORMAT_ACTIVE``”h]”hŒV4L2_SUBDEV_FORMAT_ACTIVE”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjæ ubhX}. Active formats are changed exactly as try formats by drivers. To avoid modifying the hardware state during format negotiation, applications should negotiate try formats first and then modify the active settings using the try formats returned during the last negotiation iteration. This guarantees that the active format will be applied as-is by the driver without being modified.”…”�”}”(hjæ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MHhjÝh²hubhÉ)�”}”(hŒ.. _v4l2-subdev-selections:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒv4l2-subdev-selections”uh1hÈh´MRhjÝh²hh³hÇubeh}”(h]”Œformat-negotiation”ah ]”h"]”Œformat negotiation”ah$]”h&]”uh1hÖhj˜h²hh³hÇh´K’ubh×)�”}”(hhh]”(hÜ)�”}”(hŒ-Selections: cropping, scaling and composition”h]”hŒ-Selections: cropping, scaling and composition”…”�”}”(hj. h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj+ h²hh³hÇh´MUubhì)�”}”(hXDMany sub-devices support cropping frames on their input or output pads (or possible even on both). Cropping is used to select the area of interest in an image, typically on an image sensor or a video decoder. It can also be used as part of digital zoom implementations to select the area of the image that will be scaled up.”h]”hXDMany sub-devices support cropping frames on their input or output pads (or possible even on both). Cropping is used to select the area of interest in an image, typically on an image sensor or a video decoder. It can also be used as part of digital zoom implementations to select the area of the image that will be scaled up.”…”�”}”(hj< h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MWhj+ h²hubhì)�”}”(hŒ×Crop settings are defined by a crop rectangle and represented in a struct :c:type:`v4l2_rect` by the coordinates of the top left corner and the rectangle size. Both the coordinates and sizes are expressed in pixels.”h]”(hŒJCrop settings are defined by a crop rectangle and represented in a struct ”…”�”}”(hjJ h²hh³Nh´Nubh)�”}”(hŒ:c:type:`v4l2_rect`”h]”j�)�”}”(hjT h]”hŒ v4l2_rect”…”�”}”(hjV h²hh³Nh´Nubah}”(h]”h ]”(j Œc”Œc-type”eh"]”h$]”h&]”uh1jŽhjR ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j` Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰Œ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)�”}”Œdata”]”jr Œ ASTIdentifier”“”)�”}”Œ identifier”ŒV4L”sbN†”asbj Œ v4l2_rect”uh1hh³hÇh´M]hjJ ubhŒz by the coordinates of the top left corner and the rectangle size. Both the coordinates and sizes are expressed in pixels.”…”�”}”(hjJ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M]hj+ h²hubhì)�”}”(hŒtAs for pad formats, drivers store try and active rectangles for the selection targets :ref:`v4l2-selections-common`.”h]”(hŒVAs for pad formats, drivers store try and active rectangles for the selection targets ”…”�”}”(hj‹ h²hh³Nh´Nubh)�”}”(hŒ:ref:`v4l2-selections-common`”h]”j)�”}”(hj• h]”hŒv4l2-selections-common”…”�”}”(hj— h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj“ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¡ Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œv4l2-selections-common”uh1hh³hÇh´Mbhj‹ ubhŒ.”…”�”}”(hj‹ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mbhj+ h²hubhì)�”}”(hX,On sink pads, cropping is applied relative to the current pad format. The pad format represents the image size as received by the sub-device from the previous block in the pipeline, and the crop rectangle represents the sub-image that will be transmitted further inside the sub-device for processing.”h]”hX,On sink pads, cropping is applied relative to the current pad format. The pad format represents the image size as received by the sub-device from the previous block in the pipeline, and the crop rectangle represents the sub-image that will be transmitted further inside the sub-device for processing.”…”�”}”(hj½ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mehj+ h²hubhì)�”}”(hŒõThe scaling operation changes the size of the image by scaling it to new dimensions. The scaling ratio isn't specified explicitly, but is implied from the original and scaled image sizes. Both sizes are represented by struct :c:type:`v4l2_rect`.”h]”(hŒãThe scaling operation changes the size of the image by scaling it to new dimensions. The scaling ratio isn’t specified explicitly, but is implied from the original and scaled image sizes. Both sizes are represented by struct ”…”�”}”(hjË h²hh³Nh´Nubh)�”}”(hŒ:c:type:`v4l2_rect`”h]”j�)�”}”(hjÕ h]”hŒ v4l2_rect”…”�”}”(hj× h²hh³Nh´Nubah}”(h]”h ]”(j j` Œc-type”eh"]”h$]”h&]”uh1jŽhjÓ ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j` Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jq ju j Œ v4l2_rect”uh1hh³hÇh´MkhjË ubhŒ.”…”�”}”(hjË h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mkhj+ h²hubhì)�”}”(hXŠScaling support is optional. When supported by a subdev, the crop rectangle on the subdev's sink pad is scaled to the size configured using the :ref:`VIDIOC_SUBDEV_S_SELECTION ` IOCTL using ``V4L2_SEL_TGT_COMPOSE`` selection target on the same pad. If the subdev supports scaling but not composing, the top and left values are not used and must always be set to zero.”h]”(hŒ’Scaling support is optional. When supported by a subdev, the crop rectangle on the subdev’s sink pad is scaled to the size configured using the ”…”�”}”(hjü h²hh³Nh´Nubh)�”}”(hŒ<:ref:`VIDIOC_SUBDEV_S_SELECTION `”h]”j)�”}”(hjh]”hŒVIDIOC_SUBDEV_S_SELECTION”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_selection”uh1hh³hÇh´Mphjü ubhŒ IOCTL using ”…”�”}”(hjü h²hh³Nh´Nubj�)�”}”(hŒ``V4L2_SEL_TGT_COMPOSE``”h]”hŒV4L2_SEL_TGT_COMPOSE”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjü ubhŒ™ selection target on the same pad. If the subdev supports scaling but not composing, the top and left values are not used and must always be set to zero.”…”�”}”(hjü h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mphj+ h²hubhì)�”}”(hX*On source pads, cropping is similar to sink pads, with the exception that the source size from which the cropping is performed, is the COMPOSE rectangle on the sink pad. In both sink and source pads, the crop rectangle must be entirely contained inside the source image size for the crop operation.”h]”hX*On source pads, cropping is similar to sink pads, with the exception that the source size from which the cropping is performed, is the COMPOSE rectangle on the sink pad. In both sink and source pads, the crop rectangle must be entirely contained inside the source image size for the crop operation.”…”�”}”(hj@h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mxhj+ h²hubhì)�”}”(hXThe drivers should always use the closest possible rectangle the user requests on all selection targets, unless specifically told otherwise. ``V4L2_SEL_FLAG_GE`` and ``V4L2_SEL_FLAG_LE`` flags may be used to round the image size either up or down. :ref:`v4l2-selection-flags`”h]”(hŒ�The drivers should always use the closest possible rectangle the user requests on all selection targets, unless specifically told otherwise. ”…”�”}”(hjNh²hh³Nh´Nubj�)�”}”(hŒ``V4L2_SEL_FLAG_GE``”h]”hŒV4L2_SEL_FLAG_GE”…”�”}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjNubhŒ and ”…”�”}”(hjNh²hh³Nh´Nubj�)�”}”(hŒ``V4L2_SEL_FLAG_LE``”h]”hŒV4L2_SEL_FLAG_LE”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjNubhŒ> flags may be used to round the image size either up or down. ”…”�”}”(hjNh²hh³Nh´Nubh)�”}”(hŒ:ref:`v4l2-selection-flags`”h]”j)�”}”(hj|h]”hŒv4l2-selection-flags”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjzubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jˆŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œv4l2-selection-flags”uh1hh³hÇh´M~hjNubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M~hj+ h²hubeh}”(h]”(Œ+selections-cropping-scaling-and-composition”j" eh ]”h"]”(Œ-selections: cropping, scaling and composition”Œv4l2-subdev-selections”eh$]”h&]”uh1hÖhj˜h²hh³hÇh´MUjÉ}”j¦j sjË}”j" j subh×)�”}”(hhh]”(hÜ)�”}”(hŒTypes of selection targets”h]”hŒTypes of selection targets”…”�”}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj«h²hh³hÇh´M…ubh×)�”}”(hhh]”(hÜ)�”}”(hŒActual targets”h]”hŒActual targets”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj¼h²hh³hÇh´M‰ubhì)�”}”(hŒ¡Actual targets (without a postfix) reflect the actual hardware configuration at any point of time. There is a BOUNDS target corresponding to every actual target.”h]”hŒ¡Actual targets (without a postfix) reflect the actual hardware configuration at any point of time. There is a BOUNDS target corresponding to every actual target.”…”�”}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M‹hj¼h²hubeh}”(h]”Œactual-targets”ah ]”h"]”Œactual targets”ah$]”h&]”uh1hÖhj«h²hh³hÇh´M‰ubh×)�”}”(hhh]”(hÜ)�”}”(hŒBOUNDS targets”h]”hŒBOUNDS targets”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjãh²hh³hÇh´M‘ubhì)�”}”(hXOBOUNDS targets is the smallest rectangle that contains all valid actual rectangles. It may not be possible to set the actual rectangle as large as the BOUNDS rectangle, however. This may be because e.g. a sensor's pixel array is not rectangular but cross-shaped or round. The maximum size may also be smaller than the BOUNDS rectangle.”h]”hXQBOUNDS targets is the smallest rectangle that contains all valid actual rectangles. It may not be possible to set the actual rectangle as large as the BOUNDS rectangle, however. This may be because e.g. a sensor’s pixel array is not rectangular but cross-shaped or round. The maximum size may also be smaller than the BOUNDS rectangle.”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M“hjãh²hubhÉ)�”}”(hŒ.. _format-propagation:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒformat-propagation”uh1hÈh´Mšhjãh²hh³hÇubeh}”(h]”Œbounds-targets”ah ]”h"]”Œbounds targets”ah$]”h&]”uh1hÖhj«h²hh³hÇh´M‘ubeh}”(h]”Œtypes-of-selection-targets”ah ]”h"]”Œtypes of selection targets”ah$]”h&]”uh1hÖhj˜h²hh³hÇh´M…ubh×)�”}”(hhh]”(hÜ)�”}”(hŒ-Order of configuration and format propagation”h]”hŒ-Order of configuration and format propagation”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjh²hh³hÇh´M�ubhì)�”}”(hX2Inside subdevs, the order of image processing steps will always be from the sink pad towards the source pad. This is also reflected in the order in which the configuration must be performed by the user: the changes made will be propagated to any subsequent stages. If this behaviour is not desired, the user must set ``V4L2_SEL_FLAG_KEEP_CONFIG`` flag. This flag causes no propagation of the changes are allowed in any circumstances. This may also cause the accessed rectangle to be adjusted by the driver, depending on the properties of the underlying hardware.”h]”(hX=Inside subdevs, the order of image processing steps will always be from the sink pad towards the source pad. This is also reflected in the order in which the configuration must be performed by the user: the changes made will be propagated to any subsequent stages. If this behaviour is not desired, the user must set ”…”�”}”(hj.h²hh³Nh´Nubj�)�”}”(hŒ``V4L2_SEL_FLAG_KEEP_CONFIG``”h]”hŒV4L2_SEL_FLAG_KEEP_CONFIG”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj.ubhŒØ flag. This flag causes no propagation of the changes are allowed in any circumstances. This may also cause the accessed rectangle to be adjusted by the driver, depending on the properties of the underlying hardware.”…”�”}”(hj.h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MŸhjh²hubhì)�”}”(hŒãThe coordinates to a step always refer to the actual size of the previous step. The exception to this rule is the sink compose rectangle, which refers to the sink compose bounds rectangle --- if it is supported by the hardware.”h]”hŒãThe coordinates to a step always refer to the actual size of the previous step. The exception to this rule is the sink compose rectangle, which refers to the sink compose bounds rectangle --- if it is supported by the hardware.”…”�”}”(hjNh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M¨hjh²hubjw )�”}”(hhh]”(j)�”}”(hŒ¦Sink pad format. The user configures the sink pad format. This format defines the parameters of the image the entity receives through the pad for further processing. ”h]”hì)�”}”(hŒ¥Sink pad format. The user configures the sink pad format. This format defines the parameters of the image the entity receives through the pad for further processing.”h]”hŒ¥Sink pad format. The user configures the sink pad format. This format defines the parameters of the image the entity receives through the pad for further processing.”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M­hj_ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj\h²hh³hÇh´Nubj)�”}”(hŒeSink pad actual crop selection. The sink pad crop defines the crop performed to the sink pad format. ”h]”hì)�”}”(hŒdSink pad actual crop selection. The sink pad crop defines the crop performed to the sink pad format.”h]”hŒdSink pad actual crop selection. The sink pad crop defines the crop performed to the sink pad format.”…”�”}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M±hjwubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj\h²hh³hÇh´Nubj)�”}”(hX%Sink pad actual compose selection. The size of the sink pad compose rectangle defines the scaling ratio compared to the size of the sink pad crop rectangle. The location of the compose rectangle specifies the location of the actual sink compose rectangle in the sink compose bounds rectangle. ”h]”hì)�”}”(hX$Sink pad actual compose selection. The size of the sink pad compose rectangle defines the scaling ratio compared to the size of the sink pad crop rectangle. The location of the compose rectangle specifies the location of the actual sink compose rectangle in the sink compose bounds rectangle.”h]”hX$Sink pad actual compose selection. The size of the sink pad compose rectangle defines the scaling ratio compared to the size of the sink pad crop rectangle. The location of the compose rectangle specifies the location of the actual sink compose rectangle in the sink compose bounds rectangle.”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M´hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj\h²hh³hÇh´Nubj)�”}”(hŒƒSource pad actual crop selection. Crop on the source pad defines crop performed to the image in the sink compose bounds rectangle. ”h]”hì)�”}”(hŒ‚Source pad actual crop selection. Crop on the source pad defines crop performed to the image in the sink compose bounds rectangle.”h]”hŒ‚Source pad actual crop selection. Crop on the source pad defines crop performed to the image in the sink compose bounds rectangle.”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mºhj§ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj\h²hh³hÇh´Nubj)�”}”(hŒüSource pad format. The source pad format defines the output pixel format of the subdev, as well as the other parameters with the exception of the image width and height. Width and height are defined by the size of the source pad actual crop selection. ”h]”hì)�”}”(hŒûSource pad format. The source pad format defines the output pixel format of the subdev, as well as the other parameters with the exception of the image width and height. Width and height are defined by the size of the source pad actual crop selection.”h]”hŒûSource pad format. The source pad format defines the output pixel format of the subdev, as well as the other parameters with the exception of the image width and height. Width and height are defined by the size of the source pad actual crop selection.”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M½hj¿ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhj\h²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”já jâ jã hjä jå uh1•R®jv hjh²hh³hÇh´M­ubhì)�”}”(hXQAccessing any of the above rectangles not supported by the subdev will return ``EINVAL``. Any rectangle referring to a previous unsupported rectangle coordinates will instead refer to the previous supported rectangle. For example, if sink crop is not supported, the compose selection will refer to the sink pad format dimensions instead.”h]”(hŒNAccessing any of the above rectangles not supported by the subdev will return ”…”�”}”(hjÝh²hh³Nh´Nubj�)�”}”(hŒ ``EINVAL``”h]”hŒEINVAL”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjÝubhŒù. Any rectangle referring to a previous unsupported rectangle coordinates will instead refer to the previous supported rectangle. For example, if sink crop is not supported, the compose selection will refer to the sink pad format dimensions instead.”…”�”}”(hjÝh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MÂhjh²hubhÉ)�”}”(hŒ!.. _subdev-image-processing-crop:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒsubdev-image-processing-crop”uh1hÈh´MÉhjh²hh³hÇubjt)�”}”(hhh]”jy)�”}”(hhh]”(j~)�”}”(hŒª.. kernel-figure:: subdev-image-processing-crop.svg :alt: subdev-image-processing-crop.svg :align: center Image processing in subdevs: simple crop example ”h]”h}”(h]”h ]”h"]”h$]”h&]”Œalt”Œ subdev-image-processing-crop.svg”Œuri”Œ8userspace-api/media/v4l/subdev-image-processing-crop.svg”j�}”j�jsuh1j}hj h³hÇh´Kubj‘)�”}”(hŒ0Image processing in subdevs: simple crop example”h]”hŒ0Image processing in subdevs: simple crop example”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´MÏhj ubeh}”(h]”Œid4”ah ]”h"]”h$]”h&]”jÀŒcenter”uh1jxhjubah}”(h]”jah ]”h"]”Œsubdev-image-processing-crop”ah$]”h&]”uh1jshjh²hh³hÇh´NjÉ}”j7jýsjË}”jjýsubhì)�”}”(hX«In the above example, the subdev supports cropping on its sink pad. To configure it, the user sets the media bus format on the subdev's sink pad. Now the actual crop rectangle can be set on the sink pad --- the location and size of this rectangle reflect the location and size of a rectangle to be cropped from the sink format. The size of the sink crop rectangle will also be the size of the format of the subdev's source pad.”h]”hX¯In the above example, the subdev supports cropping on its sink pad. To configure it, the user sets the media bus format on the subdev’s sink pad. Now the actual crop rectangle can be set on the sink pad --- the location and size of this rectangle reflect the location and size of a rectangle to be cropped from the sink format. The size of the sink crop rectangle will also be the size of the format of the subdev’s source pad.”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MÑhjh²hubhÉ)�”}”(hŒ1.. _subdev-image-processing-scaling-multi-source:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒ,subdev-image-processing-scaling-multi-source”uh1hÈh´MÚhjh²hh³hÇubjt)�”}”(hhh]”jy)�”}”(hhh]”(j~)�”}”(hŒÔ.. kernel-figure:: subdev-image-processing-scaling-multi-source.svg :alt: subdev-image-processing-scaling-multi-source.svg :align: center Image processing in subdevs: scaling with multiple sources ”h]”h}”(h]”h ]”h"]”h$]”h&]”Œalt”Œ0subdev-image-processing-scaling-multi-source.svg”Œuri”ŒHuserspace-api/media/v4l/subdev-image-processing-scaling-multi-source.svg”j�}”j�jhsuh1j}hjXh³hÇh´Kubj‘)�”}”(hŒ:Image processing in subdevs: scaling with multiple sources”h]”hŒ:Image processing in subdevs: scaling with multiple sources”…”�”}”(hjjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´MàhjXubeh}”(h]”Œid5”ah ]”h"]”h$]”h&]”jÀŒcenter”uh1jxhjUubah}”(h]”jTah ]”h"]”Œ,subdev-image-processing-scaling-multi-source”ah$]”h&]”uh1jshjh²hh³hÇh´NjÉ}”j„jJsjË}”jTjJsubhì)�”}”(hXªIn this example, the subdev is capable of first cropping, then scaling and finally cropping for two source pads individually from the resulting scaled image. The location of the scaled image in the cropped image is ignored in sink compose target. Both of the locations of the source crop rectangles refer to the sink scaling rectangle, independently cropping an area at location specified by the source crop rectangle from it.”h]”hXªIn this example, the subdev is capable of first cropping, then scaling and finally cropping for two source pads individually from the resulting scaled image. The location of the scaled image in the cropped image is ignored in sink compose target. Both of the locations of the source crop rectangles refer to the sink scaling rectangle, independently cropping an area at location specified by the source crop rectangle from it.”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mâhjh²hubhÉ)�”}”(hŒ!.. _subdev-image-processing-full:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒsubdev-image-processing-full”uh1hÈh´Mêhjh²hh³hÇubjt)�”}”(hhh]”jy)�”}”(hhh]”(j~)�”}”(hŒÐ.. kernel-figure:: subdev-image-processing-full.svg :alt: subdev-image-processing-full.svg :align: center Image processing in subdevs: scaling and composition with multiple sinks and sources ”h]”h}”(h]”h ]”h"]”h$]”h&]”Œalt”Œ subdev-image-processing-full.svg”Œuri”Œ8userspace-api/media/v4l/subdev-image-processing-full.svg”j�}”j�jµsuh1j}hj¥h³hÇh´Kubj‘)�”}”(hŒTImage processing in subdevs: scaling and composition with multiple sinks and sources”h]”hŒTImage processing in subdevs: scaling and composition with multiple sinks and sources”…”�”}”(hj·h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j�h³hÇh´Mðhj¥ubeh}”(h]”Œid6”ah ]”h"]”h$]”h&]”jÀŒcenter”uh1jxhj¢ubah}”(h]”j¡ah ]”h"]”Œsubdev-image-processing-full”ah$]”h&]”uh1jshjh²hh³hÇh´NjÉ}”jÑj—sjË}”j¡j—subhì)�”}”(hX#The subdev driver supports two sink pads and two source pads. The images from both of the sink pads are individually cropped, then scaled and further composed on the composition bounds rectangle. From that, two independent streams are cropped and sent out of the subdev from the source pads.”h]”hX#The subdev driver supports two sink pads and two source pads. The images from both of the sink pads are individually cropped, then scaled and further composed on the composition bounds rectangle. From that, two independent streams are cropped and sent out of the subdev from the source pads.”…”�”}”(hjÖh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mòhjh²hubhŒcompound”“”)�”}”(hhh]”hŒtoctree”“”)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hjŒentries”]”NŒ&userspace-api/media/v4l/subdev-formats”†”aŒ includefiles”]”jöaŒmaxdepth”Kj�NŒglob”‰Œhidden”‰Œ includehidden”‰Œnumbered”KŒ titlesonly”‰Œ rawentries”]”uh1jéh³hÇh´Mùhjæubah}”(h]”h ]”Œtoctree-wrapper”ah"]”h$]”h&]”uh1jähjh²hh³hÇh´NubhÉ)�”}”(hŒ.. _subdev-routing:”h]”h}”(h]”h ]”h"]”h$]”h&]”hÔŒsubdev-routing”uh1hÈh´Mþhjh²hh³hÇubeh}”(h]”(Œ-order-of-configuration-and-format-propagation”j eh ]”h"]”(Œ-order of configuration and format propagation”Œformat-propagation”eh$]”h&]”uh1hÖhj˜h²hh³hÇh´M�jÉ}”jjsjË}”j jsubeh}”(h]”(j�Œid1”eh ]”h"]”(Œpad-level formats”Œpad-level-formats”eh$]”h&]”uh1hÖhhØh²hh³hÇh´KQjÉ}”j%j…sjË}”j�j…subh×)�”}”(hhh]”(hÜ)�”}”(hŒ4Streams, multiplexed media pads and internal routing”h]”hŒ4Streams, multiplexed media pads and internal routing”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj*h²hh³hÇh´Mubhì)�”}”(hX‘Simple V4L2 sub-devices do not support multiple, unrelated video streams, and only a single stream can pass through a media link and a media pad. Thus each pad contains a format and selection configuration for that single stream. A subdev can do stream processing and split a stream into two or compose two streams into one, but the inputs and outputs for the subdev are still a single stream per pad.”h]”hX‘Simple V4L2 sub-devices do not support multiple, unrelated video streams, and only a single stream can pass through a media link and a media pad. Thus each pad contains a format and selection configuration for that single stream. A subdev can do stream processing and split a stream into two or compose two streams into one, but the inputs and outputs for the subdev are still a single stream per pad.”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj*h²hubhì)�”}”(hXzSome hardware, e.g. MIPI CSI-2, support multiplexed streams, that is, multiple data streams are transmitted on the same bus, which is represented by a media link connecting a transmitter source pad with a sink pad on the receiver. For example, a camera sensor can produce two distinct streams, a pixel stream and a metadata stream, which are transmitted on the multiplexed data bus, represented by a media link which connects the single sensor's source pad with the receiver sink pad. The stream-aware receiver will de-multiplex the streams received on the its sink pad and allows to route them individually to one of its source pads.”h]”hX|Some hardware, e.g. MIPI CSI-2, support multiplexed streams, that is, multiple data streams are transmitted on the same bus, which is represented by a media link connecting a transmitter source pad with a sink pad on the receiver. For example, a camera sensor can produce two distinct streams, a pixel stream and a metadata stream, which are transmitted on the multiplexed data bus, represented by a media link which connects the single sensor’s source pad with the receiver sink pad. The stream-aware receiver will de-multiplex the streams received on the its sink pad and allows to route them individually to one of its source pads.”…”�”}”(hjIh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M hj*h²hubhì)�”}”(hX$Subdevice drivers that support multiplexed streams are compatible with non-multiplexed subdev drivers. However, if the driver at the sink end of a link does not support streams, then only stream 0 of source end may be captured. There may be additional limitations specific to the sink device.”h]”hX$Subdevice drivers that support multiplexed streams are compatible with non-multiplexed subdev drivers. However, if the driver at the sink end of a link does not support streams, then only stream 0 of source end may be captured. There may be additional limitations specific to the sink device.”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhj*h²hubh×)�”}”(hhh]”(hÜ)�”}”(hŒUnderstanding streams”h]”hŒUnderstanding streams”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjeh²hh³hÇh´Mubhì)�”}”(hX”A stream is a stream of content (e.g. pixel data or metadata) flowing through the media pipeline from a source (e.g. a sensor) towards the final sink (e.g. a receiver and demultiplexer in a SoC). Each media link carries all the enabled streams from one end of the link to the other, and sub-devices have routing tables which describe how the incoming streams from sink pads are routed to the source pads.”h]”hX”A stream is a stream of content (e.g. pixel data or metadata) flowing through the media pipeline from a source (e.g. a sensor) towards the final sink (e.g. a receiver and demultiplexer in a SoC). Each media link carries all the enabled streams from one end of the link to the other, and sub-devices have routing tables which describe how the incoming streams from sink pads are routed to the source pads.”…”�”}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mhjeh²hubhì)�”}”(hX*A stream ID is a media pad-local identifier for a stream. Streams IDs of the same stream must be equal on both ends of a link. In other words, a particular stream ID must exist on both sides of a media link, but another stream ID can be used for the same stream at the other side of the sub-device.”h]”hX*A stream ID is a media pad-local identifier for a stream. Streams IDs of the same stream must be equal on both ends of a link. In other words, a particular stream ID must exist on both sides of a media link, but another stream ID can be used for the same stream at the other side of the sub-device.”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M#hjeh²hubhì)�”}”(hŒÄA stream at a specific point in the media pipeline is identified by the sub-device and a (pad, stream) pair. For sub-devices that do not support multiplexed streams the 'stream' field is always 0.”h]”hŒÈA stream at a specific point in the media pipeline is identified by the sub-device and a (pad, stream) pair. For sub-devices that do not support multiplexed streams the ‘stream’ field is always 0.”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M)hjeh²hubeh}”(h]”Œunderstanding-streams”ah ]”h"]”Œunderstanding streams”ah$]”h&]”uh1hÖhj*h²hh³hÇh´Mubh×)�”}”(hhh]”(hÜ)�”}”(hŒ;Interaction between routes, streams, formats and selections”h]”hŒ;Interaction between routes, streams, formats and selections”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj¨h²hh³hÇh´M.ubhì)�”}”(hXhThe addition of streams to the V4L2 sub-device interface moves the sub-device formats and selections from pads to (pad, stream) pairs. Besides the usual pad, also the stream ID needs to be provided for setting formats and selections. The order of configuring formats and selections along a stream is the same as without streams (see :ref:`format-propagation`).”h]”(hXMThe addition of streams to the V4L2 sub-device interface moves the sub-device formats and selections from pads to (pad, stream) pairs. Besides the usual pad, also the stream ID needs to be provided for setting formats and selections. The order of configuring formats and selections along a stream is the same as without streams (see ”…”�”}”(hj¹h²hh³Nh´Nubh)�”}”(hŒ:ref:`format-propagation`”h]”j)�”}”(hjÃh]”hŒformat-propagation”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÁubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÏŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œformat-propagation”uh1hh³hÇh´M0hj¹ubhŒ).”…”�”}”(hj¹h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M0hj¨h²hubhì)�”}”(hX^Instead of the sub-device wide merging of streams from all sink pads towards all source pads, data flows for each route are separate from each other. Any number of routes from streams on sink pads towards streams on source pads is allowed, to the extent supported by drivers. For every stream on a source pad, however, only a single route is allowed.”h]”hX^Instead of the sub-device wide merging of streams from all sink pads towards all source pads, data flows for each route are separate from each other. Any number of routes from streams on sink pads towards streams on source pads is allowed, to the extent supported by drivers. For every stream on a source pad, however, only a single route is allowed.”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M6hj¨h²hubhì)�”}”(hŒ¯Any configurations of a stream within a pad, such as format or selections, are independent of similar configurations on other streams. This is subject to change in the future.”h]”hŒ¯Any configurations of a stream within a pad, such as format or selections, are independent of similar configurations on other streams. This is subject to change in the future.”…”�”}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M<hj¨h²hubeh}”(h]”Œ9interaction-between-routes-streams-formats-and-selections”ah ]”h"]”Œ;interaction between routes, streams, formats and selections”ah$]”h&]”uh1hÖhj*h²hh³hÇh´M.ubh×)�”}”(hhh]”(hÜ)�”}”(hŒDevice types and routing setup”h]”hŒDevice types and routing setup”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjh²hh³hÇh´MAubhì)�”}”(hŒÎDifferent kinds of sub-devices have differing behaviour for route activation, depending on the hardware. In all cases, however, only routes that have the ``V4L2_SUBDEV_ROUTE_FL_ACTIVE`` flag set are active.”h]”(hŒšDifferent kinds of sub-devices have differing behaviour for route activation, depending on the hardware. In all cases, however, only routes that have the ”…”�”}”(hj h²hh³Nh´Nubj�)�”}”(hŒ``V4L2_SUBDEV_ROUTE_FL_ACTIVE``”h]”hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”…”�”}”(hj(h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj ubhŒ flag set are active.”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MChjh²hubhì)�”}”(hXÃDevices generating the streams may allow enabling and disabling some of the routes or have a fixed routing configuration. If the routes can be disabled, not declaring the routes (or declaring them without ``V4L2_SUBDEV_ROUTE_FL_ACTIVE`` flag set) in ``VIDIOC_SUBDEV_S_ROUTING`` will disable the routes. ``VIDIOC_SUBDEV_S_ROUTING`` will still return such routes back to the user in the routes array, with the ``V4L2_SUBDEV_ROUTE_FL_ACTIVE`` flag unset.”h]”(hŒÍDevices generating the streams may allow enabling and disabling some of the routes or have a fixed routing configuration. If the routes can be disabled, not declaring the routes (or declaring them without ”…”�”}”(hj@h²hh³Nh´Nubj�)�”}”(hŒ``V4L2_SUBDEV_ROUTE_FL_ACTIVE``”h]”hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”…”�”}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj@ubhŒ flag set) in ”…”�”}”(hj@h²hh³Nh´Nubj�)�”}”(hŒ``VIDIOC_SUBDEV_S_ROUTING``”h]”hŒVIDIOC_SUBDEV_S_ROUTING”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj@ubhŒ will disable the routes. ”…”�”}”(hj@h²hh³Nh´Nubj�)�”}”(hŒ``VIDIOC_SUBDEV_S_ROUTING``”h]”hŒVIDIOC_SUBDEV_S_ROUTING”…”�”}”(hjlh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj@ubhŒN will still return such routes back to the user in the routes array, with the ”…”�”}”(hj@h²hh³Nh´Nubj�)�”}”(hŒ``V4L2_SUBDEV_ROUTE_FL_ACTIVE``”h]”hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj@ubhŒ flag unset.”…”�”}”(hj@h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MGhjh²hubhì)�”}”(hXDevices transporting the streams almost always have more configurability with respect to routing. Typically any route between the sub-device's sink and source pads is possible, and multiple routes (usually up to certain limited number) may be active simultaneously. For such devices, no routes are created by the driver and user-created routes are fully replaced when ``VIDIOC_SUBDEV_S_ROUTING`` is called on the sub-device. Such newly created routes have the device's default configuration for format and selection rectangles.”h]”(hXrDevices transporting the streams almost always have more configurability with respect to routing. Typically any route between the sub-device’s sink and source pads is possible, and multiple routes (usually up to certain limited number) may be active simultaneously. For such devices, no routes are created by the driver and user-created routes are fully replaced when ”…”�”}”(hj–h²hh³Nh´Nubj�)�”}”(hŒ``VIDIOC_SUBDEV_S_ROUTING``”h]”hŒVIDIOC_SUBDEV_S_ROUTING”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhj–ubhŒ† is called on the sub-device. Such newly created routes have the device’s default configuration for format and selection rectangles.”…”�”}”(hj–h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MNhjh²hubeh}”(h]”Œdevice-types-and-routing-setup”ah ]”h"]”Œdevice types and routing setup”ah$]”h&]”uh1hÖhj*h²hh³hÇh´MAubh×)�”}”(hhh]”(hÜ)�”}”(hŒConfiguring streams”h]”hŒConfiguring streams”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj¾h²hh³hÇh´MWubhì)�”}”(hŒ¨The configuration of the streams is done individually for each sub-device and the validity of the streams between sub-devices is validated when the pipeline is started.”h]”hŒ¨The configuration of the streams is done individually for each sub-device and the validity of the streams between sub-devices is validated when the pipeline is started.”…”�”}”(hjÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MYhj¾h²hubhì)�”}”(hŒ1There are three steps in configuring the streams:”h]”hŒ1There are three steps in configuring the streams:”…”�”}”(hjÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M]hj¾h²hubjw )�”}”(hhh]”(j)�”}”(hŒlSet up links. Connect the pads between sub-devices using the :ref:`Media Controller API ` ”h]”hì)�”}”(hŒkSet up links. Connect the pads between sub-devices using the :ref:`Media Controller API `”h]”(hŒ=Set up links. Connect the pads between sub-devices using the ”…”�”}”(hjòh²hh³Nh´Nubh)�”}”(hŒ.:ref:`Media Controller API `”h]”j)�”}”(hjüh]”hŒMedia Controller API”…”�”}”(hjþh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjúubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œmedia_controller”uh1hh³hÇh´M_hjòubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M_hjîubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjëh²hh³hÇh´Nubj)�”}”(hXStreams. Streams are declared and their routing is configured by setting the routing table for the sub-device using :ref:`VIDIOC_SUBDEV_S_ROUTING ` ioctl. Note that setting the routing table will reset formats and selections in the sub-device to default values. ”h]”hì)�”}”(hXStreams. Streams are declared and their routing is configured by setting the routing table for the sub-device using :ref:`VIDIOC_SUBDEV_S_ROUTING ` ioctl. Note that setting the routing table will reset formats and selections in the sub-device to default values.”h]”(hŒtStreams. Streams are declared and their routing is configured by setting the routing table for the sub-device using ”…”�”}”(hj*h²hh³Nh´Nubh)�”}”(hŒ8:ref:`VIDIOC_SUBDEV_S_ROUTING `”h]”j)�”}”(hj4h]”hŒVIDIOC_SUBDEV_S_ROUTING”…”�”}”(hj6h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj2ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j@Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_routing”uh1hh³hÇh´Mbhj*ubhŒr ioctl. Note that setting the routing table will reset formats and selections in the sub-device to default values.”…”�”}”(hj*h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mbhj&ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjëh²hh³hÇh´Nubj)�”}”(hXYConfigure formats and selections. Formats and selections of each stream are configured separately as documented for plain sub-devices in :ref:`format-propagation`. The stream ID is set to the same stream ID associated with either sink or source pads of routes configured using the :ref:`VIDIOC_SUBDEV_S_ROUTING ` ioctl. ”h]”hì)�”}”(hXXConfigure formats and selections. Formats and selections of each stream are configured separately as documented for plain sub-devices in :ref:`format-propagation`. The stream ID is set to the same stream ID associated with either sink or source pads of routes configured using the :ref:`VIDIOC_SUBDEV_S_ROUTING ` ioctl.”h]”(hŒ‰Configure formats and selections. Formats and selections of each stream are configured separately as documented for plain sub-devices in ”…”�”}”(hjfh²hh³Nh´Nubh)�”}”(hŒ:ref:`format-propagation`”h]”j)�”}”(hjph]”hŒformat-propagation”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjnubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j|Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj Œformat-propagation”uh1hh³hÇh´MghjfubhŒw. The stream ID is set to the same stream ID associated with either sink or source pads of routes configured using the ”…”�”}”(hjfh²hh³Nh´Nubh)�”}”(hŒ8:ref:`VIDIOC_SUBDEV_S_ROUTING `”h]”j)�”}”(hj”h]”hŒVIDIOC_SUBDEV_S_ROUTING”…”�”}”(hj–h²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj’ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_routing”uh1hh³hÇh´MghjfubhŒ ioctl.”…”�”}”(hjfh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mghjbubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjëh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”já jâ jã hjä jå uh1jv hj¾h²hh³hÇh´M_ubeh}”(h]”Œconfiguring-streams”ah ]”h"]”Œconfiguring streams”ah$]”h&]”uh1hÖhj*h²hh³hÇh´MWubh×)�”}”(hhh]”(hÜ)�”}”(hŒ!Multiplexed streams setup example”h]”hŒ!Multiplexed streams setup example”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjÐh²hh³hÇh´Mnubhì)�”}”(hŒCA simple example of a multiplexed stream setup might be as follows:”h]”hŒCA simple example of a multiplexed stream setup might be as follows:”…”�”}”(hjáh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MphjÐh²hubj)�”}”(hhh]”(j)�”}”(hŒ~Two identical sensors (Sensor A and Sensor B). Each sensor has a single source pad (pad 0) which carries a pixel data stream. ”h]”hì)�”}”(hŒ}Two identical sensors (Sensor A and Sensor B). Each sensor has a single source pad (pad 0) which carries a pixel data stream.”h]”hŒ}Two identical sensors (Sensor A and Sensor B). Each sensor has a single source pad (pad 0) which carries a pixel data stream.”…”�”}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mrhjòubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjïh²hh³hÇh´Nubj)�”}”(hŒ˜Multiplexer bridge (Bridge). The bridge has two sink pads, connected to the sensors (pads 0, 1), and one source pad (pad 2), which outputs two streams. ”h]”hì)�”}”(hŒ—Multiplexer bridge (Bridge). The bridge has two sink pads, connected to the sensors (pads 0, 1), and one source pad (pad 2), which outputs two streams.”h]”hŒ—Multiplexer bridge (Bridge). The bridge has two sink pads, connected to the sensors (pads 0, 1), and one source pad (pad 2), which outputs two streams.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Muhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjïh²hh³hÇh´Nubj)�”}”(hŒâReceiver in the SoC (Receiver). The receiver has a single sink pad (pad 0), connected to the bridge, and two source pads (pads 1-2), going to the DMA engine. The receiver demultiplexes the incoming streams to the source pads. ”h]”hì)�”}”(hŒáReceiver in the SoC (Receiver). The receiver has a single sink pad (pad 0), connected to the bridge, and two source pads (pads 1-2), going to the DMA engine. The receiver demultiplexes the incoming streams to the source pads.”h]”hŒáReceiver in the SoC (Receiver). The receiver has a single sink pad (pad 0), connected to the bridge, and two source pads (pads 1-2), going to the DMA engine. The receiver demultiplexes the incoming streams to the source pads.”…”�”}”(hj&h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mxhj"ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjïh²hh³hÇh´Nubj)�”}”(hŒDMA Engines in the SoC (DMA Engine), one for each stream. Each DMA engine is connected to a single source pad in the receiver. ”h]”hì)�”}”(hŒ~DMA Engines in the SoC (DMA Engine), one for each stream. Each DMA engine is connected to a single source pad in the receiver.”h]”hŒ~DMA Engines in the SoC (DMA Engine), one for each stream. Each DMA engine is connected to a single source pad in the receiver.”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M|hj:ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjïh²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”j„j…uh1jh³hÇh´MrhjÐh²hubhì)�”}”(hŒÚThe sensors, the bridge and the receiver are modeled as V4L2 sub-devices, exposed to userspace via /dev/v4l-subdevX device nodes. The DMA engines are modeled as V4L2 devices, exposed to userspace via /dev/videoX nodes.”h]”hŒÚThe sensors, the bridge and the receiver are modeled as V4L2 sub-devices, exposed to userspace via /dev/v4l-subdevX device nodes. The DMA engines are modeled as V4L2 devices, exposed to userspace via /dev/videoX nodes.”…”�”}”(hjXh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MhjÐh²hubhì)�”}”(hŒHTo configure this pipeline, the userspace must take the following steps:”h]”hŒHTo configure this pipeline, the userspace must take the following steps:”…”�”}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MƒhjÐh²hubjw )�”}”(hhh]”(j)�”}”(hŒÓSet up media links between entities: connect the sensors to the bridge, bridge to the receiver, and the receiver to the DMA engines. This step does not differ from normal non-multiplexed media controller setup. ”h]”hì)�”}”(hŒÒSet up media links between entities: connect the sensors to the bridge, bridge to the receiver, and the receiver to the DMA engines. This step does not differ from normal non-multiplexed media controller setup.”h]”hŒÒSet up media links between entities: connect the sensors to the bridge, bridge to the receiver, and the receiver to the DMA engines. This step does not differ from normal non-multiplexed media controller setup.”…”�”}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M…hjwubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjth²hh³hÇh´Nubj)�”}”(hŒConfigure routing ”h]”hì)�”}”(hŒConfigure routing”h]”hŒConfigure routing”…”�”}”(hj“h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M‰hj�ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjth²hh³hÇh´Nubeh}”(h]”h ]”h"]”h$]”h&]”já jâ jã hjä jå uh1jv hjÐh²hh³hÇh´M…ubj)�”}”(hhh]”(hÜ)�”}”(hŒBridge routing table”h]”hŒBridge routing table”…”�”}”(hj°h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÇh´M‹hj­ubj')�”}”(hhh]”(j,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj¾ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj¾ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj¾ubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hj¾ubjt)�”}”(hhh]”jy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒSink Pad/Stream”h]”hŒSink Pad/Stream”…”�”}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MŽhjïubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjìubj~)�”}”(hhh]”hì)�”}”(hŒSource Pad/Stream”h]”hŒSource Pad/Stream”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M�hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjìubj~)�”}”(hhh]”hì)�”}”(hŒ Routing Flags”h]”hŒ Routing Flags”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M�hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjìubj~)�”}”(hhh]”hì)�”}”(hŒComments”h]”hŒComments”…”�”}”(hj7h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M‘hj4ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjìubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjéubah}”(h]”h ]”h"]”h$]”h&]”uh1jshj¾ubjs)�”}”(hhh]”(jy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒ0/0”h]”hŒ0/0”…”�”}”(hj`h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M’hj]ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjZubj~)�”}”(hhh]”hì)�”}”(hŒ2/0”h]”hŒ2/0”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M“hjtubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjZubj~)�”}”(hhh]”hì)�”}”(hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”h]”hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”…”�”}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M”hj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjZubj~)�”}”(hhh]”hì)�”}”(hŒPixel data stream from Sensor A”h]”hŒPixel data stream from Sensor A”…”�”}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M•hj¢ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjZubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjWubjy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒ1/0”h]”hŒ1/0”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M–hjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj¿ubj~)�”}”(hhh]”hì)�”}”(hŒ2/1”h]”hŒ2/1”…”�”}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M—hjÙubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj¿ubj~)�”}”(hhh]”hì)�”}”(hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”h]”hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”…”�”}”(hjóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M˜hjðubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj¿ubj~)�”}”(hhh]”hì)�”}”(hŒPixel data stream from Sensor B”h]”hŒPixel data stream from Sensor B”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M™hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj¿ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjWubeh}”(h]”h ]”h"]”h$]”h&]”uh1jrhj¾ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j&hj­ubeh}”(h]”Œid7”ah ]”h"]”h$]”h&]”uh1jhjÐh²hh³Nh´Nubj)�”}”(hhh]”(hÜ)�”}”(hŒReceiver routing table”h]”hŒReceiver routing table”…”�”}”(hj;h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÇh´M›hj8ubj')�”}”(hhh]”(j,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hjIubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hjIubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hjIubj,)�”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1j+hjIubjt)�”}”(hhh]”jy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒSink Pad/Stream”h]”hŒSink Pad/Stream”…”�”}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Mžhjzubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”hì)�”}”(hŒSource Pad/Stream”h]”hŒSource Pad/Stream”…”�”}”(hj”h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´MŸhj‘ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”hì)�”}”(hŒ Routing Flags”h]”hŒ Routing Flags”…”�”}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M hj¨ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubj~)�”}”(hhh]”hì)�”}”(hŒComments”h]”hŒComments”…”�”}”(hjÂh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M¡hj¿ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjwubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjtubah}”(h]”h ]”h"]”h$]”h&]”uh1jshjIubjs)�”}”(hhh]”(jy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒ0/0”h]”hŒ0/0”…”�”}”(hjëh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M¢hjèubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjåubj~)�”}”(hhh]”hì)�”}”(hŒ1/0”h]”hŒ1/0”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M£hjÿubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjåubj~)�”}”(hhh]”hì)�”}”(hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”h]”hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M¤hjubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjåubj~)�”}”(hhh]”hì)�”}”(hŒPixel data stream from Sensor A”h]”hŒPixel data stream from Sensor A”…”�”}”(hj0h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M¥hj-ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjåubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjâubjy)�”}”(hhh]”(j~)�”}”(hhh]”hì)�”}”(hŒ0/1”h]”hŒ0/1”…”�”}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M¦hjMubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjJubj~)�”}”(hhh]”hì)�”}”(hŒ2/0”h]”hŒ2/0”…”�”}”(hjgh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M§hjdubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjJubj~)�”}”(hhh]”hì)�”}”(hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”h]”hŒV4L2_SUBDEV_ROUTE_FL_ACTIVE”…”�”}”(hj~h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M¨hj{ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjJubj~)�”}”(hhh]”hì)�”}”(hŒPixel data stream from Sensor B”h]”hŒPixel data stream from Sensor B”…”�”}”(hj•h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M©hj’ubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjJubeh}”(h]”h ]”h"]”h$]”h&]”uh1jxhjâubeh}”(h]”h ]”h"]”h$]”h&]”uh1jrhjIubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1j&hj8ubeh}”(h]”Œid8”ah ]”h"]”h$]”h&]”uh1jhjÐh²hh³Nh´Nubjw )�”}”(hhh]”j)�”}”(hXConfigure formats and selections After configuring routing, the next step is configuring the formats and selections for the streams. This is similar to performing this step without streams, with just one exception: the ``stream`` field needs to be assigned to the value of the stream ID. A common way to accomplish this is to start from the sensors and propagate the configurations along the stream towards the receiver, using :ref:`VIDIOC_SUBDEV_S_FMT ` ioctls to configure each stream endpoint in each sub-device.”h]”(hì)�”}”(hŒ Configure formats and selections”h]”hŒ Configure formats and selections”…”�”}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M«hjÆubhì)�”}”(hŒþAfter configuring routing, the next step is configuring the formats and selections for the streams. This is similar to performing this step without streams, with just one exception: the ``stream`` field needs to be assigned to the value of the stream ID.”h]”(hŒºAfter configuring routing, the next step is configuring the formats and selections for the streams. This is similar to performing this step without streams, with just one exception: the ”…”�”}”(hjØh²hh³Nh´Nubj�)�”}”(hŒ ``stream``”h]”hŒstream”…”�”}”(hjàh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jŽhjØubhŒ: field needs to be assigned to the value of the stream ID.”…”�”}”(hjØh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M­hjÆubhì)�”}”(hŒøA common way to accomplish this is to start from the sensors and propagate the configurations along the stream towards the receiver, using :ref:`VIDIOC_SUBDEV_S_FMT ` ioctls to configure each stream endpoint in each sub-device.”h]”(hŒ‹A common way to accomplish this is to start from the sensors and propagate the configurations along the stream towards the receiver, using ”…”�”}”(hjøh²hh³Nh´Nubh)�”}”(hŒ0:ref:`VIDIOC_SUBDEV_S_FMT `”h]”j)�”}”(hjh]”hŒVIDIOC_SUBDEV_S_FMT”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj Œvidioc_subdev_g_fmt”uh1hh³hÇh´M²hjøubhŒ= ioctls to configure each stream endpoint in each sub-device.”…”�”}”(hjøh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´M²hjÆubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjÃh²hh³hÇh´Nubah}”(h]”h ]”h"]”h$]”h&]”já jâ jã hjä jå Œstart”Kuh1jv hjÐh²hh³hÇh´M«ubeh}”(h]”Œ!multiplexed-streams-setup-example”ah ]”h"]”Œ!multiplexed streams setup example”ah$]”h&]”uh1hÖhj*h²hh³hÇh´Mnubeh}”(h]”(Œ3streams-multiplexed-media-pads-and-internal-routing”jeh ]”h"]”(Œ4streams, multiplexed media pads and internal routing”Œsubdev-routing”eh$]”h&]”uh1hÖhhØh²hh³hÇh´MjÉ}”jEj sjË}”jj subeh}”(h]”(Œsub-device-interface”hÕeh ]”h"]”(Œsub-device interface”Œsubdev”eh$]”h&]”uh1hÖhhh²hh³hÇh´KjÉ}”jPhÊsjË}”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”j}Œ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”jwŒ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Êaj�]”j…ajq]”jgaj]”jaj" ]”j aj ]”jaj]”jýajT]”jJaj¡]”j—aj]”j auŒnameids”}”(jPhÕjOjLj?j<j•j’j%j�j$j!jÆjqj( j% ja jj¦j" j¥j¢jjjàjÝjjjj jjj7jj„jTjÑj¡jEjjDjAj¥j¢j j j»j¸jÍjÊj<j9uŒ nametypes”}”(jPˆjO‰j?‰j•‰j%ˆj$‰jƈj( ‰ja ˆj¦ˆj¥‰j‰jà‰j‰jˆj‰j7ˆj„ˆjшjEˆjD‰j¥‰j ‰j»‰j͉j<‰uh}”(hÕhØjLhØj<jÈj’jBj�j˜j!j˜jqjuj% jÝjjj" j+ j¢j+ jj«jÝj¼jjãj jjjjjjTjUj¡j¢jj*jAj*j¢jej j¨j¸jjÊj¾j9jÐj»jzj^ jj-j jzjXjÇj¥j3j­j¾j8uŒ 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”“”}”j…Ks…”R”Œparse_messages”]”hŒsystem_message”“”)�”}”(hhh]”hì)�”}”(hŒ:Enumerated list start value not ordinal-1: "3" (ordinal 3)”h]”hŒ>Enumerated list start value not ordinal-1: “3â€� (ordinal 3)”…”�”}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëhjåubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1jãhjÐh²hh³hÇh´M«ubaŒtransform_messages”]”(jä)�”}”(hhh]”hì)�”}”(hhh]”hŒ,Hyperlink target "subdev" is not referenced.”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”uh1hëhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”jþŒsource”hÇŒline”Kuh1jãubjä)�”}”(hhh]”hì)�”}”(hhh]”hŒ7Hyperlink target "pad-level-formats" is not referenced.”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”uh1hëhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”jþŒsource”hÇŒline”KNuh1jãubjä)�”}”(hhh]”hì)�”}”(hhh]”hŒ6Hyperlink target "pipeline-scaling" is not referenced.”…”�”}”hj:sbah}”(h]”h ]”h"]”h$]”h&]”uh1hëhj7ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”jþŒsource”hÇŒline”Kluh1jãubjä)�”}”(hhh]”hì)�”}”(hhh]”hŒ