€•˜LŒ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”Œ=/translations/zh_CN/userspace-api/media/drivers/camera-sensor”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ=/translations/zh_TW/userspace-api/media/drivers/camera-sensor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ=/translations/it_IT/userspace-api/media/drivers/camera-sensor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ=/translations/ja_JP/userspace-api/media/drivers/camera-sensor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ=/translations/ko_KR/userspace-api/media/drivers/camera-sensor”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ=/translations/sp_SP/userspace-api/media/drivers/camera-sensor”Œ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Œ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh£sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1h¡hhhžhhŸŒW/var/lib/git/docbuild/linux/Documentation/userspace-api/media/drivers/camera-sensor.rst”h KubhŒtarget”“”)”}”(hŒ&.. _media_using_camera_sensor_drivers:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œ!media-using-camera-sensor-drivers”uh1h´h KhhhžhhŸh³ubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒUsing camera sensor drivers”h]”hŒUsing camera sensor drivers”…””}”(hhÉhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhhÄhžhhŸh³h KubhŒ paragraph”“”)”}”(hŒ{This section describes common practices for how the V4L2 sub-device interface is used to control the camera sensor drivers.”h]”hŒ{This section describes common practices for how the V4L2 sub-device interface is used to control the camera sensor drivers.”…””}”(hhÙhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KhhÄhžhubhØ)”}”(hŒDYou may also find :ref:`media_writing_camera_sensor_drivers` useful.”h]”(hŒYou may also find ”…””}”(hhçhžhhŸNh Nubh)”}”(hŒ*:ref:`media_writing_camera_sensor_drivers`”h]”hŒinline”“”)”}”(hhñh]”hŒ#media_writing_camera_sensor_drivers”…””}”(hhõhžhhŸNh Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hóhhïubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ)userspace-api/media/drivers/camera-sensor”Œ refdomain”jŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆŒ reftarget”Œ#media_writing_camera_sensor_drivers”uh1hhŸh³h K hhçubhŒ useful.”…””}”(hhçhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K hhÄhžhubhÃ)”}”(hhh]”(hÈ)”}”(hŒ Frame size”h]”hŒ Frame size”…””}”(hj!hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjhžhhŸh³h KubhØ)”}”(hŒSThere are two distinct ways to configure the frame size produced by camera sensors.”h]”hŒSThere are two distinct ways to configure the frame size produced by camera sensors.”…””}”(hj/hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KhjhžhubhÃ)”}”(hhh]”(hÈ)”}”(hŒ)Freely configurable camera sensor drivers”h]”hŒ)Freely configurable camera sensor drivers”…””}”(hj@hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhj=hžhhŸh³h KubhØ)”}”(hX*Freely configurable camera sensor drivers expose the device's internal processing pipeline as one or more sub-devices with different cropping and scaling configurations. The output size of the device is the result of a series of cropping and scaling operations from the device's pixel array's size.”h]”hX0Freely configurable camera sensor drivers expose the device’s internal processing pipeline as one or more sub-devices with different cropping and scaling configurations. The output size of the device is the result of a series of cropping and scaling operations from the device’s pixel array’s size.”…””}”(hjNhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h Khj=hžhubhØ)”}”(hŒ.An example of such a driver is the CCS driver.”h]”hŒ.An example of such a driver is the CCS driver.”…””}”(hj\hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h Khj=hžhubeh}”(h]”Œ)freely-configurable-camera-sensor-drivers”ah ]”h"]”Œ)freely configurable camera sensor drivers”ah$]”h&]”uh1hÂhjhžhhŸh³h KubhÃ)”}”(hhh]”(hÈ)”}”(hŒRegister list based drivers”h]”hŒRegister list based drivers”…””}”(hjuhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjrhžhhŸh³h KubhØ)”}”(hXyRegister list based drivers generally, instead of able to configure the device they control based on user requests, are limited to a number of preset configurations that combine a number of different parameters that on hardware level are independent. How a driver picks such configuration is based on the format set on a source pad at the end of the device's internal pipeline.”h]”hX{Register list based drivers generally, instead of able to configure the device they control based on user requests, are limited to a number of preset configurations that combine a number of different parameters that on hardware level are independent. How a driver picks such configuration is based on the format set on a source pad at the end of the device’s internal pipeline.”…””}”(hjƒhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K hjrhžhubhØ)”}”(hŒ-Most sensor drivers are implemented this way.”h]”hŒ-Most sensor drivers are implemented this way.”…””}”(hj‘hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K&hjrhžhubeh}”(h]”Œregister-list-based-drivers”ah ]”h"]”Œregister list based drivers”ah$]”h&]”uh1hÂhjhžhhŸh³h Kubeh}”(h]”Œ frame-size”ah ]”h"]”Œ frame size”ah$]”h&]”uh1hÂhhÄhžhhŸh³h KubhÃ)”}”(hhh]”(hÈ)”}”(hŒFrame interval configuration”h]”hŒFrame interval configuration”…””}”(hj²hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhj¯hžhhŸh³h K)ubhØ)”}”(hŒ¾There are two different methods for obtaining possibilities for different frame intervals as well as configuring the frame interval. Which one to implement depends on the type of the device.”h]”hŒ¾There are two different methods for obtaining possibilities for different frame intervals as well as configuring the frame interval. Which one to implement depends on the type of the device.”…””}”(hjÀhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K+hj¯hžhubhÃ)”}”(hhh]”(hÈ)”}”(hŒRaw camera sensors”h]”hŒRaw camera sensors”…””}”(hjÑhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjÎhžhhŸh³h K0ubhØ)”}”(hX Instead of a high level parameter such as frame interval, the frame interval is a result of the configuration of a number of camera sensor implementation specific parameters. Luckily, these parameters tend to be the same for more or less all modern raw camera sensors.”h]”hX Instead of a high level parameter such as frame interval, the frame interval is a result of the configuration of a number of camera sensor implementation specific parameters. Luckily, these parameters tend to be the same for more or less all modern raw camera sensors.”…””}”(hjßhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K2hjÎhžhubhØ)”}”(hŒ?The frame interval is calculated using the following equation::”h]”hŒ>The frame interval is calculated using the following equation:”…””}”(hjíhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K7hjÎhžhubhŒ literal_block”“”)”}”(hŒ‡frame interval = (analogue crop width + horizontal blanking) * (analogue crop height + vertical blanking) / pixel rate”h]”hŒ‡frame interval = (analogue crop width + horizontal blanking) * (analogue crop height + vertical blanking) / pixel rate”…””}”hjýsbah}”(h]”h ]”h"]”h$]”h&]”h±h²uh1jûhŸh³h K9hjÎhžhubhØ)”}”(hŒØThe formula is bus independent and is applicable for raw timing parameters on large variety of devices beyond camera sensors. Devices that have no analogue crop, use the full source image size, i.e. pixel array size.”h]”hŒØThe formula is bus independent and is applicable for raw timing parameters on large variety of devices beyond camera sensors. Devices that have no analogue crop, use the full source image size, i.e. pixel array size.”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K`.”h]”(hŒÂThe first entity in the linear pipeline is the pixel array. The pixel array may be followed by other entities that are there to allow configuring binning, skipping, scaling or digital crop, see ”…””}”(hj¥hžhhŸNh Nubh)”}”(hŒ<:ref:`VIDIOC_SUBDEV_G_SELECTION `”h]”hô)”}”(hj¯h]”hŒVIDIOC_SUBDEV_G_SELECTION”…””}”(hj±hžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1hóhj­ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j»Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_subdev_g_selection”uh1hhŸh³h KJhj¥ubhŒ.”…””}”(hj¥hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KJhjÎhžhubeh}”(h]”Œraw-camera-sensors”ah ]”h"]”Œraw camera sensors”ah$]”h&]”uh1hÂhj¯hžhhŸh³h K0ubhÃ)”}”(hhh]”(hÈ)”}”(hŒUSB cameras etc. devices”h]”hŒUSB cameras etc. devices”…””}”(hjâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjßhžhhŸh³h KPubhØ)”}”(hX\USB video class hardware, as well as many cameras offering a similar higher level interface natively, generally use the concept of frame interval (or frame rate) on device level in firmware or hardware. This means lower level controls implemented by raw cameras may not be used on uAPI (or even kAPI) to control the frame interval on these devices.”h]”hX\USB video class hardware, as well as many cameras offering a similar higher level interface natively, generally use the concept of frame interval (or frame rate) on device level in firmware or hardware. This means lower level controls implemented by raw cameras may not be used on uAPI (or even kAPI) to control the frame interval on these devices.”…””}”(hjðhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KRhjßhžhubeh}”(h]”Œusb-cameras-etc-devices”ah ]”h"]”Œusb cameras etc. devices”ah$]”h&]”uh1hÂhj¯hžhhŸh³h KPubeh}”(h]”Œframe-interval-configuration”ah ]”h"]”Œframe interval configuration”ah$]”h&]”uh1hÂhhÄhžhhŸh³h K)ubhÃ)”}”(hhh]”(hÈ)”}”(hŒ"Rotation, orientation and flipping”h]”hŒ"Rotation, orientation and flipping”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjhžhhŸh³h KYubhØ)”}”(hŒúSome systems have the camera sensor mounted upside down compared to its natural mounting rotation. In such cases, drivers shall expose the information to userspace with the :ref:`V4L2_CID_CAMERA_SENSOR_ROTATION ` control.”h]”(hŒ­Some systems have the camera sensor mounted upside down compared to its natural mounting rotation. In such cases, drivers shall expose the information to userspace with the ”…””}”(hjhžhhŸNh Nubh)”}”(hŒD:ref:`V4L2_CID_CAMERA_SENSOR_ROTATION `”h]”hô)”}”(hj)h]”hŒV4L2_CID_CAMERA_SENSOR_ROTATION”…””}”(hj+hžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1hóhj'ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j5Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒv4l2-camera-sensor-rotation”uh1hhŸh³h K[hjubhŒ control.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K[hjhžhubhØ)”}”(hŒ—Sensor drivers shall also report the sensor's mounting orientation with the :ref:`V4L2_CID_CAMERA_SENSOR_ORIENTATION `.”h]”(hŒNSensor drivers shall also report the sensor’s mounting orientation with the ”…””}”(hjQhžhhŸNh Nubh)”}”(hŒJ:ref:`V4L2_CID_CAMERA_SENSOR_ORIENTATION `”h]”hô)”}”(hj[h]”hŒ"V4L2_CID_CAMERA_SENSOR_ORIENTATION”…””}”(hj]hžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1hóhjYubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jgŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒv4l2-camera-sensor-orientation”uh1hhŸh³h K`hjQubhŒ.”…””}”(hjQhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K`hjhžhubhØ)”}”(hX¬Sensor drivers that have any vertical or horizontal flips embedded in the register programming sequences shall initialize the :ref:`V4L2_CID_HFLIP ` and :ref:`V4L2_CID_VFLIP ` controls with the values programmed by the register sequences. The default values of these controls shall be 0 (disabled). Especially these controls shall not be inverted, independently of the sensor's mounting rotation.”h]”(hŒ~Sensor drivers that have any vertical or horizontal flips embedded in the register programming sequences shall initialize the ”…””}”(hjƒhžhhŸNh Nubh)”}”(hŒ&:ref:`V4L2_CID_HFLIP `”h]”hô)”}”(hjh]”hŒV4L2_CID_HFLIP”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1hóhj‹ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j™Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒv4l2-cid-hflip”uh1hhŸh³h KchjƒubhŒ and ”…””}”(hjƒhžhhŸNh Nubh)”}”(hŒ&:ref:`V4L2_CID_VFLIP `”h]”hô)”}”(hj±h]”hŒV4L2_CID_VFLIP”…””}”(hj³hžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1hóhj¯ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j½Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒv4l2-cid-vflip”uh1hhŸh³h KchjƒubhŒß controls with the values programmed by the register sequences. The default values of these controls shall be 0 (disabled). Especially these controls shall not be inverted, independently of the sensor’s mounting rotation.”…””}”(hjƒhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h Kchjhžhubeh}”(h]”Œ!rotation-orientation-and-flipping”ah ]”h"]”Œ"rotation, orientation and flipping”ah$]”h&]”uh1hÂhhÄhžhhŸh³h KYubeh}”(h]”(Œusing-camera-sensor-drivers”hÁeh ]”h"]”(Œusing camera sensor drivers”Œ!media_using_camera_sensor_drivers”eh$]”h&]”uh1hÂhhhžhhŸh³h KŒexpect_referenced_by_name”}”jçh¶sŒexpect_referenced_by_id”}”hÁh¶subeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h³uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÇNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h³Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”hÁ]”h¶asŒnameids”}”(jçhÁjæjãj¬j©jojlj¤j¡j jjÜjÙjjjÞjÛuŒ nametypes”}”(jçˆjæ‰j¬‰jo‰j¤‰j ‰j܉j‰jÞ‰uh}”(hÁhÄjãhÄj©jjlj=j¡jrjj¯jÙjÎjjßjÛjuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)”}”(hhh]”hØ)”}”(hhh]”hŒGHyperlink target "media-using-camera-sensor-drivers" is not referenced.”…””}”hj{sbah}”(h]”h ]”h"]”h$]”h&]”uh1h×hjxubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h³Œline”Kuh1jvubaŒ transformer”NŒ include_log”]”Œ decoration”Nhžhub.