€•A@Œ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/dv-timings”Œ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/dv-timings”Œ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/dv-timings”Œ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/dv-timings”Œ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/dv-timings”Œ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/dv-timings”Œ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/dv-timings.rst”h KubhŒtarget”“”)”}”(hŒ.. _dv-timings:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œ dv-timings”uh1h´h KhhhžhhŸh³ubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒDigital Video (DV) Timings”h]”hŒDigital Video (DV) Timings”…””}”(hhÉhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhhÄhžhhŸh³h KubhŒ paragraph”“”)”}”(hXThe video standards discussed so far have been dealing with Analog TV and the corresponding video timings. Today there are many more different hardware interfaces such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry video signals and there is a need to extend the API to select the video timings for these interfaces. Since it is not possible to extend the :ref:`v4l2_std_id ` due to the limited bits available, a new set of ioctls was added to set/get video timings at the input and output.”h]”(hXƒThe video standards discussed so far have been dealing with Analog TV and the corresponding video timings. Today there are many more different hardware interfaces such as High Definition TV interfaces (HDMI), VGA, DVI connectors etc., that carry video signals and there is a need to extend the API to select the video timings for these interfaces. Since it is not possible to extend the ”…””}”(hhÙhžhhŸNh Nubh)”}”(hŒ :ref:`v4l2_std_id `”h]”hŒinline”“”)”}”(hhãh]”hŒ v4l2_std_id”…””}”(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/v4l/dv-timings”Œ refdomain”hòŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆŒ reftarget”Œ v4l2-std-id”uh1hhŸh³h K hhÙubhŒs due to the limited bits available, a new set of ioctls was added to set/get video timings at the input and output.”…””}”(hhÙhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K hhÄhžhubhØ)”}”(hXcThese ioctls deal with the detailed digital video timings that define each video format. This includes parameters such as the active video width and height, signal polarities, frontporches, backporches, sync widths etc. The ``linux/v4l2-dv-timings.h`` header can be used to get the timings of the formats in the :ref:`cea861` and :ref:`vesadmt` standards.”h]”(hŒàThese ioctls deal with the detailed digital video timings that define each video format. This includes parameters such as the active video width and height, signal polarities, frontporches, backporches, sync widths etc. The ”…””}”(hjhžhhŸNh NubhŒliteral”“”)”}”(hŒ``linux/v4l2-dv-timings.h``”h]”hŒlinux/v4l2-dv-timings.h”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjubhŒ= header can be used to get the timings of the formats in the ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ :ref:`cea861`”h]”hæ)”}”(hj.h]”hŒcea861”…””}”(hj0hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhj,ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j:Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒcea861”uh1hhŸh³h KhjubhŒ and ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:ref:`vesadmt`”h]”hæ)”}”(hjRh]”hŒvesadmt”…””}”(hjThžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjPubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j^Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒvesadmt”uh1hhŸh³h KhjubhŒ standards.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KhhÄhžhubhØ)”}”(hXëTo enumerate and query the attributes of the DV timings supported by a device applications use the :ref:`VIDIOC_ENUM_DV_TIMINGS` and :ref:`VIDIOC_DV_TIMINGS_CAP` ioctls. To set DV timings for the device applications use the :ref:`VIDIOC_S_DV_TIMINGS ` ioctl and to get current DV timings they use the :ref:`VIDIOC_G_DV_TIMINGS ` ioctl. To detect the DV timings as seen by the video receiver applications use the :ref:`VIDIOC_QUERY_DV_TIMINGS` ioctl.”h]”(hŒcTo enumerate and query the attributes of the DV timings supported by a device applications use the ”…””}”(hjzhžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_ENUM_DV_TIMINGS`”h]”hæ)”}”(hj„h]”hŒVIDIOC_ENUM_DV_TIMINGS”…””}”(hj†hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhj‚ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒvidioc_enum_dv_timings”uh1hhŸh³h KhjzubhŒ and ”…””}”(hjzhžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_DV_TIMINGS_CAP`”h]”hæ)”}”(hj¨h]”hŒVIDIOC_DV_TIMINGS_CAP”…””}”(hjªhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhj¦ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j´Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒvidioc_dv_timings_cap”uh1hhŸh³h KhjzubhŒ? ioctls. To set DV timings for the device applications use the ”…””}”(hjzhžhhŸNh Nubh)”}”(hŒ0:ref:`VIDIOC_S_DV_TIMINGS `”h]”hæ)”}”(hjÌh]”hŒVIDIOC_S_DV_TIMINGS”…””}”(hjÎhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjÊubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jØŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_g_dv_timings”uh1hhŸh³h KhjzubhŒ2 ioctl and to get current DV timings they use the ”…””}”(hjzhžhhŸNh Nubh)”}”(hŒ0:ref:`VIDIOC_G_DV_TIMINGS `”h]”hæ)”}”(hjðh]”hŒVIDIOC_G_DV_TIMINGS”…””}”(hjòhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjîubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jüŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_g_dv_timings”uh1hhŸh³h KhjzubhŒT ioctl. To detect the DV timings as seen by the video receiver applications use the ”…””}”(hjzhžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_QUERY_DV_TIMINGS`”h]”hæ)”}”(hjh]”hŒVIDIOC_QUERY_DV_TIMINGS”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒvidioc_query_dv_timings”uh1hhŸh³h KhjzubhŒ ioctl.”…””}”(hjzhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KhhÄhžhubhØ)”}”(hX>When the hardware detects a video source change (e.g. the video signal appears or disappears, or the video resolution changes), then it will issue a `V4L2_EVENT_SOURCE_CHANGE` event. Use the :ref:`ioctl VIDIOC_SUBSCRIBE_EVENT ` and the :ref:`VIDIOC_DQEVENT` to check if this event was reported.”h]”(hŒ•When the hardware detects a video source change (e.g. the video signal appears or disappears, or the video resolution changes), then it will issue a ”…””}”(hj<hžhhŸNh NubhŒtitle_reference”“”)”}”(hŒ`V4L2_EVENT_SOURCE_CHANGE`”h]”hŒV4L2_EVENT_SOURCE_CHANGE”…””}”(hjFhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhj<ubhŒ event. Use the ”…””}”(hj<hžhhŸNh Nubh)”}”(hŒ<:ref:`ioctl VIDIOC_SUBSCRIBE_EVENT `”h]”hæ)”}”(hjZh]”hŒioctl VIDIOC_SUBSCRIBE_EVENT”…””}”(hj\hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjXubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jfŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_subscribe_event”uh1hhŸh³h K$hj<ubhŒ and the ”…””}”(hj<hžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_DQEVENT`”h]”hæ)”}”(hj~h]”hŒVIDIOC_DQEVENT”…””}”(hj€hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhj|ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jŠŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒvidioc_dqevent”uh1hhŸh³h K$hj<ubhŒ% to check if this event was reported.”…””}”(hj<hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K$hhÄhžhubhØ)”}”(hXÎIf the video signal changed, then the application has to stop streaming, free all buffers, and call the :ref:`VIDIOC_QUERY_DV_TIMINGS` to obtain the new video timings, and if they are valid, it can set those by calling the :ref:`ioctl VIDIOC_S_DV_TIMINGS `. This will also update the format, so use the :ref:`ioctl VIDIOC_G_FMT ` to obtain the new format. Now the application can allocate new buffers and start streaming again.”h]”(hŒhIf the video signal changed, then the application has to stop streaming, free all buffers, and call the ”…””}”(hj¦hžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_QUERY_DV_TIMINGS`”h]”hæ)”}”(hj°h]”hŒVIDIOC_QUERY_DV_TIMINGS”…””}”(hj²hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhj®ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j¼Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒvidioc_query_dv_timings”uh1hhŸh³h K*hj¦ubhŒY to obtain the new video timings, and if they are valid, it can set those by calling the ”…””}”(hj¦hžhhŸNh Nubh)”}”(hŒ6:ref:`ioctl VIDIOC_S_DV_TIMINGS `”h]”hæ)”}”(hjÔh]”hŒioctl VIDIOC_S_DV_TIMINGS”…””}”(hjÖhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjÒubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jàŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒvidioc_g_dv_timings”uh1hhŸh³h K*hj¦ubhŒ/. This will also update the format, so use the ”…””}”(hj¦hžhhŸNh Nubh)”}”(hŒ(:ref:`ioctl VIDIOC_G_FMT `”h]”hæ)”}”(hjøh]”hŒioctl VIDIOC_G_FMT”…””}”(hjúhžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjöubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h K*hj¦ubhŒb to obtain the new format. Now the application can allocate new buffers and start streaming again.”…””}”(hj¦hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K*hhÄhžhubhØ)”}”(hXwThe :ref:`VIDIOC_QUERY_DV_TIMINGS` will just report what the hardware detects, it will never change the configuration. If the currently set timings and the actually detected timings differ, then typically this will mean that you will not be able to capture any video. The correct approach is to rely on the `V4L2_EVENT_SOURCE_CHANGE` event so you know when something changed.”h]”(hŒThe ”…””}”(hj hžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_QUERY_DV_TIMINGS`”h]”hæ)”}”(hj*h]”hŒVIDIOC_QUERY_DV_TIMINGS”…””}”(hj,hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhj(ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j6Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒvidioc_query_dv_timings”uh1hhŸh³h K2hj ubhX will just report what the hardware detects, it will never change the configuration. If the currently set timings and the actually detected timings differ, then typically this will mean that you will not be able to capture any video. The correct approach is to rely on the ”…””}”(hj hžhhŸNh NubjE)”}”(hŒ`V4L2_EVENT_SOURCE_CHANGE`”h]”hŒV4L2_EVENT_SOURCE_CHANGE”…””}”(hjLhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jDhj ubhŒ* event so you know when something changed.”…””}”(hj hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K2hhÄhžhubhØ)”}”(hŒ¹Applications can make use of the :ref:`input-capabilities` and :ref:`output-capabilities` flags to determine whether the digital video ioctls can be used with the given input or output.”h]”(hŒ!Applications can make use of the ”…””}”(hjdhžhhŸNh Nubh)”}”(hŒ:ref:`input-capabilities`”h]”hæ)”}”(hjnh]”hŒinput-capabilities”…””}”(hjphžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjlubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jzŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒinput-capabilities”uh1hhŸh³h K9hjdubhŒ and ”…””}”(hjdhžhhŸNh Nubh)”}”(hŒ:ref:`output-capabilities`”h]”hæ)”}”(hj’h]”hŒoutput-capabilities”…””}”(hj”hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1håhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”jžŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒoutput-capabilities”uh1hhŸh³h K9hjdubhŒ` flags to determine whether the digital video ioctls can be used with the given input or output.”…””}”(hjdhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K9hhÄhžhubeh}”(h]”(Œdigital-video-dv-timings”hÁeh ]”h"]”(Œdigital video (dv) timings”Œ dv-timings”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¼uŒ nametypes”}”(jÀˆj¿‰uh}”(hÁhÄj¼hÄuŒ 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Œ0Hyperlink target "dv-timings" is not referenced.”…””}”hjTsbah}”(h]”h ]”h"]”h$]”h&]”uh1h×hjQubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h³Œline”Kuh1jOubaŒ transformer”NŒ include_log”]”Œ decoration”Nhžhub.