diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-11 13:22:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-11 13:22:22 -0700 |
commit | de34f4da7f62ff59ac6e1ef320b0fcfa3296fce3 (patch) | |
tree | 88b5db2fc7fbbb0353edd8447a832a5225a49d01 /Documentation | |
parent | 56e520c7a0a490b63b042b047ec9659fc08762a4 (diff) | |
parent | 9fce0c226536fc36c7fb0a80000ca38a995be43e (diff) |
Merge tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- Documentation improvements: conversion of all non-DocBook documents
to Sphinx and lots of fixes to the uAPI media book
- New PCI driver for Techwell TW5864 media grabber boards
- New SoC driver for ATMEL Image Sensor Controller
- Removal of some obsolete SoC drivers (s5p-tv driver and soc_camera
drivers)
- Addition of ST CEC driver
- Lots of drivers fixes, improvements and additions
* tag 'media/v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (464 commits)
[media] ttusb_dec: avoid the risk of go past buffer
[media] cx23885: Fix some smatch warnings
[media] si2165: switch to regmap
[media] si2165: use i2c_client->dev instead of i2c_adapter->dev for logging
[media] si2165: Remove legacy attach
[media] cx231xx: attach si2165 driver via i2c_client
[media] cx231xx: Prepare for attaching new style i2c_client DVB demod drivers
[media] cx23885: attach si2165 driver via i2c_client
[media] si2165: support i2c_client attach
[media] si2165: avoid division by zero
[media] rcar-vin: add R-Car gen2 fallback compatibility string
[media] lgdt3306a: remove 20*50 msec unnecessary timeout
[media] cx25821: Remove deprecated create_singlethread_workqueue
[media] cx25821: Drop Freeing of Workqueue
[media] cxd2841er: force 8MHz bandwidth for DVB-C if specified bw not supported
[media] redrat3: hardware-specific parameters
[media] redrat3: remove hw_timeout member
[media] cxd2841er: BER and SNR reading for ISDB-T
[media] dvb-usb: avoid link error with dib3000m{b,c|
[media] dvb-usb: split out common parts of dibusb
...
Diffstat (limited to 'Documentation')
369 files changed, 19456 insertions, 33510 deletions
diff --git a/Documentation/conf.py b/Documentation/conf.py index 0cc8765d3f98..bf6f310e5170 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -342,6 +342,8 @@ latex_documents = [ 'The kernel development community', 'manual'), ('gpu/index', 'gpu.tex', 'Linux GPU Driver Developer\'s Guide', 'The kernel development community', 'manual'), + ('media/index', 'media.tex', 'Linux Media Subsystem Documentation', + 'The kernel development community', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/Documentation/devicetree/bindings/media/atmel-isc.txt b/Documentation/devicetree/bindings/media/atmel-isc.txt new file mode 100644 index 000000000000..bbe0e87c6188 --- /dev/null +++ b/Documentation/devicetree/bindings/media/atmel-isc.txt @@ -0,0 +1,65 @@ +Atmel Image Sensor Controller (ISC) +---------------------------------------------- + +Required properties for ISC: +- compatible + Must be "atmel,sama5d2-isc". +- reg + Physical base address and length of the registers set for the device. +- interrupts + Should contain IRQ line for the ISC. +- clocks + List of clock specifiers, corresponding to entries in + the clock-names property; + Please refer to clock-bindings.txt. +- clock-names + Required elements: "hclock", "iscck", "gck". +- #clock-cells + Should be 0. +- clock-output-names + Should be "isc-mck". +- pinctrl-names, pinctrl-0 + Please refer to pinctrl-bindings.txt. + +ISC supports a single port node with parallel bus. It should contain one +'port' child node with child 'endpoint' node. Please refer to the bindings +defined in Documentation/devicetree/bindings/media/video-interfaces.txt. + +Example: +isc: isc@f0008000 { + compatible = "atmel,sama5d2-isc"; + reg = <0xf0008000 0x4000>; + interrupts = <46 IRQ_TYPE_LEVEL_HIGH 5>; + clocks = <&isc_clk>, <&iscck>, <&isc_gclk>; + clock-names = "hclock", "iscck", "gck"; + #clock-cells = <0>; + clock-output-names = "isc-mck"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_isc_base &pinctrl_isc_data_8bit &pinctrl_isc_data_9_10 &pinctrl_isc_data_11_12>; + + port { + isc_0: endpoint { + remote-endpoint = <&ov7740_0>; + hsync-active = <1>; + vsync-active = <0>; + pclk-sample = <1>; + }; + }; +}; + +i2c1: i2c@fc028000 { + ov7740: camera@21 { + compatible = "ovti,ov7740"; + reg = <0x21>; + clocks = <&isc>; + clock-names = "xvclk"; + assigned-clocks = <&isc>; + assigned-clock-rates = <24000000>; + + port { + ov7740_0: endpoint { + remote-endpoint = <&isc_0>; + }; + }; + }; +}; diff --git a/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt b/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt index 55c9ad6f9599..32ced99d4244 100644 --- a/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt +++ b/Documentation/devicetree/bindings/media/exynos4-fimc-is.txt @@ -16,9 +16,10 @@ Required properties: - clocks : list of clock specifiers, corresponding to entries in clock-names property; - clock-names : must contain "ppmuispx", "ppmuispx", "lite0", "lite1" - "mpll", "sysreg", "isp", "drc", "fd", "mcuisp", "uart", - "ispdiv0", "ispdiv1", "mcuispdiv0", "mcuispdiv1", "aclk200", - "div_aclk200", "aclk400mcuisp", "div_aclk400mcuisp" entries, + "mpll", "sysreg", "isp", "drc", "fd", "mcuisp", "gicisp", + "pwm_isp", "mcuctl_isp", "uart", "ispdiv0", "ispdiv1", + "mcuispdiv0", "mcuispdiv1", "aclk200", "div_aclk200", + "aclk400mcuisp", "div_aclk400mcuisp" entries, matching entries in the clocks property. pmu subnode ----------- diff --git a/Documentation/devicetree/bindings/media/i2c/ad5820.txt b/Documentation/devicetree/bindings/media/i2c/ad5820.txt new file mode 100644 index 000000000000..5940ca11c021 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ad5820.txt @@ -0,0 +1,19 @@ +* Analog Devices AD5820 autofocus coil + +Required Properties: + + - compatible: Must contain "adi,ad5820" + + - reg: I2C slave address + + - VANA-supply: supply of voltage for VANA pin + +Example: + + ad5820: coil@c { + compatible = "adi,ad5820"; + reg = <0x0c>; + + VANA-supply = <&vaux4>; + }; + diff --git a/Documentation/devicetree/bindings/media/i2c/adv7180.txt b/Documentation/devicetree/bindings/media/i2c/adv7180.txt index 0d501154dfb2..4da486f96ff6 100644 --- a/Documentation/devicetree/bindings/media/i2c/adv7180.txt +++ b/Documentation/devicetree/bindings/media/i2c/adv7180.txt @@ -15,6 +15,11 @@ Required Properties : "adi,adv7282" "adi,adv7282-m" +Optional Properties : +- powerdown-gpios: reference to the GPIO connected to the powerdown pin, + if any. + + Example: i2c0@1c22000 { diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt b/Documentation/devicetree/bindings/media/renesas,fcp.txt index 6a12960609d8..27f9b8e459ac 100644 --- a/Documentation/devicetree/bindings/media/renesas,fcp.txt +++ b/Documentation/devicetree/bindings/media/renesas,fcp.txt @@ -7,12 +7,14 @@ conversion of AXI transactions in order to reduce the memory bandwidth. There are three types of FCP: FCP for Codec (FCPC), FCP for VSP (FCPV) and FCP for FDP (FCPF). Their configuration and behaviour depend on the module they -are paired with. These DT bindings currently support the FCPV only. +are paired with. These DT bindings currently support the FCPV and FCPF. - compatible: Must be one or more of the following - "renesas,r8a7795-fcpv" for R8A7795 (R-Car H3) compatible 'FCP for VSP' + - "renesas,r8a7795-fcpf" for R8A7795 (R-Car H3) compatible 'FCP for FDP' - "renesas,fcpv" for generic compatible 'FCP for VSP' + - "renesas,fcpf" for generic compatible 'FCP for FDP' When compatible with the generic version, nodes must list the SoC-specific version corresponding to the platform first, followed by the @@ -21,6 +23,10 @@ are paired with. These DT bindings currently support the FCPV only. - reg: the register base and size for the device registers - clocks: Reference to the functional clock +Optional properties: + - power-domains : power-domain property defined with a power domain specifier + to respective power domain. + Device node example ------------------- @@ -29,4 +35,5 @@ Device node example compatible = "renesas,r8a7795-fcpv", "renesas,fcpv"; reg = <0 0xfea2f000 0 0x200>; clocks = <&cpg CPG_MOD 602>; + power-domains = <&sysc R8A7795_PD_A3VP>; }; diff --git a/Documentation/devicetree/bindings/media/st,st-hva.txt b/Documentation/devicetree/bindings/media/st,st-hva.txt new file mode 100644 index 000000000000..0d76174a1f7e --- /dev/null +++ b/Documentation/devicetree/bindings/media/st,st-hva.txt @@ -0,0 +1,24 @@ +st-hva: multi-format video encoder for STMicroelectronics SoC. + +Required properties: +- compatible: should be "st,st-hva". +- reg: HVA physical address location and length, esram address location and + length. +- reg-names: names of the registers listed in registers property in the same + order. +- interrupts: HVA interrupt number. +- clocks: from common clock binding: handle hardware IP needed clocks, the + number of clocks may depend on the SoC type. + See ../clock/clock-bindings.txt for details. +- clock-names: names of the clocks listed in clocks property in the same order. + +Example: + hva@8c85000{ + compatible = "st,st-hva"; + reg = <0x8c85000 0x400>, <0x6000000 0x40000>; + reg-names = "hva_registers", "hva_esram"; + interrupts = <GIC_SPI 58 IRQ_TYPE_NONE>, + <GIC_SPI 59 IRQ_TYPE_NONE>; + clock-names = "clk_hva"; + clocks = <&clk_s_c0_flexgen CLK_HVA>; + }; diff --git a/Documentation/devicetree/bindings/media/stih-cec.txt b/Documentation/devicetree/bindings/media/stih-cec.txt new file mode 100644 index 000000000000..71c4b2f4bcef --- /dev/null +++ b/Documentation/devicetree/bindings/media/stih-cec.txt @@ -0,0 +1,25 @@ +STMicroelectronics STIH4xx HDMI CEC driver + +Required properties: + - compatible : value should be "st,stih-cec" + - reg : Physical base address of the IP registers and length of memory + mapped region. + - clocks : from common clock binding: handle to HDMI CEC clock + - interrupts : HDMI CEC interrupt number to the CPU. + - pinctrl-names: Contains only one value - "default" + - pinctrl-0: Specifies the pin control groups used for CEC hardware. + - resets: Reference to a reset controller + +Example for STIH407: + +sti-cec@094a087c { + compatible = "st,stih-cec"; + reg = <0x94a087c 0x64>; + clocks = <&clk_sysin>; + clock-names = "cec-clk"; + interrupts = <GIC_SPI 140 IRQ_TYPE_NONE>; + interrupt-names = "cec-irq"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_cec0_default>; + resets = <&softreset STIH407_LPM_SOFTRESET>; +}; diff --git a/Documentation/media/audio.h.rst.exceptions b/Documentation/media/audio.h.rst.exceptions index 8330edcd906d..f40f3cbfe4c9 100644 --- a/Documentation/media/audio.h.rst.exceptions +++ b/Documentation/media/audio.h.rst.exceptions @@ -2,7 +2,7 @@ ignore define _DVBAUDIO_H_ # Typedef pointing to structs -replace typedef audio_karaoke_t audio-karaoke +replace typedef audio_karaoke_t :c:type:`audio_karaoke` # Undocumented audio caps, as this is a deprecated API anyway ignore define AUDIO_CAP_DTS @@ -16,5 +16,5 @@ ignore define AUDIO_CAP_SDDS ignore define AUDIO_CAP_AC3 # some typedefs should point to struct/enums -replace typedef audio_mixer_t audio-mixer -replace typedef audio_status_t audio-status +replace typedef audio_mixer_t :c:type:`audio_mixer` +replace typedef audio_status_t :c:type:`audio_status` diff --git a/Documentation/media/ca.h.rst.exceptions b/Documentation/media/ca.h.rst.exceptions index 09c13be67527..d7c9fed8c004 100644 --- a/Documentation/media/ca.h.rst.exceptions +++ b/Documentation/media/ca.h.rst.exceptions @@ -2,23 +2,23 @@ ignore define _DVBCA_H_ # struct ca_slot_info defines -replace define CA_CI ca-slot-info -replace define CA_CI_LINK ca-slot-info -replace define CA_CI_PHYS ca-slot-info -replace define CA_DESCR ca-slot-info -replace define CA_SC ca-slot-info -replace define CA_CI_MODULE_PRESENT ca-slot-info -replace define CA_CI_MODULE_READY ca-slot-info +replace define CA_CI :c:type:`ca_slot_info` +replace define CA_CI_LINK :c:type:`ca_slot_info` +replace define CA_CI_PHYS :c:type:`ca_slot_info` +replace define CA_DESCR :c:type:`ca_slot_info` +replace define CA_SC :c:type:`ca_slot_info` +replace define CA_CI_MODULE_PRESENT :c:type:`ca_slot_info` +replace define CA_CI_MODULE_READY :c:type:`ca_slot_info` # struct ca_descr_info defines -replace define CA_ECD ca-descr-info -replace define CA_NDS ca-descr-info -replace define CA_DSS ca-descr-info +replace define CA_ECD :c:type:`ca_descr_info` +replace define CA_NDS :c:type:`ca_descr_info` +replace define CA_DSS :c:type:`ca_descr_info` # some typedefs should point to struct/enums -replace typedef ca_pid_t ca-pid -replace typedef ca_slot_info_t ca-slot-info -replace typedef ca_descr_info_t ca-descr-info -replace typedef ca_caps_t ca-caps -replace typedef ca_msg_t ca-msg -replace typedef ca_descr_t ca-descr +replace typedef ca_pid_t :c:type:`ca_pid` +replace typedef ca_slot_info_t :c:type:`ca_slot_info` +replace typedef ca_descr_info_t :c:type:`ca_descr_info` +replace typedef ca_caps_t :c:type:`ca_caps` +replace typedef ca_msg_t :c:type:`ca_msg` +replace typedef ca_descr_t :c:type:`ca_descr` diff --git a/Documentation/media/cec.h.rst.exceptions b/Documentation/media/cec.h.rst.exceptions index b79339433718..b1687532742f 100644 --- a/Documentation/media/cec.h.rst.exceptions +++ b/Documentation/media/cec.h.rst.exceptions @@ -1,12 +1,6 @@ # Ignore header name ignore define _CEC_UAPI_H -# Rename some symbols, to avoid namespace conflicts -replace struct cec_event_state_change cec-event-state-change_s -replace struct cec_event_lost_msgs cec-event-lost-msgs_s -replace enum cec_mode_initiator cec-mode-initiator_e -replace enum cec_mode_follower cec-mode-follower_e - # define macros to ignore ignore define CEC_MAX_MSG_SIZE diff --git a/Documentation/media/conf_nitpick.py b/Documentation/media/conf_nitpick.py index 11beac2e68fb..480d548af670 100644 --- a/Documentation/media/conf_nitpick.py +++ b/Documentation/media/conf_nitpick.py @@ -21,10 +21,14 @@ nitpick_ignore = [ ("c:func", "clock_gettime"), ("c:func", "close"), ("c:func", "container_of"), + ("c:func", "copy_from_user"), + ("c:func", "copy_to_user"), ("c:func", "determine_valid_ioctls"), ("c:func", "ERR_PTR"), + ("c:func", "i2c_new_device"), ("c:func", "ioctl"), ("c:func", "IS_ERR"), + ("c:func", "KERNEL_VERSION"), ("c:func", "mmap"), ("c:func", "open"), ("c:func", "pci_name"), @@ -36,58 +40,70 @@ nitpick_ignore = [ ("c:func", "struct fd_set"), ("c:func", "struct pollfd"), ("c:func", "usb_make_path"), + ("c:func", "wait_finish"), + ("c:func", "wait_prepare"), ("c:func", "write"), + ("c:type", "atomic_t"), ("c:type", "bool"), + ("c:type", "boolean"), ("c:type", "buf_queue"), ("c:type", "device"), ("c:type", "device_driver"), ("c:type", "device_node"), ("c:type", "enum"), + ("c:type", "fd"), + ("c:type", "fd_set"), ("c:type", "file"), ("c:type", "i2c_adapter"), ("c:type", "i2c_board_info"), ("c:type", "i2c_client"), + ("c:type", "int16_t"), ("c:type", "ktime_t"), ("c:type", "led_classdev_flash"), ("c:type", "list_head"), ("c:type", "lock_class_key"), ("c:type", "module"), ("c:type", "mutex"), + ("c:type", "NULL"), + ("c:type", "off_t"), ("c:type", "pci_dev"), ("c:type", "pdvbdev"), + ("c:type", "poll_table"), + ("c:type", "platform_device"), + ("c:type", "pollfd"), ("c:type", "poll_table_struct"), ("c:type", "s32"), ("c:type", "s64"), ("c:type", "sd"), + ("c:type", "size_t"), ("c:type", "spi_board_info"), ("c:type", "spi_device"), ("c:type", "spi_master"), - ("c:type", "struct fb_fix_screeninfo"), - ("c:type", "struct pollfd"), - ("c:type", "struct timeval"), - ("c:type", "struct video_capability"), + ("c:type", "ssize_t"), + ("c:type", "fb_fix_screeninfo"), + ("c:type", "pollfd"), + ("c:type", "timeval"), + ("c:type", "video_capability"), + ("c:type", "timeval"), + ("c:type", "__u16"), ("c:type", "u16"), + ("c:type", "__u32"), ("c:type", "u32"), + ("c:type", "__u64"), ("c:type", "u64"), ("c:type", "u8"), + ("c:type", "uint16_t"), + ("c:type", "uint32_t"), ("c:type", "union"), + ("c:type", "__user"), ("c:type", "usb_device"), + ("c:type", "usb_interface"), + ("c:type", "v4l2_std_id"), + ("c:type", "video_system_t"), + ("c:type", "vm_area_struct"), + + # Opaque structures - ("cpp:type", "boolean"), - ("cpp:type", "fd"), - ("cpp:type", "fd_set"), - ("cpp:type", "int16_t"), - ("cpp:type", "NULL"), - ("cpp:type", "off_t"), - ("cpp:type", "pollfd"), - ("cpp:type", "size_t"), - ("cpp:type", "ssize_t"), - ("cpp:type", "timeval"), - ("cpp:type", "__u16"), - ("cpp:type", "__u32"), - ("cpp:type", "__u64"), - ("cpp:type", "uint16_t"), - ("cpp:type", "uint32_t"), - ("cpp:type", "video_system_t"), + ("c:type", "v4l2_m2m_dev"), ] diff --git a/Documentation/media/dmx.h.rst.exceptions b/Documentation/media/dmx.h.rst.exceptions index 8200653839d2..2fdb458564ba 100644 --- a/Documentation/media/dmx.h.rst.exceptions +++ b/Documentation/media/dmx.h.rst.exceptions @@ -4,29 +4,29 @@ ignore define _UAPI_DVBDMX_H_ # Ignore limit constants ignore define DMX_FILTER_SIZE -# dmx-pes-type-t enum symbols -replace enum dmx_ts_pes dmx-pes-type-t -replace symbol DMX_PES_AUDIO0 dmx-pes-type-t -replace symbol DMX_PES_VIDEO0 dmx-pes-type-t -replace symbol DMX_PES_TELETEXT0 dmx-pes-type-t -replace symbol DMX_PES_SUBTITLE0 dmx-pes-type-t -replace symbol DMX_PES_PCR0 dmx-pes-type-t -replace symbol DMX_PES_AUDIO1 dmx-pes-type-t -replace symbol DMX_PES_VIDEO1 dmx-pes-type-t -replace symbol DMX_PES_TELETEXT1 dmx-pes-type-t -replace symbol DMX_PES_SUBTITLE1 dmx-pes-type-t -replace symbol DMX_PES_PCR1 dmx-pes-type-t -replace symbol DMX_PES_AUDIO2 dmx-pes-type-t -replace symbol DMX_PES_VIDEO2 dmx-pes-type-t -replace symbol DMX_PES_TELETEXT2 dmx-pes-type-t -replace symbol DMX_PES_SUBTITLE2 dmx-pes-type-t -replace symbol DMX_PES_PCR2 dmx-pes-type-t -replace symbol DMX_PES_AUDIO3 dmx-pes-type-t -replace symbol DMX_PES_VIDEO3 dmx-pes-type-t -replace symbol DMX_PES_TELETEXT3 dmx-pes-type-t -replace symbol DMX_PES_SUBTITLE3 dmx-pes-type-t -replace symbol DMX_PES_PCR3 dmx-pes-type-t -replace symbol DMX_PES_OTHER dmx-pes-type-t +# dmx_pes_type_t enum symbols +replace enum dmx_ts_pes :c:type:`dmx_pes_type` +replace symbol DMX_PES_AUDIO0 :c:type:`dmx_pes_type` +replace symbol DMX_PES_VIDEO0 :c:type:`dmx_pes_type` +replace symbol DMX_PES_TELETEXT0 :c:type:`dmx_pes_type` +replace symbol DMX_PES_SUBTITLE0 :c:type:`dmx_pes_type` +replace symbol DMX_PES_PCR0 :c:type:`dmx_pes_type` +replace symbol DMX_PES_AUDIO1 :c:type:`dmx_pes_type` +replace symbol DMX_PES_VIDEO1 :c:type:`dmx_pes_type` +replace symbol DMX_PES_TELETEXT1 :c:type:`dmx_pes_type` +replace symbol DMX_PES_SUBTITLE1 :c:type:`dmx_pes_type` +replace symbol DMX_PES_PCR1 :c:type:`dmx_pes_type` +replace symbol DMX_PES_AUDIO2 :c:type:`dmx_pes_type` +replace symbol DMX_PES_VIDEO2 :c:type:`dmx_pes_type` +replace symbol DMX_PES_TELETEXT2 :c:type:`dmx_pes_type` +replace symbol DMX_PES_SUBTITLE2 :c:type:`dmx_pes_type` +replace symbol DMX_PES_PCR2 :c:type:`dmx_pes_type` +replace symbol DMX_PES_AUDIO3 :c:type:`dmx_pes_type` +replace symbol DMX_PES_VIDEO3 :c:type:`dmx_pes_type` +replace symbol DMX_PES_TELETEXT3 :c:type:`dmx_pes_type` +replace symbol DMX_PES_SUBTITLE3 :c:type:`dmx_pes_type` +replace symbol DMX_PES_PCR3 :c:type:`dmx_pes_type` +replace symbol DMX_PES_OTHER :c:type:`dmx_pes_type` # Ignore obsolete symbols ignore define DMX_PES_AUDIO @@ -36,28 +36,31 @@ ignore define DMX_PES_SUBTITLE ignore define DMX_PES_PCR # dmx_input_t symbols -replace enum dmx_input dmx-input-t -replace symbol DMX_IN_FRONTEND dmx-input-t -replace symbol DMX_IN_DVR dmx-input-t +replace enum dmx_input :c:type:`dmx_input` +replace symbol DMX_IN_FRONTEND :c:type:`dmx_input` +replace symbol DMX_IN_DVR :c:type:`dmx_input` # dmx_source_t symbols -replace enum dmx_source dmx-source-t -replace symbol DMX_SOURCE_FRONT0 dmx-source-t -replace symbol DMX_SOURCE_FRONT1 dmx-source-t -replace symbol DMX_SOURCE_FRONT2 dmx-source-t -replace symbol DMX_SOURCE_FRONT3 dmx-source-t -replace symbol DMX_SOURCE_DVR0 dmx-source-t -replace symbol DMX_SOURCE_DVR1 dmx-source-t -replace symbol DMX_SOURCE_DVR2 dmx-source-t -replace symbol DMX_SOURCE_DVR3 dmx-source-t +replace enum dmx_source :c:type:`dmx_source` +replace symbol DMX_SOURCE_FRONT0 :c:type:`dmx_source` +replace symbol DMX_SOURCE_FRONT1 :c:type:`dmx_source` +replace symbol DMX_SOURCE_FRONT2 :c:type:`dmx_source` +replace symbol DMX_SOURCE_FRONT3 :c:type:`dmx_source` +replace symbol DMX_SOURCE_DVR0 :c:type:`dmx_source` +replace symbol DMX_SOURCE_DVR1 :c:type:`dmx_source` +replace symbol DMX_SOURCE_DVR2 :c:type:`dmx_source` +replace symbol DMX_SOURCE_DVR3 :c:type:`dmx_source` # Flags for struct dmx_sct_filter_params -replace define DMX_CHECK_CRC dmx-sct-filter-params -replace define DMX_ONESHOT dmx-sct-filter-params -replace define DMX_IMMEDIATE_START dmx-sct-filter-params -replace define DMX_KERNEL_CLIENT dmx-sct-filter-params +replace define DMX_CHECK_CRC :c:type:`dmx_sct_filter_params` +replace define DMX_ONESHOT :c:type:`dmx_sct_filter_params` +replace define DMX_IMMEDIATE_START :c:type:`dmx_sct_filter_params` +replace define DMX_KERNEL_CLIENT :c:type:`dmx_sct_filter_params` # some typedefs should point to struct/enums -replace typedef dmx_caps_t dmx-caps -replace typedef dmx_filter_t dmx-filter +replace typedef dmx_caps_t :c:type:`dmx_caps` +replace typedef dmx_filter_t :c:type:`dmx_filter` +replace typedef dmx_pes_type_t :c:type:`dmx_pes_type` +replace typedef dmx_input_t :c:type:`dmx_input` +replace typedef dmx_source_t :c:type:`dmx_source` diff --git a/Documentation/media/frontend.h.rst.exceptions b/Documentation/media/frontend.h.rst.exceptions index 60f2cbb92656..7656770f1936 100644 --- a/Documentation/media/frontend.h.rst.exceptions +++ b/Documentation/media/frontend.h.rst.exceptions @@ -26,22 +26,22 @@ ignore define MAX_DTV_STATS ignore define DTV_IOCTL_MAX_MSGS # Stats enum is documented altogether -replace enum fecap_scale_params frontend-stat-properties +replace enum fecap_scale_params :ref:`frontend-stat-properties` replace symbol FE_SCALE_COUNTER frontend-stat-properties replace symbol FE_SCALE_DECIBEL frontend-stat-properties replace symbol FE_SCALE_NOT_AVAILABLE frontend-stat-properties replace symbol FE_SCALE_RELATIVE frontend-stat-properties # the same reference is used for both get and set ioctls -replace ioctl FE_SET_PROPERTY FE_GET_PROPERTY +replace ioctl FE_SET_PROPERTY :c:type:`FE_GET_PROPERTY` # Ignore struct used only internally at Kernel ignore struct dtv_cmds_h # Typedefs that use the enum reference -replace typedef fe_sec_voltage_t fe-sec-voltage +replace typedef fe_sec_voltage_t :c:type:`fe_sec_voltage` # Replaces for flag constants -replace define FE_TUNE_MODE_ONESHOT fe_set_frontend_tune_mode +replace define FE_TUNE_MODE_ONESHOT :c:func:`FE_SET_FRONTEND_TUNE_MODE` replace define LNA_AUTO dtv-lna replace define NO_STREAM_ID_FILTER dtv-stream-id diff --git a/Documentation/media/index.rst b/Documentation/media/index.rst index 7f8f0af620ce..e347a3e7bdef 100644 --- a/Documentation/media/index.rst +++ b/Documentation/media/index.rst @@ -1,6 +1,11 @@ Linux Media Subsystem Documentation =================================== +.. Sphinx 1.4.x has a definition for DUrole that doesn't work on alltt blocks +.. raw:: latex + + \renewcommand*{\DUrole}[2]{ #2 } + Contents: .. toctree:: diff --git a/Documentation/media/intro.rst b/Documentation/media/intro.rst index be90bda5b3f3..f6086c159772 100644 --- a/Documentation/media/intro.rst +++ b/Documentation/media/intro.rst @@ -30,7 +30,7 @@ divided into five parts. called as DVB API, in fact it covers several different video standards including DVB-T/T2, DVB-S/S2, DVB-C, ATSC, ISDB-T, ISDB-S, DTMB, etc. The complete list of supported standards can be found at - :ref:`fe-delivery-system-t`. + :c:type:`fe_delivery_system`. 3. The :ref:`third part <remote_controllers>` covers the Remote Controller API. diff --git a/Documentation/cec.txt b/Documentation/media/kapi/cec-core.rst index 75155fe37153..88c33b53ec13 100644 --- a/Documentation/cec.txt +++ b/Documentation/media/kapi/cec-core.rst @@ -36,39 +36,50 @@ CEC Adapter The struct cec_adapter represents the CEC adapter hardware. It is created by calling cec_allocate_adapter() and deleted by calling cec_delete_adapter(): -struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, +.. c:function:: + struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, void *priv, const char *name, u32 caps, u8 available_las, struct device *parent); -void cec_delete_adapter(struct cec_adapter *adap); + +.. c:function:: + void cec_delete_adapter(struct cec_adapter *adap); To create an adapter you need to pass the following information: -ops: adapter operations which are called by the CEC framework and that you -have to implement. +ops: + adapter operations which are called by the CEC framework and that you + have to implement. -priv: will be stored in adap->priv and can be used by the adapter ops. +priv: + will be stored in adap->priv and can be used by the adapter ops. -name: the name of the CEC adapter. Note: this name will be copied. +name: + the name of the CEC adapter. Note: this name will be copied. -caps: capabilities of the CEC adapter. These capabilities determine the +caps: + capabilities of the CEC adapter. These capabilities determine the capabilities of the hardware and which parts are to be handled by userspace and which parts are handled by kernelspace. The capabilities are returned by CEC_ADAP_G_CAPS. -available_las: the number of simultaneous logical addresses that this +available_las: + the number of simultaneous logical addresses that this adapter can handle. Must be 1 <= available_las <= CEC_MAX_LOG_ADDRS. -parent: the parent device. +parent: + the parent device. To register the /dev/cecX device node and the remote control device (if CEC_CAP_RC is set) you call: -int cec_register_adapter(struct cec_adapter *adap); +.. c:function:: + int cec_register_adapter(struct cec_adapter \*adap); To unregister the devices call: -void cec_unregister_adapter(struct cec_adapter *adap); +.. c:function:: + void cec_unregister_adapter(struct cec_adapter \*adap); Note: if cec_register_adapter() fails, then call cec_delete_adapter() to clean up. But if cec_register_adapter() succeeded, then only call @@ -83,18 +94,23 @@ Implementing the Low-Level CEC Adapter The following low-level adapter operations have to be implemented in your driver: -struct cec_adap_ops { - /* Low-level callbacks */ - int (*adap_enable)(struct cec_adapter *adap, bool enable); - int (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable); - int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr); - int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, - u32 signal_free_time, struct cec_msg *msg); - void (*adap_log_status)(struct cec_adapter *adap); +.. c:type:: struct cec_adap_ops + +.. code-block:: none + + struct cec_adap_ops + { + /* Low-level callbacks */ + int (*adap_enable)(struct cec_adapter *adap, bool enable); + int (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable); + int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr); + int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, + u32 signal_free_time, struct cec_msg *msg); + void (\*adap_log_status)(struct cec_adapter *adap); - /* High-level callbacks */ - ... -}; + /* High-level callbacks */ + ... + }; The three low-level ops deal with various aspects of controlling the CEC adapter hardware: @@ -102,6 +118,7 @@ hardware: To enable/disable the hardware: +.. c:function:: int (*adap_enable)(struct cec_adapter *adap, bool enable); This callback enables or disables the CEC hardware. Enabling the CEC hardware @@ -115,6 +132,7 @@ Note that adap_enable must return 0 if enable is false. To enable/disable the 'monitor all' mode: +.. c:function:: int (*adap_monitor_all_enable)(struct cec_adapter *adap, bool enable); If enabled, then the adapter should be put in a mode to also monitor messages @@ -127,6 +145,7 @@ Note that adap_monitor_all_enable must return 0 if enable is false. To program a new logical address: +.. c:function:: int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr); If logical_addr == CEC_LOG_ADDR_INVALID then all programmed logical addresses @@ -140,6 +159,7 @@ Note that adap_log_addr must return 0 if logical_addr is CEC_LOG_ADDR_INVALID. To transmit a new message: +.. c:function:: int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, u32 signal_free_time, struct cec_msg *msg); @@ -158,6 +178,7 @@ microseconds (one data bit period is 2.4 ms). To log the current CEC hardware status: +.. c:function:: void (*adap_status)(struct cec_adapter *adap, struct seq_file *file); This optional callback can be used to show the status of the CEC hardware. @@ -169,29 +190,41 @@ driven) by calling into the framework in the following situations: When a transmit finished (successfully or otherwise): -void cec_transmit_done(struct cec_adapter *adap, u8 status, u8 arb_lost_cnt, +.. c:function:: + void cec_transmit_done(struct cec_adapter *adap, u8 status, u8 arb_lost_cnt, u8 nack_cnt, u8 low_drive_cnt, u8 error_cnt); The status can be one of: -CEC_TX_STATUS_OK: the transmit was successful. -CEC_TX_STATUS_ARB_LOST: arbitration was lost: another CEC initiator -took control of the CEC line and you lost the arbitration. -CEC_TX_STATUS_NACK: the message was nacked (for a directed message) or -acked (for a broadcast message). A retransmission is needed. -CEC_TX_STATUS_LOW_DRIVE: low drive was detected on the CEC bus. This -indicates that a follower detected an error on the bus and requested a -retransmission. -CEC_TX_STATUS_ERROR: some unspecified error occurred: this can be one of -the previous two if the hardware cannot differentiate or something else -entirely. -CEC_TX_STATUS_MAX_RETRIES: could not transmit the message after -trying multiple times. Should only be set by the driver if it has hardware -support for retrying messages. If set, then the framework assumes that it -doesn't have to make another attempt to transmit the message since the -hardware did that already. - -The *_cnt arguments are the number of error conditions that were seen. +CEC_TX_STATUS_OK: + the transmit was successful. + +CEC_TX_STATUS_ARB_LOST: + arbitration was lost: another CEC initiator + took control of the CEC line and you lost the arbitration. + +CEC_TX_STATUS_NACK: + the message was nacked (for a directed message) or + acked (for a broadcast message). A retransmission is needed. + +CEC_TX_STATUS_LOW_DRIVE: + low drive was detected on the CEC bus. This indicates that + a follower detected an error on the bus and requested a + retransmission. + +CEC_TX_STATUS_ERROR: + some unspecified error occurred: this can be one of + the previous two if the hardware cannot differentiate or something + else entirely. + +CEC_TX_STATUS_MAX_RETRIES: + could not transmit the message after trying multiple times. + Should only be set by the driver if it has hardware support for + retrying messages. If set, then the framework assumes that it + doesn't have to make another attempt to transmit the message + since the hardware did that already. + +The \*_cnt arguments are the number of error conditions that were seen. This may be 0 if no information is available. Drivers that do not support hardware retry can just set the counter corresponding to the transmit error to 1, if the hardware does support retry then either set these counters to @@ -200,7 +233,8 @@ times, or fill in the correct values as reported by the hardware. When a CEC message was received: -void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg); +.. c:function:: + void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg); Speaks for itself. @@ -210,17 +244,20 @@ Implementing the High-Level CEC Adapter The low-level operations drive the hardware, the high-level operations are CEC protocol driven. The following high-level callbacks are available: -struct cec_adap_ops { - /* Low-level callbacks */ - ... +.. code-block:: none - /* High-level CEC message callback */ - int (*received)(struct cec_adapter *adap, struct cec_msg *msg); -}; + struct cec_adap_ops { + /\* Low-level callbacks \*/ + ... + + /\* High-level CEC message callback \*/ + int (\*received)(struct cec_adapter \*adap, struct cec_msg \*msg); + }; The received() callback allows the driver to optionally handle a newly received CEC message +.. c:function:: int (*received)(struct cec_adapter *adap, struct cec_msg *msg); If the driver wants to process a CEC message, then it can implement this @@ -234,13 +271,16 @@ CEC framework functions CEC Adapter drivers can call the following CEC framework functions: -int cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, - bool block); +.. c:function:: + int cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, + bool block); Transmit a CEC message. If block is true, then wait until the message has been transmitted, otherwise just queue it and return. -void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block); +.. c:function:: + void cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, + bool block); Change the physical address. This function will set adap->phys_addr and send an event if it has changed. If cec_s_log_addrs() has been called and @@ -254,8 +294,9 @@ then the CEC adapter will be disabled. If you change a valid physical address to another valid physical address, then this function will first set the address to CEC_PHYS_ADDR_INVALID before enabling the new physical address. -int cec_s_log_addrs(struct cec_adapter *adap, - struct cec_log_addrs *log_addrs, bool block); +.. c:function:: + int cec_s_log_addrs(struct cec_adapter *adap, + struct cec_log_addrs *log_addrs, bool block); Claim the CEC logical addresses. Should never be called if CEC_CAP_LOG_ADDRS is set. If block is true, then wait until the logical addresses have been diff --git a/Documentation/media/kapi/dtv-core.rst b/Documentation/media/kapi/dtv-core.rst index dd96e846fef9..a3c4642eabfc 100644 --- a/Documentation/media/kapi/dtv-core.rst +++ b/Documentation/media/kapi/dtv-core.rst @@ -6,8 +6,6 @@ Digital TV Common functions .. kernel-doc:: drivers/media/dvb-core/dvb_math.h -.. kernel-doc:: drivers/media/dvb-core/dvb_ringbuffer.h - .. kernel-doc:: drivers/media/dvb-core/dvbdev.h @@ -18,6 +16,42 @@ Digital TV Common functions .. kernel-doc:: drivers/media/dvb-core/dvbdev.h :export: drivers/media/dvb-core/dvbdev.c +Digital TV Ring buffer +---------------------- + +Those routines implement ring buffers used to handle digital TV data and +copy it from/to userspace. + +.. note:: + + 1) For performance reasons read and write routines don't check buffer sizes + and/or number of bytes free/available. This has to be done before these + routines are called. For example: + + .. code-block:: c + + /* write @buflen: bytes */ + free = dvb_ringbuffer_free(rbuf); + if (free >= buflen) + count = dvb_ringbuffer_write(rbuf, buffer, buflen); + else + /* do something */ + + /* read min. 1000, max. @bufsize: bytes */ + avail = dvb_ringbuffer_avail(rbuf); + if (avail >= 1000) + count = dvb_ringbuffer_read(rbuf, buffer, min(avail, bufsize)); + else + /* do something */ + + 2) If there is exactly one reader and one writer, there is no need + to lock read or write operations. + Two or more readers must be locked against each other. + Flushing the buffer counts as a read operation. + Resetting the buffer counts as a read and write operation. + Two or more writers must be locked against each other. + +.. kernel-doc:: drivers/media/dvb-core/dvb_ringbuffer.h Digital TV Frontend kABI @@ -121,7 +155,7 @@ triggered by a hardware interrupt, it is recommended to use the Linux bottom half mechanism or start a tasklet instead of making the callback function call directly from a hardware interrupt. -This mechanism is implemented by :c:func:`dmx_ts_cb()` and :cpp:func:`dmx_section_cb()` +This mechanism is implemented by :c:func:`dmx_ts_cb()` and :c:func:`dmx_section_cb()` callbacks. .. kernel-doc:: drivers/media/dvb-core/demux.h diff --git a/Documentation/media/kapi/mc-core.rst b/Documentation/media/kapi/mc-core.rst index 569cfc4f01cd..1a738e5f6056 100644 --- a/Documentation/media/kapi/mc-core.rst +++ b/Documentation/media/kapi/mc-core.rst @@ -34,7 +34,7 @@ pad to a sink pad. Media device ^^^^^^^^^^^^ -A media device is represented by a :c:type:`struct media_device <media_device>` +A media device is represented by a struct :c:type:`media_device` instance, defined in ``include/media/media-device.h``. Allocation of the structure is handled by the media device driver, usually by embedding the :c:type:`media_device` instance in a larger driver-specific @@ -47,7 +47,7 @@ and unregistered by calling :c:func:`media_device_unregister()`. Entities ^^^^^^^^ -Entities are represented by a :c:type:`struct media_entity <media_entity>` +Entities are represented by a struct :c:type:`media_entity` instance, defined in ``include/media/media-entity.h``. The structure is usually embedded into a higher-level structure, such as :c:type:`v4l2_subdev` or :c:type:`video_device` @@ -65,10 +65,10 @@ Interfaces ^^^^^^^^^^ Interfaces are represented by a -:c:type:`struct media_interface <media_interface>` instance, defined in +struct :c:type:`media_interface` instance, defined in ``include/media/media-entity.h``. Currently, only one type of interface is defined: a device node. Such interfaces are represented by a -:c:type:`struct media_intf_devnode <media_intf_devnode>`. +struct :c:type:`media_intf_devnode`. Drivers initialize and create device node interfaces by calling :c:func:`media_devnode_create()` @@ -77,7 +77,7 @@ and remove them by calling: Pads ^^^^ -Pads are represented by a :c:type:`struct media_pad <media_pad>` instance, +Pads are represented by a struct :c:type:`media_pad` instance, defined in ``include/media/media-entity.h``. Each entity stores its pads in a pads array managed by the entity driver. Drivers usually embed the array in a driver-specific structure. @@ -85,8 +85,9 @@ a driver-specific structure. Pads are identified by their entity and their 0-based index in the pads array. -Both information are stored in the :c:type:`struct media_pad`, making the -:c:type:`media_pad` pointer the canonical way to store and pass link references. +Both information are stored in the struct :c:type:`media_pad`, +making the struct :c:type:`media_pad` pointer the canonical way +to store and pass link references. Pads have flags that describe the pad capabilities and state. @@ -101,7 +102,7 @@ Pads have flags that describe the pad capabilities and state. Links ^^^^^ -Links are represented by a :c:type:`struct media_link <media_link>` instance, +Links are represented by a struct :c:type:`media_link` instance, defined in ``include/media/media-entity.h``. There are two types of links: **1. pad to pad links**: @@ -184,7 +185,7 @@ Use count and power handling Due to the wide differences between drivers regarding power management needs, the media controller does not implement power management. However, -the :c:type:`struct media_entity <media_entity>` includes a ``use_count`` +the struct :c:type:`media_entity` includes a ``use_count`` field that media drivers can use to track the number of users of every entity for power management needs. @@ -210,11 +211,11 @@ prevent link states from being modified during streaming by calling The function will mark all entities connected to the given entity through enabled links, either directly or indirectly, as streaming. -The :c:type:`struct media_pipeline <media_pipeline>` instance pointed to by +The struct :c:type:`media_pipeline` instance pointed to by the pipe argument will be stored in every entity in the pipeline. -Drivers should embed the :c:type:`struct media_pipeline <media_pipeline>` +Drivers should embed the struct :c:type:`media_pipeline` in higher-level pipeline structures and can then access the -pipeline through the :c:type:`struct media_entity <media_entity>` +pipeline through the struct :c:type:`media_entity` pipe field. Calls to :c:func:`media_entity_pipeline_start()` can be nested. diff --git a/Documentation/media/kapi/v4l2-dev.rst b/Documentation/media/kapi/v4l2-dev.rst index cdfcf0bc78be..b29aa616c267 100644 --- a/Documentation/media/kapi/v4l2-dev.rst +++ b/Documentation/media/kapi/v4l2-dev.rst @@ -56,7 +56,7 @@ You should also set these fields of :c:type:`video_device`: :c:type:`video_device`->vfl_dir fields are used to disable ops that do not match the type/dir combination. E.g. VBI ops are disabled for non-VBI nodes, and output ops are disabled for a capture device. This makes it possible to - provide just one :c:type:`v4l2_ioctl_ops struct` for both vbi and + provide just one :c:type:`v4l2_ioctl_ops` struct for both vbi and video nodes. - :c:type:`video_device`->lock: leave to ``NULL`` if you want to do all the @@ -166,14 +166,14 @@ something. In the case of :ref:`videobuf2 <vb2_framework>` you will need to implement the ``wait_prepare()`` and ``wait_finish()`` callbacks to unlock/lock if applicable. If you use the ``queue->lock`` pointer, then you can use the helper functions -:c:func:`vb2_ops_wait_prepare` and :cpp:func:`vb2_ops_wait_finish`. +:c:func:`vb2_ops_wait_prepare` and :c:func:`vb2_ops_wait_finish`. The implementation of a hotplug disconnect should also take the lock from :c:type:`video_device` before calling v4l2_device_disconnect. If you are also using :c:type:`video_device`->queue->lock, then you have to first lock :c:type:`video_device`->queue->lock followed by :c:type:`video_device`->lock. That way you can be sure no ioctl is running when you call -:c:type:`v4l2_device_disconnect`. +:c:func:`v4l2_device_disconnect`. Video device registration ------------------------- @@ -200,6 +200,7 @@ types exist: - ``VFL_TYPE_VBI``: ``/dev/vbiX`` for vertical blank data (i.e. closed captions, teletext) - ``VFL_TYPE_RADIO``: ``/dev/radioX`` for radio tuners - ``VFL_TYPE_SDR``: ``/dev/swradioX`` for Software Defined Radio tuners +- ``VFL_TYPE_TOUCH``: ``/dev/v4l-touchX`` for touch sensors The last argument gives you a certain amount of control over the device device node number used (i.e. the X in ``videoX``). Normally you will pass -1 @@ -262,6 +263,7 @@ file operations. It is a bitmask and the following bits can be set: +.. tabularcolumns:: |p{5ex}|L| ===== ================================================================ Mask Description @@ -334,7 +336,7 @@ And this function: returns the video_device belonging to the file struct. -The :c:func:`video_devdata` function combines :cpp:func:`video_get_drvdata` +The :c:func:`video_devdata` function combines :c:func:`video_get_drvdata` with :c:func:`video_devdata`: :c:func:`video_drvdata <video_drvdata>` diff --git a/Documentation/media/kapi/v4l2-event.rst b/Documentation/media/kapi/v4l2-event.rst index f962686a7b63..9a5e31546ae3 100644 --- a/Documentation/media/kapi/v4l2-event.rst +++ b/Documentation/media/kapi/v4l2-event.rst @@ -40,7 +40,7 @@ A good example of these ``replace``/``merge`` callbacks is in v4l2-event.c: In order to queue events to video device, drivers should call: :c:func:`v4l2_event_queue <v4l2_event_queue>` - (:c:type:`vdev <video_device>`, :ref:`ev <v4l2-event>`) + (:c:type:`vdev <video_device>`, :c:type:`ev <v4l2_event>`) The driver's only responsibility is to fill in the type and the data fields. The other fields will be filled in by V4L2. @@ -51,7 +51,7 @@ Event subscription Subscribing to an event is via: :c:func:`v4l2_event_subscribe <v4l2_event_subscribe>` - (:c:type:`fh <v4l2_fh>`, :ref:`sub <v4l2-event-subscription>` , + (:c:type:`fh <v4l2_fh>`, :c:type:`sub <v4l2_event_subscription>` , elems, :c:type:`ops <v4l2_subscribed_event_ops>`) @@ -86,7 +86,7 @@ Unsubscribing an event Unsubscribing to an event is via: :c:func:`v4l2_event_unsubscribe <v4l2_event_unsubscribe>` - (:c:type:`fh <v4l2_fh>`, :ref:`sub <v4l2-event-subscription>`) + (:c:type:`fh <v4l2_fh>`, :c:type:`sub <v4l2_event_subscription>`) This function is used to implement :c:type:`video_device`-> :c:type:`ioctl_ops <v4l2_ioctl_ops>`-> ``vidioc_unsubscribe_event``. diff --git a/Documentation/media/kapi/v4l2-fh.rst b/Documentation/media/kapi/v4l2-fh.rst index 9e87d5ca3e4a..3ee64adf4635 100644 --- a/Documentation/media/kapi/v4l2-fh.rst +++ b/Documentation/media/kapi/v4l2-fh.rst @@ -21,8 +21,8 @@ function by the driver. In many cases the struct :c:type:`v4l2_fh` will be embedded in a larger structure. In that case you should call: -#) :c:func:`v4l2_fh_init` and :cpp:func:`v4l2_fh_add` in ``open()`` -#) :c:func:`v4l2_fh_del` and :cpp:func:`v4l2_fh_exit` in ``release()`` +#) :c:func:`v4l2_fh_init` and :c:func:`v4l2_fh_add` in ``open()`` +#) :c:func:`v4l2_fh_del` and :c:func:`v4l2_fh_exit` in ``release()`` Drivers can extract their own file handle structure by using the container_of macro. diff --git a/Documentation/media/kapi/v4l2-subdev.rst b/Documentation/media/kapi/v4l2-subdev.rst index d767b61e9842..e1f0b726e438 100644 --- a/Documentation/media/kapi/v4l2-subdev.rst +++ b/Documentation/media/kapi/v4l2-subdev.rst @@ -27,7 +27,7 @@ methods. Bridges might also need to store per-subdev private data, such as a pointer to bridge-specific per-subdev private data. The :c:type:`v4l2_subdev` structure provides host private data for that purpose that can be accessed with -:c:func:`v4l2_get_subdev_hostdata` and :cpp:func:`v4l2_set_subdev_hostdata`. +:c:func:`v4l2_get_subdev_hostdata` and :c:func:`v4l2_set_subdev_hostdata`. From the bridge driver perspective, you load the sub-device module and somehow obtain the :c:type:`v4l2_subdev` pointer. For i2c devices this is easy: you call @@ -412,19 +412,7 @@ later date. It differs between i2c drivers and as such can be confusing. To see which chip variants are supported you can look in the i2c driver code for the i2c_device_id table. This lists all the possibilities. -There are two more helper functions: - -:c:func:`v4l2_i2c_new_subdev_cfg`: this function adds new irq and -platform_data arguments and has both 'addr' and 'probed_addrs' arguments: -if addr is not 0 then that will be used (non-probing variant), otherwise the -probed_addrs are probed. - -For example: this will probe for address 0x10: - -.. code-block:: c - - struct v4l2_subdev *sd = v4l2_i2c_new_subdev_cfg(v4l2_dev, adapter, - "module_foo", "chipid", 0, NULL, 0, I2C_ADDRS(0x10)); +There are one more helper function: :c:func:`v4l2_i2c_new_subdev_board` uses an :c:type:`i2c_board_info` struct which is passed to the i2c driver and replaces the irq, platform_data and addr @@ -433,9 +421,10 @@ arguments. If the subdev supports the s_config core ops, then that op is called with the irq and platform_data arguments after the subdev was setup. -The older :c:func:`v4l2_i2c_new_subdev` and -:c:func:`v4l2_i2c_new_probed_subdev` functions will call ``s_config`` as -well, but with irq set to 0 and platform_data set to ``NULL``. +The :c:func:`v4l2_i2c_new_subdev` function will call +:c:func:`v4l2_i2c_new_subdev_board`, internally filling a +:c:type:`i2c_board_info` structure using the ``client_type`` and the +``addr`` to fill it. V4L2 sub-device functions and data structures --------------------------------------------- diff --git a/Documentation/media/media_api_files/typical_media_device.pdf b/Documentation/media/media_api_files/typical_media_device.pdf Binary files differindex eb3045813815..d000d802b20f 100644 --- a/Documentation/media/media_api_files/typical_media_device.pdf +++ b/Documentation/media/media_api_files/typical_media_device.pdf diff --git a/Documentation/media/media_kapi.rst b/Documentation/media/media_kapi.rst index b71e8e8048ca..f282ca270369 100644 --- a/Documentation/media/media_kapi.rst +++ b/Documentation/media/media_kapi.rst @@ -32,3 +32,4 @@ For more details see the file COPYING in the source distribution of Linux. kapi/dtv-core kapi/rc-core kapi/mc-core + kapi/cec-core diff --git a/Documentation/media/net.h.rst.exceptions b/Documentation/media/net.h.rst.exceptions index 30a267483aa9..afe6bef91567 100644 --- a/Documentation/media/net.h.rst.exceptions +++ b/Documentation/media/net.h.rst.exceptions @@ -7,5 +7,5 @@ ignore ioctl __NET_GET_IF_OLD ignore struct __dvb_net_if_old # Macros used at struct dvb_net_if -replace define DVB_NET_FEEDTYPE_MPE dvb-net-if -replace define DVB_NET_FEEDTYPE_ULE dvb-net-if +replace define DVB_NET_FEEDTYPE_MPE :c:type:`dvb_net_if` +replace define DVB_NET_FEEDTYPE_ULE :c:type:`dvb_net_if` diff --git a/Documentation/media/uapi/cec/cec-func-close.rst b/Documentation/media/uapi/cec/cec-func-close.rst index bb94e4358910..8267c31b317d 100644 --- a/Documentation/media/uapi/cec/cec-func-close.rst +++ b/Documentation/media/uapi/cec/cec-func-close.rst @@ -20,19 +20,22 @@ Synopsis #include <unistd.h> -.. cpp:function:: int close( int fd ) +.. c:function:: int close( int fd ) + :name: cec-close Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <func-open>`. + File descriptor returned by :c:func:`open() <cec-open>`. Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. Closes the cec device. Resources associated with the file descriptor are diff --git a/Documentation/media/uapi/cec/cec-func-ioctl.rst b/Documentation/media/uapi/cec/cec-func-ioctl.rst index d0279e6d2734..9e8dbb118d6a 100644 --- a/Documentation/media/uapi/cec/cec-func-ioctl.rst +++ b/Documentation/media/uapi/cec/cec-func-ioctl.rst @@ -19,17 +19,18 @@ Synopsis #include <sys/ioctl.h> -.. cpp:function:: int ioctl( int fd, int request, void *argp ) +.. c:function:: int ioctl( int fd, int request, void *argp ) + :name: cec-ioctl Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <func-open>`. + File descriptor returned by :c:func:`open() <cec-open>`. ``request`` CEC ioctl request code as defined in the cec.h header file, for - example :ref:`CEC_ADAP_G_CAPS`. + example :c:func:`CEC_ADAP_G_CAPS`. ``argp`` Pointer to a request-specific structure. @@ -38,7 +39,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. The :c:func:`ioctl()` function manipulates cec device parameters. The diff --git a/Documentation/media/uapi/cec/cec-func-open.rst b/Documentation/media/uapi/cec/cec-func-open.rst index 7c0f981a6e07..af3f5b5c24c6 100644 --- a/Documentation/media/uapi/cec/cec-func-open.rst +++ b/Documentation/media/uapi/cec/cec-func-open.rst @@ -19,7 +19,8 @@ Synopsis #include <fcntl.h> -.. cpp:function:: int open( const char *device_name, int flags ) +.. c:function:: int open( const char *device_name, int flags ) + :name: cec-open Arguments @@ -45,7 +46,9 @@ Arguments Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To open a cec device applications call :c:func:`open()` with the diff --git a/Documentation/media/uapi/cec/cec-func-poll.rst b/Documentation/media/uapi/cec/cec-func-poll.rst index fcab65f6d6b8..cfb73e6027a5 100644 --- a/Documentation/media/uapi/cec/cec-func-poll.rst +++ b/Documentation/media/uapi/cec/cec-func-poll.rst @@ -20,16 +20,28 @@ Synopsis #include <sys/poll.h> -.. cpp:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) +.. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) + :name: cec-poll Arguments ========= +``ufds`` + List of FD events to be watched + +``nfds`` + Number of FD efents at the \*ufds array + +``timeout`` + Timeout to wait for events + Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. With the :c:func:`poll()` function applications can wait for CEC @@ -37,7 +49,7 @@ events. On success :c:func:`poll()` returns the number of file descriptors that have been selected (that is, file descriptors for which the -``revents`` field of the respective :c:type:`struct pollfd` structure +``revents`` field of the respective struct :c:type:`pollfd` is non-zero). CEC devices set the ``POLLIN`` and ``POLLRDNORM`` flags in the ``revents`` field if there are messages in the receive queue. If the transmit queue has room for new messages, the ``POLLOUT`` and diff --git a/Documentation/media/uapi/cec/cec-intro.rst b/Documentation/media/uapi/cec/cec-intro.rst index afa76f26fdde..4a19ea5323a9 100644 --- a/Documentation/media/uapi/cec/cec-intro.rst +++ b/Documentation/media/uapi/cec/cec-intro.rst @@ -3,7 +3,9 @@ Introduction ============ -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. HDMI connectors provide a single pin for use by the Consumer Electronics diff --git a/Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst b/Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst index eaedc63186e6..a35dca281178 100644 --- a/Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst +++ b/Documentation/media/uapi/cec/cec-ioc-adap-g-caps.rst @@ -14,7 +14,8 @@ CEC_ADAP_G_CAPS - Query device capabilities Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct cec_caps *argp ) +.. c:function:: int ioctl( int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp ) + :name: CEC_ADAP_G_CAPS Arguments ========= @@ -22,25 +23,25 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <cec-func-open>`. -``request`` - CEC_ADAP_G_CAPS - ``argp`` Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query device information, applications call the ioctl with a pointer to a -struct :ref:`cec_caps <cec-caps>`. The driver fills the structure and +struct :c:type:`cec_caps`. The driver fills the structure and returns the information to the application. The ioctl never fails. +.. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}| -.. _cec-caps: +.. c:type:: cec_caps .. flat-table:: struct cec_caps :header-rows: 0 @@ -84,6 +85,7 @@ returns the information to the application. The ioctl never fails. macro. +.. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| .. _cec-capabilities: diff --git a/Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst b/Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst index 201d4839931c..940a16d8d55e 100644 --- a/Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst +++ b/Documentation/media/uapi/cec/cec-ioc-adap-g-log-addrs.rst @@ -17,33 +17,35 @@ CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS - Get or set the logical addresses Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct cec_log_addrs *argp ) +.. c:function:: int ioctl( int fd, CEC_ADAP_G_LOG_ADDRS, struct cec_log_addrs *argp ) + :name: CEC_ADAP_G_LOG_ADDRS +.. c:function:: int ioctl( int fd, CEC_ADAP_S_LOG_ADDRS, struct cec_log_addrs *argp ) + :name: CEC_ADAP_S_LOG_ADDRS Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <cec-func-open>`. - -``request`` - CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS + File descriptor returned by :c:func:`open() <cec-open>`. ``argp`` - + Pointer to struct :c:type:`cec_log_addrs`. Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To query the current CEC logical addresses, applications call :ref:`ioctl CEC_ADAP_G_LOG_ADDRS <CEC_ADAP_G_LOG_ADDRS>` with a pointer to a -:c:type:`struct cec_log_addrs` where the driver stores the logical addresses. +struct :c:type:`cec_log_addrs` where the driver stores the logical addresses. To set new logical addresses, applications fill in -:c:type:`struct cec_log_addrs` and call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` +struct :c:type:`cec_log_addrs` and call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` with a pointer to this struct. The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` is only available if ``CEC_CAP_LOG_ADDRS`` is set (the ``ENOTTY`` error code is returned otherwise). The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` @@ -64,8 +66,11 @@ logical addresses are claimed or cleared. Attempting to call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` when logical address types are already defined will return with error ``EBUSY``. +.. c:type:: cec_log_addrs -.. _cec-log-addrs: +.. tabularcolumns:: |p{1.0cm}|p{7.5cm}|p{8.0cm}| + +.. cssclass:: longtable .. flat-table:: struct cec_log_addrs :header-rows: 0 @@ -220,6 +225,8 @@ logical address types are already defined will return with error ``EBUSY``. fallback to the Unregistered logical address. Note that if the Unregistered logical address was explicitly requested, then this flag has no effect. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. _cec-versions: .. flat-table:: CEC Versions @@ -253,6 +260,7 @@ logical address types are already defined will return with error ``EBUSY``. - CEC version according to the HDMI 2.0 standard. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _cec-prim-dev-types: @@ -319,6 +327,7 @@ logical address types are already defined will return with error ``EBUSY``. - Use for a video processor device. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _cec-log-addr-types: @@ -388,6 +397,8 @@ logical address types are already defined will return with error ``EBUSY``. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. _cec-all-dev-types-flags: .. flat-table:: CEC All Device Types Flags diff --git a/Documentation/media/uapi/cec/cec-ioc-adap-g-phys-addr.rst b/Documentation/media/uapi/cec/cec-ioc-adap-g-phys-addr.rst index b955d044b334..3357deb43c85 100644 --- a/Documentation/media/uapi/cec/cec-ioc-adap-g-phys-addr.rst +++ b/Documentation/media/uapi/cec/cec-ioc-adap-g-phys-addr.rst @@ -17,24 +17,27 @@ CEC_ADAP_G_PHYS_ADDR, CEC_ADAP_S_PHYS_ADDR - Get or set the physical address Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u16 *argp ) +.. c:function:: int ioctl( int fd, CEC_ADAP_G_PHYS_ADDR, __u16 *argp ) + :name: CEC_ADAP_G_PHYS_ADDR + +.. c:function:: int ioctl( int fd, CEC_ADAP_S_PHYS_ADDR, __u16 *argp ) + :name: CEC_ADAP_S_PHYS_ADDR Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <cec-func-open>`. - -``request`` - CEC_ADAP_G_PHYS_ADDR, CEC_ADAP_S_PHYS_ADDR + File descriptor returned by :c:func:`open() <cec-open>`. ``argp`` - + Pointer to the CEC address. Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To query the current physical address applications call diff --git a/Documentation/media/uapi/cec/cec-ioc-dqevent.rst b/Documentation/media/uapi/cec/cec-ioc-dqevent.rst index f8caa28a96d2..e283588a830b 100644 --- a/Documentation/media/uapi/cec/cec-ioc-dqevent.rst +++ b/Documentation/media/uapi/cec/cec-ioc-dqevent.rst @@ -15,8 +15,8 @@ CEC_DQEVENT - Dequeue a CEC event Synopsis ======== -.. c:function:: int ioctl( int fd, int request, struct cec_event *argp ) - :name: CEC_DQEVENT +.. c:function:: int ioctl( int fd, CEC_DQEVENT, struct cec_event *argp ) + :name: CEC_DQEVENT Arguments ========= @@ -24,16 +24,15 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <cec-func-open>`. -``request`` - CEC_DQEVENT - ``argp`` Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. CEC devices can send asynchronous events. These can be retrieved by @@ -50,8 +49,9 @@ two :ref:`CEC_EVENT_STATE_CHANGE <CEC-EVENT-STATE-CHANGE>` events with the same state). In that case the intermediate state changes were lost but it is guaranteed that the state did change in between the two events. +.. tabularcolumns:: |p{1.2cm}|p{2.9cm}|p{13.4cm}| -.. _cec-event-state-change_s: +.. c:type:: cec_event_state_change .. flat-table:: struct cec_event_state_change :header-rows: 0 @@ -80,8 +80,9 @@ it is guaranteed that the state did change in between the two events. has the unregistered logical address. In that case all other bits are 0. +.. c:type:: cec_event_lost_msgs -.. _cec-event-lost-msgs_s: +.. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.5cm}| .. flat-table:: struct cec_event_lost_msgs :header-rows: 0 @@ -106,8 +107,9 @@ it is guaranteed that the state did change in between the two events. this is more than enough. +.. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{2.5cm}|p{8.8cm}| -.. _cec-event: +.. c:type:: cec_event .. flat-table:: struct cec_event :header-rows: 0 @@ -121,11 +123,10 @@ it is guaranteed that the state did change in between the two events. - ``ts`` - - Timestamp of the event in ns. - The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access - the same clock from userspace use :c:func:`clock_gettime(2)`. + - :cspan:`1` Timestamp of the event in ns. - - + The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access + the same clock from userspace use :c:func:`clock_gettime`. - .. row 2 @@ -133,9 +134,7 @@ it is guaranteed that the state did change in between the two events. - ``event`` - - The CEC event type, see :ref:`cec-events`. - - - + - :cspan:`1` The CEC event type, see :ref:`cec-events`. - .. row 3 @@ -143,9 +142,7 @@ it is guaranteed that the state did change in between the two events. - ``flags`` - - Event flags, see :ref:`cec-event-flags`. - - - + - :cspan:`1` Event flags, see :ref:`cec-event-flags`. - .. row 4 @@ -177,6 +174,7 @@ it is guaranteed that the state did change in between the two events. event. +.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| .. _cec-events: @@ -206,6 +204,7 @@ it is guaranteed that the state did change in between the two events. application didn't dequeue CEC messages fast enough. +.. tabularcolumns:: |p{6.0cm}|p{0.6cm}|p{10.9cm}| .. _cec-event-flags: diff --git a/Documentation/media/uapi/cec/cec-ioc-g-mode.rst b/Documentation/media/uapi/cec/cec-ioc-g-mode.rst index f0084d892db6..70a41902ab58 100644 --- a/Documentation/media/uapi/cec/cec-ioc-g-mode.rst +++ b/Documentation/media/uapi/cec/cec-ioc-g-mode.rst @@ -13,24 +13,27 @@ CEC_G_MODE, CEC_S_MODE - Get or set exclusive use of the CEC adapter Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *argp ) +.. c:function:: int ioctl( int fd, CEC_G_MODE, __u32 *argp ) + :name: CEC_G_MODE + +.. c:function:: int ioctl( int fd, CEC_S_MODE, __u32 *argp ) + :name: CEC_S_MODE Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <cec-func-open>`. - -``request`` - CEC_G_MODE, CEC_S_MODE + File descriptor returned by :c:func:`open() <cec-open>`. ``argp`` - + Pointer to CEC mode. Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. By default any filehandle can use :ref:`CEC_TRANSMIT`, but in order to prevent @@ -71,6 +74,7 @@ always call :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. Available initiator modes are: +.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| .. _cec-mode-initiator_e: @@ -114,6 +118,7 @@ Available initiator modes are: Available follower modes are: +.. tabularcolumns:: |p{6.6cm}|p{0.9cm}|p{10.0cm}| .. _cec-mode-follower_e: @@ -206,6 +211,7 @@ Available follower modes are: Core message processing details: +.. tabularcolumns:: |p{6.6cm}|p{10.9cm}| .. _cec-core-processing: diff --git a/Documentation/media/uapi/cec/cec-ioc-receive.rst b/Documentation/media/uapi/cec/cec-ioc-receive.rst index ae5a39ade45f..d585b1bba6ac 100644 --- a/Documentation/media/uapi/cec/cec-ioc-receive.rst +++ b/Documentation/media/uapi/cec/cec-ioc-receive.rst @@ -16,28 +16,32 @@ CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC message Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct cec_msg *argp ) +.. c:function:: int ioctl( int fd, CEC_RECEIVE, struct cec_msg *argp ) + :name: CEC_RECEIVE + +.. c:function:: int ioctl( int fd, CEC_TRANSMIT, struct cec_msg *argp ) + :name: CEC_TRANSMIT Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <cec-func-open>`. - -``request`` - CEC_RECEIVE, CEC_TRANSMIT + File descriptor returned by :c:func:`open() <cec-open>`. ``argp`` - + Pointer to struct cec_msg. Description =========== -.. note:: This documents the proposed CEC API. This API is not yet finalized +.. note:: + + This documents the proposed CEC API. This API is not yet finalized and is currently only available as a staging kernel module. To receive a CEC message the application has to fill in the -``timeout`` field of :c:type:`struct cec_msg` and pass it to :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`. +``timeout`` field of struct :c:type:`cec_msg` and pass it to +:ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`. If the file descriptor is in non-blocking mode and there are no received messages pending, then it will return -1 and set errno to the ``EAGAIN`` error code. If the file descriptor is in blocking mode and ``timeout`` @@ -51,9 +55,9 @@ A received message can be: 2. the result of an earlier non-blocking transmit (the ``sequence`` field will be non-zero). -To send a CEC message the application has to fill in the -:c:type:`struct cec_msg` and pass it to -:ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. The :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` is only available if +To send a CEC message the application has to fill in the struct +:c:type:` cec_msg` and pass it to :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. +The :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` is only available if ``CEC_CAP_TRANSMIT`` is set. If there is no more room in the transmit queue, then it will return -1 and set errno to the ``EBUSY`` error code. The transmit queue has enough room for 18 messages (about 1 second worth @@ -71,7 +75,11 @@ checked against the received messages to find the corresponding transmit result. -.. _cec-msg: +.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{13.0cm}| + +.. c:type:: cec_msg + +.. cssclass:: longtable .. flat-table:: struct cec_msg :header-rows: 0 @@ -87,7 +95,7 @@ result. - Timestamp in ns of when the last byte of the message was transmitted. The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access - the same clock from userspace use :c:func:`clock_gettime(2)`. + the same clock from userspace use :c:func:`clock_gettime`. - .. row 2 @@ -97,7 +105,7 @@ result. - Timestamp in ns of when the last byte of the message was received. The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access - the same clock from userspace use :c:func:`clock_gettime(2)`. + the same clock from userspace use :c:func:`clock_gettime`. - .. row 3 @@ -247,6 +255,7 @@ result. valid if the :ref:`CEC_TX_STATUS_ERROR <CEC-TX-STATUS-ERROR>` status bit is set. +.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| .. _cec-tx-status: @@ -315,6 +324,7 @@ result. be set to explain which failures were seen. +.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| .. _cec-rx-status: diff --git a/Documentation/media/uapi/dvb/audio-bilingual-channel-select.rst b/Documentation/media/uapi/dvb/audio-bilingual-channel-select.rst index dbe20ff38e83..1279bd21dbd0 100644 --- a/Documentation/media/uapi/dvb/audio-bilingual-channel-select.rst +++ b/Documentation/media/uapi/dvb/audio-bilingual-channel-select.rst @@ -11,11 +11,13 @@ Name AUDIO_BILINGUAL_CHANNEL_SELECT +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_BILINGUAL_CHANNEL_SELECT, audio_channel_select_t) +.. c:function:: int ioctl(int fd, AUDIO_BILINGUAL_CHANNEL_SELECT, struct *audio_channel_select) + :name: AUDIO_BILINGUAL_CHANNEL_SELECT Arguments @@ -25,20 +27,13 @@ Arguments :header-rows: 0 :stub-columns: 0 - - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_BILINGUAL_CHANNEL_SELECT for this command. - - - .. row 3 + - - audio_channel_select_t ch diff --git a/Documentation/media/uapi/dvb/audio-channel-select.rst b/Documentation/media/uapi/dvb/audio-channel-select.rst index 69df4c0f2fb2..2ceb4efebdf0 100644 --- a/Documentation/media/uapi/dvb/audio-channel-select.rst +++ b/Documentation/media/uapi/dvb/audio-channel-select.rst @@ -11,11 +11,13 @@ Name AUDIO_CHANNEL_SELECT +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_CHANNEL_SELECT, audio_channel_select_t) +.. c:function:: int ioctl(int fd, AUDIO_CHANNEL_SELECT, struct *audio_channel_select) + :name: AUDIO_CHANNEL_SELECT Arguments @@ -26,19 +28,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_CHANNEL_SELECT for this command. - - - .. row 3 + - - audio_channel_select_t ch diff --git a/Documentation/media/uapi/dvb/audio-clear-buffer.rst b/Documentation/media/uapi/dvb/audio-clear-buffer.rst index a3dec29bdc69..f6bed67cb070 100644 --- a/Documentation/media/uapi/dvb/audio-clear-buffer.rst +++ b/Documentation/media/uapi/dvb/audio-clear-buffer.rst @@ -11,12 +11,13 @@ Name AUDIO_CLEAR_BUFFER +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_CLEAR_BUFFER) - +.. c:function:: int ioctl(int fd, AUDIO_CLEAR_BUFFER) + :name: AUDIO_CLEAR_BUFFER Arguments --------- @@ -32,13 +33,6 @@ Arguments - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_CLEAR_BUFFER for this command. - - Description ----------- diff --git a/Documentation/media/uapi/dvb/audio-continue.rst b/Documentation/media/uapi/dvb/audio-continue.rst index 053627dd61e7..ca587869306e 100644 --- a/Documentation/media/uapi/dvb/audio-continue.rst +++ b/Documentation/media/uapi/dvb/audio-continue.rst @@ -11,11 +11,13 @@ Name AUDIO_CONTINUE +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_CONTINUE) +.. c:function:: int ioctl(int fd, AUDIO_CONTINUE) + :name: AUDIO_CONTINUE Arguments @@ -32,13 +34,6 @@ Arguments - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_CONTINUE for this command. - - Description ----------- diff --git a/Documentation/media/uapi/dvb/audio-fclose.rst b/Documentation/media/uapi/dvb/audio-fclose.rst index e5d4225cd9d7..4df24c8d74ed 100644 --- a/Documentation/media/uapi/dvb/audio-fclose.rst +++ b/Documentation/media/uapi/dvb/audio-fclose.rst @@ -11,11 +11,13 @@ Name DVB audio close() +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int close(int fd) +.. c:function:: int close(int fd) + :name: dvb-audio-close Arguments diff --git a/Documentation/media/uapi/dvb/audio-fopen.rst b/Documentation/media/uapi/dvb/audio-fopen.rst index ec3b23aa79b3..a802c2e0dc6a 100644 --- a/Documentation/media/uapi/dvb/audio-fopen.rst +++ b/Documentation/media/uapi/dvb/audio-fopen.rst @@ -11,11 +11,13 @@ Name DVB audio open() +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int open(const char *deviceName, int flags) +.. c:function:: int open(const char *deviceName, int flags) + :name: dvb-audio-open Arguments @@ -80,6 +82,8 @@ AUDIO_GET_STATUS. All other call will return with an error code. Return Value ------------ +.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 diff --git a/Documentation/media/uapi/dvb/audio-fwrite.rst b/Documentation/media/uapi/dvb/audio-fwrite.rst index ca95b9be0c2a..8882cad7d165 100644 --- a/Documentation/media/uapi/dvb/audio-fwrite.rst +++ b/Documentation/media/uapi/dvb/audio-fwrite.rst @@ -11,11 +11,13 @@ Name DVB audio write() +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: size_t write(int fd, const void *buf, size_t count) +.. c:function:: size_t write(int fd, const void *buf, size_t count) + :name: dvb-audio-write Arguments diff --git a/Documentation/media/uapi/dvb/audio-get-capabilities.rst b/Documentation/media/uapi/dvb/audio-get-capabilities.rst index e274a8d53785..0d867f189c22 100644 --- a/Documentation/media/uapi/dvb/audio-get-capabilities.rst +++ b/Documentation/media/uapi/dvb/audio-get-capabilities.rst @@ -11,11 +11,13 @@ Name AUDIO_GET_CAPABILITIES +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_GET_CAPABILITIES, unsigned int *cap) +.. c:function:: int ioctl(int fd, AUDIO_GET_CAPABILITIES, unsigned int *cap) + :name: AUDIO_GET_CAPABILITIES Arguments @@ -26,19 +28,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_GET_CAPABILITIES for this command. - - - .. row 3 + - - unsigned int \*cap diff --git a/Documentation/media/uapi/dvb/audio-get-pts.rst b/Documentation/media/uapi/dvb/audio-get-pts.rst index 5f875508b833..2d1396b003de 100644 --- a/Documentation/media/uapi/dvb/audio-get-pts.rst +++ b/Documentation/media/uapi/dvb/audio-get-pts.rst @@ -11,11 +11,13 @@ Name AUDIO_GET_PTS +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_GET_PTS, __u64 *pts) +.. c:function:: int ioctl(int fd, AUDIO_GET_PTS, __u64 *pts) + :name: AUDIO_GET_PTS Arguments @@ -26,19 +28,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_GET_PTS for this command. - - - .. row 3 + - - __u64 \*pts diff --git a/Documentation/media/uapi/dvb/audio-get-status.rst b/Documentation/media/uapi/dvb/audio-get-status.rst index cbd822773d85..857b058325f1 100644 --- a/Documentation/media/uapi/dvb/audio-get-status.rst +++ b/Documentation/media/uapi/dvb/audio-get-status.rst @@ -11,11 +11,13 @@ Name AUDIO_GET_STATUS +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_GET_STATUS, struct audio_status *status) +.. c:function:: int ioctl(int fd, AUDIO_GET_STATUS, struct audio_status *status) + :name: AUDIO_GET_STATUS Arguments @@ -26,19 +28,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_GET_STATUS for this command. - - - .. row 3 + - - struct audio_status \*status diff --git a/Documentation/media/uapi/dvb/audio-pause.rst b/Documentation/media/uapi/dvb/audio-pause.rst index 9ca263e90c6c..c7310dffbff2 100644 --- a/Documentation/media/uapi/dvb/audio-pause.rst +++ b/Documentation/media/uapi/dvb/audio-pause.rst @@ -11,12 +11,13 @@ Name AUDIO_PAUSE +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_PAUSE) - +.. c:function:: int ioctl(int fd, AUDIO_PAUSE) + :name: AUDIO_PAUSE Arguments --------- @@ -32,12 +33,6 @@ Arguments - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_PAUSE for this command. - Description ----------- diff --git a/Documentation/media/uapi/dvb/audio-play.rst b/Documentation/media/uapi/dvb/audio-play.rst index db4d7203acc5..943b5eec9f28 100644 --- a/Documentation/media/uapi/dvb/audio-play.rst +++ b/Documentation/media/uapi/dvb/audio-play.rst @@ -11,11 +11,13 @@ Name AUDIO_PLAY +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_PLAY) +.. c:function:: int ioctl(int fd, AUDIO_PLAY) + :name: AUDIO_PLAY Arguments @@ -32,13 +34,6 @@ Arguments - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_PLAY for this command. - - Description ----------- diff --git a/Documentation/media/uapi/dvb/audio-select-source.rst b/Documentation/media/uapi/dvb/audio-select-source.rst index b806d806a46f..c0434a0bd324 100644 --- a/Documentation/media/uapi/dvb/audio-select-source.rst +++ b/Documentation/media/uapi/dvb/audio-select-source.rst @@ -11,11 +11,13 @@ Name AUDIO_SELECT_SOURCE +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_SELECT_SOURCE, audio_stream_source_t source) +.. c:function:: int ioctl(int fd, AUDIO_SELECT_SOURCE, struct audio_stream_source *source) + :name: AUDIO_SELECT_SOURCE Arguments @@ -26,19 +28,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SELECT_SOURCE for this command. - - - .. row 3 + - - audio_stream_source_t source diff --git a/Documentation/media/uapi/dvb/audio-set-attributes.rst b/Documentation/media/uapi/dvb/audio-set-attributes.rst index 18667cea2cdf..f0c6153ca80f 100644 --- a/Documentation/media/uapi/dvb/audio-set-attributes.rst +++ b/Documentation/media/uapi/dvb/audio-set-attributes.rst @@ -11,12 +11,14 @@ Name AUDIO_SET_ATTRIBUTES +.. attention:: This ioctl is deprecated + Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = AUDIO_SET_ATTRIBUTES, audio_attributes_t attr ) - +.. c:function:: int ioctl(fd, AUDIO_SET_ATTRIBUTES, struct audio_attributes *attr ) + :name: AUDIO_SET_ATTRIBUTES Arguments --------- @@ -26,19 +28,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SET_ATTRIBUTES for this command. - - - .. row 3 + - - audio_attributes_t attr diff --git a/Documentation/media/uapi/dvb/audio-set-av-sync.rst b/Documentation/media/uapi/dvb/audio-set-av-sync.rst index 6f7e26fa4cd1..0cef4917d2cf 100644 --- a/Documentation/media/uapi/dvb/audio-set-av-sync.rst +++ b/Documentation/media/uapi/dvb/audio-set-av-sync.rst @@ -11,11 +11,13 @@ Name AUDIO_SET_AV_SYNC +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_SET_AV_SYNC, boolean state) +.. c:function:: int ioctl(int fd, AUDIO_SET_AV_SYNC, boolean state) + :name: AUDIO_SET_AV_SYNC Arguments @@ -26,33 +28,21 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_AV_SYNC for this command. - - - .. row 3 + - - boolean state - Tells the DVB subsystem if A/V synchronization shall be ON or OFF. - - .. row 4 - - - - - TRUE AV-sync ON - - - .. row 5 + TRUE: AV-sync ON - - - - FALSE AV-sync OFF + FALSE: AV-sync OFF Description diff --git a/Documentation/media/uapi/dvb/audio-set-bypass-mode.rst b/Documentation/media/uapi/dvb/audio-set-bypass-mode.rst index 30bcaca14c3f..b063c496c2eb 100644 --- a/Documentation/media/uapi/dvb/audio-set-bypass-mode.rst +++ b/Documentation/media/uapi/dvb/audio-set-bypass-mode.rst @@ -11,12 +11,13 @@ Name AUDIO_SET_BYPASS_MODE +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_SET_BYPASS_MODE, boolean mode) - +.. c:function:: int ioctl(int fd, AUDIO_SET_BYPASS_MODE, boolean mode) + :name: AUDIO_SET_BYPASS_MODE Arguments --------- @@ -26,34 +27,22 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SET_BYPASS_MODE for this command. - - - .. row 3 + - - boolean mode - Enables or disables the decoding of the current Audio stream in the DVB subsystem. - - .. row 4 - - - - - TRUE Bypass is disabled - - - .. row 5 + TRUE: Bypass is disabled - - - - FALSE Bypass is enabled + FALSE: Bypass is enabled Description diff --git a/Documentation/media/uapi/dvb/audio-set-ext-id.rst b/Documentation/media/uapi/dvb/audio-set-ext-id.rst index 049414db8ef6..8503c47f26bd 100644 --- a/Documentation/media/uapi/dvb/audio-set-ext-id.rst +++ b/Documentation/media/uapi/dvb/audio-set-ext-id.rst @@ -11,12 +11,13 @@ Name AUDIO_SET_EXT_ID +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = AUDIO_SET_EXT_ID, int id) - +.. c:function:: int ioctl(fd, AUDIO_SET_EXT_ID, int id) + :name: AUDIO_SET_EXT_ID Arguments --------- @@ -26,19 +27,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SET_EXT_ID for this command. - - - .. row 3 + - - int id diff --git a/Documentation/media/uapi/dvb/audio-set-id.rst b/Documentation/media/uapi/dvb/audio-set-id.rst index a664dc1955cb..8b1081d24473 100644 --- a/Documentation/media/uapi/dvb/audio-set-id.rst +++ b/Documentation/media/uapi/dvb/audio-set-id.rst @@ -11,12 +11,13 @@ Name AUDIO_SET_ID +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_SET_ID, int id) - +.. c:function:: int ioctl(int fd, AUDIO_SET_ID, int id) + :name: AUDIO_SET_ID Arguments --------- @@ -26,19 +27,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SET_ID for this command. - - - .. row 3 + - - int id diff --git a/Documentation/media/uapi/dvb/audio-set-karaoke.rst b/Documentation/media/uapi/dvb/audio-set-karaoke.rst index b55f8380b9cd..c759952d88aa 100644 --- a/Documentation/media/uapi/dvb/audio-set-karaoke.rst +++ b/Documentation/media/uapi/dvb/audio-set-karaoke.rst @@ -11,11 +11,13 @@ Name AUDIO_SET_KARAOKE +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = AUDIO_SET_KARAOKE, audio_karaoke_t *karaoke) +.. c:function:: int ioctl(fd, AUDIO_SET_KARAOKE, struct audio_karaoke *karaoke) + :name: AUDIO_SET_KARAOKE Arguments @@ -26,19 +28,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SET_KARAOKE for this command. - - - .. row 3 + - - audio_karaoke_t \*karaoke diff --git a/Documentation/media/uapi/dvb/audio-set-mixer.rst b/Documentation/media/uapi/dvb/audio-set-mixer.rst index 67821729c2b6..248aab8c8909 100644 --- a/Documentation/media/uapi/dvb/audio-set-mixer.rst +++ b/Documentation/media/uapi/dvb/audio-set-mixer.rst @@ -11,12 +11,13 @@ Name AUDIO_SET_MIXER +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_SET_MIXER, audio_mixer_t *mix) - +.. c:function:: int ioctl(int fd, AUDIO_SET_MIXER, struct audio_mixer *mix) + :name: AUDIO_SET_MIXER Arguments --------- @@ -26,19 +27,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SET_ID for this command. - - - .. row 3 + - - audio_mixer_t \*mix diff --git a/Documentation/media/uapi/dvb/audio-set-mute.rst b/Documentation/media/uapi/dvb/audio-set-mute.rst index ebaba95ee278..897e7228f4d8 100644 --- a/Documentation/media/uapi/dvb/audio-set-mute.rst +++ b/Documentation/media/uapi/dvb/audio-set-mute.rst @@ -11,11 +11,13 @@ Name AUDIO_SET_MUTE +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_SET_MUTE, boolean state) +.. c:function:: int ioctl(int fd, AUDIO_SET_MUTE, boolean state) + :name: AUDIO_SET_MUTE Arguments @@ -26,33 +28,21 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SET_MUTE for this command. - - - .. row 3 + - - boolean state - Indicates if audio device shall mute or not. - - .. row 4 - - - - - TRUE Audio Mute - - - .. row 5 + TRUE: Audio Mute - - - - FALSE Audio Un-mute + FALSE: Audio Un-mute Description diff --git a/Documentation/media/uapi/dvb/audio-set-streamtype.rst b/Documentation/media/uapi/dvb/audio-set-streamtype.rst index dfb9a6c00d88..46c0362ac71d 100644 --- a/Documentation/media/uapi/dvb/audio-set-streamtype.rst +++ b/Documentation/media/uapi/dvb/audio-set-streamtype.rst @@ -11,11 +11,13 @@ Name AUDIO_SET_STREAMTYPE +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = AUDIO_SET_STREAMTYPE, int type) +.. c:function:: int ioctl(fd, AUDIO_SET_STREAMTYPE, int type) + :name: AUDIO_SET_STREAMTYPE Arguments @@ -26,19 +28,13 @@ Arguments :stub-columns: 0 - - .. row 1 + - - int fd - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_SET_STREAMTYPE for this command. - - - .. row 3 + - - int type diff --git a/Documentation/media/uapi/dvb/audio-stop.rst b/Documentation/media/uapi/dvb/audio-stop.rst index 449127e3f2aa..dd6c3b6826ec 100644 --- a/Documentation/media/uapi/dvb/audio-stop.rst +++ b/Documentation/media/uapi/dvb/audio-stop.rst @@ -11,12 +11,13 @@ Name AUDIO_STOP +.. attention:: This ioctl is deprecated Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = AUDIO_STOP) - +.. c:function:: int ioctl(int fd, AUDIO_STOP) + :name: AUDIO_STOP Arguments --------- @@ -32,12 +33,6 @@ Arguments - File descriptor returned by a previous call to open(). - - .. row 2 - - - int request - - - Equals AUDIO_STOP for this command. - Description ----------- diff --git a/Documentation/media/uapi/dvb/audio_data_types.rst b/Documentation/media/uapi/dvb/audio_data_types.rst index 4a53127eb13a..6b93359d64f7 100644 --- a/Documentation/media/uapi/dvb/audio_data_types.rst +++ b/Documentation/media/uapi/dvb/audio_data_types.rst @@ -9,11 +9,7 @@ Audio Data Types This section describes the structures, data types and defines used when talking to the audio device. - -.. _audio-stream-source-t: - -audio_stream_source_t -===================== +.. c:type:: audio_stream_source The audio stream source is set through the AUDIO_SELECT_SOURCE call and can take the following values, depending on whether we are replaying @@ -33,10 +29,7 @@ AUDIO_SOURCE_MEMORY is selected the stream comes from the application through the ``write()`` system call. -.. _audio-play-state-t: - -audio_play_state_t -================== +.. c:type:: audio_play_state The following values can be returned by the AUDIO_GET_STATUS call representing the state of audio playback. @@ -51,10 +44,7 @@ representing the state of audio playback. } audio_play_state_t; -.. _audio-channel-select-t: - -audio_channel_select_t -====================== +.. c:type:: audio_channel_select The audio channel selected via AUDIO_CHANNEL_SELECT is determined by the following values. @@ -71,10 +61,7 @@ the following values. } audio_channel_select_t; -.. _audio-status: - -struct audio_status -=================== +.. c:type:: audio_status The AUDIO_GET_STATUS call returns the following structure informing about various states of the playback operation. @@ -93,10 +80,7 @@ about various states of the playback operation. } audio_status_t; -.. _audio-mixer: - -struct audio_mixer -================== +.. c:type:: audio_mixer The following structure is used by the AUDIO_SET_MIXER call to set the audio volume. @@ -131,11 +115,7 @@ following bits set according to the hardwares capabilities. #define AUDIO_CAP_SDDS 128 #define AUDIO_CAP_AC3 256 - -.. _audio-karaoke: - -struct audio_karaoke -==================== +.. c:type:: audio_karaoke The ioctl AUDIO_SET_KARAOKE uses the following format: @@ -155,10 +135,7 @@ into the left channel and Vocal2 into the right channel at 100% each. Ff Melody is non-zero, the melody channel gets mixed into left and right. -.. _audio-attributes-t: - -audio attributes -================ +.. c:type:: audio_attributes The following attributes can be set by a call to AUDIO_SET_ATTRIBUTES: diff --git a/Documentation/media/uapi/dvb/ca-fclose.rst b/Documentation/media/uapi/dvb/ca-fclose.rst index 16d7a1e76193..5ecefa4abc3d 100644 --- a/Documentation/media/uapi/dvb/ca-fclose.rst +++ b/Documentation/media/uapi/dvb/ca-fclose.rst @@ -15,28 +15,20 @@ DVB CA close() Synopsis -------- -.. cpp:function:: int close(int fd) +.. c:function:: int close(int fd) + :name: dvb-ca-close Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - +``fd`` + File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. Description ----------- -This system call closes a previously opened audio device. +This system call closes a previously opened CA device. Return Value diff --git a/Documentation/media/uapi/dvb/ca-fopen.rst b/Documentation/media/uapi/dvb/ca-fopen.rst index f284461cce20..3d2819751446 100644 --- a/Documentation/media/uapi/dvb/ca-fopen.rst +++ b/Documentation/media/uapi/dvb/ca-fopen.rst @@ -15,48 +15,35 @@ DVB CA open() Synopsis -------- -.. cpp:function:: int open(const char *deviceName, int flags) +.. c:function:: int open(const char *name, int flags) + :name: dvb-ca-open Arguments --------- +``name`` + Name of specific DVB CA device. + +``flags`` + A bit-wise OR of the following flags: + .. flat-table:: :header-rows: 0 :stub-columns: 0 + - + - O_RDONLY + - read-only access - - .. row 1 - - - const char \*deviceName - - - Name of specific video device. + - + - O_RDWR + - read/write access - - .. row 2 - - - int flags - - - A bit-wise OR of the following flags: - - - .. row 3 - - - - - O_RDONLY read-only access - - - .. row 4 - - - - - O_RDWR read/write access - - - .. row 5 - - - - - O_NONBLOCK open in non-blocking mode - - - .. row 6 - - - - - (blocking mode is the default) + - + - O_NONBLOCK + - open in non-blocking mode + (blocking mode is the default) Description @@ -79,6 +66,8 @@ the device in this mode will fail, and an error code will be returned. Return Value ------------ +.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 diff --git a/Documentation/media/uapi/dvb/ca-get-cap.rst b/Documentation/media/uapi/dvb/ca-get-cap.rst index 891fbf2d9a84..fbf7e359cb8a 100644 --- a/Documentation/media/uapi/dvb/ca-get-cap.rst +++ b/Documentation/media/uapi/dvb/ca-get-cap.rst @@ -15,40 +15,51 @@ CA_GET_CAP Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = CA_GET_CAP, ca_caps_t *) +.. c:function:: int ioctl(fd, CA_GET_CAP, struct ca_caps *caps) + :name: CA_GET_CAP Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd +``fd`` + File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. - - File descriptor returned by a previous call to open(). +``caps`` + Pointer to struct :c:type:`ca_caps`. - - .. row 2 +.. c:type:: struct ca_caps - - int request - - - Equals CA_GET_CAP for this command. - - - .. row 3 - - - ca_caps_t * +.. flat-table:: struct ca_caps + :header-rows: 1 + :stub-columns: 0 - - Undocumented. + - + - type + - name + - description + - + - unsigned int + - slot_num + - total number of CA card and module slots + - + - unsigned int + - slot_type + - bitmask with all supported slot types + - + - unsigned int + - descr_num + - total number of descrambler slots (keys) + - + - unsigned int + - descr_type + - bit mask with all supported descr types Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/ca-get-descr-info.rst b/Documentation/media/uapi/dvb/ca-get-descr-info.rst index cf8e8242db66..7bf327a3d0e3 100644 --- a/Documentation/media/uapi/dvb/ca-get-descr-info.rst +++ b/Documentation/media/uapi/dvb/ca-get-descr-info.rst @@ -15,40 +15,44 @@ CA_GET_DESCR_INFO Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = CA_GET_DESCR_INFO, ca_descr_info_t *) - +.. c:function:: int ioctl(fd, CA_GET_DESCR_INFO, struct ca_descr_info *desc) + :name: CA_GET_DESCR_INFO Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 +``fd`` + File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. - - int fd +``desc`` + Pointer to struct :c:type:`ca_descr_info`. - - File descriptor returned by a previous call to open(). +.. c:type:: struct ca_descr_info - - .. row 2 - - - int request - - - Equals CA_GET_DESCR_INFO for this command. - - - .. row 3 +.. flat-table:: struct ca_descr_info + :header-rows: 1 + :stub-columns: 0 - - ca_descr_info_t \* + - + - type + - name + - description - - Undocumented. + - + - unsigned int + - num + - number of available descramblers (keys) + - + - unsigned int + - type + - type of supported scrambling system. Valid values are: + ``CA_ECD``, ``CA_NDS`` and ``CA_DSS``. Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/ca-get-msg.rst b/Documentation/media/uapi/dvb/ca-get-msg.rst index 56004d5ea3ab..121588da3ef1 100644 --- a/Documentation/media/uapi/dvb/ca-get-msg.rst +++ b/Documentation/media/uapi/dvb/ca-get-msg.rst @@ -15,40 +15,55 @@ CA_GET_MSG Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = CA_GET_MSG, ca_msg_t *) +.. c:function:: int ioctl(fd, CA_GET_MSG, struct ca_msg *msg) + :name: CA_GET_MSG Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - +``fd`` + File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. - - .. row 1 +``msg`` + Pointer to struct :c:type:`ca_msg`. - - int fd - - File descriptor returned by a previous call to open(). +.. c:type:: struct ca_msg - - .. row 2 - - - int request +.. flat-table:: struct ca_msg + :header-rows: 1 + :stub-columns: 0 - - Equals CA_GET_MSG for this command. + - + - type + - name + - description + - + - unsigned int + - index + - - - .. row 3 + - + - unsigned int + - type + - - - ca_msg_t \* + - + - unsigned int + - length + - - - Undocumented. + - + - unsigned char + - msg[256] + - Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/ca-get-slot-info.rst b/Documentation/media/uapi/dvb/ca-get-slot-info.rst index 9fea28ccad0f..54e5dc78a2dc 100644 --- a/Documentation/media/uapi/dvb/ca-get-slot-info.rst +++ b/Documentation/media/uapi/dvb/ca-get-slot-info.rst @@ -15,40 +15,106 @@ CA_GET_SLOT_INFO Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = CA_GET_SLOT_INFO, ca_slot_info_t *) +.. c:function:: int ioctl(fd, CA_GET_SLOT_INFO, struct ca_slot_info *info) + :name: CA_GET_SLOT_INFO Arguments --------- -.. flat-table:: - :header-rows: 0 +``fd`` + File descriptor returned by a previous call to :c:func:`open() <cec-open>`. + +``info`` + Pointer to struct c:type:`ca_slot_info`. + +.. _ca_slot_info_type: + +.. flat-table:: ca_slot_info types + :header-rows: 1 :stub-columns: 0 + - + - type + - name + - description + - + - CA_CI + - 1 + - CI high level interface + + - + - CA_CI_LINK + - 2 + - CI link layer level interface + + - + - CA_CI_PHYS + - 4 + - CI physical layer level interface + + - + - CA_DESCR + - 8 + - built-in descrambler + + - + - CA_SC + - 128 + - simple smart card interface + +.. _ca_slot_info_flag: + +.. flat-table:: ca_slot_info flags + :header-rows: 1 + :stub-columns: 0 - - .. row 1 + - + - type + - name + - description - - int fd + - + - CA_CI_MODULE_PRESENT + - 1 + - module (or card) inserted - - File descriptor returned by a previous call to open(). + - + - CA_CI_MODULE_READY + - 2 + - - - .. row 2 +.. c:type:: ca_slot_info - - int request +.. flat-table:: struct ca_slot_info + :header-rows: 1 + :stub-columns: 0 - - Equals CA_GET_SLOT_INFO for this command. + - + - type + - name + - description - - .. row 3 + - + - int + - num + - slot number - - ca_slot_info_t \* + - + - int + - type + - CA interface this slot supports, as defined at :ref:`ca_slot_info_type`. - - Undocumented. + - + - unsigned int + - flags + - flags as defined at :ref:`ca_slot_info_flag`. Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/ca-reset.rst b/Documentation/media/uapi/dvb/ca-reset.rst index d5a50088fc2d..477313121a65 100644 --- a/Documentation/media/uapi/dvb/ca-reset.rst +++ b/Documentation/media/uapi/dvb/ca-reset.rst @@ -15,34 +15,20 @@ CA_RESET Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = CA_RESET) +.. c:function:: int ioctl(fd, CA_RESET) + :name: CA_RESET Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals CA_RESET for this command. - +``fd`` + File descriptor returned by a previous call to :c:func:`open() <cec-open>`. Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/ca-send-msg.rst b/Documentation/media/uapi/dvb/ca-send-msg.rst index 18974e61e788..532ef5f9d6ac 100644 --- a/Documentation/media/uapi/dvb/ca-send-msg.rst +++ b/Documentation/media/uapi/dvb/ca-send-msg.rst @@ -15,40 +15,24 @@ CA_SEND_MSG Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = CA_SEND_MSG, ca_msg_t *) +.. c:function:: int ioctl(fd, CA_SEND_MSG, struct ca_msg *msg) + :name: CA_SEND_MSG Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by a previous call to :c:func:`open() <cec-open>`. - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals CA_SEND_MSG for this command. - - - .. row 3 - - - ca_msg_t \* - - - Undocumented. +``msg`` + Pointer to struct :c:type:`ca_msg`. Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/ca-set-descr.rst b/Documentation/media/uapi/dvb/ca-set-descr.rst index 293e6da5059f..70f7b3cf12ad 100644 --- a/Documentation/media/uapi/dvb/ca-set-descr.rst +++ b/Documentation/media/uapi/dvb/ca-set-descr.rst @@ -15,40 +15,24 @@ CA_SET_DESCR Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = CA_SET_DESCR, ca_descr_t *) +.. c:function:: int ioctl(fd, CA_SET_DESCR, struct ca_descr *desc) + :name: CA_SET_DESCR Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by a previous call to :c:func:`open() <cec-open>`. - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals CA_SET_DESCR for this command. - - - .. row 3 - - - ca_descr_t \* - - - Undocumented. +``msg`` + Pointer to struct :c:type:`ca_descr`. Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/ca-set-pid.rst b/Documentation/media/uapi/dvb/ca-set-pid.rst index 5afa2fae3206..891c1c72ef24 100644 --- a/Documentation/media/uapi/dvb/ca-set-pid.rst +++ b/Documentation/media/uapi/dvb/ca-set-pid.rst @@ -15,40 +15,41 @@ CA_SET_PID Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = CA_SET_PID, ca_pid_t *) +.. c:function:: int ioctl(fd, CA_SET_PID, struct ca_pid *pid) + :name: CA_SET_PID Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 +``fd`` + File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. - - int fd +``pid`` + Pointer to struct :c:type:`ca_pid`. - - File descriptor returned by a previous call to open(). +.. c:type:: ca_pid - - .. row 2 - - - int request - - - Equals CA_SET_PID for this command. +.. flat-table:: struct ca_pid + :header-rows: 1 + :stub-columns: 0 - - .. row 3 + - + - unsigned int + - pid + - Program ID - - ca_pid_t \* + - + - int + - index + - PID index. Use -1 to disable. - - Undocumented. Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/ca_data_types.rst b/Documentation/media/uapi/dvb/ca_data_types.rst index 025f910ae945..d9e27c77426c 100644 --- a/Documentation/media/uapi/dvb/ca_data_types.rst +++ b/Documentation/media/uapi/dvb/ca_data_types.rst @@ -7,7 +7,7 @@ CA Data Types ************* -.. _ca-slot-info: +.. c:type:: ca_slot_info ca_slot_info_t ============== @@ -31,7 +31,7 @@ ca_slot_info_t } ca_slot_info_t; -.. _ca-descr-info: +.. c:type:: ca_descr_info ca_descr_info_t =============== @@ -48,7 +48,7 @@ ca_descr_info_t } ca_descr_info_t; -.. _ca-caps: +.. c:type:: ca_caps ca_caps_t ========= @@ -64,7 +64,7 @@ ca_caps_t } ca_cap_t; -.. _ca-msg: +.. c:type:: ca_msg ca_msg_t ======== @@ -81,7 +81,7 @@ ca_msg_t } ca_msg_t; -.. _ca-descr: +.. c:type:: ca_descr ca_descr_t ========== @@ -96,7 +96,7 @@ ca_descr_t } ca_descr_t; -.. _ca-pid: +.. c:type:: ca_pid ca-pid ====== diff --git a/Documentation/media/uapi/dvb/dmx-add-pid.rst b/Documentation/media/uapi/dvb/dmx-add-pid.rst index 6343035653ac..689cd1fc9142 100644 --- a/Documentation/media/uapi/dvb/dmx-add-pid.rst +++ b/Documentation/media/uapi/dvb/dmx-add-pid.rst @@ -15,34 +15,18 @@ DMX_ADD_PID Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = DMX_ADD_PID, __u16 *) +.. c:function:: int ioctl(fd, DMX_ADD_PID, __u16 *pid) + :name: DMX_ADD_PID Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_ADD_PID for this command. - - - .. row 3 - - - __u16 * - - - PID number to be filtered. +``pid`` + PID number to be filtered. Description diff --git a/Documentation/media/uapi/dvb/dmx-fclose.rst b/Documentation/media/uapi/dvb/dmx-fclose.rst index f54c2a1220c1..ca93c23cde6d 100644 --- a/Documentation/media/uapi/dvb/dmx-fclose.rst +++ b/Documentation/media/uapi/dvb/dmx-fclose.rst @@ -15,23 +15,15 @@ DVB demux close() Synopsis -------- -.. cpp:function:: int close(int fd) +.. c:function:: int close(int fd) + :name: dvb-dmx-close Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - +``fd`` + File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. Description ----------- diff --git a/Documentation/media/uapi/dvb/dmx-fopen.rst b/Documentation/media/uapi/dvb/dmx-fopen.rst index 76dbb42713ad..a697e33c32ea 100644 --- a/Documentation/media/uapi/dvb/dmx-fopen.rst +++ b/Documentation/media/uapi/dvb/dmx-fopen.rst @@ -15,43 +15,34 @@ DVB demux open() Synopsis -------- -.. cpp:function:: int open(const char *deviceName, int flags) - +.. c:function:: int open(const char *deviceName, int flags) + :name: dvb-dmx-open Arguments --------- +``name`` + Name of specific DVB demux device. + +``flags`` + A bit-wise OR of the following flags: + .. flat-table:: :header-rows: 0 :stub-columns: 0 + - + - O_RDONLY + - read-only access - - .. row 1 - - - const char \*deviceName - - - Name of demux device. - - - .. row 2 - - - int flags - - - A bit-wise OR of the following flags: - - - .. row 3 - - - - - O_RDWR read/write access - - - .. row 4 - - - - - O_NONBLOCK open in non-blocking mode - - - .. row 5 + - + - O_RDWR + - read/write access - - - - (blocking mode is the default) + - + - O_NONBLOCK + - open in non-blocking mode + (blocking mode is the default) Description diff --git a/Documentation/media/uapi/dvb/dmx-fread.rst b/Documentation/media/uapi/dvb/dmx-fread.rst index d25b19e4f696..e8c7f4db353f 100644 --- a/Documentation/media/uapi/dvb/dmx-fread.rst +++ b/Documentation/media/uapi/dvb/dmx-fread.rst @@ -15,35 +15,20 @@ DVB demux read() Synopsis -------- -.. cpp:function:: size_t read(int fd, void *buf, size_t count) - +.. c:function:: size_t read(int fd, void *buf, size_t count) + :name: dvb-dmx-read Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). +``fd`` + File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. - - .. row 2 - - - void \*buf - - - Pointer to the buffer to be used for returned filtered data. - - - .. row 3 - - - size_t count - - - Size of buf. + ``buf`` + Buffer to be filled +``count`` + Max number of bytes to read Description ----------- @@ -53,10 +38,11 @@ data. The filtered data is transferred from the driver’s internal circular buffer to buf. The maximum amount of data to be transferred is implied by count. - Return Value ------------ +.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 diff --git a/Documentation/media/uapi/dvb/dmx-fwrite.rst b/Documentation/media/uapi/dvb/dmx-fwrite.rst index 9efd81a1b5c8..8a90dfe28307 100644 --- a/Documentation/media/uapi/dvb/dmx-fwrite.rst +++ b/Documentation/media/uapi/dvb/dmx-fwrite.rst @@ -15,35 +15,20 @@ DVB demux write() Synopsis -------- -.. cpp:function:: ssize_t write(int fd, const void *buf, size_t count) - +.. c:function:: ssize_t write(int fd, const void *buf, size_t count) + :name: dvb-dmx-write Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). +``fd`` + File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. - - .. row 2 - - - void \*buf - - - Pointer to the buffer containing the Transport Stream. - - - .. row 3 - - - size_t count - - - Size of buf. +``buf`` + Buffer with data to be written +``count`` + Number of bytes at the buffer Description ----------- @@ -59,11 +44,12 @@ The amount of data to be transferred is implied by count. Return Value ------------ +.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - - .. row 1 - ``EWOULDBLOCK`` diff --git a/Documentation/media/uapi/dvb/dmx-get-caps.rst b/Documentation/media/uapi/dvb/dmx-get-caps.rst index d0549eb7fbd3..145fb520d779 100644 --- a/Documentation/media/uapi/dvb/dmx-get-caps.rst +++ b/Documentation/media/uapi/dvb/dmx-get-caps.rst @@ -15,41 +15,23 @@ DMX_GET_CAPS Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = DMX_GET_CAPS, dmx_caps_t *) - +.. c:function:: int ioctl(fd, DMX_GET_CAPS, struct dmx_caps *caps) + :name: DMX_GET_CAPS Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - int request - - - Equals DMX_GET_CAPS for this command. - - - .. row 3 - - - dmx_caps_t * - - - Undocumented. +``caps`` + Pointer to struct :c:type:`dmx_caps` Description ----------- -This ioctl is undocumented. Documentation is welcome. - +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value ------------ diff --git a/Documentation/media/uapi/dvb/dmx-get-event.rst b/Documentation/media/uapi/dvb/dmx-get-event.rst index 6a7550c63bb5..8be626c29158 100644 --- a/Documentation/media/uapi/dvb/dmx-get-event.rst +++ b/Documentation/media/uapi/dvb/dmx-get-event.rst @@ -15,34 +15,18 @@ DMX_GET_EVENT Synopsis -------- -.. cpp:function:: int ioctl( int fd, int request = DMX_GET_EVENT, struct dmx_event *ev) +.. c:function:: int ioctl( int fd, DMX_GET_EVENT, struct dmx_event *ev) + :name: DMX_GET_EVENT Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_GET_EVENT for this command. - - - .. row 3 - - - struct dmx_event \*ev +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - Pointer to the location where the event is to be stored. +``ev`` + Pointer to the location where the event is to be stored. Description diff --git a/Documentation/media/uapi/dvb/dmx-get-pes-pids.rst b/Documentation/media/uapi/dvb/dmx-get-pes-pids.rst index ba5d30c913c8..b31634a1cca4 100644 --- a/Documentation/media/uapi/dvb/dmx-get-pes-pids.rst +++ b/Documentation/media/uapi/dvb/dmx-get-pes-pids.rst @@ -15,40 +15,23 @@ DMX_GET_PES_PIDS Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = DMX_GET_PES_PIDS, __u16[5]) - +.. c:function:: int ioctl(fd, DMX_GET_PES_PIDS, __u16 pids[5]) + :name: DMX_GET_PES_PIDS Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_GET_PES_PIDS for this command. - - - .. row 3 - - - __u16[5] +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - Undocumented. +``pids`` + Undocumented. Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/dmx-get-stc.rst b/Documentation/media/uapi/dvb/dmx-get-stc.rst index bd477bb67082..9fc501e8128a 100644 --- a/Documentation/media/uapi/dvb/dmx-get-stc.rst +++ b/Documentation/media/uapi/dvb/dmx-get-stc.rst @@ -15,34 +15,17 @@ DMX_GET_STC Synopsis -------- -.. cpp:function:: int ioctl( int fd, int request = DMX_GET_STC, struct dmx_stc *stc) - +.. c:function:: int ioctl( int fd, DMX_GET_STC, struct dmx_stc *stc) + :name: DMX_GET_STC Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_GET_STC for this command. - - - .. row 3 - - - struct dmx_stc \*stc - - - Pointer to the location where the stc is to be stored. +``stc`` + Pointer to the location where the stc is to be stored. Description @@ -63,8 +46,6 @@ On success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. - - .. flat-table:: :header-rows: 0 :stub-columns: 0 diff --git a/Documentation/media/uapi/dvb/dmx-remove-pid.rst b/Documentation/media/uapi/dvb/dmx-remove-pid.rst index c8f038b40074..e411495c619c 100644 --- a/Documentation/media/uapi/dvb/dmx-remove-pid.rst +++ b/Documentation/media/uapi/dvb/dmx-remove-pid.rst @@ -15,34 +15,18 @@ DMX_REMOVE_PID Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = DMX_REMOVE_PID, __u16 *) +.. c:function:: int ioctl(fd, DMX_REMOVE_PID, __u16 *pid) + :name: DMX_REMOVE_PID Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_REMOVE_PID for this command. - - - .. row 3 - - - __u16 * - - - PID of the PES filter to be removed. +``pid`` + PID of the PES filter to be removed. Description diff --git a/Documentation/media/uapi/dvb/dmx-set-buffer-size.rst b/Documentation/media/uapi/dvb/dmx-set-buffer-size.rst index 8ae48cf39cda..f2f7379f29ed 100644 --- a/Documentation/media/uapi/dvb/dmx-set-buffer-size.rst +++ b/Documentation/media/uapi/dvb/dmx-set-buffer-size.rst @@ -15,35 +15,18 @@ DMX_SET_BUFFER_SIZE Synopsis -------- -.. cpp:function:: int ioctl( int fd, int request = DMX_SET_BUFFER_SIZE, unsigned long size) +.. c:function:: int ioctl( int fd, DMX_SET_BUFFER_SIZE, unsigned long size) + :name: DMX_SET_BUFFER_SIZE Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_SET_BUFFER_SIZE for this command. - - - .. row 3 - - - unsigned long size - - - Size of circular buffer. +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. +``size`` + Unsigned long size Description ----------- diff --git a/Documentation/media/uapi/dvb/dmx-set-filter.rst b/Documentation/media/uapi/dvb/dmx-set-filter.rst index 8c929fa9b98c..1d50c803d69a 100644 --- a/Documentation/media/uapi/dvb/dmx-set-filter.rst +++ b/Documentation/media/uapi/dvb/dmx-set-filter.rst @@ -15,34 +15,18 @@ DMX_SET_FILTER Synopsis -------- -.. cpp:function:: int ioctl( int fd, int request = DMX_SET_FILTER, struct dmx_sct_filter_params *params) - +.. c:function:: int ioctl( int fd, DMX_SET_FILTER, struct dmx_sct_filter_params *params) + :name: DMX_SET_FILTER Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_SET_FILTER for this command. - - - .. row 3 +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - struct dmx_sct_filter_params \*params +``params`` - - Pointer to structure containing filter parameters. + Pointer to structure containing filter parameters. Description diff --git a/Documentation/media/uapi/dvb/dmx-set-pes-filter.rst b/Documentation/media/uapi/dvb/dmx-set-pes-filter.rst index addc321011ce..145451d04f7d 100644 --- a/Documentation/media/uapi/dvb/dmx-set-pes-filter.rst +++ b/Documentation/media/uapi/dvb/dmx-set-pes-filter.rst @@ -15,34 +15,19 @@ DMX_SET_PES_FILTER Synopsis -------- -.. cpp:function:: int ioctl( int fd, int request = DMX_SET_PES_FILTER, struct dmx_pes_filter_params *params) +.. c:function:: int ioctl( int fd, DMX_SET_PES_FILTER, struct dmx_pes_filter_params *params) + :name: DMX_SET_PES_FILTER Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - File descriptor returned by a previous call to open(). +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - .. row 2 - - - int request - - - Equals DMX_SET_PES_FILTER for this command. - - - .. row 3 - - - struct dmx_pes_filter_params \*params - - - Pointer to structure containing filter parameters. +``params`` + Pointer to structure containing filter parameters. Description @@ -61,7 +46,7 @@ On success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. - +.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| .. flat-table:: :header-rows: 0 diff --git a/Documentation/media/uapi/dvb/dmx-set-source.rst b/Documentation/media/uapi/dvb/dmx-set-source.rst index 99a8d5c82756..ac7f77b25e06 100644 --- a/Documentation/media/uapi/dvb/dmx-set-source.rst +++ b/Documentation/media/uapi/dvb/dmx-set-source.rst @@ -15,40 +15,25 @@ DMX_SET_SOURCE Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = DMX_SET_SOURCE, dmx_source_t *) +.. c:function:: int ioctl(fd, DMX_SET_SOURCE, struct dmx_source *src) + :name: DMX_SET_SOURCE Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_SET_SOURCE for this command. - - - .. row 3 - - - dmx_source_t * - - - Undocumented. +``src`` + Undocumented. Description ----------- -This ioctl is undocumented. Documentation is welcome. +.. note:: This ioctl is undocumented. Documentation is welcome. Return Value diff --git a/Documentation/media/uapi/dvb/dmx-start.rst b/Documentation/media/uapi/dvb/dmx-start.rst index 9835d1e78400..641f3e017fb1 100644 --- a/Documentation/media/uapi/dvb/dmx-start.rst +++ b/Documentation/media/uapi/dvb/dmx-start.rst @@ -15,29 +15,15 @@ DMX_START Synopsis -------- -.. cpp:function:: int ioctl( int fd, int request = DMX_START) +.. c:function:: int ioctl( int fd, DMX_START) + :name: DMX_START Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_START for this command. - +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. Description ----------- @@ -53,7 +39,7 @@ On success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. - +.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| .. flat-table:: :header-rows: 0 diff --git a/Documentation/media/uapi/dvb/dmx-stop.rst b/Documentation/media/uapi/dvb/dmx-stop.rst index 7e4bf09fc83e..569a3df44923 100644 --- a/Documentation/media/uapi/dvb/dmx-stop.rst +++ b/Documentation/media/uapi/dvb/dmx-stop.rst @@ -15,29 +15,15 @@ DMX_STOP Synopsis -------- -.. cpp:function:: int ioctl( int fd, int request = DMX_STOP) +.. c:function:: int ioctl( int fd, DMX_STOP) + :name: DMX_STOP Arguments --------- -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals DMX_STOP for this command. - +``fd`` + File descriptor returned by :c:func:`open() <dvb-dmx-open>`. Description ----------- diff --git a/Documentation/media/uapi/dvb/dmx_types.rst b/Documentation/media/uapi/dvb/dmx_types.rst index 7a8900af2680..80dd659860d7 100644 --- a/Documentation/media/uapi/dvb/dmx_types.rst +++ b/Documentation/media/uapi/dvb/dmx_types.rst @@ -6,14 +6,12 @@ Demux Data Types **************** - -.. _dmx-output-t: - Output for the demux ==================== +.. c:type:: dmx_output -.. _dmx-output: +.. tabularcolumns:: |p{5.0cm}|p{12.5cm}| .. flat-table:: enum dmx_output :header-rows: 1 @@ -65,12 +63,10 @@ Output for the demux from the DMX device. - -.. _dmx-input-t: - dmx_input_t =========== +.. c:type:: dmx_input .. code-block:: c @@ -81,11 +77,11 @@ dmx_input_t } dmx_input_t; -.. _dmx-pes-type-t: - dmx_pes_type_t ============== +.. c:type:: dmx_pes_type + .. code-block:: c @@ -119,11 +115,10 @@ dmx_pes_type_t } dmx_pes_type_t; -.. _dmx-filter: - struct dmx_filter ================= +.. c:type:: dmx_filter .. code-block:: c @@ -135,7 +130,7 @@ struct dmx_filter } dmx_filter_t; -.. _dmx-sct-filter-params: +.. c:type:: dmx_sct_filter_params struct dmx_sct_filter_params ============================ @@ -156,11 +151,10 @@ struct dmx_sct_filter_params }; -.. _dmx-pes-filter-params: - struct dmx_pes_filter_params ============================ +.. c:type:: dmx_pes_filter_params .. code-block:: c @@ -174,11 +168,10 @@ struct dmx_pes_filter_params }; -.. _dmx-event: - struct dmx_event ================ +.. c:type:: dmx_event .. code-block:: c @@ -193,11 +186,10 @@ struct dmx_event }; -.. _dmx-stc: - struct dmx_stc ============== +.. c:type:: dmx_stc .. code-block:: c @@ -208,11 +200,10 @@ struct dmx_stc }; -.. _dmx-caps: - struct dmx_caps =============== +.. c:type:: dmx_caps .. code-block:: c @@ -222,15 +213,14 @@ struct dmx_caps } dmx_caps_t; -.. _dmx-source-t: - -enum dmx_source_t -================= +enum dmx_source +=============== +.. c:type:: dmx_source .. code-block:: c - typedef enum { + typedef enum dmx_source { DMX_SOURCE_FRONT0 = 0, DMX_SOURCE_FRONT1, DMX_SOURCE_FRONT2, diff --git a/Documentation/media/uapi/dvb/dtv-fe-stats.rst b/Documentation/media/uapi/dvb/dtv-fe-stats.rst index 7c105e2ab27e..e8a02a1f138d 100644 --- a/Documentation/media/uapi/dvb/dtv-fe-stats.rst +++ b/Documentation/media/uapi/dvb/dtv-fe-stats.rst @@ -1,6 +1,6 @@ .. -*- coding: utf-8; mode: rst -*- -.. _dtv-fe-stats: +.. c:type:: dtv_fe_stats ******************* struct dtv_fe_stats diff --git a/Documentation/media/uapi/dvb/dtv-properties.rst b/Documentation/media/uapi/dvb/dtv-properties.rst index c13be5de4302..48c4e834ad11 100644 --- a/Documentation/media/uapi/dvb/dtv-properties.rst +++ b/Documentation/media/uapi/dvb/dtv-properties.rst @@ -1,6 +1,6 @@ .. -*- coding: utf-8; mode: rst -*- -.. _dtv-properties: +.. c:type:: dtv_properties ********************* struct dtv_properties diff --git a/Documentation/media/uapi/dvb/dtv-property.rst b/Documentation/media/uapi/dvb/dtv-property.rst index 5073a49def2a..3ddc3474b00e 100644 --- a/Documentation/media/uapi/dvb/dtv-property.rst +++ b/Documentation/media/uapi/dvb/dtv-property.rst @@ -1,6 +1,6 @@ .. -*- coding: utf-8; mode: rst -*- -.. _dtv-property: +.. c:type:: dtv_property ******************* struct dtv_property diff --git a/Documentation/media/uapi/dvb/dtv-stats.rst b/Documentation/media/uapi/dvb/dtv-stats.rst index 2cfdca00f164..35239e72bf74 100644 --- a/Documentation/media/uapi/dvb/dtv-stats.rst +++ b/Documentation/media/uapi/dvb/dtv-stats.rst @@ -1,6 +1,6 @@ .. -*- coding: utf-8; mode: rst -*- -.. _dtv-stats: +.. c:type:: dtv_stats **************** struct dtv_stats diff --git a/Documentation/media/uapi/dvb/dvb-fe-read-status.rst b/Documentation/media/uapi/dvb/dvb-fe-read-status.rst index fcffaa7e1463..76c20612b274 100644 --- a/Documentation/media/uapi/dvb/dvb-fe-read-status.rst +++ b/Documentation/media/uapi/dvb/dvb-fe-read-status.rst @@ -17,7 +17,9 @@ using :ref:`FE_READ_STATUS`. Signal statistics are provided via :ref:`FE_GET_PROPERTY`. -.. note:: Most statistics require the demodulator to be fully locked +.. note:: + + Most statistics require the demodulator to be fully locked (e. g. with FE_HAS_LOCK bit set). See :ref:`Frontend statistics indicators <frontend-stat-properties>` for more details. diff --git a/Documentation/media/uapi/dvb/dvb-frontend-event.rst b/Documentation/media/uapi/dvb/dvb-frontend-event.rst index 78e72feaa178..2088bc6cacd8 100644 --- a/Documentation/media/uapi/dvb/dvb-frontend-event.rst +++ b/Documentation/media/uapi/dvb/dvb-frontend-event.rst @@ -1,6 +1,6 @@ .. -*- coding: utf-8; mode: rst -*- -.. _dvb-frontend-event: +.. c:type:: dvb_frontend_event *************** frontend events diff --git a/Documentation/media/uapi/dvb/dvb-frontend-parameters.rst b/Documentation/media/uapi/dvb/dvb-frontend-parameters.rst index 16cb581d5cff..bf31411fc9df 100644 --- a/Documentation/media/uapi/dvb/dvb-frontend-parameters.rst +++ b/Documentation/media/uapi/dvb/dvb-frontend-parameters.rst @@ -1,6 +1,6 @@ .. -*- coding: utf-8; mode: rst -*- -.. _dvb-frontend-parameters: +.. c:type:: dvb_frontend_parameters ******************* frontend parameters @@ -49,7 +49,7 @@ frontends the ``frequency`` specifies the absolute frequency and is given in Hz. -.. _dvb-qpsk-parameters: +.. c:type:: dvb_qpsk_parameters QPSK parameters =============== @@ -66,7 +66,7 @@ structure: }; -.. _dvb-qam-parameters: +.. c:type:: dvb_qam_parameters QAM parameters ============== @@ -83,7 +83,7 @@ for cable QAM frontend you use the ``dvb_qam_parameters`` structure: }; -.. _dvb-vsb-parameters: +.. c:type:: dvb_vsb_parameters VSB parameters ============== @@ -98,7 +98,7 @@ ATSC frontends are supported by the ``dvb_vsb_parameters`` structure: }; -.. _dvb-ofdm-parameters: +.. c:type:: dvb_ofdm_parameters OFDM parameters =============== diff --git a/Documentation/media/uapi/dvb/dvbapi.rst b/Documentation/media/uapi/dvb/dvbapi.rst index 48e61aba741e..37680137e3f2 100644 --- a/Documentation/media/uapi/dvb/dvbapi.rst +++ b/Documentation/media/uapi/dvb/dvbapi.rst @@ -8,7 +8,9 @@ Part II - Digital TV API ######################## -.. note:: This API is also known as **DVB API**, although it is generic +.. note:: + + This API is also known as **DVB API**, although it is generic enough to support all digital TV standards. **Version 5.10** diff --git a/Documentation/media/uapi/dvb/dvbproperty.rst b/Documentation/media/uapi/dvb/dvbproperty.rst index cd0511b06c2c..dd2d71ce43fa 100644 --- a/Documentation/media/uapi/dvb/dvbproperty.rst +++ b/Documentation/media/uapi/dvb/dvbproperty.rst @@ -20,8 +20,10 @@ Also, the union didn't have any space left to be expanded without breaking userspace. So, the decision was to deprecate the legacy union/struct based approach, in favor of a properties set approach. -.. note:: On Linux DVB API version 3, setting a frontend were done via - :ref:`struct dvb_frontend_parameters <dvb-frontend-parameters>`. +.. note:: + + On Linux DVB API version 3, setting a frontend were done via + struct :c:type:`dvb_frontend_parameters`. This got replaced on version 5 (also called "S2API", as this API were added originally_enabled to provide support for DVB-S2), because the old API has a very limited support to new standards and new hardware. diff --git a/Documentation/media/uapi/dvb/examples.rst b/Documentation/media/uapi/dvb/examples.rst index bf0a8617de92..1a94966312c0 100644 --- a/Documentation/media/uapi/dvb/examples.rst +++ b/Documentation/media/uapi/dvb/examples.rst @@ -9,7 +9,9 @@ Examples In this section we would like to present some examples for using the DVB API. -..note:: This section is out of date, and the code below won't even +.. note:: + + This section is out of date, and the code below won't even compile. Please refer to the `libdvbv5 <https://linuxtv.org/docs/libdvbv5/index.html>`__ for updated/recommended examples. diff --git a/Documentation/media/uapi/dvb/fe-bandwidth-t.rst b/Documentation/media/uapi/dvb/fe-bandwidth-t.rst index 8edaf1a8fbc8..70256180e9b3 100644 --- a/Documentation/media/uapi/dvb/fe-bandwidth-t.rst +++ b/Documentation/media/uapi/dvb/fe-bandwidth-t.rst @@ -1,13 +1,10 @@ .. -*- coding: utf-8; mode: rst -*- -.. _fe-bandwidth-t: - ****************** Frontend bandwidth ****************** - -.. _fe-bandwidth: +.. c:type:: fe_bandwidth .. flat-table:: enum fe_bandwidth :header-rows: 1 diff --git a/Documentation/media/uapi/dvb/fe-diseqc-recv-slave-reply.rst b/Documentation/media/uapi/dvb/fe-diseqc-recv-slave-reply.rst index 7bd02ac7bff4..302db2857f90 100644 --- a/Documentation/media/uapi/dvb/fe-diseqc-recv-slave-reply.rst +++ b/Documentation/media/uapi/dvb/fe-diseqc-recv-slave-reply.rst @@ -15,7 +15,8 @@ FE_DISEQC_RECV_SLAVE_REPLY - Receives reply from a DiSEqC 2.0 command Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct dvb_diseqc_slave_reply *argp ) +.. c:function:: int ioctl( int fd, FE_DISEQC_RECV_SLAVE_REPLY, struct dvb_diseqc_slave_reply *argp ) + :name: FE_DISEQC_RECV_SLAVE_REPLY Arguments @@ -24,12 +25,9 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_DISEQC_RECV_SLAVE_REPLY - ``argp`` pointer to struct - :ref:`dvb_diseqc_slave_reply <dvb-diseqc-slave-reply>` + :c:type:`dvb_diseqc_slave_reply` Description @@ -37,10 +35,9 @@ Description Receives reply from a DiSEqC 2.0 command. -.. _dvb-diseqc-slave-reply: +.. c:type:: dvb_diseqc_slave_reply -struct dvb_diseqc_slave_reply ------------------------------ +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct dvb_diseqc_slave_reply :header-rows: 0 diff --git a/Documentation/media/uapi/dvb/fe-diseqc-reset-overload.rst b/Documentation/media/uapi/dvb/fe-diseqc-reset-overload.rst index cab157054c13..75116f283faf 100644 --- a/Documentation/media/uapi/dvb/fe-diseqc-reset-overload.rst +++ b/Documentation/media/uapi/dvb/fe-diseqc-reset-overload.rst @@ -15,7 +15,8 @@ FE_DISEQC_RESET_OVERLOAD - Restores the power to the antenna subsystem, if it wa Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, NULL ) +.. c:function:: int ioctl( int fd, FE_DISEQC_RESET_OVERLOAD, NULL ) + :name: FE_DISEQC_RESET_OVERLOAD Arguments @@ -24,10 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_DISEQC_RESET_OVERLOAD - - Description =========== diff --git a/Documentation/media/uapi/dvb/fe-diseqc-send-burst.rst b/Documentation/media/uapi/dvb/fe-diseqc-send-burst.rst index 9b476545ef89..26272f2860bc 100644 --- a/Documentation/media/uapi/dvb/fe-diseqc-send-burst.rst +++ b/Documentation/media/uapi/dvb/fe-diseqc-send-burst.rst @@ -15,7 +15,8 @@ FE_DISEQC_SEND_BURST - Sends a 22KHz tone burst for 2x1 mini DiSEqC satellite se Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, enum fe_sec_mini_cmd *tone ) +.. c:function:: int ioctl( int fd, FE_DISEQC_SEND_BURST, enum fe_sec_mini_cmd *tone ) + :name: FE_DISEQC_SEND_BURST Arguments @@ -24,11 +25,8 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_DISEQC_SEND_BURST - ``tone`` - pointer to enum :ref:`fe_sec_mini_cmd <fe-sec-mini-cmd>` + pointer to enum :c:type:`fe_sec_mini_cmd` Description @@ -41,12 +39,7 @@ read/write permissions. It provides support for what's specified at `Digital Satellite Equipment Control (DiSEqC) - Simple "ToneBurst" Detection Circuit specification. <http://www.eutelsat.com/files/contributed/satellites/pdf/Diseqc/associated%20docs/simple_tone_burst_detec.pdf>`__ -.. _fe-sec-mini-cmd-t: - -enum fe_sec_mini_cmd -==================== - -.. _fe-sec-mini-cmd: +.. c:type:: fe_sec_mini_cmd .. flat-table:: enum fe_sec_mini_cmd :header-rows: 1 diff --git a/Documentation/media/uapi/dvb/fe-diseqc-send-master-cmd.rst b/Documentation/media/uapi/dvb/fe-diseqc-send-master-cmd.rst index 58a5e6ac10bd..bbcab3df39b5 100644 --- a/Documentation/media/uapi/dvb/fe-diseqc-send-master-cmd.rst +++ b/Documentation/media/uapi/dvb/fe-diseqc-send-master-cmd.rst @@ -15,7 +15,8 @@ FE_DISEQC_SEND_MASTER_CMD - Sends a DiSEqC command Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct dvb_diseqc_master_cmd *argp ) +.. c:function:: int ioctl( int fd, FE_DISEQC_SEND_MASTER_CMD, struct dvb_diseqc_master_cmd *argp ) + :name: FE_DISEQC_SEND_MASTER_CMD Arguments @@ -24,12 +25,9 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_DISEQC_SEND_MASTER_CMD - ``argp`` pointer to struct - :ref:`dvb_diseqc_master_cmd <dvb-diseqc-master-cmd>` + :c:type:`dvb_diseqc_master_cmd` Description @@ -37,10 +35,10 @@ Description Sends a DiSEqC command to the antenna subsystem. -.. _dvb-diseqc-master-cmd: -struct dvb_diseqc_master_cmd -============================ +.. c:type:: dvb_diseqc_master_cmd + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct dvb_diseqc_master_cmd :header-rows: 0 diff --git a/Documentation/media/uapi/dvb/fe-dishnetwork-send-legacy-cmd.rst b/Documentation/media/uapi/dvb/fe-dishnetwork-send-legacy-cmd.rst index d47e9dbf558a..f41371f12456 100644 --- a/Documentation/media/uapi/dvb/fe-dishnetwork-send-legacy-cmd.rst +++ b/Documentation/media/uapi/dvb/fe-dishnetwork-send-legacy-cmd.rst @@ -15,22 +15,18 @@ FE_DISHNETWORK_SEND_LEGACY_CMD Synopsis ======== -.. cpp:function:: int ioctl(int fd, int request = FE_DISHNETWORK_SEND_LEGACY_CMD, unsigned long cmd) +.. c:function:: int ioctl(int fd, FE_DISHNETWORK_SEND_LEGACY_CMD, unsigned long cmd) + :name: FE_DISHNETWORK_SEND_LEGACY_CMD Arguments ========= -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by :c:func:`open() <dvb-fe-open>`. - - - .. row 1 - - - unsigned long cmd - - - sends the specified raw cmd to the dish via DISEqC. +``cmd`` + Sends the specified raw cmd to the dish via DISEqC. Description diff --git a/Documentation/media/uapi/dvb/fe-enable-high-lnb-voltage.rst b/Documentation/media/uapi/dvb/fe-enable-high-lnb-voltage.rst index de99bf5fbf0e..bacafbc462d2 100644 --- a/Documentation/media/uapi/dvb/fe-enable-high-lnb-voltage.rst +++ b/Documentation/media/uapi/dvb/fe-enable-high-lnb-voltage.rst @@ -15,7 +15,8 @@ FE_ENABLE_HIGH_LNB_VOLTAGE - Select output DC level between normal LNBf voltages Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, unsigned int high ) +.. c:function:: int ioctl( int fd, FE_ENABLE_HIGH_LNB_VOLTAGE, unsigned int high ) + :name: FE_ENABLE_HIGH_LNB_VOLTAGE Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_ENABLE_HIGH_LNB_VOLTAGE - ``high`` Valid flags: diff --git a/Documentation/media/uapi/dvb/fe-get-event.rst b/Documentation/media/uapi/dvb/fe-get-event.rst index ffa3d04c6bd4..8a719c33073d 100644 --- a/Documentation/media/uapi/dvb/fe-get-event.rst +++ b/Documentation/media/uapi/dvb/fe-get-event.rst @@ -11,43 +11,24 @@ Name FE_GET_EVENT +.. attention:: This ioctl is deprecated. + Synopsis ======== -.. cpp:function:: int ioctl(int fd, int request = QPSK_GET_EVENT, struct dvb_frontend_event *ev) +.. c:function:: int ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev) + :name: FE_GET_EVENT Arguments ========= -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals :ref:`FE_GET_EVENT` for this command. - - - .. row 3 - - - struct dvb_frontend_event \*ev - - - Points to the location where the event, - - - .. row 4 +``fd`` + File descriptor returned by :c:func:`open() <dvb-fe-open>`. - - - - if any, is to be stored. +``ev`` + Points to the location where the event, if any, is to be stored. Description diff --git a/Documentation/media/uapi/dvb/fe-get-frontend.rst b/Documentation/media/uapi/dvb/fe-get-frontend.rst index 5d2df808df18..d53a3f8237c3 100644 --- a/Documentation/media/uapi/dvb/fe-get-frontend.rst +++ b/Documentation/media/uapi/dvb/fe-get-frontend.rst @@ -11,39 +11,25 @@ Name FE_GET_FRONTEND +.. attention:: This ioctl is deprecated. + Synopsis ======== -.. cpp:function:: int ioctl(int fd, int request = FE_GET_FRONTEND, struct dvb_frontend_parameters *p) +.. c:function:: int ioctl(int fd, FE_GET_FRONTEND, struct dvb_frontend_parameters *p) + :name: FE_GET_FRONTEND Arguments ========= -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals :ref:`FE_SET_FRONTEND` for this - command. - - - .. row 3 +``fd`` + File descriptor returned by :c:func:`open() <dvb-fe-open>`. - - struct dvb_frontend_parameters \*p - - Points to parameters for tuning operation. +``p`` + Points to parameters for tuning operation. Description diff --git a/Documentation/media/uapi/dvb/fe-get-info.rst b/Documentation/media/uapi/dvb/fe-get-info.rst index bb6c32e47ce8..e3d64b251f61 100644 --- a/Documentation/media/uapi/dvb/fe-get-info.rst +++ b/Documentation/media/uapi/dvb/fe-get-info.rst @@ -15,7 +15,8 @@ FE_GET_INFO - Query DVB frontend capabilities and returns information about the Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct dvb_frontend_info *argp ) +.. c:function:: int ioctl( int fd, FE_GET_INFO, struct dvb_frontend_info *argp ) + :name: FE_GET_INFO Arguments @@ -24,12 +25,9 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_GET_INFO - ``argp`` pointer to struct struct - :ref:`dvb_frontend_info <dvb-frontend-info>` + :c:type:`dvb_frontend_info` Description @@ -42,10 +40,9 @@ takes a pointer to dvb_frontend_info which is filled by the driver. When the driver is not compatible with this specification the ioctl returns an error. -.. _dvb-frontend-info: +.. c:type:: dvb_frontend_info -struct dvb_frontend_info -======================== +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct dvb_frontend_info :header-rows: 0 @@ -137,18 +134,18 @@ struct dvb_frontend_info - .. row 11 - - enum :ref:`fe_caps <fe-caps>` + - enum :c:type:`fe_caps` - caps - Capabilities supported by the frontend -.. note:: The frequencies are specified in Hz for Terrestrial and Cable - systems. They're specified in kHz for Satellite systems +.. note:: + The frequencies are specified in Hz for Terrestrial and Cable + systems. They're specified in kHz for Satellite systems -.. _fe-caps-t: frontend capabilities ===================== @@ -156,8 +153,9 @@ frontend capabilities Capabilities describe what a frontend can do. Some capabilities are supported only on some specific frontend types. +.. c:type:: fe_caps -.. _fe-caps: +.. tabularcolumns:: |p{6.5cm}|p{11.0cm}| .. flat-table:: enum fe_caps :header-rows: 1 diff --git a/Documentation/media/uapi/dvb/fe-get-property.rst b/Documentation/media/uapi/dvb/fe-get-property.rst index 749daafe6b21..015d4db597b5 100644 --- a/Documentation/media/uapi/dvb/fe-get-property.rst +++ b/Documentation/media/uapi/dvb/fe-get-property.rst @@ -15,7 +15,11 @@ FE_SET_PROPERTY - FE_GET_PROPERTY - FE_SET_PROPERTY sets one or more frontend pr Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct dtv_properties *argp ) +.. c:function:: int ioctl( int fd, FE_GET_PROPERTY, struct dtv_properties *argp ) + :name: FE_GET_PROPERTY + +.. c:function:: int ioctl( int fd, FE_SET_PROPERTY, struct dtv_properties *argp ) + :name: FE_SET_PROPERTY Arguments @@ -24,11 +28,8 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_SET_PROPERTY, FE_GET_PROPERTY - ``argp`` - pointer to struct :ref:`dtv_properties <dtv-properties>` + pointer to struct :c:type:`dtv_properties` Description diff --git a/Documentation/media/uapi/dvb/fe-read-ber.rst b/Documentation/media/uapi/dvb/fe-read-ber.rst index c2b5b417f5fb..e54972ad5250 100644 --- a/Documentation/media/uapi/dvb/fe-read-ber.rst +++ b/Documentation/media/uapi/dvb/fe-read-ber.rst @@ -11,37 +11,23 @@ Name FE_READ_BER +.. attention:: This ioctl is deprecated. + Synopsis ======== -.. cpp:function:: int ioctl(int fd, int request = FE_READ_BER, uint32_t *ber) +.. c:function:: int ioctl(int fd, FE_READ_BER, uint32_t *ber) + :name: FE_READ_BER Arguments ========= -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals :ref:`FE_READ_BER` for this command. - - - .. row 3 - - - uint32_t \*ber +``fd`` + File descriptor returned by :c:func:`open() <dvb-fe-open>`. - - The bit error rate is stored into \*ber. +``ber`` + The bit error rate is stored into \*ber. Description diff --git a/Documentation/media/uapi/dvb/fe-read-signal-strength.rst b/Documentation/media/uapi/dvb/fe-read-signal-strength.rst index 0cdee2effc97..4b13c4757744 100644 --- a/Documentation/media/uapi/dvb/fe-read-signal-strength.rst +++ b/Documentation/media/uapi/dvb/fe-read-signal-strength.rst @@ -11,40 +11,23 @@ Name FE_READ_SIGNAL_STRENGTH +.. attention:: This ioctl is deprecated. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request = FE_READ_SIGNAL_STRENGTH, uint16_t *strength) +.. c:function:: int ioctl( int fd, FE_READ_SIGNAL_STRENGTH, uint16_t *strength) + :name: FE_READ_SIGNAL_STRENGTH Arguments ========= -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by :c:func:`open() <dvb-fe-open>`. - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals - :ref:`FE_READ_SIGNAL_STRENGTH` - for this command. - - - .. row 3 - - - uint16_t \*strength - - - The signal strength value is stored into \*strength. +``strength`` + The signal strength value is stored into \*strength. Description diff --git a/Documentation/media/uapi/dvb/fe-read-snr.rst b/Documentation/media/uapi/dvb/fe-read-snr.rst index 5394f9ae90f4..2aed487f5c99 100644 --- a/Documentation/media/uapi/dvb/fe-read-snr.rst +++ b/Documentation/media/uapi/dvb/fe-read-snr.rst @@ -11,38 +11,23 @@ Name FE_READ_SNR +.. attention:: This ioctl is deprecated. Synopsis ======== -.. cpp:function:: int ioctl(int fd, int request = FE_READ_SNR, int16_t *snr) +.. c:function:: int ioctl(int fd, FE_READ_SNR, int16_t *snr) + :name: FE_READ_SNR Arguments ========= -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by :c:func:`open() <dvb-fe-open>`. - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals :ref:`FE_READ_SNR` for this command. - - - .. row 3 - - - uint16_t \*snr - - - The signal-to-noise ratio is stored into \*snr. +``snr`` + The signal-to-noise ratio is stored into \*snr. Description diff --git a/Documentation/media/uapi/dvb/fe-read-status.rst b/Documentation/media/uapi/dvb/fe-read-status.rst index 624ed9d06488..812f086c20f5 100644 --- a/Documentation/media/uapi/dvb/fe-read-status.rst +++ b/Documentation/media/uapi/dvb/fe-read-status.rst @@ -15,7 +15,8 @@ FE_READ_STATUS - Returns status information about the front-end. This call only Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, unsigned int *status ) +.. c:function:: int ioctl( int fd, FE_READ_STATUS, unsigned int *status ) + :name: FE_READ_STATUS Arguments @@ -24,12 +25,9 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_READ_STATUS - ``status`` pointer to a bitmask integer filled with the values defined by enum - :ref:`fe_status <fe-status>`. + :c:type:`fe_status`. Description @@ -40,20 +38,23 @@ used to check about the locking status of the frontend after being tuned. The ioctl takes a pointer to an integer where the status will be written. -.. note:: The size of status is actually sizeof(enum fe_status), with +.. note:: + + The size of status is actually sizeof(enum fe_status), with varies according with the architecture. This needs to be fixed in the future. -.. _fe-status-t: - int fe_status ============= The fe_status parameter is used to indicate the current state and/or state changes of the frontend hardware. It is produced using the enum -:ref:`fe_status <fe-status>` values on a bitmask +:c:type:`fe_status` values on a bitmask + +.. c:type:: fe_status +.. tabularcolumns:: |p{3.5cm}|p{14.0cm}| .. _fe-status: diff --git a/Documentation/media/uapi/dvb/fe-read-uncorrected-blocks.rst b/Documentation/media/uapi/dvb/fe-read-uncorrected-blocks.rst index 5c29c058dfdc..46687c123402 100644 --- a/Documentation/media/uapi/dvb/fe-read-uncorrected-blocks.rst +++ b/Documentation/media/uapi/dvb/fe-read-uncorrected-blocks.rst @@ -11,40 +11,23 @@ Name FE_READ_UNCORRECTED_BLOCKS +.. attention:: This ioctl is deprecated. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request =FE_READ_UNCORRECTED_BLOCKS, uint32_t *ublocks) +.. c:function:: int ioctl( int fd, FE_READ_UNCORRECTED_BLOCKS, uint32_t *ublocks) + :name: FE_READ_UNCORRECTED_BLOCKS Arguments ========= -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 +``fd`` + File descriptor returned by :c:func:`open() <dvb-fe-open>`. - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals - :ref:`FE_READ_UNCORRECTED_BLOCKS` - for this command. - - - .. row 3 - - - uint32_t \*ublocks - - - The total number of uncorrected blocks seen by the driver so far. +``ublocks`` + The total number of uncorrected blocks seen by the driver so far. Description diff --git a/Documentation/media/uapi/dvb/fe-set-frontend-tune-mode.rst b/Documentation/media/uapi/dvb/fe-set-frontend-tune-mode.rst index 411abcf4de58..1d5878da2f41 100644 --- a/Documentation/media/uapi/dvb/fe-set-frontend-tune-mode.rst +++ b/Documentation/media/uapi/dvb/fe-set-frontend-tune-mode.rst @@ -15,7 +15,8 @@ FE_SET_FRONTEND_TUNE_MODE - Allow setting tuner mode flags to the frontend. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, unsigned int flags ) +.. c:function:: int ioctl( int fd, FE_SET_FRONTEND_TUNE_MODE, unsigned int flags ) + :name: FE_SET_FRONTEND_TUNE_MODE Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_SET_FRONTEND_TUNE_MODE - ``flags`` Valid flags: diff --git a/Documentation/media/uapi/dvb/fe-set-frontend.rst b/Documentation/media/uapi/dvb/fe-set-frontend.rst index 7cb70c38d534..7f97dce9aee6 100644 --- a/Documentation/media/uapi/dvb/fe-set-frontend.rst +++ b/Documentation/media/uapi/dvb/fe-set-frontend.rst @@ -6,6 +6,8 @@ FE_SET_FRONTEND *************** +.. attention:: This ioctl is deprecated. + Name ==== @@ -15,35 +17,18 @@ FE_SET_FRONTEND Synopsis ======== -.. cpp:function:: int ioctl(int fd, int request = FE_SET_FRONTEND, struct dvb_frontend_parameters *p) +.. c:function:: int ioctl(int fd, FE_SET_FRONTEND, struct dvb_frontend_parameters *p) + :name: FE_SET_FRONTEND Arguments ========= -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - - - - .. row 1 - - - int fd - - - File descriptor returned by a previous call to open(). - - - .. row 2 - - - int request - - - Equals :ref:`FE_SET_FRONTEND` for this - command. - - - .. row 3 - - - struct dvb_frontend_parameters \*p +``fd`` + File descriptor returned by :c:func:`open() <dvb-fe-open>`. - - Points to parameters for tuning operation. +``p`` + Points to parameters for tuning operation. Description diff --git a/Documentation/media/uapi/dvb/fe-set-tone.rst b/Documentation/media/uapi/dvb/fe-set-tone.rst index 545e2afba2c0..bea193234cb4 100644 --- a/Documentation/media/uapi/dvb/fe-set-tone.rst +++ b/Documentation/media/uapi/dvb/fe-set-tone.rst @@ -15,7 +15,8 @@ FE_SET_TONE - Sets/resets the generation of the continuous 22kHz tone. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, enum fe_sec_tone_mode *tone ) +.. c:function:: int ioctl( int fd, FE_SET_TONE, enum fe_sec_tone_mode *tone ) + :name: FE_SET_TONE Arguments @@ -24,11 +25,8 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_SET_TONE - ``tone`` - pointer to enum :ref:`fe_sec_tone_mode <fe-sec-tone-mode>` + pointer to enum :c:type:`fe_sec_tone_mode` Description @@ -47,12 +45,7 @@ this is done using the DiSEqC ioctls. capability of selecting the band. So, it is recommended that applications would change to SEC_TONE_OFF when the device is not used. -.. _fe-sec-tone-mode-t: - -enum fe_sec_tone_mode -===================== - -.. _fe-sec-tone-mode: +.. c:type:: fe_sec_tone_mode .. flat-table:: enum fe_sec_tone_mode :header-rows: 1 diff --git a/Documentation/media/uapi/dvb/fe-set-voltage.rst b/Documentation/media/uapi/dvb/fe-set-voltage.rst index 2b19086b660a..fcf6f38ef18e 100644 --- a/Documentation/media/uapi/dvb/fe-set-voltage.rst +++ b/Documentation/media/uapi/dvb/fe-set-voltage.rst @@ -15,7 +15,8 @@ FE_SET_VOLTAGE - Allow setting the DC level sent to the antenna subsystem. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, enum fe_sec_voltage *voltage ) +.. c:function:: int ioctl( int fd, FE_SET_VOLTAGE, enum fe_sec_voltage *voltage ) + :name: FE_SET_VOLTAGE Arguments @@ -24,14 +25,11 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_SET_VOLTAGE - ``voltage`` - pointer to enum :ref:`fe_sec_voltage <fe-sec-voltage>` + pointer to enum :c:type:`fe_sec_voltage` Valid values are described at enum - :ref:`fe_sec_voltage <fe-sec-voltage>`. + :c:type:`fe_sec_voltage`. Description diff --git a/Documentation/media/uapi/dvb/fe-type-t.rst b/Documentation/media/uapi/dvb/fe-type-t.rst index 8ca762b42e4d..548b965188d0 100644 --- a/Documentation/media/uapi/dvb/fe-type-t.rst +++ b/Documentation/media/uapi/dvb/fe-type-t.rst @@ -1,7 +1,5 @@ .. -*- coding: utf-8; mode: rst -*- -.. _fe-type-t: - ************* Frontend type ************* @@ -11,7 +9,9 @@ modulation used in transmission. The fontend types are given by fe_type_t type, defined as: -.. _fe-type: +.. c:type:: fe_type + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. flat-table:: Frontend types :header-rows: 1 @@ -76,7 +76,7 @@ at the above, as they're supported via the new ioctl's, using the :ref:`DTV_DELIVERY_SYSTEM <DTV-DELIVERY-SYSTEM>` parameter. -In the old days, struct :ref:`dvb_frontend_info <dvb-frontend-info>` +In the old days, struct :c:type:`dvb_frontend_info` used to contain ``fe_type_t`` field to indicate the delivery systems, filled with either FE_QPSK, FE_QAM, FE_OFDM or FE_ATSC. While this is still filled to keep backward compatibility, the usage of this field @@ -85,7 +85,7 @@ devices support multiple delivery systems. Please use :ref:`DTV_ENUM_DELSYS <DTV-ENUM-DELSYS>` instead. On devices that support multiple delivery systems, struct -:ref:`dvb_frontend_info <dvb-frontend-info>`::``fe_type_t`` is +:c:type:`dvb_frontend_info`::``fe_type_t`` is filled with the currently standard, as selected by the last call to :ref:`FE_SET_PROPERTY <FE_GET_PROPERTY>` using the :ref:`DTV_DELIVERY_SYSTEM <DTV-DELIVERY-SYSTEM>` property. diff --git a/Documentation/media/uapi/dvb/fe_property_parameters.rst b/Documentation/media/uapi/dvb/fe_property_parameters.rst index f776d62523da..7bb7559c4500 100644 --- a/Documentation/media/uapi/dvb/fe_property_parameters.rst +++ b/Documentation/media/uapi/dvb/fe_property_parameters.rst @@ -68,10 +68,10 @@ DTV_MODULATION Specifies the frontend modulation type for delivery systems that supports more than one modulation type. The modulation can be one of the -types defined by enum :ref:`fe_modulation <fe-modulation>`. +types defined by enum :c:type:`fe_modulation`. -.. _fe-modulation-t: +.. c:type:: fe_modulation Modulation property ------------------- @@ -82,8 +82,6 @@ enum contains the values used by the Kernel. Please note that not all modulations are supported by a given standard. -.. _fe-modulation: - .. flat-table:: enum fe_modulation :header-rows: 1 :stub-columns: 0 @@ -251,8 +249,7 @@ DTV_INVERSION Specifies if the frontend should do spectral inversion or not. - -.. _fe-spectral-inversion-t: +.. c:type:: fe_spectral_inversion enum fe_modulation: Frontend spectral inversion ----------------------------------------------- @@ -264,8 +261,6 @@ support, the DVB core will try to lock at the carrier first with inversion off. If it fails, it will try to enable inversion. -.. _fe-spectral-inversion: - .. flat-table:: enum fe_modulation :header-rows: 1 :stub-columns: 0 @@ -327,15 +322,11 @@ DTV_INNER_FEC Used cable/satellite transmissions. The acceptable values are: - -.. _fe-code-rate-t: +.. c:type:: fe_code_rate enum fe_code_rate: type of the Forward Error Correction. -------------------------------------------------------- - -.. _fe-code-rate: - .. flat-table:: enum fe_code_rate :header-rows: 1 :stub-columns: 0 @@ -464,7 +455,7 @@ voltage has to be switched consistently to the DiSEqC commands as described in the DiSEqC spec. -.. _fe-sec-voltage: +.. c:type:: fe_sec_voltage .. flat-table:: enum fe_sec_voltage :header-rows: 1 @@ -519,14 +510,12 @@ DTV_PILOT Sets DVB-S2 pilot -.. _fe-pilot-t: +.. c:type:: fe_pilot fe_pilot type ------------- -.. _fe-pilot: - .. flat-table:: enum fe_pilot :header-rows: 1 :stub-columns: 0 @@ -572,14 +561,12 @@ DTV_ROLLOFF Sets DVB-S2 rolloff -.. _fe-rolloff-t: +.. c:type:: fe_rolloff fe_rolloff type --------------- -.. _fe-rolloff: - .. flat-table:: enum fe_rolloff :header-rows: 1 :stub-columns: 0 @@ -657,7 +644,7 @@ DTV_DELIVERY_SYSTEM Specifies the type of Delivery system -.. _fe-delivery-system-t: +.. c:type:: fe_delivery_system fe_delivery_system type ----------------------- @@ -665,8 +652,6 @@ fe_delivery_system type Possible values: -.. _fe-delivery-system: - .. flat-table:: enum fe_delivery_system :header-rows: 1 :stub-columns: 0 @@ -1005,10 +990,9 @@ Possible values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1 (AUTO) Note: Truth table for ``DTV_ISDBT_SOUND_BROADCASTING`` and ``DTV_ISDBT_PARTIAL_RECEPTION`` and ``LAYER[A-C]_SEGMENT_COUNT`` - .. _isdbt-layer_seg-cnt-table: -.. flat-table:: +.. flat-table:: Truth table for ISDB-T Sound Broadcasting :header-rows: 0 :stub-columns: 0 @@ -1099,9 +1083,9 @@ The values here are referring to what can be found in the TMCC-structure, as shown in the table below. -.. _isdbt-layer-interleaving-table: +.. c:type:: isdbt_layer_interleaving_table -.. flat-table:: +.. flat-table:: ISDB-T time interleaving modes :header-rows: 0 :stub-columns: 0 @@ -1234,8 +1218,9 @@ Reed Solomon (RS) frame mode. Possible values are: +.. tabularcolumns:: |p{5.0cm}|p{12.5cm}| -.. _atscmh-rs-frame-mode: +.. c:type:: atscmh_rs_frame_mode .. flat-table:: enum atscmh_rs_frame_mode :header-rows: 1 @@ -1279,7 +1264,7 @@ Reed Solomon(RS) frame ensemble. Possible values are: -.. _atscmh-rs-frame-ensemble: +.. c:type:: atscmh_rs_frame_ensemble .. flat-table:: enum atscmh_rs_frame_ensemble :header-rows: 1 @@ -1328,7 +1313,7 @@ Reed Solomon (RS) code mode (primary). Possible values are: -.. _atscmh-rs-code-mode: +.. c:type:: atscmh_rs_code_mode .. flat-table:: enum atscmh_rs_code_mode :header-rows: 1 @@ -1383,7 +1368,7 @@ DTV_ATSCMH_RS_CODE_MODE_SEC Reed Solomon (RS) code mode (secondary). Possible values are the same as documented on enum -:ref:`atscmh_rs_code_mode <atscmh-rs-code-mode>`: +:c:type:`atscmh_rs_code_mode`: .. _DTV-ATSCMH-SCCC-BLOCK-MODE: @@ -1395,8 +1380,9 @@ Series Concatenated Convolutional Code Block Mode. Possible values are: +.. tabularcolumns:: |p{4.5cm}|p{13.0cm}| -.. _atscmh-sccc-block-mode: +.. c:type:: atscmh_sccc_block_mode .. flat-table:: enum atscmh_scc_block_mode :header-rows: 1 @@ -1447,7 +1433,7 @@ Series Concatenated Convolutional Code Rate. Possible values are: -.. _atscmh-sccc-code-mode: +.. c:type:: atscmh_sccc_code_mode .. flat-table:: enum atscmh_sccc_code_mode :header-rows: 1 @@ -1494,7 +1480,7 @@ DTV_ATSCMH_SCCC_CODE_MODE_B Series Concatenated Convolutional Code Rate. Possible values are the same as documented on enum -:ref:`atscmh_sccc_code_mode <atscmh-sccc-code-mode>`. +:c:type:`atscmh_sccc_code_mode`. .. _DTV-ATSCMH-SCCC-CODE-MODE-C: @@ -1505,7 +1491,7 @@ DTV_ATSCMH_SCCC_CODE_MODE_C Series Concatenated Convolutional Code Rate. Possible values are the same as documented on enum -:ref:`atscmh_sccc_code_mode <atscmh-sccc-code-mode>`. +:c:type:`atscmh_sccc_code_mode`. .. _DTV-ATSCMH-SCCC-CODE-MODE-D: @@ -1516,7 +1502,7 @@ DTV_ATSCMH_SCCC_CODE_MODE_D Series Concatenated Convolutional Code Rate. Possible values are the same as documented on enum -:ref:`atscmh_sccc_code_mode <atscmh-sccc-code-mode>`. +:c:type:`atscmh_sccc_code_mode`. .. _DTV-API-VERSION: @@ -1533,7 +1519,7 @@ DTV_CODE_RATE_HP ================ Used on terrestrial transmissions. The acceptable values are the ones -described at :ref:`fe_transmit_mode_t <fe-transmit-mode-t>`. +described at :c:type:`fe_transmit_mode`. .. _DTV-CODE-RATE-LP: @@ -1542,7 +1528,7 @@ DTV_CODE_RATE_LP ================ Used on terrestrial transmissions. The acceptable values are the ones -described at :ref:`fe_transmit_mode_t <fe-transmit-mode-t>`. +described at :c:type:`fe_transmit_mode`. .. _DTV-GUARD-INTERVAL: @@ -1553,14 +1539,12 @@ DTV_GUARD_INTERVAL Possible values are: -.. _fe-guard-interval-t: +.. c:type:: fe_guard_interval Modulation guard interval ------------------------- -.. _fe-guard-interval: - .. flat-table:: enum fe_guard_interval :header-rows: 1 :stub-columns: 0 @@ -1682,13 +1666,12 @@ Specifies the number of carriers used by the standard. This is used only on OFTM-based standards, e. g. DVB-T/T2, ISDB-T, DTMB -.. _fe-transmit-mode-t: +.. c:type:: fe_transmit_mode enum fe_transmit_mode: Number of carriers per channel ----------------------------------------------------- - -.. _fe-transmit-mode: +.. tabularcolumns:: |p{5.0cm}|p{12.5cm}| .. flat-table:: enum fe_transmit_mode :header-rows: 1 @@ -1799,14 +1782,12 @@ DTV_HIERARCHY Frontend hierarchy -.. _fe-hierarchy-t: +.. c:type:: fe_hierarchy Frontend hierarchy ------------------ -.. _fe-hierarchy: - .. flat-table:: enum fe_hierarchy :header-rows: 1 :stub-columns: 0 @@ -1912,7 +1893,7 @@ DTV_INTERLEAVING Time interleaving to be used. Currently, used only on DTMB. -.. _fe-interleaving: +.. c:type:: fe_interleaving .. flat-table:: enum fe_interleaving :header-rows: 1 diff --git a/Documentation/media/uapi/dvb/frontend-stat-properties.rst b/Documentation/media/uapi/dvb/frontend-stat-properties.rst index 0fc4aaa304ff..e73754fd0631 100644 --- a/Documentation/media/uapi/dvb/frontend-stat-properties.rst +++ b/Documentation/media/uapi/dvb/frontend-stat-properties.rst @@ -20,7 +20,7 @@ standards, up to 3 groups of statistics can be provided, and plus one metric per each carrier group (called "layer" on ISDB). So, in order to be consistent with other delivery systems, the first -value at :ref:`dtv_property.stat.dtv_stats <dtv-stats>` array refers +value at :c:type:`dtv_property.stat.dtv_stats <dtv_stats>` array refers to the global metric. The other elements of the array represent each layer, starting from layer A(index 1), layer B (index 2) and so on. diff --git a/Documentation/media/uapi/dvb/frontend.rst b/Documentation/media/uapi/dvb/frontend.rst index 48c5cd487ce7..e051a9012540 100644 --- a/Documentation/media/uapi/dvb/frontend.rst +++ b/Documentation/media/uapi/dvb/frontend.rst @@ -29,7 +29,9 @@ The frontend can be accessed through ``/dev/dvb/adapter?/frontend?``. Data types and ioctl definitions can be accessed by including ``linux/dvb/frontend.h`` in your application. -.. note:: Transmission via the internet (DVB-IP) is not yet handled by this +.. note:: + + Transmission via the internet (DVB-IP) is not yet handled by this API but a future extension is possible. On Satellite systems, the API support for the Satellite Equipment diff --git a/Documentation/media/uapi/dvb/frontend_f_close.rst b/Documentation/media/uapi/dvb/frontend_f_close.rst index 5cce9262084c..f3b04b60246c 100644 --- a/Documentation/media/uapi/dvb/frontend_f_close.rst +++ b/Documentation/media/uapi/dvb/frontend_f_close.rst @@ -20,14 +20,14 @@ Synopsis #include <unistd.h> -.. cpp:function:: int close( int fd ) - +.. c:function:: int close( int fd ) + :name: dvb-fe-close Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <func-open>`. + File descriptor returned by :c:func:`open() <dvb-fe-open>`. Description diff --git a/Documentation/media/uapi/dvb/frontend_f_open.rst b/Documentation/media/uapi/dvb/frontend_f_open.rst index e0c55345f524..690eb375bdc1 100644 --- a/Documentation/media/uapi/dvb/frontend_f_open.rst +++ b/Documentation/media/uapi/dvb/frontend_f_open.rst @@ -20,8 +20,8 @@ Synopsis #include <fcntl.h> -.. cpp:function:: int open( const char *device_name, int flags ) - +.. c:function:: int open( const char *device_name, int flags ) + :name: dvb-fe-open Arguments ========= diff --git a/Documentation/media/uapi/dvb/net-add-if.rst b/Documentation/media/uapi/dvb/net-add-if.rst index 2b990d0e0fe1..82ce2438213f 100644 --- a/Documentation/media/uapi/dvb/net-add-if.rst +++ b/Documentation/media/uapi/dvb/net-add-if.rst @@ -15,7 +15,8 @@ NET_ADD_IF - Creates a new network interface for a given Packet ID. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct dvb_net_if *net_if ) +.. c:function:: int ioctl( int fd, NET_ADD_IF, struct dvb_net_if *net_if ) + :name: NET_ADD_IF Arguments @@ -24,11 +25,8 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_SET_TONE - ``net_if`` - pointer to struct :ref:`dvb_net_if <dvb-net-if>` + pointer to struct :c:type:`dvb_net_if` Description @@ -40,16 +38,10 @@ ULE) and the interface number for the new interface to be created. When the system call successfully returns, a new virtual network interface is created. -The struct :ref:`dvb_net_if <dvb-net-if>`::ifnum field will be +The struct :c:type:`dvb_net_if`::ifnum field will be filled with the number of the created interface. - -.. _dvb-net-if-t: - -struct dvb_net_if description -============================= - -.. _dvb-net-if: +.. c:type:: dvb_net_if .. flat-table:: struct dvb_net_if :header-rows: 1 diff --git a/Documentation/media/uapi/dvb/net-get-if.rst b/Documentation/media/uapi/dvb/net-get-if.rst index 92b884143ccd..1bb8ee0cbced 100644 --- a/Documentation/media/uapi/dvb/net-get-if.rst +++ b/Documentation/media/uapi/dvb/net-get-if.rst @@ -15,7 +15,8 @@ NET_GET_IF - Read the configuration data of an interface created via - :ref:`NET Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct dvb_net_if *net_if ) +.. c:function:: int ioctl( int fd, NET_GET_IF, struct dvb_net_if *net_if ) + :name: NET_GET_IF Arguments @@ -24,19 +25,16 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_SET_TONE - ``net_if`` - pointer to struct :ref:`dvb_net_if <dvb-net-if>` + pointer to struct :c:type:`dvb_net_if` Description =========== The NET_GET_IF ioctl uses the interface number given by the struct -:ref:`dvb_net_if <dvb-net-if>`::ifnum field and fills the content of -struct :ref:`dvb_net_if <dvb-net-if>` with the packet ID and +:c:type:`dvb_net_if`::ifnum field and fills the content of +struct :c:type:`dvb_net_if` with the packet ID and encapsulation type used on such interface. If the interface was not created yet with :ref:`NET_ADD_IF <net>`, it will return -1 and fill the ``errno`` with ``EINVAL`` error code. diff --git a/Documentation/media/uapi/dvb/net-remove-if.rst b/Documentation/media/uapi/dvb/net-remove-if.rst index d374c1d63d06..646af23a925a 100644 --- a/Documentation/media/uapi/dvb/net-remove-if.rst +++ b/Documentation/media/uapi/dvb/net-remove-if.rst @@ -15,7 +15,8 @@ NET_REMOVE_IF - Removes a network interface. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, int ifnum ) +.. c:function:: int ioctl( int fd, NET_REMOVE_IF, int ifnum ) + :name: NET_REMOVE_IF Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <frontend_f_open>`. -``request`` - FE_SET_TONE - ``net_if`` number of the interface to be removed diff --git a/Documentation/media/uapi/dvb/video-clear-buffer.rst b/Documentation/media/uapi/dvb/video-clear-buffer.rst index 7c85aa06f013..2e51a78a69f1 100644 --- a/Documentation/media/uapi/dvb/video-clear-buffer.rst +++ b/Documentation/media/uapi/dvb/video-clear-buffer.rst @@ -11,11 +11,13 @@ Name VIDEO_CLEAR_BUFFER +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_CLEAR_BUFFER) +.. c:function:: int ioctl(fd, VIDEO_CLEAR_BUFFER) + :name: VIDEO_CLEAR_BUFFER Arguments diff --git a/Documentation/media/uapi/dvb/video-command.rst b/Documentation/media/uapi/dvb/video-command.rst index b1634f722cbd..536d0fdd8399 100644 --- a/Documentation/media/uapi/dvb/video-command.rst +++ b/Documentation/media/uapi/dvb/video-command.rst @@ -11,11 +11,13 @@ Name VIDEO_COMMAND +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = VIDEO_COMMAND, struct video_command *cmd) +.. c:function:: int ioctl(int fd, VIDEO_COMMAND, struct video_command *cmd) + :name: VIDEO_COMMAND Arguments @@ -57,6 +59,36 @@ subset of the ``v4l2_decoder_cmd`` struct, so refer to the :ref:`VIDIOC_DECODER_CMD` documentation for more information. +.. c:type:: struct video_command + +.. code-block:: c + + /* The structure must be zeroed before use by the application + This ensures it can be extended safely in the future. */ + struct video_command { + __u32 cmd; + __u32 flags; + union { + struct { + __u64 pts; + } stop; + + struct { + /* 0 or 1000 specifies normal speed, + 1 specifies forward single stepping, + -1 specifies backward single stepping, + >1: playback at speed/1000 of the normal speed, + <-1: reverse playback at (-speed/1000) of the normal speed. */ + __s32 speed; + __u32 format; + } play; + + struct { + __u32 data[16]; + } raw; + }; + }; + Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-continue.rst b/Documentation/media/uapi/dvb/video-continue.rst index c5acc094986f..030c2ec98869 100644 --- a/Documentation/media/uapi/dvb/video-continue.rst +++ b/Documentation/media/uapi/dvb/video-continue.rst @@ -11,11 +11,13 @@ Name VIDEO_CONTINUE +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_CONTINUE) +.. c:function:: int ioctl(fd, VIDEO_CONTINUE) + :name: VIDEO_CONTINUE Arguments diff --git a/Documentation/media/uapi/dvb/video-fast-forward.rst b/Documentation/media/uapi/dvb/video-fast-forward.rst index db338e9f5379..70a53e110335 100644 --- a/Documentation/media/uapi/dvb/video-fast-forward.rst +++ b/Documentation/media/uapi/dvb/video-fast-forward.rst @@ -11,11 +11,13 @@ Name VIDEO_FAST_FORWARD +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_FAST_FORWARD, int nFrames) +.. c:function:: int ioctl(fd, VIDEO_FAST_FORWARD, int nFrames) + :name: VIDEO_FAST_FORWARD Arguments diff --git a/Documentation/media/uapi/dvb/video-fclose.rst b/Documentation/media/uapi/dvb/video-fclose.rst index ebeaade0c351..8a997ae6f6a7 100644 --- a/Documentation/media/uapi/dvb/video-fclose.rst +++ b/Documentation/media/uapi/dvb/video-fclose.rst @@ -11,11 +11,12 @@ Name dvb video close() +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int close(int fd) +.. c:function:: int close(int fd) Arguments diff --git a/Documentation/media/uapi/dvb/video-fopen.rst b/Documentation/media/uapi/dvb/video-fopen.rst index 9e5471557b83..203a2c56f10a 100644 --- a/Documentation/media/uapi/dvb/video-fopen.rst +++ b/Documentation/media/uapi/dvb/video-fopen.rst @@ -11,11 +11,12 @@ Name dvb video open() +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int open(const char *deviceName, int flags) +.. c:function:: int open(const char *deviceName, int flags) Arguments @@ -82,6 +83,8 @@ return an error code. Return Value ------------ +.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 diff --git a/Documentation/media/uapi/dvb/video-freeze.rst b/Documentation/media/uapi/dvb/video-freeze.rst index d3d0dc31281a..9cef65a02e8d 100644 --- a/Documentation/media/uapi/dvb/video-freeze.rst +++ b/Documentation/media/uapi/dvb/video-freeze.rst @@ -11,11 +11,13 @@ Name VIDEO_FREEZE +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_FREEZE) +.. c:function:: int ioctl(fd, VIDEO_FREEZE) + :name: VIDEO_FREEZE Arguments diff --git a/Documentation/media/uapi/dvb/video-fwrite.rst b/Documentation/media/uapi/dvb/video-fwrite.rst index 045038f4181e..cfe7c57dcfc7 100644 --- a/Documentation/media/uapi/dvb/video-fwrite.rst +++ b/Documentation/media/uapi/dvb/video-fwrite.rst @@ -11,11 +11,12 @@ Name dvb video write() +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: size_t write(int fd, const void *buf, size_t count) +.. c:function:: size_t write(int fd, const void *buf, size_t count) Arguments diff --git a/Documentation/media/uapi/dvb/video-get-capabilities.rst b/Documentation/media/uapi/dvb/video-get-capabilities.rst index 94cbbba478a8..6987f659a1ad 100644 --- a/Documentation/media/uapi/dvb/video-get-capabilities.rst +++ b/Documentation/media/uapi/dvb/video-get-capabilities.rst @@ -11,11 +11,13 @@ Name VIDEO_GET_CAPABILITIES +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_GET_CAPABILITIES, unsigned int *cap) +.. c:function:: int ioctl(fd, VIDEO_GET_CAPABILITIES, unsigned int *cap) + :name: VIDEO_GET_CAPABILITIES Arguments diff --git a/Documentation/media/uapi/dvb/video-get-event.rst b/Documentation/media/uapi/dvb/video-get-event.rst index a1484a226518..6ad14cdb894a 100644 --- a/Documentation/media/uapi/dvb/video-get-event.rst +++ b/Documentation/media/uapi/dvb/video-get-event.rst @@ -11,11 +11,13 @@ Name VIDEO_GET_EVENT +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_GET_EVENT, struct video_event *ev) +.. c:function:: int ioctl(fd, VIDEO_GET_EVENT, struct video_event *ev) + :name: VIDEO_GET_EVENT Arguments @@ -62,6 +64,23 @@ included in the exceptfds argument, and for poll(), POLLPRI should be specified as the wake-up condition. Read-only permissions are sufficient for this ioctl call. +.. c:type:: video_event + +.. code-block:: c + + struct video_event { + __s32 type; + #define VIDEO_EVENT_SIZE_CHANGED 1 + #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 + #define VIDEO_EVENT_DECODER_STOPPED 3 + #define VIDEO_EVENT_VSYNC 4 + __kernel_time_t timestamp; + union { + video_size_t size; + unsigned int frame_rate; /* in frames per 1000sec */ + unsigned char vsync_field; /* unknown/odd/even/progressive */ + } u; + }; Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-get-frame-count.rst b/Documentation/media/uapi/dvb/video-get-frame-count.rst index 4ff100c2ee95..0ffe22cd6108 100644 --- a/Documentation/media/uapi/dvb/video-get-frame-count.rst +++ b/Documentation/media/uapi/dvb/video-get-frame-count.rst @@ -11,11 +11,13 @@ Name VIDEO_GET_FRAME_COUNT +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = VIDEO_GET_FRAME_COUNT, __u64 *pts) +.. c:function:: int ioctl(int fd, VIDEO_GET_FRAME_COUNT, __u64 *pts) + :name: VIDEO_GET_FRAME_COUNT Arguments diff --git a/Documentation/media/uapi/dvb/video-get-frame-rate.rst b/Documentation/media/uapi/dvb/video-get-frame-rate.rst index 131def962305..400042a854cf 100644 --- a/Documentation/media/uapi/dvb/video-get-frame-rate.rst +++ b/Documentation/media/uapi/dvb/video-get-frame-rate.rst @@ -11,11 +11,13 @@ Name VIDEO_GET_FRAME_RATE +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = VIDEO_GET_FRAME_RATE, unsigned int *rate) +.. c:function:: int ioctl(int fd, VIDEO_GET_FRAME_RATE, unsigned int *rate) + :name: VIDEO_GET_FRAME_RATE Arguments diff --git a/Documentation/media/uapi/dvb/video-get-navi.rst b/Documentation/media/uapi/dvb/video-get-navi.rst index 6c3034fe5fa2..114a9ac48b9e 100644 --- a/Documentation/media/uapi/dvb/video-get-navi.rst +++ b/Documentation/media/uapi/dvb/video-get-navi.rst @@ -11,11 +11,13 @@ Name VIDEO_GET_NAVI +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_GET_NAVI , video_navi_pack_t *navipack) +.. c:function:: int ioctl(fd, VIDEO_GET_NAVI , struct video_navi_pack *navipack) + :name: VIDEO_GET_NAVI Arguments @@ -52,6 +54,14 @@ This ioctl returns navigational information from the DVD stream. This is especially needed if an encoded stream has to be decoded by the hardware. +.. c:type:: video_navi_pack + +.. code-block::c + + typedef struct video_navi_pack { + int length; /* 0 ... 1024 */ + __u8 data[1024]; + } video_navi_pack_t; Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-get-pts.rst b/Documentation/media/uapi/dvb/video-get-pts.rst index 082612243bbb..c73f86f1d35b 100644 --- a/Documentation/media/uapi/dvb/video-get-pts.rst +++ b/Documentation/media/uapi/dvb/video-get-pts.rst @@ -11,11 +11,13 @@ Name VIDEO_GET_PTS +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = VIDEO_GET_PTS, __u64 *pts) +.. c:function:: int ioctl(int fd, VIDEO_GET_PTS, __u64 *pts) + :name: VIDEO_GET_PTS Arguments diff --git a/Documentation/media/uapi/dvb/video-get-size.rst b/Documentation/media/uapi/dvb/video-get-size.rst index c75e3c47c471..d077fe2305a0 100644 --- a/Documentation/media/uapi/dvb/video-get-size.rst +++ b/Documentation/media/uapi/dvb/video-get-size.rst @@ -11,11 +11,13 @@ Name VIDEO_GET_SIZE +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = VIDEO_GET_SIZE, video_size_t *size) +.. c:function:: int ioctl(int fd, VIDEO_GET_SIZE, video_size_t *size) + :name: VIDEO_GET_SIZE Arguments @@ -50,6 +52,16 @@ Description This ioctl returns the size and aspect ratio. +.. c:type:: video_size_t + +.. code-block::c + + typedef struct { + int w; + int h; + video_format_t aspect_ratio; + } video_size_t; + Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-get-status.rst b/Documentation/media/uapi/dvb/video-get-status.rst index ab9c2236df7e..ed6ea19827a6 100644 --- a/Documentation/media/uapi/dvb/video-get-status.rst +++ b/Documentation/media/uapi/dvb/video-get-status.rst @@ -11,11 +11,13 @@ Name VIDEO_GET_STATUS +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_GET_STATUS, struct video_status *status) +.. c:function:: int ioctl(fd, VIDEO_GET_STATUS, struct video_status *status) + :name: VIDEO_GET_STATUS Arguments @@ -51,6 +53,17 @@ Description This ioctl call asks the Video Device to return the current status of the device. +.. c:type:: video_status + +.. code-block:: c + + struct video_status { + int video_blank; /* blank video on freeze? */ + video_play_state_t play_state; /* current state of playback */ + video_stream_source_t stream_source; /* current source (demux/memory) */ + video_format_t video_format; /* current aspect ratio of stream*/ + video_displayformat_t display_format;/* selected cropping mode */ + }; Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-play.rst b/Documentation/media/uapi/dvb/video-play.rst index 943c4b755372..3f66ae3b7e35 100644 --- a/Documentation/media/uapi/dvb/video-play.rst +++ b/Documentation/media/uapi/dvb/video-play.rst @@ -11,11 +11,13 @@ Name VIDEO_PLAY +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_PLAY) +.. c:function:: int ioctl(fd, VIDEO_PLAY) + :name: VIDEO_PLAY Arguments diff --git a/Documentation/media/uapi/dvb/video-select-source.rst b/Documentation/media/uapi/dvb/video-select-source.rst index 0ee0d03dbeb2..2f4fbf4b490c 100644 --- a/Documentation/media/uapi/dvb/video-select-source.rst +++ b/Documentation/media/uapi/dvb/video-select-source.rst @@ -11,11 +11,13 @@ Name VIDEO_SELECT_SOURCE +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SELECT_SOURCE, video_stream_source_t source) +.. c:function:: int ioctl(fd, VIDEO_SELECT_SOURCE, video_stream_source_t source) + :name: VIDEO_SELECT_SOURCE Arguments @@ -56,6 +58,16 @@ This ioctl call informs the video device which source shall be used for the input data. The possible sources are demux or memory. If memory is selected, the data is fed to the video device through the write command. +.. c:type:: video_stream_source_t + +.. code-block:: c + + typedef enum { + VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ + VIDEO_SOURCE_MEMORY /* If this source is selected, the stream + comes from the user through the write + system call */ + } video_stream_source_t; Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-set-attributes.rst b/Documentation/media/uapi/dvb/video-set-attributes.rst index 326c5c876e80..b2f11a6746e9 100644 --- a/Documentation/media/uapi/dvb/video-set-attributes.rst +++ b/Documentation/media/uapi/dvb/video-set-attributes.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_ATTRIBUTES +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_ATTRIBUTE ,video_attributes_t vattr) +.. c:function:: int ioctl(fd, VIDEO_SET_ATTRIBUTE ,video_attributes_t vattr) + :name: VIDEO_SET_ATTRIBUTE Arguments @@ -53,6 +55,22 @@ information about the stream. Some hardware may not need this information, but the call also tells the hardware to prepare for DVD playback. +.. c:type:: video_attributes_t + +.. code-block::c + + typedef __u16 video_attributes_t; + /* bits: descr. */ + /* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */ + /* 13-12 TV system (0=525/60, 1=625/50) */ + /* 11-10 Aspect ratio (0=4:3, 3=16:9) */ + /* 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */ + /* 7 line 21-1 data present in GOP (1=yes, 0=no) */ + /* 6 line 21-2 data present in GOP (1=yes, 0=no) */ + /* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */ + /* 2 source letterboxed (1=yes, 0=no) */ + /* 0 film/camera mode (0=camera, 1=film (625/50 only)) */ + Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-set-blank.rst b/Documentation/media/uapi/dvb/video-set-blank.rst index 142ea8817380..3858c69496a5 100644 --- a/Documentation/media/uapi/dvb/video-set-blank.rst +++ b/Documentation/media/uapi/dvb/video-set-blank.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_BLANK +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_BLANK, boolean mode) +.. c:function:: int ioctl(fd, VIDEO_SET_BLANK, boolean mode) + :name: VIDEO_SET_BLANK Arguments diff --git a/Documentation/media/uapi/dvb/video-set-display-format.rst b/Documentation/media/uapi/dvb/video-set-display-format.rst index 2061ab064977..2ef7401781be 100644 --- a/Documentation/media/uapi/dvb/video-set-display-format.rst +++ b/Documentation/media/uapi/dvb/video-set-display-format.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_DISPLAY_FORMAT +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_DISPLAY_FORMAT, video_display_format_t format) +.. c:function:: int ioctl(fd, VIDEO_SET_DISPLAY_FORMAT) + :name: VIDEO_SET_DISPLAY_FORMAT Arguments diff --git a/Documentation/media/uapi/dvb/video-set-format.rst b/Documentation/media/uapi/dvb/video-set-format.rst index 53d66ec462ca..4239a4e365bb 100644 --- a/Documentation/media/uapi/dvb/video-set-format.rst +++ b/Documentation/media/uapi/dvb/video-set-format.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_FORMAT +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_FORMAT, video_format_t format) +.. c:function:: int ioctl(fd, VIDEO_SET_FORMAT, video_format_t format) + :name: VIDEO_SET_FORMAT Arguments @@ -52,6 +54,15 @@ This ioctl sets the screen format (aspect ratio) of the connected output device (TV) so that the output of the decoder can be adjusted accordingly. +.. c:type:: video_format_t + +.. code-block:: c + + typedef enum { + VIDEO_FORMAT_4_3, /* Select 4:3 format */ + VIDEO_FORMAT_16_9, /* Select 16:9 format. */ + VIDEO_FORMAT_221_1 /* 2.21:1 */ + } video_format_t; Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-set-highlight.rst b/Documentation/media/uapi/dvb/video-set-highlight.rst index 374f5d895b4d..90aeafd923b7 100644 --- a/Documentation/media/uapi/dvb/video-set-highlight.rst +++ b/Documentation/media/uapi/dvb/video-set-highlight.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_HIGHLIGHT +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_HIGHLIGHT ,video_highlight_t *vhilite) +.. c:function:: int ioctl(fd, VIDEO_SET_HIGHLIGHT, struct video_highlight *vhilite) + :name: VIDEO_SET_HIGHLIGHT Arguments @@ -51,6 +53,30 @@ Description This ioctl sets the SPU highlight information for the menu access of a DVD. +.. c:type:: video_highlight + +.. code-block:: c + + typedef + struct video_highlight { + int active; /* 1=show highlight, 0=hide highlight */ + __u8 contrast1; /* 7- 4 Pattern pixel contrast */ + /* 3- 0 Background pixel contrast */ + __u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */ + /* 3- 0 Emphasis pixel-1 contrast */ + __u8 color1; /* 7- 4 Pattern pixel color */ + /* 3- 0 Background pixel color */ + __u8 color2; /* 7- 4 Emphasis pixel-2 color */ + /* 3- 0 Emphasis pixel-1 color */ + __u32 ypos; /* 23-22 auto action mode */ + /* 21-12 start y */ + /* 9- 0 end y */ + __u32 xpos; /* 23-22 button color number */ + /* 21-12 start x */ + /* 9- 0 end x */ + } video_highlight_t; + + Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-set-id.rst b/Documentation/media/uapi/dvb/video-set-id.rst index 9c002d5399ad..18f66875ae3f 100644 --- a/Documentation/media/uapi/dvb/video-set-id.rst +++ b/Documentation/media/uapi/dvb/video-set-id.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_ID +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = VIDEO_SET_ID, int id) +.. c:function:: int ioctl(int fd, VIDEO_SET_ID, int id) + :name: VIDEO_SET_ID Arguments diff --git a/Documentation/media/uapi/dvb/video-set-spu-palette.rst b/Documentation/media/uapi/dvb/video-set-spu-palette.rst index 4b80b6f56219..51a1913d21d2 100644 --- a/Documentation/media/uapi/dvb/video-set-spu-palette.rst +++ b/Documentation/media/uapi/dvb/video-set-spu-palette.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_SPU_PALETTE +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_SPU_PALETTE, video_spu_palette_t *palette ) +.. c:function:: int ioctl(fd, VIDEO_SET_SPU_PALETTE, struct video_spu_palette *palette ) + :name: VIDEO_SET_SPU_PALETTE Arguments @@ -50,6 +52,14 @@ Description This ioctl sets the SPU color palette. +.. c:type:: video_spu_palette + +.. code-block::c + + typedef struct video_spu_palette { /* SPU Palette information */ + int length; + __u8 __user *palette; + } video_spu_palette_t; Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-set-spu.rst b/Documentation/media/uapi/dvb/video-set-spu.rst index a6f6924f10c4..739e5e7bd133 100644 --- a/Documentation/media/uapi/dvb/video-set-spu.rst +++ b/Documentation/media/uapi/dvb/video-set-spu.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_SPU +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_SPU , video_spu_t *spu) +.. c:function:: int ioctl(fd, VIDEO_SET_SPU , struct video_spu *spu) + :name: VIDEO_SET_SPU Arguments @@ -52,6 +54,15 @@ Description This ioctl activates or deactivates SPU decoding in a DVD input stream. It can only be used, if the driver is able to handle a DVD stream. +.. c:type:: struct video_spu + +.. code-block:: c + + typedef struct video_spu { + int active; + int stream_id; + } video_spu_t; + Return Value ------------ diff --git a/Documentation/media/uapi/dvb/video-set-streamtype.rst b/Documentation/media/uapi/dvb/video-set-streamtype.rst index 75b2e7a6e829..02a3c2e4e67c 100644 --- a/Documentation/media/uapi/dvb/video-set-streamtype.rst +++ b/Documentation/media/uapi/dvb/video-set-streamtype.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_STREAMTYPE +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_STREAMTYPE, int type) +.. c:function:: int ioctl(fd, VIDEO_SET_STREAMTYPE, int type) + :name: VIDEO_SET_STREAMTYPE Arguments diff --git a/Documentation/media/uapi/dvb/video-set-system.rst b/Documentation/media/uapi/dvb/video-set-system.rst index 9ae0df1f5813..e39cbe080ef7 100644 --- a/Documentation/media/uapi/dvb/video-set-system.rst +++ b/Documentation/media/uapi/dvb/video-set-system.rst @@ -11,11 +11,13 @@ Name VIDEO_SET_SYSTEM +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SET_SYSTEM , video_system_t system) +.. c:function:: int ioctl(fd, VIDEO_SET_SYSTEM , video_system_t system) + :name: VIDEO_SET_SYSTEM Arguments diff --git a/Documentation/media/uapi/dvb/video-slowmotion.rst b/Documentation/media/uapi/dvb/video-slowmotion.rst index 905712844f6a..bd3d1a4070d9 100644 --- a/Documentation/media/uapi/dvb/video-slowmotion.rst +++ b/Documentation/media/uapi/dvb/video-slowmotion.rst @@ -11,11 +11,13 @@ Name VIDEO_SLOWMOTION +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_SLOWMOTION, int nFrames) +.. c:function:: int ioctl(fd, VIDEO_SLOWMOTION, int nFrames) + :name: VIDEO_SLOWMOTION Arguments diff --git a/Documentation/media/uapi/dvb/video-stillpicture.rst b/Documentation/media/uapi/dvb/video-stillpicture.rst index ed3a2f53b998..6f943f5e27bd 100644 --- a/Documentation/media/uapi/dvb/video-stillpicture.rst +++ b/Documentation/media/uapi/dvb/video-stillpicture.rst @@ -11,11 +11,13 @@ Name VIDEO_STILLPICTURE +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_STILLPICTURE, struct video_still_picture *sp) +.. c:function:: int ioctl(fd, VIDEO_STILLPICTURE, struct video_still_picture *sp) + :name: VIDEO_STILLPICTURE Arguments diff --git a/Documentation/media/uapi/dvb/video-stop.rst b/Documentation/media/uapi/dvb/video-stop.rst index ad8d59e06004..fb827effb276 100644 --- a/Documentation/media/uapi/dvb/video-stop.rst +++ b/Documentation/media/uapi/dvb/video-stop.rst @@ -11,11 +11,13 @@ Name VIDEO_STOP +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(fd, int request = VIDEO_STOP, boolean mode) +.. c:function:: int ioctl(fd, VIDEO_STOP, boolean mode) + :name: VIDEO_STOP Arguments diff --git a/Documentation/media/uapi/dvb/video-try-command.rst b/Documentation/media/uapi/dvb/video-try-command.rst index df96c2d7fc6b..008e6a9ab696 100644 --- a/Documentation/media/uapi/dvb/video-try-command.rst +++ b/Documentation/media/uapi/dvb/video-try-command.rst @@ -11,11 +11,13 @@ Name VIDEO_TRY_COMMAND +.. attention:: This ioctl is deprecated. Synopsis -------- -.. cpp:function:: int ioctl(int fd, int request = VIDEO_TRY_COMMAND, struct video_command *cmd) +.. c:function:: int ioctl(int fd, VIDEO_TRY_COMMAND, struct video_command *cmd) + :name: VIDEO_TRY_COMMAND Arguments diff --git a/Documentation/media/uapi/dvb/video_types.rst b/Documentation/media/uapi/dvb/video_types.rst index 671f365ceeb4..640a21de6b8a 100644 --- a/Documentation/media/uapi/dvb/video_types.rst +++ b/Documentation/media/uapi/dvb/video_types.rst @@ -95,7 +95,7 @@ representing the state of video playback. } video_play_state_t; -.. _video-command: +.. c:type:: video_command struct video_command ==================== @@ -146,7 +146,7 @@ video_size_t } video_size_t; -.. _video-event: +.. c:type:: video_event struct video_event ================== @@ -172,7 +172,7 @@ VIDEO_GET_EVENT call. }; -.. _video-status: +.. c:type:: video_status struct video_status =================== @@ -203,7 +203,7 @@ case the source video format is not the same as the format of the output device. -.. _video-still-picture: +.. c:type:: video_still_picture struct video_still_picture ========================== @@ -271,7 +271,7 @@ output. The following system types can be set: } video_system_t; -.. _video-highlight: +.. c:type:: video_highlight struct video_highlight ====================== @@ -302,7 +302,7 @@ information. The call expects the following format for that information: } video_highlight_t; -.. _video-spu: +.. c:type:: video_spu struct video_spu ================ @@ -320,7 +320,7 @@ to the following format: } video_spu_t; -.. _video-spu-palette: +.. c:type:: video_spu_palette struct video_spu_palette ======================== @@ -338,7 +338,7 @@ VIDEO_SPU_PALETTE: } video_spu_palette_t; -.. _video-navi-pack: +.. c:type:: video_navi_pack struct video_navi_pack ====================== diff --git a/Documentation/media/uapi/gen-errors.rst b/Documentation/media/uapi/gen-errors.rst index d6b0cfd00a3f..6e983b9880fc 100644 --- a/Documentation/media/uapi/gen-errors.rst +++ b/Documentation/media/uapi/gen-errors.rst @@ -9,6 +9,8 @@ Generic Error Codes .. _gen-errors: +.. tabularcolumns:: |p{2.5cm}|p{15.0cm}| + .. flat-table:: Generic error codes :header-rows: 0 :stub-columns: 0 diff --git a/Documentation/media/uapi/mediactl/media-func-close.rst b/Documentation/media/uapi/mediactl/media-func-close.rst index 39ef70ac8656..a8f5203afe4b 100644 --- a/Documentation/media/uapi/mediactl/media-func-close.rst +++ b/Documentation/media/uapi/mediactl/media-func-close.rst @@ -20,14 +20,14 @@ Synopsis #include <unistd.h> -.. cpp:function:: int close( int fd ) - +.. c:function:: int close( int fd ) + :name: mc-close Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <func-open>`. + File descriptor returned by :c:func:`open() <mc-open>`. Description diff --git a/Documentation/media/uapi/mediactl/media-func-ioctl.rst b/Documentation/media/uapi/mediactl/media-func-ioctl.rst index 9d1b23133edf..fe072b7c8765 100644 --- a/Documentation/media/uapi/mediactl/media-func-ioctl.rst +++ b/Documentation/media/uapi/mediactl/media-func-ioctl.rst @@ -20,14 +20,14 @@ Synopsis #include <sys/ioctl.h> -.. cpp:function:: int ioctl( int fd, int request, void *argp ) - +.. c:function:: int ioctl( int fd, int request, void *argp ) + :name: mc-ioctl Arguments ========= ``fd`` - File descriptor returned by :ref:`open() <func-open>`. + File descriptor returned by :c:func:`open() <mc-open>`. ``request`` Media ioctl request code as defined in the media.h header file, for diff --git a/Documentation/media/uapi/mediactl/media-func-open.rst b/Documentation/media/uapi/mediactl/media-func-open.rst index 2b2ecd85b995..32f53016a9e5 100644 --- a/Documentation/media/uapi/mediactl/media-func-open.rst +++ b/Documentation/media/uapi/mediactl/media-func-open.rst @@ -20,8 +20,8 @@ Synopsis #include <fcntl.h> -.. cpp:function:: int open( const char *device_name, int flags ) - +.. c:function:: int open( const char *device_name, int flags ) + :name: mc-open Arguments ========= diff --git a/Documentation/media/uapi/mediactl/media-ioc-device-info.rst b/Documentation/media/uapi/mediactl/media-ioc-device-info.rst index 467d82cbb81e..f690f9afc470 100644 --- a/Documentation/media/uapi/mediactl/media-ioc-device-info.rst +++ b/Documentation/media/uapi/mediactl/media-ioc-device-info.rst @@ -15,7 +15,8 @@ MEDIA_IOC_DEVICE_INFO - Query device information Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct media_device_info *argp ) +.. c:function:: int ioctl( int fd, MEDIA_IOC_DEVICE_INFO, struct media_device_info *argp ) + :name: MEDIA_IOC_DEVICE_INFO Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <media-func-open>`. -``request`` - MEDIA_IOC_DEVICE_INFO - ``argp`` @@ -35,12 +33,14 @@ Description All media devices must support the ``MEDIA_IOC_DEVICE_INFO`` ioctl. To query device information, applications call the ioctl with a pointer to -a struct :ref:`media_device_info <media-device-info>`. The driver +a struct :c:type:`media_device_info`. The driver fills the structure and returns the information to the application. The ioctl never fails. -.. _media-device-info: +.. c:type:: media_device_info + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct media_device_info :header-rows: 0 diff --git a/Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst b/Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst index 12d4b25d5b94..0fd329279bef 100644 --- a/Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst +++ b/Documentation/media/uapi/mediactl/media-ioc-enum-entities.rst @@ -15,7 +15,8 @@ MEDIA_IOC_ENUM_ENTITIES - Enumerate entities and their properties Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct media_entity_desc *argp ) +.. c:function:: int ioctl( int fd, MEDIA_IOC_ENUM_ENTITIES, struct media_entity_desc *argp ) + :name: MEDIA_IOC_ENUM_ENTITIES Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <media-func-open>`. -``request`` - MEDIA_IOC_ENUM_ENTITIES - ``argp`` @@ -34,7 +32,7 @@ Description =========== To query the attributes of an entity, applications set the id field of a -struct :ref:`media_entity_desc <media-entity-desc>` structure and +struct :c:type:`media_entity_desc` structure and call the MEDIA_IOC_ENUM_ENTITIES ioctl with a pointer to this structure. The driver fills the rest of the structure or returns an EINVAL error code when the id is invalid. @@ -51,7 +49,9 @@ enumerate entities by calling MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error. -.. _media-entity-desc: +.. c:type:: media_entity_desc + +.. tabularcolumns:: |p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{11.5cm}| .. flat-table:: struct media_entity_desc :header-rows: 0 @@ -195,5 +195,5 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`media_entity_desc <media-entity-desc>` ``id`` + The struct :c:type:`media_entity_desc` ``id`` references a non-existing entity. diff --git a/Documentation/media/uapi/mediactl/media-ioc-enum-links.rst b/Documentation/media/uapi/mediactl/media-ioc-enum-links.rst index 87443b1ce42d..d05be16ffaf6 100644 --- a/Documentation/media/uapi/mediactl/media-ioc-enum-links.rst +++ b/Documentation/media/uapi/mediactl/media-ioc-enum-links.rst @@ -15,7 +15,8 @@ MEDIA_IOC_ENUM_LINKS - Enumerate all pads and links for a given entity Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct media_links_enum *argp ) +.. c:function:: int ioctl( int fd, MEDIA_IOC_ENUM_LINKS, struct media_links_enum *argp ) + :name: MEDIA_IOC_ENUM_LINKS Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <media-func-open>`. -``request`` - MEDIA_IOC_ENUM_LINKS - ``argp`` @@ -34,10 +32,10 @@ Description =========== To enumerate pads and/or links for a given entity, applications set the -entity field of a struct :ref:`media_links_enum <media-links-enum>` +entity field of a struct :c:type:`media_links_enum` structure and initialize the struct -:ref:`media_pad_desc <media-pad-desc>` and struct -:ref:`media_link_desc <media-link-desc>` structure arrays pointed by +:c:type:`media_pad_desc` and struct +:c:type:`media_link_desc` structure arrays pointed by the ``pads`` and ``links`` fields. They then call the MEDIA_IOC_ENUM_LINKS ioctl with a pointer to this structure. @@ -55,7 +53,9 @@ Only forward links that originate at one of the entity's source pads are returned during the enumeration process. -.. _media-links-enum: +.. c:type:: media_links_enum + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct media_links_enum :header-rows: 0 @@ -73,7 +73,7 @@ returned during the enumeration process. - .. row 2 - - struct :ref:`media_pad_desc <media-pad-desc>` + - struct :c:type:`media_pad_desc` - \*\ ``pads`` @@ -82,7 +82,7 @@ returned during the enumeration process. - .. row 3 - - struct :ref:`media_link_desc <media-link-desc>` + - struct :c:type:`media_link_desc` - \*\ ``links`` @@ -91,7 +91,9 @@ returned during the enumeration process. -.. _media-pad-desc: +.. c:type:: media_pad_desc + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct media_pad_desc :header-rows: 0 @@ -125,7 +127,9 @@ returned during the enumeration process. -.. _media-link-desc: +.. c:type:: media_link_desc + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct media_link_desc :header-rows: 0 @@ -135,7 +139,7 @@ returned during the enumeration process. - .. row 1 - - struct :ref:`media_pad_desc <media-pad-desc>` + - struct :c:type:`media_pad_desc` - ``source`` @@ -143,7 +147,7 @@ returned during the enumeration process. - .. row 2 - - struct :ref:`media_pad_desc <media-pad-desc>` + - struct :c:type:`media_pad_desc` - ``sink`` @@ -166,5 +170,5 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`media_links_enum <media-links-enum>` ``id`` + The struct :c:type:`media_links_enum` ``id`` references a non-existing entity. diff --git a/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst b/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst index 2e382cc7762c..48c9531f4db0 100644 --- a/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst +++ b/Documentation/media/uapi/mediactl/media-ioc-g-topology.rst @@ -15,7 +15,8 @@ MEDIA_IOC_G_TOPOLOGY - Enumerate the graph topology and graph element properties Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct media_v2_topology *argp ) +.. c:function:: int ioctl( int fd, MEDIA_IOC_G_TOPOLOGY, struct media_v2_topology *argp ) + :name: MEDIA_IOC_G_TOPOLOGY Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <media-func-open>`. -``request`` - MEDIA_IOC_G_TOPOLOGY - ``argp`` @@ -35,7 +33,7 @@ Description The typical usage of this ioctl is to call it twice. On the first call, the structure defined at struct -:ref:`media_v2_topology <media-v2-topology>` should be zeroed. At +:c:type:`media_v2_topology` should be zeroed. At return, if no errors happen, this ioctl will return the ``topology_version`` and the total number of entities, interfaces, pads and links. @@ -48,8 +46,9 @@ other values untouched. If the ``topology_version`` remains the same, the ioctl should fill the desired arrays with the media graph elements. +.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| -.. _media-v2-topology: +.. c:type:: media_v2_topology .. flat-table:: struct media_v2_topology :header-rows: 0 @@ -142,8 +141,9 @@ desired arrays with the media graph elements. won't store the links. It will just update ``num_links`` +.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| -.. _media-v2-entity: +.. c:type:: media_v2_entity .. flat-table:: struct media_v2_entity :header-rows: 0 @@ -185,8 +185,9 @@ desired arrays with the media graph elements. this array to zero. +.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| -.. _media-v2-interface: +.. c:type:: media_v2_interface .. flat-table:: struct media_v2_interface :header-rows: 0 @@ -233,11 +234,12 @@ desired arrays with the media graph elements. - ``devnode`` - Used only for device node interfaces. See - :ref:`media-v2-intf-devnode` for details.. + :c:type:`media_v2_intf_devnode` for details.. +.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| -.. _media-v2-intf-devnode: +.. c:type:: media_v2_intf_devnode .. flat-table:: struct media_v2_interface :header-rows: 0 @@ -262,8 +264,9 @@ desired arrays with the media graph elements. - Device node minor number. +.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| -.. _media-v2-pad: +.. c:type:: media_v2_pad .. flat-table:: struct media_v2_pad :header-rows: 0 @@ -305,8 +308,9 @@ desired arrays with the media graph elements. this array to zero. +.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| -.. _media-v2-link: +.. c:type:: media_v2_link .. flat-table:: struct media_v2_pad :header-rows: 0 diff --git a/Documentation/media/uapi/mediactl/media-ioc-setup-link.rst b/Documentation/media/uapi/mediactl/media-ioc-setup-link.rst index e02fe23de9de..ae5194940100 100644 --- a/Documentation/media/uapi/mediactl/media-ioc-setup-link.rst +++ b/Documentation/media/uapi/mediactl/media-ioc-setup-link.rst @@ -15,7 +15,8 @@ MEDIA_IOC_SETUP_LINK - Modify the properties of a link Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct media_link_desc *argp ) +.. c:function:: int ioctl( int fd, MEDIA_IOC_SETUP_LINK, struct media_link_desc *argp ) + :name: MEDIA_IOC_SETUP_LINK Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <media-func-open>`. -``request`` - MEDIA_IOC_SETUP_LINK - ``argp`` @@ -34,7 +32,7 @@ Description =========== To change link properties applications fill a struct -:ref:`media_link_desc <media-link-desc>` with link identification +:c:type:`media_link_desc` with link identification information (source and sink pad) and the new requested link flags. They then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to that structure. @@ -63,6 +61,6 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`media_link_desc <media-link-desc>` references a + The struct :c:type:`media_link_desc` references a non-existing link, or the link is immutable and an attempt to modify its configuration was made. diff --git a/Documentation/media/uapi/mediactl/media-types.rst b/Documentation/media/uapi/mediactl/media-types.rst index c77717b236ce..3e03dc2e6003 100644 --- a/Documentation/media/uapi/mediactl/media-types.rst +++ b/Documentation/media/uapi/mediactl/media-types.rst @@ -5,9 +5,12 @@ Types and flags used to represent the media graph elements ========================================================== +.. tabularcolumns:: |p{8.0cm}|p{10.5cm}| .. _media-entity-type: +.. cssclass:: longtable + .. flat-table:: Media entity types :header-rows: 0 :stub-columns: 0 @@ -15,10 +18,12 @@ Types and flags used to represent the media graph elements - .. row 1 - .. _MEDIA-ENT-F-UNKNOWN: + .. _MEDIA-ENT-F-UNKNOWN: .. _MEDIA-ENT-F-V4L2-SUBDEV-UNKNOWN: - - ``MEDIA_ENT_F_UNKNOWN`` and ``MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN`` + - ``MEDIA_ENT_F_UNKNOWN`` and + + ``MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN`` - Unknown entity. That generally indicates that a driver didn't initialize properly the entity, with is a Kernel bug @@ -294,6 +299,8 @@ Types and flags used to represent the media graph elements its source pad. +.. tabularcolumns:: |p{5.5cm}|p{12.0cm}| + .. _media-entity-flag: .. flat-table:: Media entity flags @@ -319,6 +326,7 @@ Types and flags used to represent the media graph elements - The entity represents a data conector +.. tabularcolumns:: |p{6.5cm}|p{6.0cm}|p{5.0cm}| .. _media-intf-type: @@ -405,7 +413,7 @@ Types and flags used to represent the media graph elements - Device node interface for radio (V4L) - - typically, /dev/vbi? + - typically, /dev/radio? - .. row 9 @@ -429,6 +437,16 @@ Types and flags used to represent the media graph elements - .. row 11 + .. _MEDIA-INTF-T-V4L-TOUCH: + + - ``MEDIA_INTF_T_V4L_TOUCH`` + + - Device node interface for Touch device (V4L) + + - typically, /dev/v4l-touch? + + - .. row 12 + .. _MEDIA-INTF-T-ALSA-PCM-CAPTURE: - ``MEDIA_INTF_T_ALSA_PCM_CAPTURE`` @@ -437,7 +455,7 @@ Types and flags used to represent the media graph elements - typically, /dev/snd/pcmC?D?c - - .. row 12 + - .. row 13 .. _MEDIA-INTF-T-ALSA-PCM-PLAYBACK: @@ -447,7 +465,7 @@ Types and flags used to represent the media graph elements - typically, /dev/snd/pcmC?D?p - - .. row 13 + - .. row 14 .. _MEDIA-INTF-T-ALSA-CONTROL: @@ -457,7 +475,7 @@ Types and flags used to represent the media graph elements - typically, /dev/snd/controlC? - - .. row 14 + - .. row 15 .. _MEDIA-INTF-T-ALSA-COMPRESS: @@ -467,7 +485,7 @@ Types and flags used to represent the media graph elements - typically, /dev/snd/compr? - - .. row 15 + - .. row 16 .. _MEDIA-INTF-T-ALSA-RAWMIDI: @@ -477,7 +495,7 @@ Types and flags used to represent the media graph elements - typically, /dev/snd/midi? - - .. row 16 + - .. row 17 .. _MEDIA-INTF-T-ALSA-HWDEP: @@ -487,7 +505,7 @@ Types and flags used to represent the media graph elements - typically, /dev/snd/hwC?D? - - .. row 17 + - .. row 18 .. _MEDIA-INTF-T-ALSA-SEQUENCER: @@ -497,7 +515,7 @@ Types and flags used to represent the media graph elements - typically, /dev/snd/seq - - .. row 18 + - .. row 19 .. _MEDIA-INTF-T-ALSA-TIMER: @@ -508,6 +526,7 @@ Types and flags used to represent the media graph elements - typically, /dev/snd/timer +.. tabularcolumns:: |p{5.5cm}|p{12.0cm}| .. _media-pad-flag: @@ -551,6 +570,7 @@ Types and flags used to represent the media graph elements One and only one of ``MEDIA_PAD_FL_SINK`` and ``MEDIA_PAD_FL_SOURCE`` must be set for every pad. +.. tabularcolumns:: |p{5.5cm}|p{12.0cm}| .. _media-link-flag: diff --git a/Documentation/media/uapi/rc/lirc-get-features.rst b/Documentation/media/uapi/rc/lirc-get-features.rst index e763ebfb2cb1..79e07b4d44d6 100644 --- a/Documentation/media/uapi/rc/lirc-get-features.rst +++ b/Documentation/media/uapi/rc/lirc-get-features.rst @@ -14,7 +14,8 @@ LIRC_GET_FEATURES - Get the underlying hardware device's features Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *features) +.. c:function:: int ioctl( int fd, LIRC_GET_FEATURES, __u32 *features) + :name: LIRC_GET_FEATURES Arguments ========= @@ -22,9 +23,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_GET_FEATURES - ``features`` Bitmask with the LIRC features. diff --git a/Documentation/media/uapi/rc/lirc-get-length.rst b/Documentation/media/uapi/rc/lirc-get-length.rst index d11c3d3f2c06..8c2747c8d2c9 100644 --- a/Documentation/media/uapi/rc/lirc-get-length.rst +++ b/Documentation/media/uapi/rc/lirc-get-length.rst @@ -14,7 +14,8 @@ LIRC_GET_LENGTH - Retrieves the code length in bits. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *length ) +.. c:function:: int ioctl( int fd, LIRC_GET_LENGTH, __u32 *length ) + :name: LIRC_GET_LENGTH Arguments ========= @@ -22,9 +23,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_GET_LENGTH - ``length`` length, in bits diff --git a/Documentation/media/uapi/rc/lirc-get-rec-mode.rst b/Documentation/media/uapi/rc/lirc-get-rec-mode.rst index 586860c36791..a5023e0194c1 100644 --- a/Documentation/media/uapi/rc/lirc-get-rec-mode.rst +++ b/Documentation/media/uapi/rc/lirc-get-rec-mode.rst @@ -10,12 +10,16 @@ ioctls LIRC_GET_REC_MODE and LIRC_SET_REC_MODE Name ==== -LIRC_GET_REC_MODE/LIRC_GET_REC_MODE - Get/set supported receive modes. +LIRC_GET_REC_MODE/LIRC_SET_REC_MODE - Get/set supported receive modes. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 rx_modes) +.. c:function:: int ioctl( int fd, LIRC_GET_REC_MODE, __u32 rx_modes) + :name: LIRC_GET_REC_MODE + +.. c:function:: int ioctl( int fd, LIRC_SET_REC_MODE, __u32 rx_modes) + :name: LIRC_SET_REC_MODE Arguments ========= @@ -23,9 +27,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_GET_REC_MODE or LIRC_GET_REC_MODE - ``rx_modes`` Bitmask with the supported transmit modes. diff --git a/Documentation/media/uapi/rc/lirc-get-rec-resolution.rst b/Documentation/media/uapi/rc/lirc-get-rec-resolution.rst index 6ef1723878b4..6e016edc2bc4 100644 --- a/Documentation/media/uapi/rc/lirc-get-rec-resolution.rst +++ b/Documentation/media/uapi/rc/lirc-get-rec-resolution.rst @@ -14,7 +14,8 @@ LIRC_GET_REC_RESOLUTION - Obtain the value of receive resolution, in microsecond Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *microseconds) +.. c:function:: int ioctl( int fd, LIRC_GET_REC_RESOLUTION, __u32 *microseconds) + :name: LIRC_GET_REC_RESOLUTION Arguments ========= @@ -22,9 +23,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_GET_REC_RESOLUTION - ``microseconds`` Resolution, in microseconds. diff --git a/Documentation/media/uapi/rc/lirc-get-send-mode.rst b/Documentation/media/uapi/rc/lirc-get-send-mode.rst index 3e1d96122ff2..51ac13428969 100644 --- a/Documentation/media/uapi/rc/lirc-get-send-mode.rst +++ b/Documentation/media/uapi/rc/lirc-get-send-mode.rst @@ -15,7 +15,11 @@ LIRC_GET_SEND_MODE/LIRC_SET_SEND_MODE - Get/set supported transmit mode. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *tx_modes ) +.. c:function:: int ioctl( int fd, LIRC_GET_SEND_MODE, __u32 *tx_modes ) + :name: LIRC_GET_SEND_MODE + +.. c:function:: int ioctl( int fd, LIRC_SET_SEND_MODE, __u32 *tx_modes ) + :name: LIRC_SET_SEND_MODE Arguments ========= @@ -23,9 +27,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_GET_SEND_MODE - ``tx_modes`` Bitmask with the supported transmit modes. diff --git a/Documentation/media/uapi/rc/lirc-get-timeout.rst b/Documentation/media/uapi/rc/lirc-get-timeout.rst index 6b8238f1f30e..c94bc5dcaa8e 100644 --- a/Documentation/media/uapi/rc/lirc-get-timeout.rst +++ b/Documentation/media/uapi/rc/lirc-get-timeout.rst @@ -16,7 +16,11 @@ range for IR receive. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *timeout) +.. c:function:: int ioctl( int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout) + :name: LIRC_GET_MIN_TIMEOUT + +.. c:function:: int ioctl( int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout) + :name: LIRC_GET_MAX_TIMEOUT Arguments ========= @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_GET_MIN_TIMEOUT or LIRC_GET_MAX_TIMEOUT - ``timeout`` Timeout, in microseconds. diff --git a/Documentation/media/uapi/rc/lirc-read.rst b/Documentation/media/uapi/rc/lirc-read.rst index 8d4e9b6e507d..4c678f60e872 100644 --- a/Documentation/media/uapi/rc/lirc-read.rst +++ b/Documentation/media/uapi/rc/lirc-read.rst @@ -20,7 +20,8 @@ Synopsis #include <unistd.h> -.. cpp:function:: ssize_t read( int fd, void *buf, size_t count ) +.. c:function:: ssize_t read( int fd, void *buf, size_t count ) + :name: lirc-read Arguments @@ -30,8 +31,10 @@ Arguments File descriptor returned by ``open()``. ``buf`` -``count`` + Buffer to be filled +``count`` + Max number of bytes to read Description =========== diff --git a/Documentation/media/uapi/rc/lirc-set-measure-carrier-mode.rst b/Documentation/media/uapi/rc/lirc-set-measure-carrier-mode.rst index e145d9d1902d..6307b5715595 100644 --- a/Documentation/media/uapi/rc/lirc-set-measure-carrier-mode.rst +++ b/Documentation/media/uapi/rc/lirc-set-measure-carrier-mode.rst @@ -14,7 +14,8 @@ LIRC_SET_MEASURE_CARRIER_MODE - enable or disable measure mode Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *enable ) +.. c:function:: int ioctl( int fd, LIRC_SET_MEASURE_CARRIER_MODE, __u32 *enable ) + :name: LIRC_SET_MEASURE_CARRIER_MODE Arguments ========= @@ -22,9 +23,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_MEASURE_CARRIER_MODE - ``enable`` enable = 1 means enable measure mode, enable = 0 means disable measure mode. diff --git a/Documentation/media/uapi/rc/lirc-set-rec-carrier-range.rst b/Documentation/media/uapi/rc/lirc-set-rec-carrier-range.rst index 7cce9c8ba361..a83fbbfa0d3b 100644 --- a/Documentation/media/uapi/rc/lirc-set-rec-carrier-range.rst +++ b/Documentation/media/uapi/rc/lirc-set-rec-carrier-range.rst @@ -15,7 +15,8 @@ IR receive. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *frequency ) +.. c:function:: int ioctl( int fd, LIRC_SET_REC_CARRIER_RANGE, __u32 *frequency ) + :name: LIRC_SET_REC_CARRIER_RANGE Arguments ========= @@ -23,9 +24,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_REC_CARRIER_RANGE - ``frequency`` Frequency of the carrier that modulates PWM data, in Hz. diff --git a/Documentation/media/uapi/rc/lirc-set-rec-carrier.rst b/Documentation/media/uapi/rc/lirc-set-rec-carrier.rst index 17ddb4723caa..a411c0330818 100644 --- a/Documentation/media/uapi/rc/lirc-set-rec-carrier.rst +++ b/Documentation/media/uapi/rc/lirc-set-rec-carrier.rst @@ -15,7 +15,8 @@ LIRC_SET_REC_CARRIER - Set carrier used to modulate IR receive. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *frequency ) +.. c:function:: int ioctl( int fd, LIRC_SET_REC_CARRIER, __u32 *frequency ) + :name: LIRC_SET_REC_CARRIER Arguments ========= @@ -23,9 +24,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_REC_CARRIER - ``frequency`` Frequency of the carrier that modulates PWM data, in Hz. diff --git a/Documentation/media/uapi/rc/lirc-set-rec-timeout-reports.rst b/Documentation/media/uapi/rc/lirc-set-rec-timeout-reports.rst index 0c7f85d0ce3b..9c501bbf4c62 100644 --- a/Documentation/media/uapi/rc/lirc-set-rec-timeout-reports.rst +++ b/Documentation/media/uapi/rc/lirc-set-rec-timeout-reports.rst @@ -14,7 +14,8 @@ LIRC_SET_REC_TIMEOUT_REPORTS - enable or disable timeout reports for IR receive Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *enable ) +.. c:function:: int ioctl( int fd, LIRC_SET_REC_TIMEOUT_REPORTS, __u32 *enable ) + :name: LIRC_SET_REC_TIMEOUT_REPORTS Arguments ========= @@ -22,9 +23,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_REC_TIMEOUT_REPORTS - ``enable`` enable = 1 means enable timeout report, enable = 0 means disable timeout reports. diff --git a/Documentation/media/uapi/rc/lirc-set-rec-timeout.rst b/Documentation/media/uapi/rc/lirc-set-rec-timeout.rst index ffc88f9fcd52..b3e16bbdbc90 100644 --- a/Documentation/media/uapi/rc/lirc-set-rec-timeout.rst +++ b/Documentation/media/uapi/rc/lirc-set-rec-timeout.rst @@ -14,7 +14,8 @@ LIRC_SET_REC_TIMEOUT - sets the integer value for IR inactivity timeout. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *timeout ) +.. c:function:: int ioctl( int fd, LIRC_SET_REC_TIMEOUT, __u32 *timeout ) + :name: LIRC_SET_REC_TIMEOUT Arguments ========= @@ -22,9 +23,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_REC_TIMEOUT - ``timeout`` Timeout, in microseconds. diff --git a/Documentation/media/uapi/rc/lirc-set-send-carrier.rst b/Documentation/media/uapi/rc/lirc-set-send-carrier.rst index 4314d4c86ced..42c8cfb42df5 100644 --- a/Documentation/media/uapi/rc/lirc-set-send-carrier.rst +++ b/Documentation/media/uapi/rc/lirc-set-send-carrier.rst @@ -15,7 +15,8 @@ LIRC_SET_SEND_CARRIER - Set send carrier used to modulate IR TX. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *frequency ) +.. c:function:: int ioctl( int fd, LIRC_SET_SEND_CARRIER, __u32 *frequency ) + :name: LIRC_SET_SEND_CARRIER Arguments ========= @@ -23,9 +24,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_SEND_CARRIER - ``frequency`` Frequency of the carrier to be modulated, in Hz. diff --git a/Documentation/media/uapi/rc/lirc-set-send-duty-cycle.rst b/Documentation/media/uapi/rc/lirc-set-send-duty-cycle.rst index 48e7bb15fb69..20d07c2a37a5 100644 --- a/Documentation/media/uapi/rc/lirc-set-send-duty-cycle.rst +++ b/Documentation/media/uapi/rc/lirc-set-send-duty-cycle.rst @@ -15,7 +15,8 @@ IR transmit. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *duty_cycle) +.. c:function:: int ioctl( int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle) + :name: LIRC_SET_SEND_DUTY_CYCLE Arguments ========= @@ -23,9 +24,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_SEND_DUTY_CYCLE - ``duty_cycle`` Duty cicle, describing the pulse width in percent (from 1 to 99) of the total cycle. Values 0 and 100 are reserved. diff --git a/Documentation/media/uapi/rc/lirc-set-transmitter-mask.rst b/Documentation/media/uapi/rc/lirc-set-transmitter-mask.rst index 2b35e21b9bb9..69b7ad8c2afb 100644 --- a/Documentation/media/uapi/rc/lirc-set-transmitter-mask.rst +++ b/Documentation/media/uapi/rc/lirc-set-transmitter-mask.rst @@ -14,7 +14,8 @@ LIRC_SET_TRANSMITTER_MASK - Enables send codes on a given set of transmitters Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *mask ) +.. c:function:: int ioctl( int fd, LIRC_SET_TRANSMITTER_MASK, __u32 *mask ) + :name: LIRC_SET_TRANSMITTER_MASK Arguments ========= @@ -22,9 +23,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_TRANSMITTER_MASK - ``mask`` Mask with channels to enable tx. Channel 0 is the least significant bit. diff --git a/Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst b/Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst index cffb01fd1042..0415c6a54f23 100644 --- a/Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst +++ b/Documentation/media/uapi/rc/lirc-set-wideband-receiver.rst @@ -14,7 +14,8 @@ LIRC_SET_WIDEBAND_RECEIVER - enable wide band receiver. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, __u32 *enable ) +.. c:function:: int ioctl( int fd, LIRC_SET_WIDEBAND_RECEIVER, __u32 *enable ) + :name: LIRC_SET_WIDEBAND_RECEIVER Arguments ========= @@ -22,9 +23,6 @@ Arguments ``fd`` File descriptor returned by open(). -``request`` - LIRC_SET_WIDEBAND_RECEIVER - ``enable`` enable = 1 means enable wideband receiver, enable = 0 means disable wideband receiver. @@ -42,7 +40,9 @@ that prevents them to be used with some remotes. Wide band receiver might also be more precise. On the other hand its disadvantage it usually reduced range of reception. -.. note:: Wide band receiver might be implictly enabled if you enable +.. note:: + + Wide band receiver might be implictly enabled if you enable carrier reports. In that case it will be disabled as soon as you disable carrier reports. Trying to disable wide band receiver while carrier reports are active will do nothing. diff --git a/Documentation/media/uapi/rc/lirc-write.rst b/Documentation/media/uapi/rc/lirc-write.rst index dcba3b1bee6e..3b035c6613b1 100644 --- a/Documentation/media/uapi/rc/lirc-write.rst +++ b/Documentation/media/uapi/rc/lirc-write.rst @@ -20,8 +20,8 @@ Synopsis #include <unistd.h> -.. cpp:function:: ssize_t write( int fd, void *buf, size_t count ) - +.. c:function:: ssize_t write( int fd, void *buf, size_t count ) + :name: lirc-write Arguments ========= @@ -30,8 +30,10 @@ Arguments File descriptor returned by ``open()``. ``buf`` -``count`` + Buffer with data to be written +``count`` + Number of bytes at the buffer Description =========== diff --git a/Documentation/media/uapi/rc/rc-tables.rst b/Documentation/media/uapi/rc/rc-tables.rst index 0bb16c4af27d..c8ae9479f842 100644 --- a/Documentation/media/uapi/rc/rc-tables.rst +++ b/Documentation/media/uapi/rc/rc-tables.rst @@ -25,6 +25,8 @@ the remote via /dev/input/event devices. .. _rc_standard_keymap: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: IR default keymapping :header-rows: 0 :stub-columns: 0 diff --git a/Documentation/media/uapi/v4l/audio.rst b/Documentation/media/uapi/v4l/audio.rst index 4dd11345866c..5ec99a2809fe 100644 --- a/Documentation/media/uapi/v4l/audio.rst +++ b/Documentation/media/uapi/v4l/audio.rst @@ -21,15 +21,15 @@ more than one video input or output. Assumed two composite video inputs and two audio inputs exist, there may be up to four valid combinations. The relation of video and audio connectors is defined in the ``audioset`` field of the respective struct -:ref:`v4l2_input <v4l2-input>` or struct -:ref:`v4l2_output <v4l2-output>`, where each bit represents the index +:c:type:`v4l2_input` or struct +:c:type:`v4l2_output`, where each bit represents the index number, starting at zero, of one audio input or output. To learn about the number and attributes of the available inputs and outputs applications can enumerate them with the :ref:`VIDIOC_ENUMAUDIO` and :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDOUT>` ioctl, respectively. -The struct :ref:`v4l2_audio <v4l2-audio>` returned by the +The struct :c:type:`v4l2_audio` returned by the :ref:`VIDIOC_ENUMAUDIO` ioctl also contains signal :status information applicable when the current audio input is queried. @@ -37,7 +37,9 @@ The :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` and :ref:`VIDIOC_G_AUDOUT <VIDIOC_G_AUDOUT>` ioctls report the current audio input and output, respectively. -.. note:: Note that, unlike :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and +.. note:: + + Note that, unlike :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and :ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` these ioctls return a structure as :ref:`VIDIOC_ENUMAUDIO` and :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDOUT>` do, not just an index. @@ -51,7 +53,7 @@ Drivers must implement all audio input ioctls when the device has multiple selectable audio inputs, all audio output ioctls when the device has multiple selectable audio outputs. When the device has any audio inputs or outputs the driver must set the ``V4L2_CAP_AUDIO`` flag -in the struct :ref:`v4l2_capability <v4l2-capability>` returned by +in the struct :c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. @@ -89,7 +91,7 @@ Example: Switching to the first audio input } .. [#f1] - Actually struct :ref:`v4l2_audio <v4l2-audio>` ought to have a - ``tuner`` field like struct :ref:`v4l2_input <v4l2-input>`, not + Actually struct :c:type:`v4l2_audio` ought to have a + ``tuner`` field like struct :c:type:`v4l2_input`, not only making the API more consistent but also permitting radio devices with multiple tuners. diff --git a/Documentation/media/uapi/v4l/buffer.rst b/Documentation/media/uapi/v4l/buffer.rst index 5deb4a46f992..ac58966ccb9b 100644 --- a/Documentation/media/uapi/v4l/buffer.rst +++ b/Documentation/media/uapi/v4l/buffer.rst @@ -11,14 +11,14 @@ the Streaming I/O methods. In the multi-planar API, the data is held in planes, while the buffer structure acts as a container for the planes. Only pointers to buffers (planes) are exchanged, the data itself is not copied. These pointers, together with meta-information like timestamps -or field parity, are stored in a struct :ref:`struct v4l2_buffer <v4l2-buffer>`, +or field parity, are stored in a struct :c:type:`v4l2_buffer`, argument to the :ref:`VIDIOC_QUERYBUF`, :ref:`VIDIOC_QBUF` and :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. In the multi-planar API, -some plane-specific members of struct :ref:`struct v4l2_buffer <v4l2-buffer>`, +some plane-specific members of struct :c:type:`v4l2_buffer`, such as pointers and sizes for each plane, are stored in struct -:ref:`struct v4l2_plane <v4l2-plane>` instead. In that case, struct -:ref:`struct v4l2_buffer <v4l2-buffer>` contains an array of plane structures. +struct :c:type:`v4l2_plane` instead. In that case, struct +struct :c:type:`v4l2_buffer` contains an array of plane structures. Dequeued video buffers come with timestamps. The driver decides at which part of the frame and with which clock the timestamp is taken. Please @@ -34,470 +34,302 @@ flags are copied from the OUTPUT video buffer to the CAPTURE video buffer. -.. _v4l2-buffer: +.. c:type:: v4l2_buffer struct v4l2_buffer ================== +.. tabularcolumns:: |p{2.8cm}|p{2.5cm}|p{1.3cm}|p{10.5cm}| + +.. cssclass:: longtable + .. flat-table:: struct v4l2_buffer :header-rows: 0 :stub-columns: 0 - :widths: 1 1 1 2 - - - - .. row 1 - - - __u32 - - - ``index`` - - - - - Number of the buffer, set by the application except when calling - :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the - driver. This field can range from zero to the number of buffers - allocated with the :ref:`VIDIOC_REQBUFS` ioctl - (struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` - ``count``), plus any buffers allocated with - :ref:`VIDIOC_CREATE_BUFS` minus one. - - - .. row 2 - - - __u32 - - - ``type`` - - - - - Type of the buffer, same as struct - :ref:`v4l2_format <v4l2-format>` ``type`` or struct - :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set - by the application. See :ref:`v4l2-buf-type` - - - .. row 3 - - - __u32 - - - ``bytesused`` - - - - - The number of bytes occupied by the data in the buffer. It depends - on the negotiated data format and may change with each buffer for - compressed variable size data like JPEG images. Drivers must set - this field when ``type`` refers to a capture stream, applications - when it refers to an output stream. If the application sets this - to 0 for an output stream, then ``bytesused`` will be set to the - size of the buffer (see the ``length`` field of this struct) by - the driver. For multiplanar formats this field is ignored and the - ``planes`` pointer is used instead. - - - .. row 4 - - - __u32 - - - ``flags`` - - - - - Flags set by the application or driver, see :ref:`buffer-flags`. - - - .. row 5 - - - __u32 - - - ``field`` - - - - - Indicates the field order of the image in the buffer, see - :ref:`v4l2-field`. This field is not used when the buffer - contains VBI data. Drivers must set it when ``type`` refers to a - capture stream, applications when it refers to an output stream. - - - .. row 6 - - - struct timeval - - - ``timestamp`` - - - - - For capture streams this is time when the first data byte was - captured, as returned by the :c:func:`clock_gettime()` function - for the relevant clock id; see ``V4L2_BUF_FLAG_TIMESTAMP_*`` in - :ref:`buffer-flags`. For output streams the driver stores the - time at which the last data byte was actually sent out in the - ``timestamp`` field. This permits applications to monitor the - drift between the video and system clock. For output streams that - use ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` the application has to fill - in the timestamp which will be copied by the driver to the capture - stream. - - - .. row 7 - - - struct :ref:`v4l2_timecode <v4l2-timecode>` - - - ``timecode`` - - - - - When ``type`` is ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` and the - ``V4L2_BUF_FLAG_TIMECODE`` flag is set in ``flags``, this - structure contains a frame timecode. In - :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and - bottom field contain the same timecode. Timecodes are intended to - help video editing and are typically recorded on video tapes, but - also embedded in compressed formats like MPEG. This field is - independent of the ``timestamp`` and ``sequence`` fields. - - - .. row 8 - - - __u32 - - - ``sequence`` - - - - - Set by the driver, counting the frames (not fields!) in sequence. - This field is set for both input and output devices. - - - .. row 9 - - - :cspan:`3` - - In :ref:`V4L2_FIELD_ALTERNATE <v4l2-field>` mode the top and - bottom field have the same sequence number. The count starts at - zero and includes dropped or repeated frames. A dropped frame was - received by an input device but could not be stored due to lack of - free buffer space. A repeated frame was displayed again by an - output device because the application did not pass new data in - time. - - .. note:: This may count the frames received e.g. over USB, without - taking into account the frames dropped by the remote hardware due - to limited compression throughput or bus bandwidth. These devices - identify by not enumerating any video standards, see - :ref:`standard`. - - - .. row 10 - - - __u32 - - - ``memory`` - - - - - This field must be set by applications and/or drivers in - accordance with the selected I/O method. See :ref:`v4l2-memory` - - - .. row 11 - - - union - - - ``m`` - - - .. row 12 - - - - - __u32 - - - ``offset`` - - - For the single-planar API and when ``memory`` is - ``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the - start of the device memory. The value is returned by the driver - and apart of serving as parameter to the - :ref:`mmap() <func-mmap>` function not useful for applications. - See :ref:`mmap` for details - - - .. row 13 - - - - - unsigned long - - - ``userptr`` - - - For the single-planar API and when ``memory`` is - ``V4L2_MEMORY_USERPTR`` this is a pointer to the buffer (casted to - unsigned long type) in virtual memory, set by the application. See - :ref:`userp` for details. - - - .. row 14 - - - - - struct v4l2_plane - - - ``*planes`` - - - When using the multi-planar API, contains a userspace pointer to - an array of struct :ref:`v4l2_plane <v4l2-plane>`. The size of - the array should be put in the ``length`` field of this - :ref:`struct v4l2_buffer <v4l2-buffer>` structure. - - - .. row 15 - - - - - int - - - ``fd`` - - - For the single-plane API and when ``memory`` is - ``V4L2_MEMORY_DMABUF`` this is the file descriptor associated with - a DMABUF buffer. - - - .. row 16 - - - __u32 - - - ``length`` - - - - - Size of the buffer (not the payload) in bytes for the - single-planar API. This is set by the driver based on the calls to - :ref:`VIDIOC_REQBUFS` and/or - :ref:`VIDIOC_CREATE_BUFS`. For the - multi-planar API the application sets this to the number of - elements in the ``planes`` array. The driver will fill in the - actual number of valid elements in that array. - - - .. row 17 - - - __u32 - - - ``reserved2`` - - - - - A place holder for future extensions. Drivers and applications - must set this to 0. - - - .. row 18 - - - __u32 - - - ``reserved`` - - - - - A place holder for future extensions. Drivers and applications - must set this to 0. - - - -.. _v4l2-plane: + :widths: 1 2 1 10 + + * - __u32 + - ``index`` + - + - Number of the buffer, set by the application except when calling + :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the + driver. This field can range from zero to the number of buffers + allocated with the :ref:`VIDIOC_REQBUFS` ioctl + (struct :c:type:`v4l2_requestbuffers` + ``count``), plus any buffers allocated with + :ref:`VIDIOC_CREATE_BUFS` minus one. + * - __u32 + - ``type`` + - + - Type of the buffer, same as struct + :c:type:`v4l2_format` ``type`` or struct + :c:type:`v4l2_requestbuffers` ``type``, set + by the application. See :c:type:`v4l2_buf_type` + * - __u32 + - ``bytesused`` + - + - The number of bytes occupied by the data in the buffer. It depends + on the negotiated data format and may change with each buffer for + compressed variable size data like JPEG images. Drivers must set + this field when ``type`` refers to a capture stream, applications + when it refers to an output stream. If the application sets this + to 0 for an output stream, then ``bytesused`` will be set to the + size of the buffer (see the ``length`` field of this struct) by + the driver. For multiplanar formats this field is ignored and the + ``planes`` pointer is used instead. + * - __u32 + - ``flags`` + - + - Flags set by the application or driver, see :ref:`buffer-flags`. + * - __u32 + - ``field`` + - + - Indicates the field order of the image in the buffer, see + :c:type:`v4l2_field`. This field is not used when the buffer + contains VBI data. Drivers must set it when ``type`` refers to a + capture stream, applications when it refers to an output stream. + * - struct timeval + - ``timestamp`` + - + - For capture streams this is time when the first data byte was + captured, as returned by the :c:func:`clock_gettime()` function + for the relevant clock id; see ``V4L2_BUF_FLAG_TIMESTAMP_*`` in + :ref:`buffer-flags`. For output streams the driver stores the + time at which the last data byte was actually sent out in the + ``timestamp`` field. This permits applications to monitor the + drift between the video and system clock. For output streams that + use ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` the application has to fill + in the timestamp which will be copied by the driver to the capture + stream. + * - struct :c:type:`v4l2_timecode` + - ``timecode`` + - + - When ``type`` is ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` and the + ``V4L2_BUF_FLAG_TIMECODE`` flag is set in ``flags``, this + structure contains a frame timecode. In + :c:type:`V4L2_FIELD_ALTERNATE <v4l2_field>` mode the top and + bottom field contain the same timecode. Timecodes are intended to + help video editing and are typically recorded on video tapes, but + also embedded in compressed formats like MPEG. This field is + independent of the ``timestamp`` and ``sequence`` fields. + * - __u32 + - ``sequence`` + - + - Set by the driver, counting the frames (not fields!) in sequence. + This field is set for both input and output devices. + * - :cspan:`3` + + In :c:type:`V4L2_FIELD_ALTERNATE <v4l2_field>` mode the top and + bottom field have the same sequence number. The count starts at + zero and includes dropped or repeated frames. A dropped frame was + received by an input device but could not be stored due to lack of + free buffer space. A repeated frame was displayed again by an + output device because the application did not pass new data in + time. + + .. note:: + + This may count the frames received e.g. over USB, without + taking into account the frames dropped by the remote hardware due + to limited compression throughput or bus bandwidth. These devices + identify by not enumerating any video standards, see + :ref:`standard`. + + * - __u32 + - ``memory`` + - + - This field must be set by applications and/or drivers in + accordance with the selected I/O method. See :c:type:`v4l2_memory` + * - union + - ``m`` + * - + - __u32 + - ``offset`` + - For the single-planar API and when ``memory`` is + ``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the + start of the device memory. The value is returned by the driver + and apart of serving as parameter to the + :ref:`mmap() <func-mmap>` function not useful for applications. + See :ref:`mmap` for details + * - + - unsigned long + - ``userptr`` + - For the single-planar API and when ``memory`` is + ``V4L2_MEMORY_USERPTR`` this is a pointer to the buffer (casted to + unsigned long type) in virtual memory, set by the application. See + :ref:`userp` for details. + * - + - struct v4l2_plane + - ``*planes`` + - When using the multi-planar API, contains a userspace pointer to + an array of struct :c:type:`v4l2_plane`. The size of + the array should be put in the ``length`` field of this + struct :c:type:`v4l2_buffer` structure. + * - + - int + - ``fd`` + - For the single-plane API and when ``memory`` is + ``V4L2_MEMORY_DMABUF`` this is the file descriptor associated with + a DMABUF buffer. + * - __u32 + - ``length`` + - + - Size of the buffer (not the payload) in bytes for the + single-planar API. This is set by the driver based on the calls to + :ref:`VIDIOC_REQBUFS` and/or + :ref:`VIDIOC_CREATE_BUFS`. For the + multi-planar API the application sets this to the number of + elements in the ``planes`` array. The driver will fill in the + actual number of valid elements in that array. + * - __u32 + - ``reserved2`` + - + - A place holder for future extensions. Drivers and applications + must set this to 0. + * - __u32 + - ``reserved`` + - + - A place holder for future extensions. Drivers and applications + must set this to 0. + + + +.. c:type:: v4l2_plane struct v4l2_plane ================= +.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| + +.. cssclass:: longtable + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 1 1 1 2 - - - .. row 1 - - - __u32 - - - ``bytesused`` - - - - - The number of bytes occupied by data in the plane (its payload). - Drivers must set this field when ``type`` refers to a capture - stream, applications when it refers to an output stream. If the - application sets this to 0 for an output stream, then - ``bytesused`` will be set to the size of the plane (see the - ``length`` field of this struct) by the driver. - - .. note:: Note that the actual image data starts at ``data_offset`` - which may not be 0. - - - .. row 2 - - - __u32 - - - ``length`` - - - - - Size in bytes of the plane (not its payload). This is set by the - driver based on the calls to - :ref:`VIDIOC_REQBUFS` and/or - :ref:`VIDIOC_CREATE_BUFS`. - - - .. row 3 - - - union - - - ``m`` - - - - - - - - .. row 4 - - - - - __u32 - - - ``mem_offset`` - - - When the memory type in the containing struct - :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_MMAP``, this - is the value that should be passed to :ref:`mmap() <func-mmap>`, - similar to the ``offset`` field in struct - :ref:`v4l2_buffer <v4l2-buffer>`. - - - .. row 5 - - - - - unsigned long - - - ``userptr`` - - - When the memory type in the containing struct - :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_USERPTR``, - this is a userspace pointer to the memory allocated for this plane - by an application. - - - .. row 6 - - - - - int - - - ``fd`` - - - When the memory type in the containing struct - :ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_DMABUF``, - this is a file descriptor associated with a DMABUF buffer, similar - to the ``fd`` field in struct :ref:`v4l2_buffer <v4l2-buffer>`. - - - .. row 7 - - - __u32 - - - ``data_offset`` - - - - - Offset in bytes to video data in the plane. Drivers must set this - field when ``type`` refers to a capture stream, applications when - it refers to an output stream. - - .. note:: That data_offset is included in ``bytesused``. So the - size of the image in the plane is ``bytesused``-``data_offset`` - at offset ``data_offset`` from the start of the plane. - - - .. row 8 - - - __u32 - - - ``reserved[11]`` - - - - - Reserved for future use. Should be zeroed by drivers and - applications. - - - -.. _v4l2-buf-type: + * - __u32 + - ``bytesused`` + - + - The number of bytes occupied by data in the plane (its payload). + Drivers must set this field when ``type`` refers to a capture + stream, applications when it refers to an output stream. If the + application sets this to 0 for an output stream, then + ``bytesused`` will be set to the size of the plane (see the + ``length`` field of this struct) by the driver. + + .. note:: + + Note that the actual image data starts at ``data_offset`` + which may not be 0. + * - __u32 + - ``length`` + - + - Size in bytes of the plane (not its payload). This is set by the + driver based on the calls to + :ref:`VIDIOC_REQBUFS` and/or + :ref:`VIDIOC_CREATE_BUFS`. + * - union + - ``m`` + - + - + * - + - __u32 + - ``mem_offset`` + - When the memory type in the containing struct + :c:type:`v4l2_buffer` is ``V4L2_MEMORY_MMAP``, this + is the value that should be passed to :ref:`mmap() <func-mmap>`, + similar to the ``offset`` field in struct + :c:type:`v4l2_buffer`. + * - + - unsigned long + - ``userptr`` + - When the memory type in the containing struct + :c:type:`v4l2_buffer` is ``V4L2_MEMORY_USERPTR``, + this is a userspace pointer to the memory allocated for this plane + by an application. + * - + - int + - ``fd`` + - When the memory type in the containing struct + :c:type:`v4l2_buffer` is ``V4L2_MEMORY_DMABUF``, + this is a file descriptor associated with a DMABUF buffer, similar + to the ``fd`` field in struct :c:type:`v4l2_buffer`. + * - __u32 + - ``data_offset`` + - + - Offset in bytes to video data in the plane. Drivers must set this + field when ``type`` refers to a capture stream, applications when + it refers to an output stream. + + .. note:: + + That data_offset is included in ``bytesused``. So the + size of the image in the plane is ``bytesused``-``data_offset`` + at offset ``data_offset`` from the start of the plane. + * - __u32 + - ``reserved[11]`` + - + - Reserved for future use. Should be zeroed by drivers and + applications. + + + +.. c:type:: v4l2_buf_type enum v4l2_buf_type ================== +.. cssclass:: longtable + +.. tabularcolumns:: |p{7.2cm}|p{0.6cm}|p{9.7cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 3 1 4 - - - - .. row 1 - - - ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` - - - 1 - - - Buffer of a single-planar video capture stream, see - :ref:`capture`. - - - .. row 2 - - - ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` - - - 9 - - - Buffer of a multi-planar video capture stream, see - :ref:`capture`. - - - .. row 3 - - - ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` - - - 2 - - - Buffer of a single-planar video output stream, see - :ref:`output`. - - - .. row 4 - - - ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` - - - 10 - - - Buffer of a multi-planar video output stream, see :ref:`output`. - - - .. row 5 - - - ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` - - - 3 - - - Buffer for video overlay, see :ref:`overlay`. - - - .. row 6 - - - ``V4L2_BUF_TYPE_VBI_CAPTURE`` - - - 4 - - - Buffer of a raw VBI capture stream, see :ref:`raw-vbi`. - - - .. row 7 - - - ``V4L2_BUF_TYPE_VBI_OUTPUT`` - - - 5 - - - Buffer of a raw VBI output stream, see :ref:`raw-vbi`. - - - .. row 8 - - - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` - - - 6 - - - Buffer of a sliced VBI capture stream, see :ref:`sliced`. - - - .. row 9 - - - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT`` - - - 7 - - - Buffer of a sliced VBI output stream, see :ref:`sliced`. - - - .. row 10 - - - ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` - - - 8 - - - Buffer for video output overlay (OSD), see :ref:`osd`. - - - .. row 11 - - - ``V4L2_BUF_TYPE_SDR_CAPTURE`` - - - 11 - - - Buffer for Software Defined Radio (SDR) capture stream, see - :ref:`sdr`. - - - .. row 12 - - - ``V4L2_BUF_TYPE_SDR_OUTPUT`` - - - 12 - - - Buffer for Software Defined Radio (SDR) output stream, see - :ref:`sdr`. + :widths: 4 1 9 + + * - ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` + - 1 + - Buffer of a single-planar video capture stream, see + :ref:`capture`. + * - ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` + - 9 + - Buffer of a multi-planar video capture stream, see + :ref:`capture`. + * - ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` + - 2 + - Buffer of a single-planar video output stream, see + :ref:`output`. + * - ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` + - 10 + - Buffer of a multi-planar video output stream, see :ref:`output`. + * - ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` + - 3 + - Buffer for video overlay, see :ref:`overlay`. + * - ``V4L2_BUF_TYPE_VBI_CAPTURE`` + - 4 + - Buffer of a raw VBI capture stream, see :ref:`raw-vbi`. + * - ``V4L2_BUF_TYPE_VBI_OUTPUT`` + - 5 + - Buffer of a raw VBI output stream, see :ref:`raw-vbi`. + * - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` + - 6 + - Buffer of a sliced VBI capture stream, see :ref:`sliced`. + * - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT`` + - 7 + - Buffer of a sliced VBI output stream, see :ref:`sliced`. + * - ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` + - 8 + - Buffer for video output overlay (OSD), see :ref:`osd`. + * - ``V4L2_BUF_TYPE_SDR_CAPTURE`` + - 11 + - Buffer for Software Defined Radio (SDR) capture stream, see + :ref:`sdr`. + * - ``V4L2_BUF_TYPE_SDR_OUTPUT`` + - 12 + - Buffer for Software Defined Radio (SDR) output stream, see + :ref:`sdr`. @@ -506,371 +338,267 @@ enum v4l2_buf_type Buffer Flags ============ +.. tabularcolumns:: |p{7.0cm}|p{2.2cm}|p{8.3cm}| + +.. cssclass:: longtable + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. _`V4L2-BUF-FLAG-MAPPED`: - - - ``V4L2_BUF_FLAG_MAPPED`` - - - 0x00000001 - - - The buffer resides in device memory and has been mapped into the - application's address space, see :ref:`mmap` for details. - Drivers set or clear this flag when the - :ref:`VIDIOC_QUERYBUF`, - :ref:`VIDIOC_QBUF` or - :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Set by the - driver. - - - .. _`V4L2-BUF-FLAG-QUEUED`: - - - ``V4L2_BUF_FLAG_QUEUED`` - - - 0x00000002 - - - Internally drivers maintain two buffer queues, an incoming and - outgoing queue. When this flag is set, the buffer is currently on - the incoming queue. It automatically moves to the outgoing queue - after the buffer has been filled (capture devices) or displayed - (output devices). Drivers set or clear this flag when the - ``VIDIOC_QUERYBUF`` ioctl is called. After (successful) calling - the ``VIDIOC_QBUF``\ ioctl it is always set and after - ``VIDIOC_DQBUF`` always cleared. - - - .. _`V4L2-BUF-FLAG-DONE`: - - - ``V4L2_BUF_FLAG_DONE`` - - - 0x00000004 - - - When this flag is set, the buffer is currently on the outgoing - queue, ready to be dequeued from the driver. Drivers set or clear - this flag when the ``VIDIOC_QUERYBUF`` ioctl is called. After - calling the ``VIDIOC_QBUF`` or ``VIDIOC_DQBUF`` it is always - cleared. Of course a buffer cannot be on both queues at the same - time, the ``V4L2_BUF_FLAG_QUEUED`` and ``V4L2_BUF_FLAG_DONE`` flag - are mutually exclusive. They can be both cleared however, then the - buffer is in "dequeued" state, in the application domain so to - say. - - - .. _`V4L2-BUF-FLAG-ERROR`: - - - ``V4L2_BUF_FLAG_ERROR`` - - - 0x00000040 - - - When this flag is set, the buffer has been dequeued successfully, - although the data might have been corrupted. This is recoverable, - streaming may continue as normal and the buffer may be reused - normally. Drivers set this flag when the ``VIDIOC_DQBUF`` ioctl is - called. - - - .. _`V4L2-BUF-FLAG-KEYFRAME`: - - - ``V4L2_BUF_FLAG_KEYFRAME`` - - - 0x00000008 - - - Drivers set or clear this flag when calling the ``VIDIOC_DQBUF`` - ioctl. It may be set by video capture devices when the buffer - contains a compressed image which is a key frame (or field), i. e. - can be decompressed on its own. Also known as an I-frame. - Applications can set this bit when ``type`` refers to an output - stream. - - - .. _`V4L2-BUF-FLAG-PFRAME`: - - - ``V4L2_BUF_FLAG_PFRAME`` - - - 0x00000010 - - - Similar to ``V4L2_BUF_FLAG_KEYFRAME`` this flags predicted frames - or fields which contain only differences to a previous key frame. - Applications can set this bit when ``type`` refers to an output - stream. - - - .. _`V4L2-BUF-FLAG-BFRAME`: - - - ``V4L2_BUF_FLAG_BFRAME`` - - - 0x00000020 - - - Similar to ``V4L2_BUF_FLAG_KEYFRAME`` this flags a bi-directional - predicted frame or field which contains only the differences - between the current frame and both the preceding and following key - frames to specify its content. Applications can set this bit when - ``type`` refers to an output stream. - - - .. _`V4L2-BUF-FLAG-TIMECODE`: - - - ``V4L2_BUF_FLAG_TIMECODE`` - - - 0x00000100 - - - The ``timecode`` field is valid. Drivers set or clear this flag - when the ``VIDIOC_DQBUF`` ioctl is called. Applications can set - this bit and the corresponding ``timecode`` structure when - ``type`` refers to an output stream. - - - .. _`V4L2-BUF-FLAG-PREPARED`: - - - ``V4L2_BUF_FLAG_PREPARED`` - - - 0x00000400 - - - The buffer has been prepared for I/O and can be queued by the - application. Drivers set or clear this flag when the - :ref:`VIDIOC_QUERYBUF`, - :ref:`VIDIOC_PREPARE_BUF <VIDIOC_QBUF>`, - :ref:`VIDIOC_QBUF` or - :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. - - - .. _`V4L2-BUF-FLAG-NO-CACHE-INVALIDATE`: - - - ``V4L2_BUF_FLAG_NO_CACHE_INVALIDATE`` - - - 0x00000800 - - - Caches do not have to be invalidated for this buffer. Typically - applications shall use this flag if the data captured in the - buffer is not going to be touched by the CPU, instead the buffer - will, probably, be passed on to a DMA-capable hardware unit for - further processing or output. - - - .. _`V4L2-BUF-FLAG-NO-CACHE-CLEAN`: - - - ``V4L2_BUF_FLAG_NO_CACHE_CLEAN`` - - - 0x00001000 - - - Caches do not have to be cleaned for this buffer. Typically - applications shall use this flag for output buffers if the data in - this buffer has not been created by the CPU but by some - DMA-capable unit, in which case caches have not been used. - - - .. _`V4L2-BUF-FLAG-LAST`: - - - ``V4L2_BUF_FLAG_LAST`` - - - 0x00100000 - - - Last buffer produced by the hardware. mem2mem codec drivers set - this flag on the capture queue for the last buffer when the - :ref:`VIDIOC_QUERYBUF` or - :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Due to - hardware limitations, the last buffer may be empty. In this case - the driver will set the ``bytesused`` field to 0, regardless of - the format. Any Any subsequent call to the - :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore, - but return an ``EPIPE`` error code. - - - .. _`V4L2-BUF-FLAG-TIMESTAMP-MASK`: - - - ``V4L2_BUF_FLAG_TIMESTAMP_MASK`` - - - 0x0000e000 - - - Mask for timestamp types below. To test the timestamp type, mask - out bits not belonging to timestamp type by performing a logical - and operation with buffer flags and timestamp mask. - - - .. _`V4L2-BUF-FLAG-TIMESTAMP-UNKNOWN`: - - - ``V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN`` - - - 0x00000000 - - - Unknown timestamp type. This type is used by drivers before Linux - 3.9 and may be either monotonic (see below) or realtime (wall - clock). Monotonic clock has been favoured in embedded systems - whereas most of the drivers use the realtime clock. Either kinds - of timestamps are available in user space via - :c:func:`clock_gettime(2)` using clock IDs ``CLOCK_MONOTONIC`` - and ``CLOCK_REALTIME``, respectively. - - - .. _`V4L2-BUF-FLAG-TIMESTAMP-MONOTONIC`: - - - ``V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC`` - - - 0x00002000 - - - The buffer timestamp has been taken from the ``CLOCK_MONOTONIC`` - clock. To access the same clock outside V4L2, use - :c:func:`clock_gettime(2)`. - - - .. _`V4L2-BUF-FLAG-TIMESTAMP-COPY`: - - - ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` - - - 0x00004000 - - - The CAPTURE buffer timestamp has been taken from the corresponding - OUTPUT buffer. This flag applies only to mem2mem devices. - - - .. _`V4L2-BUF-FLAG-TSTAMP-SRC-MASK`: - - - ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` - - - 0x00070000 - - - Mask for timestamp sources below. The timestamp source defines the - point of time the timestamp is taken in relation to the frame. - Logical 'and' operation between the ``flags`` field and - ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` produces the value of the - timestamp source. Applications must set the timestamp source when - ``type`` refers to an output stream and - ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` is set. - - - .. _`V4L2-BUF-FLAG-TSTAMP-SRC-EOF`: - - - ``V4L2_BUF_FLAG_TSTAMP_SRC_EOF`` - - - 0x00000000 - - - End Of Frame. The buffer timestamp has been taken when the last - pixel of the frame has been received or the last pixel of the - frame has been transmitted. In practice, software generated - timestamps will typically be read from the clock a small amount of - time after the last pixel has been received or transmitten, - depending on the system and other activity in it. - - - .. _`V4L2-BUF-FLAG-TSTAMP-SRC-SOE`: - - - ``V4L2_BUF_FLAG_TSTAMP_SRC_SOE`` - - - 0x00010000 - - - Start Of Exposure. The buffer timestamp has been taken when the - exposure of the frame has begun. This is only valid for the - ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` buffer type. - - - -.. _v4l2-memory: + * .. _`V4L2-BUF-FLAG-MAPPED`: + + - ``V4L2_BUF_FLAG_MAPPED`` + - 0x00000001 + - The buffer resides in device memory and has been mapped into the + application's address space, see :ref:`mmap` for details. + Drivers set or clear this flag when the + :ref:`VIDIOC_QUERYBUF`, + :ref:`VIDIOC_QBUF` or + :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Set by the + driver. + * .. _`V4L2-BUF-FLAG-QUEUED`: + + - ``V4L2_BUF_FLAG_QUEUED`` + - 0x00000002 + - Internally drivers maintain two buffer queues, an incoming and + outgoing queue. When this flag is set, the buffer is currently on + the incoming queue. It automatically moves to the outgoing queue + after the buffer has been filled (capture devices) or displayed + (output devices). Drivers set or clear this flag when the + ``VIDIOC_QUERYBUF`` ioctl is called. After (successful) calling + the ``VIDIOC_QBUF``\ ioctl it is always set and after + ``VIDIOC_DQBUF`` always cleared. + * .. _`V4L2-BUF-FLAG-DONE`: + + - ``V4L2_BUF_FLAG_DONE`` + - 0x00000004 + - When this flag is set, the buffer is currently on the outgoing + queue, ready to be dequeued from the driver. Drivers set or clear + this flag when the ``VIDIOC_QUERYBUF`` ioctl is called. After + calling the ``VIDIOC_QBUF`` or ``VIDIOC_DQBUF`` it is always + cleared. Of course a buffer cannot be on both queues at the same + time, the ``V4L2_BUF_FLAG_QUEUED`` and ``V4L2_BUF_FLAG_DONE`` flag + are mutually exclusive. They can be both cleared however, then the + buffer is in "dequeued" state, in the application domain so to + say. + * .. _`V4L2-BUF-FLAG-ERROR`: + + - ``V4L2_BUF_FLAG_ERROR`` + - 0x00000040 + - When this flag is set, the buffer has been dequeued successfully, + although the data might have been corrupted. This is recoverable, + streaming may continue as normal and the buffer may be reused + normally. Drivers set this flag when the ``VIDIOC_DQBUF`` ioctl is + called. + * .. _`V4L2-BUF-FLAG-KEYFRAME`: + + - ``V4L2_BUF_FLAG_KEYFRAME`` + - 0x00000008 + - Drivers set or clear this flag when calling the ``VIDIOC_DQBUF`` + ioctl. It may be set by video capture devices when the buffer + contains a compressed image which is a key frame (or field), i. e. + can be decompressed on its own. Also known as an I-frame. + Applications can set this bit when ``type`` refers to an output + stream. + * .. _`V4L2-BUF-FLAG-PFRAME`: + + - ``V4L2_BUF_FLAG_PFRAME`` + - 0x00000010 + - Similar to ``V4L2_BUF_FLAG_KEYFRAME`` this flags predicted frames + or fields which contain only differences to a previous key frame. + Applications can set this bit when ``type`` refers to an output + stream. + * .. _`V4L2-BUF-FLAG-BFRAME`: + + - ``V4L2_BUF_FLAG_BFRAME`` + - 0x00000020 + - Similar to ``V4L2_BUF_FLAG_KEYFRAME`` this flags a bi-directional + predicted frame or field which contains only the differences + between the current frame and both the preceding and following key + frames to specify its content. Applications can set this bit when + ``type`` refers to an output stream. + * .. _`V4L2-BUF-FLAG-TIMECODE`: + + - ``V4L2_BUF_FLAG_TIMECODE`` + - 0x00000100 + - The ``timecode`` field is valid. Drivers set or clear this flag + when the ``VIDIOC_DQBUF`` ioctl is called. Applications can set + this bit and the corresponding ``timecode`` structure when + ``type`` refers to an output stream. + * .. _`V4L2-BUF-FLAG-PREPARED`: + + - ``V4L2_BUF_FLAG_PREPARED`` + - 0x00000400 + - The buffer has been prepared for I/O and can be queued by the + application. Drivers set or clear this flag when the + :ref:`VIDIOC_QUERYBUF`, + :ref:`VIDIOC_PREPARE_BUF <VIDIOC_QBUF>`, + :ref:`VIDIOC_QBUF` or + :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. + * .. _`V4L2-BUF-FLAG-NO-CACHE-INVALIDATE`: + + - ``V4L2_BUF_FLAG_NO_CACHE_INVALIDATE`` + - 0x00000800 + - Caches do not have to be invalidated for this buffer. Typically + applications shall use this flag if the data captured in the + buffer is not going to be touched by the CPU, instead the buffer + will, probably, be passed on to a DMA-capable hardware unit for + further processing or output. + * .. _`V4L2-BUF-FLAG-NO-CACHE-CLEAN`: + + - ``V4L2_BUF_FLAG_NO_CACHE_CLEAN`` + - 0x00001000 + - Caches do not have to be cleaned for this buffer. Typically + applications shall use this flag for output buffers if the data in + this buffer has not been created by the CPU but by some + DMA-capable unit, in which case caches have not been used. + * .. _`V4L2-BUF-FLAG-LAST`: + + - ``V4L2_BUF_FLAG_LAST`` + - 0x00100000 + - Last buffer produced by the hardware. mem2mem codec drivers set + this flag on the capture queue for the last buffer when the + :ref:`VIDIOC_QUERYBUF` or + :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl is called. Due to + hardware limitations, the last buffer may be empty. In this case + the driver will set the ``bytesused`` field to 0, regardless of + the format. Any Any subsequent call to the + :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore, + but return an ``EPIPE`` error code. + * .. _`V4L2-BUF-FLAG-TIMESTAMP-MASK`: + + - ``V4L2_BUF_FLAG_TIMESTAMP_MASK`` + - 0x0000e000 + - Mask for timestamp types below. To test the timestamp type, mask + out bits not belonging to timestamp type by performing a logical + and operation with buffer flags and timestamp mask. + * .. _`V4L2-BUF-FLAG-TIMESTAMP-UNKNOWN`: + + - ``V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN`` + - 0x00000000 + - Unknown timestamp type. This type is used by drivers before Linux + 3.9 and may be either monotonic (see below) or realtime (wall + clock). Monotonic clock has been favoured in embedded systems + whereas most of the drivers use the realtime clock. Either kinds + of timestamps are available in user space via + :c:func:`clock_gettime` using clock IDs ``CLOCK_MONOTONIC`` + and ``CLOCK_REALTIME``, respectively. + * .. _`V4L2-BUF-FLAG-TIMESTAMP-MONOTONIC`: + + - ``V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC`` + - 0x00002000 + - The buffer timestamp has been taken from the ``CLOCK_MONOTONIC`` + clock. To access the same clock outside V4L2, use + :c:func:`clock_gettime`. + * .. _`V4L2-BUF-FLAG-TIMESTAMP-COPY`: + + - ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` + - 0x00004000 + - The CAPTURE buffer timestamp has been taken from the corresponding + OUTPUT buffer. This flag applies only to mem2mem devices. + * .. _`V4L2-BUF-FLAG-TSTAMP-SRC-MASK`: + + - ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` + - 0x00070000 + - Mask for timestamp sources below. The timestamp source defines the + point of time the timestamp is taken in relation to the frame. + Logical 'and' operation between the ``flags`` field and + ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK`` produces the value of the + timestamp source. Applications must set the timestamp source when + ``type`` refers to an output stream and + ``V4L2_BUF_FLAG_TIMESTAMP_COPY`` is set. + * .. _`V4L2-BUF-FLAG-TSTAMP-SRC-EOF`: + + - ``V4L2_BUF_FLAG_TSTAMP_SRC_EOF`` + - 0x00000000 + - End Of Frame. The buffer timestamp has been taken when the last + pixel of the frame has been received or the last pixel of the + frame has been transmitted. In practice, software generated + timestamps will typically be read from the clock a small amount of + time after the last pixel has been received or transmitten, + depending on the system and other activity in it. + * .. _`V4L2-BUF-FLAG-TSTAMP-SRC-SOE`: + + - ``V4L2_BUF_FLAG_TSTAMP_SRC_SOE`` + - 0x00010000 + - Start Of Exposure. The buffer timestamp has been taken when the + exposure of the frame has begun. This is only valid for the + ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` buffer type. + + + +.. c:type:: v4l2_memory enum v4l2_memory ================ +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_MEMORY_MMAP`` - - - 1 - - - The buffer is used for :ref:`memory mapping <mmap>` I/O. - - - .. row 2 - - - ``V4L2_MEMORY_USERPTR`` - - - 2 - - - The buffer is used for :ref:`user pointer <userp>` I/O. - - - .. row 3 - - - ``V4L2_MEMORY_OVERLAY`` - - - 3 - - - [to do] - - - .. row 4 - - - ``V4L2_MEMORY_DMABUF`` - - - 4 - - - The buffer is used for :ref:`DMA shared buffer <dmabuf>` I/O. + * - ``V4L2_MEMORY_MMAP`` + - 1 + - The buffer is used for :ref:`memory mapping <mmap>` I/O. + * - ``V4L2_MEMORY_USERPTR`` + - 2 + - The buffer is used for :ref:`user pointer <userp>` I/O. + * - ``V4L2_MEMORY_OVERLAY`` + - 3 + - [to do] + * - ``V4L2_MEMORY_DMABUF`` + - 4 + - The buffer is used for :ref:`DMA shared buffer <dmabuf>` I/O. Timecodes ========= -The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a +The struct :c:type:`v4l2_timecode` structure is designed to hold a :ref:`smpte12m` or similar timecode. (struct -:c:type:`struct timeval` timestamps are stored in struct -:ref:`v4l2_buffer <v4l2-buffer>` field ``timestamp``.) +struct :c:type:`timeval` timestamps are stored in struct +:c:type:`v4l2_buffer` field ``timestamp``.) -.. _v4l2-timecode: +.. c:type:: v4l2_timecode struct v4l2_timecode -------------------- +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``type`` - - - Frame rate the timecodes are based on, see :ref:`timecode-type`. - - - .. row 2 - - - __u32 - - - ``flags`` - - - Timecode flags, see :ref:`timecode-flags`. - - - .. row 3 - - - __u8 - - - ``frames`` - - - Frame count, 0 ... 23/24/29/49/59, depending on the type of - timecode. - - - .. row 4 - - - __u8 - - - ``seconds`` - - - Seconds count, 0 ... 59. This is a binary, not BCD number. - - - .. row 5 - - - __u8 - - - ``minutes`` - - - Minutes count, 0 ... 59. This is a binary, not BCD number. - - - .. row 6 - - - __u8 - - - ``hours`` - - - Hours count, 0 ... 29. This is a binary, not BCD number. - - - .. row 7 - - - __u8 - - - ``userbits``\ [4] - - - The "user group" bits from the timecode. + * - __u32 + - ``type`` + - Frame rate the timecodes are based on, see :ref:`timecode-type`. + * - __u32 + - ``flags`` + - Timecode flags, see :ref:`timecode-flags`. + * - __u8 + - ``frames`` + - Frame count, 0 ... 23/24/29/49/59, depending on the type of + timecode. + * - __u8 + - ``seconds`` + - Seconds count, 0 ... 59. This is a binary, not BCD number. + * - __u8 + - ``minutes`` + - Minutes count, 0 ... 59. This is a binary, not BCD number. + * - __u8 + - ``hours`` + - Hours count, 0 ... 29. This is a binary, not BCD number. + * - __u8 + - ``userbits``\ [4] + - The "user group" bits from the timecode. @@ -879,51 +607,28 @@ struct v4l2_timecode Timecode Types -------------- +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_TC_TYPE_24FPS`` - - - 1 - - - 24 frames per second, i. e. film. - - - .. row 2 - - - ``V4L2_TC_TYPE_25FPS`` - - - 2 - - - 25 frames per second, i. e. PAL or SECAM video. - - - .. row 3 - - - ``V4L2_TC_TYPE_30FPS`` - - - 3 - - - 30 frames per second, i. e. NTSC video. - - - .. row 4 - - - ``V4L2_TC_TYPE_50FPS`` - - - 4 - - - - - - .. row 5 - - - ``V4L2_TC_TYPE_60FPS`` - - - 5 - - - + * - ``V4L2_TC_TYPE_24FPS`` + - 1 + - 24 frames per second, i. e. film. + * - ``V4L2_TC_TYPE_25FPS`` + - 2 + - 25 frames per second, i. e. PAL or SECAM video. + * - ``V4L2_TC_TYPE_30FPS`` + - 3 + - 30 frames per second, i. e. NTSC video. + * - ``V4L2_TC_TYPE_50FPS`` + - 4 + - + * - ``V4L2_TC_TYPE_60FPS`` + - 5 + - @@ -932,51 +637,28 @@ Timecode Types Timecode Flags -------------- +.. tabularcolumns:: |p{6.6cm}|p{1.4cm}|p{9.5cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_TC_FLAG_DROPFRAME`` - - - 0x0001 - - - Indicates "drop frame" semantics for counting frames in 29.97 fps - material. When set, frame numbers 0 and 1 at the start of each - minute, except minutes 0, 10, 20, 30, 40, 50 are omitted from the - count. - - - .. row 2 - - - ``V4L2_TC_FLAG_COLORFRAME`` - - - 0x0002 - - - The "color frame" flag. - - - .. row 3 - - - ``V4L2_TC_USERBITS_field`` - - - 0x000C - - - Field mask for the "binary group flags". - - - .. row 4 - - - ``V4L2_TC_USERBITS_USERDEFINED`` - - - 0x0000 - - - Unspecified format. - - - .. row 5 - - - ``V4L2_TC_USERBITS_8BITCHARS`` - - - 0x0008 - - - 8-bit ISO characters. + * - ``V4L2_TC_FLAG_DROPFRAME`` + - 0x0001 + - Indicates "drop frame" semantics for counting frames in 29.97 fps + material. When set, frame numbers 0 and 1 at the start of each + minute, except minutes 0, 10, 20, 30, 40, 50 are omitted from the + count. + * - ``V4L2_TC_FLAG_COLORFRAME`` + - 0x0002 + - The "color frame" flag. + * - ``V4L2_TC_USERBITS_field`` + - 0x000C + - Field mask for the "binary group flags". + * - ``V4L2_TC_USERBITS_USERDEFINED`` + - 0x0000 + - Unspecified format. + * - ``V4L2_TC_USERBITS_8BITCHARS`` + - 0x0008 + - 8-bit ISO characters. diff --git a/Documentation/media/uapi/v4l/control.rst b/Documentation/media/uapi/v4l/control.rst index 10ab53dd3163..d3f1450c4b08 100644 --- a/Documentation/media/uapi/v4l/control.rst +++ b/Documentation/media/uapi/v4l/control.rst @@ -191,109 +191,48 @@ Control IDs +.. tabularcolumns:: |p{5.5cm}|p{12cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - - .. row 1 - - - ``V4L2_COLORFX_NONE`` - - - Color effect is disabled. - - - .. row 2 - - - ``V4L2_COLORFX_ANTIQUE`` - - - An aging (old photo) effect. - - - .. row 3 - - - ``V4L2_COLORFX_ART_FREEZE`` - - - Frost color effect. - - - .. row 4 - - - ``V4L2_COLORFX_AQUA`` - - - Water color, cool tone. - - - .. row 5 - - - ``V4L2_COLORFX_BW`` - - - Black and white. - - - .. row 6 - - - ``V4L2_COLORFX_EMBOSS`` - - - Emboss, the highlights and shadows replace light/dark boundaries - and low contrast areas are set to a gray background. - - - .. row 7 - - - ``V4L2_COLORFX_GRASS_GREEN`` - - - Grass green. - - - .. row 8 - - - ``V4L2_COLORFX_NEGATIVE`` - - - Negative. - - - .. row 9 - - - ``V4L2_COLORFX_SEPIA`` - - - Sepia tone. - - - .. row 10 - - - ``V4L2_COLORFX_SKETCH`` - - - Sketch. - - - .. row 11 - - - ``V4L2_COLORFX_SKIN_WHITEN`` - - - Skin whiten. - - - .. row 12 - - - ``V4L2_COLORFX_SKY_BLUE`` - - - Sky blue. - - - .. row 13 - - - ``V4L2_COLORFX_SOLARIZATION`` - - - Solarization, the image is partially reversed in tone, only color - values above or below a certain threshold are inverted. - - - .. row 14 - - - ``V4L2_COLORFX_SILHOUETTE`` - - - Silhouette (outline). - - - .. row 15 - - - ``V4L2_COLORFX_VIVID`` - - - Vivid colors. - - - .. row 16 - - - ``V4L2_COLORFX_SET_CBCR`` - - - The Cb and Cr chroma components are replaced by fixed coefficients - determined by ``V4L2_CID_COLORFX_CBCR`` control. + :widths: 11 24 + + * - ``V4L2_COLORFX_NONE`` + - Color effect is disabled. + * - ``V4L2_COLORFX_ANTIQUE`` + - An aging (old photo) effect. + * - ``V4L2_COLORFX_ART_FREEZE`` + - Frost color effect. + * - ``V4L2_COLORFX_AQUA`` + - Water color, cool tone. + * - ``V4L2_COLORFX_BW`` + - Black and white. + * - ``V4L2_COLORFX_EMBOSS`` + - Emboss, the highlights and shadows replace light/dark boundaries + and low contrast areas are set to a gray background. + * - ``V4L2_COLORFX_GRASS_GREEN`` + - Grass green. + * - ``V4L2_COLORFX_NEGATIVE`` + - Negative. + * - ``V4L2_COLORFX_SEPIA`` + - Sepia tone. + * - ``V4L2_COLORFX_SKETCH`` + - Sketch. + * - ``V4L2_COLORFX_SKIN_WHITEN`` + - Skin whiten. + * - ``V4L2_COLORFX_SKY_BLUE`` + - Sky blue. + * - ``V4L2_COLORFX_SOLARIZATION`` + - Solarization, the image is partially reversed in tone, only color + values above or below a certain threshold are inverted. + * - ``V4L2_COLORFX_SILHOUETTE`` + - Silhouette (outline). + * - ``V4L2_COLORFX_VIVID`` + - Vivid colors. + * - ``V4L2_COLORFX_SET_CBCR`` + - The Cb and Cr chroma components are replaced by fixed coefficients + determined by ``V4L2_CID_COLORFX_CBCR`` control. diff --git a/Documentation/media/uapi/v4l/crop.rst b/Documentation/media/uapi/v4l/crop.rst index 0913822347af..3ea733a8eef8 100644 --- a/Documentation/media/uapi/v4l/crop.rst +++ b/Documentation/media/uapi/v4l/crop.rst @@ -15,7 +15,9 @@ offset into a video signal. Applications can use the following API to select an area in the video signal, query the default area and the hardware limits. -.. note:: Despite their name, the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>`, +.. note:: + + Despite their name, the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>`, :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls apply to input as well as output devices. @@ -38,7 +40,9 @@ support scaling or the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls. Their size (and position where applicable) will be fixed in this case. -.. note:: All capture and output devices must support the +.. note:: + + All capture and output devices must support the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>` ioctl such that applications can determine if scaling takes place. @@ -61,7 +65,7 @@ Cropping Structures For capture devices the coordinates of the top left corner, width and height of the area which can be sampled is given by the ``bounds`` -substructure of the struct :ref:`v4l2_cropcap <v4l2-cropcap>` returned +substructure of the struct :c:type:`v4l2_cropcap` returned by the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>` ioctl. To support a wide range of hardware this specification does not define an origin or units. However by convention drivers should horizontally count unscaled samples @@ -73,8 +77,8 @@ can capture both fields. The top left corner, width and height of the source rectangle, that is the area actually sampled, is given by struct -:ref:`v4l2_crop <v4l2-crop>` using the same coordinate system as -struct :ref:`v4l2_cropcap <v4l2-cropcap>`. Applications can use the +:c:type:`v4l2_crop` using the same coordinate system as +struct :c:type:`v4l2_cropcap`. Applications can use the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctls to get and set this rectangle. It must lie completely within the capture boundaries and the driver may further adjust the requested size @@ -82,7 +86,7 @@ and/or position according to hardware limitations. Each capture device has a default source rectangle, given by the ``defrect`` substructure of struct -:ref:`v4l2_cropcap <v4l2-cropcap>`. The center of this rectangle +:c:type:`v4l2_cropcap`. The center of this rectangle shall align with the center of the active picture area of the video signal, and cover what the driver writer considers the complete picture. Drivers shall reset the source rectangle to the default when the driver @@ -100,11 +104,11 @@ Video hardware can have various cropping, insertion and scaling limitations. It may only scale up or down, support only discrete scaling factors, or have different scaling abilities in horizontal and vertical direction. Also it may not support scaling at all. At the same time the -struct :ref:`v4l2_crop <v4l2-crop>` rectangle may have to be aligned, +struct :c:type:`v4l2_crop` rectangle may have to be aligned, and both the source and target rectangles may have arbitrary upper and lower size limits. In particular the maximum ``width`` and ``height`` in -struct :ref:`v4l2_crop <v4l2-crop>` may be smaller than the struct -:ref:`v4l2_cropcap <v4l2-cropcap>`. ``bounds`` area. Therefore, as +struct :c:type:`v4l2_crop` may be smaller than the struct +:c:type:`v4l2_cropcap`. ``bounds`` area. Therefore, as usual, drivers are expected to adjust the requested parameters and return the actual values selected. @@ -144,7 +148,9 @@ reopening a device, such that piping data into or out of a device will work without special preparations. More advanced applications should ensure the parameters are suitable before starting I/O. -.. note:: On the next two examples, a video capture device is assumed; +.. note:: + + On the next two examples, a video capture device is assumed; change ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other types of device. Example: Resetting the cropping parameters diff --git a/Documentation/media/uapi/v4l/dev-capture.rst b/Documentation/media/uapi/v4l/dev-capture.rst index 8d049471e1c2..32b32055d070 100644 --- a/Documentation/media/uapi/v4l/dev-capture.rst +++ b/Documentation/media/uapi/v4l/dev-capture.rst @@ -26,7 +26,7 @@ Querying Capabilities Devices supporting the video capture interface set the ``V4L2_CAP_VIDEO_CAPTURE`` or ``V4L2_CAP_VIDEO_CAPTURE_MPLANE`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. As secondary device functions they may also support the :ref:`video overlay <overlay>` (``V4L2_CAP_VIDEO_OVERLAY``) and the :ref:`raw VBI capture <raw-vbi>` @@ -64,18 +64,18 @@ Cropping initialization at minimum requires to reset the parameters to defaults. An example is given in :ref:`crop`. To query the current image format applications set the ``type`` field of -a struct :ref:`v4l2_format <v4l2-format>` to +a struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure. Drivers fill the struct -:ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct -:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp`` +:c:type:`v4l2_pix_format` ``pix`` or the struct +:c:type:`v4l2_pix_format_mplane` ``pix_mp`` member of the ``fmt`` union. To request different parameters applications set the ``type`` field of a -struct :ref:`v4l2_format <v4l2-format>` as above and initialize all -fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>` +struct :c:type:`v4l2_format` as above and initialize all +fields of the struct :c:type:`v4l2_pix_format` ``vbi`` member of the ``fmt`` union, or better just modify the results of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure. Drivers may adjust the @@ -86,8 +86,8 @@ Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` can be used to learn about hardware limitations without disabling I/O or possibly time consuming hardware preparations. -The contents of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and -struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` are +The contents of struct :c:type:`v4l2_pix_format` and +struct :c:type:`v4l2_pix_format_mplane` are discussed in :ref:`pixfmt`. See also the specification of the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for details. Video capture devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` diff --git a/Documentation/media/uapi/v4l/dev-codec.rst b/Documentation/media/uapi/v4l/dev-codec.rst index dfb20328e34d..d9f218449ddd 100644 --- a/Documentation/media/uapi/v4l/dev-codec.rst +++ b/Documentation/media/uapi/v4l/dev-codec.rst @@ -21,7 +21,9 @@ for both capture and output to start the codec. Video compression codecs use the MPEG controls to setup their codec parameters -.. note:: The MPEG controls actually support many more codecs than +.. note:: + + The MPEG controls actually support many more codecs than just MPEG. See :ref:`mpeg-controls`. Memory-to-memory devices can often be used as a shared resource: you can diff --git a/Documentation/media/uapi/v4l/dev-osd.rst b/Documentation/media/uapi/v4l/dev-osd.rst index fadda131f020..71da85ed7e4b 100644 --- a/Documentation/media/uapi/v4l/dev-osd.rst +++ b/Documentation/media/uapi/v4l/dev-osd.rst @@ -16,7 +16,9 @@ this interface, which borrows structures and ioctls of the The OSD function is accessible through the same character special file as the :ref:`Video Output <capture>` function. -.. note:: The default function of such a ``/dev/video`` device is video +.. note:: + + The default function of such a ``/dev/video`` device is video capturing or output. The OSD function is only available after calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. @@ -26,7 +28,7 @@ Querying Capabilities Devices supporting the *Video Output Overlay* interface set the ``V4L2_CAP_VIDEO_OUTPUT_OVERLAY`` flag in the ``capabilities`` field of -struct :ref:`v4l2_capability <v4l2-capability>` returned by the +struct :c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. @@ -39,11 +41,11 @@ accessible as a framebuffer device (``/dev/fbN``). Given a V4L2 device, applications can find the corresponding framebuffer device by calling the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` ioctl. It returns, amongst other information, the physical address of the framebuffer in the -``base`` field of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`. +``base`` field of struct :c:type:`v4l2_framebuffer`. The framebuffer device ioctl ``FBIOGET_FSCREENINFO`` returns the same address in the ``smem_start`` field of struct -:c:type:`struct fb_fix_screeninfo`. The ``FBIOGET_FSCREENINFO`` -ioctl and struct :c:type:`struct fb_fix_screeninfo` are defined in +struct :c:type:`fb_fix_screeninfo`. The ``FBIOGET_FSCREENINFO`` +ioctl and struct :c:type:`fb_fix_screeninfo` are defined in the ``linux/fb.h`` header file. The width and height of the framebuffer depends on the current video @@ -112,18 +114,18 @@ sizes and positions of these rectangles. Further drivers may support any (or none) of the clipping/blending methods defined for the :ref:`Video Overlay <overlay>` interface. -A struct :ref:`v4l2_window <v4l2-window>` defines the size of the +A struct :c:type:`v4l2_window` defines the size of the source rectangle, its position in the framebuffer and the clipping/blending method to be used for the overlay. To get the current parameters applications set the ``type`` field of a struct -:ref:`v4l2_format <v4l2-format>` to +:c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the -:ref:`struct v4l2_window <v4l2-window>` substructure named ``win``. It is not +struct :c:type:`v4l2_window` substructure named ``win``. It is not possible to retrieve a previously programmed clipping list or bitmap. To program the source rectangle applications set the ``type`` field of a -struct :ref:`v4l2_format <v4l2-format>` to +struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``, initialize the ``win`` substructure and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. The driver adjusts the parameters against hardware limits and returns @@ -132,10 +134,10 @@ the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn about driver capabilities without actually changing driver state. Unlike :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled. -A struct :ref:`v4l2_crop <v4l2-crop>` defines the size and position +A struct :c:type:`v4l2_crop` defines the size and position of the target rectangle. The scaling factor of the overlay is implied by -the width and height given in struct :ref:`v4l2_window <v4l2-window>` -and struct :ref:`v4l2_crop <v4l2-crop>`. The cropping API applies to +the width and height given in struct :c:type:`v4l2_window` +and struct :c:type:`v4l2_crop`. The cropping API applies to *Video Output* and *Video Output Overlay* devices in the same way as to *Video Capture* and *Video Overlay* devices, merely reversing the direction of the data flow. For more information see :ref:`crop`. diff --git a/Documentation/media/uapi/v4l/dev-output.rst b/Documentation/media/uapi/v4l/dev-output.rst index 4f1123a0b40d..25ae8ec96fdf 100644 --- a/Documentation/media/uapi/v4l/dev-output.rst +++ b/Documentation/media/uapi/v4l/dev-output.rst @@ -16,7 +16,7 @@ device special files named ``/dev/video`` and ``/dev/video0`` to ``/dev/video`` is typically a symbolic link to the preferred video device. -..note:: The same device file names are used also for video capture devices. +.. note:: The same device file names are used also for video capture devices. Querying Capabilities @@ -25,7 +25,7 @@ Querying Capabilities Devices supporting the video output interface set the ``V4L2_CAP_VIDEO_OUTPUT`` or ``V4L2_CAP_VIDEO_OUTPUT_MPLANE`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. As secondary device functions they may also support the :ref:`raw VBI output <raw-vbi>` (``V4L2_CAP_VBI_OUTPUT``) interface. At least one of the read/write or @@ -62,17 +62,17 @@ Cropping initialization at minimum requires to reset the parameters to defaults. An example is given in :ref:`crop`. To query the current image format applications set the ``type`` field of -a struct :ref:`v4l2_format <v4l2-format>` to +a struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` or ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure. Drivers fill the struct -:ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct -:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp`` +:c:type:`v4l2_pix_format` ``pix`` or the struct +:c:type:`v4l2_pix_format_mplane` ``pix_mp`` member of the ``fmt`` union. To request different parameters applications set the ``type`` field of a -struct :ref:`v4l2_format <v4l2-format>` as above and initialize all -fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>` +struct :c:type:`v4l2_format` as above and initialize all +fields of the struct :c:type:`v4l2_pix_format` ``vbi`` member of the ``fmt`` union, or better just modify the results of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure. Drivers may adjust the @@ -83,8 +83,8 @@ Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` can be used to learn about hardware limitations without disabling I/O or possibly time consuming hardware preparations. -The contents of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and -struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` are +The contents of struct :c:type:`v4l2_pix_format` and +struct :c:type:`v4l2_pix_format_mplane` are discussed in :ref:`pixfmt`. See also the specification of the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for details. Video output devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` diff --git a/Documentation/media/uapi/v4l/dev-overlay.rst b/Documentation/media/uapi/v4l/dev-overlay.rst index 92b4471b0c6e..9be14b55e305 100644 --- a/Documentation/media/uapi/v4l/dev-overlay.rst +++ b/Documentation/media/uapi/v4l/dev-overlay.rst @@ -19,7 +19,9 @@ video into a window. Video overlay devices are accessed through the same character special files as :ref:`video capture <capture>` devices. -.. note:: The default function of a ``/dev/video`` device is video +.. note:: + + The default function of a ``/dev/video`` device is video capturing. The overlay function is only available after calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. @@ -41,7 +43,7 @@ Querying Capabilities Devices supporting the video overlay interface set the ``V4L2_CAP_VIDEO_OVERLAY`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. The overlay I/O method specified below must be supported. Tuners and audio inputs are optional. @@ -117,17 +119,17 @@ at minimum requires to reset the parameters to defaults. An example is given in :ref:`crop`. The overlay window is described by a struct -:ref:`v4l2_window <v4l2-window>`. It defines the size of the image, +:c:type:`v4l2_window`. It defines the size of the image, its position over the graphics surface and the clipping to be applied. To get the current parameters applications set the ``type`` field of a -struct :ref:`v4l2_format <v4l2-format>` to +struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the -:ref:`struct v4l2_window <v4l2-window>` substructure named ``win``. It is not +struct :c:type:`v4l2_window` substructure named ``win``. It is not possible to retrieve a previously programmed clipping list or bitmap. To program the overlay window applications set the ``type`` field of a -struct :ref:`v4l2_format <v4l2-format>` to +struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VIDEO_OVERLAY``, initialize the ``win`` substructure and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. The driver adjusts the parameters against hardware limits and returns the actual @@ -137,7 +139,7 @@ about driver capabilities without actually changing driver state. Unlike :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled. The scaling factor of the overlaid image is implied by the width and -height given in struct :ref:`v4l2_window <v4l2-window>` and the size +height given in struct :c:type:`v4l2_window` and the size of the cropping rectangle. For more information see :ref:`crop`. When simultaneous capturing and overlay is supported and the hardware @@ -147,7 +149,7 @@ takes precedence. The attempt to capture or overlay as well code or return accordingly modified parameters. -.. _v4l2-window: +.. c:type:: v4l2_window struct v4l2_window ------------------ @@ -173,7 +175,7 @@ struct v4l2_window :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` applications set this field to the desired pixel value for the chroma key. The format is the same as the pixel format of the framebuffer (struct - :ref:`v4l2_framebuffer <v4l2-framebuffer>` ``fmt.pixelformat`` + :c:type:`v4l2_framebuffer` ``fmt.pixelformat`` field), with bytes in host order. E. g. for :ref:`V4L2_PIX_FMT_BGR24 <V4L2-PIX-FMT-BGR32>` the value should be 0xRRGGBB on a little endian, 0xBBGGRR on a big endian host. @@ -236,13 +238,15 @@ exceeded are undefined. [#f3]_ :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`, :ref:`framebuffer-flags`). - .. note:: This field was added in Linux 2.6.23, extending the - structure. However the :ref:`VIDIOC_[G|S|TRY]_FMT <VIDIOC_G_FMT>` - ioctls, which take a pointer to a :ref:`v4l2_format <v4l2-format>` - parent structure with padding bytes at the end, are not affected. +.. note:: + + This field was added in Linux 2.6.23, extending the + structure. However the :ref:`VIDIOC_[G|S|TRY]_FMT <VIDIOC_G_FMT>` + ioctls, which take a pointer to a :c:type:`v4l2_format` + parent structure with padding bytes at the end, are not affected. -.. _v4l2-clip: +.. c:type:: v4l2_clip struct v4l2_clip [#f4]_ ----------------------- @@ -258,7 +262,7 @@ struct v4l2_clip [#f4]_ linked list of clipping rectangles. -.. _v4l2-rect: +.. c:type:: v4l2_rect struct v4l2_rect ---------------- diff --git a/Documentation/media/uapi/v4l/dev-radio.rst b/Documentation/media/uapi/v4l/dev-radio.rst index 5ff7cded2591..2b5b836574eb 100644 --- a/Documentation/media/uapi/v4l/dev-radio.rst +++ b/Documentation/media/uapi/v4l/dev-radio.rst @@ -20,7 +20,7 @@ Querying Capabilities Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and ``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of capability flags are reserved for future extensions. diff --git a/Documentation/media/uapi/v4l/dev-raw-vbi.rst b/Documentation/media/uapi/v4l/dev-raw-vbi.rst index d5a4b3530b69..b82d837e4ff1 100644 --- a/Documentation/media/uapi/v4l/dev-raw-vbi.rst +++ b/Documentation/media/uapi/v4l/dev-raw-vbi.rst @@ -39,7 +39,7 @@ Querying Capabilities Devices supporting the raw VBI capturing or output API set the ``V4L2_CAP_VBI_CAPTURE`` or ``V4L2_CAP_VBI_OUTPUT`` flags, respectively, in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. At least one of the read/write, streaming or asynchronous I/O methods must be supported. VBI devices may or may not have a tuner or modulator. @@ -69,16 +69,16 @@ always ensure they really get what they want, requesting reasonable parameters and then checking if the actual parameters are suitable. To query the current raw VBI capture parameters applications set the -``type`` field of a struct :ref:`v4l2_format <v4l2-format>` to +``type`` field of a struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VBI_CAPTURE`` or ``V4L2_BUF_TYPE_VBI_OUTPUT``, and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure. Drivers fill the struct -:ref:`v4l2_vbi_format <v4l2-vbi-format>` ``vbi`` member of the +:c:type:`v4l2_vbi_format` ``vbi`` member of the ``fmt`` union. To request different parameters applications set the ``type`` field of a -struct :ref:`v4l2_format <v4l2-format>` as above and initialize all -fields of the struct :ref:`v4l2_vbi_format <v4l2-vbi-format>` +struct :c:type:`v4l2_format` as above and initialize all +fields of the struct :c:type:`v4l2_vbi_format` ``vbi`` member of the ``fmt`` union, or better just modify the results of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure. Drivers return an ``EINVAL`` error @@ -99,131 +99,91 @@ VBI devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional. +.. tabularcolumns:: |p{2.4cm}|p{4.4cm}|p{10.7cm}| -.. _v4l2-vbi-format: +.. c:type:: v4l2_vbi_format + +.. cssclass:: longtable .. flat-table:: struct v4l2_vbi_format :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``sampling_rate`` - - - Samples per second, i. e. unit 1 Hz. - - - .. row 2 - - - __u32 - - - ``offset`` - - - Horizontal offset of the VBI image, relative to the leading edge - of the line synchronization pulse and counted in samples: The - first sample in the VBI image will be located ``offset`` / - ``sampling_rate`` seconds following the leading edge. See also - :ref:`vbi-hsync`. - - - .. row 3 - - - __u32 - - - ``samples_per_line`` - - - - - - .. row 4 - - - __u32 - - - ``sample_format`` - - - Defines the sample format as in :ref:`pixfmt`, a - four-character-code. [#f2]_ Usually this is ``V4L2_PIX_FMT_GREY``, - i. e. each sample consists of 8 bits with lower values oriented - towards the black level. Do not assume any other correlation of - values with the signal level. For example, the MSB does not - necessarily indicate if the signal is 'high' or 'low' because 128 - may not be the mean value of the signal. Drivers shall not convert - the sample format by software. - - - .. row 5 - - - __u32 - - - ``start``\ [#f2]_ - - - This is the scanning system line number associated with the first - line of the VBI image, of the first and the second field - respectively. See :ref:`vbi-525` and :ref:`vbi-625` for valid - values. The ``V4L2_VBI_ITU_525_F1_START``, - ``V4L2_VBI_ITU_525_F2_START``, ``V4L2_VBI_ITU_625_F1_START`` and - ``V4L2_VBI_ITU_625_F2_START`` defines give the start line numbers - for each field for each 525 or 625 line format as a convenience. - Don't forget that ITU line numbering starts at 1, not 0. VBI input - drivers can return start values 0 if the hardware cannot reliable - identify scanning lines, VBI acquisition may not require this - information. - - - .. row 6 - - - __u32 - - - ``count``\ [#f2]_ - - - The number of lines in the first and second field image, - respectively. - - - .. row 7 - - - :cspan:`2` - - Drivers should be as flexibility as possible. For example, it may - be possible to extend or move the VBI capture window down to the - picture area, implementing a 'full field mode' to capture data - service transmissions embedded in the picture. - - An application can set the first or second ``count`` value to zero - if no data is required from the respective field; ``count``\ [1] - if the scanning system is progressive, i. e. not interlaced. The - corresponding start value shall be ignored by the application and - driver. Anyway, drivers may not support single field capturing and - return both count values non-zero. - - Both ``count`` values set to zero, or line numbers outside the - bounds depicted in :ref:`vbi-525` and :ref:`vbi-625`, or a - field image covering lines of two fields, are invalid and shall - not be returned by the driver. - - To initialize the ``start`` and ``count`` fields, applications - must first determine the current video standard selection. The - :ref:`v4l2_std_id <v4l2-std-id>` or the ``framelines`` field - of struct :ref:`v4l2_standard <v4l2-standard>` can be evaluated - for this purpose. - - - .. row 8 - - - __u32 - - - ``flags`` - - - See :ref:`vbifmt-flags` below. Currently only drivers set flags, - applications must set this field to zero. - - - .. row 9 - - - __u32 - - - ``reserved``\ [#f2]_ - - - This array is reserved for future extensions. Drivers and - applications must set it to zero. - - + * - __u32 + - ``sampling_rate`` + - Samples per second, i. e. unit 1 Hz. + * - __u32 + - ``offset`` + - Horizontal offset of the VBI image, relative to the leading edge + of the line synchronization pulse and counted in samples: The + first sample in the VBI image will be located ``offset`` / + ``sampling_rate`` seconds following the leading edge. See also + :ref:`vbi-hsync`. + * - __u32 + - ``samples_per_line`` + - + * - __u32 + - ``sample_format`` + - Defines the sample format as in :ref:`pixfmt`, a + four-character-code. [#f2]_ Usually this is ``V4L2_PIX_FMT_GREY``, + i. e. each sample consists of 8 bits with lower values oriented + towards the black level. Do not assume any other correlation of + values with the signal level. For example, the MSB does not + necessarily indicate if the signal is 'high' or 'low' because 128 + may not be the mean value of the signal. Drivers shall not convert + the sample format by software. + * - __u32 + - ``start``\ [#f2]_ + - This is the scanning system line number associated with the first + line of the VBI image, of the first and the second field + respectively. See :ref:`vbi-525` and :ref:`vbi-625` for valid + values. The ``V4L2_VBI_ITU_525_F1_START``, + ``V4L2_VBI_ITU_525_F2_START``, ``V4L2_VBI_ITU_625_F1_START`` and + ``V4L2_VBI_ITU_625_F2_START`` defines give the start line numbers + for each field for each 525 or 625 line format as a convenience. + Don't forget that ITU line numbering starts at 1, not 0. VBI input + drivers can return start values 0 if the hardware cannot reliable + identify scanning lines, VBI acquisition may not require this + information. + * - __u32 + - ``count``\ [#f2]_ + - The number of lines in the first and second field image, + respectively. + * - :cspan:`2` + + Drivers should be as flexibility as possible. For example, it may + be possible to extend or move the VBI capture window down to the + picture area, implementing a 'full field mode' to capture data + service transmissions embedded in the picture. + + An application can set the first or second ``count`` value to zero + if no data is required from the respective field; ``count``\ [1] + if the scanning system is progressive, i. e. not interlaced. The + corresponding start value shall be ignored by the application and + driver. Anyway, drivers may not support single field capturing and + return both count values non-zero. + + Both ``count`` values set to zero, or line numbers are outside the + bounds depicted\ [#f4]_, or a field image covering lines of two + fields, are invalid and shall not be returned by the driver. + + To initialize the ``start`` and ``count`` fields, applications + must first determine the current video standard selection. The + :ref:`v4l2_std_id <v4l2-std-id>` or the ``framelines`` field + of struct :c:type:`v4l2_standard` can be evaluated + for this purpose. + * - __u32 + - ``flags`` + - See :ref:`vbifmt-flags` below. Currently only drivers set flags, + applications must set this field to zero. + * - __u32 + - ``reserved``\ [#f2]_ + - This array is reserved for future extensions. Drivers and + applications must set it to zero. + + +.. tabularcolumns:: |p{4.0cm}|p{1.5cm}|p{12.0cm}| .. _vbifmt-flags: @@ -232,40 +192,30 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_VBI_UNSYNC`` - - - 0x0001 - - - This flag indicates hardware which does not properly distinguish - between fields. Normally the VBI image stores the first field - (lower scanning line numbers) first in memory. This may be a top - or bottom field depending on the video standard. When this flag is - set the first or second field may be stored first, however the - fields are still in correct temporal order with the older field - first in memory. [#f3]_ - - - .. row 2 - - - ``V4L2_VBI_INTERLACED`` - - - 0x0002 - - - By default the two field images will be passed sequentially; all - lines of the first field followed by all lines of the second field - (compare :ref:`field-order` ``V4L2_FIELD_SEQ_TB`` and - ``V4L2_FIELD_SEQ_BT``, whether the top or bottom field is first in - memory depends on the video standard). When this flag is set, the - two fields are interlaced (cf. ``V4L2_FIELD_INTERLACED``). The - first line of the first field followed by the first line of the - second field, then the two second lines, and so on. Such a layout - may be necessary when the hardware has been programmed to capture - or output interlaced video images and is unable to separate the - fields for VBI capturing at the same time. For simplicity setting - this flag implies that both ``count`` values are equal and - non-zero. + * - ``V4L2_VBI_UNSYNC`` + - 0x0001 + - This flag indicates hardware which does not properly distinguish + between fields. Normally the VBI image stores the first field + (lower scanning line numbers) first in memory. This may be a top + or bottom field depending on the video standard. When this flag is + set the first or second field may be stored first, however the + fields are still in correct temporal order with the older field + first in memory. [#f3]_ + * - ``V4L2_VBI_INTERLACED`` + - 0x0002 + - By default the two field images will be passed sequentially; all + lines of the first field followed by all lines of the second field + (compare :ref:`field-order` ``V4L2_FIELD_SEQ_TB`` and + ``V4L2_FIELD_SEQ_BT``, whether the top or bottom field is first in + memory depends on the video standard). When this flag is set, the + two fields are interlaced (cf. ``V4L2_FIELD_INTERLACED``). The + first line of the first field followed by the first line of the + second field, then the two second lines, and so on. Such a layout + may be necessary when the hardware has been programmed to capture + or output interlaced video images and is unable to separate the + fields for VBI capturing at the same time. For simplicity setting + this flag implies that both ``count`` values are equal and + non-zero. @@ -348,3 +298,6 @@ another process. Most VBI services transmit on both fields, but some have different semantics depending on the field number. These cannot be reliable decoded or encoded when ``V4L2_VBI_UNSYNC`` is set. + +.. [#f4] + The valid values ar shown at :ref:`vbi-525` and :ref:`vbi-625`. diff --git a/Documentation/media/uapi/v4l/dev-raw-vbi_files/vbi_525.pdf b/Documentation/media/uapi/v4l/dev-raw-vbi_files/vbi_525.pdf Binary files differindex 9e72c25b208d..0bae28385dfa 100644 --- a/Documentation/media/uapi/v4l/dev-raw-vbi_files/vbi_525.pdf +++ b/Documentation/media/uapi/v4l/dev-raw-vbi_files/vbi_525.pdf diff --git a/Documentation/media/uapi/v4l/dev-raw-vbi_files/vbi_625.pdf b/Documentation/media/uapi/v4l/dev-raw-vbi_files/vbi_625.pdf Binary files differindex 765235e33a4d..bf29b95dcd08 100644 --- a/Documentation/media/uapi/v4l/dev-raw-vbi_files/vbi_625.pdf +++ b/Documentation/media/uapi/v4l/dev-raw-vbi_files/vbi_625.pdf diff --git a/Documentation/media/uapi/v4l/dev-rds.rst b/Documentation/media/uapi/v4l/dev-rds.rst index cd6ad63cb90b..9c4e39dd66bd 100644 --- a/Documentation/media/uapi/v4l/dev-rds.rst +++ b/Documentation/media/uapi/v4l/dev-rds.rst @@ -14,7 +14,9 @@ at devices capable of receiving and/or transmitting RDS information. For more information see the core RDS standard :ref:`iec62106` and the RBDS standard :ref:`nrsc4`. -.. note:: Note that the RBDS standard as is used in the USA is almost +.. note:: + + Note that the RBDS standard as is used in the USA is almost identical to the RDS standard. Any RDS decoder/encoder can also handle RBDS. Only some of the fields have slightly different meanings. See the RBDS standard for more information. @@ -32,10 +34,10 @@ Querying Capabilities Devices supporting the RDS capturing API set the ``V4L2_CAP_RDS_CAPTURE`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. Any tuner that supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the -``capability`` field of struct :ref:`v4l2_tuner <v4l2-tuner>`. If the +``capability`` field of struct :c:type:`v4l2_tuner`. If the driver only passes RDS blocks without interpreting the data the ``V4L2_TUNER_CAP_RDS_BLOCK_IO`` flag has to be set, see :ref:`Reading RDS data <reading-rds-data>`. For future use the flag @@ -46,19 +48,19 @@ linux-media mailing list: `https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__. Whether an RDS signal is present can be detected by looking at the -``rxsubchans`` field of struct :ref:`v4l2_tuner <v4l2-tuner>`: the +``rxsubchans`` field of struct :c:type:`v4l2_tuner`: the ``V4L2_TUNER_SUB_RDS`` will be set if RDS data was detected. Devices supporting the RDS output API set the ``V4L2_CAP_RDS_OUTPUT`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. Any modulator that supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the ``capability`` field of struct -:ref:`v4l2_modulator <v4l2-modulator>`. In order to enable the RDS +:c:type:`v4l2_modulator`. In order to enable the RDS transmission one must set the ``V4L2_TUNER_SUB_RDS`` bit in the ``txsubchans`` field of struct -:ref:`v4l2_modulator <v4l2-modulator>`. If the driver only passes RDS +:c:type:`v4l2_modulator`. If the driver only passes RDS blocks without interpreting the data the ``V4L2_TUNER_CAP_RDS_BLOCK_IO`` flag has to be set. If the tuner is capable of handling RDS entities like program identification codes and radio text, the flag @@ -91,165 +93,92 @@ RDS datastructures ================== -.. _v4l2-rds-data: +.. c:type:: v4l2_rds_data + +.. tabularcolumns:: |p{2.5cm}|p{2.5cm}|p{12.5cm}| .. flat-table:: struct v4l2_rds_data :header-rows: 0 :stub-columns: 0 :widths: 1 1 5 - - - .. row 1 - - - __u8 - - - ``lsb`` - - - Least Significant Byte of RDS Block - - - .. row 2 - - - __u8 - - - ``msb`` - - - Most Significant Byte of RDS Block - - - .. row 3 - - - __u8 - - - ``block`` - - - Block description + * - __u8 + - ``lsb`` + - Least Significant Byte of RDS Block + * - __u8 + - ``msb`` + - Most Significant Byte of RDS Block + * - __u8 + - ``block`` + - Block description .. _v4l2-rds-block: +.. tabularcolumns:: |p{2.9cm}|p{14.6cm}| + .. flat-table:: Block description :header-rows: 0 :stub-columns: 0 :widths: 1 5 - - - .. row 1 - - - Bits 0-2 - - - Block (aka offset) of the received data. - - - .. row 2 - - - Bits 3-5 - - - Deprecated. Currently identical to bits 0-2. Do not use these - bits. - - - .. row 3 - - - Bit 6 - - - Corrected bit. Indicates that an error was corrected for this data - block. - - - .. row 4 - - - Bit 7 - - - Error bit. Indicates that an uncorrectable error occurred during - reception of this block. + * - Bits 0-2 + - Block (aka offset) of the received data. + * - Bits 3-5 + - Deprecated. Currently identical to bits 0-2. Do not use these + bits. + * - Bit 6 + - Corrected bit. Indicates that an error was corrected for this data + block. + * - Bit 7 + - Error bit. Indicates that an uncorrectable error occurred during + reception of this block. .. _v4l2-rds-block-codes: +.. tabularcolumns:: |p{5.6cm}|p{2.0cm}|p{1.5cm}|p{7.0cm}| + .. flat-table:: Block defines :header-rows: 0 :stub-columns: 0 :widths: 1 1 1 5 - - - .. row 1 - - - V4L2_RDS_BLOCK_MSK - - - - - 7 - - - Mask for bits 0-2 to get the block ID. - - - .. row 2 - - - V4L2_RDS_BLOCK_A - - - - - 0 - - - Block A. - - - .. row 3 - - - V4L2_RDS_BLOCK_B - - - - - 1 - - - Block B. - - - .. row 4 - - - V4L2_RDS_BLOCK_C - - - - - 2 - - - Block C. - - - .. row 5 - - - V4L2_RDS_BLOCK_D - - - - - 3 - - - Block D. - - - .. row 6 - - - V4L2_RDS_BLOCK_C_ALT - - - - - 4 - - - Block C'. - - - .. row 7 - - - V4L2_RDS_BLOCK_INVALID - - - read-only - - - 7 - - - An invalid block. - - - .. row 8 - - - V4L2_RDS_BLOCK_CORRECTED - - - read-only - - - 0x40 - - - A bit error was detected but corrected. - - - .. row 9 - - - V4L2_RDS_BLOCK_ERROR - - - read-only - - - 0x80 - - - An uncorrectable error occurred. + * - V4L2_RDS_BLOCK_MSK + - + - 7 + - Mask for bits 0-2 to get the block ID. + * - V4L2_RDS_BLOCK_A + - + - 0 + - Block A. + * - V4L2_RDS_BLOCK_B + - + - 1 + - Block B. + * - V4L2_RDS_BLOCK_C + - + - 2 + - Block C. + * - V4L2_RDS_BLOCK_D + - + - 3 + - Block D. + * - V4L2_RDS_BLOCK_C_ALT + - + - 4 + - Block C'. + * - V4L2_RDS_BLOCK_INVALID + - read-only + - 7 + - An invalid block. + * - V4L2_RDS_BLOCK_CORRECTED + - read-only + - 0x40 + - A bit error was detected but corrected. + * - V4L2_RDS_BLOCK_ERROR + - read-only + - 0x80 + - An uncorrectable error occurred. diff --git a/Documentation/media/uapi/v4l/dev-sdr.rst b/Documentation/media/uapi/v4l/dev-sdr.rst index fc4053f957fb..b3e828d8cb1f 100644 --- a/Documentation/media/uapi/v4l/dev-sdr.rst +++ b/Documentation/media/uapi/v4l/dev-sdr.rst @@ -21,7 +21,7 @@ Querying Capabilities Devices supporting the SDR receiver interface set the ``V4L2_CAP_SDR_CAPTURE`` and ``V4L2_CAP_TUNER`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. That flag means the device has an Analog to Digital Converter (ADC), which is a mandatory element for the SDR receiver. @@ -29,7 +29,7 @@ element for the SDR receiver. Devices supporting the SDR transmitter interface set the ``V4L2_CAP_SDR_OUTPUT`` and ``V4L2_CAP_MODULATOR`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. That flag means the device has an Digital to Analog Converter (DAC), which is a mandatory element for the SDR transmitter. @@ -67,53 +67,40 @@ basic :ref:`format` ioctls, the well. To use the :ref:`format` ioctls applications set the ``type`` -field of a struct :ref:`v4l2_format <v4l2-format>` to +field of a struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_SDR_CAPTURE`` or ``V4L2_BUF_TYPE_SDR_OUTPUT`` and use -the struct :ref:`v4l2_sdr_format <v4l2-sdr-format>` ``sdr`` member +the struct :c:type:`v4l2_sdr_format` ``sdr`` member of the ``fmt`` union as needed per the desired operation. Currently there is two fields, ``pixelformat`` and ``buffersize``, of struct -struct :ref:`v4l2_sdr_format <v4l2-sdr-format>` which are used. +struct :c:type:`v4l2_sdr_format` which are used. Content of the ``pixelformat`` is V4L2 FourCC code of the data format. The ``buffersize`` field is maximum buffer size in bytes required for data transfer, set by the driver in order to inform application. -.. _v4l2-sdr-format: +.. c:type:: v4l2_sdr_format + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_sdr_format :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``pixelformat`` - - - The data format or type of compression, set by the application. - This is a little endian - :ref:`four character code <v4l2-fourcc>`. V4L2 defines SDR - formats in :ref:`sdr-formats`. - - - .. row 2 - - - __u32 - - - ``buffersize`` - - - Maximum size in bytes required for data. Value is set by the - driver. - - - .. row 3 - - - __u8 - - - ``reserved[24]`` - - - This array is reserved for future extensions. Drivers and - applications must set it to zero. + * - __u32 + - ``pixelformat`` + - The data format or type of compression, set by the application. + This is a little endian + :ref:`four character code <v4l2-fourcc>`. V4L2 defines SDR + formats in :ref:`sdr-formats`. + * - __u32 + - ``buffersize`` + - Maximum size in bytes required for data. Value is set by the + driver. + * - __u8 + - ``reserved[24]`` + - This array is reserved for future extensions. Drivers and + applications must set it to zero. An SDR device may support :ref:`read/write <rw>` and/or streaming diff --git a/Documentation/media/uapi/v4l/dev-sliced-vbi.rst b/Documentation/media/uapi/v4l/dev-sliced-vbi.rst index ec52a825f4d6..5f6d534ea73b 100644 --- a/Documentation/media/uapi/v4l/dev-sliced-vbi.rst +++ b/Documentation/media/uapi/v4l/dev-sliced-vbi.rst @@ -34,7 +34,7 @@ Querying Capabilities Devices supporting the sliced VBI capturing or output API set the ``V4L2_CAP_SLICED_VBI_CAPTURE`` or ``V4L2_CAP_SLICED_VBI_OUTPUT`` flag respectively, in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. At least one of the read/write, streaming or asynchronous :ref:`I/O methods <io>` must be supported. Sliced VBI devices may have a tuner or modulator. @@ -67,17 +67,17 @@ line 16 the hardware may be able to look for a VPS or Teletext signal, but not both at the same time. To determine the currently selected services applications set the -``type`` field of struct :ref:`v4l2_format <v4l2-format>` to +``type`` field of struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``, and the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl fills the ``fmt.sliced`` member, a struct -:ref:`v4l2_sliced_vbi_format <v4l2-sliced-vbi-format>`. +:c:type:`v4l2_sliced_vbi_format`. Applications can request different parameters by initializing or modifying the ``fmt.sliced`` member and calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with a pointer to the -:ref:`struct v4l2_format <v4l2-format>` structure. +struct :c:type:`v4l2_format` structure. The sliced VBI API is more complicated than the raw VBI API because the hardware must be told which VBI service to expect on each scan line. Not @@ -100,149 +100,104 @@ which may return ``EBUSY`` can be the :ref:`select() <func-select>` call. -.. _v4l2-sliced-vbi-format: +.. c:type:: v4l2_sliced_vbi_format struct v4l2_sliced_vbi_format ----------------------------- +.. tabularcolumns:: |p{1.0cm}|p{4.5cm}|p{4.0cm}|p{4.0cm}|p{4.0cm}| + +.. cssclass:: longtable + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 3 3 2 2 2 - - - .. row 1 - - - __u32 - - - ``service_set`` - - - :cspan:`2` - - If ``service_set`` is non-zero when passed with - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or - :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`, the ``service_lines`` - array will be filled by the driver according to the services - specified in this field. For example, if ``service_set`` is - initialized with ``V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625``, - a driver for the cx25840 video decoder sets lines 7-22 of both - fields [#f1]_ to ``V4L2_SLICED_TELETEXT_B`` and line 23 of the first - field to ``V4L2_SLICED_WSS_625``. If ``service_set`` is set to - zero, then the values of ``service_lines`` will be used instead. - - On return the driver sets this field to the union of all elements - of the returned ``service_lines`` array. It may contain less - services than requested, perhaps just one, if the hardware cannot - handle more services simultaneously. It may be empty (zero) if - none of the requested services are supported by the hardware. - - - .. row 2 - - - __u16 - - - ``service_lines``\ [2][24] - - - :cspan:`2` - - Applications initialize this array with sets of data services the - driver shall look for or insert on the respective scan line. - Subject to hardware capabilities drivers return the requested set, - a subset, which may be just a single service, or an empty set. - When the hardware cannot handle multiple services on the same line - the driver shall choose one. No assumptions can be made on which - service the driver chooses. - - Data services are defined in :ref:`vbi-services2`. Array indices - map to ITU-R line numbers (see also :ref:`vbi-525` and - :ref:`vbi-625`) as follows: - - - .. row 3 - - - - - - - Element - - - 525 line systems - - - 625 line systems - - - .. row 4 - - - - - - - ``service_lines``\ [0][1] - - - 1 - - - 1 - - - .. row 5 - - - - - - - ``service_lines``\ [0][23] - - - 23 - - - 23 - - - .. row 6 - - - - - - - ``service_lines``\ [1][1] - - - 264 - - - 314 - - - .. row 7 - - - - - - - ``service_lines``\ [1][23] - - - 286 - - - 336 - - - .. row 8 - - - - - - - :cspan:`2` Drivers must set ``service_lines`` [0][0] and - ``service_lines``\ [1][0] to zero. The - ``V4L2_VBI_ITU_525_F1_START``, ``V4L2_VBI_ITU_525_F2_START``, - ``V4L2_VBI_ITU_625_F1_START`` and ``V4L2_VBI_ITU_625_F2_START`` - defines give the start line numbers for each field for each 525 or - 625 line format as a convenience. Don't forget that ITU line - numbering starts at 1, not 0. - - - .. row 9 - - - __u32 - - - ``io_size`` - - - :cspan:`2` Maximum number of bytes passed by one - :ref:`read() <func-read>` or :ref:`write() <func-write>` call, - and the buffer size in bytes for the - :ref:`VIDIOC_QBUF` and - :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field - to the size of struct - :ref:`v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` times the - number of non-zero elements in the returned ``service_lines`` - array (that is the number of lines potentially carrying data). - - - .. row 10 - - - __u32 - - - ``reserved``\ [2] - - - :cspan:`2` This array is reserved for future extensions. - Applications and drivers must set it to zero. - + * - __u32 + - ``service_set`` + - :cspan:`2` + + If ``service_set`` is non-zero when passed with + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or + :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`, the ``service_lines`` + array will be filled by the driver according to the services + specified in this field. For example, if ``service_set`` is + initialized with ``V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625``, + a driver for the cx25840 video decoder sets lines 7-22 of both + fields [#f1]_ to ``V4L2_SLICED_TELETEXT_B`` and line 23 of the first + field to ``V4L2_SLICED_WSS_625``. If ``service_set`` is set to + zero, then the values of ``service_lines`` will be used instead. + + On return the driver sets this field to the union of all elements + of the returned ``service_lines`` array. It may contain less + services than requested, perhaps just one, if the hardware cannot + handle more services simultaneously. It may be empty (zero) if + none of the requested services are supported by the hardware. + * - __u16 + - ``service_lines``\ [2][24] + - :cspan:`2` + + Applications initialize this array with sets of data services the + driver shall look for or insert on the respective scan line. + Subject to hardware capabilities drivers return the requested set, + a subset, which may be just a single service, or an empty set. + When the hardware cannot handle multiple services on the same line + the driver shall choose one. No assumptions can be made on which + service the driver chooses. + + Data services are defined in :ref:`vbi-services2`. Array indices + map to ITU-R line numbers\ [#f2]_ as follows: + * - + - + - Element + - 525 line systems + - 625 line systems + * - + - + - ``service_lines``\ [0][1] + - 1 + - 1 + * - + - + - ``service_lines``\ [0][23] + - 23 + - 23 + * - + - + - ``service_lines``\ [1][1] + - 264 + - 314 + * - + - + - ``service_lines``\ [1][23] + - 286 + - 336 + * - + - + - :cspan:`2` Drivers must set ``service_lines`` [0][0] and + ``service_lines``\ [1][0] to zero. The + ``V4L2_VBI_ITU_525_F1_START``, ``V4L2_VBI_ITU_525_F2_START``, + ``V4L2_VBI_ITU_625_F1_START`` and ``V4L2_VBI_ITU_625_F2_START`` + defines give the start line numbers for each field for each 525 or + 625 line format as a convenience. Don't forget that ITU line + numbering starts at 1, not 0. + * - __u32 + - ``io_size`` + - :cspan:`2` Maximum number of bytes passed by one + :ref:`read() <func-read>` or :ref:`write() <func-write>` call, + and the buffer size in bytes for the + :ref:`VIDIOC_QBUF` and + :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field + to the size of struct + :c:type:`v4l2_sliced_vbi_data` times the + number of non-zero elements in the returned ``service_lines`` + array (that is the number of lines potentially carrying data). + * - __u32 + - ``reserved``\ [2] + - :cspan:`2` This array is reserved for future extensions. + + Applications and drivers must set it to zero. .. _vbi-services2: @@ -250,96 +205,65 @@ struct v4l2_sliced_vbi_format Sliced VBI services ------------------- +.. raw:: latex + + \begin{adjustbox}{width=\columnwidth} + +.. tabularcolumns:: |p{5.0cm}|p{1.4cm}|p{3.0cm}|p{2.5cm}|p{9.0cm}| + .. flat-table:: :header-rows: 1 :stub-columns: 0 :widths: 2 1 1 2 2 - - - .. row 1 - - - Symbol - - - Value - - - Reference - - - Lines, usually - - - Payload - - - .. row 2 - - - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B) - - - 0x0001 - - - :ref:`ets300706`, :ref:`itu653` - - - PAL/SECAM line 7-22, 320-335 (second field 7-22) - - - Last 42 of the 45 byte Teletext packet, that is without clock - run-in and framing code, lsb first transmitted. - - - .. row 3 - - - ``V4L2_SLICED_VPS`` - - - 0x0400 - - - :ref:`ets300231` - - - PAL line 16 - - - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb - first transmitted. - - - .. row 4 - - - ``V4L2_SLICED_CAPTION_525`` - - - 0x1000 - - - :ref:`cea608` - - - NTSC line 21, 284 (second field 21) - - - Two bytes in transmission order, including parity bit, lsb first - transmitted. - - - .. row 5 - - - ``V4L2_SLICED_WSS_625`` - - - 0x4000 - - - :ref:`itu1119`, :ref:`en300294` - - - PAL/SECAM line 23 - - - - - :: - - Byte 0 1 - msb lsb msb lsb - Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9 - - - .. row 6 - - - ``V4L2_SLICED_VBI_525`` - - - 0x1000 - - - :cspan:`2` Set of services applicable to 525 line systems. - - - .. row 7 - - - ``V4L2_SLICED_VBI_625`` - - - 0x4401 - - - :cspan:`2` Set of services applicable to 625 line systems. + * - Symbol + - Value + - Reference + - Lines, usually + - Payload + * - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B) + - 0x0001 + - :ref:`ets300706`, + + :ref:`itu653` + - PAL/SECAM line 7-22, 320-335 (second field 7-22) + - Last 42 of the 45 byte Teletext packet, that is without clock + run-in and framing code, lsb first transmitted. + * - ``V4L2_SLICED_VPS`` + - 0x0400 + - :ref:`ets300231` + - PAL line 16 + - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb + first transmitted. + * - ``V4L2_SLICED_CAPTION_525`` + - 0x1000 + - :ref:`cea608` + - NTSC line 21, 284 (second field 21) + - Two bytes in transmission order, including parity bit, lsb first + transmitted. + * - ``V4L2_SLICED_WSS_625`` + - 0x4000 + - :ref:`itu1119`, + + :ref:`en300294` + - PAL/SECAM line 23 + - + + :: + + Byte 0 1 + msb lsb msb lsb + Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9 + * - ``V4L2_SLICED_VBI_525`` + - 0x1000 + - :cspan:`2` Set of services applicable to 525 line systems. + * - ``V4L2_SLICED_VBI_625`` + - 0x4401 + - :cspan:`2` Set of services applicable to 625 line systems. + +.. raw:: latex + + \end{adjustbox}\newline\newline Drivers may return an ``EINVAL`` error code when applications attempt to @@ -359,80 +283,57 @@ Reading and writing sliced VBI data A single :ref:`read() <func-read>` or :ref:`write() <func-write>` call must pass all data belonging to one video frame. That is an array -of :ref:`struct v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` structures with one or +of struct :c:type:`v4l2_sliced_vbi_data` structures with one or more elements and a total size not exceeding ``io_size`` bytes. Likewise in streaming I/O mode one buffer of ``io_size`` bytes must contain data of one video frame. The ``id`` of unused -:ref:`struct v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` elements must be zero. +struct :c:type:`v4l2_sliced_vbi_data` elements must be zero. -.. _v4l2-sliced-vbi-data: +.. c:type:: v4l2_sliced_vbi_data struct v4l2_sliced_vbi_data --------------------------- +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - __u32 - - - ``id`` - - - A flag from :ref:`vbi-services` identifying the type of data in - this packet. Only a single bit must be set. When the ``id`` of a - captured packet is zero, the packet is empty and the contents of - other fields are undefined. Applications shall ignore empty - packets. When the ``id`` of a packet for output is zero the - contents of the ``data`` field are undefined and the driver must - no longer insert data on the requested ``field`` and ``line``. - - - .. row 2 - - - __u32 - - - ``field`` - - - The video field number this data has been captured from, or shall - be inserted at. ``0`` for the first field, ``1`` for the second - field. - - - .. row 3 - - - __u32 - - - ``line`` - - - The field (as opposed to frame) line number this data has been - captured from, or shall be inserted at. See :ref:`vbi-525` and - :ref:`vbi-625` for valid values. Sliced VBI capture devices can - set the line number of all packets to ``0`` if the hardware cannot - reliably identify scan lines. The field number must always be - valid. - - - .. row 4 - - - __u32 - - - ``reserved`` - - - This field is reserved for future extensions. Applications and - drivers must set it to zero. - - - .. row 5 - - - __u8 - - - ``data``\ [48] - - - The packet payload. See :ref:`vbi-services` for the contents and - number of bytes passed for each data type. The contents of padding - bytes at the end of this array are undefined, drivers and - applications shall ignore them. + * - __u32 + - ``id`` + - A flag from :ref:`vbi-services` identifying the type of data in + this packet. Only a single bit must be set. When the ``id`` of a + captured packet is zero, the packet is empty and the contents of + other fields are undefined. Applications shall ignore empty + packets. When the ``id`` of a packet for output is zero the + contents of the ``data`` field are undefined and the driver must + no longer insert data on the requested ``field`` and ``line``. + * - __u32 + - ``field`` + - The video field number this data has been captured from, or shall + be inserted at. ``0`` for the first field, ``1`` for the second + field. + * - __u32 + - ``line`` + - The field (as opposed to frame) line number this data has been + captured from, or shall be inserted at. See :ref:`vbi-525` and + :ref:`vbi-625` for valid values. Sliced VBI capture devices can + set the line number of all packets to ``0`` if the hardware cannot + reliably identify scan lines. The field number must always be + valid. + * - __u32 + - ``reserved`` + - This field is reserved for future extensions. Applications and + drivers must set it to zero. + * - __u8 + - ``data``\ [48] + - The packet payload. See :ref:`vbi-services` for the contents and + number of bytes passed for each data type. The contents of padding + bytes at the end of this array are undefined, drivers and + applications shall ignore them. Packets are always passed in ascending line number order, without @@ -542,7 +443,7 @@ refer to the MPEG-2 specifications for details on those packet headers.) The payload of the MPEG-2 *Private Stream 1 PES* packets that contain sliced VBI data is specified by struct -:ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>`. The +:c:type:`v4l2_mpeg_vbi_fmt_ivtv`. The payload is variable length, depending on the actual number of lines of sliced VBI data present in a video frame. The payload may be padded at the end with unspecified fill bytes to align the end of the payload to a @@ -551,58 +452,41 @@ with 18 lines/field with 43 bytes of data/line and a 4 byte magic number). -.. _v4l2-mpeg-vbi-fmt-ivtv: +.. c:type:: v4l2_mpeg_vbi_fmt_ivtv struct v4l2_mpeg_vbi_fmt_ivtv ----------------------------- +.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{1.0cm}|p{11.5cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 1 1 1 2 - - - .. row 1 - - - __u8 - - - ``magic``\ [4] - - - - - A "magic" constant from :ref:`v4l2-mpeg-vbi-fmt-ivtv-magic` that - indicates this is a valid sliced VBI data payload and also - indicates which member of the anonymous union, ``itv0`` or - ``ITV0``, to use for the payload data. - - - .. row 2 - - - union - - - (anonymous) - - - .. row 3 - - - - - struct :ref:`v4l2_mpeg_vbi_itv0 <v4l2-mpeg-vbi-itv0>` - - - ``itv0`` - - - The primary form of the sliced VBI data payload that contains - anywhere from 1 to 35 lines of sliced VBI data. Line masks are - provided in this form of the payload indicating which VBI lines - are provided. - - - .. row 4 - - - - - struct :ref:`v4l2_mpeg_vbi_ITV0 <v4l2-mpeg-vbi-itv0-1>` - - - ``ITV0`` - - - An alternate form of the sliced VBI data payload used when 36 - lines of sliced VBI data are present. No line masks are provided - in this form of the payload; all valid line mask bits are - implcitly set. + * - __u8 + - ``magic``\ [4] + - + - A "magic" constant from :ref:`v4l2-mpeg-vbi-fmt-ivtv-magic` that + indicates this is a valid sliced VBI data payload and also + indicates which member of the anonymous union, ``itv0`` or + ``ITV0``, to use for the payload data. + * - union + - (anonymous) + * - + - struct :c:type:`v4l2_mpeg_vbi_itv0` + - ``itv0`` + - The primary form of the sliced VBI data payload that contains + anywhere from 1 to 35 lines of sliced VBI data. Line masks are + provided in this form of the payload indicating which VBI lines + are provided. + * - + - struct :ref:`v4l2_mpeg_vbi_ITV0 <v4l2-mpeg-vbi-itv0-1>` + - ``ITV0`` + - An alternate form of the sliced VBI data payload used when 36 + lines of sliced VBI data are present. No line masks are provided + in this form of the payload; all valid line mask bits are + implcitly set. @@ -611,96 +495,77 @@ struct v4l2_mpeg_vbi_fmt_ivtv Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field ------------------------------------------------------------- +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. flat-table:: :header-rows: 1 :stub-columns: 0 :widths: 3 1 4 + * - Defined Symbol + - Value + - Description + * - ``V4L2_MPEG_VBI_IVTV_MAGIC0`` + - "itv0" + - Indicates the ``itv0`` member of the union in struct + :c:type:`v4l2_mpeg_vbi_fmt_ivtv` is + valid. + * - ``V4L2_MPEG_VBI_IVTV_MAGIC1`` + - "ITV0" + - Indicates the ``ITV0`` member of the union in struct + :c:type:`v4l2_mpeg_vbi_fmt_ivtv` is + valid and that 36 lines of sliced VBI data are present. - - .. row 1 - - - Defined Symbol - - - Value - - Description - - .. row 2 +.. c:type:: v4l2_mpeg_vbi_itv0 - - ``V4L2_MPEG_VBI_IVTV_MAGIC0`` +.. c:type:: v4l2_mpeg_vbi_ITV0 - - "itv0" +structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0 +------------------------------------------------- - - Indicates the ``itv0`` member of the union in struct - :ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is - valid. - - - .. row 3 - - - ``V4L2_MPEG_VBI_IVTV_MAGIC1`` - - - "ITV0" - - - Indicates the ``ITV0`` member of the union in struct - :ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is - valid and that 36 lines of sliced VBI data are present. - - - -.. _v4l2-mpeg-vbi-itv0: - -struct v4l2_mpeg_vbi_itv0 -------------------------- +.. tabularcolumns:: |p{4.4cm}|p{2.4cm}|p{10.7cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __le32 - - - ``linemask``\ [2] - - - Bitmasks indicating the VBI service lines present. These - ``linemask`` values are stored in little endian byte order in the - MPEG stream. Some reference ``linemask`` bit positions with their - corresponding VBI line number and video field are given below. - b\ :sub:`0` indicates the least significant bit of a ``linemask`` - value: - - - - :: - - linemask[0] b0: line 6 first field - linemask[0] b17: line 23 first field - linemask[0] b18: line 6 second field - linemask[0] b31: line 19 second field - linemask[1] b0: line 20 second field - linemask[1] b3: line 23 second field - linemask[1] b4-b31: unused and set to 0 - - - .. row 2 - - - struct - :ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>` - - - ``line``\ [35] - - - This is a variable length array that holds from 1 to 35 lines of - sliced VBI data. The sliced VBI data lines present correspond to - the bits set in the ``linemask`` array, starting from b\ :sub:`0` - of ``linemask``\ [0] up through b\ :sub:`31` of ``linemask``\ [0], - and from b\ :sub:`0` of ``linemask``\ [1] up through b\ :sub:`3` of - ``linemask``\ [1]. ``line``\ [0] corresponds to the first bit - found set in the ``linemask`` array, ``line``\ [1] corresponds to - the second bit found set in the ``linemask`` array, etc. If no - ``linemask`` array bits are set, then ``line``\ [0] may contain - one line of unspecified data that should be ignored by - applications. + * - __le32 + - ``linemask``\ [2] + - Bitmasks indicating the VBI service lines present. These + ``linemask`` values are stored in little endian byte order in the + MPEG stream. Some reference ``linemask`` bit positions with their + corresponding VBI line number and video field are given below. + b\ :sub:`0` indicates the least significant bit of a ``linemask`` + value: + + + + :: + + linemask[0] b0: line 6 first field + linemask[0] b17: line 23 first field + linemask[0] b18: line 6 second field + linemask[0] b31: line 19 second field + linemask[1] b0: line 20 second field + linemask[1] b3: line 23 second field + linemask[1] b4-b31: unused and set to 0 + * - struct + :c:type:`v4l2_mpeg_vbi_itv0_line` + - ``line``\ [35] + - This is a variable length array that holds from 1 to 35 lines of + sliced VBI data. The sliced VBI data lines present correspond to + the bits set in the ``linemask`` array, starting from b\ :sub:`0` + of ``linemask``\ [0] up through b\ :sub:`31` of ``linemask``\ [0], + and from b\ :sub:`0` of ``linemask``\ [1] up through b\ :sub:`3` of + ``linemask``\ [1]. ``line``\ [0] corresponds to the first bit + found set in the ``linemask`` array, ``line``\ [1] corresponds to + the second bit found set in the ``linemask`` array, etc. If no + ``linemask`` array bits are set, then ``line``\ [0] may contain + one line of unspecified data that should be ignored by + applications. @@ -709,54 +574,43 @@ struct v4l2_mpeg_vbi_itv0 struct v4l2_mpeg_vbi_ITV0 ------------------------- +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - struct + :c:type:`v4l2_mpeg_vbi_itv0_line` + - ``line``\ [36] + - A fixed length array of 36 lines of sliced VBI data. ``line``\ [0] + through ``line``\ [17] correspond to lines 6 through 23 of the + first field. ``line``\ [18] through ``line``\ [35] corresponds to + lines 6 through 23 of the second field. - - .. row 1 - - - struct - :ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>` - - ``line``\ [36] - - A fixed length array of 36 lines of sliced VBI data. ``line``\ [0] - through ``line``\ [17] correspond to lines 6 through 23 of the - first field. ``line``\ [18] through ``line``\ [35] corresponds to - lines 6 through 23 of the second field. - - - -.. _v4l2-mpeg-vbi-itv0-line: +.. c:type:: v4l2_mpeg_vbi_itv0_line struct v4l2_mpeg_vbi_itv0_line ------------------------------ +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u8 - - - ``id`` - - - A line identifier value from - :ref:`ITV0-Line-Identifier-Constants` that indicates the type of - sliced VBI data stored on this line. - - - .. row 2 - - - __u8 - - - ``data``\ [42] - - - The sliced VBI data for the line. + * - __u8 + - ``id`` + - A line identifier value from + :ref:`ITV0-Line-Identifier-Constants` that indicates the type of + sliced VBI data stored on this line. + * - __u8 + - ``data``\ [42] + - The sliced VBI data for the line. @@ -765,58 +619,38 @@ struct v4l2_mpeg_vbi_itv0_line Line Identifiers for struct v4l2_mpeg_vbi_itv0_line id field ------------------------------------------------------------ +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. flat-table:: :header-rows: 1 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - Defined Symbol - - - Value - - - Description - - - .. row 2 - - - ``V4L2_MPEG_VBI_IVTV_TELETEXT_B`` - - - 1 - - - Refer to :ref:`Sliced VBI services <vbi-services2>` for a - description of the line payload. - - - .. row 3 - - - ``V4L2_MPEG_VBI_IVTV_CAPTION_525`` - - - 4 - - - Refer to :ref:`Sliced VBI services <vbi-services2>` for a - description of the line payload. - - - .. row 4 - - - ``V4L2_MPEG_VBI_IVTV_WSS_625`` - - - 5 - - - Refer to :ref:`Sliced VBI services <vbi-services2>` for a - description of the line payload. - - - .. row 5 - - - ``V4L2_MPEG_VBI_IVTV_VPS`` - - - 7 - - - Refer to :ref:`Sliced VBI services <vbi-services2>` for a - description of the line payload. + * - Defined Symbol + - Value + - Description + * - ``V4L2_MPEG_VBI_IVTV_TELETEXT_B`` + - 1 + - Refer to :ref:`Sliced VBI services <vbi-services2>` for a + description of the line payload. + * - ``V4L2_MPEG_VBI_IVTV_CAPTION_525`` + - 4 + - Refer to :ref:`Sliced VBI services <vbi-services2>` for a + description of the line payload. + * - ``V4L2_MPEG_VBI_IVTV_WSS_625`` + - 5 + - Refer to :ref:`Sliced VBI services <vbi-services2>` for a + description of the line payload. + * - ``V4L2_MPEG_VBI_IVTV_VPS`` + - 7 + - Refer to :ref:`Sliced VBI services <vbi-services2>` for a + description of the line payload. .. [#f1] According to :ref:`ETS 300 706 <ets300706>` lines 6-22 of the first field and lines 5-22 of the second field may carry Teletext data. + +.. [#f2] + See also :ref:`vbi-525` and :ref:`vbi-625`. diff --git a/Documentation/media/uapi/v4l/dev-subdev.rst b/Documentation/media/uapi/v4l/dev-subdev.rst index 5a112eb7a245..fb4d0d45b216 100644 --- a/Documentation/media/uapi/v4l/dev-subdev.rst +++ b/Documentation/media/uapi/v4l/dev-subdev.rst @@ -202,93 +202,58 @@ for the pipeline described in :ref:`pipeline-scaling` (table columns list entity names and pad numbers). +.. raw:: latex + + \begin{adjustbox}{width=\columnwidth} + +.. tabularcolumns:: |p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}|p{4.5cm}| + .. _sample-pipeline-config: .. flat-table:: Sample Pipeline Configuration :header-rows: 1 :stub-columns: 0 - - - - .. row 1 - - - - - Sensor/0 format - - - Frontend/0 format - - - Frontend/1 format - - - Scaler/0 format - - - Scaler/0 compose selection rectangle - - - Scaler/1 format - - - .. row 2 - - - Initial state - - - 2048x1536/SGRBG8_1X8 - - - (default) - - - (default) - - - (default) - - - (default) - - - (default) - - - .. row 3 - - - Configure frontend sink format - - - 2048x1536/SGRBG8_1X8 - - - *2048x1536/SGRBG8_1X8* - - - *2046x1534/SGRBG8_1X8* - - - (default) - - - (default) - - - (default) - - - .. row 4 - - - Configure scaler sink format - - - 2048x1536/SGRBG8_1X8 - - - 2048x1536/SGRBG8_1X8 - - - 2046x1534/SGRBG8_1X8 - - - *2046x1534/SGRBG8_1X8* - - - *0,0/2046x1534* - - - *2046x1534/SGRBG8_1X8* - - - .. row 5 - - - Configure scaler sink compose selection - - - 2048x1536/SGRBG8_1X8 - - - 2048x1536/SGRBG8_1X8 - - - 2046x1534/SGRBG8_1X8 - - - 2046x1534/SGRBG8_1X8 - - - *0,0/1280x960* - - - *1280x960/SGRBG8_1X8* - - + :widths: 5 5 5 5 5 5 5 + + * - + - Sensor/0 format + - Frontend/0 format + - Frontend/1 format + - Scaler/0 format + - Scaler/0 compose selection rectangle + - Scaler/1 format + * - Initial state + - 2048x1536/SGRBG8_1X8 + - (default) + - (default) + - (default) + - (default) + - (default) + * - Configure frontend sink format + - 2048x1536/SGRBG8_1X8 + - *2048x1536/SGRBG8_1X8* + - *2046x1534/SGRBG8_1X8* + - (default) + - (default) + - (default) + * - Configure scaler sink format + - 2048x1536/SGRBG8_1X8 + - 2048x1536/SGRBG8_1X8 + - 2046x1534/SGRBG8_1X8 + - *2046x1534/SGRBG8_1X8* + - *0,0/2046x1534* + - *2046x1534/SGRBG8_1X8* + * - Configure scaler sink compose selection + - 2048x1536/SGRBG8_1X8 + - 2048x1536/SGRBG8_1X8 + - 2046x1534/SGRBG8_1X8 + - 2046x1534/SGRBG8_1X8 + - *0,0/1280x960* + - *1280x960/SGRBG8_1X8* + +.. raw:: latex + + \end{adjustbox}\newline\newline 1. 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 @@ -332,7 +297,7 @@ It can also be used as part of digital zoom implementations to select the area of the image that will be scaled up. Crop settings are defined by a crop rectangle and represented in a -struct :ref:`v4l2_rect <v4l2-rect>` by the coordinates of the top +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. @@ -348,7 +313,7 @@ sub-device for processing. 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 :ref:`v4l2_rect <v4l2-rect>`. +struct :c:type:`v4l2_rect`. Scaling support is optional. When supported by a subdev, the crop rectangle on the subdev's sink pad is scaled to the size configured diff --git a/Documentation/media/uapi/v4l/dev-touch.rst b/Documentation/media/uapi/v4l/dev-touch.rst new file mode 100644 index 000000000000..98797f255ce0 --- /dev/null +++ b/Documentation/media/uapi/v4l/dev-touch.rst @@ -0,0 +1,56 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _touch: + +************* +Touch Devices +************* + +Touch devices are accessed through character device special files named +``/dev/v4l-touch0`` to ``/dev/v4l-touch255`` with major number 81 and +dynamically allocated minor numbers 0 to 255. + +Overview +======== + +Sensors may be Optical, or Projected Capacitive touch (PCT). + +Processing is required to analyse the raw data and produce input events. In +some systems, this may be performed on the ASIC and the raw data is purely a +side-channel for diagnostics or tuning. In other systems, the ASIC is a simple +analogue front end device which delivers touch data at high rate, and any touch +processing must be done on the host. + +For capacitive touch sensing, the touchscreen is composed of an array of +horizontal and vertical conductors (alternatively called rows/columns, X/Y +lines, or tx/rx). Mutual Capacitance measured is at the nodes where the +conductors cross. Alternatively, Self Capacitance measures the signal from each +column and row independently. + +A touch input may be determined by comparing the raw capacitance measurement to +a no-touch reference (or "baseline") measurement: + +Delta = Raw - Reference + +The reference measurement takes account of variations in the capacitance across +the touch sensor matrix, for example manufacturing irregularities, +environmental or edge effects. + +Querying Capabilities +===================== + +Devices supporting the touch interface set the ``V4L2_CAP_VIDEO_CAPTURE`` flag +and the ``V4L2_CAP_TOUCH`` flag in the ``capabilities`` field of +:c:type:`v4l2_capability` returned by the +:ref:`VIDIOC_QUERYCAP` ioctl. + +At least one of the read/write or streaming I/O methods must be +supported. + +The formats supported by touch devices are documented in +:ref:`Touch Formats <tch-formats>`. + +Data Format Negotiation +======================= + +A touch device may support any I/O method. diff --git a/Documentation/media/uapi/v4l/devices.rst b/Documentation/media/uapi/v4l/devices.rst index aed0ce11d1f8..5c3d6c29e12c 100644 --- a/Documentation/media/uapi/v4l/devices.rst +++ b/Documentation/media/uapi/v4l/devices.rst @@ -22,5 +22,6 @@ Interfaces dev-radio dev-rds dev-sdr + dev-touch dev-event dev-subdev diff --git a/Documentation/media/uapi/v4l/diff-v4l.rst b/Documentation/media/uapi/v4l/diff-v4l.rst index e1e034df514c..76b2ecab8657 100644 --- a/Documentation/media/uapi/v4l/diff-v4l.rst +++ b/Documentation/media/uapi/v4l/diff-v4l.rst @@ -39,39 +39,19 @@ using driver module options. The major device number remains 81. :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - Device Type - - - File Name - - - Minor Numbers - - - .. row 2 - - - Video capture and overlay - - - ``/dev/video`` and ``/dev/bttv0``\ [#f1]_, ``/dev/video0`` to - ``/dev/video63`` - - - 0-63 - - - .. row 3 - - - Radio receiver - - - ``/dev/radio``\ [#f2]_, ``/dev/radio0`` to ``/dev/radio63`` - - - 64-127 - - - .. row 4 - - - Raw VBI capture - - - ``/dev/vbi``, ``/dev/vbi0`` to ``/dev/vbi31`` - - - 224-255 + * - Device Type + - File Name + - Minor Numbers + * - Video capture and overlay + - ``/dev/video`` and ``/dev/bttv0``\ [#f1]_, ``/dev/video0`` to + ``/dev/video63`` + - 0-63 + * - Radio receiver + - ``/dev/radio``\ [#f2]_, ``/dev/radio0`` to ``/dev/radio63`` + - 64-127 + * - Raw VBI capture + - ``/dev/vbi``, ``/dev/vbi0`` to ``/dev/vbi31`` + - 224-255 V4L prohibits (or used to prohibit) multiple opens of a device file. @@ -87,162 +67,89 @@ Querying Capabilities The V4L ``VIDIOCGCAP`` ioctl is equivalent to V4L2's :ref:`VIDIOC_QUERYCAP`. -The ``name`` field in struct :c:type:`struct video_capability` became -``card`` in struct :ref:`v4l2_capability <v4l2-capability>`, ``type`` +The ``name`` field in struct ``video_capability`` became +``card`` in struct :c:type:`v4l2_capability`, ``type`` was replaced by ``capabilities``. Note V4L2 does not distinguish between device types like this, better think of basic video input, video output and radio devices supporting a set of related functions like video capturing, video overlay and VBI capturing. See :ref:`open` for an introduction. +.. tabularcolumns:: |p{5.5cm}|p{6.5cm}|p{5.5cm} +.. cssclass:: longtable .. flat-table:: :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - struct :c:type:`struct video_capability` ``type`` - - - struct :ref:`v4l2_capability <v4l2-capability>` - ``capabilities`` flags - - - Purpose - - - .. row 2 - - - ``VID_TYPE_CAPTURE`` - - - ``V4L2_CAP_VIDEO_CAPTURE`` - - - The :ref:`video capture <capture>` interface is supported. - - - .. row 3 - - - ``VID_TYPE_TUNER`` - - - ``V4L2_CAP_TUNER`` - - - The device has a :ref:`tuner or modulator <tuner>`. - - - .. row 4 - - - ``VID_TYPE_TELETEXT`` - - - ``V4L2_CAP_VBI_CAPTURE`` - - - The :ref:`raw VBI capture <raw-vbi>` interface is supported. - - - .. row 5 - - - ``VID_TYPE_OVERLAY`` - - - ``V4L2_CAP_VIDEO_OVERLAY`` - - - The :ref:`video overlay <overlay>` interface is supported. - - - .. row 6 - - - ``VID_TYPE_CHROMAKEY`` - - - ``V4L2_FBUF_CAP_CHROMAKEY`` in field ``capability`` of struct - :ref:`v4l2_framebuffer <v4l2-framebuffer>` - - - Whether chromakey overlay is supported. For more information on - overlay see :ref:`overlay`. - - - .. row 7 - - - ``VID_TYPE_CLIPPING`` - - - ``V4L2_FBUF_CAP_LIST_CLIPPING`` and - ``V4L2_FBUF_CAP_BITMAP_CLIPPING`` in field ``capability`` of - struct :ref:`v4l2_framebuffer <v4l2-framebuffer>` - - - Whether clipping the overlaid image is supported, see - :ref:`overlay`. - - - .. row 8 - - - ``VID_TYPE_FRAMERAM`` - - - ``V4L2_FBUF_CAP_EXTERNOVERLAY`` *not set* in field ``capability`` - of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>` - - - Whether overlay overwrites frame buffer memory, see - :ref:`overlay`. - - - .. row 9 - - - ``VID_TYPE_SCALES`` - - - ``-`` - - - This flag indicates if the hardware can scale images. The V4L2 API - implies the scale factor by setting the cropping dimensions and - image size with the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` and - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, respectively. The - driver returns the closest sizes possible. For more information on - cropping and scaling see :ref:`crop`. - - - .. row 10 - - - ``VID_TYPE_MONOCHROME`` - - - ``-`` - - - Applications can enumerate the supported image formats with the - :ref:`VIDIOC_ENUM_FMT` ioctl to determine if - the device supports grey scale capturing only. For more - information on image formats see :ref:`pixfmt`. - - - .. row 11 - - - ``VID_TYPE_SUBCAPTURE`` - - - ``-`` - - - Applications can call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` - ioctl to determine if the device supports capturing a subsection - of the full picture ("cropping" in V4L2). If not, the ioctl - returns the ``EINVAL`` error code. For more information on cropping - and scaling see :ref:`crop`. - - - .. row 12 - - - ``VID_TYPE_MPEG_DECODER`` - - - ``-`` - - - Applications can enumerate the supported image formats with the - :ref:`VIDIOC_ENUM_FMT` ioctl to determine if - the device supports MPEG streams. - - - .. row 13 - - - ``VID_TYPE_MPEG_ENCODER`` - - - ``-`` - - - See above. - - - .. row 14 - - - ``VID_TYPE_MJPEG_DECODER`` - - - ``-`` - - - See above. - - - .. row 15 - - - ``VID_TYPE_MJPEG_ENCODER`` - - - ``-`` - - - See above. + * - ``struct video_capability`` ``type`` + - struct :c:type:`v4l2_capability` + ``capabilities`` flags + - Purpose + * - ``VID_TYPE_CAPTURE`` + - ``V4L2_CAP_VIDEO_CAPTURE`` + - The :ref:`video capture <capture>` interface is supported. + * - ``VID_TYPE_TUNER`` + - ``V4L2_CAP_TUNER`` + - The device has a :ref:`tuner or modulator <tuner>`. + * - ``VID_TYPE_TELETEXT`` + - ``V4L2_CAP_VBI_CAPTURE`` + - The :ref:`raw VBI capture <raw-vbi>` interface is supported. + * - ``VID_TYPE_OVERLAY`` + - ``V4L2_CAP_VIDEO_OVERLAY`` + - The :ref:`video overlay <overlay>` interface is supported. + * - ``VID_TYPE_CHROMAKEY`` + - ``V4L2_FBUF_CAP_CHROMAKEY`` in field ``capability`` of struct + :c:type:`v4l2_framebuffer` + - Whether chromakey overlay is supported. For more information on + overlay see :ref:`overlay`. + * - ``VID_TYPE_CLIPPING`` + - ``V4L2_FBUF_CAP_LIST_CLIPPING`` and + ``V4L2_FBUF_CAP_BITMAP_CLIPPING`` in field ``capability`` of + struct :c:type:`v4l2_framebuffer` + - Whether clipping the overlaid image is supported, see + :ref:`overlay`. + * - ``VID_TYPE_FRAMERAM`` + - ``V4L2_FBUF_CAP_EXTERNOVERLAY`` *not set* in field ``capability`` + of struct :c:type:`v4l2_framebuffer` + - Whether overlay overwrites frame buffer memory, see + :ref:`overlay`. + * - ``VID_TYPE_SCALES`` + - ``-`` + - This flag indicates if the hardware can scale images. The V4L2 API + implies the scale factor by setting the cropping dimensions and + image size with the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` and + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, respectively. The + driver returns the closest sizes possible. For more information on + cropping and scaling see :ref:`crop`. + * - ``VID_TYPE_MONOCHROME`` + - ``-`` + - Applications can enumerate the supported image formats with the + :ref:`VIDIOC_ENUM_FMT` ioctl to determine if + the device supports grey scale capturing only. For more + information on image formats see :ref:`pixfmt`. + * - ``VID_TYPE_SUBCAPTURE`` + - ``-`` + - Applications can call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` + ioctl to determine if the device supports capturing a subsection + of the full picture ("cropping" in V4L2). If not, the ioctl + returns the ``EINVAL`` error code. For more information on cropping + and scaling see :ref:`crop`. + * - ``VID_TYPE_MPEG_DECODER`` + - ``-`` + - Applications can enumerate the supported image formats with the + :ref:`VIDIOC_ENUM_FMT` ioctl to determine if + the device supports MPEG streams. + * - ``VID_TYPE_MPEG_ENCODER`` + - ``-`` + - See above. + * - ``VID_TYPE_MJPEG_DECODER`` + - ``-`` + - See above. + * - ``VID_TYPE_MJPEG_ENCODER`` + - ``-`` + - See above. The ``audios`` field was replaced by ``capabilities`` flag @@ -262,12 +169,12 @@ Video Sources ============= V4L provides the ``VIDIOCGCHAN`` and ``VIDIOCSCHAN`` ioctl using struct -:c:type:`struct video_channel` to enumerate the video inputs of a V4L +``video_channel`` to enumerate the video inputs of a V4L device. The equivalent V4L2 ioctls are :ref:`VIDIOC_ENUMINPUT`, :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` using struct -:ref:`v4l2_input <v4l2-input>` as discussed in :ref:`video`. +:c:type:`v4l2_input` as discussed in :ref:`video`. The ``channel`` field counting inputs was renamed to ``index``, the video input types were renamed as follows: @@ -278,24 +185,12 @@ video input types were renamed as follows: :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - struct :c:type:`struct video_channel` ``type`` - - - struct :ref:`v4l2_input <v4l2-input>` ``type`` - - - .. row 2 - - - ``VIDEO_TYPE_TV`` - - - ``V4L2_INPUT_TYPE_TUNER`` - - - .. row 3 - - - ``VIDEO_TYPE_CAMERA`` - - - ``V4L2_INPUT_TYPE_CAMERA`` + * - struct ``video_channel`` ``type`` + - struct :c:type:`v4l2_input` ``type`` + * - ``VIDEO_TYPE_TV`` + - ``V4L2_INPUT_TYPE_TUNER`` + * - ``VIDEO_TYPE_CAMERA`` + - ``V4L2_INPUT_TYPE_CAMERA`` Unlike the ``tuners`` field expressing the number of tuners of this @@ -303,7 +198,7 @@ input, V4L2 assumes each video input is connected to at most one tuner. However a tuner can have more than one input, i. e. RF connectors, and a device can have multiple tuners. The index number of the tuner associated with the input, if any, is stored in field ``tuner`` of -struct :ref:`v4l2_input <v4l2-input>`. Enumeration of tuners is +struct :c:type:`v4l2_input`. Enumeration of tuners is discussed in :ref:`tuner`. The redundant ``VIDEO_VC_TUNER`` flag was dropped. Video inputs @@ -326,11 +221,11 @@ Tuning ====== The V4L ``VIDIOCGTUNER`` and ``VIDIOCSTUNER`` ioctl and struct -:c:type:`struct video_tuner` can be used to enumerate the tuners of a +``video_tuner`` can be used to enumerate the tuners of a V4L TV or radio device. The equivalent V4L2 ioctls are :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` using struct -:ref:`v4l2_tuner <v4l2-tuner>`. Tuners are covered in :ref:`tuner`. +:c:type:`v4l2_tuner`. Tuners are covered in :ref:`tuner`. The ``tuner`` field counting tuners was renamed to ``index``. The fields ``name``, ``rangelow`` and ``rangehigh`` remained unchanged. @@ -338,7 +233,7 @@ The ``tuner`` field counting tuners was renamed to ``index``. The fields The ``VIDEO_TUNER_PAL``, ``VIDEO_TUNER_NTSC`` and ``VIDEO_TUNER_SECAM`` flags indicating the supported video standards were dropped. This information is now contained in the associated struct -:ref:`v4l2_input <v4l2-input>`. No replacement exists for the +:c:type:`v4l2_input`. No replacement exists for the ``VIDEO_TUNER_NORM`` flag indicating whether the video standard can be switched. The ``mode`` field to select a different video standard was replaced by a whole new set of ioctls and structures described in @@ -351,18 +246,18 @@ Japan with numbers 3-6 (sic). The ``VIDEO_TUNER_STEREO_ON`` flag indicating stereo reception became ``V4L2_TUNER_SUB_STEREO`` in field ``rxsubchans``. This field also permits the detection of monaural and bilingual audio, see the -definition of struct :ref:`v4l2_tuner <v4l2-tuner>` for details. +definition of struct :c:type:`v4l2_tuner` for details. Presently no replacement exists for the ``VIDEO_TUNER_RDS_ON`` and ``VIDEO_TUNER_MBS_ON`` flags. The ``VIDEO_TUNER_LOW`` flag was renamed to ``V4L2_TUNER_CAP_LOW`` in -the struct :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field. +the struct :c:type:`v4l2_tuner` ``capability`` field. The ``VIDIOCGFREQ`` and ``VIDIOCSFREQ`` ioctl to change the tuner frequency where renamed to :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>`. They take a pointer -to a struct :ref:`v4l2_frequency <v4l2-frequency>` instead of an +to a struct :c:type:`v4l2_frequency` instead of an unsigned long integer. @@ -372,7 +267,7 @@ Image Properties ================ V4L2 has no equivalent of the ``VIDIOCGPICT`` and ``VIDIOCSPICT`` ioctl -and struct :c:type:`struct video_picture`. The following fields where +and struct ``video_picture``. The following fields where replaced by V4L2 controls accessible with the :ref:`VIDIOC_QUERYCTRL`, :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and @@ -384,42 +279,18 @@ replaced by V4L2 controls accessible with the :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - struct :c:type:`struct video_picture` - - - V4L2 Control ID - - - .. row 2 - - - ``brightness`` - - - ``V4L2_CID_BRIGHTNESS`` - - - .. row 3 - - - ``hue`` - - - ``V4L2_CID_HUE`` - - - .. row 4 - - - ``colour`` - - - ``V4L2_CID_SATURATION`` - - - .. row 5 - - - ``contrast`` - - - ``V4L2_CID_CONTRAST`` - - - .. row 6 - - - ``whiteness`` - - - ``V4L2_CID_WHITENESS`` + * - struct ``video_picture`` + - V4L2 Control ID + * - ``brightness`` + - ``V4L2_CID_BRIGHTNESS`` + * - ``hue`` + - ``V4L2_CID_HUE`` + * - ``colour`` + - ``V4L2_CID_SATURATION`` + * - ``contrast`` + - ``V4L2_CID_CONTRAST`` + * - ``whiteness`` + - ``V4L2_CID_WHITENESS`` The V4L picture controls are assumed to range from 0 to 65535 with no @@ -432,7 +303,7 @@ The ``depth`` (average number of bits per pixel) of a video image is implied by the selected image format. V4L2 does not explicitly provide such information assuming applications recognizing the format are aware of the image depth and others need not know. The ``palette`` field moved -into the struct :ref:`v4l2_pix_format <v4l2-pix-format>`: +into the struct :c:type:`v4l2_pix_format`: @@ -440,108 +311,40 @@ into the struct :ref:`v4l2_pix_format <v4l2-pix-format>`: :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - struct :c:type:`struct video_picture` ``palette`` - - - struct :ref:`v4l2_pix_format <v4l2-pix-format>` ``pixfmt`` - - - .. row 2 - - - ``VIDEO_PALETTE_GREY`` - - - :ref:`V4L2_PIX_FMT_GREY <V4L2-PIX-FMT-GREY>` - - - .. row 3 - - - ``VIDEO_PALETTE_HI240`` - - - :ref:`V4L2_PIX_FMT_HI240 <pixfmt-reserved>` [#f3]_ - - - .. row 4 - - - ``VIDEO_PALETTE_RGB565`` - - - :ref:`V4L2_PIX_FMT_RGB565 <pixfmt-rgb>` - - - .. row 5 - - - ``VIDEO_PALETTE_RGB555`` - - - :ref:`V4L2_PIX_FMT_RGB555 <pixfmt-rgb>` - - - .. row 6 - - - ``VIDEO_PALETTE_RGB24`` - - - :ref:`V4L2_PIX_FMT_BGR24 <pixfmt-rgb>` - - - .. row 7 - - - ``VIDEO_PALETTE_RGB32`` - - - :ref:`V4L2_PIX_FMT_BGR32 <pixfmt-rgb>` [#f4]_ - - - .. row 8 - - - ``VIDEO_PALETTE_YUV422`` - - - :ref:`V4L2_PIX_FMT_YUYV <V4L2-PIX-FMT-YUYV>` - - - .. row 9 - - - ``VIDEO_PALETTE_YUYV``\ [#f5]_ - - - :ref:`V4L2_PIX_FMT_YUYV <V4L2-PIX-FMT-YUYV>` - - - .. row 10 - - - ``VIDEO_PALETTE_UYVY`` - - - :ref:`V4L2_PIX_FMT_UYVY <V4L2-PIX-FMT-UYVY>` - - - .. row 11 - - - ``VIDEO_PALETTE_YUV420`` - - - None - - - .. row 12 - - - ``VIDEO_PALETTE_YUV411`` - - - :ref:`V4L2_PIX_FMT_Y41P <V4L2-PIX-FMT-Y41P>` [#f6]_ - - - .. row 13 - - - ``VIDEO_PALETTE_RAW`` - - - None [#f7]_ - - - .. row 14 - - - ``VIDEO_PALETTE_YUV422P`` - - - :ref:`V4L2_PIX_FMT_YUV422P <V4L2-PIX-FMT-YUV422P>` - - - .. row 15 - - - ``VIDEO_PALETTE_YUV411P`` - - - :ref:`V4L2_PIX_FMT_YUV411P <V4L2-PIX-FMT-YUV411P>` [#f8]_ - - - .. row 16 - - - ``VIDEO_PALETTE_YUV420P`` - - - :ref:`V4L2_PIX_FMT_YVU420 <V4L2-PIX-FMT-YVU420>` - - - .. row 17 - - - ``VIDEO_PALETTE_YUV410P`` - - - :ref:`V4L2_PIX_FMT_YVU410 <V4L2-PIX-FMT-YVU410>` + * - struct ``video_picture`` ``palette`` + - struct :c:type:`v4l2_pix_format` ``pixfmt`` + * - ``VIDEO_PALETTE_GREY`` + - :ref:`V4L2_PIX_FMT_GREY <V4L2-PIX-FMT-GREY>` + * - ``VIDEO_PALETTE_HI240`` + - :ref:`V4L2_PIX_FMT_HI240 <pixfmt-reserved>` [#f3]_ + * - ``VIDEO_PALETTE_RGB565`` + - :ref:`V4L2_PIX_FMT_RGB565 <pixfmt-rgb>` + * - ``VIDEO_PALETTE_RGB555`` + - :ref:`V4L2_PIX_FMT_RGB555 <pixfmt-rgb>` + * - ``VIDEO_PALETTE_RGB24`` + - :ref:`V4L2_PIX_FMT_BGR24 <pixfmt-rgb>` + * - ``VIDEO_PALETTE_RGB32`` + - :ref:`V4L2_PIX_FMT_BGR32 <pixfmt-rgb>` [#f4]_ + * - ``VIDEO_PALETTE_YUV422`` + - :ref:`V4L2_PIX_FMT_YUYV <V4L2-PIX-FMT-YUYV>` + * - ``VIDEO_PALETTE_YUYV``\ [#f5]_ + - :ref:`V4L2_PIX_FMT_YUYV <V4L2-PIX-FMT-YUYV>` + * - ``VIDEO_PALETTE_UYVY`` + - :ref:`V4L2_PIX_FMT_UYVY <V4L2-PIX-FMT-UYVY>` + * - ``VIDEO_PALETTE_YUV420`` + - None + * - ``VIDEO_PALETTE_YUV411`` + - :ref:`V4L2_PIX_FMT_Y41P <V4L2-PIX-FMT-Y41P>` [#f6]_ + * - ``VIDEO_PALETTE_RAW`` + - None [#f7]_ + * - ``VIDEO_PALETTE_YUV422P`` + - :ref:`V4L2_PIX_FMT_YUV422P <V4L2-PIX-FMT-YUV422P>` + * - ``VIDEO_PALETTE_YUV411P`` + - :ref:`V4L2_PIX_FMT_YUV411P <V4L2-PIX-FMT-YUV411P>` [#f8]_ + * - ``VIDEO_PALETTE_YUV420P`` + - :ref:`V4L2_PIX_FMT_YVU420 <V4L2-PIX-FMT-YVU420>` + * - ``VIDEO_PALETTE_YUV410P`` + - :ref:`V4L2_PIX_FMT_YVU410 <V4L2-PIX-FMT-YVU410>` V4L2 image formats are defined in :ref:`pixfmt`. The image format can @@ -552,11 +355,11 @@ Audio ===== The ``VIDIOCGAUDIO`` and ``VIDIOCSAUDIO`` ioctl and struct -:c:type:`struct video_audio` are used to enumerate the audio inputs +``video_audio`` are used to enumerate the audio inputs of a V4L device. The equivalent V4L2 ioctls are :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` and :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` using struct -:ref:`v4l2_audio <v4l2-audio>` as discussed in :ref:`audio`. +:c:type:`v4l2_audio` as discussed in :ref:`audio`. The ``audio`` "channel number" field counting audio inputs was renamed to ``index``. @@ -569,10 +372,10 @@ standard is BTSC ``VIDEO_SOUND_LANG2`` refers to SAP and specification, there is no way to query the selected mode. On ``VIDIOCGAUDIO`` the driver returns the *actually received* audio programmes in this field. In the V4L2 API this information is stored in -the struct :ref:`v4l2_tuner <v4l2-tuner>` ``rxsubchans`` and +the struct :c:type:`v4l2_tuner` ``rxsubchans`` and ``audmode`` fields, respectively. See :ref:`tuner` for more information on tuners. Related to audio modes struct -:ref:`v4l2_audio <v4l2-audio>` also reports if this is a mono or +:c:type:`v4l2_audio` also reports if this is a mono or stereo input, regardless if the source is a tuner. The following fields where replaced by V4L2 controls accessible with the @@ -586,36 +389,16 @@ The following fields where replaced by V4L2 controls accessible with the :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - struct :c:type:`struct video_audio` - - - V4L2 Control ID - - - .. row 2 - - - ``volume`` - - - ``V4L2_CID_AUDIO_VOLUME`` - - - .. row 3 - - - ``bass`` - - - ``V4L2_CID_AUDIO_BASS`` - - - .. row 4 - - - ``treble`` - - - ``V4L2_CID_AUDIO_TREBLE`` - - - .. row 5 - - - ``balance`` - - - ``V4L2_CID_AUDIO_BALANCE`` + * - struct ``video_audio`` + - V4L2 Control ID + * - ``volume`` + - ``V4L2_CID_AUDIO_VOLUME`` + * - ``bass`` + - ``V4L2_CID_AUDIO_BASS`` + * - ``treble`` + - ``V4L2_CID_AUDIO_TREBLE`` + * - ``balance`` + - ``V4L2_CID_AUDIO_BALANCE`` To determine which of these controls are supported by a driver V4L @@ -627,7 +410,7 @@ and ``VIDEO_AUDIO_MUTE`` flags where replaced by the boolean ``V4L2_CID_AUDIO_MUTE`` control. All V4L2 controls have a ``step`` attribute replacing the struct -:c:type:`struct video_audio` ``step`` field. The V4L audio controls +``video_audio`` ``step`` field. The V4L audio controls are assumed to range from 0 to 65535 with no particular reset value. The V4L2 API permits arbitrary limits and defaults which can be queried with the :ref:`VIDIOC_QUERYCTRL` ioctl. For general @@ -640,11 +423,11 @@ Frame Buffer Overlay The V4L2 ioctls equivalent to ``VIDIOCGFBUF`` and ``VIDIOCSFBUF`` are :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`. The ``base`` field of struct -:c:type:`struct video_buffer` remained unchanged, except V4L2 defines +``video_buffer`` remained unchanged, except V4L2 defines a flag to indicate non-destructive overlays instead of a ``NULL`` pointer. All other fields moved into the struct -:ref:`v4l2_pix_format <v4l2-pix-format>` ``fmt`` substructure of -struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`. The ``depth`` +:c:type:`v4l2_pix_format` ``fmt`` substructure of +struct :c:type:`v4l2_framebuffer`. The ``depth`` field was replaced by ``pixelformat``. See :ref:`pixfmt-rgb` for a list of RGB formats and their respective color depths. @@ -652,28 +435,28 @@ Instead of the special ioctls ``VIDIOCGWIN`` and ``VIDIOCSWIN`` V4L2 uses the general-purpose data format negotiation ioctls :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. They take a pointer to a struct -:ref:`v4l2_format <v4l2-format>` as argument. Here the ``win`` member +:c:type:`v4l2_format` as argument. Here the ``win`` member of the ``fmt`` union is used, a struct -:ref:`v4l2_window <v4l2-window>`. +:c:type:`v4l2_window`. The ``x``, ``y``, ``width`` and ``height`` fields of struct -:c:type:`struct video_window` moved into struct -:ref:`v4l2_rect <v4l2-rect>` substructure ``w`` of struct -:c:type:`struct v4l2_window`. The ``chromakey``, ``clips``, and +``video_window`` moved into struct +:c:type:`v4l2_rect` substructure ``w`` of struct +:c:type:`v4l2_window`. The ``chromakey``, ``clips``, and ``clipcount`` fields remained unchanged. Struct -:c:type:`struct video_clip` was renamed to struct -:ref:`v4l2_clip <v4l2-clip>`, also containing a struct -:c:type:`struct v4l2_rect`, but the semantics are still the same. +``video_clip`` was renamed to struct +:c:type:`v4l2_clip`, also containing a struct +:c:type:`v4l2_rect`, but the semantics are still the same. The ``VIDEO_WINDOW_INTERLACE`` flag was dropped. Instead applications must set the ``field`` field to ``V4L2_FIELD_ANY`` or ``V4L2_FIELD_INTERLACED``. The ``VIDEO_WINDOW_CHROMAKEY`` flag moved -into struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`, under the new +into struct :c:type:`v4l2_framebuffer`, under the new name ``V4L2_FBUF_FLAG_CHROMAKEY``. In V4L, storing a bitmap pointer in ``clips`` and setting ``clipcount`` to ``VIDEO_CLIP_BITMAP`` (-1) requests bitmap clipping, using a fixed -size bitmap of 1024 × 625 bits. Struct :c:type:`struct v4l2_window` +size bitmap of 1024 × 625 bits. Struct :c:type:`v4l2_window` has a separate ``bitmap`` pointer field for this purpose and the bitmap size is determined by ``w.width`` and ``w.height``. @@ -686,24 +469,24 @@ Cropping To capture only a subsection of the full picture V4L defines the ``VIDIOCGCAPTURE`` and ``VIDIOCSCAPTURE`` ioctls using struct -:c:type:`struct video_capture`. The equivalent V4L2 ioctls are +``video_capture``. The equivalent V4L2 ioctls are :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` using struct -:ref:`v4l2_crop <v4l2-crop>`, and the related +:c:type:`v4l2_crop`, and the related :ref:`VIDIOC_CROPCAP` ioctl. This is a rather complex matter, see :ref:`crop` for details. The ``x``, ``y``, ``width`` and ``height`` fields moved into struct -:ref:`v4l2_rect <v4l2-rect>` substructure ``c`` of struct -:c:type:`struct v4l2_crop`. The ``decimation`` field was dropped. In +:c:type:`v4l2_rect` substructure ``c`` of struct +:c:type:`v4l2_crop`. The ``decimation`` field was dropped. In the V4L2 API the scaling factor is implied by the size of the cropping rectangle and the size of the captured or overlaid image. The ``VIDEO_CAPTURE_ODD`` and ``VIDEO_CAPTURE_EVEN`` flags to capture only the odd or even field, respectively, were replaced by ``V4L2_FIELD_TOP`` and ``V4L2_FIELD_BOTTOM`` in the field named -``field`` of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and -struct :ref:`v4l2_window <v4l2-window>`. These structures are used to +``field`` of struct :c:type:`v4l2_pix_format` and +struct :c:type:`v4l2_window`. These structures are used to select a capture or overlay format with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. @@ -728,8 +511,8 @@ To select an image format and size, V4L provides the ``VIDIOCSPICT`` and ``VIDIOCSWIN`` ioctls. V4L2 uses the general-purpose data format negotiation ioctls :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. They take a pointer to a struct -:ref:`v4l2_format <v4l2-format>` as argument, here the struct -:ref:`v4l2_pix_format <v4l2-pix-format>` named ``pix`` of its +:c:type:`v4l2_format` as argument, here the struct +:c:type:`v4l2_pix_format` named ``pix`` of its ``fmt`` union is used. For more information about the V4L2 read interface see :ref:`rw`. @@ -750,68 +533,49 @@ differences. :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - V4L - - - V4L2 - - - .. row 2 - - - - - The image format must be selected before buffers are allocated, - with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When no - format is selected the driver may use the last, possibly by - another application requested format. - - - .. row 3 - - - Applications cannot change the number of buffers. The it is built - into the driver, unless it has a module option to change the - number when the driver module is loaded. - - - The :ref:`VIDIOC_REQBUFS` ioctl allocates the - desired number of buffers, this is a required step in the - initialization sequence. - - - .. row 4 - - - Drivers map all buffers as one contiguous range of memory. The - ``VIDIOCGMBUF`` ioctl is available to query the number of buffers, - the offset of each buffer from the start of the virtual file, and - the overall amount of memory used, which can be used as arguments - for the :ref:`mmap() <func-mmap>` function. - - - Buffers are individually mapped. The offset and size of each - buffer can be determined with the - :ref:`VIDIOC_QUERYBUF` ioctl. - - - .. row 5 - - - The ``VIDIOCMCAPTURE`` ioctl prepares a buffer for capturing. It - also determines the image format for this buffer. The ioctl - returns immediately, eventually with an ``EAGAIN`` error code if no - video signal had been detected. When the driver supports more than - one buffer applications can call the ioctl multiple times and thus - have multiple outstanding capture requests. - - The ``VIDIOCSYNC`` ioctl suspends execution until a particular - buffer has been filled. - - - Drivers maintain an incoming and outgoing queue. - :ref:`VIDIOC_QBUF` enqueues any empty buffer into - the incoming queue. Filled buffers are dequeued from the outgoing - queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait - until filled buffers become available this function, - :ref:`select() <func-select>` or :ref:`poll() <func-poll>` can - be used. The :ref:`VIDIOC_STREAMON` ioctl - must be called once after enqueuing one or more buffers to start - capturing. Its counterpart - :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` stops capturing and - dequeues all buffers from both queues. Applications can query the - signal status, if known, with the - :ref:`VIDIOC_ENUMINPUT` ioctl. + * - V4L + - V4L2 + * - + - The image format must be selected before buffers are allocated, + with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When no + format is selected the driver may use the last, possibly by + another application requested format. + * - Applications cannot change the number of buffers. The it is built + into the driver, unless it has a module option to change the + number when the driver module is loaded. + - The :ref:`VIDIOC_REQBUFS` ioctl allocates the + desired number of buffers, this is a required step in the + initialization sequence. + * - Drivers map all buffers as one contiguous range of memory. The + ``VIDIOCGMBUF`` ioctl is available to query the number of buffers, + the offset of each buffer from the start of the virtual file, and + the overall amount of memory used, which can be used as arguments + for the :ref:`mmap() <func-mmap>` function. + - Buffers are individually mapped. The offset and size of each + buffer can be determined with the + :ref:`VIDIOC_QUERYBUF` ioctl. + * - The ``VIDIOCMCAPTURE`` ioctl prepares a buffer for capturing. It + also determines the image format for this buffer. The ioctl + returns immediately, eventually with an ``EAGAIN`` error code if no + video signal had been detected. When the driver supports more than + one buffer applications can call the ioctl multiple times and thus + have multiple outstanding capture requests. + + The ``VIDIOCSYNC`` ioctl suspends execution until a particular + buffer has been filled. + - Drivers maintain an incoming and outgoing queue. + :ref:`VIDIOC_QBUF` enqueues any empty buffer into + the incoming queue. Filled buffers are dequeued from the outgoing + queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait + until filled buffers become available this function, + :ref:`select() <func-select>` or :ref:`poll() <func-poll>` can + be used. The :ref:`VIDIOC_STREAMON` ioctl + must be called once after enqueuing one or more buffers to start + capturing. Its counterpart + :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` stops capturing and + dequeues all buffers from both queues. Applications can query the + signal status, if known, with the + :ref:`VIDIOC_ENUMINPUT` ioctl. For a more in-depth discussion of memory mapping and examples, see @@ -833,68 +597,36 @@ with the following parameters: :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - struct :ref:`v4l2_vbi_format <v4l2-vbi-format>` - - - V4L, BTTV driver - - - .. row 2 - - - sampling_rate - - - 28636363 Hz NTSC (or any other 525-line standard); 35468950 Hz PAL - and SECAM (625-line standards) - - - .. row 3 - - - offset - - - ? - - - .. row 4 - - - samples_per_line - - - 2048 - - - .. row 5 - - - sample_format - - - V4L2_PIX_FMT_GREY. The last four bytes (a machine endianness - integer) contain a frame counter. - - - .. row 6 - - - start[] - - - 10, 273 NTSC; 22, 335 PAL and SECAM - - - .. row 7 - - - count[] - - - 16, 16 [#f9]_ - - - .. row 8 - - - flags - - - 0 + * - struct :c:type:`v4l2_vbi_format` + - V4L, BTTV driver + * - sampling_rate + - 28636363 Hz NTSC (or any other 525-line standard); 35468950 Hz PAL + and SECAM (625-line standards) + * - offset + - ? + * - samples_per_line + - 2048 + * - sample_format + - V4L2_PIX_FMT_GREY. The last four bytes (a machine endianness + integer) contain a frame counter. + * - start[] + - 10, 273 NTSC; 22, 335 PAL and SECAM + * - count[] + - 16, 16 [#f9]_ + * - flags + - 0 Undocumented in the V4L specification, in Linux 2.3 the ``VIDIOCGVBIFMT`` and ``VIDIOCSVBIFMT`` ioctls using struct -:c:type:`struct vbi_format` were added to determine the VBI image +``vbi_format`` were added to determine the VBI image parameters. These ioctls are only partially compatible with the V4L2 VBI interface specified in :ref:`raw-vbi`. An ``offset`` field does not exist, ``sample_format`` is supposed to be ``VIDEO_PALETTE_RAW``, equivalent to ``V4L2_PIX_FMT_GREY``. The remaining fields are probably equivalent to struct -:ref:`v4l2_vbi_format <v4l2-vbi-format>`. +:c:type:`v4l2_vbi_format`. Apparently only the Zoran (ZR 36120) driver implements these ioctls. The semantics differ from those specified for V4L2 in two ways. The diff --git a/Documentation/media/uapi/v4l/dmabuf.rst b/Documentation/media/uapi/v4l/dmabuf.rst index 675768f7c66a..4e980a7e9c9c 100644 --- a/Documentation/media/uapi/v4l/dmabuf.rst +++ b/Documentation/media/uapi/v4l/dmabuf.rst @@ -19,7 +19,7 @@ exporting V4L2 buffers as DMABUF file descriptors. Input and output devices support the streaming I/O method when the ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. Whether importing DMA buffers through DMABUF file descriptors is supported is determined by calling the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` @@ -31,8 +31,8 @@ DRM). Buffers (planes) are allocated by a driver on behalf of an application. Next, these buffers are exported to the application as file descriptors using an API which is specific for an allocator driver. Only such file descriptor are exchanged. The descriptors and meta-information -are passed in struct :ref:`v4l2_buffer <v4l2-buffer>` (or in struct -:ref:`v4l2_plane <v4l2-plane>` in the multi-planar API case). The +are passed in struct :c:type:`v4l2_buffer` (or in struct +:c:type:`v4l2_plane` in the multi-planar API case). The driver must be switched into DMABUF I/O mode by calling the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type. @@ -151,7 +151,7 @@ To start and stop capturing or displaying applications call the both queues and unlocks all buffers as a side effect. Since there is no notion of doing anything "now" on a multitasking system, if an application needs to synchronize with another event it should examine - the struct :ref:`v4l2_buffer <v4l2-buffer>` ``timestamp`` of captured or + the struct :c:type:`v4l2_buffer` ``timestamp`` of captured or outputted buffers. Drivers implementing DMABUF importing I/O must support the diff --git a/Documentation/media/uapi/v4l/extended-controls.rst b/Documentation/media/uapi/v4l/extended-controls.rst index 71071d73747d..7725c33d8b69 100644 --- a/Documentation/media/uapi/v4l/extended-controls.rst +++ b/Documentation/media/uapi/v4l/extended-controls.rst @@ -49,7 +49,7 @@ control). This is needed since it is often required to atomically change several controls at once. Each of the new ioctls expects a pointer to a struct -:ref:`v4l2_ext_controls <v4l2-ext-controls>`. This structure +:c:type:`v4l2_ext_controls`. This structure contains a pointer to the control array, a count of the number of controls in that array and a control class. Control classes are used to group similar controls into a single class. For example, control class @@ -65,12 +65,12 @@ It is also possible to use an empty control array (``count`` == 0) to check whether the specified control class is supported. The control array is a struct -:ref:`v4l2_ext_control <v4l2-ext-control>` array. The -:ref:`struct v4l2_ext_control <v4l2-ext-control>` structure is very similar to -struct :ref:`v4l2_control <v4l2-control>`, except for the fact that +:c:type:`v4l2_ext_control` array. The +struct :c:type:`v4l2_ext_control` is very similar to +struct :c:type:`v4l2_control`, except for the fact that it also allows for 64-bit values and pointers to be passed. -Since the struct :ref:`v4l2_ext_control <v4l2-ext-control>` supports +Since the struct :c:type:`v4l2_ext_control` supports pointers it is now also possible to have controls with compound types such as N-dimensional arrays and/or structures. You need to specify the ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` when enumerating controls to actually @@ -184,7 +184,9 @@ Codec Control Reference Below all controls within the Codec control class are described. First the generic controls, then controls specific for certain hardware. -.. note:: These controls are applicable to all codecs and not just MPEG. The +.. note:: + + These controls are applicable to all codecs and not just MPEG. The defines are prefixed with V4L2_CID_MPEG/V4L2_MPEG as the controls were originally made for MPEG codecs and later extended to cover all encoding formats. @@ -207,7 +209,10 @@ Codec Control IDs .. _v4l2-mpeg-stream-type: -``V4L2_CID_MPEG_STREAM_TYPE (enum v4l2_mpeg_stream_type)`` +``V4L2_CID_MPEG_STREAM_TYPE`` + (enum) + +enum v4l2_mpeg_stream_type - The MPEG-1, -2 or -4 output stream type. One cannot assume anything here. Each hardware MPEG encoder tends to support different subsets of the available MPEG stream types. This control is specific to @@ -219,42 +224,18 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS`` - - - MPEG-2 program stream - - - .. row 2 - - - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS`` - - - MPEG-2 transport stream - - - .. row 3 - - - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS`` - - - MPEG-1 system stream - - - .. row 4 - - - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD`` - - - MPEG-2 DVD-compatible stream - - - .. row 5 - - - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD`` - - - MPEG-1 VCD-compatible stream - - - .. row 6 - - - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD`` - - - MPEG-2 SVCD-compatible stream + * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_PS`` + - MPEG-2 program stream + * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_TS`` + - MPEG-2 transport stream + * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_SS`` + - MPEG-1 system stream + * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_DVD`` + - MPEG-2 DVD-compatible stream + * - ``V4L2_MPEG_STREAM_TYPE_MPEG1_VCD`` + - MPEG-1 VCD-compatible stream + * - ``V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD`` + - MPEG-2 SVCD-compatible stream @@ -280,7 +261,10 @@ Codec Control IDs .. _v4l2-mpeg-stream-vbi-fmt: -``V4L2_CID_MPEG_STREAM_VBI_FMT (enum v4l2_mpeg_stream_vbi_fmt)`` +``V4L2_CID_MPEG_STREAM_VBI_FMT`` + (enum) + +enum v4l2_mpeg_stream_vbi_fmt - Some cards can embed VBI data (e. g. Closed Caption, Teletext) into the MPEG stream. This control selects whether VBI data should be embedded, and if so, what embedding method should be used. The list @@ -289,30 +273,27 @@ Codec Control IDs +.. tabularcolumns:: |p{6 cm}|p{11.5cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_STREAM_VBI_FMT_NONE`` - - - No VBI in the MPEG stream - - - .. row 2 - - - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV`` - - - VBI in private packets, IVTV format (documented in the kernel - sources in the file - ``Documentation/video4linux/cx2341x/README.vbi``) + * - ``V4L2_MPEG_STREAM_VBI_FMT_NONE`` + - No VBI in the MPEG stream + * - ``V4L2_MPEG_STREAM_VBI_FMT_IVTV`` + - VBI in private packets, IVTV format (documented in the kernel + sources in the file + ``Documentation/video4linux/cx2341x/README.vbi``) .. _v4l2-mpeg-audio-sampling-freq: -``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (enum v4l2_mpeg_audio_sampling_freq)`` +``V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ`` + (enum) + +enum v4l2_mpeg_audio_sampling_freq - MPEG Audio sampling frequency. Possible values are: @@ -321,30 +302,21 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100`` - - - 44.1 kHz - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000`` - - - 48 kHz - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000`` - - - 32 kHz + * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_44100`` + - 44.1 kHz + * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000`` + - 48 kHz + * - ``V4L2_MPEG_AUDIO_SAMPLING_FREQ_32000`` + - 32 kHz .. _v4l2-mpeg-audio-encoding: -``V4L2_CID_MPEG_AUDIO_ENCODING (enum v4l2_mpeg_audio_encoding)`` +``V4L2_CID_MPEG_AUDIO_ENCODING`` + (enum) + +enum v4l2_mpeg_audio_encoding - MPEG Audio encoding. This control is specific to multiplexed MPEG streams. Possible values are: @@ -354,42 +326,25 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1`` - - - MPEG-1/2 Layer I encoding - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2`` - - - MPEG-1/2 Layer II encoding - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3`` - - - MPEG-1/2 Layer III encoding - - - .. row 4 - - - ``V4L2_MPEG_AUDIO_ENCODING_AAC`` - - - MPEG-2/4 AAC (Advanced Audio Coding) - - - .. row 5 - - - ``V4L2_MPEG_AUDIO_ENCODING_AC3`` - - - AC-3 aka ATSC A/52 encoding + * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_1`` + - MPEG-1/2 Layer I encoding + * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_2`` + - MPEG-1/2 Layer II encoding + * - ``V4L2_MPEG_AUDIO_ENCODING_LAYER_3`` + - MPEG-1/2 Layer III encoding + * - ``V4L2_MPEG_AUDIO_ENCODING_AAC`` + - MPEG-2/4 AAC (Advanced Audio Coding) + * - ``V4L2_MPEG_AUDIO_ENCODING_AC3`` + - AC-3 aka ATSC A/52 encoding .. _v4l2-mpeg-audio-l1-bitrate: -``V4L2_CID_MPEG_AUDIO_L1_BITRATE (enum v4l2_mpeg_audio_l1_bitrate)`` +``V4L2_CID_MPEG_AUDIO_L1_BITRATE`` + (enum) + +enum v4l2_mpeg_audio_l1_bitrate - MPEG-1/2 Layer I bitrate. Possible values are: @@ -398,96 +353,43 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K`` - - - 32 kbit/s - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K`` - - - 64 kbit/s - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K`` - - - 96 kbit/s - - - .. row 4 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K`` - - - 128 kbit/s - - - .. row 5 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K`` - - - 160 kbit/s - - - .. row 6 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K`` - - - 192 kbit/s - - - .. row 7 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K`` - - - 224 kbit/s - - - .. row 8 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K`` - - - 256 kbit/s - - - .. row 9 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K`` - - - 288 kbit/s - - - .. row 10 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K`` - - - 320 kbit/s - - - .. row 11 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K`` - - - 352 kbit/s - - - .. row 12 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K`` - - - 384 kbit/s - - - .. row 13 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K`` - - - 416 kbit/s - - - .. row 14 - - - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K`` - - - 448 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_32K`` + - 32 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_64K`` + - 64 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_96K`` + - 96 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_128K`` + - 128 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_160K`` + - 160 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_192K`` + - 192 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_224K`` + - 224 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_256K`` + - 256 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_288K`` + - 288 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_320K`` + - 320 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_352K`` + - 352 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_384K`` + - 384 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_416K`` + - 416 kbit/s + * - ``V4L2_MPEG_AUDIO_L1_BITRATE_448K`` + - 448 kbit/s .. _v4l2-mpeg-audio-l2-bitrate: -``V4L2_CID_MPEG_AUDIO_L2_BITRATE (enum v4l2_mpeg_audio_l2_bitrate)`` +``V4L2_CID_MPEG_AUDIO_L2_BITRATE`` + (enum) + +enum v4l2_mpeg_audio_l2_bitrate - MPEG-1/2 Layer II bitrate. Possible values are: @@ -496,96 +398,43 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K`` - - - 32 kbit/s - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K`` - - - 48 kbit/s - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K`` - - - 56 kbit/s - - - .. row 4 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K`` - - - 64 kbit/s - - - .. row 5 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K`` - - - 80 kbit/s - - - .. row 6 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K`` - - - 96 kbit/s - - - .. row 7 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K`` - - - 112 kbit/s - - - .. row 8 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K`` - - - 128 kbit/s - - - .. row 9 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K`` - - - 160 kbit/s - - - .. row 10 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K`` - - - 192 kbit/s - - - .. row 11 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K`` - - - 224 kbit/s - - - .. row 12 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K`` - - - 256 kbit/s - - - .. row 13 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K`` - - - 320 kbit/s - - - .. row 14 - - - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K`` - - - 384 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_32K`` + - 32 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_48K`` + - 48 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_56K`` + - 56 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_64K`` + - 64 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_80K`` + - 80 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_96K`` + - 96 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_112K`` + - 112 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_128K`` + - 128 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_160K`` + - 160 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_192K`` + - 192 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_224K`` + - 224 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_256K`` + - 256 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_320K`` + - 320 kbit/s + * - ``V4L2_MPEG_AUDIO_L2_BITRATE_384K`` + - 384 kbit/s .. _v4l2-mpeg-audio-l3-bitrate: -``V4L2_CID_MPEG_AUDIO_L3_BITRATE (enum v4l2_mpeg_audio_l3_bitrate)`` +``V4L2_CID_MPEG_AUDIO_L3_BITRATE`` + (enum) + +enum v4l2_mpeg_audio_l3_bitrate - MPEG-1/2 Layer III bitrate. Possible values are: @@ -594,90 +443,34 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K`` - - - 32 kbit/s - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K`` - - - 40 kbit/s - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K`` - - - 48 kbit/s - - - .. row 4 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K`` - - - 56 kbit/s - - - .. row 5 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K`` - - - 64 kbit/s - - - .. row 6 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K`` - - - 80 kbit/s - - - .. row 7 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K`` - - - 96 kbit/s - - - .. row 8 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K`` - - - 112 kbit/s - - - .. row 9 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K`` - - - 128 kbit/s - - - .. row 10 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K`` - - - 160 kbit/s - - - .. row 11 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K`` - - - 192 kbit/s - - - .. row 12 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K`` - - - 224 kbit/s - - - .. row 13 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K`` - - - 256 kbit/s - - - .. row 14 - - - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K`` - - - 320 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_32K`` + - 32 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_40K`` + - 40 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_48K`` + - 48 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_56K`` + - 56 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_64K`` + - 64 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_80K`` + - 80 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_96K`` + - 96 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_112K`` + - 112 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_128K`` + - 128 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_160K`` + - 160 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_192K`` + - 192 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_224K`` + - 224 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_256K`` + - 256 kbit/s + * - ``V4L2_MPEG_AUDIO_L3_BITRATE_320K`` + - 320 kbit/s @@ -686,7 +479,10 @@ Codec Control IDs .. _v4l2-mpeg-audio-ac3-bitrate: -``V4L2_CID_MPEG_AUDIO_AC3_BITRATE (enum v4l2_mpeg_audio_ac3_bitrate)`` +``V4L2_CID_MPEG_AUDIO_AC3_BITRATE`` + (enum) + +enum v4l2_mpeg_audio_ac3_bitrate - AC-3 bitrate. Possible values are: @@ -695,126 +491,53 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K`` - - - 32 kbit/s - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K`` - - - 40 kbit/s - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K`` - - - 48 kbit/s - - - .. row 4 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K`` - - - 56 kbit/s - - - .. row 5 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K`` - - - 64 kbit/s - - - .. row 6 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K`` - - - 80 kbit/s - - - .. row 7 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K`` - - - 96 kbit/s - - - .. row 8 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K`` - - - 112 kbit/s - - - .. row 9 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K`` - - - 128 kbit/s - - - .. row 10 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K`` - - - 160 kbit/s - - - .. row 11 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K`` - - - 192 kbit/s - - - .. row 12 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K`` - - - 224 kbit/s - - - .. row 13 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K`` - - - 256 kbit/s - - - .. row 14 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K`` - - - 320 kbit/s - - - .. row 15 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K`` - - - 384 kbit/s - - - .. row 16 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K`` - - - 448 kbit/s - - - .. row 17 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K`` - - - 512 kbit/s - - - .. row 18 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K`` - - - 576 kbit/s - - - .. row 19 - - - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K`` - - - 640 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_32K`` + - 32 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_40K`` + - 40 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_48K`` + - 48 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_56K`` + - 56 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_64K`` + - 64 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_80K`` + - 80 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_96K`` + - 96 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_112K`` + - 112 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_128K`` + - 128 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_160K`` + - 160 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_192K`` + - 192 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_224K`` + - 224 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_256K`` + - 256 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_320K`` + - 320 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_384K`` + - 384 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_448K`` + - 448 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_512K`` + - 512 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_576K`` + - 576 kbit/s + * - ``V4L2_MPEG_AUDIO_AC3_BITRATE_640K`` + - 640 kbit/s .. _v4l2-mpeg-audio-mode: -``V4L2_CID_MPEG_AUDIO_MODE (enum v4l2_mpeg_audio_mode)`` +``V4L2_CID_MPEG_AUDIO_MODE`` + (enum) + +enum v4l2_mpeg_audio_mode - MPEG Audio mode. Possible values are: @@ -823,36 +546,23 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_MODE_STEREO`` - - - Stereo - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO`` - - - Joint Stereo - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_MODE_DUAL`` - - - Bilingual - - - .. row 4 - - - ``V4L2_MPEG_AUDIO_MODE_MONO`` - - - Mono + * - ``V4L2_MPEG_AUDIO_MODE_STEREO`` + - Stereo + * - ``V4L2_MPEG_AUDIO_MODE_JOINT_STEREO`` + - Joint Stereo + * - ``V4L2_MPEG_AUDIO_MODE_DUAL`` + - Bilingual + * - ``V4L2_MPEG_AUDIO_MODE_MONO`` + - Mono .. _v4l2-mpeg-audio-mode-extension: -``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION (enum v4l2_mpeg_audio_mode_extension)`` +``V4L2_CID_MPEG_AUDIO_MODE_EXTENSION`` + (enum) + +enum v4l2_mpeg_audio_mode_extension - Joint Stereo audio mode extension. In Layer I and II they indicate which subbands are in intensity stereo. All other subbands are coded in stereo. Layer III is not (yet) supported. Possible values are: @@ -863,36 +573,23 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4`` - - - Subbands 4-31 in intensity stereo - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8`` - - - Subbands 8-31 in intensity stereo - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12`` - - - Subbands 12-31 in intensity stereo - - - .. row 4 - - - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16`` - - - Subbands 16-31 in intensity stereo + * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4`` + - Subbands 4-31 in intensity stereo + * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_8`` + - Subbands 8-31 in intensity stereo + * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_12`` + - Subbands 12-31 in intensity stereo + * - ``V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_16`` + - Subbands 16-31 in intensity stereo .. _v4l2-mpeg-audio-emphasis: -``V4L2_CID_MPEG_AUDIO_EMPHASIS (enum v4l2_mpeg_audio_emphasis)`` +``V4L2_CID_MPEG_AUDIO_EMPHASIS`` + (enum) + +enum v4l2_mpeg_audio_emphasis - Audio Emphasis. Possible values are: @@ -901,30 +598,21 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE`` - - - None - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS`` - - - 50/15 microsecond emphasis - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17`` - - - CCITT J.17 + * - ``V4L2_MPEG_AUDIO_EMPHASIS_NONE`` + - None + * - ``V4L2_MPEG_AUDIO_EMPHASIS_50_DIV_15_uS`` + - 50/15 microsecond emphasis + * - ``V4L2_MPEG_AUDIO_EMPHASIS_CCITT_J17`` + - CCITT J.17 .. _v4l2-mpeg-audio-crc: -``V4L2_CID_MPEG_AUDIO_CRC (enum v4l2_mpeg_audio_crc)`` +``V4L2_CID_MPEG_AUDIO_CRC`` + (enum) + +enum v4l2_mpeg_audio_crc - CRC method. Possible values are: @@ -933,18 +621,10 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_CRC_NONE`` - - - None - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_CRC_CRC16`` - - - 16 bit parity check + * - ``V4L2_MPEG_AUDIO_CRC_NONE`` + - None + * - ``V4L2_MPEG_AUDIO_CRC_CRC16`` + - 16 bit parity check @@ -956,63 +636,50 @@ Codec Control IDs .. _v4l2-mpeg-audio-dec-playback: -``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK (enum v4l2_mpeg_audio_dec_playback)`` +``V4L2_CID_MPEG_AUDIO_DEC_PLAYBACK`` + (enum) + +enum v4l2_mpeg_audio_dec_playback - Determines how monolingual audio should be played back. Possible values are: +.. tabularcolumns:: |p{9.0cm}|p{8.5cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO`` - - - Automatically determines the best playback mode. - - - .. row 2 - - - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO`` - - - Stereo playback. - - - .. row 3 - - - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT`` - - - Left channel playback. - - - .. row 4 - - - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT`` - - - Right channel playback. - - - .. row 5 - - - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO`` - - - Mono playback. - - - .. row 6 - - - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO`` - - - Stereo playback with swapped left and right channels. + * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_AUTO`` + - Automatically determines the best playback mode. + * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_STEREO`` + - Stereo playback. + * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_LEFT`` + - Left channel playback. + * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_RIGHT`` + - Right channel playback. + * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_MONO`` + - Mono playback. + * - ``V4L2_MPEG_AUDIO_DEC_PLAYBACK_SWAPPED_STEREO`` + - Stereo playback with swapped left and right channels. .. _v4l2-mpeg-audio-dec-multilingual-playback: -``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK (enum v4l2_mpeg_audio_dec_playback)`` +``V4L2_CID_MPEG_AUDIO_DEC_MULTILINGUAL_PLAYBACK`` + (enum) + +enum v4l2_mpeg_audio_dec_playback - Determines how multilingual audio should be played back. .. _v4l2-mpeg-video-encoding: -``V4L2_CID_MPEG_VIDEO_ENCODING (enum v4l2_mpeg_video_encoding)`` +``V4L2_CID_MPEG_VIDEO_ENCODING`` + (enum) + +enum v4l2_mpeg_video_encoding - MPEG Video encoding method. This control is specific to multiplexed MPEG streams. Possible values are: @@ -1022,30 +689,21 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1`` - - - MPEG-1 Video encoding - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2`` - - - MPEG-2 Video encoding - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC`` - - - MPEG-4 AVC (H.264) Video encoding + * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_1`` + - MPEG-1 Video encoding + * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_2`` + - MPEG-2 Video encoding + * - ``V4L2_MPEG_VIDEO_ENCODING_MPEG_4_AVC`` + - MPEG-4 AVC (H.264) Video encoding .. _v4l2-mpeg-video-aspect: -``V4L2_CID_MPEG_VIDEO_ASPECT (enum v4l2_mpeg_video_aspect)`` +``V4L2_CID_MPEG_VIDEO_ASPECT`` + (enum) + +enum v4l2_mpeg_video_aspect - Video aspect. Possible values are: @@ -1054,22 +712,10 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_ASPECT_1x1`` - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_ASPECT_4x3`` - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_ASPECT_16x9`` - - - .. row 4 - - - ``V4L2_MPEG_VIDEO_ASPECT_221x100`` + * - ``V4L2_MPEG_VIDEO_ASPECT_1x1`` + * - ``V4L2_MPEG_VIDEO_ASPECT_4x3`` + * - ``V4L2_MPEG_VIDEO_ASPECT_16x9`` + * - ``V4L2_MPEG_VIDEO_ASPECT_221x100`` @@ -1087,7 +733,10 @@ Codec Control IDs .. _v4l2-mpeg-video-bitrate-mode: -``V4L2_CID_MPEG_VIDEO_BITRATE_MODE (enum v4l2_mpeg_video_bitrate_mode)`` +``V4L2_CID_MPEG_VIDEO_BITRATE_MODE`` + (enum) + +enum v4l2_mpeg_video_bitrate_mode - Video bitrate mode. Possible values are: @@ -1096,18 +745,10 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR`` - - - Variable bitrate - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR`` - - - Constant bitrate + * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_VBR`` + - Variable bitrate + * - ``V4L2_MPEG_VIDEO_BITRATE_MODE_CBR`` + - Constant bitrate @@ -1138,30 +779,14 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - Bit 0:7 - - - V chrominance information - - - .. row 2 - - - Bit 8:15 - - - U chrominance information - - - .. row 3 - - - Bit 16:23 - - - Y luminance information - - - .. row 4 - - - Bit 24:31 - - - Must be zero. + * - Bit 0:7 + - V chrominance information + * - Bit 8:15 + - U chrominance information + * - Bit 16:23 + - Y luminance information + * - Bit 24:31 + - Must be zero. @@ -1191,7 +816,10 @@ Codec Control IDs .. _v4l2-mpeg-video-h264-vui-sar-idc: -``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC (enum v4l2_mpeg_video_h264_vui_sar_idc)`` +``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC`` + (enum) + +enum v4l2_mpeg_video_h264_vui_sar_idc - VUI sample aspect ratio indicator for H.264 encoding. The value is defined in the table E-1 in the standard. Applicable to the H264 encoder. @@ -1202,114 +830,42 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED`` - - - Unspecified - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1`` - - - 1x1 - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11`` - - - 12x11 - - - .. row 4 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11`` - - - 10x11 - - - .. row 5 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11`` - - - 16x11 - - - .. row 6 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33`` - - - 40x33 - - - .. row 7 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11`` - - - 24x11 - - - .. row 8 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11`` - - - 20x11 - - - .. row 9 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11`` - - - 32x11 - - - .. row 10 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33`` - - - 80x33 - - - .. row 11 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11`` - - - 18x11 - - - .. row 12 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11`` - - - 15x11 - - - .. row 13 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33`` - - - 64x33 - - - .. row 14 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99`` - - - 160x99 - - - .. row 15 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3`` - - - 4x3 - - - .. row 16 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2`` - - - 3x2 - - - .. row 17 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1`` - - - 2x1 - - - .. row 18 - - - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED`` - - - Extended SAR + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_UNSPECIFIED`` + - Unspecified + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_1x1`` + - 1x1 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_12x11`` + - 12x11 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_10x11`` + - 10x11 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_16x11`` + - 16x11 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_40x33`` + - 40x33 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_24x11`` + - 24x11 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_20x11`` + - 20x11 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_32x11`` + - 32x11 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_80x33`` + - 80x33 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_18x11`` + - 18x11 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_15x11`` + - 15x11 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_64x33`` + - 64x33 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_160x99`` + - 160x99 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_4x3`` + - 4x3 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_3x2`` + - 3x2 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1`` + - 2x1 + * - ``V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED`` + - Extended SAR @@ -1323,7 +879,10 @@ Codec Control IDs .. _v4l2-mpeg-video-h264-level: -``V4L2_CID_MPEG_VIDEO_H264_LEVEL (enum v4l2_mpeg_video_h264_level)`` +``V4L2_CID_MPEG_VIDEO_H264_LEVEL`` + (enum) + +enum v4l2_mpeg_video_h264_level - The level information for the H264 video elementary stream. Applicable to the H264 encoder. Possible values are: @@ -1333,108 +892,47 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0`` - - - Level 1.0 - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B`` - - - Level 1B - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1`` - - - Level 1.1 - - - .. row 4 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2`` - - - Level 1.2 - - - .. row 5 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3`` - - - Level 1.3 - - - .. row 6 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0`` - - - Level 2.0 - - - .. row 7 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1`` - - - Level 2.1 - - - .. row 8 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2`` - - - Level 2.2 - - - .. row 9 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0`` - - - Level 3.0 - - - .. row 10 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1`` - - - Level 3.1 - - - .. row 11 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2`` - - - Level 3.2 - - - .. row 12 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0`` - - - Level 4.0 - - - .. row 13 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1`` - - - Level 4.1 - - - .. row 14 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2`` - - - Level 4.2 - - - .. row 15 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0`` - - - Level 5.0 - - - .. row 16 - - - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1`` - - - Level 5.1 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_0`` + - Level 1.0 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1B`` + - Level 1B + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_1`` + - Level 1.1 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_2`` + - Level 1.2 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_1_3`` + - Level 1.3 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_0`` + - Level 2.0 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_1`` + - Level 2.1 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_2_2`` + - Level 2.2 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_0`` + - Level 3.0 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_1`` + - Level 3.1 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_3_2`` + - Level 3.2 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_0`` + - Level 4.0 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_1`` + - Level 4.1 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_4_2`` + - Level 4.2 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_0`` + - Level 5.0 + * - ``V4L2_MPEG_VIDEO_H264_LEVEL_5_1`` + - Level 5.1 .. _v4l2-mpeg-video-mpeg4-level: -``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL (enum v4l2_mpeg_video_mpeg4_level)`` +``V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL`` + (enum) + +enum v4l2_mpeg_video_mpeg4_level - The level information for the MPEG4 elementary stream. Applicable to the MPEG4 encoder. Possible values are: @@ -1444,60 +942,31 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_LEVEL_0`` - - - Level 0 - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_LEVEL_0B`` - - - Level 0b - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_LEVEL_1`` - - - Level 1 - - - .. row 4 - - - ``V4L2_MPEG_VIDEO_LEVEL_2`` - - - Level 2 - - - .. row 5 - - - ``V4L2_MPEG_VIDEO_LEVEL_3`` - - - Level 3 - - - .. row 6 - - - ``V4L2_MPEG_VIDEO_LEVEL_3B`` - - - Level 3b - - - .. row 7 - - - ``V4L2_MPEG_VIDEO_LEVEL_4`` - - - Level 4 - - - .. row 8 - - - ``V4L2_MPEG_VIDEO_LEVEL_5`` - - - Level 5 + * - ``V4L2_MPEG_VIDEO_LEVEL_0`` + - Level 0 + * - ``V4L2_MPEG_VIDEO_LEVEL_0B`` + - Level 0b + * - ``V4L2_MPEG_VIDEO_LEVEL_1`` + - Level 1 + * - ``V4L2_MPEG_VIDEO_LEVEL_2`` + - Level 2 + * - ``V4L2_MPEG_VIDEO_LEVEL_3`` + - Level 3 + * - ``V4L2_MPEG_VIDEO_LEVEL_3B`` + - Level 3b + * - ``V4L2_MPEG_VIDEO_LEVEL_4`` + - Level 4 + * - ``V4L2_MPEG_VIDEO_LEVEL_5`` + - Level 5 .. _v4l2-mpeg-video-h264-profile: -``V4L2_CID_MPEG_VIDEO_H264_PROFILE (enum v4l2_mpeg_video_h264_profile)`` +``V4L2_CID_MPEG_VIDEO_H264_PROFILE`` + (enum) + +enum v4l2_mpeg_video_h264_profile - The profile information for H264. Applicable to the H264 encoder. Possible values are: @@ -1507,114 +976,49 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE`` - - - Baseline profile - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE`` - - - Constrained Baseline profile - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN`` - - - Main profile - - - .. row 4 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED`` - - - Extended profile - - - .. row 5 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH`` - - - High profile - - - .. row 6 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10`` - - - High 10 profile - - - .. row 7 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422`` - - - High 422 profile - - - .. row 8 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE`` - - - High 444 Predictive profile - - - .. row 9 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA`` - - - High 10 Intra profile - - - .. row 10 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA`` - - - High 422 Intra profile - - - .. row 11 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA`` - - - High 444 Intra profile - - - .. row 12 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA`` - - - CAVLC 444 Intra profile - - - .. row 13 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE`` - - - Scalable Baseline profile - - - .. row 14 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH`` - - - Scalable High profile - - - .. row 15 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA`` - - - Scalable High Intra profile - - - .. row 16 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH`` - - - Stereo High profile - - - .. row 17 - - - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH`` - - - Multiview High profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE`` + - Baseline profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CONSTRAINED_BASELINE`` + - Constrained Baseline profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MAIN`` + - Main profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_EXTENDED`` + - Extended profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH`` + - High profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10`` + - High 10 profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422`` + - High 422 profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_PREDICTIVE`` + - High 444 Predictive profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10_INTRA`` + - High 10 Intra profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_422_INTRA`` + - High 422 Intra profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_444_INTRA`` + - High 444 Intra profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_CAVLC_444_INTRA`` + - CAVLC 444 Intra profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_BASELINE`` + - Scalable Baseline profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH`` + - Scalable High profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_SCALABLE_HIGH_INTRA`` + - Scalable High Intra profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_STEREO_HIGH`` + - Stereo High profile + * - ``V4L2_MPEG_VIDEO_H264_PROFILE_MULTIVIEW_HIGH`` + - Multiview High profile .. _v4l2-mpeg-video-mpeg4-profile: -``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE (enum v4l2_mpeg_video_mpeg4_profile)`` +``V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE`` + (enum) + +enum v4l2_mpeg_video_mpeg4_profile - The profile information for MPEG4. Applicable to the MPEG4 encoder. Possible values are: @@ -1624,36 +1028,16 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_PROFILE_SIMPLE`` - - - Simple profile - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_PROFILE_ADVANCED_SIMPLE`` - - - Advanced Simple profile - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_PROFILE_CORE`` - - - Core profile - - - .. row 4 - - - ``V4L2_MPEG_VIDEO_PROFILE_SIMPLE_SCALABLE`` - - - Simple Scalable profile - - - .. row 5 - - - ``V4L2_MPEG_VIDEO_PROFILE_ADVANCED_CODING_EFFICIENCY`` - - - + * - ``V4L2_MPEG_VIDEO_PROFILE_SIMPLE`` + - Simple profile + * - ``V4L2_MPEG_VIDEO_PROFILE_ADVANCED_SIMPLE`` + - Advanced Simple profile + * - ``V4L2_MPEG_VIDEO_PROFILE_CORE`` + - Core profile + * - ``V4L2_MPEG_VIDEO_PROFILE_SIMPLE_SCALABLE`` + - Simple Scalable profile + * - ``V4L2_MPEG_VIDEO_PROFILE_ADVANCED_CODING_EFFICIENCY`` + - @@ -1663,34 +1047,27 @@ Codec Control IDs .. _v4l2-mpeg-video-multi-slice-mode: -``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE (enum v4l2_mpeg_video_multi_slice_mode)`` +``V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE`` + (enum) + +enum v4l2_mpeg_video_multi_slice_mode - Determines how the encoder should handle division of frame into slices. Applicable to the encoder. Possible values are: +.. tabularcolumns:: |p{8.7cm}|p{8.8cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE`` - - - Single slice per frame. - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB`` - - - Multiple slices with set maximum number of macroblocks per slice. - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES`` - - - Multiple slice with set maximum size in bytes per slice. + * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_SINGLE`` + - Single slice per frame. + * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_MB`` + - Multiple slices with set maximum number of macroblocks per slice. + * - ``V4L2_MPEG_VIDEO_MULTI_SLICE_MODE_MAX_BYTES`` + - Multiple slice with set maximum size in bytes per slice. @@ -1708,33 +1085,26 @@ Codec Control IDs .. _v4l2-mpeg-video-h264-loop-filter-mode: -``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE (enum v4l2_mpeg_video_h264_loop_filter_mode)`` +``V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE`` + (enum) + +enum v4l2_mpeg_video_h264_loop_filter_mode - Loop filter mode for H264 encoder. Possible values are: +.. tabularcolumns:: |p{14.0cm}|p{3.5cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED`` - - - Loop filter is enabled. - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED`` - - - Loop filter is disabled. - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY`` - - - Loop filter is disabled at the slice boundary. + * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_ENABLED`` + - Loop filter is enabled. + * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED`` + - Loop filter is disabled. + * - ``V4L2_MPEG_VIDEO_H264_LOOP_FILTER_MODE_DISABLED_AT_SLICE_BOUNDARY`` + - Loop filter is disabled at the slice boundary. @@ -1748,7 +1118,10 @@ Codec Control IDs .. _v4l2-mpeg-video-h264-entropy-mode: -``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE (enum v4l2_mpeg_video_h264_entropy_mode)`` +``V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE`` + (enum) + +enum v4l2_mpeg_video_h264_entropy_mode - Entropy coding mode for H264 - CABAC/CAVALC. Applicable to the H264 encoder. Possible values are: @@ -1758,18 +1131,10 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC`` - - - Use CAVLC entropy coding. - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC`` - - - Use CABAC entropy coding. + * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CAVLC`` + - Use CAVLC entropy coding. + * - ``V4L2_MPEG_VIDEO_H264_ENTROPY_MODE_CABAC`` + - Use CABAC entropy coding. @@ -1909,30 +1274,27 @@ Codec Control IDs .. _v4l2-mpeg-video-header-mode: -``V4L2_CID_MPEG_VIDEO_HEADER_MODE (enum v4l2_mpeg_video_header_mode)`` +``V4L2_CID_MPEG_VIDEO_HEADER_MODE`` + (enum) + +enum v4l2_mpeg_video_header_mode - Determines whether the header is returned as the first buffer or is it returned together with the first frame. Applicable to encoders. Possible values are: +.. tabularcolumns:: |p{10.3cm}|p{7.2cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE`` - - - The stream header is returned separately in the first buffer. - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME`` - - - The stream header is returned together with the first encoded - frame. + * - ``V4L2_MPEG_VIDEO_HEADER_MODE_SEPARATE`` + - The stream header is returned separately in the first buffer. + * - ``V4L2_MPEG_VIDEO_HEADER_MODE_JOINED_WITH_1ST_FRAME`` + - The stream header is returned together with the first encoded + frame. @@ -1965,52 +1327,31 @@ Codec Control IDs .. _v4l2-mpeg-video-h264-sei-fp-arrangement-type: -``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (enum v4l2_mpeg_video_h264_sei_fp_arrangement_type)`` +``V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE`` + (enum) + +enum v4l2_mpeg_video_h264_sei_fp_arrangement_type - Frame packing arrangement type for H264 SEI. Applicable to the H264 encoder. Possible values are: - +.. tabularcolumns:: |p{12cm}|p{5.5cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD`` - - - Pixels are alternatively from L and R. - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN`` - - - L and R are interlaced by column. - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW`` - - - L and R are interlaced by row. - - - .. row 4 - - - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE`` - - - L is on the left, R on the right. - - - .. row 5 - - - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM`` - - - L is on top, R on bottom. - - - .. row 6 - - - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL`` - - - One view per frame. + * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHEKERBOARD`` + - Pixels are alternatively from L and R. + * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN`` + - L and R are interlaced by column. + * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW`` + - L and R are interlaced by row. + * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE`` + - L is on the left, R on the right. + * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM`` + - L is on top, R on bottom. + * - ``V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL`` + - One view per frame. @@ -2021,61 +1362,36 @@ Codec Control IDs .. _v4l2-mpeg-video-h264-fmo-map-type: -``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE (enum v4l2_mpeg_video_h264_fmo_map_type)`` +``V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE`` + (enum) + +enum v4l2_mpeg_video_h264_fmo_map_type - When using FMO, the map type divides the image in different scan patterns of macroblocks. Applicable to the H264 encoder. Possible values are: - +.. tabularcolumns:: |p{12.5cm}|p{5.0cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES`` - - - Slices are interleaved one after other with macroblocks in run - length order. - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES`` - - - Scatters the macroblocks based on a mathematical function known to - both encoder and decoder. - - - .. row 3 - - - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER`` - - - Macroblocks arranged in rectangular areas or regions of interest. - - - .. row 4 - - - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT`` - - - Slice groups grow in a cyclic way from centre to outwards. - - - .. row 5 - - - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN`` - - - Slice groups grow in raster scan pattern from left to right. - - - .. row 6 - - - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN`` - - - Slice groups grow in wipe scan pattern from top to bottom. - - - .. row 7 - - - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT`` - - - User defined map type. + * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES`` + - Slices are interleaved one after other with macroblocks in run + length order. + * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES`` + - Scatters the macroblocks based on a mathematical function known to + both encoder and decoder. + * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER`` + - Macroblocks arranged in rectangular areas or regions of interest. + * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT`` + - Slice groups grow in a cyclic way from centre to outwards. + * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN`` + - Slice groups grow in raster scan pattern from left to right. + * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN`` + - Slice groups grow in wipe scan pattern from top to bottom. + * - ``V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT`` + - User defined map type. @@ -2084,7 +1400,10 @@ Codec Control IDs .. _v4l2-mpeg-video-h264-fmo-change-direction: -``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (enum v4l2_mpeg_video_h264_fmo_change_dir)`` +``V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION`` + (enum) + +enum v4l2_mpeg_video_h264_fmo_change_dir - Specifies a direction of the slice group change for raster and wipe maps. Applicable to the H264 encoder. Possible values are: @@ -2094,18 +1413,10 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT`` - - - Raster scan or wipe right. - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT`` - - - Reverse raster scan or wipe left. + * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT`` + - Raster scan or wipe right. + * - ``V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT`` + - Reverse raster scan or wipe left. @@ -2132,18 +1443,10 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - Bit 0:15 - - - Slice ID - - - .. row 2 - - - Bit 16:32 - - - Slice position or order + * - Bit 0:15 + - Slice ID + * - Bit 16:32 + - Slice position or order @@ -2152,7 +1455,10 @@ Codec Control IDs .. _v4l2-mpeg-video-h264-hierarchical-coding-type: -``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (enum v4l2_mpeg_video_h264_hierarchical_coding_type)`` +``V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE`` + (enum) + +enum v4l2_mpeg_video_h264_hierarchical_coding_type - Specifies the hierarchical coding type. Applicable to the H264 encoder. Possible values are: @@ -2162,18 +1468,10 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B`` - - - Hierarchical B coding. - - - .. row 2 - - - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P`` - - - Hierarchical P coding. + * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B`` + - Hierarchical B coding. + * - ``V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P`` + - Hierarchical P coding. @@ -2192,18 +1490,10 @@ Codec Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - Bit 0:15 - - - QP value - - - .. row 2 - - - Bit 16:32 - - - Layer number + * - Bit 0:15 + - QP value + * - Bit 16:32 + - Layer number @@ -2255,30 +1545,14 @@ MFC 5.1 Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - Bit 0:7 - - - V chrominance information - - - .. row 2 - - - Bit 8:15 - - - U chrominance information - - - .. row 3 - - - Bit 16:23 - - - Y luminance information - - - .. row 4 - - - Bit 24:31 - - - Must be zero. + * - Bit 0:7 + - V chrominance information + * - Bit 8:15 + - U chrominance information + * - Bit 16:23 + - Y luminance information + * - Bit 24:31 + - Must be zero. @@ -2321,38 +1595,30 @@ MFC 5.1 Control IDs .. _v4l2-mpeg-mfc51-video-frame-skip-mode: -``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE (enum v4l2_mpeg_mfc51_video_frame_skip_mode)`` +``V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE`` + (enum) + +enum v4l2_mpeg_mfc51_video_frame_skip_mode - Indicates in what conditions the encoder should skip frames. If encoding a frame would cause the encoded stream to be larger then a chosen data limit then the frame will be skipped. Possible values are: +.. tabularcolumns:: |p{9.0cm}|p{8.5cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED`` - - - Frame skip mode is disabled. - - - .. row 2 - - - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT`` - - - Frame skip mode enabled and buffer limit is set by the chosen - level and is defined by the standard. - - - .. row 3 - - - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT`` - - - Frame skip mode enabled and buffer limit is set by the VBV - (MPEG1/2/4) or CPB (H264) buffer size control. + * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_DISABLED`` + - Frame skip mode is disabled. + * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_LEVEL_LIMIT`` + - Frame skip mode enabled and buffer limit is set by the chosen + level and is defined by the standard. + * - ``V4L2_MPEG_MFC51_FRAME_SKIP_MODE_BUF_LIMIT`` + - Frame skip mode enabled and buffer limit is set by the VBV + (MPEG1/2/4) or CPB (H264) buffer size control. @@ -2370,7 +1636,10 @@ MFC 5.1 Control IDs .. _v4l2-mpeg-mfc51-video-force-frame-type: -``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE (enum v4l2_mpeg_mfc51_video_force_frame_type)`` +``V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE`` + (enum) + +enum v4l2_mpeg_mfc51_video_force_frame_type - Force a frame type for the next queued buffer. Applicable to encoders. Possible values are: @@ -2380,24 +1649,12 @@ MFC 5.1 Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED`` - - - Forcing a specific frame type disabled. - - - .. row 2 - - - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME`` - - - Force an I-frame. - - - .. row 3 - - - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED`` - - - Force a non-coded frame. + * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_DISABLED`` + - Forcing a specific frame type disabled. + * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_I_FRAME`` + - Force an I-frame. + * - ``V4L2_MPEG_MFC51_FORCE_FRAME_TYPE_NOT_CODED`` + - Force a non-coded frame. @@ -2416,7 +1673,10 @@ CX2341x Control IDs .. _v4l2-mpeg-cx2341x-video-spatial-filter-mode: -``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (enum v4l2_mpeg_cx2341x_video_spatial_filter_mode)`` +``V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE`` + (enum) + +enum v4l2_mpeg_cx2341x_video_spatial_filter_mode - Sets the Spatial Filter mode (default ``MANUAL``). Possible values are: @@ -2426,18 +1686,10 @@ CX2341x Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL`` - - - Choose the filter manually - - - .. row 2 - - - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO`` - - - Choose the filter automatically + * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL`` + - Choose the filter manually + * - ``V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_AUTO`` + - Choose the filter automatically @@ -2447,52 +1699,40 @@ CX2341x Control IDs .. _luma-spatial-filter-type: -``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE (enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type)`` +``V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE`` + (enum) + +enum v4l2_mpeg_cx2341x_video_luma_spatial_filter_type - Select the algorithm to use for the Luma Spatial Filter (default ``1D_HOR``). Possible values: +.. tabularcolumns:: |p{14.5cm}|p{3.0cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF`` - - - No filter - - - .. row 2 - - - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR`` - - - One-dimensional horizontal - - - .. row 3 - - - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT`` - - - One-dimensional vertical - - - .. row 4 - - - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE`` - - - Two-dimensional separable - - - .. row 5 - - - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE`` - - - Two-dimensional symmetrical non-separable + * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_OFF`` + - No filter + * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_HOR`` + - One-dimensional horizontal + * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_1D_VERT`` + - One-dimensional vertical + * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_HV_SEPARABLE`` + - Two-dimensional separable + * - ``V4L2_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE_2D_SYM_NON_SEPARABLE`` + - Two-dimensional symmetrical non-separable .. _chroma-spatial-filter-type: -``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE (enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type)`` +``V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE`` + (enum) + +enum v4l2_mpeg_cx2341x_video_chroma_spatial_filter_type - Select the algorithm for the Chroma Spatial Filter (default ``1D_HOR``). Possible values are: @@ -2502,24 +1742,19 @@ CX2341x Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF`` - - - No filter - - - .. row 2 - - - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR`` - - - One-dimensional horizontal + * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_OFF`` + - No filter + * - ``V4L2_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE_1D_HOR`` + - One-dimensional horizontal .. _v4l2-mpeg-cx2341x-video-temporal-filter-mode: -``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE (enum v4l2_mpeg_cx2341x_video_temporal_filter_mode)`` +``V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE`` + (enum) + +enum v4l2_mpeg_cx2341x_video_temporal_filter_mode - Sets the Temporal Filter mode (default ``MANUAL``). Possible values are: @@ -2529,18 +1764,10 @@ CX2341x Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL`` - - - Choose the filter manually - - - .. row 2 - - - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO`` - - - Choose the filter automatically + * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_MANUAL`` + - Choose the filter manually + * - ``V4L2_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE_AUTO`` + - Choose the filter automatically @@ -2550,7 +1777,10 @@ CX2341x Control IDs .. _v4l2-mpeg-cx2341x-video-median-filter-type: -``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE (enum v4l2_mpeg_cx2341x_video_median_filter_type)`` +``V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE`` + (enum) + +enum v4l2_mpeg_cx2341x_video_median_filter_type - Median Filter Type (default ``OFF``). Possible values are: @@ -2559,36 +1789,16 @@ CX2341x Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF`` - - - No filter - - - .. row 2 - - - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR`` - - - Horizontal filter - - - .. row 3 - - - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT`` - - - Vertical filter - - - .. row 4 - - - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT`` - - - Horizontal and vertical filter - - - .. row 5 - - - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG`` - - - Diagonal filter + * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_OFF`` + - No filter + * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR`` + - Horizontal filter + * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_VERT`` + - Vertical filter + * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_HOR_VERT`` + - Horizontal and vertical filter + * - ``V4L2_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE_DIAG`` + - Diagonal filter @@ -2631,7 +1841,10 @@ VPX Control IDs .. _v4l2-vpx-num-partitions: -``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS (enum v4l2_vp8_num_partitions)`` +``V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS`` + (enum) + +enum v4l2_vp8_num_partitions - The number of token partitions to use in VP8 encoder. Possible values are: @@ -2641,30 +1854,14 @@ VPX Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION`` - - - 1 coefficient partition - - - .. row 2 - - - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS`` - - - 2 coefficient partitions - - - .. row 3 - - - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS`` - - - 4 coefficient partitions - - - .. row 4 - - - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS`` - - - 8 coefficient partitions + * - ``V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION`` + - 1 coefficient partition + * - ``V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS`` + - 2 coefficient partitions + * - ``V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS`` + - 4 coefficient partitions + * - ``V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS`` + - 8 coefficient partitions @@ -2673,37 +1870,28 @@ VPX Control IDs .. _v4l2-vpx-num-ref-frames: -``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES (enum v4l2_vp8_num_ref_frames)`` +``V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES`` + (enum) + +enum v4l2_vp8_num_ref_frames - The number of reference pictures for encoding P frames. Possible values are: - +.. tabularcolumns:: |p{7.9cm}|p{9.6cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME`` - - - Last encoded frame will be searched - - - .. row 2 - - - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME`` - - - Two frames will be searched among the last encoded frame, the - golden frame and the alternate reference (altref) frame. The - encoder implementation will decide which two are chosen. - - - .. row 3 - - - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME`` - - - The last encoded frame, the golden frame and the altref frame will - be searched. + * - ``V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME`` + - Last encoded frame will be searched + * - ``V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME`` + - Two frames will be searched among the last encoded frame, the + golden frame and the alternate reference (altref) frame. The + encoder implementation will decide which two are chosen. + * - ``V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME`` + - The last encoded frame, the golden frame and the altref frame will + be searched. @@ -2726,31 +1914,33 @@ VPX Control IDs .. _v4l2-vpx-golden-frame-sel: -``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL (enum v4l2_vp8_golden_frame_sel)`` +``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL`` + (enum) + +enum v4l2_vp8_golden_frame_sel - Selects the golden frame for encoding. Possible values are: +.. raw:: latex + \begin{adjustbox}{width=\columnwidth} + +.. tabularcolumns:: |p{11.0cm}|p{10.0cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 + * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV`` + - Use the (n-2)th frame as a golden frame, current frame index being + 'n'. + * - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD`` + - Use the previous specific frame indicated by + ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD`` as a + golden frame. - - .. row 1 - - - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV`` - - - Use the (n-2)th frame as a golden frame, current frame index being - 'n'. - - - .. row 2 - - - ``V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD`` - - - Use the previous specific frame indicated by - V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD as a - golden frame. +.. raw:: latex + \end{adjustbox} ``V4L2_CID_MPEG_VIDEO_VPX_MIN_QP (integer)`` @@ -2791,7 +1981,10 @@ Camera Control IDs .. _v4l2-exposure-auto-type: -``V4L2_CID_EXPOSURE_AUTO (enum v4l2_exposure_auto_type)`` +``V4L2_CID_EXPOSURE_AUTO`` + (enum) + +enum v4l2_exposure_auto_type - Enables automatic adjustments of the exposure time and/or iris aperture. The effect of manual changes of the exposure time or iris aperture while these features are enabled is undefined, drivers @@ -2803,30 +1996,14 @@ Camera Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_EXPOSURE_AUTO`` - - - Automatic exposure time, automatic iris aperture. - - - .. row 2 - - - ``V4L2_EXPOSURE_MANUAL`` - - - Manual exposure time, manual iris. - - - .. row 3 - - - ``V4L2_EXPOSURE_SHUTTER_PRIORITY`` - - - Manual exposure time, auto iris. - - - .. row 4 - - - ``V4L2_EXPOSURE_APERTURE_PRIORITY`` - - - Auto exposure time, manual iris. + * - ``V4L2_EXPOSURE_AUTO`` + - Automatic exposure time, automatic iris aperture. + * - ``V4L2_EXPOSURE_MANUAL`` + - Manual exposure time, manual iris. + * - ``V4L2_EXPOSURE_SHUTTER_PRIORITY`` + - Manual exposure time, auto iris. + * - ``V4L2_EXPOSURE_APERTURE_PRIORITY`` + - Auto exposure time, manual iris. @@ -2856,45 +2033,32 @@ Camera Control IDs .. _v4l2-exposure-metering: -``V4L2_CID_EXPOSURE_METERING (enum v4l2_exposure_metering)`` +``V4L2_CID_EXPOSURE_METERING`` + (enum) + +enum v4l2_exposure_metering - Determines how the camera measures the amount of light available for the frame exposure. Possible values are: - +.. tabularcolumns:: |p{8.5cm}|p{9.0cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_EXPOSURE_METERING_AVERAGE`` - - - Use the light information coming from the entire frame and average - giving no weighting to any particular portion of the metered area. - - - .. row 2 - - - ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED`` - - - Average the light information coming from the entire frame giving - priority to the center of the metered area. - - - .. row 3 - - - ``V4L2_EXPOSURE_METERING_SPOT`` - - - Measure only very small area at the center of the frame. - - - .. row 4 - - - ``V4L2_EXPOSURE_METERING_MATRIX`` - - - A multi-zone metering. The light intensity is measured in several - points of the frame and the results are combined. The algorithm of - the zones selection and their significance in calculating the - final value is device dependent. + * - ``V4L2_EXPOSURE_METERING_AVERAGE`` + - Use the light information coming from the entire frame and average + giving no weighting to any particular portion of the metered area. + * - ``V4L2_EXPOSURE_METERING_CENTER_WEIGHTED`` + - Average the light information coming from the entire frame giving + priority to the center of the metered area. + * - ``V4L2_EXPOSURE_METERING_SPOT`` + - Measure only very small area at the center of the frame. + * - ``V4L2_EXPOSURE_METERING_MATRIX`` + - A multi-zone metering. The light intensity is measured in several + points of the frame and the results are combined. The algorithm of + the zones selection and their significance in calculating the + final value is device dependent. @@ -2968,77 +2132,48 @@ Camera Control IDs control may stop updates of the ``V4L2_CID_AUTO_FOCUS_STATUS`` control value. - +.. tabularcolumns:: |p{6.5cm}|p{11.0cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_AUTO_FOCUS_STATUS_IDLE`` - - - Automatic focus is not active. - - - .. row 2 - - - ``V4L2_AUTO_FOCUS_STATUS_BUSY`` - - - Automatic focusing is in progress. - - - .. row 3 - - - ``V4L2_AUTO_FOCUS_STATUS_REACHED`` - - - Focus has been reached. - - - .. row 4 - - - ``V4L2_AUTO_FOCUS_STATUS_FAILED`` - - - Automatic focus has failed, the driver will not transition from - this state until another action is performed by an application. + * - ``V4L2_AUTO_FOCUS_STATUS_IDLE`` + - Automatic focus is not active. + * - ``V4L2_AUTO_FOCUS_STATUS_BUSY`` + - Automatic focusing is in progress. + * - ``V4L2_AUTO_FOCUS_STATUS_REACHED`` + - Focus has been reached. + * - ``V4L2_AUTO_FOCUS_STATUS_FAILED`` + - Automatic focus has failed, the driver will not transition from + this state until another action is performed by an application. .. _v4l2-auto-focus-range: -``V4L2_CID_AUTO_FOCUS_RANGE (enum v4l2_auto_focus_range)`` - Determines auto focus distance range for which lens may be adjusted. +``V4L2_CID_AUTO_FOCUS_RANGE`` + (enum) +enum v4l2_auto_focus_range - + Determines auto focus distance range for which lens may be adjusted. +.. tabularcolumns:: |p{6.5cm}|p{11.0cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_AUTO_FOCUS_RANGE_AUTO`` - - - The camera automatically selects the focus range. - - - .. row 2 - - - ``V4L2_AUTO_FOCUS_RANGE_NORMAL`` - - - Normal distance range, limited for best automatic focus - performance. - - - .. row 3 - - - ``V4L2_AUTO_FOCUS_RANGE_MACRO`` - - - Macro (close-up) auto focus. The camera will use its minimum - possible distance for auto focus. - - - .. row 4 - - - ``V4L2_AUTO_FOCUS_RANGE_INFINITY`` - - - The lens is set to focus on an object at infinite distance. + * - ``V4L2_AUTO_FOCUS_RANGE_AUTO`` + - The camera automatically selects the focus range. + * - ``V4L2_AUTO_FOCUS_RANGE_NORMAL`` + - Normal distance range, limited for best automatic focus + performance. + * - ``V4L2_AUTO_FOCUS_RANGE_MACRO`` + - Macro (close-up) auto focus. The camera will use its minimum + possible distance for auto focus. + * - ``V4L2_AUTO_FOCUS_RANGE_INFINITY`` + - The lens is set to focus on an object at infinite distance. @@ -3088,90 +2223,53 @@ Camera Control IDs .. _v4l2-auto-n-preset-white-balance: -``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE (enum v4l2_auto_n_preset_white_balance)`` +``V4L2_CID_AUTO_N_PRESET_WHITE_BALANCE`` + (enum) + +enum v4l2_auto_n_preset_white_balance - Sets white balance to automatic, manual or a preset. The presets determine color temperature of the light as a hint to the camera for white balance adjustments resulting in most accurate color representation. The following white balance presets are listed in order of increasing color temperature. - +.. tabularcolumns:: |p{7.0 cm}|p{10.5cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_WHITE_BALANCE_MANUAL`` - - - Manual white balance. - - - .. row 2 - - - ``V4L2_WHITE_BALANCE_AUTO`` - - - Automatic white balance adjustments. - - - .. row 3 - - - ``V4L2_WHITE_BALANCE_INCANDESCENT`` - - - White balance setting for incandescent (tungsten) lighting. It - generally cools down the colors and corresponds approximately to - 2500...3500 K color temperature range. - - - .. row 4 - - - ``V4L2_WHITE_BALANCE_FLUORESCENT`` - - - White balance preset for fluorescent lighting. It corresponds - approximately to 4000...5000 K color temperature. - - - .. row 5 - - - ``V4L2_WHITE_BALANCE_FLUORESCENT_H`` - - - With this setting the camera will compensate for fluorescent H - lighting. - - - .. row 6 - - - ``V4L2_WHITE_BALANCE_HORIZON`` - - - White balance setting for horizon daylight. It corresponds - approximately to 5000 K color temperature. - - - .. row 7 - - - ``V4L2_WHITE_BALANCE_DAYLIGHT`` - - - White balance preset for daylight (with clear sky). It corresponds - approximately to 5000...6500 K color temperature. - - - .. row 8 - - - ``V4L2_WHITE_BALANCE_FLASH`` - - - With this setting the camera will compensate for the flash light. - It slightly warms up the colors and corresponds roughly to - 5000...5500 K color temperature. - - - .. row 9 - - - ``V4L2_WHITE_BALANCE_CLOUDY`` - - - White balance preset for moderately overcast sky. This option - corresponds approximately to 6500...8000 K color temperature - range. - - - .. row 10 - - - ``V4L2_WHITE_BALANCE_SHADE`` - - - White balance preset for shade or heavily overcast sky. It - corresponds approximately to 9000...10000 K color temperature. + * - ``V4L2_WHITE_BALANCE_MANUAL`` + - Manual white balance. + * - ``V4L2_WHITE_BALANCE_AUTO`` + - Automatic white balance adjustments. + * - ``V4L2_WHITE_BALANCE_INCANDESCENT`` + - White balance setting for incandescent (tungsten) lighting. It + generally cools down the colors and corresponds approximately to + 2500...3500 K color temperature range. + * - ``V4L2_WHITE_BALANCE_FLUORESCENT`` + - White balance preset for fluorescent lighting. It corresponds + approximately to 4000...5000 K color temperature. + * - ``V4L2_WHITE_BALANCE_FLUORESCENT_H`` + - With this setting the camera will compensate for fluorescent H + lighting. + * - ``V4L2_WHITE_BALANCE_HORIZON`` + - White balance setting for horizon daylight. It corresponds + approximately to 5000 K color temperature. + * - ``V4L2_WHITE_BALANCE_DAYLIGHT`` + - White balance preset for daylight (with clear sky). It corresponds + approximately to 5000...6500 K color temperature. + * - ``V4L2_WHITE_BALANCE_FLASH`` + - With this setting the camera will compensate for the flash light. + It slightly warms up the colors and corresponds roughly to + 5000...5500 K color temperature. + * - ``V4L2_WHITE_BALANCE_CLOUDY`` + - White balance preset for moderately overcast sky. This option + corresponds approximately to 6500...8000 K color temperature + range. + * - ``V4L2_WHITE_BALANCE_SHADE`` + - White balance preset for shade or heavily overcast sky. It + corresponds approximately to 9000...10000 K color temperature. @@ -3205,7 +2303,10 @@ Camera Control IDs .. _v4l2-iso-sensitivity-auto-type: -``V4L2_CID_ISO_SENSITIVITY_AUTO (enum v4l2_iso_sensitivity_type)`` +``V4L2_CID_ISO_SENSITIVITY_AUTO`` + (enum) + +enum v4l2_iso_sensitivity_type - Enables or disables automatic ISO sensitivity adjustments. @@ -3214,24 +2315,19 @@ Camera Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_CID_ISO_SENSITIVITY_MANUAL`` - - - Manual ISO sensitivity. - - - .. row 2 - - - ``V4L2_CID_ISO_SENSITIVITY_AUTO`` - - - Automatic ISO sensitivity adjustments. + * - ``V4L2_CID_ISO_SENSITIVITY_MANUAL`` + - Manual ISO sensitivity. + * - ``V4L2_CID_ISO_SENSITIVITY_AUTO`` + - Automatic ISO sensitivity adjustments. .. _v4l2-scene-mode: -``V4L2_CID_SCENE_MODE (enum v4l2_scene_mode)`` +``V4L2_CID_SCENE_MODE`` + (enum) + +enum v4l2_scene_mode - This control allows to select scene programs as the camera automatic modes optimized for common shooting scenes. Within these modes the camera determines best exposure, aperture, focusing, light metering, @@ -3243,133 +2339,77 @@ Camera Control IDs to ``V4L2_SCENE_MODE_NONE`` to make sure the other possibly related controls are accessible. The following scene programs are defined: - +.. tabularcolumns:: |p{6.0cm}|p{11.5cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_SCENE_MODE_NONE`` - - - The scene mode feature is disabled. - - - .. row 2 - - - ``V4L2_SCENE_MODE_BACKLIGHT`` - - - Backlight. Compensates for dark shadows when light is coming from - behind a subject, also by automatically turning on the flash. - - - .. row 3 - - - ``V4L2_SCENE_MODE_BEACH_SNOW`` - - - Beach and snow. This mode compensates for all-white or bright - scenes, which tend to look gray and low contrast, when camera's - automatic exposure is based on an average scene brightness. To - compensate, this mode automatically slightly overexposes the - frames. The white balance may also be adjusted to compensate for - the fact that reflected snow looks bluish rather than white. - - - .. row 4 - - - ``V4L2_SCENE_MODE_CANDLELIGHT`` - - - Candle light. The camera generally raises the ISO sensitivity and - lowers the shutter speed. This mode compensates for relatively - close subject in the scene. The flash is disabled in order to - preserve the ambiance of the light. - - - .. row 5 - - - ``V4L2_SCENE_MODE_DAWN_DUSK`` - - - Dawn and dusk. Preserves the colors seen in low natural light - before dusk and after down. The camera may turn off the flash, and - automatically focus at infinity. It will usually boost saturation - and lower the shutter speed. - - - .. row 6 - - - ``V4L2_SCENE_MODE_FALL_COLORS`` - - - Fall colors. Increases saturation and adjusts white balance for - color enhancement. Pictures of autumn leaves get saturated reds - and yellows. - - - .. row 7 - - - ``V4L2_SCENE_MODE_FIREWORKS`` - - - Fireworks. Long exposure times are used to capture the expanding - burst of light from a firework. The camera may invoke image - stabilization. - - - .. row 8 - - - ``V4L2_SCENE_MODE_LANDSCAPE`` - - - Landscape. The camera may choose a small aperture to provide deep - depth of field and long exposure duration to help capture detail - in dim light conditions. The focus is fixed at infinity. Suitable - for distant and wide scenery. - - - .. row 9 - - - ``V4L2_SCENE_MODE_NIGHT`` - - - Night, also known as Night Landscape. Designed for low light - conditions, it preserves detail in the dark areas without blowing - out bright objects. The camera generally sets itself to a - medium-to-high ISO sensitivity, with a relatively long exposure - time, and turns flash off. As such, there will be increased image - noise and the possibility of blurred image. - - - .. row 10 - - - ``V4L2_SCENE_MODE_PARTY_INDOOR`` - - - Party and indoor. Designed to capture indoor scenes that are lit - by indoor background lighting as well as the flash. The camera - usually increases ISO sensitivity, and adjusts exposure for the - low light conditions. - - - .. row 11 - - - ``V4L2_SCENE_MODE_PORTRAIT`` - - - Portrait. The camera adjusts the aperture so that the depth of - field is reduced, which helps to isolate the subject against a - smooth background. Most cameras recognize the presence of faces in - the scene and focus on them. The color hue is adjusted to enhance - skin tones. The intensity of the flash is often reduced. - - - .. row 12 - - - ``V4L2_SCENE_MODE_SPORTS`` - - - Sports. Significantly increases ISO and uses a fast shutter speed - to freeze motion of rapidly-moving subjects. Increased image noise - may be seen in this mode. - - - .. row 13 - - - ``V4L2_SCENE_MODE_SUNSET`` - - - Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps - up the saturation. - - - .. row 14 - - - ``V4L2_SCENE_MODE_TEXT`` - - - Text. It applies extra contrast and sharpness, it is typically a - black-and-white mode optimized for readability. Automatic focus - may be switched to close-up mode and this setting may also involve - some lens-distortion correction. + * - ``V4L2_SCENE_MODE_NONE`` + - The scene mode feature is disabled. + * - ``V4L2_SCENE_MODE_BACKLIGHT`` + - Backlight. Compensates for dark shadows when light is coming from + behind a subject, also by automatically turning on the flash. + * - ``V4L2_SCENE_MODE_BEACH_SNOW`` + - Beach and snow. This mode compensates for all-white or bright + scenes, which tend to look gray and low contrast, when camera's + automatic exposure is based on an average scene brightness. To + compensate, this mode automatically slightly overexposes the + frames. The white balance may also be adjusted to compensate for + the fact that reflected snow looks bluish rather than white. + * - ``V4L2_SCENE_MODE_CANDLELIGHT`` + - Candle light. The camera generally raises the ISO sensitivity and + lowers the shutter speed. This mode compensates for relatively + close subject in the scene. The flash is disabled in order to + preserve the ambiance of the light. + * - ``V4L2_SCENE_MODE_DAWN_DUSK`` + - Dawn and dusk. Preserves the colors seen in low natural light + before dusk and after down. The camera may turn off the flash, and + automatically focus at infinity. It will usually boost saturation + and lower the shutter speed. + * - ``V4L2_SCENE_MODE_FALL_COLORS`` + - Fall colors. Increases saturation and adjusts white balance for + color enhancement. Pictures of autumn leaves get saturated reds + and yellows. + * - ``V4L2_SCENE_MODE_FIREWORKS`` + - Fireworks. Long exposure times are used to capture the expanding + burst of light from a firework. The camera may invoke image + stabilization. + * - ``V4L2_SCENE_MODE_LANDSCAPE`` + - Landscape. The camera may choose a small aperture to provide deep + depth of field and long exposure duration to help capture detail + in dim light conditions. The focus is fixed at infinity. Suitable + for distant and wide scenery. + * - ``V4L2_SCENE_MODE_NIGHT`` + - Night, also known as Night Landscape. Designed for low light + conditions, it preserves detail in the dark areas without blowing + out bright objects. The camera generally sets itself to a + medium-to-high ISO sensitivity, with a relatively long exposure + time, and turns flash off. As such, there will be increased image + noise and the possibility of blurred image. + * - ``V4L2_SCENE_MODE_PARTY_INDOOR`` + - Party and indoor. Designed to capture indoor scenes that are lit + by indoor background lighting as well as the flash. The camera + usually increases ISO sensitivity, and adjusts exposure for the + low light conditions. + * - ``V4L2_SCENE_MODE_PORTRAIT`` + - Portrait. The camera adjusts the aperture so that the depth of + field is reduced, which helps to isolate the subject against a + smooth background. Most cameras recognize the presence of faces in + the scene and focus on them. The color hue is adjusted to enhance + skin tones. The intensity of the flash is often reduced. + * - ``V4L2_SCENE_MODE_SPORTS`` + - Sports. Significantly increases ISO and uses a fast shutter speed + to freeze motion of rapidly-moving subjects. Increased image noise + may be seen in this mode. + * - ``V4L2_SCENE_MODE_SUNSET`` + - Sunset. Preserves deep hues seen in sunsets and sunrises. It bumps + up the saturation. + * - ``V4L2_SCENE_MODE_TEXT`` + - Text. It applies extra contrast and sharpness, it is typically a + black-and-white mode optimized for readability. Automatic focus + may be switched to close-up mode and this setting may also involve + some lens-distortion correction. @@ -3393,24 +2433,12 @@ Camera Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_LOCK_EXPOSURE`` - - - Automatic exposure adjustments lock. - - - .. row 2 - - - ``V4L2_LOCK_WHITE_BALANCE`` - - - Automatic white balance adjustments lock. - - - .. row 3 - - - ``V4L2_LOCK_FOCUS`` - - - Automatic focus lock. + * - ``V4L2_LOCK_EXPOSURE`` + - Automatic exposure adjustments lock. + * - ``V4L2_LOCK_WHITE_BALANCE`` + - Automatic white balance adjustments lock. + * - ``V4L2_LOCK_FOCUS`` + - Automatic focus lock. @@ -3570,7 +2598,10 @@ FM_TX Control IDs Configures pilot tone frequency value. Unit is in Hz. The range and step are driver-specific. -``V4L2_CID_TUNE_PREEMPHASIS (enum v4l2_preemphasis)`` +``V4L2_CID_TUNE_PREEMPHASIS`` + (enum) + +enum v4l2_preemphasis - Configures the pre-emphasis value for broadcasting. A pre-emphasis filter is applied to the broadcast to accentuate the high audio frequencies. Depending on the region, a time constant of either 50 @@ -3583,24 +2614,12 @@ FM_TX Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_PREEMPHASIS_DISABLED`` - - - No pre-emphasis is applied. - - - .. row 2 - - - ``V4L2_PREEMPHASIS_50_uS`` - - - A pre-emphasis of 50 uS is used. - - - .. row 3 - - - ``V4L2_PREEMPHASIS_75_uS`` - - - A pre-emphasis of 75 uS is used. + * - ``V4L2_PREEMPHASIS_DISABLED`` + - No pre-emphasis is applied. + * - ``V4L2_PREEMPHASIS_50_uS`` + - A pre-emphasis of 50 uS is used. + * - ``V4L2_PREEMPHASIS_75_uS`` + - A pre-emphasis of 75 uS is used. @@ -3684,51 +2703,31 @@ Flash Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_FLASH_LED_MODE_NONE`` - - - Off. - - - .. row 2 - - - ``V4L2_FLASH_LED_MODE_FLASH`` - - - Flash mode. - - - .. row 3 - - - ``V4L2_FLASH_LED_MODE_TORCH`` - - - Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY. + * - ``V4L2_FLASH_LED_MODE_NONE`` + - Off. + * - ``V4L2_FLASH_LED_MODE_FLASH`` + - Flash mode. + * - ``V4L2_FLASH_LED_MODE_TORCH`` + - Torch mode. See V4L2_CID_FLASH_TORCH_INTENSITY. ``V4L2_CID_FLASH_STROBE_SOURCE (menu)`` Defines the source of the flash LED strobe. - +.. tabularcolumns:: |p{7.0cm}|p{10.5cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_FLASH_STROBE_SOURCE_SOFTWARE`` - - - The flash strobe is triggered by using the - V4L2_CID_FLASH_STROBE control. - - - .. row 2 - - - ``V4L2_FLASH_STROBE_SOURCE_EXTERNAL`` - - - The flash strobe is triggered by an external source. Typically - this is a sensor, which makes it possible to synchronises the - flash strobe start to exposure start. + * - ``V4L2_FLASH_STROBE_SOURCE_SOFTWARE`` + - The flash strobe is triggered by using the + V4L2_CID_FLASH_STROBE control. + * - ``V4L2_FLASH_STROBE_SOURCE_EXTERNAL`` + - The flash strobe is triggered by an external source. Typically + this is a sensor, which makes it possible to synchronises the + flash strobe start to exposure start. @@ -3775,75 +2774,39 @@ Flash Control IDs an effect is chip dependent. Reading the faults resets the control and returns the chip to a usable state if possible. - +.. tabularcolumns:: |p{8.0cm}|p{9.5cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_FLASH_FAULT_OVER_VOLTAGE`` - - - Flash controller voltage to the flash LED has exceeded the limit - specific to the flash controller. - - - .. row 2 - - - ``V4L2_FLASH_FAULT_TIMEOUT`` - - - The flash strobe was still on when the timeout set by the user --- - V4L2_CID_FLASH_TIMEOUT control --- has expired. Not all flash - controllers may set this in all such conditions. - - - .. row 3 - - - ``V4L2_FLASH_FAULT_OVER_TEMPERATURE`` - - - The flash controller has overheated. - - - .. row 4 - - - ``V4L2_FLASH_FAULT_SHORT_CIRCUIT`` - - - The short circuit protection of the flash controller has been - triggered. - - - .. row 5 - - - ``V4L2_FLASH_FAULT_OVER_CURRENT`` - - - Current in the LED power supply has exceeded the limit specific to - the flash controller. - - - .. row 6 - - - ``V4L2_FLASH_FAULT_INDICATOR`` - - - The flash controller has detected a short or open circuit - condition on the indicator LED. - - - .. row 7 - - - ``V4L2_FLASH_FAULT_UNDER_VOLTAGE`` - - - Flash controller voltage to the flash LED has been below the - minimum limit specific to the flash controller. - - - .. row 8 - - - ``V4L2_FLASH_FAULT_INPUT_VOLTAGE`` - - - The input voltage of the flash controller is below the limit under - which strobing the flash at full current will not be possible.The - condition persists until this flag is no longer set. - - - .. row 9 - - - ``V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE`` - - - The temperature of the LED has exceeded its allowed upper limit. + * - ``V4L2_FLASH_FAULT_OVER_VOLTAGE`` + - Flash controller voltage to the flash LED has exceeded the limit + specific to the flash controller. + * - ``V4L2_FLASH_FAULT_TIMEOUT`` + - The flash strobe was still on when the timeout set by the user --- + V4L2_CID_FLASH_TIMEOUT control --- has expired. Not all flash + controllers may set this in all such conditions. + * - ``V4L2_FLASH_FAULT_OVER_TEMPERATURE`` + - The flash controller has overheated. + * - ``V4L2_FLASH_FAULT_SHORT_CIRCUIT`` + - The short circuit protection of the flash controller has been + triggered. + * - ``V4L2_FLASH_FAULT_OVER_CURRENT`` + - Current in the LED power supply has exceeded the limit specific to + the flash controller. + * - ``V4L2_FLASH_FAULT_INDICATOR`` + - The flash controller has detected a short or open circuit + condition on the indicator LED. + * - ``V4L2_FLASH_FAULT_UNDER_VOLTAGE`` + - Flash controller voltage to the flash LED has been below the + minimum limit specific to the flash controller. + * - ``V4L2_FLASH_FAULT_INPUT_VOLTAGE`` + - The input voltage of the flash controller is below the limit under + which strobing the flash at full current will not be possible.The + condition persists until this flag is no longer set. + * - ``V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE`` + - The temperature of the LED has exceeded its allowed upper limit. @@ -3886,48 +2849,24 @@ JPEG Control IDs how Cb and Cr components are downsampled after coverting an input image from RGB to Y'CbCr color space. - +.. tabularcolumns:: |p{7.0cm}|p{10.5cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_JPEG_CHROMA_SUBSAMPLING_444`` - - - No chroma subsampling, each pixel has Y, Cr and Cb values. - - - .. row 2 - - - ``V4L2_JPEG_CHROMA_SUBSAMPLING_422`` - - - Horizontally subsample Cr, Cb components by a factor of 2. - - - .. row 3 - - - ``V4L2_JPEG_CHROMA_SUBSAMPLING_420`` - - - Subsample Cr, Cb components horizontally and vertically by 2. - - - .. row 4 - - - ``V4L2_JPEG_CHROMA_SUBSAMPLING_411`` - - - Horizontally subsample Cr, Cb components by a factor of 4. - - - .. row 5 - - - ``V4L2_JPEG_CHROMA_SUBSAMPLING_410`` - - - Subsample Cr, Cb components horizontally by 4 and vertically by 2. - - - .. row 6 - - - ``V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY`` - - - Use only luminance component. + * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_444`` + - No chroma subsampling, each pixel has Y, Cr and Cb values. + * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_422`` + - Horizontally subsample Cr, Cb components by a factor of 2. + * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_420`` + - Subsample Cr, Cb components horizontally and vertically by 2. + * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_411`` + - Horizontally subsample Cr, Cb components by a factor of 4. + * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_410`` + - Subsample Cr, Cb components horizontally by 4 and vertically by 2. + * - ``V4L2_JPEG_CHROMA_SUBSAMPLING_GRAY`` + - Use only luminance component. @@ -3969,36 +2908,16 @@ JPEG Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_JPEG_ACTIVE_MARKER_APP0`` - - - Application data segment APP\ :sub:`0`. - - - .. row 2 - - - ``V4L2_JPEG_ACTIVE_MARKER_APP1`` - - - Application data segment APP\ :sub:`1`. - - - .. row 3 - - - ``V4L2_JPEG_ACTIVE_MARKER_COM`` - - - Comment segment. - - - .. row 4 - - - ``V4L2_JPEG_ACTIVE_MARKER_DQT`` - - - Quantization tables segment. - - - .. row 5 - - - ``V4L2_JPEG_ACTIVE_MARKER_DHT`` - - - Huffman tables segment. + * - ``V4L2_JPEG_ACTIVE_MARKER_APP0`` + - Application data segment APP\ :sub:`0`. + * - ``V4L2_JPEG_ACTIVE_MARKER_APP1`` + - Application data segment APP\ :sub:`1`. + * - ``V4L2_JPEG_ACTIVE_MARKER_COM`` + - Comment segment. + * - ``V4L2_JPEG_ACTIVE_MARKER_DQT`` + - Quantization tables segment. + * - ``V4L2_JPEG_ACTIVE_MARKER_DHT`` + - Huffman tables segment. @@ -4162,13 +3081,19 @@ Digital Video Control IDs EDIDs, then the bit for that pad will be 0. This read-only control is applicable to VGA, DVI-A/D, HDMI and DisplayPort connectors. -``V4L2_CID_DV_TX_MODE (enum v4l2_dv_tx_mode)`` +``V4L2_CID_DV_TX_MODE`` + (enum) + +enum v4l2_dv_tx_mode - HDMI transmitters can transmit in DVI-D mode (just video) or in HDMI mode (video + audio + auxiliary data). This control selects which mode to use: V4L2_DV_TX_MODE_DVI_D or V4L2_DV_TX_MODE_HDMI. This control is applicable to HDMI connectors. -``V4L2_CID_DV_TX_RGB_RANGE (enum v4l2_dv_rgb_range)`` +``V4L2_CID_DV_TX_RGB_RANGE`` + (enum) + +enum v4l2_dv_rgb_range - Select the quantization range for RGB output. V4L2_DV_RANGE_AUTO follows the RGB quantization range specified in the standard for the video interface (ie. :ref:`cea861` for HDMI). @@ -4180,7 +3105,10 @@ Digital Video Control IDs the number of bits per component. This control is applicable to VGA, DVI-A/D, HDMI and DisplayPort connectors. -``V4L2_CID_DV_TX_IT_CONTENT_TYPE (enum v4l2_dv_it_content_type)`` +``V4L2_CID_DV_TX_IT_CONTENT_TYPE`` + (enum) + +enum v4l2_dv_it_content_type - Configures the IT Content Type of the transmitted video. This information is sent over HDMI and DisplayPort connectors as part of the AVI InfoFrame. The term 'IT Content' is used for content that @@ -4188,46 +3116,26 @@ Digital Video Control IDs or an analog source. The enum v4l2_dv_it_content_type defines the possible content types: - +.. tabularcolumns:: |p{7.0cm}|p{10.5cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_DV_IT_CONTENT_TYPE_GRAPHICS`` - - - Graphics content. Pixel data should be passed unfiltered and - without analog reconstruction. - - - .. row 2 - - - ``V4L2_DV_IT_CONTENT_TYPE_PHOTO`` - - - Photo content. The content is derived from digital still pictures. - The content should be passed through with minimal scaling and - picture enhancements. - - - .. row 3 - - - ``V4L2_DV_IT_CONTENT_TYPE_CINEMA`` - - - Cinema content. - - - .. row 4 - - - ``V4L2_DV_IT_CONTENT_TYPE_GAME`` - - - Game content. Audio and video latency should be minimized. - - - .. row 5 - - - ``V4L2_DV_IT_CONTENT_TYPE_NO_ITC`` - - - No IT Content information is available and the ITC bit in the AVI - InfoFrame is set to 0. + * - ``V4L2_DV_IT_CONTENT_TYPE_GRAPHICS`` + - Graphics content. Pixel data should be passed unfiltered and + without analog reconstruction. + * - ``V4L2_DV_IT_CONTENT_TYPE_PHOTO`` + - Photo content. The content is derived from digital still pictures. + The content should be passed through with minimal scaling and + picture enhancements. + * - ``V4L2_DV_IT_CONTENT_TYPE_CINEMA`` + - Cinema content. + * - ``V4L2_DV_IT_CONTENT_TYPE_GAME`` + - Game content. Audio and video latency should be minimized. + * - ``V4L2_DV_IT_CONTENT_TYPE_NO_ITC`` + - No IT Content information is available and the ITC bit in the AVI + InfoFrame is set to 0. @@ -4241,7 +3149,10 @@ Digital Video Control IDs will be 0. This read-only control is applicable to DVI-D, HDMI and DisplayPort connectors. -``V4L2_CID_DV_RX_RGB_RANGE (enum v4l2_dv_rgb_range)`` +``V4L2_CID_DV_RX_RGB_RANGE`` + (enum) + +enum v4l2_dv_rgb_range - Select the quantization range for RGB input. V4L2_DV_RANGE_AUTO follows the RGB quantization range specified in the standard for the video interface (ie. :ref:`cea861` for HDMI). @@ -4253,7 +3164,10 @@ Digital Video Control IDs the number of bits per component. This control is applicable to VGA, DVI-A/D, HDMI and DisplayPort connectors. -``V4L2_CID_DV_RX_IT_CONTENT_TYPE (enum v4l2_dv_it_content_type)`` +``V4L2_CID_DV_RX_IT_CONTENT_TYPE`` + (enum) + +enum v4l2_dv_it_content_type - Reads the IT Content Type of the received video. This information is sent over HDMI and DisplayPort connectors as part of the AVI InfoFrame. The term 'IT Content' is used for content that originates @@ -4325,7 +3239,10 @@ FM_RX Control IDs broadcasts speech. If the transmitter doesn't make this distinction, then it will be set. -``V4L2_CID_TUNE_DEEMPHASIS (enum v4l2_deemphasis)`` +``V4L2_CID_TUNE_DEEMPHASIS`` + (enum) + +enum v4l2_deemphasis - Configures the de-emphasis value for reception. A de-emphasis filter is applied to the broadcast to accentuate the high audio frequencies. Depending on the region, a time constant of either 50 @@ -4338,24 +3255,12 @@ FM_RX Control IDs :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_DEEMPHASIS_DISABLED`` - - - No de-emphasis is applied. - - - .. row 2 - - - ``V4L2_DEEMPHASIS_50_uS`` - - - A de-emphasis of 50 uS is used. - - - .. row 3 - - - ``V4L2_DEEMPHASIS_75_uS`` - - - A de-emphasis of 75 uS is used. + * - ``V4L2_DEEMPHASIS_DISABLED`` + - No de-emphasis is applied. + * - ``V4L2_DEEMPHASIS_50_uS`` + - A de-emphasis of 50 uS is used. + * - ``V4L2_DEEMPHASIS_75_uS`` + - A de-emphasis of 75 uS is used. @@ -4382,43 +3287,27 @@ Detect Control IDs ``V4L2_CID_DETECT_MD_MODE (menu)`` Sets the motion detection mode. - +.. tabularcolumns:: |p{7.5cm}|p{10.0cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - ``V4L2_DETECT_MD_MODE_DISABLED`` - - - Disable motion detection. - - - .. row 2 - - - ``V4L2_DETECT_MD_MODE_GLOBAL`` - - - Use a single motion detection threshold. - - - .. row 3 - - - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` - - - The image is divided into a grid, each cell with its own motion - detection threshold. These thresholds are set through the - ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control. - - - .. row 4 - - - ``V4L2_DETECT_MD_MODE_REGION_GRID`` - - - The image is divided into a grid, each cell with its own region - value that specifies which per-region motion detection thresholds - should be used. Each region has its own thresholds. How these - per-region thresholds are set up is driver-specific. The region - values for the grid are set through the - ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control. + * - ``V4L2_DETECT_MD_MODE_DISABLED`` + - Disable motion detection. + * - ``V4L2_DETECT_MD_MODE_GLOBAL`` + - Use a single motion detection threshold. + * - ``V4L2_DETECT_MD_MODE_THRESHOLD_GRID`` + - The image is divided into a grid, each cell with its own motion + detection threshold. These thresholds are set through the + ``V4L2_CID_DETECT_MD_THRESHOLD_GRID`` matrix control. + * - ``V4L2_DETECT_MD_MODE_REGION_GRID`` + - The image is divided into a grid, each cell with its own region + value that specifies which per-region motion detection thresholds + should be used. Each region has its own thresholds. How these + per-region thresholds are set up is driver-specific. The region + values for the grid are set through the + ``V4L2_CID_DETECT_MD_REGION_GRID`` matrix control. diff --git a/Documentation/media/uapi/v4l/field-order.rst b/Documentation/media/uapi/v4l/field-order.rst index 979fedbb2bda..50779a67c3fd 100644 --- a/Documentation/media/uapi/v4l/field-order.rst +++ b/Documentation/media/uapi/v4l/field-order.rst @@ -47,140 +47,92 @@ clearer. All video capture and output devices must report the current field order. Some drivers may permit the selection of a different order, to this end applications initialize the ``field`` field of struct -:ref:`v4l2_pix_format <v4l2-pix-format>` before calling the +:c:type:`v4l2_pix_format` before calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. If this is not desired it should have the value ``V4L2_FIELD_ANY`` (0). -.. _v4l2-field: - enum v4l2_field =============== +.. c:type:: v4l2_field + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. flat-table:: :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_FIELD_ANY`` - - - 0 - - - Applications request this field order when any one of the - ``V4L2_FIELD_NONE``, ``V4L2_FIELD_TOP``, ``V4L2_FIELD_BOTTOM``, or - ``V4L2_FIELD_INTERLACED`` formats is acceptable. Drivers choose - depending on hardware capabilities or e. g. the requested image - size, and return the actual field order. Drivers must never return - ``V4L2_FIELD_ANY``. If multiple field orders are possible the - driver must choose one of the possible field orders during - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or - :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct - :ref:`v4l2_buffer <v4l2-buffer>` ``field`` can never be - ``V4L2_FIELD_ANY``. - - - .. row 2 - - - ``V4L2_FIELD_NONE`` - - - 1 - - - Images are in progressive format, not interlaced. The driver may - also indicate this order when it cannot distinguish between - ``V4L2_FIELD_TOP`` and ``V4L2_FIELD_BOTTOM``. - - - .. row 3 - - - ``V4L2_FIELD_TOP`` - - - 2 - - - Images consist of the top (aka odd) field only. - - - .. row 4 - - - ``V4L2_FIELD_BOTTOM`` - - - 3 - - - Images consist of the bottom (aka even) field only. Applications - may wish to prevent a device from capturing interlaced images - because they will have "comb" or "feathering" artefacts around - moving objects. - - - .. row 5 - - - ``V4L2_FIELD_INTERLACED`` - - - 4 - - - Images contain both fields, interleaved line by line. The temporal - order of the fields (whether the top or bottom field is first - transmitted) depends on the current video standard. M/NTSC - transmits the bottom field first, all other standards the top - field first. - - - .. row 6 - - - ``V4L2_FIELD_SEQ_TB`` - - - 5 - - - Images contain both fields, the top field lines are stored first - in memory, immediately followed by the bottom field lines. Fields - are always stored in temporal order, the older one first in - memory. Image sizes refer to the frame, not fields. - - - .. row 7 - - - ``V4L2_FIELD_SEQ_BT`` - - - 6 - - - Images contain both fields, the bottom field lines are stored - first in memory, immediately followed by the top field lines. - Fields are always stored in temporal order, the older one first in - memory. Image sizes refer to the frame, not fields. - - - .. row 8 - - - ``V4L2_FIELD_ALTERNATE`` - - - 7 - - - The two fields of a frame are passed in separate buffers, in - temporal order, i. e. the older one first. To indicate the field - parity (whether the current field is a top or bottom field) the - driver or application, depending on data direction, must set - struct :ref:`v4l2_buffer <v4l2-buffer>` ``field`` to - ``V4L2_FIELD_TOP`` or ``V4L2_FIELD_BOTTOM``. Any two successive - fields pair to build a frame. If fields are successive, without - any dropped fields between them (fields can drop individually), - can be determined from the struct - :ref:`v4l2_buffer <v4l2-buffer>` ``sequence`` field. This - format cannot be selected when using the read/write I/O method - since there is no way to communicate if a field was a top or - bottom field. - - - .. row 9 - - - ``V4L2_FIELD_INTERLACED_TB`` - - - 8 - - - Images contain both fields, interleaved line by line, top field - first. The top field is transmitted first. - - - .. row 10 - - - ``V4L2_FIELD_INTERLACED_BT`` - - - 9 - - - Images contain both fields, interleaved line by line, top field - first. The bottom field is transmitted first. + * - ``V4L2_FIELD_ANY`` + - 0 + - Applications request this field order when any one of the + ``V4L2_FIELD_NONE``, ``V4L2_FIELD_TOP``, ``V4L2_FIELD_BOTTOM``, or + ``V4L2_FIELD_INTERLACED`` formats is acceptable. Drivers choose + depending on hardware capabilities or e. g. the requested image + size, and return the actual field order. Drivers must never return + ``V4L2_FIELD_ANY``. If multiple field orders are possible the + driver must choose one of the possible field orders during + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or + :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct + :c:type:`v4l2_buffer` ``field`` can never be + ``V4L2_FIELD_ANY``. + * - ``V4L2_FIELD_NONE`` + - 1 + - Images are in progressive format, not interlaced. The driver may + also indicate this order when it cannot distinguish between + ``V4L2_FIELD_TOP`` and ``V4L2_FIELD_BOTTOM``. + * - ``V4L2_FIELD_TOP`` + - 2 + - Images consist of the top (aka odd) field only. + * - ``V4L2_FIELD_BOTTOM`` + - 3 + - Images consist of the bottom (aka even) field only. Applications + may wish to prevent a device from capturing interlaced images + because they will have "comb" or "feathering" artefacts around + moving objects. + * - ``V4L2_FIELD_INTERLACED`` + - 4 + - Images contain both fields, interleaved line by line. The temporal + order of the fields (whether the top or bottom field is first + transmitted) depends on the current video standard. M/NTSC + transmits the bottom field first, all other standards the top + field first. + * - ``V4L2_FIELD_SEQ_TB`` + - 5 + - Images contain both fields, the top field lines are stored first + in memory, immediately followed by the bottom field lines. Fields + are always stored in temporal order, the older one first in + memory. Image sizes refer to the frame, not fields. + * - ``V4L2_FIELD_SEQ_BT`` + - 6 + - Images contain both fields, the bottom field lines are stored + first in memory, immediately followed by the top field lines. + Fields are always stored in temporal order, the older one first in + memory. Image sizes refer to the frame, not fields. + * - ``V4L2_FIELD_ALTERNATE`` + - 7 + - The two fields of a frame are passed in separate buffers, in + temporal order, i. e. the older one first. To indicate the field + parity (whether the current field is a top or bottom field) the + driver or application, depending on data direction, must set + struct :c:type:`v4l2_buffer` ``field`` to + ``V4L2_FIELD_TOP`` or ``V4L2_FIELD_BOTTOM``. Any two successive + fields pair to build a frame. If fields are successive, without + any dropped fields between them (fields can drop individually), + can be determined from the struct + :c:type:`v4l2_buffer` ``sequence`` field. This + format cannot be selected when using the read/write I/O method + since there is no way to communicate if a field was a top or + bottom field. + * - ``V4L2_FIELD_INTERLACED_TB`` + - 8 + - Images contain both fields, interleaved line by line, top field + first. The top field is transmitted first. + * - ``V4L2_FIELD_INTERLACED_BT`` + - 9 + - Images contain both fields, interleaved line by line, top field + first. The bottom field is transmitted first. diff --git a/Documentation/media/uapi/v4l/format.rst b/Documentation/media/uapi/v4l/format.rst index 7c73278849ca..452c6d59cad5 100644 --- a/Documentation/media/uapi/v4l/format.rst +++ b/Documentation/media/uapi/v4l/format.rst @@ -22,7 +22,7 @@ to satisfy the request. Of course applications can also just query the current selection. A single mechanism exists to negotiate all data formats using the -aggregate struct :ref:`v4l2_format <v4l2-format>` and the +aggregate struct :c:type:`v4l2_format` and the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls. Additionally the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to examine diff --git a/Documentation/media/uapi/v4l/func-close.rst b/Documentation/media/uapi/v4l/func-close.rst index 926a2ccc32e5..e85a6744eb91 100644 --- a/Documentation/media/uapi/v4l/func-close.rst +++ b/Documentation/media/uapi/v4l/func-close.rst @@ -20,8 +20,8 @@ Synopsis #include <unistd.h> -.. cpp:function:: int close( int fd ) - +.. c:function:: int close( int fd ) + :name: v4l2-close Arguments ========= diff --git a/Documentation/media/uapi/v4l/func-ioctl.rst b/Documentation/media/uapi/v4l/func-ioctl.rst index 5632f48fce1b..ebfbe92f0478 100644 --- a/Documentation/media/uapi/v4l/func-ioctl.rst +++ b/Documentation/media/uapi/v4l/func-ioctl.rst @@ -20,8 +20,8 @@ Synopsis #include <sys/ioctl.h> -.. cpp:function:: int ioctl( int fd, int request, void *argp ) - +.. c:function:: int ioctl( int fd, int request, void *argp ) + :name: v4l2-ioctl Arguments ========= diff --git a/Documentation/media/uapi/v4l/func-mmap.rst b/Documentation/media/uapi/v4l/func-mmap.rst index c156fb7b7422..6d2ce539bd72 100644 --- a/Documentation/media/uapi/v4l/func-mmap.rst +++ b/Documentation/media/uapi/v4l/func-mmap.rst @@ -21,8 +21,8 @@ Synopsis #include <sys/mman.h> -.. cpp:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset ) - +.. c:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset ) + :name: v4l2-mmap Arguments ========= @@ -37,9 +37,9 @@ Arguments ``length`` Length of the memory area to map. This must be the same value as returned by the driver in the struct - :ref:`v4l2_buffer <v4l2-buffer>` ``length`` field for the + :c:type:`v4l2_buffer` ``length`` field for the single-planar API, and the same value as returned by the driver in - the struct :ref:`v4l2_plane <v4l2-plane>` ``length`` field for + the struct :c:type:`v4l2_plane` ``length`` field for the multi-planar API. ``prot`` @@ -78,7 +78,9 @@ Arguments ``MAP_SHARED`` allows applications to share the mapped memory with other (e. g. child-) processes. - .. note:: The Linux ``videobuf`` module which is used by some + .. note:: + + The Linux ``videobuf`` module which is used by some drivers supports only ``MAP_SHARED``. ``MAP_PRIVATE`` requests copy-on-write semantics. V4L2 applications should not set the ``MAP_PRIVATE``, ``MAP_DENYWRITE``, ``MAP_EXECUTABLE`` or ``MAP_ANON`` @@ -90,9 +92,9 @@ Arguments ``offset`` Offset of the buffer in device memory. This must be the same value as returned by the driver in the struct - :ref:`v4l2_buffer <v4l2-buffer>` ``m`` union ``offset`` field for + :c:type:`v4l2_buffer` ``m`` union ``offset`` field for the single-planar API, and the same value as returned by the driver - in the struct :ref:`v4l2_plane <v4l2-plane>` ``m`` union + in the struct :c:type:`v4l2_plane` ``m`` union ``mem_offset`` field for the multi-planar API. diff --git a/Documentation/media/uapi/v4l/func-munmap.rst b/Documentation/media/uapi/v4l/func-munmap.rst index c29c03f21279..c2f4043d7d2b 100644 --- a/Documentation/media/uapi/v4l/func-munmap.rst +++ b/Documentation/media/uapi/v4l/func-munmap.rst @@ -21,8 +21,8 @@ Synopsis #include <sys/mman.h> -.. cpp:function:: int munmap( void *start, size_t length ) - +.. c:function:: int munmap( void *start, size_t length ) + :name: v4l2-munmap Arguments ========= @@ -34,9 +34,9 @@ Arguments ``length`` Length of the mapped buffer. This must be the same value as given to :ref:`mmap() <func-mmap>` and returned by the driver in the struct - :ref:`v4l2_buffer <v4l2-buffer>` ``length`` field for the + :c:type:`v4l2_buffer` ``length`` field for the single-planar API and in the struct - :ref:`v4l2_plane <v4l2-plane>` ``length`` field for the + :c:type:`v4l2_plane` ``length`` field for the multi-planar API. diff --git a/Documentation/media/uapi/v4l/func-open.rst b/Documentation/media/uapi/v4l/func-open.rst index 06bcadc269a4..deea34cc778b 100644 --- a/Documentation/media/uapi/v4l/func-open.rst +++ b/Documentation/media/uapi/v4l/func-open.rst @@ -20,8 +20,8 @@ Synopsis #include <fcntl.h> -.. cpp:function:: int open( const char *device_name, int flags ) - +.. c:function:: int open( const char *device_name, int flags ) + :name: v4l2-open Arguments ========= diff --git a/Documentation/media/uapi/v4l/func-poll.rst b/Documentation/media/uapi/v4l/func-poll.rst index e6ceb712b783..d0432dc09b05 100644 --- a/Documentation/media/uapi/v4l/func-poll.rst +++ b/Documentation/media/uapi/v4l/func-poll.rst @@ -20,8 +20,8 @@ Synopsis #include <sys/poll.h> -.. cpp:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) - +.. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) + :name: v4l2-poll Arguments ========= diff --git a/Documentation/media/uapi/v4l/func-read.rst b/Documentation/media/uapi/v4l/func-read.rst index 9a2aa5210233..ae38c2d59d49 100644 --- a/Documentation/media/uapi/v4l/func-read.rst +++ b/Documentation/media/uapi/v4l/func-read.rst @@ -20,8 +20,8 @@ Synopsis #include <unistd.h> -.. cpp:function:: ssize_t read( int fd, void *buf, size_t count ) - +.. c:function:: ssize_t read( int fd, void *buf, size_t count ) + :name: v4l2-read Arguments ========= @@ -30,8 +30,10 @@ Arguments File descriptor returned by :ref:`open() <func-open>`. ``buf`` -``count`` + Buffer to be filled +``count`` + Max number of bytes to read Description =========== diff --git a/Documentation/media/uapi/v4l/func-select.rst b/Documentation/media/uapi/v4l/func-select.rst index 7798384ae396..002dedba2666 100644 --- a/Documentation/media/uapi/v4l/func-select.rst +++ b/Documentation/media/uapi/v4l/func-select.rst @@ -22,12 +22,26 @@ Synopsis #include <unistd.h> -.. cpp:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout ) - +.. c:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout ) + :name: v4l2-select Arguments ========= +``nfds`` + The highest-numbered file descriptor in any of the three sets, plus 1. + +``readfds`` + File descriptions to be watched if a read() call won't block. + +``writefds`` + File descriptions to be watched if a write() won't block. + +``exceptfds`` + File descriptions to be watched for V4L2 events. + +``timeout`` + Maximum time to wait. Description diff --git a/Documentation/media/uapi/v4l/func-write.rst b/Documentation/media/uapi/v4l/func-write.rst index a3bc9b26fe56..938f33f85455 100644 --- a/Documentation/media/uapi/v4l/func-write.rst +++ b/Documentation/media/uapi/v4l/func-write.rst @@ -20,8 +20,8 @@ Synopsis #include <unistd.h> -.. cpp:function:: ssize_t write( int fd, void *buf, size_t count ) - +.. c:function:: ssize_t write( int fd, void *buf, size_t count ) + :name: v4l2-write Arguments ========= @@ -30,8 +30,10 @@ Arguments File descriptor returned by :ref:`open() <func-open>`. ``buf`` -``count`` + Buffer with data to be written +``count`` + Number of bytes at the buffer Description =========== diff --git a/Documentation/media/uapi/v4l/hist-v4l2.rst b/Documentation/media/uapi/v4l/hist-v4l2.rst index 3ba1c0c2df1a..058b5db95c32 100644 --- a/Documentation/media/uapi/v4l/hist-v4l2.rst +++ b/Documentation/media/uapi/v4l/hist-v4l2.rst @@ -30,14 +30,14 @@ aliases ``O_NONCAP`` and ``O_NOIO`` were defined. Applications can set this flag if they intend to access controls only, as opposed to capture applications which need exclusive access. The ``VIDEO_STD_XXX`` identifiers are now ordinals instead of flags, and the -:c:func:`video_std_construct()` helper function takes id and +``video_std_construct()`` helper function takes id and transmission arguments. 1998-09-28: Revamped video standard. Made video controls individually enumerable. 1998-10-02: The ``id`` field was removed from struct -:c:type:`struct video_standard` and the color subcarrier fields were +struct ``video_standard`` and the color subcarrier fields were renamed. The :ref:`VIDIOC_QUERYSTD` ioctl was renamed to :ref:`VIDIOC_ENUMSTD`, :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` to @@ -45,7 +45,7 @@ renamed to :ref:`VIDIOC_ENUMSTD`, Codec API was released. 1998-11-08: Many minor changes. Most symbols have been renamed. Some -material changes to struct :ref:`v4l2_capability <v4l2-capability>`. +material changes to struct :c:type:`v4l2_capability`. 1998-11-12: The read/write directon of some ioctls was misdefined. @@ -117,7 +117,7 @@ to simplify the API, while making it more extensible and following common Linux driver API conventions. 1. Some typos in ``V4L2_FMT_FLAG`` symbols were fixed. struct - :ref:`v4l2_clip <v4l2-clip>` was changed for compatibility with + :c:type:`v4l2_clip` was changed for compatibility with v4l. (1999-08-30) 2. ``V4L2_TUNER_SUB_LANG1`` was added. (1999-09-05) @@ -151,15 +151,15 @@ common Linux driver API conventions. This change obsoletes the following ioctls: ``VIDIOC_S_INFMT``, ``VIDIOC_G_INFMT``, ``VIDIOC_S_OUTFMT``, ``VIDIOC_G_OUTFMT``, ``VIDIOC_S_VBIFMT`` and ``VIDIOC_G_VBIFMT``. The image format - structure :c:type:`struct v4l2_format` was renamed to struct - :ref:`v4l2_pix_format <v4l2-pix-format>`, while struct - :ref:`v4l2_format <v4l2-format>` is now the envelopping structure + structure struct :c:type:`v4l2_format` was renamed to struct + :c:type:`v4l2_pix_format`, while struct + :c:type:`v4l2_format` is now the envelopping structure for all format negotiations. 5. Similar to the changes above, the ``VIDIOC_G_PARM`` and ``VIDIOC_S_PARM`` ioctls were merged with ``VIDIOC_G_OUTPARM`` and ``VIDIOC_S_OUTPARM``. A ``type`` field in the new struct - :ref:`v4l2_streamparm <v4l2-streamparm>` selects the respective + :c:type:`v4l2_streamparm` selects the respective union member. This change obsoletes the ``VIDIOC_G_OUTPARM`` and @@ -178,7 +178,7 @@ common Linux driver API conventions. categories might have a greater separation, or may even appear in separate windows. -7. The struct :ref:`v4l2_buffer <v4l2-buffer>` ``timestamp`` was +7. The struct :c:type:`v4l2_buffer` ``timestamp`` was changed to a 64 bit integer, containing the sampling or output time of the frame in nanoseconds. Additionally timestamps will be in absolute system time, not starting from zero at the beginning of a @@ -202,7 +202,7 @@ common Linux driver API conventions. return a 64-bit integer. 8. A ``sequence`` field was added to struct - :ref:`v4l2_buffer <v4l2-buffer>`. The ``sequence`` field counts + :c:type:`v4l2_buffer`. The ``sequence`` field counts captured frames, it is ignored by output devices. When a capture driver drops a frame, the sequence number of that frame is skipped. @@ -210,7 +210,7 @@ common Linux driver API conventions. V4L2 Version 0.20 incremental changes ===================================== -1999-12-23: In struct :ref:`v4l2_vbi_format <v4l2-vbi-format>` the +1999-12-23: In struct :c:type:`v4l2_vbi_format` the ``reserved1`` field became ``offset``. Previously drivers were required to clear the ``reserved1`` field. @@ -254,9 +254,9 @@ multiple tuners into account.) 2000-09-18: ``V4L2_BUF_TYPE_VBI`` was added. This may *break compatibility* as the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls may fail now if the struct -:c:type:`struct v4l2_fmt` ``type`` field does not contain +struct ``v4l2_fmt`` ``type`` field does not contain ``V4L2_BUF_TYPE_VBI``. In the documentation of the struct -:ref:`v4l2_vbi_format <v4l2-vbi-format>` ``offset`` field the +:c:type:`v4l2_vbi_format` ``offset`` field the ambiguous phrase "rising edge" was changed to "leading edge". @@ -321,7 +321,7 @@ This unnamed version was finally merged into Linux 2.5.46. until the application attempts to initiate a data exchange, see :ref:`open`. -3. The struct :ref:`v4l2_capability <v4l2-capability>` changed +3. The struct :c:type:`v4l2_capability` changed dramatically. Note that also the size of the structure changed, which is encoded in the ioctl request code, thus older V4L2 devices will respond with an ``EINVAL`` error code to the new @@ -354,7 +354,7 @@ This unnamed version was finally merged into Linux 2.5.46. ``V4L2_FLAG_MONOCHROME`` flag was removed, this information is available as described in :ref:`format`. -4. In struct :ref:`v4l2_input <v4l2-input>` the ``assoc_audio`` +4. In struct :c:type:`v4l2_input` the ``assoc_audio`` field and the ``capability`` field and its only flag ``V4L2_INPUT_CAP_AUDIO`` was replaced by the new ``audioset`` field. Instead of linking one video input to one audio input this field @@ -363,11 +363,11 @@ This unnamed version was finally merged into Linux 2.5.46. New fields are ``tuner`` (reversing the former link from tuners to video inputs), ``std`` and ``status``. - Accordingly struct :ref:`v4l2_output <v4l2-output>` lost its + Accordingly struct :c:type:`v4l2_output` lost its ``capability`` and ``assoc_audio`` fields. ``audioset``, ``modulator`` and ``std`` where added instead. -5. The struct :ref:`v4l2_audio <v4l2-audio>` field ``audio`` was +5. The struct :c:type:`v4l2_audio` field ``audio`` was renamed to ``index``, for consistency with other structures. A new capability flag ``V4L2_AUDCAP_STEREO`` was added to indicated if the audio input in question supports stereo sound. @@ -376,20 +376,20 @@ This unnamed version was finally merged into Linux 2.5.46. (However the same applies to AVL which is still there.) Again for consistency the struct - :ref:`v4l2_audioout <v4l2-audioout>` field ``audio`` was renamed + :c:type:`v4l2_audioout` field ``audio`` was renamed to ``index``. -6. The struct :ref:`v4l2_tuner <v4l2-tuner>` ``input`` field was +6. The struct :c:type:`v4l2_tuner` ``input`` field was replaced by an ``index`` field, permitting devices with multiple tuners. The link between video inputs and tuners is now reversed, inputs point to their tuner. The ``std`` substructure became a simple set (more about this below) and moved into struct - :ref:`v4l2_input <v4l2-input>`. A ``type`` field was added. + :c:type:`v4l2_input`. A ``type`` field was added. - Accordingly in struct :ref:`v4l2_modulator <v4l2-modulator>` the + Accordingly in struct :c:type:`v4l2_modulator` the ``output`` was replaced by an ``index`` field. - In struct :ref:`v4l2_frequency <v4l2-frequency>` the ``port`` + In struct :c:type:`v4l2_frequency` the ``port`` field was replaced by a ``tuner`` field containing the respective tuner or modulator index number. A tuner ``type`` field was added and the ``reserved`` field became larger for future extensions @@ -405,7 +405,7 @@ This unnamed version was finally merged into Linux 2.5.46. :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` now take a pointer to this type as argument. :ref:`VIDIOC_QUERYSTD` was added to autodetect the received standard, if the hardware has this - capability. In struct :ref:`v4l2_standard <v4l2-standard>` an + capability. In struct :c:type:`v4l2_standard` an ``index`` field was added for :ref:`VIDIOC_ENUMSTD`. A :ref:`v4l2_std_id <v4l2-std-id>` field named ``id`` was added as @@ -415,12 +415,12 @@ This unnamed version was finally merged into Linux 2.5.46. originally needed to distguish between variations of standards, were removed. - Struct :c:type:`struct v4l2_enumstd` ceased to be. + Struct ``v4l2_enumstd`` ceased to be. :ref:`VIDIOC_ENUMSTD` now takes a pointer to a - struct :ref:`v4l2_standard <v4l2-standard>` directly. The + struct :c:type:`v4l2_standard` directly. The information which standards are supported by a particular video - input or output moved into struct :ref:`v4l2_input <v4l2-input>` - and struct :ref:`v4l2_output <v4l2-output>` fields named ``std``, + input or output moved into struct :c:type:`v4l2_input` + and struct :c:type:`v4l2_output` fields named ``std``, respectively. 8. The struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` fields @@ -432,13 +432,13 @@ This unnamed version was finally merged into Linux 2.5.46. :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, but without the overhead of programming the hardware and regardless of I/O in progress. - In struct :ref:`v4l2_format <v4l2-format>` the ``fmt`` union was - extended to contain struct :ref:`v4l2_window <v4l2-window>`. All + In struct :c:type:`v4l2_format` the ``fmt`` union was + extended to contain struct :c:type:`v4l2_window`. All image format negotiations are now possible with ``VIDIOC_G_FMT``, ``VIDIOC_S_FMT`` and ``VIDIOC_TRY_FMT``; ioctl. The ``VIDIOC_G_WIN`` and ``VIDIOC_S_WIN`` ioctls to prepare for a video overlay were removed. The ``type`` field changed to type enum - :ref:`v4l2_buf_type <v4l2-buf-type>` and the buffer type names + :c:type:`v4l2_buf_type` and the buffer type names changed as follows. @@ -447,101 +447,45 @@ This unnamed version was finally merged into Linux 2.5.46. :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - Old defines - - - enum :ref:`v4l2_buf_type <v4l2-buf-type>` - - - .. row 2 - - - ``V4L2_BUF_TYPE_CAPTURE`` - - - ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` - - - .. row 3 - - - ``V4L2_BUF_TYPE_CODECIN`` - - - Omitted for now - - - .. row 4 - - - ``V4L2_BUF_TYPE_CODECOUT`` - - - Omitted for now - - - .. row 5 - - - ``V4L2_BUF_TYPE_EFFECTSIN`` - - - Omitted for now - - - .. row 6 - - - ``V4L2_BUF_TYPE_EFFECTSIN2`` - - - Omitted for now - - - .. row 7 - - - ``V4L2_BUF_TYPE_EFFECTSOUT`` - - - Omitted for now - - - .. row 8 - - - ``V4L2_BUF_TYPE_VIDEOOUT`` - - - ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` - - - .. row 9 - - - ``-`` - - - ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` - - - .. row 10 - - - ``-`` - - - ``V4L2_BUF_TYPE_VBI_CAPTURE`` - - - .. row 11 - - - ``-`` - - - ``V4L2_BUF_TYPE_VBI_OUTPUT`` - - - .. row 12 - - - ``-`` - - - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` - - - .. row 13 - - - ``-`` - - - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT`` - - - .. row 14 - - - ``V4L2_BUF_TYPE_PRIVATE_BASE`` - - - ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated) - - -10. In struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` a enum - :ref:`v4l2_buf_type <v4l2-buf-type>` field named ``type`` was - added as in struct :ref:`v4l2_format <v4l2-format>`. The + * - Old defines + - enum :c:type:`v4l2_buf_type` + * - ``V4L2_BUF_TYPE_CAPTURE`` + - ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` + * - ``V4L2_BUF_TYPE_CODECIN`` + - Omitted for now + * - ``V4L2_BUF_TYPE_CODECOUT`` + - Omitted for now + * - ``V4L2_BUF_TYPE_EFFECTSIN`` + - Omitted for now + * - ``V4L2_BUF_TYPE_EFFECTSIN2`` + - Omitted for now + * - ``V4L2_BUF_TYPE_EFFECTSOUT`` + - Omitted for now + * - ``V4L2_BUF_TYPE_VIDEOOUT`` + - ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` + * - ``-`` + - ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` + * - ``-`` + - ``V4L2_BUF_TYPE_VBI_CAPTURE`` + * - ``-`` + - ``V4L2_BUF_TYPE_VBI_OUTPUT`` + * - ``-`` + - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` + * - ``-`` + - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT`` + * - ``V4L2_BUF_TYPE_PRIVATE_BASE`` + - ``V4L2_BUF_TYPE_PRIVATE`` (but this is deprecated) + + +10. In struct :c:type:`v4l2_fmtdesc` a enum + :c:type:`v4l2_buf_type` field named ``type`` was + added as in struct :c:type:`v4l2_format`. The ``VIDIOC_ENUM_FBUFFMT`` ioctl is no longer needed and was removed. These calls can be replaced by :ref:`VIDIOC_ENUM_FMT` with type ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. -11. In struct :ref:`v4l2_pix_format <v4l2-pix-format>` the ``depth`` +11. In struct :c:type:`v4l2_pix_format` the ``depth`` field was removed, assuming applications which recognize the format by its four-character-code already know the color depth, and others do not care about it. The same rationale lead to the removal of the @@ -555,7 +499,7 @@ This unnamed version was finally merged into Linux 2.5.46. itself was removed. The interlace flags were replaced by a enum - :ref:`v4l2_field <v4l2-field>` value in a newly added ``field`` + :c:type:`v4l2_field` value in a newly added ``field`` field. @@ -564,82 +508,50 @@ This unnamed version was finally merged into Linux 2.5.46. :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - Old flag - - - enum :ref:`v4l2_field <v4l2-field>` - - - .. row 2 - - - ``V4L2_FMT_FLAG_NOT_INTERLACED`` - - - ? - - - .. row 3 - - - ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED`` - - - ``V4L2_FIELD_INTERLACED`` - - - .. row 4 - - - ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD`` - - - ``V4L2_FIELD_TOP`` - - - .. row 5 - - - ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD`` - - - ``V4L2_FIELD_BOTTOM`` - - - .. row 6 - - - ``-`` - - - ``V4L2_FIELD_SEQ_TB`` - - - .. row 7 - - - ``-`` - - - ``V4L2_FIELD_SEQ_BT`` - - - .. row 8 - - - ``-`` - - - ``V4L2_FIELD_ALTERNATE`` + * - Old flag + - enum :c:type:`v4l2_field` + * - ``V4L2_FMT_FLAG_NOT_INTERLACED`` + - ? + * - ``V4L2_FMT_FLAG_INTERLACED`` = ``V4L2_FMT_FLAG_COMBINED`` + - ``V4L2_FIELD_INTERLACED`` + * - ``V4L2_FMT_FLAG_TOPFIELD`` = ``V4L2_FMT_FLAG_ODDFIELD`` + - ``V4L2_FIELD_TOP`` + * - ``V4L2_FMT_FLAG_BOTFIELD`` = ``V4L2_FMT_FLAG_EVENFIELD`` + - ``V4L2_FIELD_BOTTOM`` + * - ``-`` + - ``V4L2_FIELD_SEQ_TB`` + * - ``-`` + - ``V4L2_FIELD_SEQ_BT`` + * - ``-`` + - ``V4L2_FIELD_ALTERNATE`` The color space flags were replaced by a enum - :ref:`v4l2_colorspace <v4l2-colorspace>` value in a newly added + :c:type:`v4l2_colorspace` value in a newly added ``colorspace`` field, where one of ``V4L2_COLORSPACE_SMPTE170M``, ``V4L2_COLORSPACE_BT878``, ``V4L2_COLORSPACE_470_SYSTEM_M`` or ``V4L2_COLORSPACE_470_SYSTEM_BG`` replaces ``V4L2_FMT_CS_601YUV``. -12. In struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` the +12. In struct :c:type:`v4l2_requestbuffers` the ``type`` field was properly defined as enum - :ref:`v4l2_buf_type <v4l2-buf-type>`. Buffer types changed as + :c:type:`v4l2_buf_type`. Buffer types changed as mentioned above. A new ``memory`` field of type enum - :ref:`v4l2_memory <v4l2-memory>` was added to distinguish between + :c:type:`v4l2_memory` was added to distinguish between I/O methods using buffers allocated by the driver or the application. See :ref:`io` for details. -13. In struct :ref:`v4l2_buffer <v4l2-buffer>` the ``type`` field was - properly defined as enum :ref:`v4l2_buf_type <v4l2-buf-type>`. +13. In struct :c:type:`v4l2_buffer` the ``type`` field was + properly defined as enum :c:type:`v4l2_buf_type`. Buffer types changed as mentioned above. A ``field`` field of type - enum :ref:`v4l2_field <v4l2-field>` was added to indicate if a + enum :c:type:`v4l2_field` was added to indicate if a buffer contains a top or bottom field. The old field flags were removed. Since no unadjusted system time clock was added to the kernel as planned, the ``timestamp`` field changed back from type stamp_t, an unsigned 64 bit integer expressing the sample time in - nanoseconds, to struct :c:type:`struct timeval`. With the addition + nanoseconds, to struct :c:type:`timeval`. With the addition of a second memory mapping method the ``offset`` field moved into union ``m``, and a new ``memory`` field of type enum - :ref:`v4l2_memory <v4l2-memory>` was added to distinguish between + :c:type:`v4l2_memory` was added to distinguish between I/O methods. See :ref:`io` for details. The ``V4L2_BUF_REQ_CONTIG`` flag was used by the V4L compatibility @@ -648,7 +560,7 @@ This unnamed version was finally merged into Linux 2.5.46. indeed allocated in device memory rather than DMA-able system memory. It was barely useful and so was removed. -14. In struct :ref:`v4l2_framebuffer <v4l2-framebuffer>` the +14. In struct :c:type:`v4l2_framebuffer` the ``base[3]`` array anticipating double- and triple-buffering in off-screen video memory, however without defining a synchronization mechanism, was replaced by a single pointer. The @@ -659,42 +571,42 @@ This unnamed version was finally merged into Linux 2.5.46. ``V4L2_FBUF_CAP_LIST_CLIPPING`` and ``V4L2_FBUF_CAP_BITMAP_CLIPPING``. -15. In struct :ref:`v4l2_clip <v4l2-clip>` the ``x``, ``y``, +15. In struct :c:type:`v4l2_clip` the ``x``, ``y``, ``width`` and ``height`` field moved into a ``c`` substructure of - type struct :ref:`v4l2_rect <v4l2-rect>`. The ``x`` and ``y`` + type struct :c:type:`v4l2_rect`. The ``x`` and ``y`` fields were renamed to ``left`` and ``top``, i. e. offsets to a context dependent origin. -16. In struct :ref:`v4l2_window <v4l2-window>` the ``x``, ``y``, +16. In struct :c:type:`v4l2_window` the ``x``, ``y``, ``width`` and ``height`` field moved into a ``w`` substructure as - above. A ``field`` field of type %v4l2-field; was added to + above. A ``field`` field of type :c:type:`v4l2_field` was added to distinguish between field and frame (interlaced) overlay. 17. The digital zoom interface, including struct - :c:type:`struct v4l2_zoomcap`, struct - :c:type:`struct v4l2_zoom`, ``V4L2_ZOOM_NONCAP`` and + struct ``v4l2_zoomcap``, struct + struct ``v4l2_zoom``, ``V4L2_ZOOM_NONCAP`` and ``V4L2_ZOOM_WHILESTREAMING`` was replaced by a new cropping and scaling interface. The previously unused struct - :c:type:`struct v4l2_cropcap` and :c:type:`struct v4l2_crop` + struct :c:type:`v4l2_cropcap` and struct :c:type:`v4l2_crop` where redefined for this purpose. See :ref:`crop` for details. -18. In struct :ref:`v4l2_vbi_format <v4l2-vbi-format>` the +18. In struct :c:type:`v4l2_vbi_format` the ``SAMPLE_FORMAT`` field now contains a four-character-code as used to identify video image formats and ``V4L2_PIX_FMT_GREY`` replaces the ``V4L2_VBI_SF_UBYTE`` define. The ``reserved`` field was extended. -19. In struct :ref:`v4l2_captureparm <v4l2-captureparm>` the type of +19. In struct :c:type:`v4l2_captureparm` the type of the ``timeperframe`` field changed from unsigned long to struct - :ref:`v4l2_fract <v4l2-fract>`. This allows the accurate + :c:type:`v4l2_fract`. This allows the accurate expression of multiples of the NTSC-M frame rate 30000 / 1001. A new field ``readbuffers`` was added to control the driver behaviour in read I/O mode. Similar changes were made to struct - :ref:`v4l2_outputparm <v4l2-outputparm>`. + :c:type:`v4l2_outputparm`. -20. The struct :c:type:`struct v4l2_performance` and +20. The struct ``v4l2_performance`` and ``VIDIOC_G_PERF`` ioctl were dropped. Except when using the :ref:`read/write I/O method <rw>`, which is limited anyway, this information is already available to applications. @@ -768,46 +680,21 @@ V4L2 2003-11-05 :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - Symbol - - - In this document prior to revision 0.5 - - - Corrected - - - .. row 2 - - - ``V4L2_PIX_FMT_RGB24`` - - - B, G, R - - - R, G, B - - - .. row 3 - - - ``V4L2_PIX_FMT_BGR24`` - - - R, G, B - - - B, G, R - - - .. row 4 - - - ``V4L2_PIX_FMT_RGB32`` - - - B, G, R, X - - - R, G, B, X - - - .. row 5 - - - ``V4L2_PIX_FMT_BGR32`` - - - R, G, B, X - - - B, G, R, X + * - Symbol + - In this document prior to revision 0.5 + - Corrected + * - ``V4L2_PIX_FMT_RGB24`` + - B, G, R + - R, G, B + * - ``V4L2_PIX_FMT_BGR24`` + - R, G, B + - B, G, R + * - ``V4L2_PIX_FMT_RGB32`` + - B, G, R, X + - R, G, B, X + * - ``V4L2_PIX_FMT_BGR32`` + - R, G, B, X + - B, G, R, X The ``V4L2_PIX_FMT_BGR24`` example was always correct. @@ -834,7 +721,7 @@ V4L2 in Linux 2.6.8 =================== 1. A new field ``input`` (former ``reserved[0]``) was added to the - struct :ref:`v4l2_buffer <v4l2-buffer>` structure. Purpose of this + struct :c:type:`v4l2_buffer` structure. Purpose of this field is to alternate between video inputs (e. g. cameras) in step with the video capturing process. This function must be enabled with the new ``V4L2_BUF_FLAG_INPUT`` flag. The ``flags`` field is no @@ -854,7 +741,7 @@ V4L2 spec erratum 2004-08-01 4. The documentation of the :ref:`VIDIOC_QBUF` and :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctls did not mention the - struct :ref:`v4l2_buffer <v4l2-buffer>` ``memory`` field. It was + struct :c:type:`v4l2_buffer` ``memory`` field. It was also missing from examples. Also on the ``VIDIOC_DQBUF`` page the ``EIO`` error code was not documented. @@ -882,7 +769,7 @@ V4L2 in Linux 2.6.15 3. The ``VIDIOC_G_COMP`` and ``VIDIOC_S_COMP`` ioctl were renamed to ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` respectively. Their argument was replaced by a struct - :c:type:`struct v4l2_mpeg_compression` pointer. (The + ``v4l2_mpeg_compression`` pointer. (The ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls where removed in Linux 2.6.25.) @@ -901,7 +788,7 @@ V4L2 spec erratum 2006-01-10 ============================ 1. The ``V4L2_IN_ST_COLOR_KILL`` flag in struct - :ref:`v4l2_input <v4l2-input>` not only indicates if the color + :c:type:`v4l2_input` not only indicates if the color killer is enabled, but also if it is active. (The color killer disables color decoding when it detects no color in the video signal to improve the image quality.) @@ -914,18 +801,18 @@ V4L2 spec erratum 2006-01-10 V4L2 spec erratum 2006-02-03 ============================ -1. In struct :ref:`v4l2_captureparm <v4l2-captureparm>` and struct - :ref:`v4l2_outputparm <v4l2-outputparm>` the ``timeperframe`` +1. In struct :c:type:`v4l2_captureparm` and struct + :c:type:`v4l2_outputparm` the ``timeperframe`` field gives the time in seconds, not microseconds. V4L2 spec erratum 2006-02-04 ============================ -1. The ``clips`` field in struct :ref:`v4l2_window <v4l2-window>` - must point to an array of struct :ref:`v4l2_clip <v4l2-clip>`, not +1. The ``clips`` field in struct :c:type:`v4l2_window` + must point to an array of struct :c:type:`v4l2_clip`, not a linked list, because drivers ignore the struct - :c:type:`struct v4l2_clip`. ``next`` pointer. + struct :c:type:`v4l2_clip`. ``next`` pointer. V4L2 in Linux 2.6.17 @@ -951,18 +838,18 @@ V4L2 spec erratum 2006-09-23 (Draft 0.15) not mentioned along with other buffer types. 2. In :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` it was clarified that the struct - :ref:`v4l2_audio <v4l2-audio>` ``mode`` field is a flags field. + :c:type:`v4l2_audio` ``mode`` field is a flags field. 3. :ref:`VIDIOC_QUERYCAP` did not mention the sliced VBI and radio capability flags. 4. In :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` it was clarified that applications must initialize the tuner ``type`` field of struct - :ref:`v4l2_frequency <v4l2-frequency>` before calling + :c:type:`v4l2_frequency` before calling :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>`. 5. The ``reserved`` array in struct - :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` has 2 elements, + :c:type:`v4l2_requestbuffers` has 2 elements, not 32. 6. In :ref:`output` and :ref:`raw-vbi` the device file names @@ -982,7 +869,7 @@ V4L2 in Linux 2.6.18 flag to skip unsupported controls with :ref:`VIDIOC_QUERYCTRL`, new control types ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_TYPE_CTRL_CLASS`` - (:ref:`v4l2-ctrl-type`), and new control flags + (:c:type:`v4l2_ctrl_type`), and new control flags ``V4L2_CTRL_FLAG_READ_ONLY``, ``V4L2_CTRL_FLAG_UPDATE``, ``V4L2_CTRL_FLAG_INACTIVE`` and ``V4L2_CTRL_FLAG_SLIDER`` (:ref:`control-flags`). See :ref:`extended-controls` for details. @@ -991,7 +878,7 @@ V4L2 in Linux 2.6.18 V4L2 in Linux 2.6.19 ==================== -1. In struct :ref:`v4l2_sliced_vbi_cap <v4l2-sliced-vbi-cap>` a +1. In struct :c:type:`v4l2_sliced_vbi_cap` a buffer type field was added replacing a reserved field. Note on architectures where the size of enum types differs from int types the size of the structure changed. The @@ -1029,7 +916,7 @@ V4L2 in Linux 2.6.22 ==================== 1. Two new field orders ``V4L2_FIELD_INTERLACED_TB`` and - ``V4L2_FIELD_INTERLACED_BT`` were added. See :ref:`v4l2-field` for + ``V4L2_FIELD_INTERLACED_BT`` were added. See :c:type:`v4l2_field` for details. 2. Three new clipping/blending methods with a global or straight or @@ -1038,15 +925,15 @@ V4L2 in Linux 2.6.22 and :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` ioctls for details. A new ``global_alpha`` field was added to - :ref:`v4l2_window <v4l2-window>`, extending the structure. This + :c:type:`v4l2_window`, extending the structure. This may *break compatibility* with applications using a struct - :c:type:`struct v4l2_window` directly. However the + struct :c:type:`v4l2_window` directly. However the :ref:`VIDIOC_G/S/TRY_FMT <VIDIOC_G_FMT>` ioctls, which take a - pointer to a :ref:`v4l2_format <v4l2-format>` parent structure + pointer to a :c:type:`v4l2_format` parent structure with padding bytes at the end, are not affected. 3. The format of the ``chromakey`` field in struct - :ref:`v4l2_window <v4l2-window>` changed from "host order RGB32" + :c:type:`v4l2_window` changed from "host order RGB32" to a pixel value in the same format as the framebuffer. This may *break compatibility* with existing applications. Drivers supporting the "host order RGB32" format are not known. @@ -1127,8 +1014,8 @@ V4L2 in Linux 2.6.29 1. The ``VIDIOC_G_CHIP_IDENT`` ioctl was renamed to ``VIDIOC_G_CHIP_IDENT_OLD`` and ``VIDIOC_DBG_G_CHIP_IDENT`` was introduced in its place. The old struct - :c:type:`struct v4l2_chip_ident` was renamed to - :c:type:`struct v4l2_chip_ident_old`. + struct ``v4l2_chip_ident`` was renamed to + struct ``v4l2_chip_ident_old``. 2. The pixel formats ``V4L2_PIX_FMT_VYUY``, ``V4L2_PIX_FMT_NV16`` and ``V4L2_PIX_FMT_NV61`` were added. @@ -1279,7 +1166,7 @@ V4L2 in Linux 3.5 V4L2 in Linux 3.6 ================= -1. Replaced ``input`` in :c:type:`struct v4l2_buffer` by +1. Replaced ``input`` in struct :c:type:`v4l2_buffer` by ``reserved2`` and removed ``V4L2_BUF_FLAG_INPUT``. 2. Added V4L2_CAP_VIDEO_M2M and V4L2_CAP_VIDEO_M2M_MPLANE @@ -1293,7 +1180,7 @@ V4L2 in Linux 3.9 ================= 1. Added timestamp types to ``flags`` field in - :c:type:`struct v4l2_buffer`. See :ref:`buffer-flags`. + struct :c:type:`v4l2_buffer`. See :ref:`buffer-flags`. 2. Added ``V4L2_EVENT_CTRL_CH_RANGE`` control event changes flag. See :ref:`ctrl-changes-flags`. @@ -1320,7 +1207,7 @@ V4L2 in Linux 3.11 V4L2 in Linux 3.14 ================== -1. In struct :c:type:`struct v4l2_rect`, the type of ``width`` and +1. In struct :c:type:`v4l2_rect`, the type of ``width`` and ``height`` fields changed from _s32 to _u32. @@ -1339,7 +1226,7 @@ V4L2 in Linux 3.16 V4L2 in Linux 3.17 ================== -1. Extended struct :ref:`v4l2_pix_format <v4l2-pix-format>`. Added +1. Extended struct :c:type:`v4l2_pix_format`. Added format flags. 2. Added compound control types and @@ -1357,11 +1244,11 @@ V4L2 in Linux 3.19 ================== 1. Rewrote Colorspace chapter, added new enum - :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` and enum - :ref:`v4l2_quantization <v4l2-quantization>` fields to struct - :ref:`v4l2_pix_format <v4l2-pix-format>`, struct - :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` and - struct :ref:`v4l2_mbus_framefmt <v4l2-mbus-framefmt>`. + :c:type:`v4l2_ycbcr_encoding` and enum + :c:type:`v4l2_quantization` fields to struct + :c:type:`v4l2_pix_format`, struct + :c:type:`v4l2_pix_format_mplane` and + struct :c:type:`v4l2_mbus_framefmt`. V4L2 in Linux 4.4 diff --git a/Documentation/media/uapi/v4l/libv4l-introduction.rst b/Documentation/media/uapi/v4l/libv4l-introduction.rst index 61d085f9f105..ccc3c4d2fc0f 100644 --- a/Documentation/media/uapi/v4l/libv4l-introduction.rst +++ b/Documentation/media/uapi/v4l/libv4l-introduction.rst @@ -113,56 +113,71 @@ Libv4l device control functions The common file operation methods are provided by libv4l. -Those functions operate just like glibc -open/close/dup/ioctl/read/mmap/munmap: +Those functions operate just like the gcc function ``dup()`` and +V4L2 functions +:c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, +:c:func:`ioctl() <v4l2-ioctl>`, :c:func:`read() <v4l2-read>`, +:c:func:`mmap() <v4l2-mmap>` and :c:func:`munmap() <v4l2-munmap>`: -- :c:type:`int v4l2_open(const char *file, int oflag, ...)` - operates like the - standard :ref:`open() <func-open>` function. +.. c:function:: int v4l2_open(const char *file, int oflag, ...) -- :c:type:`int v4l2_close(int fd)` - operates like the standard - :ref:`close() <func-close>` function. + operates like the :c:func:`open() <v4l2-open>` function. -- :c:type:`int v4l2_dup(int fd)` - operates like the standard dup() function, - duplicating a file handler. +.. c:function:: int v4l2_close(int fd) -- :c:type:`int v4l2_ioctl (int fd, unsigned long int request, ...)` - operates - like the standard :ref:`ioctl() <func-ioctl>` function. + operates like the :c:func:`close() <v4l2-close>` function. -- :c:type:`int v4l2_read (int fd, void* buffer, size_t n)` - operates like the - standard :ref:`read() <func-read>` function. +.. c:function:: int v4l2_dup(int fd) -- :c:type:`void v4l2_mmap(void *start, size_t length, int prot, int flags, int - fd, int64_t offset);` - operates like the standard - :ref:`mmap() <func-mmap>` function. + operates like the libc ``dup()`` function, duplicating a file handler. -- :c:type:`int v4l2_munmap(void *_start, size_t length);` - operates like the - standard :ref:`munmap() <func-munmap>` function. +.. c:function:: int v4l2_ioctl (int fd, unsigned long int request, ...) + + operates like the :c:func:`ioctl() <v4l2-ioctl>` function. + +.. c:function:: int v4l2_read (int fd, void* buffer, size_t n) + + operates like the :c:func:`read() <v4l2-read>` function. + +.. c:function:: void v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); + + operates like the :c:func:`munmap() <v4l2-munmap>` function. + +.. c:function:: int v4l2_munmap(void *_start, size_t length); + + operates like the :c:func:`munmap() <v4l2-munmap>` function. Those functions provide additional control: -- :c:type:`int v4l2_fd_open(int fd, int v4l2_flags)` - opens an already opened - fd for further use through v4l2lib and possibly modify libv4l2's - default behavior through the v4l2_flags argument. Currently, - v4l2_flags can be ``V4L2_DISABLE_CONVERSION``, to disable format - conversion. +.. c:function:: int v4l2_fd_open(int fd, int v4l2_flags) + + opens an already opened fd for further use through v4l2lib and possibly + modify libv4l2's default behavior through the ``v4l2_flags`` argument. + Currently, ``v4l2_flags`` can be ``V4L2_DISABLE_CONVERSION``, to disable + format conversion. -- :c:type:`int v4l2_set_control(int fd, int cid, int value)` - This function - takes a value of 0 - 65535, and then scales that range to the actual - range of the given v4l control id, and then if the cid exists and is +.. c:function:: int v4l2_set_control(int fd, int cid, int value) + + This function takes a value of 0 - 65535, and then scales that range to the + actual range of the given v4l control id, and then if the cid exists and is not locked sets the cid to the scaled value. -- :c:type:`int v4l2_get_control(int fd, int cid)` - This function returns a - value of 0 - 65535, scaled to from the actual range of the given v4l - control id. when the cid does not exist, could not be accessed for - some reason, or some error occurred 0 is returned. +.. c:function:: int v4l2_get_control(int fd, int cid) + + This function returns a value of 0 - 65535, scaled to from the actual range + of the given v4l control id. when the cid does not exist, could not be + accessed for some reason, or some error occurred 0 is returned. v4l1compat.so wrapper library ============================= -This library intercepts calls to open/close/ioctl/mmap/mmunmap +This library intercepts calls to +:c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, +:c:func:`ioctl() <v4l2-ioctl>`, :c:func:`mmap() <v4l2-mmap>` and +:c:func:`munmap() <v4l2-munmap>` operations and redirects them to the libv4l counterparts, by using -LD_PRELOAD=/usr/lib/v4l1compat.so. It also emulates V4L1 calls via V4L2 +``LD_PRELOAD=/usr/lib/v4l1compat.so``. It also emulates V4L1 calls via V4L2 API. It allows usage of binary legacy applications that still don't use diff --git a/Documentation/media/uapi/v4l/mmap.rst b/Documentation/media/uapi/v4l/mmap.rst index 7ad5d5e76163..670596c1a4f7 100644 --- a/Documentation/media/uapi/v4l/mmap.rst +++ b/Documentation/media/uapi/v4l/mmap.rst @@ -8,7 +8,7 @@ Streaming I/O (Memory Mapping) Input and output devices support this I/O method when the ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl is set. There are two streaming methods, to determine if the memory mapping flavor is supported applications must call the :ref:`VIDIOC_REQBUFS` ioctl @@ -39,10 +39,10 @@ address space with the :ref:`mmap() <func-mmap>` function. The location of the buffers in device memory can be determined with the :ref:`VIDIOC_QUERYBUF` ioctl. In the single-planar API case, the ``m.offset`` and ``length`` returned in a struct -:ref:`v4l2_buffer <v4l2-buffer>` are passed as sixth and second +:c:type:`v4l2_buffer` are passed as sixth and second parameter to the :ref:`mmap() <func-mmap>` function. When using the -multi-planar API, struct :ref:`v4l2_buffer <v4l2-buffer>` contains an -array of struct :ref:`v4l2_plane <v4l2-plane>` structures, each +multi-planar API, struct :c:type:`v4l2_buffer` contains an +array of struct :c:type:`v4l2_plane` structures, each containing its own ``m.offset`` and ``length``. When using the multi-planar API, every plane of every buffer has to be mapped separately, so the number of calls to :ref:`mmap() <func-mmap>` should @@ -218,7 +218,7 @@ to function, apart of this no limit exists on the number of buffers applications can enqueue in advance, or dequeue and process. They can also enqueue in a different order than buffers have been dequeued, and the driver can *fill* enqueued *empty* buffers in any order. [#f2]_ The -index number of a buffer (struct :ref:`v4l2_buffer <v4l2-buffer>` +index number of a buffer (struct :c:type:`v4l2_buffer` ``index``) plays no role here, it only identifies the buffer. Initially all mapped buffers are in dequeued state, inaccessible by the @@ -251,7 +251,7 @@ To start and stop capturing or output applications call the removes all buffers from both queues as a side effect. Since there is no notion of doing anything "now" on a multitasking system, if an application needs to synchronize with another event it should examine - the struct ::ref:`v4l2_buffer <v4l2-buffer>` ``timestamp`` of captured + the struct ::c:type:`v4l2_buffer` ``timestamp`` of captured or outputted buffers. Drivers implementing memory mapping I/O must support the diff --git a/Documentation/media/uapi/v4l/pixfmt-002.rst b/Documentation/media/uapi/v4l/pixfmt-002.rst index fae9b2d40a85..0d9e697f5d4e 100644 --- a/Documentation/media/uapi/v4l/pixfmt-002.rst +++ b/Documentation/media/uapi/v4l/pixfmt-002.rst @@ -4,193 +4,130 @@ Single-planar format structure ****************************** +.. tabularcolumns:: |p{4.0cm}|p{2.5cm}|p{11.0cm}| -.. _v4l2-pix-format: +.. c:type:: v4l2_pix_format + +.. cssclass:: longtable .. flat-table:: struct v4l2_pix_format :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``width`` - - - Image width in pixels. - - - .. row 2 - - - __u32 - - - ``height`` - - - Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``, - ``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height - refers to the number of lines in the field, otherwise it refers to - the number of lines in the frame (which is twice the field height - for interlaced formats). - - - .. row 3 - - - :cspan:`2` Applications set these fields to request an image - size, drivers return the closest possible values. In case of - planar formats the ``width`` and ``height`` applies to the largest - plane. To avoid ambiguities drivers must return values rounded up - to a multiple of the scale factor of any smaller planes. For - example when the image format is YUV 4:2:0, ``width`` and - ``height`` must be multiples of two. - - - .. row 4 - - - __u32 - - - ``pixelformat`` - - - The pixel format or type of compression, set by the application. - This is a little endian - :ref:`four character code <v4l2-fourcc>`. V4L2 defines standard - RGB formats in :ref:`rgb-formats`, YUV formats in - :ref:`yuv-formats`, and reserved codes in - :ref:`reserved-formats` - - - .. row 5 - - - enum :ref:`v4l2_field <v4l2-field>` - - - ``field`` - - - Video images are typically interlaced. Applications can request to - capture or output only the top or bottom field, or both fields - interlaced or sequentially stored in one buffer or alternating in - separate buffers. Drivers return the actual field order selected. - For more details on fields see :ref:`field-order`. - - - .. row 6 - - - __u32 - - - ``bytesperline`` - - - Distance in bytes between the leftmost pixels in two adjacent - lines. - - - .. row 7 - - - :cspan:`2` - - Both applications and drivers can set this field to request - padding bytes at the end of each line. Drivers however may ignore - the value requested by the application, returning ``width`` times - bytes per pixel or a larger value required by the hardware. That - implies applications can just set this field to zero to get a - reasonable default. - - Video hardware may access padding bytes, therefore they must - reside in accessible memory. Consider cases where padding bytes - after the last line of an image cross a system page boundary. - Input devices may write padding bytes, the value is undefined. - Output devices ignore the contents of padding bytes. - - When the image format is planar the ``bytesperline`` value applies - to the first plane and is divided by the same factor as the - ``width`` field for the other planes. For example the Cb and Cr - planes of a YUV 4:2:0 image have half as many padding bytes - following each line as the Y plane. To avoid ambiguities drivers - must return a ``bytesperline`` value rounded up to a multiple of - the scale factor. - - For compressed formats the ``bytesperline`` value makes no sense. - Applications and drivers must set this to 0 in that case. - - - .. row 8 - - - __u32 - - - ``sizeimage`` - - - Size in bytes of the buffer to hold a complete image, set by the - driver. Usually this is ``bytesperline`` times ``height``. When - the image consists of variable length compressed data this is the - maximum number of bytes required to hold an image. - - - .. row 9 - - - enum :ref:`v4l2_colorspace <v4l2-colorspace>` - - - ``colorspace`` - - - This information supplements the ``pixelformat`` and must be set - by the driver for capture streams and by the application for - output streams, see :ref:`colorspaces`. - - - .. row 10 - - - __u32 - - - ``priv`` - - - This field indicates whether the remaining fields of the - :ref:`struct v4l2_pix_format <v4l2-pix-format>` structure, also called the - extended fields, are valid. When set to - ``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields - have been correctly initialized. When set to any other value it - indicates that the extended fields contain undefined values. - - Applications that wish to use the pixel format extended fields - must first ensure that the feature is supported by querying the - device for the :ref:`V4L2_CAP_EXT_PIX_FORMAT <querycap>` - capability. If the capability isn't set the pixel format extended - fields are not supported and using the extended fields will lead - to undefined results. - - To use the extended fields, applications must set the ``priv`` - field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended - fields and zero the unused bytes of the - :ref:`struct v4l2_format <v4l2-format>` ``raw_data`` field. - - When the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC`` - drivers must act as if all the extended fields were set to zero. - On return drivers must set the ``priv`` field to - ``V4L2_PIX_FMT_PRIV_MAGIC`` and all the extended fields to - applicable values. - - - .. row 11 - - - __u32 - - - ``flags`` - - - Flags set by the application or driver, see :ref:`format-flags`. - - - .. row 12 - - - enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` - - - ``ycbcr_enc`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. - - - .. row 13 - - - enum :ref:`v4l2_quantization <v4l2-quantization>` - - - ``quantization`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. - - - .. row 14 - - - enum :ref:`v4l2_xfer_func <v4l2-xfer-func>` - - - ``xfer_func`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. + * - __u32 + - ``width`` + - Image width in pixels. + * - __u32 + - ``height`` + - Image height in pixels. If ``field`` is one of ``V4L2_FIELD_TOP``, + ``V4L2_FIELD_BOTTOM`` or ``V4L2_FIELD_ALTERNATE`` then height + refers to the number of lines in the field, otherwise it refers to + the number of lines in the frame (which is twice the field height + for interlaced formats). + * - :cspan:`2` Applications set these fields to request an image + size, drivers return the closest possible values. In case of + planar formats the ``width`` and ``height`` applies to the largest + plane. To avoid ambiguities drivers must return values rounded up + to a multiple of the scale factor of any smaller planes. For + example when the image format is YUV 4:2:0, ``width`` and + ``height`` must be multiples of two. + * - __u32 + - ``pixelformat`` + - The pixel format or type of compression, set by the application. + This is a little endian + :ref:`four character code <v4l2-fourcc>`. V4L2 defines standard + RGB formats in :ref:`rgb-formats`, YUV formats in + :ref:`yuv-formats`, and reserved codes in + :ref:`reserved-formats` + * - enum :c:type::`v4l2_field` + - ``field`` + - Video images are typically interlaced. Applications can request to + capture or output only the top or bottom field, or both fields + interlaced or sequentially stored in one buffer or alternating in + separate buffers. Drivers return the actual field order selected. + For more details on fields see :ref:`field-order`. + * - __u32 + - ``bytesperline`` + - Distance in bytes between the leftmost pixels in two adjacent + lines. + * - :cspan:`2` + + Both applications and drivers can set this field to request + padding bytes at the end of each line. Drivers however may ignore + the value requested by the application, returning ``width`` times + bytes per pixel or a larger value required by the hardware. That + implies applications can just set this field to zero to get a + reasonable default. + + Video hardware may access padding bytes, therefore they must + reside in accessible memory. Consider cases where padding bytes + after the last line of an image cross a system page boundary. + Input devices may write padding bytes, the value is undefined. + Output devices ignore the contents of padding bytes. + + When the image format is planar the ``bytesperline`` value applies + to the first plane and is divided by the same factor as the + ``width`` field for the other planes. For example the Cb and Cr + planes of a YUV 4:2:0 image have half as many padding bytes + following each line as the Y plane. To avoid ambiguities drivers + must return a ``bytesperline`` value rounded up to a multiple of + the scale factor. + + For compressed formats the ``bytesperline`` value makes no sense. + Applications and drivers must set this to 0 in that case. + * - __u32 + - ``sizeimage`` + - Size in bytes of the buffer to hold a complete image, set by the + driver. Usually this is ``bytesperline`` times ``height``. When + the image consists of variable length compressed data this is the + maximum number of bytes required to hold an image. + * - enum :c:type:`v4l2_colorspace` + - ``colorspace`` + - This information supplements the ``pixelformat`` and must be set + by the driver for capture streams and by the application for + output streams, see :ref:`colorspaces`. + * - __u32 + - ``priv`` + - This field indicates whether the remaining fields of the + struct :c:type:`v4l2_pix_format`, also called the + extended fields, are valid. When set to + ``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields + have been correctly initialized. When set to any other value it + indicates that the extended fields contain undefined values. + + Applications that wish to use the pixel format extended fields + must first ensure that the feature is supported by querying the + device for the :ref:`V4L2_CAP_EXT_PIX_FORMAT <querycap>` + capability. If the capability isn't set the pixel format extended + fields are not supported and using the extended fields will lead + to undefined results. + + To use the extended fields, applications must set the ``priv`` + field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended + fields and zero the unused bytes of the + struct :c:type:`v4l2_format` ``raw_data`` field. + + When the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC`` + drivers must act as if all the extended fields were set to zero. + On return drivers must set the ``priv`` field to + ``V4L2_PIX_FMT_PRIV_MAGIC`` and all the extended fields to + applicable values. + * - __u32 + - ``flags`` + - Flags set by the application or driver, see :ref:`format-flags`. + * - enum :c:type:`v4l2_ycbcr_encoding` + - ``ycbcr_enc`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. + * - enum :c:type:`v4l2_quantization` + - ``quantization`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. + * - enum :c:type:`v4l2_xfer_func` + - ``xfer_func`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. diff --git a/Documentation/media/uapi/v4l/pixfmt-003.rst b/Documentation/media/uapi/v4l/pixfmt-003.rst index 25c54872fbe1..ae9ea7a791de 100644 --- a/Documentation/media/uapi/v4l/pixfmt-003.rst +++ b/Documentation/media/uapi/v4l/pixfmt-003.rst @@ -4,163 +4,91 @@ Multi-planar format structures ****************************** -The :ref:`struct v4l2_plane_pix_format <v4l2-plane-pix-format>` structures define size +The struct :c:type:`v4l2_plane_pix_format` structures define size and layout for each of the planes in a multi-planar format. The -:ref:`struct v4l2_pix_format_mplane <v4l2-pix-format-mplane>` structure contains +struct :c:type:`v4l2_pix_format_mplane` structure contains information common to all planes (such as image width and height) and an -array of :ref:`struct v4l2_plane_pix_format <v4l2-plane-pix-format>` structures, +array of struct :c:type:`v4l2_plane_pix_format` structures, describing all planes of that format. -.. _v4l2-plane-pix-format: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_plane_pix_format .. flat-table:: struct v4l2_plane_pix_format :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - __u32 + - ``sizeimage`` + - Maximum size in bytes required for image data in this plane. + * - __u32 + - ``bytesperline`` + - Distance in bytes between the leftmost pixels in two adjacent + lines. See struct :c:type:`v4l2_pix_format`. + * - __u16 + - ``reserved[6]`` + - Reserved for future extensions. Should be zeroed by drivers and + applications. - - .. row 1 - - - __u32 - - - ``sizeimage`` - - - Maximum size in bytes required for image data in this plane. - - - .. row 2 - - - __u32 - - - ``bytesperline`` - - - Distance in bytes between the leftmost pixels in two adjacent - lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. - - .. row 3 +.. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}| - - __u16 - - - ``reserved[6]`` - - - Reserved for future extensions. Should be zeroed by drivers and - applications. - - - -.. _v4l2-pix-format-mplane: +.. c:type:: v4l2_pix_format_mplane .. flat-table:: struct v4l2_pix_format_mplane :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``width`` - - - Image width in pixels. See struct - :ref:`v4l2_pix_format <v4l2-pix-format>`. - - - .. row 2 - - - __u32 - - - ``height`` - - - Image height in pixels. See struct - :ref:`v4l2_pix_format <v4l2-pix-format>`. - - - .. row 3 - - - __u32 - - - ``pixelformat`` - - - The pixel format. Both single- and multi-planar four character - codes can be used. - - - .. row 4 - - - enum :ref:`v4l2_field <v4l2-field>` - - - ``field`` - - - See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. - - - .. row 5 - - - enum :ref:`v4l2_colorspace <v4l2-colorspace>` - - - ``colorspace`` - - - See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. - - - .. row 6 - - - struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>` - - - ``plane_fmt[VIDEO_MAX_PLANES]`` - - - An array of structures describing format of each plane this pixel - format consists of. The number of valid entries in this array has - to be put in the ``num_planes`` field. - - - .. row 7 - - - __u8 - - - ``num_planes`` - - - Number of planes (i.e. separate memory buffers) for this format - and the number of valid entries in the ``plane_fmt`` array. - - - .. row 8 - - - __u8 - - - ``flags`` - - - Flags set by the application or driver, see :ref:`format-flags`. - - - .. row 9 - - - enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` - - - ``ycbcr_enc`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. - - - .. row 10 - - - enum :ref:`v4l2_quantization <v4l2-quantization>` - - - ``quantization`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. - - - .. row 11 - - - enum :ref:`v4l2_xfer_func <v4l2-xfer-func>` - - - ``xfer_func`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. - - - .. row 12 - - - __u8 - - - ``reserved[7]`` - - - Reserved for future extensions. Should be zeroed by drivers and - applications. + * - __u32 + - ``width`` + - Image width in pixels. See struct + :c:type:`v4l2_pix_format`. + * - __u32 + - ``height`` + - Image height in pixels. See struct + :c:type:`v4l2_pix_format`. + * - __u32 + - ``pixelformat`` + - The pixel format. Both single- and multi-planar four character + codes can be used. + * - enum :c:type:`v4l2_field` + - ``field`` + - See struct :c:type:`v4l2_pix_format`. + * - enum :c:type:`v4l2_colorspace` + - ``colorspace`` + - See struct :c:type:`v4l2_pix_format`. + * - struct :c:type:`v4l2_plane_pix_format` + - ``plane_fmt[VIDEO_MAX_PLANES]`` + - An array of structures describing format of each plane this pixel + format consists of. The number of valid entries in this array has + to be put in the ``num_planes`` field. + * - __u8 + - ``num_planes`` + - Number of planes (i.e. separate memory buffers) for this format + and the number of valid entries in the ``plane_fmt`` array. + * - __u8 + - ``flags`` + - Flags set by the application or driver, see :ref:`format-flags`. + * - enum :c:type:`v4l2_ycbcr_encoding` + - ``ycbcr_enc`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. + * - enum :c:type:`v4l2_quantization` + - ``quantization`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. + * - enum :c:type:`v4l2_xfer_func` + - ``xfer_func`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. + * - __u8 + - ``reserved[7]`` + - Reserved for future extensions. Should be zeroed by drivers and + applications. diff --git a/Documentation/media/uapi/v4l/pixfmt-006.rst b/Documentation/media/uapi/v4l/pixfmt-006.rst index 987b9a8a9eb4..a9890ff6038b 100644 --- a/Documentation/media/uapi/v4l/pixfmt-006.rst +++ b/Documentation/media/uapi/v4l/pixfmt-006.rst @@ -5,284 +5,145 @@ Defining Colorspaces in V4L2 **************************** In V4L2 colorspaces are defined by four values. The first is the -colorspace identifier (enum :ref:`v4l2_colorspace <v4l2-colorspace>`) +colorspace identifier (enum :c:type:`v4l2_colorspace`) which defines the chromaticities, the default transfer function, the default Y'CbCr encoding and the default quantization method. The second is the transfer function identifier (enum -:ref:`v4l2_xfer_func <v4l2-xfer-func>`) to specify non-standard +:c:type:`v4l2_xfer_func`) to specify non-standard transfer functions. The third is the Y'CbCr encoding identifier (enum -:ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>`) to specify +:c:type:`v4l2_ycbcr_encoding`) to specify non-standard Y'CbCr encodings and the fourth is the quantization -identifier (enum :ref:`v4l2_quantization <v4l2-quantization>`) to +identifier (enum :c:type:`v4l2_quantization`) to specify non-standard quantization methods. Most of the time only the -colorspace field of struct :ref:`v4l2_pix_format <v4l2-pix-format>` -or struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` +colorspace field of struct :c:type:`v4l2_pix_format` +or struct :c:type:`v4l2_pix_format_mplane` needs to be filled in. -.. note:: The default R'G'B' quantization is full range for all +.. note:: + + The default R'G'B' quantization is full range for all colorspaces except for BT.2020 which uses limited range R'G'B' quantization. +.. tabularcolumns:: |p{6.0cm}|p{11.5cm}| -.. _v4l2-colorspace: +.. c:type:: v4l2_colorspace .. flat-table:: V4L2 Colorspaces :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - Identifier - - - Details - - - .. row 2 - - - ``V4L2_COLORSPACE_DEFAULT`` - - - The default colorspace. This can be used by applications to let - the driver fill in the colorspace. - - - .. row 3 - - - ``V4L2_COLORSPACE_SMPTE170M`` - - - See :ref:`col-smpte-170m`. - - - .. row 4 - - - ``V4L2_COLORSPACE_REC709`` - - - See :ref:`col-rec709`. - - - .. row 5 - - - ``V4L2_COLORSPACE_SRGB`` - - - See :ref:`col-srgb`. - - - .. row 6 - - - ``V4L2_COLORSPACE_ADOBERGB`` - - - See :ref:`col-adobergb`. - - - .. row 7 - - - ``V4L2_COLORSPACE_BT2020`` - - - See :ref:`col-bt2020`. - - - .. row 8 - - - ``V4L2_COLORSPACE_DCI_P3`` - - - See :ref:`col-dcip3`. - - - .. row 9 - - - ``V4L2_COLORSPACE_SMPTE240M`` - - - See :ref:`col-smpte-240m`. - - - .. row 10 - - - ``V4L2_COLORSPACE_470_SYSTEM_M`` - - - See :ref:`col-sysm`. - - - .. row 11 - - - ``V4L2_COLORSPACE_470_SYSTEM_BG`` - - - See :ref:`col-sysbg`. - - - .. row 12 - - - ``V4L2_COLORSPACE_JPEG`` - - - See :ref:`col-jpeg`. - - - .. row 13 - - - ``V4L2_COLORSPACE_RAW`` - - - The raw colorspace. This is used for raw image capture where the - image is minimally processed and is using the internal colorspace - of the device. The software that processes an image using this - 'colorspace' will have to know the internals of the capture - device. - - - -.. _v4l2-xfer-func: + * - Identifier + - Details + * - ``V4L2_COLORSPACE_DEFAULT`` + - The default colorspace. This can be used by applications to let + the driver fill in the colorspace. + * - ``V4L2_COLORSPACE_SMPTE170M`` + - See :ref:`col-smpte-170m`. + * - ``V4L2_COLORSPACE_REC709`` + - See :ref:`col-rec709`. + * - ``V4L2_COLORSPACE_SRGB`` + - See :ref:`col-srgb`. + * - ``V4L2_COLORSPACE_ADOBERGB`` + - See :ref:`col-adobergb`. + * - ``V4L2_COLORSPACE_BT2020`` + - See :ref:`col-bt2020`. + * - ``V4L2_COLORSPACE_DCI_P3`` + - See :ref:`col-dcip3`. + * - ``V4L2_COLORSPACE_SMPTE240M`` + - See :ref:`col-smpte-240m`. + * - ``V4L2_COLORSPACE_470_SYSTEM_M`` + - See :ref:`col-sysm`. + * - ``V4L2_COLORSPACE_470_SYSTEM_BG`` + - See :ref:`col-sysbg`. + * - ``V4L2_COLORSPACE_JPEG`` + - See :ref:`col-jpeg`. + * - ``V4L2_COLORSPACE_RAW`` + - The raw colorspace. This is used for raw image capture where the + image is minimally processed and is using the internal colorspace + of the device. The software that processes an image using this + 'colorspace' will have to know the internals of the capture + device. + + + +.. c:type:: v4l2_xfer_func .. flat-table:: V4L2 Transfer Function :header-rows: 1 :stub-columns: 0 + * - Identifier + - Details + * - ``V4L2_XFER_FUNC_DEFAULT`` + - Use the default transfer function as defined by the colorspace. + * - ``V4L2_XFER_FUNC_709`` + - Use the Rec. 709 transfer function. + * - ``V4L2_XFER_FUNC_SRGB`` + - Use the sRGB transfer function. + * - ``V4L2_XFER_FUNC_ADOBERGB`` + - Use the AdobeRGB transfer function. + * - ``V4L2_XFER_FUNC_SMPTE240M`` + - Use the SMPTE 240M transfer function. + * - ``V4L2_XFER_FUNC_NONE`` + - Do not use a transfer function (i.e. use linear RGB values). + * - ``V4L2_XFER_FUNC_DCI_P3`` + - Use the DCI-P3 transfer function. + * - ``V4L2_XFER_FUNC_SMPTE2084`` + - Use the SMPTE 2084 transfer function. - - .. row 1 - - - Identifier - - - Details - - - .. row 2 - - - ``V4L2_XFER_FUNC_DEFAULT`` - - - Use the default transfer function as defined by the colorspace. - - - .. row 3 - - - ``V4L2_XFER_FUNC_709`` - - - Use the Rec. 709 transfer function. - - - .. row 4 - - - ``V4L2_XFER_FUNC_SRGB`` - - - Use the sRGB transfer function. - - - .. row 5 - - ``V4L2_XFER_FUNC_ADOBERGB`` - - Use the AdobeRGB transfer function. +.. c:type:: v4l2_ycbcr_encoding - - .. row 6 - - - ``V4L2_XFER_FUNC_SMPTE240M`` - - - Use the SMPTE 240M transfer function. - - - .. row 7 - - - ``V4L2_XFER_FUNC_NONE`` - - - Do not use a transfer function (i.e. use linear RGB values). - - - .. row 8 - - - ``V4L2_XFER_FUNC_DCI_P3`` - - - Use the DCI-P3 transfer function. - - - .. row 9 - - - ``V4L2_XFER_FUNC_SMPTE2084`` - - - Use the SMPTE 2084 transfer function. - - - -.. _v4l2-ycbcr-encoding: +.. tabularcolumns:: |p{6.5cm}|p{11.0cm}| .. flat-table:: V4L2 Y'CbCr Encodings :header-rows: 1 :stub-columns: 0 + * - Identifier + - Details + * - ``V4L2_YCBCR_ENC_DEFAULT`` + - Use the default Y'CbCr encoding as defined by the colorspace. + * - ``V4L2_YCBCR_ENC_601`` + - Use the BT.601 Y'CbCr encoding. + * - ``V4L2_YCBCR_ENC_709`` + - Use the Rec. 709 Y'CbCr encoding. + * - ``V4L2_YCBCR_ENC_XV601`` + - Use the extended gamut xvYCC BT.601 encoding. + * - ``V4L2_YCBCR_ENC_XV709`` + - Use the extended gamut xvYCC Rec. 709 encoding. + * - ``V4L2_YCBCR_ENC_BT2020`` + - Use the default non-constant luminance BT.2020 Y'CbCr encoding. + * - ``V4L2_YCBCR_ENC_BT2020_CONST_LUM`` + - Use the constant luminance BT.2020 Yc'CbcCrc encoding. + * - ``V4L2_YCBCR_ENC_SMPTE_240M`` + - Use the SMPTE 240M Y'CbCr encoding. - - .. row 1 - - - Identifier - - - Details - - - .. row 2 - - - ``V4L2_YCBCR_ENC_DEFAULT`` - - - Use the default Y'CbCr encoding as defined by the colorspace. - - - .. row 3 - - - ``V4L2_YCBCR_ENC_601`` - - - Use the BT.601 Y'CbCr encoding. - - - .. row 4 - - - ``V4L2_YCBCR_ENC_709`` - - - Use the Rec. 709 Y'CbCr encoding. - - - .. row 5 - - - ``V4L2_YCBCR_ENC_XV601`` - - - Use the extended gamut xvYCC BT.601 encoding. - - .. row 6 - - ``V4L2_YCBCR_ENC_XV709`` +.. c:type:: v4l2_quantization - - Use the extended gamut xvYCC Rec. 709 encoding. - - - .. row 7 - - - ``V4L2_YCBCR_ENC_SYCC`` - - - Use the extended gamut sYCC encoding. - - - .. row 8 - - - ``V4L2_YCBCR_ENC_BT2020`` - - - Use the default non-constant luminance BT.2020 Y'CbCr encoding. - - - .. row 9 - - - ``V4L2_YCBCR_ENC_BT2020_CONST_LUM`` - - - Use the constant luminance BT.2020 Yc'CbcCrc encoding. - - - .. row 10 - - - ``V4L2_YCBCR_ENC_SMPTE_240M`` - - - Use the SMPTE 240M Y'CbCr encoding. - - - -.. _v4l2-quantization: +.. tabularcolumns:: |p{6.5cm}|p{11.0cm}| .. flat-table:: V4L2 Quantization Methods :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - Identifier - - - Details - - - .. row 2 - - - ``V4L2_QUANTIZATION_DEFAULT`` - - - Use the default quantization encoding as defined by the - colorspace. This is always full range for R'G'B' (except for the - BT.2020 colorspace) and usually limited range for Y'CbCr. - - - .. row 3 - - - ``V4L2_QUANTIZATION_FULL_RANGE`` - - - Use the full range quantization encoding. I.e. the range [0…1] is - mapped to [0…255] (with possible clipping to [1…254] to avoid the - 0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to - [0…255] (with possible clipping to [1…254] to avoid the 0x00 and - 0xff values). - - - .. row 4 - - - ``V4L2_QUANTIZATION_LIM_RANGE`` - - - Use the limited range quantization encoding. I.e. the range [0…1] - is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to - [16…240]. + * - Identifier + - Details + * - ``V4L2_QUANTIZATION_DEFAULT`` + - Use the default quantization encoding as defined by the + colorspace. This is always full range for R'G'B' (except for the + BT.2020 colorspace) and usually limited range for Y'CbCr. + * - ``V4L2_QUANTIZATION_FULL_RANGE`` + - Use the full range quantization encoding. I.e. the range [0…1] is + mapped to [0…255] (with possible clipping to [1…254] to avoid the + 0x00 and 0xff values). Cb and Cr are mapped from [-0.5…0.5] to + [0…255] (with possible clipping to [1…254] to avoid the 0x00 and + 0xff values). + * - ``V4L2_QUANTIZATION_LIM_RANGE`` + - Use the limited range quantization encoding. I.e. the range [0…1] + is mapped to [16…235]. Cb and Cr are mapped from [-0.5…0.5] to + [16…240]. diff --git a/Documentation/media/uapi/v4l/pixfmt-007.rst b/Documentation/media/uapi/v4l/pixfmt-007.rst index 8c946b0c63a0..44bb5a7059b3 100644 --- a/Documentation/media/uapi/v4l/pixfmt-007.rst +++ b/Documentation/media/uapi/v4l/pixfmt-007.rst @@ -19,51 +19,28 @@ are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: SMPTE 170M Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.630 - - - 0.340 - - - .. row 3 - - - Green - - - 0.310 - - - 0.595 - - - .. row 4 - - - Blue - - - 0.155 - - - 0.070 - - - .. row 5 - - - White Reference (D65) - - - 0.3127 - - - 0.3290 + * - Color + - x + - y + * - Red + - 0.630 + - 0.340 + * - Green + - 0.310 + - 0.595 + * - Blue + - 0.155 + - 0.070 + * - White Reference (D65) + - 0.3127 + - 0.3290 The red, green and blue chromaticities are also often referred to as the @@ -72,28 +49,34 @@ SMPTE C set, so this colorspace is sometimes called SMPTE C as well. The transfer function defined for SMPTE 170M is the same as the one defined in Rec. 709. - L' = -1.099(-L) :sup:`0.45` + 0.099 for L ≤ -0.018 +.. math:: + + L' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le-0.018 - L' = 4.5L for -0.018 < L < 0.018 + L' = 4.5L \text{, for } -0.018 < L < 0.018 - L' = 1.099L :sup:`0.45` - 0.099 for L ≥ 0.018 + L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018 Inverse Transfer function: - L = -((L' - 0.099) / -1.099) :sup:`1/0.45` for L' ≤ -0.081 +.. math:: - L = L' / 4.5 for -0.081 < L' < 0.081 + L = -\left( \frac{L' - 0.099}{-1.099} \right) ^{\frac{1}{0.45}} \text{, for } L' \le -0.081 - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \frac{L'}{4.5} \text{, for } -0.081 < L' < 0.081 + + L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding: - Y' = 0.299R' + 0.587G' + 0.114B' +.. math:: - Cb = -0.169R' - 0.331G' + 0.5B' + Y' = 0.2990R' + 0.5870G' + 0.1140B' - Cr = 0.5R' - 0.419G' - 0.081B' + Cb = -0.1687R' - 0.3313G' + 0.5B' + + Cr = 0.5R' - 0.4187G' - 0.0813B' Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This conversion to Y'CbCr is identical to the one defined in @@ -117,51 +100,28 @@ and the white reference are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: Rec. 709 Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.640 - - - 0.330 - - - .. row 3 - - - Green - - - 0.300 - - - 0.600 - - - .. row 4 - - - Blue - - - 0.150 - - - 0.060 - - - .. row 5 - - - White Reference (D65) - - - 0.3127 - - - 0.3290 + * - Color + - x + - y + * - Red + - 0.640 + - 0.330 + * - Green + - 0.300 + - 0.600 + * - Blue + - 0.150 + - 0.060 + * - White Reference (D65) + - 0.3127 + - 0.3290 The full name of this standard is Rec. ITU-R BT.709-5. @@ -169,23 +129,29 @@ The full name of this standard is Rec. ITU-R BT.709-5. Transfer function. Normally L is in the range [0…1], but for the extended gamut xvYCC encoding values outside that range are allowed. - L' = -1.099(-L) :sup:`0.45` + 0.099 for L ≤ -0.018 +.. math:: + + L' = -1.099(-L)^{0.45} + 0.099 \text{, for } L \le -0.018 - L' = 4.5L for -0.018 < L < 0.018 + L' = 4.5L \text{, for } -0.018 < L < 0.018 - L' = 1.099L :sup:`0.45` - 0.099 for L ≥ 0.018 + L' = 1.099L^{0.45} - 0.099 \text{, for } L \ge 0.018 Inverse Transfer function: - L = -((L' - 0.099) / -1.099) :sup:`1/0.45` for L' ≤ -0.081 +.. math:: - L = L' / 4.5 for -0.081 < L' < 0.081 + L = -\left( \frac{L' - 0.099}{-1.099} \right)^\frac{1}{0.45} \text{, for } L' \le -0.081 - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \frac{L'}{4.5}\text{, for } -0.081 < L' < 0.081 + + L = \left(\frac{L' + 0.099}{1.099}\right)^{\frac{1}{0.45} } \text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_709`` encoding: +.. math:: + Y' = 0.2126R' + 0.7152G' + 0.0722B' Cb = -0.1146R' - 0.3854G' + 0.5B' @@ -210,22 +176,26 @@ similar to the Rec. 709 encoding, but it allows for R', G' and B' values that are outside the range [0…1]. The resulting Y', Cb and Cr values are scaled and offset: - Y' = (219 / 256) * (0.2126R' + 0.7152G' + 0.0722B') + (16 / 256) +.. math:: - Cb = (224 / 256) * (-0.1146R' - 0.3854G' + 0.5B') + Y' = \frac{219}{256} * (0.2126R' + 0.7152G' + 0.0722B') + \frac{16}{256} - Cr = (224 / 256) * (0.5R' - 0.4542G' - 0.0458B') + Cb = \frac{224}{256} * (-0.1146R' - 0.3854G' + 0.5B') + + Cr = \frac{224}{256} * (0.5R' - 0.4542G' - 0.0458B') The xvYCC 601 encoding (``V4L2_YCBCR_ENC_XV601``, :ref:`xvycc`) is similar to the BT.601 encoding, but it allows for R', G' and B' values that are outside the range [0…1]. The resulting Y', Cb and Cr values are scaled and offset: - Y' = (219 / 256) * (0.299R' + 0.587G' + 0.114B') + (16 / 256) +.. math:: + + Y' = \frac{219}{256} * (0.2990R' + 0.5870G' + 0.1140B') + \frac{16}{256} - Cb = (224 / 256) * (-0.169R' - 0.331G' + 0.5B') + Cb = \frac{224}{256} * (-0.1687R' - 0.3313G' + 0.5B') - Cr = (224 / 256) * (0.5R' - 0.419G' - 0.081B') + Cr = \frac{224}{256} * (0.5R' - 0.4187G' - 0.0813B') Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The non-standard xvYCC 709 or xvYCC 601 encodings can be @@ -241,56 +211,33 @@ Colorspace sRGB (V4L2_COLORSPACE_SRGB) The :ref:`srgb` standard defines the colorspace used by most webcams and computer graphics. The default transfer function is ``V4L2_XFER_FUNC_SRGB``. The default Y'CbCr encoding is -``V4L2_YCBCR_ENC_SYCC``. The default Y'CbCr quantization is full range. +``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full range. The chromaticities of the primary colors and the white reference are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: sRGB Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.640 - - - 0.330 - - - .. row 3 - - - Green - - - 0.300 - - - 0.600 - - - .. row 4 - - - Blue - - - 0.150 - - - 0.060 - - - .. row 5 - - - White Reference (D65) - - - 0.3127 - - - 0.3290 + * - Color + - x + - y + * - Red + - 0.640 + - 0.330 + * - Green + - 0.300 + - 0.600 + * - Blue + - 0.150 + - 0.060 + * - White Reference (D65) + - 0.3127 + - 0.3290 These chromaticities are identical to the Rec. 709 colorspace. @@ -298,23 +245,28 @@ These chromaticities are identical to the Rec. 709 colorspace. Transfer function. Note that negative values for L are only used by the Y'CbCr conversion. - L' = -1.055(-L) :sup:`1/2.4` + 0.055 for L < -0.0031308 +.. math:: - L' = 12.92L for -0.0031308 ≤ L ≤ 0.0031308 + L' = -1.055(-L)^{\frac{1}{2.4} } + 0.055\text{, for }L < -0.0031308 - L' = 1.055L :sup:`1/2.4` - 0.055 for 0.0031308 < L ≤ 1 + L' = 12.92L\text{, for }-0.0031308 \le L \le 0.0031308 + + L' = 1.055L ^{\frac{1}{2.4} } - 0.055\text{, for }0.0031308 < L \le 1 Inverse Transfer function: - L = -((-L' + 0.055) / 1.055) :sup:`2.4` for L' < -0.04045 +.. math:: + + L = -((-L' + 0.055) / 1.055) ^{2.4}\text{, for }L' < -0.04045 - L = L' / 12.92 for -0.04045 ≤ L' ≤ 0.04045 + L = L' / 12.92\text{, for }-0.04045 \le L' \le 0.04045 - L = ((L' + 0.055) / 1.055) :sup:`2.4` for L' > 0.04045 + L = ((L' + 0.055) / 1.055) ^{2.4}\text{, for }L' > 0.04045 The luminance (Y') and color difference (Cb and Cr) are obtained with -the following ``V4L2_YCBCR_ENC_SYCC`` encoding as defined by -:ref:`sycc`: +the following ``V4L2_YCBCR_ENC_601`` encoding as defined by :ref:`sycc`: + +.. math:: Y' = 0.2990R' + 0.5870G' + 0.1140B' @@ -323,11 +275,8 @@ the following ``V4L2_YCBCR_ENC_SYCC`` encoding as defined by Cr = 0.5R' - 0.4187G' - 0.0813B' Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range -[-0.5…0.5]. The ``V4L2_YCBCR_ENC_SYCC`` quantization is always full -range. Although this Y'CbCr encoding looks very similar to the -``V4L2_YCBCR_ENC_XV601`` encoding, it is not. The -``V4L2_YCBCR_ENC_XV601`` scales and offsets the Y'CbCr values before -quantization, but this encoding does not do that. +[-0.5…0.5]. This transform is identical to one defined in SMPTE +170M/BT.601. The Y'CbCr quantization is full range. .. _col-adobergb: @@ -339,80 +288,63 @@ The :ref:`adobergb` standard defines the colorspace used by computer graphics that use the AdobeRGB colorspace. This is also known as the :ref:`oprgb` standard. The default transfer function is ``V4L2_XFER_FUNC_ADOBERGB``. The default Y'CbCr encoding is -``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is limited +``V4L2_YCBCR_ENC_601``. The default Y'CbCr quantization is full range. The chromaticities of the primary colors and the white reference are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: Adobe RGB Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.6400 - - - 0.3300 - - - .. row 3 - - - Green - - - 0.2100 - - - 0.7100 - - - .. row 4 - - - Blue - - - 0.1500 - - - 0.0600 - - - .. row 5 - - - White Reference (D65) - - - 0.3127 - - - 0.3290 + * - Color + - x + - y + * - Red + - 0.6400 + - 0.3300 + * - Green + - 0.2100 + - 0.7100 + * - Blue + - 0.1500 + - 0.0600 + * - White Reference (D65) + - 0.3127 + - 0.3290 Transfer function: - L' = L :sup:`1/2.19921875` +.. math:: + + L' = L ^{\frac{1}{2.19921875}} Inverse Transfer function: - L = L' :sup:`2.19921875` +.. math:: + + L = L'^{(2.19921875)} The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding: - Y' = 0.299R' + 0.587G' + 0.114B' +.. math:: - Cb = -0.169R' - 0.331G' + 0.5B' + Y' = 0.2990R' + 0.5870G' + 0.1140B' - Cr = 0.5R' - 0.419G' - 0.081B' + Cb = -0.1687R' - 0.3313G' + 0.5B' + + Cr = 0.5R' - 0.4187G' - 0.0813B' Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. This transform is identical to one defined in SMPTE -170M/BT.601. The Y'CbCr quantization is limited range. +170M/BT.601. The Y'CbCr quantization is full range. .. _col-bt2020: @@ -429,69 +361,52 @@ of the primary colors and the white reference are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: BT.2020 Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.708 - - - 0.292 - - - .. row 3 - - - Green - - - 0.170 - - - 0.797 - - - .. row 4 - - - Blue - - - 0.131 - - - 0.046 - - - .. row 5 - - - White Reference (D65) - - - 0.3127 - - - 0.3290 + * - Color + - x + - y + * - Red + - 0.708 + - 0.292 + * - Green + - 0.170 + - 0.797 + * - Blue + - 0.131 + - 0.046 + * - White Reference (D65) + - 0.3127 + - 0.3290 Transfer function (same as Rec. 709): - L' = 4.5L for 0 ≤ L < 0.018 +.. math:: - L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1 + L' = 4.5L\text{, for }0 \le L < 0.018 + + L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1 Inverse Transfer function: - L = L' / 4.5 for L' < 0.081 +.. math:: + + L = L' / 4.5\text{, for } L' < 0.081 - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_BT2020`` encoding: +.. math:: + Y' = 0.2627R' + 0.6780G' + 0.0593B' Cb = -0.1396R' - 0.3604G' + 0.5B' @@ -506,23 +421,20 @@ There is also an alternate constant luminance R'G'B' to Yc'CbcCrc Luma: - Yc' = (0.2627R + 0.6780G + 0.0593B)' - -B' - Yc' ≤ 0: - - Cbc = (B' - Yc') / 1.9404 - -B' - Yc' > 0: - - Cbc = (B' - Yc') / 1.5816 - -R' - Yc' ≤ 0: - - Crc = (R' - Y') / 1.7184 - -R' - Yc' > 0: - - Crc = (R' - Y') / 0.9936 +.. math:: + :nowrap: + + \begin{align*} + Yc' = (0.2627R + 0.6780G + 0.0593B)'& \\ + B' - Yc' \le 0:& \\ + &Cbc = (B' - Yc') / 1.9404 \\ + B' - Yc' > 0: & \\ + &Cbc = (B' - Yc') / 1.5816 \\ + R' - Yc' \le 0:& \\ + &Crc = (R' - Y') / 1.7184 \\ + R' - Yc' > 0:& \\ + &Crc = (R' - Y') / 0.9936 + \end{align*} Yc' is clamped to the range [0…1] and Cbc and Crc are clamped to the range [-0.5…0.5]. The Yc'CbcCrc quantization is limited range. @@ -536,71 +448,54 @@ Colorspace DCI-P3 (V4L2_COLORSPACE_DCI_P3) The :ref:`smpte431` standard defines the colorspace used by cinema projectors that use the DCI-P3 colorspace. The default transfer function is ``V4L2_XFER_FUNC_DCI_P3``. The default Y'CbCr encoding is -``V4L2_YCBCR_ENC_709``. +``V4L2_YCBCR_ENC_709``. The default Y'CbCr quantization is limited range. + +.. note:: -.. note:: Note that this colorspace does not specify a + Note that this colorspace standard does not specify a Y'CbCr encoding since it is not meant to be encoded to Y'CbCr. So this - default Y'CbCr encoding was picked because it is the HDTV encoding. The - default Y'CbCr quantization is limited range. The chromaticities of the - primary colors and the white reference are: + default Y'CbCr encoding was picked because it is the HDTV encoding. + +The chromaticities of the primary colors and the white reference are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: DCI-P3 Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.6800 - - - 0.3200 - - - .. row 3 - - - Green - - - 0.2650 - - - 0.6900 - - - .. row 4 - - - Blue - - - 0.1500 - - - 0.0600 - - - .. row 5 - - - White Reference - - - 0.3140 - - - 0.3510 + * - Color + - x + - y + * - Red + - 0.6800 + - 0.3200 + * - Green + - 0.2650 + - 0.6900 + * - Blue + - 0.1500 + - 0.0600 + * - White Reference + - 0.3140 + - 0.3510 Transfer function: - L' = L :sup:`1/2.6` +.. math:: + + L' = L^{\frac{1}{2.6}} Inverse Transfer function: - L = L' :sup:`2.6` +.. math:: + + L = L'^{(2.6)} Y'CbCr encoding is not specified. V4L2 defaults to Rec. 709. @@ -619,77 +514,60 @@ and the white reference are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: SMPTE 240M Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.630 - - - 0.340 - - - .. row 3 - - - Green - - - 0.310 - - - 0.595 - - - .. row 4 - - - Blue - - - 0.155 - - - 0.070 - - - .. row 5 - - - White Reference (D65) - - - 0.3127 - - - 0.3290 + * - Color + - x + - y + * - Red + - 0.630 + - 0.340 + * - Green + - 0.310 + - 0.595 + * - Blue + - 0.155 + - 0.070 + * - White Reference (D65) + - 0.3127 + - 0.3290 These chromaticities are identical to the SMPTE 170M colorspace. Transfer function: - L' = 4L for 0 ≤ L < 0.0228 +.. math:: - L' = 1.1115L :sup:`0.45` - 0.1115 for 0.0228 ≤ L ≤ 1 + L' = 4L\text{, for } 0 \le L < 0.0228 + + L' = 1.1115L ^{0.45} - 0.1115\text{, for } 0.0228 \le L \le 1 Inverse Transfer function: - L = L' / 4 for 0 ≤ L' < 0.0913 +.. math:: + + L = \frac{L'}{4}\text{, for } 0 \le L' < 0.0913 - L = ((L' + 0.1115) / 1.1115) :sup:`1/0.45` for L' ≥ 0.0913 + L = \left( \frac{L' + 0.1115}{1.1115}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.0913 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_SMPTE240M`` encoding: +.. math:: + Y' = 0.2122R' + 0.7013G' + 0.0865B' Cb = -0.1161R' - 0.3839G' + 0.5B' Cr = 0.5R' - 0.4451G' - 0.0549B' -Yc' is clamped to the range [0…1] and Cbc and Crc are clamped to the +Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range. @@ -707,54 +585,33 @@ reference are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: NTSC 1953 Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.67 - - - 0.33 - - - .. row 3 - - - Green - - - 0.21 - - - 0.71 - - - .. row 4 - - - Blue - - - 0.14 - - - 0.08 - - - .. row 5 - - - White Reference (C) - - - 0.310 - - - 0.316 - - -.. note:: This colorspace uses Illuminant C instead of D65 as the white + * - Color + - x + - y + * - Red + - 0.67 + - 0.33 + * - Green + - 0.21 + - 0.71 + * - Blue + - 0.14 + - 0.08 + * - White Reference (C) + - 0.310 + - 0.316 + + +.. note:: + + This colorspace uses Illuminant C instead of D65 as the white reference. To correctly convert an image in this colorspace to another that uses D65 you need to apply a chromatic adaptation algorithm such as the Bradford method. @@ -762,24 +619,30 @@ reference are: The transfer function was never properly defined for NTSC 1953. The Rec. 709 transfer function is recommended in the literature: - L' = 4.5L for 0 ≤ L < 0.018 +.. math:: + + L' = 4.5L\text{, for } 0 \le L < 0.018 - L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1 + L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1 Inverse Transfer function: - L = L' / 4.5 for L' < 0.081 +.. math:: - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \frac{L'}{4.5} \text{, for } L' < 0.081 + + L = \left( \frac{L' + 0.099}{1.099}\right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding: - Y' = 0.299R' + 0.587G' + 0.114B' +.. math:: - Cb = -0.169R' - 0.331G' + 0.5B' + Y' = 0.2990R' + 0.5870G' + 0.1140B' - Cr = 0.5R' - 0.419G' - 0.081B' + Cb = -0.1687R' - 0.3313G' + 0.5B' + + Cr = 0.5R' - 0.4187G' - 0.0813B' Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range. This transform is @@ -801,75 +664,58 @@ are: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: EBU Tech. 3213 Chromaticities :header-rows: 1 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Color - - - x - - - y - - - .. row 2 - - - Red - - - 0.64 - - - 0.33 - - - .. row 3 - - - Green - - - 0.29 - - - 0.60 - - - .. row 4 - - - Blue - - - 0.15 - - - 0.06 - - - .. row 5 - - - White Reference (D65) - - - 0.3127 - - - 0.3290 + * - Color + - x + - y + * - Red + - 0.64 + - 0.33 + * - Green + - 0.29 + - 0.60 + * - Blue + - 0.15 + - 0.06 + * - White Reference (D65) + - 0.3127 + - 0.3290 The transfer function was never properly defined for this colorspace. The Rec. 709 transfer function is recommended in the literature: - L' = 4.5L for 0 ≤ L < 0.018 +.. math:: - L' = 1.099L :sup:`0.45` - 0.099 for 0.018 ≤ L ≤ 1 + L' = 4.5L\text{, for } 0 \le L < 0.018 + + L' = 1.099L ^{0.45} - 0.099\text{, for } 0.018 \le L \le 1 Inverse Transfer function: - L = L' / 4.5 for L' < 0.081 +.. math:: + + L = \frac{L'}{4.5} \text{, for } L' < 0.081 - L = ((L' + 0.099) / 1.099) :sup:`1/0.45` for L' ≥ 0.081 + L = \left(\frac{L' + 0.099}{1.099} \right) ^{\frac{1}{0.45} }\text{, for } L' \ge 0.081 The luminance (Y') and color difference (Cb and Cr) are obtained with the following ``V4L2_YCBCR_ENC_601`` encoding: - Y' = 0.299R' + 0.587G' + 0.114B' +.. math:: - Cb = -0.169R' - 0.331G' + 0.5B' + Y' = 0.2990R' + 0.5870G' + 0.1140B' - Cr = 0.5R' - 0.419G' - 0.081B' + Cb = -0.1687R' - 0.3313G' + 0.5B' + + Cr = 0.5R' - 0.4187G' - 0.0813B' Y' is clamped to the range [0…1] and Cb and Cr are clamped to the range [-0.5…0.5]. The Y'CbCr quantization is limited range. This transform is @@ -888,7 +734,9 @@ reference are identical to sRGB. The transfer function use is with full range quantization where Y' is scaled to [0…255] and Cb/Cr are scaled to [-128…128] and then clipped to [-128…127]. -.. note:: The JPEG standard does not actually store colorspace +.. note:: + + The JPEG standard does not actually store colorspace information. So if something other than sRGB is used, then the driver will have to set that information explicitly. Effectively ``V4L2_COLORSPACE_JPEG`` can be considered to be an abbreviation for diff --git a/Documentation/media/uapi/v4l/pixfmt-013.rst b/Documentation/media/uapi/v4l/pixfmt-013.rst index 475f6e6fe785..542c087152e3 100644 --- a/Documentation/media/uapi/v4l/pixfmt-013.rst +++ b/Documentation/media/uapi/v4l/pixfmt-013.rst @@ -7,123 +7,81 @@ Compressed Formats .. _compressed-formats: +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. flat-table:: Compressed Image Formats :header-rows: 1 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - Identifier - - - Code - - - Details - - - .. _V4L2-PIX-FMT-JPEG: - - - ``V4L2_PIX_FMT_JPEG`` - - - 'JPEG' - - - TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`, - :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`. - - - .. _V4L2-PIX-FMT-MPEG: - - - ``V4L2_PIX_FMT_MPEG`` - - - 'MPEG' - - - MPEG multiplexed stream. The actual format is determined by - extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see - :ref:`mpeg-control-id`. - - - .. _V4L2-PIX-FMT-H264: - - - ``V4L2_PIX_FMT_H264`` - - - 'H264' - - - H264 video elementary stream with start codes. - - - .. _V4L2-PIX-FMT-H264-NO-SC: - - - ``V4L2_PIX_FMT_H264_NO_SC`` - - - 'AVC1' - - - H264 video elementary stream without start codes. - - - .. _V4L2-PIX-FMT-H264-MVC: - - - ``V4L2_PIX_FMT_H264_MVC`` - - - 'M264' - - - H264 MVC video elementary stream. - - - .. _V4L2-PIX-FMT-H263: - - - ``V4L2_PIX_FMT_H263`` - - - 'H263' - - - H263 video elementary stream. - - - .. _V4L2-PIX-FMT-MPEG1: - - - ``V4L2_PIX_FMT_MPEG1`` - - - 'MPG1' - - - MPEG1 video elementary stream. - - - .. _V4L2-PIX-FMT-MPEG2: - - - ``V4L2_PIX_FMT_MPEG2`` - - - 'MPG2' - - - MPEG2 video elementary stream. - - - .. _V4L2-PIX-FMT-MPEG4: - - - ``V4L2_PIX_FMT_MPEG4`` - - - 'MPG4' - - - MPEG4 video elementary stream. - - - .. _V4L2-PIX-FMT-XVID: - - - ``V4L2_PIX_FMT_XVID`` - - - 'XVID' - - - Xvid video elementary stream. - - - .. _V4L2-PIX-FMT-VC1-ANNEX-G: - - - ``V4L2_PIX_FMT_VC1_ANNEX_G`` - - - 'VC1G' - - - VC1, SMPTE 421M Annex G compliant stream. - - - .. _V4L2-PIX-FMT-VC1-ANNEX-L: - - - ``V4L2_PIX_FMT_VC1_ANNEX_L`` - - - 'VC1L' - - - VC1, SMPTE 421M Annex L compliant stream. - - - .. _V4L2-PIX-FMT-VP8: - - - ``V4L2_PIX_FMT_VP8`` - - - 'VP80' - - - VP8 video elementary stream. + * - Identifier + - Code + - Details + * .. _V4L2-PIX-FMT-JPEG: + + - ``V4L2_PIX_FMT_JPEG`` + - 'JPEG' + - TBD. See also :ref:`VIDIOC_G_JPEGCOMP <VIDIOC_G_JPEGCOMP>`, + :ref:`VIDIOC_S_JPEGCOMP <VIDIOC_G_JPEGCOMP>`. + * .. _V4L2-PIX-FMT-MPEG: + + - ``V4L2_PIX_FMT_MPEG`` + - 'MPEG' + - MPEG multiplexed stream. The actual format is determined by + extended control ``V4L2_CID_MPEG_STREAM_TYPE``, see + :ref:`mpeg-control-id`. + * .. _V4L2-PIX-FMT-H264: + + - ``V4L2_PIX_FMT_H264`` + - 'H264' + - H264 video elementary stream with start codes. + * .. _V4L2-PIX-FMT-H264-NO-SC: + + - ``V4L2_PIX_FMT_H264_NO_SC`` + - 'AVC1' + - H264 video elementary stream without start codes. + * .. _V4L2-PIX-FMT-H264-MVC: + + - ``V4L2_PIX_FMT_H264_MVC`` + - 'M264' + - H264 MVC video elementary stream. + * .. _V4L2-PIX-FMT-H263: + + - ``V4L2_PIX_FMT_H263`` + - 'H263' + - H263 video elementary stream. + * .. _V4L2-PIX-FMT-MPEG1: + + - ``V4L2_PIX_FMT_MPEG1`` + - 'MPG1' + - MPEG1 video elementary stream. + * .. _V4L2-PIX-FMT-MPEG2: + + - ``V4L2_PIX_FMT_MPEG2`` + - 'MPG2' + - MPEG2 video elementary stream. + * .. _V4L2-PIX-FMT-MPEG4: + + - ``V4L2_PIX_FMT_MPEG4`` + - 'MPG4' + - MPEG4 video elementary stream. + * .. _V4L2-PIX-FMT-XVID: + + - ``V4L2_PIX_FMT_XVID`` + - 'XVID' + - Xvid video elementary stream. + * .. _V4L2-PIX-FMT-VC1-ANNEX-G: + + - ``V4L2_PIX_FMT_VC1_ANNEX_G`` + - 'VC1G' + - VC1, SMPTE 421M Annex G compliant stream. + * .. _V4L2-PIX-FMT-VC1-ANNEX-L: + + - ``V4L2_PIX_FMT_VC1_ANNEX_L`` + - 'VC1L' + - VC1, SMPTE 421M Annex L compliant stream. + * .. _V4L2-PIX-FMT-VP8: + + - ``V4L2_PIX_FMT_VP8`` + - 'VP80' + - VP8 video elementary stream. diff --git a/Documentation/media/uapi/v4l/pixfmt-grey.rst b/Documentation/media/uapi/v4l/pixfmt-grey.rst index 761d783d4989..dad813819d3e 100644 --- a/Documentation/media/uapi/v4l/pixfmt-grey.rst +++ b/Documentation/media/uapi/v4l/pixfmt-grey.rst @@ -6,8 +6,6 @@ V4L2_PIX_FMT_GREY ('GREY') ************************** -*man V4L2_PIX_FMT_GREY(2)* - Grey-scale image @@ -20,58 +18,27 @@ which simply contains no Cb or Cr data. **Byte Order.** Each cell is one byte. - - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - Y'\ :sub:`33` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` diff --git a/Documentation/media/uapi/v4l/pixfmt-indexed.rst b/Documentation/media/uapi/v4l/pixfmt-indexed.rst index 99a780fe6b61..6edac54dad74 100644 --- a/Documentation/media/uapi/v4l/pixfmt-indexed.rst +++ b/Documentation/media/uapi/v4l/pixfmt-indexed.rst @@ -17,57 +17,31 @@ the palette, this must be done with ioctls of the Linux framebuffer API. :header-rows: 2 :stub-columns: 0 - - - .. row 1 - - - Identifier - - - Code - - - - - :cspan:`7` Byte 0 - - - .. row 2 - - - - - - - Bit - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _V4L2-PIX-FMT-PAL8: - - - ``V4L2_PIX_FMT_PAL8`` - - - 'PAL8' - - - - - i\ :sub:`7` - - - i\ :sub:`6` - - - i\ :sub:`5` - - - i\ :sub:`4` - - - i\ :sub:`3` - - - i\ :sub:`2` - - - i\ :sub:`1` - - - i\ :sub:`0` + * - Identifier + - Code + - + - :cspan:`7` Byte 0 + * - + - + - Bit + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + * .. _V4L2-PIX-FMT-PAL8: + + - ``V4L2_PIX_FMT_PAL8`` + - 'PAL8' + - + - i\ :sub:`7` + - i\ :sub:`6` + - i\ :sub:`5` + - i\ :sub:`4` + - i\ :sub:`3` + - i\ :sub:`2` + - i\ :sub:`1` + - i\ :sub:`0` diff --git a/Documentation/media/uapi/v4l/pixfmt-m420.rst b/Documentation/media/uapi/v4l/pixfmt-m420.rst index 4c5b2969c039..7dd47c071e2f 100644 --- a/Documentation/media/uapi/v4l/pixfmt-m420.rst +++ b/Documentation/media/uapi/v4l/pixfmt-m420.rst @@ -6,8 +6,6 @@ V4L2_PIX_FMT_M420 ('M420') ************************** -*man V4L2_PIX_FMT_M420(2)* - Format with ½ horizontal and vertical chroma resolution, also known as YUV 4:2:0. Hybrid plane line-interleaved layout. @@ -32,84 +30,40 @@ the CbCr lines. Each cell is one byte. - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Cb\ :sub:`00` - - - Cr\ :sub:`00` - - - Cb\ :sub:`01` - - Cr\ :sub:`01` - - - .. row 4 - - - start + 16: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 5 - - - start + 20: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 6 - - - start + 24: - - - Cb\ :sub:`10` - - - Cr\ :sub:`10` - - - Cb\ :sub:`11` - - - Cr\ :sub:`11` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Cb\ :sub:`00` + - Cr\ :sub:`00` + - Cb\ :sub:`01` + - Cr\ :sub:`01` + * - start + 16: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 20: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - start + 24: + - Cb\ :sub:`10` + - Cr\ :sub:`10` + - Cb\ :sub:`11` + - Cr\ :sub:`11` **Color Sample Location..** @@ -120,100 +74,53 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 3 - - - - - - - C - - - - - - - C - - - - - - .. row 4 - - - 1 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 5 - - - - - - .. row 6 - - - 2 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 7 - - - - - - - C - - - - - - - C - - - - - - .. row 8 - - - 3 - - - Y - - - - - Y - - - Y - - - - - Y + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 1 + - Y + - + - Y + - Y + - + - Y + * - + * - 2 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 3 + - Y + - + - Y + - Y + - + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12.rst b/Documentation/media/uapi/v4l/pixfmt-nv12.rst index cf59b28f75b7..5b45a6d2ac95 100644 --- a/Documentation/media/uapi/v4l/pixfmt-nv12.rst +++ b/Documentation/media/uapi/v4l/pixfmt-nv12.rst @@ -7,7 +7,6 @@ V4L2_PIX_FMT_NV12 ('NV12'), V4L2_PIX_FMT_NV21 ('NV21') ****************************************************** -*man V4L2_PIX_FMT_NV12(2)* V4L2_PIX_FMT_NV21 Formats with ½ horizontal and vertical chroma resolution, also known as @@ -36,84 +35,40 @@ many pad bytes after its rows. Each cell is one byte. - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - Y'\ :sub:`23` - - - .. row 4 - - - start + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - start + 16: - - - Cb\ :sub:`00` - - - Cr\ :sub:`00` - - - Cb\ :sub:`01` - - - Cr\ :sub:`01` - - - .. row 6 - - - start + 20: - - - Cb\ :sub:`10` - - - Cr\ :sub:`10` - - - Cb\ :sub:`11` - - - Cr\ :sub:`11` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - start + 16: + - Cb\ :sub:`00` + - Cr\ :sub:`00` + - Cb\ :sub:`01` + - Cr\ :sub:`01` + * - start + 20: + - Cb\ :sub:`10` + - Cr\ :sub:`10` + - Cb\ :sub:`11` + - Cr\ :sub:`11` **Color Sample Location..** @@ -122,100 +77,53 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 3 - - - - - - - C - - - - - - - C - - - - - - .. row 4 - - - 1 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 5 - - - - - - .. row 6 - - - 2 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 7 - - - - - - - C - - - - - - - C - - - - - - .. row 8 - - - 3 - - - Y - - - - - Y - - - Y - - - - - Y + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 1 + - Y + - + - Y + - Y + - + - Y + * - + * - 2 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 3 + - Y + - + - Y + - Y + - + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12m.rst b/Documentation/media/uapi/v4l/pixfmt-nv12m.rst index a4e7eaeccea8..de3051fd6b50 100644 --- a/Documentation/media/uapi/v4l/pixfmt-nv12m.rst +++ b/Documentation/media/uapi/v4l/pixfmt-nv12m.rst @@ -8,7 +8,6 @@ V4L2_PIX_FMT_NV12M ('NM12'), V4L2_PIX_FMT_NV21M ('NM21'), V4L2_PIX_FMT_NV12MT_16X16 *********************************************************************************** -*man V4L2_PIX_FMT_NV12M(2)* V4L2_PIX_FMT_NV21M V4L2_PIX_FMT_NV12MT_16X16 @@ -50,84 +49,38 @@ Each cell is one byte. .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - .. row 1 - - - start0 + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start0 + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start0 + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start0 + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - - - - .. row 6 - - - start1 + 0: - - - Cb\ :sub:`00` - - - Cr\ :sub:`00` - - - Cb\ :sub:`01` - - - Cr\ :sub:`01` - - - .. row 7 - - - start1 + 4: - - - Cb\ :sub:`10` - - - Cr\ :sub:`10` - - - Cb\ :sub:`11` - - - Cr\ :sub:`11` + * - start0 + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start0 + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start0 + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start0 + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - + * - start1 + 0: + - Cb\ :sub:`00` + - Cr\ :sub:`00` + - Cb\ :sub:`01` + - Cr\ :sub:`01` + * - start1 + 4: + - Cb\ :sub:`10` + - Cr\ :sub:`10` + - Cb\ :sub:`11` + - Cr\ :sub:`11` **Color Sample Location..** @@ -138,101 +91,54 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 3 - - - - - - - C - - - - - - - C - - - - - - .. row 4 - - - 1 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 5 - - - - - - .. row 6 - - - 2 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 7 - - - - - - - C - - - - - - - - - C - - - - - - .. row 8 - - - 3 - - - Y - - - - - Y - - - Y - - - - - Y + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 1 + - Y + - + - Y + - Y + - + - Y + * - + * - 2 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - + - C + - + * - 3 + - Y + - + - Y + - Y + - + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12mt.rst b/Documentation/media/uapi/v4l/pixfmt-nv12mt.rst index 6198941bb814..9f250a1df2f6 100644 --- a/Documentation/media/uapi/v4l/pixfmt-nv12mt.rst +++ b/Documentation/media/uapi/v4l/pixfmt-nv12mt.rst @@ -6,8 +6,6 @@ V4L2_PIX_FMT_NV12MT ('TM12') **************************** -*man V4L2_PIX_FMT_NV12MT(2)* - Formats with ½ horizontal and vertical chroma resolution. This format has two planes - one for luminance and one for chrominance. Chroma samples are interleaved. The difference to ``V4L2_PIX_FMT_NV12`` is the @@ -36,7 +34,7 @@ Layout of macroblocks in memory is presented in the following figure. .. _nv12mt: .. figure:: pixfmt-nv12mt_files/nv12mt.* - :alt: nv12mt.gif + :alt: nv12mt.png :align: center V4L2_PIX_FMT_NV12MT macroblock Z shape memory layout @@ -53,7 +51,7 @@ interleaved. Height of the buffer is aligned to 32. .. _nv12mt_ex: .. figure:: pixfmt-nv12mt_files/nv12mt_example.* - :alt: nv12mt_example.gif + :alt: nv12mt_example.png :align: center Example V4L2_PIX_FMT_NV12MT memory layout of macroblocks diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif b/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif Binary files differdeleted file mode 100644 index ef2d4cf8367b..000000000000 --- a/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.gif +++ /dev/null diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png b/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png Binary files differnew file mode 100644 index 000000000000..41401860fb73 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.png diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.gif b/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.gif Binary files differdeleted file mode 100644 index df81d68108ee..000000000000 --- a/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.gif +++ /dev/null diff --git a/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.png b/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.png Binary files differnew file mode 100644 index 000000000000..7775f5d7cc46 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.png diff --git a/Documentation/media/uapi/v4l/pixfmt-nv16.rst b/Documentation/media/uapi/v4l/pixfmt-nv16.rst index 88aa7617f7cf..8ceba79ff636 100644 --- a/Documentation/media/uapi/v4l/pixfmt-nv16.rst +++ b/Documentation/media/uapi/v4l/pixfmt-nv16.rst @@ -7,8 +7,6 @@ V4L2_PIX_FMT_NV16 ('NV16'), V4L2_PIX_FMT_NV61 ('NV61') ****************************************************** -*man V4L2_PIX_FMT_NV16(2)* - V4L2_PIX_FMT_NV61 Formats with ½ horizontal chroma resolution, also known as YUV 4:2:2. One luminance and one chrominance plane with alternating chroma samples @@ -35,108 +33,50 @@ many pad bytes after its rows. Each cell is one byte. - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - start + 16: - - - Cb\ :sub:`00` - - - Cr\ :sub:`00` - - - Cb\ :sub:`01` - - - Cr\ :sub:`01` - - - .. row 6 - - - start + 20: - - - Cb\ :sub:`10` - - - Cr\ :sub:`10` - - - Cb\ :sub:`11` - - - Cr\ :sub:`11` - - - .. row 7 - - - start + 24: - - - Cb\ :sub:`20` - - - Cr\ :sub:`20` - - - Cb\ :sub:`21` - - - Cr\ :sub:`21` - - - .. row 8 - - - start + 28: - - - Cb\ :sub:`30` - - - Cr\ :sub:`30` - - Cb\ :sub:`31` - - - Cr\ :sub:`31` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - start + 16: + - Cb\ :sub:`00` + - Cr\ :sub:`00` + - Cb\ :sub:`01` + - Cr\ :sub:`01` + * - start + 20: + - Cb\ :sub:`10` + - Cr\ :sub:`10` + - Cb\ :sub:`11` + - Cr\ :sub:`11` + * - start + 24: + - Cb\ :sub:`20` + - Cr\ :sub:`20` + - Cb\ :sub:`21` + - Cr\ :sub:`21` + * - start + 28: + - Cb\ :sub:`30` + - Cr\ :sub:`30` + - Cb\ :sub:`31` + - Cr\ :sub:`31` **Color Sample Location..** @@ -147,124 +87,67 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 3 - - - - - - - C - - - - - - - C - - - - - - .. row 4 - - - 1 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 5 - - - - - - - C - - - - - - - C - - - - - - .. row 6 - - - - - - .. row 7 - - - 2 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 8 - - - - - - - C - - - - - - - C - - - - - - .. row 9 - - - 3 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 10 - - - - - - - C - - - - - - - C - - - + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 1 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - + * - 2 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 3 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - diff --git a/Documentation/media/uapi/v4l/pixfmt-nv16m.rst b/Documentation/media/uapi/v4l/pixfmt-nv16m.rst index b7ee068f491c..4d46ab39f9f1 100644 --- a/Documentation/media/uapi/v4l/pixfmt-nv16m.rst +++ b/Documentation/media/uapi/v4l/pixfmt-nv16m.rst @@ -7,8 +7,6 @@ V4L2_PIX_FMT_NV16M ('NM16'), V4L2_PIX_FMT_NV61M ('NM61') ******************************************************** -*man V4L2_PIX_FMT_NV16M(2)* - V4L2_PIX_FMT_NV61M Variation of ``V4L2_PIX_FMT_NV16`` and ``V4L2_PIX_FMT_NV61`` with planes non contiguous in memory. @@ -38,112 +36,51 @@ described in :ref:`planar-apis`. Each cell is one byte. - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start0 + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start0 + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start0 + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start0 + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - - - - .. row 6 - - - start1 + 0: - - - Cb\ :sub:`00` - - - Cr\ :sub:`00` - - - Cb\ :sub:`02` - - - Cr\ :sub:`02` - - - .. row 7 - - - start1 + 4: - - - Cb\ :sub:`10` - - - Cr\ :sub:`10` - - - Cb\ :sub:`12` - - - Cr\ :sub:`12` - - - .. row 8 - - - start1 + 8: - - - Cb\ :sub:`20` - - - Cr\ :sub:`20` - - - Cb\ :sub:`22` - - - Cr\ :sub:`22` - - - .. row 9 - - - start1 + 12: - - - Cb\ :sub:`30` - - Cr\ :sub:`30` - - - Cb\ :sub:`32` - - - Cr\ :sub:`32` + * - start0 + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start0 + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start0 + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start0 + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - + * - start1 + 0: + - Cb\ :sub:`00` + - Cr\ :sub:`00` + - Cb\ :sub:`02` + - Cr\ :sub:`02` + * - start1 + 4: + - Cb\ :sub:`10` + - Cr\ :sub:`10` + - Cb\ :sub:`12` + - Cr\ :sub:`12` + * - start1 + 8: + - Cb\ :sub:`20` + - Cr\ :sub:`20` + - Cb\ :sub:`22` + - Cr\ :sub:`22` + * - start1 + 12: + - Cb\ :sub:`30` + - Cr\ :sub:`30` + - Cb\ :sub:`32` + - Cr\ :sub:`32` **Color Sample Location..** @@ -154,124 +91,67 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 3 - - - - - - - C - - - - - - - C - - - - - - .. row 4 - - - 1 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 5 - - - - - - - C - - - - - - - C - - - - - - .. row 6 - - - - - - .. row 7 - - - 2 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 8 - - - - - - - C - - - - - - - C - - - - - - .. row 9 - - - 3 - - - Y - - - - - Y - - - Y - - - - - Y - - - .. row 10 - - - - - - - C - - - - - - - C - - - + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 1 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - + * - 2 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - + * - 3 + - Y + - + - Y + - Y + - + - Y + * - + - + - C + - + - + - C + - diff --git a/Documentation/media/uapi/v4l/pixfmt-nv24.rst b/Documentation/media/uapi/v4l/pixfmt-nv24.rst index db98f476446e..bda973e86227 100644 --- a/Documentation/media/uapi/v4l/pixfmt-nv24.rst +++ b/Documentation/media/uapi/v4l/pixfmt-nv24.rst @@ -7,8 +7,6 @@ V4L2_PIX_FMT_NV24 ('NV24'), V4L2_PIX_FMT_NV42 ('NV42') ****************************************************** -*man V4L2_PIX_FMT_NV24(2)* - V4L2_PIX_FMT_NV42 Formats with full horizontal and vertical chroma resolutions, also known as YUV 4:4:4. One luminance and one chrominance plane with alternating @@ -35,137 +33,63 @@ twice as many pad bytes after its rows. Each cell is one byte. - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - start + 16: - - - Cb\ :sub:`00` - - - Cr\ :sub:`00` - - - Cb\ :sub:`01` - - - Cr\ :sub:`01` - - - Cb\ :sub:`02` - - - Cr\ :sub:`02` - - - Cb\ :sub:`03` - - - Cr\ :sub:`03` - - - .. row 6 - - - start + 24: - - - Cb\ :sub:`10` - - - Cr\ :sub:`10` - - - Cb\ :sub:`11` - - - Cr\ :sub:`11` - - - Cb\ :sub:`12` - - - Cr\ :sub:`12` - - - Cb\ :sub:`13` - - - Cr\ :sub:`13` - - - .. row 7 - - - start + 32: - - - Cb\ :sub:`20` - - - Cr\ :sub:`20` - - - Cb\ :sub:`21` - - - Cr\ :sub:`21` - - - Cb\ :sub:`22` - - - Cr\ :sub:`22` - - - Cb\ :sub:`23` - - - Cr\ :sub:`23` - - - .. row 8 - - - start + 40: - - - Cb\ :sub:`30` - - - Cr\ :sub:`30` - - - Cb\ :sub:`31` - - - Cr\ :sub:`31` - - - Cb\ :sub:`32` - - - Cr\ :sub:`32` - - - Cb\ :sub:`33` - - Cr\ :sub:`33` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - start + 16: + - Cb\ :sub:`00` + - Cr\ :sub:`00` + - Cb\ :sub:`01` + - Cr\ :sub:`01` + - Cb\ :sub:`02` + - Cr\ :sub:`02` + - Cb\ :sub:`03` + - Cr\ :sub:`03` + * - start + 24: + - Cb\ :sub:`10` + - Cr\ :sub:`10` + - Cb\ :sub:`11` + - Cr\ :sub:`11` + - Cb\ :sub:`12` + - Cr\ :sub:`12` + - Cb\ :sub:`13` + - Cr\ :sub:`13` + * - start + 32: + - Cb\ :sub:`20` + - Cr\ :sub:`20` + - Cb\ :sub:`21` + - Cr\ :sub:`21` + - Cb\ :sub:`22` + - Cr\ :sub:`22` + - Cb\ :sub:`23` + - Cr\ :sub:`23` + * - start + 40: + - Cb\ :sub:`30` + - Cr\ :sub:`30` + - Cb\ :sub:`31` + - Cr\ :sub:`31` + - Cb\ :sub:`32` + - Cr\ :sub:`32` + - Cb\ :sub:`33` + - Cr\ :sub:`33` diff --git a/Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst b/Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst index c7aa2e91ac78..84fcbcb74171 100644 --- a/Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst +++ b/Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst @@ -6,11 +6,6 @@ Packed RGB formats ****************** -*man Packed RGB formats(2)* - -Packed RGB formats - - Description =========== @@ -19,6 +14,11 @@ graphics frame buffers. They occupy 8, 16, 24 or 32 bits per pixel. These are all packed-pixel formats, meaning all the data for a pixel lie next to each other in memory. +.. raw:: latex + + \begin{adjustbox}{width=\columnwidth} + +.. tabularcolumns:: |p{4.5cm}|p{3.3cm}|p{0.7cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{1.7cm}| .. _rgb-formats: @@ -26,924 +26,511 @@ next to each other in memory. :header-rows: 2 :stub-columns: 0 - - - .. row 1 - - - Identifier - - - Code - - - - - :cspan:`7` Byte 0 in memory - - - :cspan:`7` Byte 1 - - - :cspan:`7` Byte 2 - - - :cspan:`7` Byte 3 - - - .. row 2 - - - - - - - Bit - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _V4L2-PIX-FMT-RGB332: - - - ``V4L2_PIX_FMT_RGB332`` - - - 'RGB1' - - - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _V4L2-PIX-FMT-ARGB444: - - - ``V4L2_PIX_FMT_ARGB444`` - - - 'AR12' - - - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _V4L2-PIX-FMT-XRGB444: - - - ``V4L2_PIX_FMT_XRGB444`` - - - 'XR12' - - - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - - - - - - - - - - - - - - - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _V4L2-PIX-FMT-ARGB555: - - - ``V4L2_PIX_FMT_ARGB555`` - - - 'AR15' - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - a - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. _V4L2-PIX-FMT-XRGB555: - - - ``V4L2_PIX_FMT_XRGB555`` - - - 'XR15' - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - - - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. _V4L2-PIX-FMT-RGB565: - - - ``V4L2_PIX_FMT_RGB565`` - - - 'RGBP' - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. _V4L2-PIX-FMT-ARGB555X: - - - ``V4L2_PIX_FMT_ARGB555X`` - - - 'AR15' | (1 << 31) - - - - - a - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _V4L2-PIX-FMT-XRGB555X: - - - ``V4L2_PIX_FMT_XRGB555X`` - - - 'XR15' | (1 << 31) - - - - - - - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _V4L2-PIX-FMT-RGB565X: - - - ``V4L2_PIX_FMT_RGB565X`` - - - 'RGBR' - - - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _V4L2-PIX-FMT-BGR24: - - - ``V4L2_PIX_FMT_BGR24`` - - - 'BGR3' - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _V4L2-PIX-FMT-RGB24: - - - ``V4L2_PIX_FMT_RGB24`` - - - 'RGB3' - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _V4L2-PIX-FMT-BGR666: - - - ``V4L2_PIX_FMT_BGR666`` - - - 'BGRH' - - - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - - - r\ :sub:`1` - - - r\ :sub:`0` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .. _V4L2-PIX-FMT-ABGR32: - - - ``V4L2_PIX_FMT_ABGR32`` - - - 'AR24' - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - - - a\ :sub:`7` - - - a\ :sub:`6` - - - a\ :sub:`5` - - - a\ :sub:`4` - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - .. _V4L2-PIX-FMT-XBGR32: - - - ``V4L2_PIX_FMT_XBGR32`` - - - 'XR24' - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .. _V4L2-PIX-FMT-ARGB32: - - - ``V4L2_PIX_FMT_ARGB32`` - - - 'BA24' - - - - - a\ :sub:`7` - - - a\ :sub:`6` - - - a\ :sub:`5` - - - a\ :sub:`4` - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _V4L2-PIX-FMT-XRGB32: - - - ``V4L2_PIX_FMT_XRGB32`` - - - 'BX24' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - -Bit 7 is the most significant bit. + * - Identifier + - Code + - + - :cspan:`7` Byte 0 in memory + - + - :cspan:`7` Byte 1 + - + - :cspan:`7` Byte 2 + - + - :cspan:`7` Byte 3 + * - + - + - Bit + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + * .. _V4L2-PIX-FMT-RGB332: + + - ``V4L2_PIX_FMT_RGB332`` + - 'RGB1' + - + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _V4L2-PIX-FMT-ARGB444: + + - ``V4L2_PIX_FMT_ARGB444`` + - 'AR12' + - + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _V4L2-PIX-FMT-XRGB444: + + - ``V4L2_PIX_FMT_XRGB444`` + - 'XR12' + - + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - + - + - + - + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _V4L2-PIX-FMT-ARGB555: + + - ``V4L2_PIX_FMT_ARGB555`` + - 'AR15' + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - a + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`4` + - g\ :sub:`3` + * .. _V4L2-PIX-FMT-XRGB555: + + - ``V4L2_PIX_FMT_XRGB555`` + - 'XR15' + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`4` + - g\ :sub:`3` + * .. _V4L2-PIX-FMT-RGB565: + + - ``V4L2_PIX_FMT_RGB565`` + - 'RGBP' + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + * .. _V4L2-PIX-FMT-ARGB555X: + + - ``V4L2_PIX_FMT_ARGB555X`` + - 'AR15' | (1 << 31) + - + - a + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`4` + - g\ :sub:`3` + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _V4L2-PIX-FMT-XRGB555X: + + - ``V4L2_PIX_FMT_XRGB555X`` + - 'XR15' | (1 << 31) + - + - + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`4` + - g\ :sub:`3` + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _V4L2-PIX-FMT-RGB565X: + + - ``V4L2_PIX_FMT_RGB565X`` + - 'RGBR' + - + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _V4L2-PIX-FMT-BGR24: + + - ``V4L2_PIX_FMT_BGR24`` + - 'BGR3' + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _V4L2-PIX-FMT-RGB24: + + - ``V4L2_PIX_FMT_RGB24`` + - 'RGB3' + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _V4L2-PIX-FMT-BGR666: + + - ``V4L2_PIX_FMT_BGR666`` + - 'BGRH' + - + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - + - r\ :sub:`1` + - r\ :sub:`0` + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + * .. _V4L2-PIX-FMT-ABGR32: + + - ``V4L2_PIX_FMT_ABGR32`` + - 'AR24' + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - + - a\ :sub:`7` + - a\ :sub:`6` + - a\ :sub:`5` + - a\ :sub:`4` + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + * .. _V4L2-PIX-FMT-XBGR32: + + - ``V4L2_PIX_FMT_XBGR32`` + - 'XR24' + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - + - + - + - + - + - + - + - + - + * .. _V4L2-PIX-FMT-ARGB32: + + - ``V4L2_PIX_FMT_ARGB32`` + - 'BA24' + - + - a\ :sub:`7` + - a\ :sub:`6` + - a\ :sub:`5` + - a\ :sub:`4` + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _V4L2-PIX-FMT-XRGB32: + + - ``V4L2_PIX_FMT_XRGB32`` + - 'BX24' + - + - + - + - + - + - + - + - + - + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + +.. raw:: latex + + \end{adjustbox}\newline\newline + +.. note:: Bit 7 is the most significant bit. The usage and value of the alpha bits (a) in the ARGB and ABGR formats (collectively referred to as alpha formats) depend on the device type @@ -973,125 +560,73 @@ devices and drivers must ignore those bits, for both Each cell is one byte. +.. raw:: latex -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - B\ :sub:`00` - - - G\ :sub:`00` - - - R\ :sub:`00` - - - B\ :sub:`01` - - - G\ :sub:`01` - - - R\ :sub:`01` - - - B\ :sub:`02` - - - G\ :sub:`02` - - - R\ :sub:`02` - - - B\ :sub:`03` - - - G\ :sub:`03` - - - R\ :sub:`03` - - - .. row 2 - - - start + 12: - - - B\ :sub:`10` - - - G\ :sub:`10` - - - R\ :sub:`10` + \newline\newline\begin{adjustbox}{width=\columnwidth} - - B\ :sub:`11` - - - G\ :sub:`11` - - - R\ :sub:`11` - - - B\ :sub:`12` - - - G\ :sub:`12` - - - R\ :sub:`12` - - - B\ :sub:`13` - - - G\ :sub:`13` - - - R\ :sub:`13` - - - .. row 3 - - - start + 24: - - - B\ :sub:`20` - - - G\ :sub:`20` - - - R\ :sub:`20` - - - B\ :sub:`21` - - - G\ :sub:`21` - - - R\ :sub:`21` - - - B\ :sub:`22` - - - G\ :sub:`22` - - - R\ :sub:`22` - - - B\ :sub:`23` - - - G\ :sub:`23` - - - R\ :sub:`23` - - - .. row 4 - - - start + 36: - - - B\ :sub:`30` - - - G\ :sub:`30` - - - R\ :sub:`30` - - - B\ :sub:`31` - - - G\ :sub:`31` - - - R\ :sub:`31` - - - B\ :sub:`32` - - - G\ :sub:`32` - - - R\ :sub:`32` - - - B\ :sub:`33` - - - G\ :sub:`33` - - - R\ :sub:`33` +.. tabularcolumns:: |p{4.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.1cm}|p{1.3cm}| +.. flat-table:: RGB byte order + :header-rows: 0 + :stub-columns: 0 + :widths: 11 3 3 3 3 3 3 3 3 3 3 3 3 + + * - start + 0: + - B\ :sub:`00` + - G\ :sub:`00` + - R\ :sub:`00` + - B\ :sub:`01` + - G\ :sub:`01` + - R\ :sub:`01` + - B\ :sub:`02` + - G\ :sub:`02` + - R\ :sub:`02` + - B\ :sub:`03` + - G\ :sub:`03` + - R\ :sub:`03` + * - start + 12: + - B\ :sub:`10` + - G\ :sub:`10` + - R\ :sub:`10` + - B\ :sub:`11` + - G\ :sub:`11` + - R\ :sub:`11` + - B\ :sub:`12` + - G\ :sub:`12` + - R\ :sub:`12` + - B\ :sub:`13` + - G\ :sub:`13` + - R\ :sub:`13` + * - start + 24: + - B\ :sub:`20` + - G\ :sub:`20` + - R\ :sub:`20` + - B\ :sub:`21` + - G\ :sub:`21` + - R\ :sub:`21` + - B\ :sub:`22` + - G\ :sub:`22` + - R\ :sub:`22` + - B\ :sub:`23` + - G\ :sub:`23` + - R\ :sub:`23` + * - start + 36: + - B\ :sub:`30` + - G\ :sub:`30` + - R\ :sub:`30` + - B\ :sub:`31` + - G\ :sub:`31` + - R\ :sub:`31` + - B\ :sub:`32` + - G\ :sub:`32` + - R\ :sub:`32` + - B\ :sub:`33` + - G\ :sub:`33` + - R\ :sub:`33` + +.. raw:: latex + + \end{adjustbox}\newline\newline Formats defined in :ref:`rgb-formats-deprecated` are deprecated and must not be used by new drivers. They are documented here for reference. @@ -1099,369 +634,216 @@ The meaning of their alpha bits (a) is ill-defined and interpreted as in either the corresponding ARGB or XRGB format, depending on the driver. +.. raw:: latex + + \begin{adjustbox}{width=\columnwidth} + +.. tabularcolumns:: |p{4.2cm}|p{1.0cm}|p{0.7cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{1.7cm}| + .. _rgb-formats-deprecated: .. flat-table:: Deprecated Packed RGB Image Formats :header-rows: 2 :stub-columns: 0 - - - .. row 1 - - - Identifier - - - Code - - - - - :cspan:`7` Byte 0 in memory - - - :cspan:`7` Byte 1 - - - :cspan:`7` Byte 2 - - - :cspan:`7` Byte 3 - - - .. row 2 - - - - - - - Bit - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _V4L2-PIX-FMT-RGB444: - - - ``V4L2_PIX_FMT_RGB444`` - - - 'R444' - - - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _V4L2-PIX-FMT-RGB555: - - - ``V4L2_PIX_FMT_RGB555`` - - - 'RGBO' - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - a - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. _V4L2-PIX-FMT-RGB555X: - - - ``V4L2_PIX_FMT_RGB555X`` - - - 'RGBQ' - - - - - a - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _V4L2-PIX-FMT-BGR32: - - - ``V4L2_PIX_FMT_BGR32`` - - - 'BGR4' - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - - - a\ :sub:`7` - - - a\ :sub:`6` - - - a\ :sub:`5` - - - a\ :sub:`4` - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - .. _V4L2-PIX-FMT-RGB32: - - - ``V4L2_PIX_FMT_RGB32`` - - - 'RGB4' - - - - - a\ :sub:`7` - - - a\ :sub:`6` - - - a\ :sub:`5` - - - a\ :sub:`4` - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - + * - Identifier + - Code + - + - :cspan:`7` Byte 0 in memory + - + - :cspan:`7` Byte 1 + - + - :cspan:`7` Byte 2 + - + - :cspan:`7` Byte 3 + * - + - + - Bit + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + * .. _V4L2-PIX-FMT-RGB444: + + - ``V4L2_PIX_FMT_RGB444`` + - 'R444' + - + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _V4L2-PIX-FMT-RGB555: + + - ``V4L2_PIX_FMT_RGB555`` + - 'RGBO' + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - a + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`4` + - g\ :sub:`3` + * .. _V4L2-PIX-FMT-RGB555X: + + - ``V4L2_PIX_FMT_RGB555X`` + - 'RGBQ' + - + - a + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`4` + - g\ :sub:`3` + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _V4L2-PIX-FMT-BGR32: + + - ``V4L2_PIX_FMT_BGR32`` + - 'BGR4' + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - + - a\ :sub:`7` + - a\ :sub:`6` + - a\ :sub:`5` + - a\ :sub:`4` + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + * .. _V4L2-PIX-FMT-RGB32: + + - ``V4L2_PIX_FMT_RGB32`` + - 'RGB4' + - + - a\ :sub:`7` + - a\ :sub:`6` + - a\ :sub:`5` + - a\ :sub:`4` + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + +.. raw:: latex + + \end{adjustbox}\newline\newline A test utility to determine which RGB formats a driver actually supports is available from the LinuxTV v4l-dvb repository. See diff --git a/Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst b/Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst index 54716455f453..ebc8fcc937ad 100644 --- a/Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst +++ b/Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst @@ -6,311 +6,188 @@ Packed YUV formats ****************** -*man Packed YUV formats(2)* - -Packed YUV formats - - Description =========== Similar to the packed RGB formats these formats store the Y, Cb and Cr component of each pixel in one 16 or 32 bit word. +.. raw:: latex + + \newline\newline\begin{adjustbox}{width=\columnwidth} +.. _packed-yuv-formats: + +.. tabularcolumns:: |p{4.5cm}|p{3.3cm}|p{0.7cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.2cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{0.4cm}|p{1.7cm}| .. flat-table:: Packed YUV Image Formats :header-rows: 2 :stub-columns: 0 - - - .. row 1 - - - Identifier - - - Code - - - - - :cspan:`7` Byte 0 in memory - - - - - :cspan:`7` Byte 1 - - - - - :cspan:`7` Byte 2 - - - - - :cspan:`7` Byte 3 - - - .. row 2 - - - - - - - Bit - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _V4L2-PIX-FMT-YUV444: - - - ``V4L2_PIX_FMT_YUV444`` - - - 'Y444' - - - - - Cb\ :sub:`3` - - - Cb\ :sub:`2` - - - Cb\ :sub:`1` - - - Cb\ :sub:`0` - - - Cr\ :sub:`3` - - - Cr\ :sub:`2` - - - Cr\ :sub:`1` - - - Cr\ :sub:`0` - - - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - Y'\ :sub:`3` - - - Y'\ :sub:`2` - - - Y'\ :sub:`1` - - - Y'\ :sub:`0` - - - .. _V4L2-PIX-FMT-YUV555: - - - ``V4L2_PIX_FMT_YUV555`` - - - 'YUVO' - - - - - Cb\ :sub:`2` - - - Cb\ :sub:`1` - - - Cb\ :sub:`0` - - - Cr\ :sub:`4` - - - Cr\ :sub:`3` - - - Cr\ :sub:`2` - - - Cr\ :sub:`1` - - - Cr\ :sub:`0` - - - - - a - - - Y'\ :sub:`4` - - - Y'\ :sub:`3` - - - Y'\ :sub:`2` - - - Y'\ :sub:`1` - - - Y'\ :sub:`0` - - - Cb\ :sub:`4` - - - Cb\ :sub:`3` - - - .. _V4L2-PIX-FMT-YUV565: - - - ``V4L2_PIX_FMT_YUV565`` - - - 'YUVP' - - - - - Cb\ :sub:`2` - - - Cb\ :sub:`1` - - - Cb\ :sub:`0` - - - Cr\ :sub:`4` - - - Cr\ :sub:`3` - - - Cr\ :sub:`2` - - - Cr\ :sub:`1` - - - Cr\ :sub:`0` - - - - - Y'\ :sub:`4` - - - Y'\ :sub:`3` - - - Y'\ :sub:`2` - - - Y'\ :sub:`1` - - - Y'\ :sub:`0` - - - Cb\ :sub:`5` - - - Cb\ :sub:`4` - - - Cb\ :sub:`3` - - - .. _V4L2-PIX-FMT-YUV32: - - - ``V4L2_PIX_FMT_YUV32`` - - - 'YUV4' - - - - - a\ :sub:`7` - - - a\ :sub:`6` - - - a\ :sub:`5` - - - a\ :sub:`4` - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - - - Y'\ :sub:`7` - - - Y'\ :sub:`6` - - - Y'\ :sub:`5` - - - Y'\ :sub:`4` - - - Y'\ :sub:`3` - - - Y'\ :sub:`2` - - - Y'\ :sub:`1` - - - Y'\ :sub:`0` - - - - - Cb\ :sub:`7` - - - Cb\ :sub:`6` - - - Cb\ :sub:`5` - - - Cb\ :sub:`4` - - - Cb\ :sub:`3` - - - Cb\ :sub:`2` - - - Cb\ :sub:`1` - - - Cb\ :sub:`0` - - - - - Cr\ :sub:`7` - - - Cr\ :sub:`6` - - - Cr\ :sub:`5` - - - Cr\ :sub:`4` - - - Cr\ :sub:`3` - - - Cr\ :sub:`2` - - - Cr\ :sub:`1` - - - Cr\ :sub:`0` - - -Bit 7 is the most significant bit. The value of a = alpha bits is -undefined when reading from the driver, ignored when writing to the -driver, except when alpha blending has been negotiated for a -:ref:`Video Overlay <overlay>` or :ref:`Video Output Overlay <osd>`. + * - Identifier + - Code + - + - :cspan:`7` Byte 0 in memory + - + - :cspan:`7` Byte 1 + - + - :cspan:`7` Byte 2 + - + - :cspan:`7` Byte 3 + * - + - + - Bit + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + - + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + * .. _V4L2-PIX-FMT-YUV444: + + - ``V4L2_PIX_FMT_YUV444`` + - 'Y444' + - + - Cb\ :sub:`3` + - Cb\ :sub:`2` + - Cb\ :sub:`1` + - Cb\ :sub:`0` + - Cr\ :sub:`3` + - Cr\ :sub:`2` + - Cr\ :sub:`1` + - Cr\ :sub:`0` + - + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - Y'\ :sub:`3` + - Y'\ :sub:`2` + - Y'\ :sub:`1` + - Y'\ :sub:`0` + * .. _V4L2-PIX-FMT-YUV555: + + - ``V4L2_PIX_FMT_YUV555`` + - 'YUVO' + - + - Cb\ :sub:`2` + - Cb\ :sub:`1` + - Cb\ :sub:`0` + - Cr\ :sub:`4` + - Cr\ :sub:`3` + - Cr\ :sub:`2` + - Cr\ :sub:`1` + - Cr\ :sub:`0` + - + - a + - Y'\ :sub:`4` + - Y'\ :sub:`3` + - Y'\ :sub:`2` + - Y'\ :sub:`1` + - Y'\ :sub:`0` + - Cb\ :sub:`4` + - Cb\ :sub:`3` + * .. _V4L2-PIX-FMT-YUV565: + + - ``V4L2_PIX_FMT_YUV565`` + - 'YUVP' + - + - Cb\ :sub:`2` + - Cb\ :sub:`1` + - Cb\ :sub:`0` + - Cr\ :sub:`4` + - Cr\ :sub:`3` + - Cr\ :sub:`2` + - Cr\ :sub:`1` + - Cr\ :sub:`0` + - + - Y'\ :sub:`4` + - Y'\ :sub:`3` + - Y'\ :sub:`2` + - Y'\ :sub:`1` + - Y'\ :sub:`0` + - Cb\ :sub:`5` + - Cb\ :sub:`4` + - Cb\ :sub:`3` + * .. _V4L2-PIX-FMT-YUV32: + + - ``V4L2_PIX_FMT_YUV32`` + - 'YUV4' + - + - a\ :sub:`7` + - a\ :sub:`6` + - a\ :sub:`5` + - a\ :sub:`4` + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - + - Y'\ :sub:`7` + - Y'\ :sub:`6` + - Y'\ :sub:`5` + - Y'\ :sub:`4` + - Y'\ :sub:`3` + - Y'\ :sub:`2` + - Y'\ :sub:`1` + - Y'\ :sub:`0` + - + - Cb\ :sub:`7` + - Cb\ :sub:`6` + - Cb\ :sub:`5` + - Cb\ :sub:`4` + - Cb\ :sub:`3` + - Cb\ :sub:`2` + - Cb\ :sub:`1` + - Cb\ :sub:`0` + - + - Cr\ :sub:`7` + - Cr\ :sub:`6` + - Cr\ :sub:`5` + - Cr\ :sub:`4` + - Cr\ :sub:`3` + - Cr\ :sub:`2` + - Cr\ :sub:`1` + - Cr\ :sub:`0` + +.. raw:: latex + + \end{adjustbox}\newline\newline + +.. note:: + + #) Bit 7 is the most significant bit; + + #) The value of a = alpha bits is undefined when reading from the driver, + ignored when writing to the driver, except when alpha blending has + been negotiated for a :ref:`Video Overlay <overlay>` or + :ref:`Video Output Overlay <osd>`. diff --git a/Documentation/media/uapi/v4l/pixfmt-reserved.rst b/Documentation/media/uapi/v4l/pixfmt-reserved.rst index 9a5704baf9fe..bd7bf3dae6af 100644 --- a/Documentation/media/uapi/v4l/pixfmt-reserved.rst +++ b/Documentation/media/uapi/v4l/pixfmt-reserved.rst @@ -17,6 +17,8 @@ you think your format should be listed in a standard format section please make a proposal on the linux-media mailing list. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + .. _reserved-formats: .. flat-table:: Reserved Image Formats @@ -24,320 +26,218 @@ please make a proposal on the linux-media mailing list. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - Identifier - - - Code - - - Details - - - .. _V4L2-PIX-FMT-DV: - - - ``V4L2_PIX_FMT_DV`` - - - 'dvsd' - - - unknown - - - .. _V4L2-PIX-FMT-ET61X251: - - - ``V4L2_PIX_FMT_ET61X251`` - - - 'E625' - - - Compressed format of the ET61X251 driver. - - - .. _V4L2-PIX-FMT-HI240: - - - ``V4L2_PIX_FMT_HI240`` - - - 'HI24' - - - 8 bit RGB format used by the BTTV driver. - - - .. _V4L2-PIX-FMT-HM12: - - - ``V4L2_PIX_FMT_HM12`` - - - 'HM12' - - - YUV 4:2:0 format used by the IVTV driver, - `http://www.ivtvdriver.org/ <http://www.ivtvdriver.org/>`__ - - The format is documented in the kernel sources in the file - ``Documentation/video4linux/cx2341x/README.hm12`` - - - .. _V4L2-PIX-FMT-CPIA1: - - - ``V4L2_PIX_FMT_CPIA1`` - - - 'CPIA' - - - YUV format used by the gspca cpia1 driver. - - - .. _V4L2-PIX-FMT-JPGL: - - - ``V4L2_PIX_FMT_JPGL`` - - - 'JPGL' - - - JPEG-Light format (Pegasus Lossless JPEG) used in Divio webcams NW - 80x. - - - .. _V4L2-PIX-FMT-SPCA501: - - - ``V4L2_PIX_FMT_SPCA501`` - - - 'S501' - - - YUYV per line used by the gspca driver. - - - .. _V4L2-PIX-FMT-SPCA505: - - - ``V4L2_PIX_FMT_SPCA505`` - - - 'S505' - - - YYUV per line used by the gspca driver. - - - .. _V4L2-PIX-FMT-SPCA508: - - - ``V4L2_PIX_FMT_SPCA508`` - - - 'S508' - - - YUVY per line used by the gspca driver. - - - .. _V4L2-PIX-FMT-SPCA561: - - - ``V4L2_PIX_FMT_SPCA561`` - - - 'S561' - - - Compressed GBRG Bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-PAC207: - - - ``V4L2_PIX_FMT_PAC207`` - - - 'P207' - - - Compressed BGGR Bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-MR97310A: - - - ``V4L2_PIX_FMT_MR97310A`` - - - 'M310' - - - Compressed BGGR Bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-JL2005BCD: - - - ``V4L2_PIX_FMT_JL2005BCD`` - - - 'JL20' - - - JPEG compressed RGGB Bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-OV511: - - - ``V4L2_PIX_FMT_OV511`` - - - 'O511' - - - OV511 JPEG format used by the gspca driver. - - - .. _V4L2-PIX-FMT-OV518: - - - ``V4L2_PIX_FMT_OV518`` - - - 'O518' - - - OV518 JPEG format used by the gspca driver. - - - .. _V4L2-PIX-FMT-PJPG: - - - ``V4L2_PIX_FMT_PJPG`` - - - 'PJPG' - - - Pixart 73xx JPEG format used by the gspca driver. - - - .. _V4L2-PIX-FMT-SE401: - - - ``V4L2_PIX_FMT_SE401`` - - - 'S401' - - - Compressed RGB format used by the gspca se401 driver - - - .. _V4L2-PIX-FMT-SQ905C: - - - ``V4L2_PIX_FMT_SQ905C`` - - - '905C' - - - Compressed RGGB bayer format used by the gspca driver. - - - .. _V4L2-PIX-FMT-MJPEG: - - - ``V4L2_PIX_FMT_MJPEG`` - - - 'MJPG' - - - Compressed format used by the Zoran driver - - - .. _V4L2-PIX-FMT-PWC1: - - - ``V4L2_PIX_FMT_PWC1`` - - - 'PWC1' - - - Compressed format of the PWC driver. - - - .. _V4L2-PIX-FMT-PWC2: - - - ``V4L2_PIX_FMT_PWC2`` - - - 'PWC2' - - - Compressed format of the PWC driver. - - - .. _V4L2-PIX-FMT-SN9C10X: - - - ``V4L2_PIX_FMT_SN9C10X`` - - - 'S910' - - - Compressed format of the SN9C102 driver. - - - .. _V4L2-PIX-FMT-SN9C20X-I420: - - - ``V4L2_PIX_FMT_SN9C20X_I420`` - - - 'S920' - - - YUV 4:2:0 format of the gspca sn9c20x driver. - - - .. _V4L2-PIX-FMT-SN9C2028: - - - ``V4L2_PIX_FMT_SN9C2028`` - - - 'SONX' - - - Compressed GBRG bayer format of the gspca sn9c2028 driver. - - - .. _V4L2-PIX-FMT-STV0680: - - - ``V4L2_PIX_FMT_STV0680`` - - - 'S680' - - - Bayer format of the gspca stv0680 driver. - - - .. _V4L2-PIX-FMT-WNVA: - - - ``V4L2_PIX_FMT_WNVA`` - - - 'WNVA' - - - Used by the Winnov Videum driver, - `http://www.thedirks.org/winnov/ <http://www.thedirks.org/winnov/>`__ - - - .. _V4L2-PIX-FMT-TM6000: - - - ``V4L2_PIX_FMT_TM6000`` - - - 'TM60' - - - Used by Trident tm6000 - - - .. _V4L2-PIX-FMT-CIT-YYVYUY: - - - ``V4L2_PIX_FMT_CIT_YYVYUY`` - - - 'CITV' - - - Used by xirlink CIT, found at IBM webcams. - - Uses one line of Y then 1 line of VYUY - - - .. _V4L2-PIX-FMT-KONICA420: - - - ``V4L2_PIX_FMT_KONICA420`` - - - 'KONI' - - - Used by Konica webcams. - - YUV420 planar in blocks of 256 pixels. - - - .. _V4L2-PIX-FMT-YYUV: - - - ``V4L2_PIX_FMT_YYUV`` - - - 'YYUV' - - - unknown - - - .. _V4L2-PIX-FMT-Y4: - - - ``V4L2_PIX_FMT_Y4`` - - - 'Y04 ' - - - Old 4-bit greyscale format. Only the most significant 4 bits of - each byte are used, the other bits are set to 0. - - - .. _V4L2-PIX-FMT-Y6: - - - ``V4L2_PIX_FMT_Y6`` - - - 'Y06 ' - - - Old 6-bit greyscale format. Only the most significant 6 bits of - each byte are used, the other bits are set to 0. - - - .. _V4L2-PIX-FMT-S5C-UYVY-JPG: - - - ``V4L2_PIX_FMT_S5C_UYVY_JPG`` - - - 'S5CI' - - - Two-planar format used by Samsung S5C73MX cameras. The first plane - contains interleaved JPEG and UYVY image data, followed by meta - data in form of an array of offsets to the UYVY data blocks. The - actual pointer array follows immediately the interleaved JPEG/UYVY - data, the number of entries in this array equals the height of the - UYVY image. Each entry is a 4-byte unsigned integer in big endian - order and it's an offset to a single pixel line of the UYVY image. - The first plane can start either with JPEG or UYVY data chunk. The - size of a single UYVY block equals the UYVY image's width - multiplied by 2. The size of a JPEG chunk depends on the image and - can vary with each line. - - The second plane, at an offset of 4084 bytes, contains a 4-byte - offset to the pointer array in the first plane. This offset is - followed by a 4-byte value indicating size of the pointer array. - All numbers in the second plane are also in big endian order. - Remaining data in the second plane is undefined. The information - in the second plane allows to easily find location of the pointer - array, which can be different for each frame. The size of the - pointer array is constant for given UYVY image height. - - In order to extract UYVY and JPEG frames an application can - initially set a data pointer to the start of first plane and then - add an offset from the first entry of the pointers table. Such a - pointer indicates start of an UYVY image pixel line. Whole UYVY - line can be copied to a separate buffer. These steps should be - repeated for each line, i.e. the number of entries in the pointer - array. Anything what's in between the UYVY lines is JPEG data and - should be concatenated to form the JPEG stream. - - + * - Identifier + - Code + - Details + * .. _V4L2-PIX-FMT-DV: + + - ``V4L2_PIX_FMT_DV`` + - 'dvsd' + - unknown + * .. _V4L2-PIX-FMT-ET61X251: + + - ``V4L2_PIX_FMT_ET61X251`` + - 'E625' + - Compressed format of the ET61X251 driver. + * .. _V4L2-PIX-FMT-HI240: + + - ``V4L2_PIX_FMT_HI240`` + - 'HI24' + - 8 bit RGB format used by the BTTV driver. + * .. _V4L2-PIX-FMT-HM12: + + - ``V4L2_PIX_FMT_HM12`` + - 'HM12' + - YUV 4:2:0 format used by the IVTV driver, + `http://www.ivtvdriver.org/ <http://www.ivtvdriver.org/>`__ + + The format is documented in the kernel sources in the file + ``Documentation/video4linux/cx2341x/README.hm12`` + * .. _V4L2-PIX-FMT-CPIA1: + + - ``V4L2_PIX_FMT_CPIA1`` + - 'CPIA' + - YUV format used by the gspca cpia1 driver. + * .. _V4L2-PIX-FMT-JPGL: + + - ``V4L2_PIX_FMT_JPGL`` + - 'JPGL' + - JPEG-Light format (Pegasus Lossless JPEG) used in Divio webcams NW + 80x. + * .. _V4L2-PIX-FMT-SPCA501: + + - ``V4L2_PIX_FMT_SPCA501`` + - 'S501' + - YUYV per line used by the gspca driver. + * .. _V4L2-PIX-FMT-SPCA505: + + - ``V4L2_PIX_FMT_SPCA505`` + - 'S505' + - YYUV per line used by the gspca driver. + * .. _V4L2-PIX-FMT-SPCA508: + + - ``V4L2_PIX_FMT_SPCA508`` + - 'S508' + - YUVY per line used by the gspca driver. + * .. _V4L2-PIX-FMT-SPCA561: + + - ``V4L2_PIX_FMT_SPCA561`` + - 'S561' + - Compressed GBRG Bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-PAC207: + + - ``V4L2_PIX_FMT_PAC207`` + - 'P207' + - Compressed BGGR Bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-MR97310A: + + - ``V4L2_PIX_FMT_MR97310A`` + - 'M310' + - Compressed BGGR Bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-JL2005BCD: + + - ``V4L2_PIX_FMT_JL2005BCD`` + - 'JL20' + - JPEG compressed RGGB Bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-OV511: + + - ``V4L2_PIX_FMT_OV511`` + - 'O511' + - OV511 JPEG format used by the gspca driver. + * .. _V4L2-PIX-FMT-OV518: + + - ``V4L2_PIX_FMT_OV518`` + - 'O518' + - OV518 JPEG format used by the gspca driver. + * .. _V4L2-PIX-FMT-PJPG: + + - ``V4L2_PIX_FMT_PJPG`` + - 'PJPG' + - Pixart 73xx JPEG format used by the gspca driver. + * .. _V4L2-PIX-FMT-SE401: + + - ``V4L2_PIX_FMT_SE401`` + - 'S401' + - Compressed RGB format used by the gspca se401 driver + * .. _V4L2-PIX-FMT-SQ905C: + + - ``V4L2_PIX_FMT_SQ905C`` + - '905C' + - Compressed RGGB bayer format used by the gspca driver. + * .. _V4L2-PIX-FMT-MJPEG: + + - ``V4L2_PIX_FMT_MJPEG`` + - 'MJPG' + - Compressed format used by the Zoran driver + * .. _V4L2-PIX-FMT-PWC1: + + - ``V4L2_PIX_FMT_PWC1`` + - 'PWC1' + - Compressed format of the PWC driver. + * .. _V4L2-PIX-FMT-PWC2: + + - ``V4L2_PIX_FMT_PWC2`` + - 'PWC2' + - Compressed format of the PWC driver. + * .. _V4L2-PIX-FMT-SN9C10X: + + - ``V4L2_PIX_FMT_SN9C10X`` + - 'S910' + - Compressed format of the SN9C102 driver. + * .. _V4L2-PIX-FMT-SN9C20X-I420: + + - ``V4L2_PIX_FMT_SN9C20X_I420`` + - 'S920' + - YUV 4:2:0 format of the gspca sn9c20x driver. + * .. _V4L2-PIX-FMT-SN9C2028: + + - ``V4L2_PIX_FMT_SN9C2028`` + - 'SONX' + - Compressed GBRG bayer format of the gspca sn9c2028 driver. + * .. _V4L2-PIX-FMT-STV0680: + + - ``V4L2_PIX_FMT_STV0680`` + - 'S680' + - Bayer format of the gspca stv0680 driver. + * .. _V4L2-PIX-FMT-WNVA: + + - ``V4L2_PIX_FMT_WNVA`` + - 'WNVA' + - Used by the Winnov Videum driver, + `http://www.thedirks.org/winnov/ <http://www.thedirks.org/winnov/>`__ + * .. _V4L2-PIX-FMT-TM6000: + + - ``V4L2_PIX_FMT_TM6000`` + - 'TM60' + - Used by Trident tm6000 + * .. _V4L2-PIX-FMT-CIT-YYVYUY: + + - ``V4L2_PIX_FMT_CIT_YYVYUY`` + - 'CITV' + - Used by xirlink CIT, found at IBM webcams. + + Uses one line of Y then 1 line of VYUY + * .. _V4L2-PIX-FMT-KONICA420: + + - ``V4L2_PIX_FMT_KONICA420`` + - 'KONI' + - Used by Konica webcams. + + YUV420 planar in blocks of 256 pixels. + * .. _V4L2-PIX-FMT-YYUV: + + - ``V4L2_PIX_FMT_YYUV`` + - 'YYUV' + - unknown + * .. _V4L2-PIX-FMT-Y4: + + - ``V4L2_PIX_FMT_Y4`` + - 'Y04 ' + - Old 4-bit greyscale format. Only the most significant 4 bits of + each byte are used, the other bits are set to 0. + * .. _V4L2-PIX-FMT-Y6: + + - ``V4L2_PIX_FMT_Y6`` + - 'Y06 ' + - Old 6-bit greyscale format. Only the most significant 6 bits of + each byte are used, the other bits are set to 0. + * .. _V4L2-PIX-FMT-S5C-UYVY-JPG: + + - ``V4L2_PIX_FMT_S5C_UYVY_JPG`` + - 'S5CI' + - Two-planar format used by Samsung S5C73MX cameras. The first plane + contains interleaved JPEG and UYVY image data, followed by meta + data in form of an array of offsets to the UYVY data blocks. The + actual pointer array follows immediately the interleaved JPEG/UYVY + data, the number of entries in this array equals the height of the + UYVY image. Each entry is a 4-byte unsigned integer in big endian + order and it's an offset to a single pixel line of the UYVY image. + The first plane can start either with JPEG or UYVY data chunk. The + size of a single UYVY block equals the UYVY image's width + multiplied by 2. The size of a JPEG chunk depends on the image and + can vary with each line. + + The second plane, at an offset of 4084 bytes, contains a 4-byte + offset to the pointer array in the first plane. This offset is + followed by a 4-byte value indicating size of the pointer array. + All numbers in the second plane are also in big endian order. + Remaining data in the second plane is undefined. The information + in the second plane allows to easily find location of the pointer + array, which can be different for each frame. The size of the + pointer array is constant for given UYVY image height. + + In order to extract UYVY and JPEG frames an application can + initially set a data pointer to the start of first plane and then + add an offset from the first entry of the pointers table. Such a + pointer indicates start of an UYVY image pixel line. Whole UYVY + line can be copied to a separate buffer. These steps should be + repeated for each line, i.e. the number of entries in the pointer + array. Anything what's in between the UYVY lines is JPEG data and + should be concatenated to form the JPEG stream. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _format-flags: @@ -346,15 +246,10 @@ please make a proposal on the linux-media mailing list. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_PIX_FMT_FLAG_PREMUL_ALPHA`` - - - 0x00000001 - - - The color values are premultiplied by the alpha channel value. For - example, if a light blue pixel with 50% transparency was described - by RGBA values (128, 192, 255, 128), the same pixel described with - premultiplied colors would be described by RGBA values (64, 96, - 128, 128) + * - ``V4L2_PIX_FMT_FLAG_PREMUL_ALPHA`` + - 0x00000001 + - The color values are premultiplied by the alpha channel value. For + example, if a light blue pixel with 50% transparency was described + by RGBA values (128, 192, 255, 128), the same pixel described with + premultiplied colors would be described by RGBA values (64, 96, + 128, 128) diff --git a/Documentation/media/uapi/v4l/pixfmt-rgb.rst b/Documentation/media/uapi/v4l/pixfmt-rgb.rst index 4b3651cc0a96..9cc980882e80 100644 --- a/Documentation/media/uapi/v4l/pixfmt-rgb.rst +++ b/Documentation/media/uapi/v4l/pixfmt-rgb.rst @@ -11,9 +11,6 @@ RGB Formats :maxdepth: 1 pixfmt-packed-rgb - pixfmt-sbggr8 - pixfmt-sgbrg8 - pixfmt-sgrbg8 pixfmt-srggb8 pixfmt-sbggr16 pixfmt-srggb10 diff --git a/Documentation/media/uapi/v4l/pixfmt-sbggr16.rst b/Documentation/media/uapi/v4l/pixfmt-sbggr16.rst index 14446ed7f650..6f7f327db85c 100644 --- a/Documentation/media/uapi/v4l/pixfmt-sbggr16.rst +++ b/Documentation/media/uapi/v4l/pixfmt-sbggr16.rst @@ -6,8 +6,6 @@ V4L2_PIX_FMT_SBGGR16 ('BYR2') ***************************** -*man V4L2_PIX_FMT_SBGGR16(2)* - Bayer RGB format @@ -19,96 +17,46 @@ This format is similar to has a depth of 16 bits. The least significant byte is stored at lower memory addresses (little-endian). -..note:: The actual sampling precision may be lower than 16 bits, - for example 10 bits per pixel with values in tange 0 to 1023. - **Byte Order.** Each cell is one byte. - - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - B\ :sub:`00low` - - - B\ :sub:`00high` - - - G\ :sub:`01low` - - - G\ :sub:`01high` - - - B\ :sub:`02low` - - - B\ :sub:`02high` - - - G\ :sub:`03low` - - - G\ :sub:`03high` - - - .. row 2 - - - start + 8: - - - G\ :sub:`10low` - - - G\ :sub:`10high` - - - R\ :sub:`11low` - - - R\ :sub:`11high` - - - G\ :sub:`12low` - - - G\ :sub:`12high` - - - R\ :sub:`13low` - - - R\ :sub:`13high` - - - .. row 3 - - - start + 16: - - - B\ :sub:`20low` - - - B\ :sub:`20high` - - - G\ :sub:`21low` - - - G\ :sub:`21high` - - - B\ :sub:`22low` - - - B\ :sub:`22high` - - - G\ :sub:`23low` - - - G\ :sub:`23high` - - - .. row 4 - - - start + 24: - - - G\ :sub:`30low` - - - G\ :sub:`30high` - - - R\ :sub:`31low` - - - R\ :sub:`31high` - - - G\ :sub:`32low` - - - G\ :sub:`32high` - - - R\ :sub:`33low` - - R\ :sub:`33high` + * - start + 0: + - B\ :sub:`00low` + - B\ :sub:`00high` + - G\ :sub:`01low` + - G\ :sub:`01high` + - B\ :sub:`02low` + - B\ :sub:`02high` + - G\ :sub:`03low` + - G\ :sub:`03high` + * - start + 8: + - G\ :sub:`10low` + - G\ :sub:`10high` + - R\ :sub:`11low` + - R\ :sub:`11high` + - G\ :sub:`12low` + - G\ :sub:`12high` + - R\ :sub:`13low` + - R\ :sub:`13high` + * - start + 16: + - B\ :sub:`20low` + - B\ :sub:`20high` + - G\ :sub:`21low` + - G\ :sub:`21high` + - B\ :sub:`22low` + - B\ :sub:`22high` + - G\ :sub:`23low` + - G\ :sub:`23high` + * - start + 24: + - G\ :sub:`30low` + - G\ :sub:`30high` + - R\ :sub:`31low` + - R\ :sub:`31high` + - G\ :sub:`32low` + - G\ :sub:`32high` + - R\ :sub:`33low` + - R\ :sub:`33high` diff --git a/Documentation/media/uapi/v4l/pixfmt-sbggr8.rst b/Documentation/media/uapi/v4l/pixfmt-sbggr8.rst deleted file mode 100644 index db4c523f49a9..000000000000 --- a/Documentation/media/uapi/v4l/pixfmt-sbggr8.rst +++ /dev/null @@ -1,81 +0,0 @@ -.. -*- coding: utf-8; mode: rst -*- - -.. _V4L2-PIX-FMT-SBGGR8: - -**************************** -V4L2_PIX_FMT_SBGGR8 ('BA81') -**************************** - -*man V4L2_PIX_FMT_SBGGR8(2)* - -Bayer RGB format - - -Description -=========== - -This is commonly the native format of digital cameras, reflecting the -arrangement of sensors on the CCD device. Only one red, green or blue -value is given for each pixel. Missing components must be interpolated -from neighbouring pixels. From left to right the first row consists of a -blue and green value, the second row of a green and red value. This -scheme repeats to the right and down for every two columns and rows. - -**Byte Order.** -Each cell is one byte. - - - -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - B\ :sub:`00` - - - G\ :sub:`01` - - - B\ :sub:`02` - - - G\ :sub:`03` - - - .. row 2 - - - start + 4: - - - G\ :sub:`10` - - - R\ :sub:`11` - - - G\ :sub:`12` - - - R\ :sub:`13` - - - .. row 3 - - - start + 8: - - - B\ :sub:`20` - - - G\ :sub:`21` - - - B\ :sub:`22` - - - G\ :sub:`23` - - - .. row 4 - - - start + 12: - - - G\ :sub:`30` - - - R\ :sub:`31` - - - G\ :sub:`32` - - - R\ :sub:`33` diff --git a/Documentation/media/uapi/v4l/pixfmt-sdr-cs08.rst b/Documentation/media/uapi/v4l/pixfmt-sdr-cs08.rst index 2736275d080f..179894f6f8fb 100644 --- a/Documentation/media/uapi/v4l/pixfmt-sdr-cs08.rst +++ b/Documentation/media/uapi/v4l/pixfmt-sdr-cs08.rst @@ -6,8 +6,6 @@ V4L2_SDR_FMT_CS8 ('CS08') ************************* -*man V4L2_SDR_FMT_CS8(2)* - Complex signed 8-bit IQ sample @@ -22,22 +20,11 @@ Q value after that. **Byte Order.** Each cell is one byte. - - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 - - - - .. row 1 - - - start + 0: - - - I'\ :sub:`0` - - - .. row 2 - - - start + 1: - - Q'\ :sub:`0` + * - start + 0: + - I'\ :sub:`0` + * - start + 1: + - Q'\ :sub:`0` diff --git a/Documentation/media/uapi/v4l/pixfmt-sdr-cs14le.rst b/Documentation/media/uapi/v4l/pixfmt-sdr-cs14le.rst index bfe5804bd84e..5cf7d387447c 100644 --- a/Documentation/media/uapi/v4l/pixfmt-sdr-cs14le.rst +++ b/Documentation/media/uapi/v4l/pixfmt-sdr-cs14le.rst @@ -6,8 +6,6 @@ V4L2_SDR_FMT_CS14LE ('CS14') **************************** -*man V4L2_SDR_FMT_CS14LE(2)* - Complex signed 14-bit little endian IQ sample @@ -24,25 +22,13 @@ space with unused high bits padded with 0. Each cell is one byte. - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 - - - - .. row 1 - - - start + 0: - - - I'\ :sub:`0[7:0]` - - - I'\ :sub:`0[13:8]` - - - .. row 2 - - - start + 2: - - - Q'\ :sub:`0[7:0]` - - Q'\ :sub:`0[13:8]` + * - start + 0: + - I'\ :sub:`0[7:0]` + - I'\ :sub:`0[13:8]` + * - start + 2: + - Q'\ :sub:`0[7:0]` + - Q'\ :sub:`0[13:8]` diff --git a/Documentation/media/uapi/v4l/pixfmt-sdr-cu08.rst b/Documentation/media/uapi/v4l/pixfmt-sdr-cu08.rst index 68ad1717f6d7..fd915b7629b7 100644 --- a/Documentation/media/uapi/v4l/pixfmt-sdr-cu08.rst +++ b/Documentation/media/uapi/v4l/pixfmt-sdr-cu08.rst @@ -6,8 +6,6 @@ V4L2_SDR_FMT_CU8 ('CU08') ************************* -*man V4L2_SDR_FMT_CU8(2)* - Complex unsigned 8-bit IQ sample @@ -22,22 +20,11 @@ and Q value after that. **Byte Order.** Each cell is one byte. - - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 - - - - .. row 1 - - - start + 0: - - - I'\ :sub:`0` - - - .. row 2 - - - start + 1: - - Q'\ :sub:`0` + * - start + 0: + - I'\ :sub:`0` + * - start + 1: + - Q'\ :sub:`0` diff --git a/Documentation/media/uapi/v4l/pixfmt-sdr-cu16le.rst b/Documentation/media/uapi/v4l/pixfmt-sdr-cu16le.rst index 2a1c0d4924a1..8922f5b35457 100644 --- a/Documentation/media/uapi/v4l/pixfmt-sdr-cu16le.rst +++ b/Documentation/media/uapi/v4l/pixfmt-sdr-cu16le.rst @@ -6,7 +6,6 @@ V4L2_SDR_FMT_CU16LE ('CU16') **************************** -*man V4L2_SDR_FMT_CU16LE(2)* Complex unsigned 16-bit little endian IQ sample @@ -23,25 +22,13 @@ comes first and Q value after that. Each cell is one byte. - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 - - - - .. row 1 - - - start + 0: - - - I'\ :sub:`0[7:0]` - - - I'\ :sub:`0[15:8]` - - - .. row 2 - - - start + 2: - - - Q'\ :sub:`0[7:0]` - - Q'\ :sub:`0[15:8]` + * - start + 0: + - I'\ :sub:`0[7:0]` + - I'\ :sub:`0[15:8]` + * - start + 2: + - Q'\ :sub:`0[7:0]` + - Q'\ :sub:`0[15:8]` diff --git a/Documentation/media/uapi/v4l/pixfmt-sdr-ru12le.rst b/Documentation/media/uapi/v4l/pixfmt-sdr-ru12le.rst index 378581b27d4a..5e383382802f 100644 --- a/Documentation/media/uapi/v4l/pixfmt-sdr-ru12le.rst +++ b/Documentation/media/uapi/v4l/pixfmt-sdr-ru12le.rst @@ -6,7 +6,6 @@ V4L2_SDR_FMT_RU12LE ('RU12') **************************** -*man V4L2_SDR_FMT_RU12LE(2)* Real unsigned 12-bit little endian sample @@ -23,16 +22,11 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 - - - - .. row 1 - - - start + 0: - - - I'\ :sub:`0[7:0]` - - I'\ :sub:`0[11:8]` + * - start + 0: + - I'\ :sub:`0[7:0]` + - I'\ :sub:`0[11:8]` diff --git a/Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst b/Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst deleted file mode 100644 index 6345c24d86f3..000000000000 --- a/Documentation/media/uapi/v4l/pixfmt-sgbrg8.rst +++ /dev/null @@ -1,81 +0,0 @@ -.. -*- coding: utf-8; mode: rst -*- - -.. _V4L2-PIX-FMT-SGBRG8: - -**************************** -V4L2_PIX_FMT_SGBRG8 ('GBRG') -**************************** - -*man V4L2_PIX_FMT_SGBRG8(2)* - -Bayer RGB format - - -Description -=========== - -This is commonly the native format of digital cameras, reflecting the -arrangement of sensors on the CCD device. Only one red, green or blue -value is given for each pixel. Missing components must be interpolated -from neighbouring pixels. From left to right the first row consists of a -green and blue value, the second row of a red and green value. This -scheme repeats to the right and down for every two columns and rows. - -**Byte Order.** -Each cell is one byte. - - - -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - G\ :sub:`00` - - - B\ :sub:`01` - - - G\ :sub:`02` - - - B\ :sub:`03` - - - .. row 2 - - - start + 4: - - - R\ :sub:`10` - - - G\ :sub:`11` - - - R\ :sub:`12` - - - G\ :sub:`13` - - - .. row 3 - - - start + 8: - - - G\ :sub:`20` - - - B\ :sub:`21` - - - G\ :sub:`22` - - - B\ :sub:`23` - - - .. row 4 - - - start + 12: - - - R\ :sub:`30` - - - G\ :sub:`31` - - - R\ :sub:`32` - - - G\ :sub:`33` diff --git a/Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst b/Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst deleted file mode 100644 index 51b7b8ef7519..000000000000 --- a/Documentation/media/uapi/v4l/pixfmt-sgrbg8.rst +++ /dev/null @@ -1,81 +0,0 @@ -.. -*- coding: utf-8; mode: rst -*- - -.. _V4L2-PIX-FMT-SGRBG8: - -**************************** -V4L2_PIX_FMT_SGRBG8 ('GRBG') -**************************** - -*man V4L2_PIX_FMT_SGRBG8(2)* - -Bayer RGB format - - -Description -=========== - -This is commonly the native format of digital cameras, reflecting the -arrangement of sensors on the CCD device. Only one red, green or blue -value is given for each pixel. Missing components must be interpolated -from neighbouring pixels. From left to right the first row consists of a -green and blue value, the second row of a red and green value. This -scheme repeats to the right and down for every two columns and rows. - -**Byte Order.** -Each cell is one byte. - - - -.. flat-table:: - :header-rows: 0 - :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - G\ :sub:`00` - - - R\ :sub:`01` - - - G\ :sub:`02` - - - R\ :sub:`03` - - - .. row 2 - - - start + 4: - - - B\ :sub:`10` - - - G\ :sub:`11` - - - B\ :sub:`12` - - - G\ :sub:`13` - - - .. row 3 - - - start + 8: - - - G\ :sub:`20` - - - R\ :sub:`21` - - - G\ :sub:`22` - - - R\ :sub:`23` - - - .. row 4 - - - start + 12: - - - B\ :sub:`30` - - - G\ :sub:`31` - - - B\ :sub:`32` - - - G\ :sub:`33` diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb10.rst b/Documentation/media/uapi/v4l/pixfmt-srggb10.rst index 44a49563917c..af2538ce34e5 100644 --- a/Documentation/media/uapi/v4l/pixfmt-srggb10.rst +++ b/Documentation/media/uapi/v4l/pixfmt-srggb10.rst @@ -9,7 +9,6 @@ V4L2_PIX_FMT_SRGGB10 ('RG10'), V4L2_PIX_FMT_SGRBG10 ('BA10'), V4L2_PIX_FMT_SGBRG10 ('GB10'), V4L2_PIX_FMT_SBGGR10 ('BG10'), *************************************************************************************************************************** -*man V4L2_PIX_FMT_SRGGB10(2)* V4L2_PIX_FMT_SGRBG10 V4L2_PIX_FMT_SGBRG10 @@ -21,100 +20,57 @@ Description =========== These four pixel formats are raw sRGB / Bayer formats with 10 bits per -colour. Each colour component is stored in a 16-bit word, with 6 unused -high bits filled with zeros. Each n-pixel row contains n/2 green samples -and n/2 blue or red samples, with alternating red and blue rows. Bytes -are stored in memory in little endian order. They are conventionally -described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example -of one of these formats +sample. Each sample is stored in a 16-bit word, with 6 unused +high bits filled with zeros. Each n-pixel row contains n/2 green samples and +n/2 blue or red samples, with alternating red and blue rows. Bytes are +stored in memory in little endian order. They are conventionally described +as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of +these formats: **Byte Order.** -Each cell is one byte, high 6 bits in high bytes are 0. +Each cell is one byte, the 6 most significant bits in the high bytes +are 0. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - B\ :sub:`00low` - - - B\ :sub:`00high` - - - G\ :sub:`01low` - - - G\ :sub:`01high` - - - B\ :sub:`02low` - - - B\ :sub:`02high` - - - G\ :sub:`03low` - - - G\ :sub:`03high` - - - .. row 2 - - - start + 8: - - - G\ :sub:`10low` - - - G\ :sub:`10high` - - - R\ :sub:`11low` - - - R\ :sub:`11high` - - - G\ :sub:`12low` - - - G\ :sub:`12high` - - - R\ :sub:`13low` - - - R\ :sub:`13high` - - - .. row 3 - - - start + 16: - - - B\ :sub:`20low` - - - B\ :sub:`20high` - - - G\ :sub:`21low` - - - G\ :sub:`21high` - - - B\ :sub:`22low` - - - B\ :sub:`22high` - - - G\ :sub:`23low` - - - G\ :sub:`23high` - - - .. row 4 - - - start + 24: - - - G\ :sub:`30low` - - - G\ :sub:`30high` - - - R\ :sub:`31low` - - - R\ :sub:`31high` - - - G\ :sub:`32low` - - - G\ :sub:`32high` - - - R\ :sub:`33low` - - R\ :sub:`33high` + * - start + 0: + - B\ :sub:`00low` + - B\ :sub:`00high` + - G\ :sub:`01low` + - G\ :sub:`01high` + - B\ :sub:`02low` + - B\ :sub:`02high` + - G\ :sub:`03low` + - G\ :sub:`03high` + * - start + 8: + - G\ :sub:`10low` + - G\ :sub:`10high` + - R\ :sub:`11low` + - R\ :sub:`11high` + - G\ :sub:`12low` + - G\ :sub:`12high` + - R\ :sub:`13low` + - R\ :sub:`13high` + * - start + 16: + - B\ :sub:`20low` + - B\ :sub:`20high` + - G\ :sub:`21low` + - G\ :sub:`21high` + - B\ :sub:`22low` + - B\ :sub:`22high` + - G\ :sub:`23low` + - G\ :sub:`23high` + * - start + 24: + - G\ :sub:`30low` + - G\ :sub:`30high` + - R\ :sub:`31low` + - R\ :sub:`31high` + - G\ :sub:`32low` + - G\ :sub:`32high` + - R\ :sub:`33low` + - R\ :sub:`33high` diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb10alaw8.rst b/Documentation/media/uapi/v4l/pixfmt-srggb10alaw8.rst index 68bae0cb764c..c44e093514de 100644 --- a/Documentation/media/uapi/v4l/pixfmt-srggb10alaw8.rst +++ b/Documentation/media/uapi/v4l/pixfmt-srggb10alaw8.rst @@ -9,8 +9,6 @@ V4L2_PIX_FMT_SBGGR10ALAW8 ('aBA8'), V4L2_PIX_FMT_SGBRG10ALAW8 ('aGA8'), V4L2_PIX_FMT_SGRBG10ALAW8 ('agA8'), V4L2_PIX_FMT_SRGGB10ALAW8 ('aRA8'), *********************************************************************************************************************************************** -*man V4L2_PIX_FMT_SBGGR10ALAW8(2)* - V4L2_PIX_FMT_SGBRG10ALAW8 V4L2_PIX_FMT_SGRBG10ALAW8 V4L2_PIX_FMT_SRGGB10ALAW8 diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst index d71368f69087..9a41c8d811d0 100644 --- a/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst +++ b/Documentation/media/uapi/v4l/pixfmt-srggb10p.rst @@ -9,7 +9,6 @@ V4L2_PIX_FMT_SRGGB10P ('pRAA'), V4L2_PIX_FMT_SGRBG10P ('pgAA'), V4L2_PIX_FMT_SGBRG10P ('pGAA'), V4L2_PIX_FMT_SBGGR10P ('pBAA'), ******************************************************************************************************************************* -*man V4L2_PIX_FMT_SRGGB10P(2)* V4L2_PIX_FMT_SGRBG10P V4L2_PIX_FMT_SGBRG10P @@ -21,10 +20,10 @@ Description =========== These four pixel formats are packed raw sRGB / Bayer formats with 10 -bits per colour. Every four consecutive colour components are packed -into 5 bytes. Each of the first 4 bytes contain the 8 high order bits of -the pixels, and the fifth byte contains the two least significants bits -of each pixel, in the same order. +bits per sample. Every four consecutive samples are packed into 5 +bytes. Each of the first 4 bytes contain the 8 high order bits +of the pixels, and the 5th byte contains the 2 least significants +bits of each pixel, in the same order. Each n-pixel row contains n/2 green samples and n/2 blue or red samples, with alternating green-red and green-blue rows. They are conventionally @@ -34,70 +33,46 @@ of one of these formats: **Byte Order.** Each cell is one byte. +.. raw:: latex + \newline\newline\begin{adjustbox}{width=\columnwidth} + +.. tabularcolumns:: |p{2.0cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{1.3cm}|p{10.9cm}| .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - B\ :sub:`00high` - - - G\ :sub:`01high` - - - B\ :sub:`02high` - - - G\ :sub:`03high` - - - B\ :sub:`00low`\ (bits 7--6) G\ :sub:`01low`\ (bits 5--4) - B\ :sub:`02low`\ (bits 3--2) G\ :sub:`03low`\ (bits 1--0) - - - .. row 2 - - - start + 5: - - - G\ :sub:`10high` - - - R\ :sub:`11high` - - - G\ :sub:`12high` - - - R\ :sub:`13high` - - - G\ :sub:`10low`\ (bits 7--6) R\ :sub:`11low`\ (bits 5--4) - G\ :sub:`12low`\ (bits 3--2) R\ :sub:`13low`\ (bits 1--0) - - - .. row 3 - - - start + 10: - - - B\ :sub:`20high` - - - G\ :sub:`21high` - - - B\ :sub:`22high` - - - G\ :sub:`23high` - - - B\ :sub:`20low`\ (bits 7--6) G\ :sub:`21low`\ (bits 5--4) - B\ :sub:`22low`\ (bits 3--2) G\ :sub:`23low`\ (bits 1--0) - - - .. row 4 - - - start + 15: - - - G\ :sub:`30high` - - - R\ :sub:`31high` - - - G\ :sub:`32high` - - - R\ :sub:`33high` - - - G\ :sub:`30low`\ (bits 7--6) R\ :sub:`31low`\ (bits 5--4) - G\ :sub:`32low`\ (bits 3--2) R\ :sub:`33low`\ (bits 1--0) + :widths: 12 8 8 8 8 68 + + * - start + 0: + - B\ :sub:`00high` + - G\ :sub:`01high` + - B\ :sub:`02high` + - G\ :sub:`03high` + - G\ :sub:`03low`\ (bits 7--6) B\ :sub:`02low`\ (bits 5--4) + G\ :sub:`01low`\ (bits 3--2) B\ :sub:`00low`\ (bits 1--0) + * - start + 5: + - G\ :sub:`10high` + - R\ :sub:`11high` + - G\ :sub:`12high` + - R\ :sub:`13high` + - R\ :sub:`13low`\ (bits 7--6) G\ :sub:`12low`\ (bits 5--4) + R\ :sub:`11low`\ (bits 3--2) G\ :sub:`10low`\ (bits 1--0) + * - start + 10: + - B\ :sub:`20high` + - G\ :sub:`21high` + - B\ :sub:`22high` + - G\ :sub:`23high` + - G\ :sub:`23low`\ (bits 7--6) B\ :sub:`22low`\ (bits 5--4) + G\ :sub:`21low`\ (bits 3--2) B\ :sub:`20low`\ (bits 1--0) + * - start + 15: + - G\ :sub:`30high` + - R\ :sub:`31high` + - G\ :sub:`32high` + - R\ :sub:`33high` + - R\ :sub:`33low`\ (bits 7--6) G\ :sub:`32low`\ (bits 5--4) + R\ :sub:`31low`\ (bits 3--2) G\ :sub:`30low`\ (bits 1--0) + +.. raw:: latex + + \end{adjustbox}\newline\newline diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb12.rst b/Documentation/media/uapi/v4l/pixfmt-srggb12.rst index f5303ab9e79c..a50ee143cb08 100644 --- a/Documentation/media/uapi/v4l/pixfmt-srggb12.rst +++ b/Documentation/media/uapi/v4l/pixfmt-srggb12.rst @@ -10,7 +10,6 @@ V4L2_PIX_FMT_SRGGB12 ('RG12'), V4L2_PIX_FMT_SGRBG12 ('BA12'), V4L2_PIX_FMT_SGBRG12 ('GB12'), V4L2_PIX_FMT_SBGGR12 ('BG12'), *************************************************************************************************************************** -*man V4L2_PIX_FMT_SRGGB12(2)* V4L2_PIX_FMT_SGRBG12 V4L2_PIX_FMT_SGBRG12 @@ -27,95 +26,52 @@ high bits filled with zeros. Each n-pixel row contains n/2 green samples and n/2 blue or red samples, with alternating red and blue rows. Bytes are stored in memory in little endian order. They are conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example -of one of these formats +of one of these formats: **Byte Order.** -Each cell is one byte, high 6 bits in high bytes are 0. +Each cell is one byte, the 4 most significant bits in the high bytes are +0. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - B\ :sub:`00low` - - - B\ :sub:`00high` - - - G\ :sub:`01low` - - - G\ :sub:`01high` - - - B\ :sub:`02low` - - - B\ :sub:`02high` - - - G\ :sub:`03low` - - - G\ :sub:`03high` - - - .. row 2 - - - start + 8: - - - G\ :sub:`10low` - - - G\ :sub:`10high` - - - R\ :sub:`11low` - - - R\ :sub:`11high` - - - G\ :sub:`12low` - - - G\ :sub:`12high` - - - R\ :sub:`13low` - - - R\ :sub:`13high` - - - .. row 3 - - - start + 16: - - - B\ :sub:`20low` - - - B\ :sub:`20high` - - - G\ :sub:`21low` - - - G\ :sub:`21high` - - - B\ :sub:`22low` - - - B\ :sub:`22high` - - - G\ :sub:`23low` - - - G\ :sub:`23high` - - - .. row 4 - - - start + 24: - - - G\ :sub:`30low` - - - G\ :sub:`30high` - - - R\ :sub:`31low` - - - R\ :sub:`31high` - - - G\ :sub:`32low` - - - G\ :sub:`32high` - - - R\ :sub:`33low` - - R\ :sub:`33high` + * - start + 0: + - B\ :sub:`00low` + - B\ :sub:`00high` + - G\ :sub:`01low` + - G\ :sub:`01high` + - B\ :sub:`02low` + - B\ :sub:`02high` + - G\ :sub:`03low` + - G\ :sub:`03high` + * - start + 8: + - G\ :sub:`10low` + - G\ :sub:`10high` + - R\ :sub:`11low` + - R\ :sub:`11high` + - G\ :sub:`12low` + - G\ :sub:`12high` + - R\ :sub:`13low` + - R\ :sub:`13high` + * - start + 16: + - B\ :sub:`20low` + - B\ :sub:`20high` + - G\ :sub:`21low` + - G\ :sub:`21high` + - B\ :sub:`22low` + - B\ :sub:`22high` + - G\ :sub:`23low` + - G\ :sub:`23high` + * - start + 24: + - G\ :sub:`30low` + - G\ :sub:`30high` + - R\ :sub:`31low` + - R\ :sub:`31high` + - G\ :sub:`32low` + - G\ :sub:`32high` + - R\ :sub:`33low` + - R\ :sub:`33high` diff --git a/Documentation/media/uapi/v4l/pixfmt-srggb8.rst b/Documentation/media/uapi/v4l/pixfmt-srggb8.rst index e88de4c48d47..a3987d2e97fd 100644 --- a/Documentation/media/uapi/v4l/pixfmt-srggb8.rst +++ b/Documentation/media/uapi/v4l/pixfmt-srggb8.rst @@ -1,81 +1,54 @@ .. -*- coding: utf-8; mode: rst -*- .. _V4L2-PIX-FMT-SRGGB8: +.. _v4l2-pix-fmt-sbggr8: +.. _v4l2-pix-fmt-sgbrg8: +.. _v4l2-pix-fmt-sgrbg8: -**************************** -V4L2_PIX_FMT_SRGGB8 ('RGGB') -**************************** +*************************************************************************************************************************** +V4L2_PIX_FMT_SRGGB8 ('RGGB'), V4L2_PIX_FMT_SGRBG8 ('GRBG'), V4L2_PIX_FMT_SGBRG8 ('GBRG'), V4L2_PIX_FMT_SBGGR8 ('BA81'), +*************************************************************************************************************************** -*man V4L2_PIX_FMT_SRGGB8(2)* -Bayer RGB format +8-bit Bayer formats Description =========== -This is commonly the native format of digital cameras, reflecting the -arrangement of sensors on the CCD device. Only one red, green or blue -value is given for each pixel. Missing components must be interpolated -from neighbouring pixels. From left to right the first row consists of a -red and green value, the second row of a green and blue value. This -scheme repeats to the right and down for every two columns and rows. +These four pixel formats are raw sRGB / Bayer formats with 8 bits per +sample. Each sample is stored in a byte. Each n-pixel row contains n/2 +green samples and n/2 blue or red samples, with alternating red and +blue rows. They are conventionally described as GRGR... BGBG..., +RGRG... GBGB..., etc. Below is an example of one of these formats: **Byte Order.** Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - R\ :sub:`00` - - - G\ :sub:`01` - - - R\ :sub:`02` - - - G\ :sub:`03` - - - .. row 2 - - - start + 4: - - - G\ :sub:`10` - - - B\ :sub:`11` - - - G\ :sub:`12` - - - B\ :sub:`13` - - - .. row 3 - - - start + 8: - - - R\ :sub:`20` - - - G\ :sub:`21` - - - R\ :sub:`22` - - - G\ :sub:`23` - - - .. row 4 - - - start + 12: - - - G\ :sub:`30` - - - B\ :sub:`31` - - - G\ :sub:`32` - - B\ :sub:`33` + * - start + 0: + - B\ :sub:`00` + - G\ :sub:`01` + - B\ :sub:`02` + - G\ :sub:`03` + * - start + 4: + - G\ :sub:`10` + - R\ :sub:`11` + - G\ :sub:`12` + - R\ :sub:`13` + * - start + 8: + - B\ :sub:`20` + - G\ :sub:`21` + - B\ :sub:`22` + - G\ :sub:`23` + * - start + 12: + - G\ :sub:`30` + - R\ :sub:`31` + - G\ :sub:`32` + - R\ :sub:`33` diff --git a/Documentation/media/uapi/v4l/pixfmt-tch-td08.rst b/Documentation/media/uapi/v4l/pixfmt-tch-td08.rst new file mode 100644 index 000000000000..07834cd1249e --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-tch-td08.rst @@ -0,0 +1,52 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _V4L2-TCH-FMT-DELTA-TD08: + +******************************** +V4L2_TCH_FMT_DELTA_TD08 ('TD08') +******************************** + +*man V4L2_TCH_FMT_DELTA_TD08(2)* + +8-bit signed Touch Delta + +Description +=========== + +This format represents delta data from a touch controller. + +Delta values may range from -128 to 127. Typically the values will vary through +a small range depending on whether the sensor is touched or not. The full value +may be seen if one of the touchscreen nodes has a fault or the line is not +connected. + +**Byte Order.** +Each cell is one byte. + + + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 2 1 1 1 1 + + * - start + 0: + - D'\ :sub:`00` + - D'\ :sub:`01` + - D'\ :sub:`02` + - D'\ :sub:`03` + * - start + 4: + - D'\ :sub:`10` + - D'\ :sub:`11` + - D'\ :sub:`12` + - D'\ :sub:`13` + * - start + 8: + - D'\ :sub:`20` + - D'\ :sub:`21` + - D'\ :sub:`22` + - D'\ :sub:`23` + * - start + 12: + - D'\ :sub:`30` + - D'\ :sub:`31` + - D'\ :sub:`32` + - D'\ :sub:`33` diff --git a/Documentation/media/uapi/v4l/pixfmt-tch-td16.rst b/Documentation/media/uapi/v4l/pixfmt-tch-td16.rst new file mode 100644 index 000000000000..29ebcf40a989 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-tch-td16.rst @@ -0,0 +1,67 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _V4L2-TCH-FMT-DELTA-TD16: + +******************************** +V4L2_TCH_FMT_DELTA_TD16 ('TD16') +******************************** + +*man V4L2_TCH_FMT_DELTA_TD16(2)* + +16-bit signed Touch Delta + + +Description +=========== + +This format represents delta data from a touch controller. + +Delta values may range from -32768 to 32767. Typically the values will vary +through a small range depending on whether the sensor is touched or not. The +full value may be seen if one of the touchscreen nodes has a fault or the line +is not connected. + +**Byte Order.** +Each cell is one byte. + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 2 1 1 1 1 1 1 1 1 + + * - start + 0: + - D'\ :sub:`00high` + - D'\ :sub:`00low` + - D'\ :sub:`01high` + - D'\ :sub:`01low` + - D'\ :sub:`02high` + - D'\ :sub:`02low` + - D'\ :sub:`03high` + - D'\ :sub:`03low` + * - start + 8: + - D'\ :sub:`10high` + - D'\ :sub:`10low` + - D'\ :sub:`11high` + - D'\ :sub:`11low` + - D'\ :sub:`12high` + - D'\ :sub:`12low` + - D'\ :sub:`13high` + - D'\ :sub:`13low` + * - start + 16: + - D'\ :sub:`20high` + - D'\ :sub:`20low` + - D'\ :sub:`21high` + - D'\ :sub:`21low` + - D'\ :sub:`22high` + - D'\ :sub:`22low` + - D'\ :sub:`23high` + - D'\ :sub:`23low` + * - start + 24: + - D'\ :sub:`30high` + - D'\ :sub:`30low` + - D'\ :sub:`31high` + - D'\ :sub:`31low` + - D'\ :sub:`32high` + - D'\ :sub:`32low` + - D'\ :sub:`33high` + - D'\ :sub:`33low` diff --git a/Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst b/Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst new file mode 100644 index 000000000000..e7fb7ddd191b --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-tch-tu08.rst @@ -0,0 +1,50 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _V4L2-TCH-FMT-TU08: + +************************** +V4L2_TCH_FMT_TU08 ('TU08') +************************** + +*man V4L2_TCH_FMT_TU08(2)* + +8-bit unsigned raw touch data + +Description +=========== + +This format represents unsigned 8-bit data from a touch controller. + +This may be used for output for raw and reference data. Values may range from +0 to 255. + +**Byte Order.** +Each cell is one byte. + + + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 2 1 1 1 1 + + * - start + 0: + - R'\ :sub:`00` + - R'\ :sub:`01` + - R'\ :sub:`02` + - R'\ :sub:`03` + * - start + 4: + - R'\ :sub:`10` + - R'\ :sub:`11` + - R'\ :sub:`12` + - R'\ :sub:`13` + * - start + 8: + - R'\ :sub:`20` + - R'\ :sub:`21` + - R'\ :sub:`22` + - R'\ :sub:`23` + * - start + 12: + - R'\ :sub:`30` + - R'\ :sub:`31` + - R'\ :sub:`32` + - R'\ :sub:`33` diff --git a/Documentation/media/uapi/v4l/pixfmt-tch-tu16.rst b/Documentation/media/uapi/v4l/pixfmt-tch-tu16.rst new file mode 100644 index 000000000000..1588fcc3f1e7 --- /dev/null +++ b/Documentation/media/uapi/v4l/pixfmt-tch-tu16.rst @@ -0,0 +1,66 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _V4L2-TCH-FMT-TU16: + +******************************** +V4L2_TCH_FMT_TU16 ('TU16') +******************************** + +*man V4L2_TCH_FMT_TU16(2)* + +16-bit unsigned raw touch data + + +Description +=========== + +This format represents unsigned 16-bit data from a touch controller. + +This may be used for output for raw and reference data. Values may range from +0 to 65535. + +**Byte Order.** +Each cell is one byte. + + +.. flat-table:: + :header-rows: 0 + :stub-columns: 0 + :widths: 2 1 1 1 1 1 1 1 1 + + * - start + 0: + - R'\ :sub:`00high` + - R'\ :sub:`00low` + - R'\ :sub:`01high` + - R'\ :sub:`01low` + - R'\ :sub:`02high` + - R'\ :sub:`02low` + - R'\ :sub:`03high` + - R'\ :sub:`03low` + * - start + 8: + - R'\ :sub:`10high` + - R'\ :sub:`10low` + - R'\ :sub:`11high` + - R'\ :sub:`11low` + - R'\ :sub:`12high` + - R'\ :sub:`12low` + - R'\ :sub:`13high` + - R'\ :sub:`13low` + * - start + 16: + - R'\ :sub:`20high` + - R'\ :sub:`20low` + - R'\ :sub:`21high` + - R'\ :sub:`21low` + - R'\ :sub:`22high` + - R'\ :sub:`22low` + - R'\ :sub:`23high` + - R'\ :sub:`23low` + * - start + 24: + - R'\ :sub:`30high` + - R'\ :sub:`30low` + - R'\ :sub:`31high` + - R'\ :sub:`31low` + - R'\ :sub:`32high` + - R'\ :sub:`32low` + - R'\ :sub:`33high` + - R'\ :sub:`33low` diff --git a/Documentation/media/uapi/v4l/pixfmt-uv8.rst b/Documentation/media/uapi/v4l/pixfmt-uv8.rst index fa8f7ee9fee1..c449231b51bb 100644 --- a/Documentation/media/uapi/v4l/pixfmt-uv8.rst +++ b/Documentation/media/uapi/v4l/pixfmt-uv8.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_UV8 ('UV8') ************************ -*man V4L2_PIX_FMT_UV8(2)* UV plane interleaved @@ -21,56 +20,28 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Cb\ :sub:`00` - - - Cr\ :sub:`00` - - - Cb\ :sub:`01` - - - Cr\ :sub:`01` - - - .. row 2 - - - start + 4: - - - Cb\ :sub:`10` - - - Cr\ :sub:`10` - - - Cb\ :sub:`11` - - - Cr\ :sub:`11` - - - .. row 3 - - - start + 8: - - - Cb\ :sub:`20` - - - Cr\ :sub:`20` - - - Cb\ :sub:`21` - - - Cr\ :sub:`21` - - - .. row 4 - - - start + 12: - - - Cb\ :sub:`30` - - - Cr\ :sub:`30` - - - Cb\ :sub:`31` - - Cr\ :sub:`31` + * - start + 0: + - Cb\ :sub:`00` + - Cr\ :sub:`00` + - Cb\ :sub:`01` + - Cr\ :sub:`01` + * - start + 4: + - Cb\ :sub:`10` + - Cr\ :sub:`10` + - Cb\ :sub:`11` + - Cr\ :sub:`11` + * - start + 8: + - Cb\ :sub:`20` + - Cr\ :sub:`20` + - Cb\ :sub:`21` + - Cr\ :sub:`21` + * - start + 12: + - Cb\ :sub:`30` + - Cr\ :sub:`30` + - Cb\ :sub:`31` + - Cr\ :sub:`31` diff --git a/Documentation/media/uapi/v4l/pixfmt-uyvy.rst b/Documentation/media/uapi/v4l/pixfmt-uyvy.rst index 87b0081d44ee..30660e04dd0e 100644 --- a/Documentation/media/uapi/v4l/pixfmt-uyvy.rst +++ b/Documentation/media/uapi/v4l/pixfmt-uyvy.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_UYVY ('UYVY') ************************** -*man V4L2_PIX_FMT_UYVY(2)* Variation of ``V4L2_PIX_FMT_YUYV`` with different order of samples in memory @@ -23,91 +22,47 @@ half the horizontal resolution of the Y component. **Byte Order.** Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Cb\ :sub:`00` - - - Y'\ :sub:`00` - - - Cr\ :sub:`00` - - - Y'\ :sub:`01` - - - Cb\ :sub:`01` - - - Y'\ :sub:`02` - - - Cr\ :sub:`01` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 8: - - - Cb\ :sub:`10` - - - Y'\ :sub:`10` - - - Cr\ :sub:`10` - - - Y'\ :sub:`11` - - - Cb\ :sub:`11` - - - Y'\ :sub:`12` - - - Cr\ :sub:`11` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 16: - - - Cb\ :sub:`20` - - - Y'\ :sub:`20` - - - Cr\ :sub:`20` - - - Y'\ :sub:`21` - - - Cb\ :sub:`21` - - - Y'\ :sub:`22` - - - Cr\ :sub:`21` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 24: - - - Cb\ :sub:`30` - - - Y'\ :sub:`30` - - - Cr\ :sub:`30` - - - Y'\ :sub:`31` - - - Cb\ :sub:`31` - - Y'\ :sub:`32` - - - Cr\ :sub:`31` - - - Y'\ :sub:`33` + * - start + 0: + - Cb\ :sub:`00` + - Y'\ :sub:`00` + - Cr\ :sub:`00` + - Y'\ :sub:`01` + - Cb\ :sub:`01` + - Y'\ :sub:`02` + - Cr\ :sub:`01` + - Y'\ :sub:`03` + * - start + 8: + - Cb\ :sub:`10` + - Y'\ :sub:`10` + - Cr\ :sub:`10` + - Y'\ :sub:`11` + - Cb\ :sub:`11` + - Y'\ :sub:`12` + - Cr\ :sub:`11` + - Y'\ :sub:`13` + * - start + 16: + - Cb\ :sub:`20` + - Y'\ :sub:`20` + - Cr\ :sub:`20` + - Y'\ :sub:`21` + - Cb\ :sub:`21` + - Y'\ :sub:`22` + - Cr\ :sub:`21` + - Y'\ :sub:`23` + * - start + 24: + - Cb\ :sub:`30` + - Y'\ :sub:`30` + - Cr\ :sub:`30` + - Y'\ :sub:`31` + - Cb\ :sub:`31` + - Y'\ :sub:`32` + - Cr\ :sub:`31` + - Y'\ :sub:`33` **Color Sample Location..** @@ -118,80 +73,38 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 3 - - - 1 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 4 - - - 2 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 5 - - - 3 - - - Y - - - C - - - Y - - - Y - - - C - - - Y + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - C + - Y + - Y + - C + - Y + * - 1 + - Y + - C + - Y + - Y + - C + - Y + * - 2 + - Y + - C + - Y + - Y + - C + - Y + * - 3 + - Y + - C + - Y + - Y + - C + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-vyuy.rst b/Documentation/media/uapi/v4l/pixfmt-vyuy.rst index 5d8f99f173b6..a3f61f280b94 100644 --- a/Documentation/media/uapi/v4l/pixfmt-vyuy.rst +++ b/Documentation/media/uapi/v4l/pixfmt-vyuy.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_VYUY ('VYUY') ************************** -*man V4L2_PIX_FMT_VYUY(2)* Variation of ``V4L2_PIX_FMT_YUYV`` with different order of samples in memory @@ -23,91 +22,47 @@ half the horizontal resolution of the Y component. **Byte Order.** Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Cr\ :sub:`00` - - - Y'\ :sub:`00` - - - Cb\ :sub:`00` - - - Y'\ :sub:`01` - - - Cr\ :sub:`01` - - - Y'\ :sub:`02` - - - Cb\ :sub:`01` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 8: - - - Cr\ :sub:`10` - - - Y'\ :sub:`10` - - - Cb\ :sub:`10` - - - Y'\ :sub:`11` - - - Cr\ :sub:`11` - - - Y'\ :sub:`12` - - - Cb\ :sub:`11` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 16: - - - Cr\ :sub:`20` - - - Y'\ :sub:`20` - - - Cb\ :sub:`20` - - - Y'\ :sub:`21` - - - Cr\ :sub:`21` - - - Y'\ :sub:`22` - - - Cb\ :sub:`21` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 24: - - - Cr\ :sub:`30` - - - Y'\ :sub:`30` - - - Cb\ :sub:`30` - - - Y'\ :sub:`31` - - - Cr\ :sub:`31` - - Y'\ :sub:`32` - - - Cb\ :sub:`31` - - - Y'\ :sub:`33` + * - start + 0: + - Cr\ :sub:`00` + - Y'\ :sub:`00` + - Cb\ :sub:`00` + - Y'\ :sub:`01` + - Cr\ :sub:`01` + - Y'\ :sub:`02` + - Cb\ :sub:`01` + - Y'\ :sub:`03` + * - start + 8: + - Cr\ :sub:`10` + - Y'\ :sub:`10` + - Cb\ :sub:`10` + - Y'\ :sub:`11` + - Cr\ :sub:`11` + - Y'\ :sub:`12` + - Cb\ :sub:`11` + - Y'\ :sub:`13` + * - start + 16: + - Cr\ :sub:`20` + - Y'\ :sub:`20` + - Cb\ :sub:`20` + - Y'\ :sub:`21` + - Cr\ :sub:`21` + - Y'\ :sub:`22` + - Cb\ :sub:`21` + - Y'\ :sub:`23` + * - start + 24: + - Cr\ :sub:`30` + - Y'\ :sub:`30` + - Cb\ :sub:`30` + - Y'\ :sub:`31` + - Cr\ :sub:`31` + - Y'\ :sub:`32` + - Cb\ :sub:`31` + - Y'\ :sub:`33` **Color Sample Location..** @@ -116,80 +71,38 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - - - 2 - - - 3 - - - .. row 2 - - - 0 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 3 - - - 1 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 4 - - - 2 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 5 - - - 3 - - - Y - - - C - - - Y - - - Y - - - C - - - Y + * - + - 0 + - + - 1 + - + - 2 + - 3 + * - 0 + - Y + - C + - Y + - Y + - C + - Y + * - 1 + - Y + - C + - Y + - Y + - C + - Y + * - 2 + - Y + - C + - Y + - Y + - C + - Y + * - 3 + - Y + - C + - Y + - Y + - C + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-y10.rst b/Documentation/media/uapi/v4l/pixfmt-y10.rst index d22f77138289..89e22899cd81 100644 --- a/Documentation/media/uapi/v4l/pixfmt-y10.rst +++ b/Documentation/media/uapi/v4l/pixfmt-y10.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_Y10 ('Y10 ') ************************* -*man V4L2_PIX_FMT_Y10(2)* Grey-scale image @@ -23,88 +22,44 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00low` - - - Y'\ :sub:`00high` - - - Y'\ :sub:`01low` - - - Y'\ :sub:`01high` - - - Y'\ :sub:`02low` - - - Y'\ :sub:`02high` - - - Y'\ :sub:`03low` - - - Y'\ :sub:`03high` - - - .. row 2 - - - start + 8: - - - Y'\ :sub:`10low` - - - Y'\ :sub:`10high` - - - Y'\ :sub:`11low` - - - Y'\ :sub:`11high` - - - Y'\ :sub:`12low` - - - Y'\ :sub:`12high` - - - Y'\ :sub:`13low` - - - Y'\ :sub:`13high` - - - .. row 3 - - - start + 16: - - - Y'\ :sub:`20low` - - - Y'\ :sub:`20high` - - - Y'\ :sub:`21low` - - - Y'\ :sub:`21high` - - - Y'\ :sub:`22low` - - - Y'\ :sub:`22high` - - - Y'\ :sub:`23low` - - - Y'\ :sub:`23high` - - - .. row 4 - - - start + 24: - - - Y'\ :sub:`30low` - - - Y'\ :sub:`30high` - - - Y'\ :sub:`31low` - - - Y'\ :sub:`31high` - - - Y'\ :sub:`32low` - - - Y'\ :sub:`32high` - - - Y'\ :sub:`33low` - - Y'\ :sub:`33high` + * - start + 0: + - Y'\ :sub:`00low` + - Y'\ :sub:`00high` + - Y'\ :sub:`01low` + - Y'\ :sub:`01high` + - Y'\ :sub:`02low` + - Y'\ :sub:`02high` + - Y'\ :sub:`03low` + - Y'\ :sub:`03high` + * - start + 8: + - Y'\ :sub:`10low` + - Y'\ :sub:`10high` + - Y'\ :sub:`11low` + - Y'\ :sub:`11high` + - Y'\ :sub:`12low` + - Y'\ :sub:`12high` + - Y'\ :sub:`13low` + - Y'\ :sub:`13high` + * - start + 16: + - Y'\ :sub:`20low` + - Y'\ :sub:`20high` + - Y'\ :sub:`21low` + - Y'\ :sub:`21high` + - Y'\ :sub:`22low` + - Y'\ :sub:`22high` + - Y'\ :sub:`23low` + - Y'\ :sub:`23high` + * - start + 24: + - Y'\ :sub:`30low` + - Y'\ :sub:`30high` + - Y'\ :sub:`31low` + - Y'\ :sub:`31high` + - Y'\ :sub:`32low` + - Y'\ :sub:`32high` + - Y'\ :sub:`33low` + - Y'\ :sub:`33high` diff --git a/Documentation/media/uapi/v4l/pixfmt-y10b.rst b/Documentation/media/uapi/v4l/pixfmt-y10b.rst index 5b50cd61e654..9feddf3ae07b 100644 --- a/Documentation/media/uapi/v4l/pixfmt-y10b.rst +++ b/Documentation/media/uapi/v4l/pixfmt-y10b.rst @@ -6,8 +6,6 @@ V4L2_PIX_FMT_Y10BPACK ('Y10B') ****************************** -*man V4L2_PIX_FMT_Y10BPACK(2)* - Grey-scale image as a bit-packed array @@ -24,22 +22,12 @@ first from the left. pixels cross the byte boundary and have a ratio of 5 bytes for each 4 pixels. - - .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - Y'\ :sub:`00[9:2]` - - - Y'\ :sub:`00[1:0]`\ Y'\ :sub:`01[9:4]` - - - Y'\ :sub:`01[3:0]`\ Y'\ :sub:`02[9:6]` - - - Y'\ :sub:`02[5:0]`\ Y'\ :sub:`03[9:8]` - - Y'\ :sub:`03[7:0]` + * - Y'\ :sub:`00[9:2]` + - Y'\ :sub:`00[1:0]`\ Y'\ :sub:`01[9:4]` + - Y'\ :sub:`01[3:0]`\ Y'\ :sub:`02[9:6]` + - Y'\ :sub:`02[5:0]`\ Y'\ :sub:`03[9:8]` + - Y'\ :sub:`03[7:0]` diff --git a/Documentation/media/uapi/v4l/pixfmt-y12.rst b/Documentation/media/uapi/v4l/pixfmt-y12.rst index 7729bcbf3350..0f230713290b 100644 --- a/Documentation/media/uapi/v4l/pixfmt-y12.rst +++ b/Documentation/media/uapi/v4l/pixfmt-y12.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_Y12 ('Y12 ') ************************* -*man V4L2_PIX_FMT_Y12(2)* Grey-scale image @@ -23,88 +22,44 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00low` - - - Y'\ :sub:`00high` - - - Y'\ :sub:`01low` - - - Y'\ :sub:`01high` - - - Y'\ :sub:`02low` - - - Y'\ :sub:`02high` - - - Y'\ :sub:`03low` - - - Y'\ :sub:`03high` - - - .. row 2 - - - start + 8: - - - Y'\ :sub:`10low` - - - Y'\ :sub:`10high` - - - Y'\ :sub:`11low` - - - Y'\ :sub:`11high` - - - Y'\ :sub:`12low` - - - Y'\ :sub:`12high` - - - Y'\ :sub:`13low` - - - Y'\ :sub:`13high` - - - .. row 3 - - - start + 16: - - - Y'\ :sub:`20low` - - - Y'\ :sub:`20high` - - - Y'\ :sub:`21low` - - - Y'\ :sub:`21high` - - - Y'\ :sub:`22low` - - - Y'\ :sub:`22high` - - - Y'\ :sub:`23low` - - - Y'\ :sub:`23high` - - - .. row 4 - - - start + 24: - - - Y'\ :sub:`30low` - - - Y'\ :sub:`30high` - - - Y'\ :sub:`31low` - - - Y'\ :sub:`31high` - - - Y'\ :sub:`32low` - - - Y'\ :sub:`32high` - - - Y'\ :sub:`33low` - - Y'\ :sub:`33high` + * - start + 0: + - Y'\ :sub:`00low` + - Y'\ :sub:`00high` + - Y'\ :sub:`01low` + - Y'\ :sub:`01high` + - Y'\ :sub:`02low` + - Y'\ :sub:`02high` + - Y'\ :sub:`03low` + - Y'\ :sub:`03high` + * - start + 8: + - Y'\ :sub:`10low` + - Y'\ :sub:`10high` + - Y'\ :sub:`11low` + - Y'\ :sub:`11high` + - Y'\ :sub:`12low` + - Y'\ :sub:`12high` + - Y'\ :sub:`13low` + - Y'\ :sub:`13high` + * - start + 16: + - Y'\ :sub:`20low` + - Y'\ :sub:`20high` + - Y'\ :sub:`21low` + - Y'\ :sub:`21high` + - Y'\ :sub:`22low` + - Y'\ :sub:`22high` + - Y'\ :sub:`23low` + - Y'\ :sub:`23high` + * - start + 24: + - Y'\ :sub:`30low` + - Y'\ :sub:`30high` + - Y'\ :sub:`31low` + - Y'\ :sub:`31high` + - Y'\ :sub:`32low` + - Y'\ :sub:`32high` + - Y'\ :sub:`33low` + - Y'\ :sub:`33high` diff --git a/Documentation/media/uapi/v4l/pixfmt-y12i.rst b/Documentation/media/uapi/v4l/pixfmt-y12i.rst index 8967e8c33b47..bb39a2463564 100644 --- a/Documentation/media/uapi/v4l/pixfmt-y12i.rst +++ b/Documentation/media/uapi/v4l/pixfmt-y12i.rst @@ -6,8 +6,6 @@ V4L2_PIX_FMT_Y12I ('Y12I') ************************** -*man V4L2_PIX_FMT_Y12I(2)* - Interleaved grey-scale image, e.g. from a stereo-pair @@ -32,13 +30,7 @@ interleaved pixel. .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 - - - - .. row 1 - - - Y'\ :sub:`0left[7:0]` - - - Y'\ :sub:`0right[3:0]`\ Y'\ :sub:`0left[11:8]` - - Y'\ :sub:`0right[11:4]` + * - Y'\ :sub:`0left[7:0]` + - Y'\ :sub:`0right[3:0]`\ Y'\ :sub:`0left[11:8]` + - Y'\ :sub:`0right[11:4]` diff --git a/Documentation/media/uapi/v4l/pixfmt-y16-be.rst b/Documentation/media/uapi/v4l/pixfmt-y16-be.rst index 37fa099c16a6..54ce35ef84b7 100644 --- a/Documentation/media/uapi/v4l/pixfmt-y16-be.rst +++ b/Documentation/media/uapi/v4l/pixfmt-y16-be.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_Y16_BE ('Y16 ' | (1 << 31)) **************************************** -*man V4L2_PIX_FMT_Y16_BE(2)* Grey-scale image @@ -17,7 +16,9 @@ Description This is a grey-scale image with a depth of 16 bits per pixel. The most significant byte is stored at lower memory addresses (big-endian). -.. note:: Tthe actual sampling precision may be lower than 16 bits, for +.. note:: + + The actual sampling precision may be lower than 16 bits, for example 10 bits per pixel with values in range 0 to 1023. **Byte Order.** @@ -25,88 +26,44 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00high` - - - Y'\ :sub:`00low` - - - Y'\ :sub:`01high` - - - Y'\ :sub:`01low` - - - Y'\ :sub:`02high` - - - Y'\ :sub:`02low` - - - Y'\ :sub:`03high` - - - Y'\ :sub:`03low` - - - .. row 2 - - - start + 8: - - - Y'\ :sub:`10high` - - - Y'\ :sub:`10low` - - - Y'\ :sub:`11high` - - - Y'\ :sub:`11low` - - - Y'\ :sub:`12high` - - - Y'\ :sub:`12low` - - - Y'\ :sub:`13high` - - - Y'\ :sub:`13low` - - - .. row 3 - - - start + 16: - - - Y'\ :sub:`20high` - - - Y'\ :sub:`20low` - - - Y'\ :sub:`21high` - - - Y'\ :sub:`21low` - - - Y'\ :sub:`22high` - - - Y'\ :sub:`22low` - - - Y'\ :sub:`23high` - - - Y'\ :sub:`23low` - - - .. row 4 - - - start + 24: - - - Y'\ :sub:`30high` - - - Y'\ :sub:`30low` - - - Y'\ :sub:`31high` - - - Y'\ :sub:`31low` - - - Y'\ :sub:`32high` - - - Y'\ :sub:`32low` - - - Y'\ :sub:`33high` - - Y'\ :sub:`33low` + * - start + 0: + - Y'\ :sub:`00high` + - Y'\ :sub:`00low` + - Y'\ :sub:`01high` + - Y'\ :sub:`01low` + - Y'\ :sub:`02high` + - Y'\ :sub:`02low` + - Y'\ :sub:`03high` + - Y'\ :sub:`03low` + * - start + 8: + - Y'\ :sub:`10high` + - Y'\ :sub:`10low` + - Y'\ :sub:`11high` + - Y'\ :sub:`11low` + - Y'\ :sub:`12high` + - Y'\ :sub:`12low` + - Y'\ :sub:`13high` + - Y'\ :sub:`13low` + * - start + 16: + - Y'\ :sub:`20high` + - Y'\ :sub:`20low` + - Y'\ :sub:`21high` + - Y'\ :sub:`21low` + - Y'\ :sub:`22high` + - Y'\ :sub:`22low` + - Y'\ :sub:`23high` + - Y'\ :sub:`23low` + * - start + 24: + - Y'\ :sub:`30high` + - Y'\ :sub:`30low` + - Y'\ :sub:`31high` + - Y'\ :sub:`31low` + - Y'\ :sub:`32high` + - Y'\ :sub:`32low` + - Y'\ :sub:`33high` + - Y'\ :sub:`33low` diff --git a/Documentation/media/uapi/v4l/pixfmt-y16.rst b/Documentation/media/uapi/v4l/pixfmt-y16.rst index 4c41c042188b..bcbd52de3aca 100644 --- a/Documentation/media/uapi/v4l/pixfmt-y16.rst +++ b/Documentation/media/uapi/v4l/pixfmt-y16.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_Y16 ('Y16 ') ************************* -*man V4L2_PIX_FMT_Y16(2)* Grey-scale image @@ -17,7 +16,9 @@ Description This is a grey-scale image with a depth of 16 bits per pixel. The least significant byte is stored at lower memory addresses (little-endian). -.. note:: The actual sampling precision may be lower than 16 bits, for +.. note:: + + The actual sampling precision may be lower than 16 bits, for example 10 bits per pixel with values in range 0 to 1023. **Byte Order.** @@ -25,88 +26,44 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00low` - - - Y'\ :sub:`00high` - - - Y'\ :sub:`01low` - - - Y'\ :sub:`01high` - - - Y'\ :sub:`02low` - - - Y'\ :sub:`02high` - - - Y'\ :sub:`03low` - - - Y'\ :sub:`03high` - - - .. row 2 - - - start + 8: - - - Y'\ :sub:`10low` - - - Y'\ :sub:`10high` - - - Y'\ :sub:`11low` - - - Y'\ :sub:`11high` - - - Y'\ :sub:`12low` - - - Y'\ :sub:`12high` - - - Y'\ :sub:`13low` - - - Y'\ :sub:`13high` - - - .. row 3 - - - start + 16: - - - Y'\ :sub:`20low` - - - Y'\ :sub:`20high` - - - Y'\ :sub:`21low` - - - Y'\ :sub:`21high` - - - Y'\ :sub:`22low` - - - Y'\ :sub:`22high` - - - Y'\ :sub:`23low` - - - Y'\ :sub:`23high` - - - .. row 4 - - - start + 24: - - - Y'\ :sub:`30low` - - - Y'\ :sub:`30high` - - - Y'\ :sub:`31low` - - - Y'\ :sub:`31high` - - - Y'\ :sub:`32low` - - - Y'\ :sub:`32high` - - - Y'\ :sub:`33low` - - Y'\ :sub:`33high` + * - start + 0: + - Y'\ :sub:`00low` + - Y'\ :sub:`00high` + - Y'\ :sub:`01low` + - Y'\ :sub:`01high` + - Y'\ :sub:`02low` + - Y'\ :sub:`02high` + - Y'\ :sub:`03low` + - Y'\ :sub:`03high` + * - start + 8: + - Y'\ :sub:`10low` + - Y'\ :sub:`10high` + - Y'\ :sub:`11low` + - Y'\ :sub:`11high` + - Y'\ :sub:`12low` + - Y'\ :sub:`12high` + - Y'\ :sub:`13low` + - Y'\ :sub:`13high` + * - start + 16: + - Y'\ :sub:`20low` + - Y'\ :sub:`20high` + - Y'\ :sub:`21low` + - Y'\ :sub:`21high` + - Y'\ :sub:`22low` + - Y'\ :sub:`22high` + - Y'\ :sub:`23low` + - Y'\ :sub:`23high` + * - start + 24: + - Y'\ :sub:`30low` + - Y'\ :sub:`30high` + - Y'\ :sub:`31low` + - Y'\ :sub:`31high` + - Y'\ :sub:`32low` + - Y'\ :sub:`32high` + - Y'\ :sub:`33low` + - Y'\ :sub:`33high` diff --git a/Documentation/media/uapi/v4l/pixfmt-y41p.rst b/Documentation/media/uapi/v4l/pixfmt-y41p.rst index 4760174a4668..05d040c46a47 100644 --- a/Documentation/media/uapi/v4l/pixfmt-y41p.rst +++ b/Documentation/media/uapi/v4l/pixfmt-y41p.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_Y41P ('Y41P') ************************** -*man V4L2_PIX_FMT_Y41P(2)* Format with ¼ horizontal chroma resolution, also known as YUV 4:1:1 @@ -30,123 +29,63 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Cb\ :sub:`00` - - - Y'\ :sub:`00` - - - Cr\ :sub:`00` - - - Y'\ :sub:`01` - - - Cb\ :sub:`01` - - - Y'\ :sub:`02` - - - Cr\ :sub:`01` - - - Y'\ :sub:`03` - - - Y'\ :sub:`04` - - - Y'\ :sub:`05` - - - Y'\ :sub:`06` - - - Y'\ :sub:`07` - - - .. row 2 - - - start + 12: - - - Cb\ :sub:`10` - - - Y'\ :sub:`10` - - - Cr\ :sub:`10` - - - Y'\ :sub:`11` - - - Cb\ :sub:`11` - - - Y'\ :sub:`12` - - - Cr\ :sub:`11` - - - Y'\ :sub:`13` - - - Y'\ :sub:`14` - - - Y'\ :sub:`15` - - - Y'\ :sub:`16` - - - Y'\ :sub:`17` - - - .. row 3 - - - start + 24: - - - Cb\ :sub:`20` - - - Y'\ :sub:`20` - - - Cr\ :sub:`20` - - - Y'\ :sub:`21` - - - Cb\ :sub:`21` - - - Y'\ :sub:`22` - - - Cr\ :sub:`21` - - - Y'\ :sub:`23` - - - Y'\ :sub:`24` - - - Y'\ :sub:`25` - - - Y'\ :sub:`26` - - - Y'\ :sub:`27` - - - .. row 4 - - - start + 36: - - - Cb\ :sub:`30` - - - Y'\ :sub:`30` - - - Cr\ :sub:`30` - - - Y'\ :sub:`31` - - - Cb\ :sub:`31` - - - Y'\ :sub:`32` - - - Cr\ :sub:`31` - - - Y'\ :sub:`33` - - - Y'\ :sub:`34` - - - Y'\ :sub:`35` - - - Y'\ :sub:`36` - - Y'\ :sub:`37` + * - start + 0: + - Cb\ :sub:`00` + - Y'\ :sub:`00` + - Cr\ :sub:`00` + - Y'\ :sub:`01` + - Cb\ :sub:`01` + - Y'\ :sub:`02` + - Cr\ :sub:`01` + - Y'\ :sub:`03` + - Y'\ :sub:`04` + - Y'\ :sub:`05` + - Y'\ :sub:`06` + - Y'\ :sub:`07` + * - start + 12: + - Cb\ :sub:`10` + - Y'\ :sub:`10` + - Cr\ :sub:`10` + - Y'\ :sub:`11` + - Cb\ :sub:`11` + - Y'\ :sub:`12` + - Cr\ :sub:`11` + - Y'\ :sub:`13` + - Y'\ :sub:`14` + - Y'\ :sub:`15` + - Y'\ :sub:`16` + - Y'\ :sub:`17` + * - start + 24: + - Cb\ :sub:`20` + - Y'\ :sub:`20` + - Cr\ :sub:`20` + - Y'\ :sub:`21` + - Cb\ :sub:`21` + - Y'\ :sub:`22` + - Cr\ :sub:`21` + - Y'\ :sub:`23` + - Y'\ :sub:`24` + - Y'\ :sub:`25` + - Y'\ :sub:`26` + - Y'\ :sub:`27` + * - start + 36: + - Cb\ :sub:`30` + - Y'\ :sub:`30` + - Cr\ :sub:`30` + - Y'\ :sub:`31` + - Cb\ :sub:`31` + - Y'\ :sub:`32` + - Cr\ :sub:`31` + - Y'\ :sub:`33` + - Y'\ :sub:`34` + - Y'\ :sub:`35` + - Y'\ :sub:`36` + - Y'\ :sub:`37` **Color Sample Location..** @@ -155,120 +94,58 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - 1 - - - - - 2 - - - 3 - - - 4 - - - 5 - - - - - 6 - - - 7 - - - .. row 2 - - - 0 - - - Y - - - Y - - - C - - - Y - - - Y - - - Y - - - Y - - - C - - - Y - - - Y - - - .. row 3 - - - 1 - - - Y - - - Y - - - C - - - Y - - - Y - - - Y - - - Y - - - C - - - Y - - - Y - - - .. row 4 - - - 2 - - - Y - - - Y - - - C - - - Y - - - Y - - - Y - - - Y - - - C - - - Y - - - Y - - - .. row 5 - - - 3 - - - Y - - - Y - - - C - - - Y - - - Y - - - Y - - - Y - - - C - - - Y - - - Y + * - + - 0 + - 1 + - + - 2 + - 3 + - 4 + - 5 + - + - 6 + - 7 + * - 0 + - Y + - Y + - C + - Y + - Y + - Y + - Y + - C + - Y + - Y + * - 1 + - Y + - Y + - C + - Y + - Y + - Y + - Y + - C + - Y + - Y + * - 2 + - Y + - Y + - C + - Y + - Y + - Y + - Y + - C + - Y + - Y + * - 3 + - Y + - Y + - C + - Y + - Y + - Y + - Y + - C + - Y + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-y8i.rst b/Documentation/media/uapi/v4l/pixfmt-y8i.rst index 7fa16ee85ab7..fd8ed23dd342 100644 --- a/Documentation/media/uapi/v4l/pixfmt-y8i.rst +++ b/Documentation/media/uapi/v4l/pixfmt-y8i.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_Y8I ('Y8I ') ************************* -*man V4L2_PIX_FMT_Y8I(2)* Interleaved grey-scale image, e.g. from a stereo-pair @@ -24,88 +23,44 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00left` - - - Y'\ :sub:`00right` - - - Y'\ :sub:`01left` - - - Y'\ :sub:`01right` - - - Y'\ :sub:`02left` - - - Y'\ :sub:`02right` - - - Y'\ :sub:`03left` - - - Y'\ :sub:`03right` - - - .. row 2 - - - start + 8: - - - Y'\ :sub:`10left` - - - Y'\ :sub:`10right` - - - Y'\ :sub:`11left` - - - Y'\ :sub:`11right` - - - Y'\ :sub:`12left` - - - Y'\ :sub:`12right` - - - Y'\ :sub:`13left` - - - Y'\ :sub:`13right` - - - .. row 3 - - - start + 16: - - - Y'\ :sub:`20left` - - - Y'\ :sub:`20right` - - - Y'\ :sub:`21left` - - - Y'\ :sub:`21right` - - - Y'\ :sub:`22left` - - - Y'\ :sub:`22right` - - - Y'\ :sub:`23left` - - - Y'\ :sub:`23right` - - - .. row 4 - - - start + 24: - - - Y'\ :sub:`30left` - - - Y'\ :sub:`30right` - - - Y'\ :sub:`31left` - - - Y'\ :sub:`31right` - - - Y'\ :sub:`32left` - - - Y'\ :sub:`32right` - - - Y'\ :sub:`33left` - - Y'\ :sub:`33right` + * - start + 0: + - Y'\ :sub:`00left` + - Y'\ :sub:`00right` + - Y'\ :sub:`01left` + - Y'\ :sub:`01right` + - Y'\ :sub:`02left` + - Y'\ :sub:`02right` + - Y'\ :sub:`03left` + - Y'\ :sub:`03right` + * - start + 8: + - Y'\ :sub:`10left` + - Y'\ :sub:`10right` + - Y'\ :sub:`11left` + - Y'\ :sub:`11right` + - Y'\ :sub:`12left` + - Y'\ :sub:`12right` + - Y'\ :sub:`13left` + - Y'\ :sub:`13right` + * - start + 16: + - Y'\ :sub:`20left` + - Y'\ :sub:`20right` + - Y'\ :sub:`21left` + - Y'\ :sub:`21right` + - Y'\ :sub:`22left` + - Y'\ :sub:`22right` + - Y'\ :sub:`23left` + - Y'\ :sub:`23right` + * - start + 24: + - Y'\ :sub:`30left` + - Y'\ :sub:`30right` + - Y'\ :sub:`31left` + - Y'\ :sub:`31right` + - Y'\ :sub:`32left` + - Y'\ :sub:`32right` + - Y'\ :sub:`33left` + - Y'\ :sub:`33right` diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv410.rst b/Documentation/media/uapi/v4l/pixfmt-yuv410.rst index 8a5d1a2ee005..0c49915af850 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yuv410.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yuv410.rst @@ -7,7 +7,6 @@ V4L2_PIX_FMT_YVU410 ('YVU9'), V4L2_PIX_FMT_YUV410 ('YUV9') ********************************************************** -*man V4L2_PIX_FMT_YVU410(2)* V4L2_PIX_FMT_YUV410 Planar formats with ¼ horizontal and vertical chroma resolution, also @@ -37,71 +36,35 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Y'\ :sub:`20` - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - start + 16: - - - Cr\ :sub:`00` - - - .. row 6 - - - start + 17: - - - Cb\ :sub:`00` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - start + 16: + - Cr\ :sub:`00` + * - start + 17: + - Cb\ :sub:`00` **Color Sample Location..** @@ -112,97 +75,53 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 3 - - - - - - .. row 4 - - - 1 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 5 - - - - - - - - - - - C - - - - - - - - - - .. row 6 - - - 2 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 7 - - - - - - .. row 8 - - - 3 - - - Y - - - - - Y - - - - - Y - - - - - Y + * - + - 0 + - + - 1 + - + - 2 + - + - 3 + * - 0 + - Y + - + - Y + - + - Y + - + - Y + * - + * - 1 + - Y + - + - Y + - + - Y + - + - Y + * - + - + - + - + - C + - + - + - + * - 2 + - Y + - + - Y + - + - Y + - + - Y + * - + * - 3 + - Y + - + - Y + - + - Y + - + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv411p.rst b/Documentation/media/uapi/v4l/pixfmt-yuv411p.rst index f85e3f388cbe..2cf33fad7254 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yuv411p.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yuv411p.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_YUV411P ('411P') ***************************** -*man V4L2_PIX_FMT_YUV411P(2)* Format with ¼ horizontal chroma resolution, also known as YUV 4:1:1. Planar layout as opposed to ``V4L2_PIX_FMT_Y41P`` @@ -33,107 +32,47 @@ have ¼ as many pad bytes after their rows. In other words, four C x rows Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - start + 16: - - - Cb\ :sub:`00` - - - .. row 6 - - - start + 17: - - - Cb\ :sub:`10` - - - .. row 7 - - - start + 18: - - - Cb\ :sub:`20` - - - .. row 8 - - - start + 19: - - - Cb\ :sub:`30` - - - .. row 9 - - - start + 20: - - - Cr\ :sub:`00` - - .. row 10 - - - start + 21: - - - Cr\ :sub:`10` - - - .. row 11 - - - start + 22: - - - Cr\ :sub:`20` - - - .. row 12 - - - start + 23: - - - Cr\ :sub:`30` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - start + 16: + - Cb\ :sub:`00` + * - start + 17: + - Cb\ :sub:`10` + * - start + 18: + - Cb\ :sub:`20` + * - start + 19: + - Cb\ :sub:`30` + * - start + 20: + - Cr\ :sub:`00` + * - start + 21: + - Cr\ :sub:`10` + * - start + 22: + - Cr\ :sub:`20` + * - start + 23: + - Cr\ :sub:`30` **Color Sample Location..** @@ -144,71 +83,33 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - 1 - - - - - 2 - - - 3 - - - .. row 2 - - - 0 - - - Y - - - Y - - - C - - - Y - - - Y - - - .. row 3 - - - 1 - - - Y - - - Y - - - C - - - Y - - - Y - - - .. row 4 - - - 2 - - - Y - - - Y - - - C - - - Y - - - Y - - - .. row 5 - - - 3 - - - Y - - - Y - - - C - - - Y - - - Y + * - + - 0 + - 1 + - + - 2 + - 3 + * - 0 + - Y + - Y + - C + - Y + - Y + * - 1 + - Y + - Y + - C + - Y + - Y + * - 2 + - Y + - Y + - C + - Y + - Y + * - 3 + - Y + - Y + - C + - Y + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv420.rst b/Documentation/media/uapi/v4l/pixfmt-yuv420.rst index b22e64c14f67..fd98904058ed 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yuv420.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yuv420.rst @@ -7,7 +7,6 @@ V4L2_PIX_FMT_YVU420 ('YV12'), V4L2_PIX_FMT_YUV420 ('YU12') ********************************************************** -*man V4L2_PIX_FMT_YVU420(2)* V4L2_PIX_FMT_YUV420 Planar formats with ½ horizontal and vertical chroma resolution, also @@ -38,91 +37,43 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - start + 16: - - - Cr\ :sub:`00` - - - Cr\ :sub:`01` - - - .. row 6 - - - start + 18: - - - Cr\ :sub:`10` - - - Cr\ :sub:`11` - - - .. row 7 - - - start + 20: - - - Cb\ :sub:`00` - - - Cb\ :sub:`01` - - - .. row 8 - - - start + 22: - - Cb\ :sub:`10` - - - Cb\ :sub:`11` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - start + 16: + - Cr\ :sub:`00` + - Cr\ :sub:`01` + * - start + 18: + - Cr\ :sub:`10` + - Cr\ :sub:`11` + * - start + 20: + - Cb\ :sub:`00` + - Cb\ :sub:`01` + * - start + 22: + - Cb\ :sub:`10` + - Cb\ :sub:`11` **Color Sample Location..** @@ -133,107 +84,60 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 3 - - - - - - - C - - - - - - - - - C - - - - - - .. row 4 - - - 1 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 5 - - - - - - .. row 6 - - - 2 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 7 - - - - - - - C - - - - - - - - - C - - - - - - .. row 8 - - - 3 - - - Y - - - - - Y - - - - - Y - - - - - Y + * - + - 0 + - + - 1 + - + - 2 + - + - 3 + * - 0 + - Y + - + - Y + - + - Y + - + - Y + * - + - + - C + - + - + - + - C + - + * - 1 + - Y + - + - Y + - + - Y + - + - Y + * - + * - 2 + - Y + - + - Y + - + - Y + - + - Y + * - + - + - C + - + - + - + - C + - + * - 3 + - Y + - + - Y + - + - Y + - + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv420m.rst b/Documentation/media/uapi/v4l/pixfmt-yuv420m.rst index 4dab85090d7d..cce8c477fdfc 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yuv420m.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yuv420m.rst @@ -7,7 +7,6 @@ V4L2_PIX_FMT_YUV420M ('YM12'), V4L2_PIX_FMT_YVU420M ('YM21') ************************************************************ -*man V4L2_PIX_FMT_YUV420M(2)* V4L2_PIX_FMT_YVU420M Variation of ``V4L2_PIX_FMT_YUV420`` and ``V4L2_PIX_FMT_YVU420`` with @@ -45,99 +44,45 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start0 + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start0 + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start0 + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start0 + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - - - - .. row 6 - - - start1 + 0: - - - Cb\ :sub:`00` - - - Cb\ :sub:`01` - - - .. row 7 - - - start1 + 2: - - - Cb\ :sub:`10` - - - Cb\ :sub:`11` - - - .. row 8 - - - - - - .. row 9 - - - start2 + 0: - - - Cr\ :sub:`00` - - - Cr\ :sub:`01` - - .. row 10 - - - start2 + 2: - - - Cr\ :sub:`10` - - - Cr\ :sub:`11` + * - start0 + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start0 + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start0 + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start0 + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - + * - start1 + 0: + - Cb\ :sub:`00` + - Cb\ :sub:`01` + * - start1 + 2: + - Cb\ :sub:`10` + - Cb\ :sub:`11` + * - + * - start2 + 0: + - Cr\ :sub:`00` + - Cr\ :sub:`01` + * - start2 + 2: + - Cr\ :sub:`10` + - Cr\ :sub:`11` **Color Sample Location..** @@ -148,107 +93,60 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 3 - - - - - - - C - - - - - - - - - C - - - - - - .. row 4 - - - 1 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 5 - - - - - - .. row 6 - - - 2 - - - Y - - - - - Y - - - - - Y - - - - - Y - - - .. row 7 - - - - - - - C - - - - - - - - - C - - - - - - .. row 8 - - - 3 - - - Y - - - - - Y - - - - - Y - - - - - Y + * - + - 0 + - + - 1 + - + - 2 + - + - 3 + * - 0 + - Y + - + - Y + - + - Y + - + - Y + * - + - + - C + - + - + - + - C + - + * - 1 + - Y + - + - Y + - + - Y + - + - Y + * - + * - 2 + - Y + - + - Y + - + - Y + - + - Y + * - + - + - C + - + - + - + - C + - + * - 3 + - Y + - + - Y + - + - Y + - + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv422m.rst b/Documentation/media/uapi/v4l/pixfmt-yuv422m.rst index ccb67284133a..d986393aa934 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yuv422m.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yuv422m.rst @@ -7,7 +7,6 @@ V4L2_PIX_FMT_YUV422M ('YM16'), V4L2_PIX_FMT_YVU422M ('YM61') ************************************************************ -*man V4L2_PIX_FMT_YUV422M(2)* V4L2_PIX_FMT_YVU422M Planar formats with ½ horizontal resolution, also known as YUV and YVU @@ -44,131 +43,57 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start0 + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start0 + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start0 + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start0 + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - - - - .. row 6 - - - start1 + 0: - - - Cb\ :sub:`00` - - - Cb\ :sub:`01` - - - .. row 7 - - - start1 + 2: - - - Cb\ :sub:`10` - - - Cb\ :sub:`11` - - - .. row 8 - - - start1 + 4: - - - Cb\ :sub:`20` - - - Cb\ :sub:`21` - - - .. row 9 - - - start1 + 6: - - - Cb\ :sub:`30` - - - Cb\ :sub:`31` - - - .. row 10 - - - - - - .. row 11 - - - start2 + 0: - - - Cr\ :sub:`00` - - Cr\ :sub:`01` - - - .. row 12 - - - start2 + 2: - - - Cr\ :sub:`10` - - - Cr\ :sub:`11` - - - .. row 13 - - - start2 + 4: - - - Cr\ :sub:`20` - - - Cr\ :sub:`21` - - - .. row 14 - - - start2 + 6: - - - Cr\ :sub:`30` - - - Cr\ :sub:`31` + * - start0 + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start0 + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start0 + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start0 + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - + * - start1 + 0: + - Cb\ :sub:`00` + - Cb\ :sub:`01` + * - start1 + 2: + - Cb\ :sub:`10` + - Cb\ :sub:`11` + * - start1 + 4: + - Cb\ :sub:`20` + - Cb\ :sub:`21` + * - start1 + 6: + - Cb\ :sub:`30` + - Cb\ :sub:`31` + * - + * - start2 + 0: + - Cr\ :sub:`00` + - Cr\ :sub:`01` + * - start2 + 2: + - Cr\ :sub:`10` + - Cr\ :sub:`11` + * - start2 + 4: + - Cr\ :sub:`20` + - Cr\ :sub:`21` + * - start2 + 6: + - Cr\ :sub:`30` + - Cr\ :sub:`31` **Color Sample Location..** @@ -179,80 +104,38 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 3 - - - 1 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 4 - - - 2 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 5 - - - 3 - - - Y - - - C - - - Y - - - Y - - - C - - - Y + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - C + - Y + - Y + - C + - Y + * - 1 + - Y + - C + - Y + - Y + - C + - Y + * - 2 + - Y + - C + - Y + - Y + - C + - Y + * - 3 + - Y + - C + - Y + - Y + - C + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv422p.rst b/Documentation/media/uapi/v4l/pixfmt-yuv422p.rst index 9f34762adf18..e6f5de546dba 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yuv422p.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yuv422p.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_YUV422P ('422P') ***************************** -*man V4L2_PIX_FMT_YUV422P(2)* Format with ½ horizontal chroma resolution, also known as YUV 4:2:2. Planar layout as opposed to ``V4L2_PIX_FMT_YUYV`` @@ -34,123 +33,55 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - start + 16: - - - Cb\ :sub:`00` - - - Cb\ :sub:`01` - - - .. row 6 - - - start + 18: - - - Cb\ :sub:`10` - - - Cb\ :sub:`11` - - - .. row 7 - - - start + 20: - - - Cb\ :sub:`20` - - - Cb\ :sub:`21` - - - .. row 8 - - - start + 22: - - - Cb\ :sub:`30` - - - Cb\ :sub:`31` - - - .. row 9 - - - start + 24: - - - Cr\ :sub:`00` - - - Cr\ :sub:`01` - - - .. row 10 - - start + 26: - - - Cr\ :sub:`10` - - - Cr\ :sub:`11` - - - .. row 11 - - - start + 28: - - - Cr\ :sub:`20` - - - Cr\ :sub:`21` - - - .. row 12 - - - start + 30: - - - Cr\ :sub:`30` - - - Cr\ :sub:`31` + * - start + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - start + 16: + - Cb\ :sub:`00` + - Cb\ :sub:`01` + * - start + 18: + - Cb\ :sub:`10` + - Cb\ :sub:`11` + * - start + 20: + - Cb\ :sub:`20` + - Cb\ :sub:`21` + * - start + 22: + - Cb\ :sub:`30` + - Cb\ :sub:`31` + * - start + 24: + - Cr\ :sub:`00` + - Cr\ :sub:`01` + * - start + 26: + - Cr\ :sub:`10` + - Cr\ :sub:`11` + * - start + 28: + - Cr\ :sub:`20` + - Cr\ :sub:`21` + * - start + 30: + - Cr\ :sub:`30` + - Cr\ :sub:`31` **Color Sample Location..** @@ -161,80 +92,38 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 3 - - - 1 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 4 - - - 2 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 5 - - - 3 - - - Y - - - C - - - Y - - - Y - - - C - - - Y + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - C + - Y + - Y + - C + - Y + * - 1 + - Y + - C + - Y + - Y + - C + - Y + * - 2 + - Y + - C + - Y + - Y + - C + - Y + * - 3 + - Y + - C + - Y + - Y + - C + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-yuv444m.rst b/Documentation/media/uapi/v4l/pixfmt-yuv444m.rst index 04f34508b934..830fbf6fcd1d 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yuv444m.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yuv444m.rst @@ -7,7 +7,6 @@ V4L2_PIX_FMT_YUV444M ('YM24'), V4L2_PIX_FMT_YVU444M ('YM42') ************************************************************ -*man V4L2_PIX_FMT_YUV444M(2)* V4L2_PIX_FMT_YVU444M Planar formats with full horizontal resolution, also known as YUV and @@ -38,163 +37,73 @@ described in :ref:`planar-apis`. **Byte Order.** Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 - - - - .. row 1 - - - start0 + 0: - - - Y'\ :sub:`00` - - - Y'\ :sub:`01` - - - Y'\ :sub:`02` - - - Y'\ :sub:`03` - - - .. row 2 - - - start0 + 4: - - - Y'\ :sub:`10` - - - Y'\ :sub:`11` - - - Y'\ :sub:`12` - - - Y'\ :sub:`13` - - - .. row 3 - - - start0 + 8: - - - Y'\ :sub:`20` - - - Y'\ :sub:`21` - - - Y'\ :sub:`22` - - - Y'\ :sub:`23` - - - .. row 4 - - - start0 + 12: - - - Y'\ :sub:`30` - - - Y'\ :sub:`31` - - - Y'\ :sub:`32` - - - Y'\ :sub:`33` - - - .. row 5 - - - - - - .. row 6 - - - start1 + 0: - - - Cb\ :sub:`00` - - - Cb\ :sub:`01` - - - Cb\ :sub:`02` - - - Cb\ :sub:`03` - - - .. row 7 - - - start1 + 4: - - - Cb\ :sub:`10` - - - Cb\ :sub:`11` - - - Cb\ :sub:`12` - - - Cb\ :sub:`13` - - - .. row 8 - - - start1 + 8: - - - Cb\ :sub:`20` - - - Cb\ :sub:`21` - - - Cb\ :sub:`22` - - - Cb\ :sub:`23` - - - .. row 9 - - - start1 + 12: - - - Cb\ :sub:`20` - - - Cb\ :sub:`21` - - - Cb\ :sub:`32` - - - Cb\ :sub:`33` - - - .. row 10 - - - - - .. row 11 - - - start2 + 0: - - - Cr\ :sub:`00` - - - Cr\ :sub:`01` - - - Cr\ :sub:`02` - - - Cr\ :sub:`03` - - - .. row 12 - - - start2 + 4: - - - Cr\ :sub:`10` - - - Cr\ :sub:`11` - - - Cr\ :sub:`12` - - - Cr\ :sub:`13` - - - .. row 13 - - - start2 + 8: - - - Cr\ :sub:`20` - - - Cr\ :sub:`21` - - - Cr\ :sub:`22` - - - Cr\ :sub:`23` - - - .. row 14 - - - start2 + 12: - - - Cr\ :sub:`30` - - - Cr\ :sub:`31` - - - Cr\ :sub:`32` - - - Cr\ :sub:`33` + * - start0 + 0: + - Y'\ :sub:`00` + - Y'\ :sub:`01` + - Y'\ :sub:`02` + - Y'\ :sub:`03` + * - start0 + 4: + - Y'\ :sub:`10` + - Y'\ :sub:`11` + - Y'\ :sub:`12` + - Y'\ :sub:`13` + * - start0 + 8: + - Y'\ :sub:`20` + - Y'\ :sub:`21` + - Y'\ :sub:`22` + - Y'\ :sub:`23` + * - start0 + 12: + - Y'\ :sub:`30` + - Y'\ :sub:`31` + - Y'\ :sub:`32` + - Y'\ :sub:`33` + * - + * - start1 + 0: + - Cb\ :sub:`00` + - Cb\ :sub:`01` + - Cb\ :sub:`02` + - Cb\ :sub:`03` + * - start1 + 4: + - Cb\ :sub:`10` + - Cb\ :sub:`11` + - Cb\ :sub:`12` + - Cb\ :sub:`13` + * - start1 + 8: + - Cb\ :sub:`20` + - Cb\ :sub:`21` + - Cb\ :sub:`22` + - Cb\ :sub:`23` + * - start1 + 12: + - Cb\ :sub:`20` + - Cb\ :sub:`21` + - Cb\ :sub:`32` + - Cb\ :sub:`33` + * - + * - start2 + 0: + - Cr\ :sub:`00` + - Cr\ :sub:`01` + - Cr\ :sub:`02` + - Cr\ :sub:`03` + * - start2 + 4: + - Cr\ :sub:`10` + - Cr\ :sub:`11` + - Cr\ :sub:`12` + - Cr\ :sub:`13` + * - start2 + 8: + - Cr\ :sub:`20` + - Cr\ :sub:`21` + - Cr\ :sub:`22` + - Cr\ :sub:`23` + * - start2 + 12: + - Cr\ :sub:`30` + - Cr\ :sub:`31` + - Cr\ :sub:`32` + - Cr\ :sub:`33` **Color Sample Location..** @@ -205,62 +114,28 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - 1 - - - 2 - - - 3 - - - .. row 2 - - - 0 - - - YC - - - YC - - - YC - - - YC - - - .. row 3 - - - 1 - - - YC - - - YC - - - YC - - - YC - - - .. row 4 - - - 2 - - - YC - - - YC - - - YC - - - YC - - - .. row 5 - - - 3 - - - YC - - - YC - - - YC - - - YC + * - + - 0 + - 1 + - 2 + - 3 + * - 0 + - YC + - YC + - YC + - YC + * - 1 + - YC + - YC + - YC + - YC + * - 2 + - YC + - YC + - YC + - YC + * - 3 + - YC + - YC + - YC + - YC diff --git a/Documentation/media/uapi/v4l/pixfmt-yuyv.rst b/Documentation/media/uapi/v4l/pixfmt-yuyv.rst index 52917dfa9261..e1bdd6b1aefc 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yuyv.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yuyv.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_YUYV ('YUYV') ************************** -*man V4L2_PIX_FMT_YUYV(2)* Packed format with ½ horizontal chroma resolution, also known as YUV 4:2:2 @@ -26,91 +25,47 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Cb\ :sub:`00` - - - Y'\ :sub:`01` - - - Cr\ :sub:`00` - - - Y'\ :sub:`02` - - - Cb\ :sub:`01` - - - Y'\ :sub:`03` - - - Cr\ :sub:`01` - - - .. row 2 - - - start + 8: - - - Y'\ :sub:`10` - - - Cb\ :sub:`10` - - - Y'\ :sub:`11` - - - Cr\ :sub:`10` - - - Y'\ :sub:`12` - - - Cb\ :sub:`11` - - - Y'\ :sub:`13` - - - Cr\ :sub:`11` - - - .. row 3 - - - start + 16: - - - Y'\ :sub:`20` - - - Cb\ :sub:`20` - - - Y'\ :sub:`21` - - - Cr\ :sub:`20` - - - Y'\ :sub:`22` - - - Cb\ :sub:`21` - - - Y'\ :sub:`23` - - - Cr\ :sub:`21` - - - .. row 4 - - - start + 24: - - - Y'\ :sub:`30` - - - Cb\ :sub:`30` - - - Y'\ :sub:`31` - - - Cr\ :sub:`30` - - - Y'\ :sub:`32` - - Cb\ :sub:`31` - - - Y'\ :sub:`33` - - - Cr\ :sub:`31` + * - start + 0: + - Y'\ :sub:`00` + - Cb\ :sub:`00` + - Y'\ :sub:`01` + - Cr\ :sub:`00` + - Y'\ :sub:`02` + - Cb\ :sub:`01` + - Y'\ :sub:`03` + - Cr\ :sub:`01` + * - start + 8: + - Y'\ :sub:`10` + - Cb\ :sub:`10` + - Y'\ :sub:`11` + - Cr\ :sub:`10` + - Y'\ :sub:`12` + - Cb\ :sub:`11` + - Y'\ :sub:`13` + - Cr\ :sub:`11` + * - start + 16: + - Y'\ :sub:`20` + - Cb\ :sub:`20` + - Y'\ :sub:`21` + - Cr\ :sub:`20` + - Y'\ :sub:`22` + - Cb\ :sub:`21` + - Y'\ :sub:`23` + - Cr\ :sub:`21` + * - start + 24: + - Y'\ :sub:`30` + - Cb\ :sub:`30` + - Y'\ :sub:`31` + - Cr\ :sub:`30` + - Y'\ :sub:`32` + - Cb\ :sub:`31` + - Y'\ :sub:`33` + - Cr\ :sub:`31` **Color Sample Location..** @@ -121,85 +76,43 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - C - - - Y - - - - - Y - - - C - - - Y - - - .. row 3 - - - 1 - - - Y - - - C - - - Y - - - - - Y - - - C - - - Y - - - .. row 4 - - - 2 - - - Y - - - C - - - Y - - - - - Y - - - C - - - Y - - - .. row 5 - - - 3 - - - Y - - - C - - - Y - - - - - Y - - - C - - - Y + * - + - 0 + - + - 1 + - + - 2 + - + - 3 + * - 0 + - Y + - C + - Y + - + - Y + - C + - Y + * - 1 + - Y + - C + - Y + - + - Y + - C + - Y + * - 2 + - Y + - C + - Y + - + - Y + - C + - Y + * - 3 + - Y + - C + - Y + - + - Y + - C + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-yvyu.rst b/Documentation/media/uapi/v4l/pixfmt-yvyu.rst index e466052b68b2..0244ce6741a6 100644 --- a/Documentation/media/uapi/v4l/pixfmt-yvyu.rst +++ b/Documentation/media/uapi/v4l/pixfmt-yvyu.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_YVYU ('YVYU') ************************** -*man V4L2_PIX_FMT_YVYU(2)* Variation of ``V4L2_PIX_FMT_YUYV`` with different order of samples in memory @@ -23,91 +22,47 @@ half the horizontal resolution of the Y component. **Byte Order.** Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Y'\ :sub:`00` - - - Cr\ :sub:`00` - - - Y'\ :sub:`01` - - - Cb\ :sub:`00` - - - Y'\ :sub:`02` - - - Cr\ :sub:`01` - - - Y'\ :sub:`03` - - - Cb\ :sub:`01` - - - .. row 2 - - - start + 8: - - - Y'\ :sub:`10` - - - Cr\ :sub:`10` - - - Y'\ :sub:`11` - - - Cb\ :sub:`10` - - - Y'\ :sub:`12` - - - Cr\ :sub:`11` - - - Y'\ :sub:`13` - - - Cb\ :sub:`11` - - - .. row 3 - - - start + 16: - - - Y'\ :sub:`20` - - - Cr\ :sub:`20` - - - Y'\ :sub:`21` - - - Cb\ :sub:`20` - - - Y'\ :sub:`22` - - - Cr\ :sub:`21` - - - Y'\ :sub:`23` - - - Cb\ :sub:`21` - - - .. row 4 - - - start + 24: - - - Y'\ :sub:`30` - - - Cr\ :sub:`30` - - - Y'\ :sub:`31` - - - Cb\ :sub:`30` - - - Y'\ :sub:`32` - - Cr\ :sub:`31` - - - Y'\ :sub:`33` - - - Cb\ :sub:`31` + * - start + 0: + - Y'\ :sub:`00` + - Cr\ :sub:`00` + - Y'\ :sub:`01` + - Cb\ :sub:`00` + - Y'\ :sub:`02` + - Cr\ :sub:`01` + - Y'\ :sub:`03` + - Cb\ :sub:`01` + * - start + 8: + - Y'\ :sub:`10` + - Cr\ :sub:`10` + - Y'\ :sub:`11` + - Cb\ :sub:`10` + - Y'\ :sub:`12` + - Cr\ :sub:`11` + - Y'\ :sub:`13` + - Cb\ :sub:`11` + * - start + 16: + - Y'\ :sub:`20` + - Cr\ :sub:`20` + - Y'\ :sub:`21` + - Cb\ :sub:`20` + - Y'\ :sub:`22` + - Cr\ :sub:`21` + - Y'\ :sub:`23` + - Cb\ :sub:`21` + * - start + 24: + - Y'\ :sub:`30` + - Cr\ :sub:`30` + - Y'\ :sub:`31` + - Cb\ :sub:`30` + - Y'\ :sub:`32` + - Cr\ :sub:`31` + - Y'\ :sub:`33` + - Cb\ :sub:`31` **Color Sample Location..** @@ -116,80 +71,38 @@ Each cell is one byte. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - - - 0 - - - - - 1 - - - 2 - - - - - 3 - - - .. row 2 - - - 0 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 3 - - - 1 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 4 - - - 2 - - - Y - - - C - - - Y - - - Y - - - C - - - Y - - - .. row 5 - - - 3 - - - Y - - - C - - - Y - - - Y - - - C - - - Y + * - + - 0 + - + - 1 + - 2 + - + - 3 + * - 0 + - Y + - C + - Y + - Y + - C + - Y + * - 1 + - Y + - C + - Y + - Y + - C + - Y + * - 2 + - Y + - C + - Y + - Y + - C + - Y + * - 3 + - Y + - C + - Y + - Y + - C + - Y diff --git a/Documentation/media/uapi/v4l/pixfmt-z16.rst b/Documentation/media/uapi/v4l/pixfmt-z16.rst index 4ebc561d0480..eb713a9bccae 100644 --- a/Documentation/media/uapi/v4l/pixfmt-z16.rst +++ b/Documentation/media/uapi/v4l/pixfmt-z16.rst @@ -6,7 +6,6 @@ V4L2_PIX_FMT_Z16 ('Z16 ') ************************* -*man V4L2_PIX_FMT_Z16(2)* 16-bit depth data with distance values at each pixel @@ -24,88 +23,44 @@ Each cell is one byte. + .. flat-table:: :header-rows: 0 :stub-columns: 0 - :widths: 2 1 1 1 1 1 1 1 1 - - - - .. row 1 - - - start + 0: - - - Z\ :sub:`00low` - - - Z\ :sub:`00high` - - - Z\ :sub:`01low` - - - Z\ :sub:`01high` - - - Z\ :sub:`02low` - - - Z\ :sub:`02high` - - - Z\ :sub:`03low` - - - Z\ :sub:`03high` - - - .. row 2 - - - start + 8: - - - Z\ :sub:`10low` - - - Z\ :sub:`10high` - - - Z\ :sub:`11low` - - - Z\ :sub:`11high` - - - Z\ :sub:`12low` - - - Z\ :sub:`12high` - - - Z\ :sub:`13low` - - - Z\ :sub:`13high` - - - .. row 3 - - - start + 16: - - - Z\ :sub:`20low` - - - Z\ :sub:`20high` - - - Z\ :sub:`21low` - - - Z\ :sub:`21high` - - - Z\ :sub:`22low` - - - Z\ :sub:`22high` - - - Z\ :sub:`23low` - - - Z\ :sub:`23high` - - - .. row 4 - - - start + 24: - - - Z\ :sub:`30low` - - - Z\ :sub:`30high` - - - Z\ :sub:`31low` - - - Z\ :sub:`31high` - - - Z\ :sub:`32low` - - - Z\ :sub:`32high` - - - Z\ :sub:`33low` - - Z\ :sub:`33high` + * - start + 0: + - Z\ :sub:`00low` + - Z\ :sub:`00high` + - Z\ :sub:`01low` + - Z\ :sub:`01high` + - Z\ :sub:`02low` + - Z\ :sub:`02high` + - Z\ :sub:`03low` + - Z\ :sub:`03high` + * - start + 8: + - Z\ :sub:`10low` + - Z\ :sub:`10high` + - Z\ :sub:`11low` + - Z\ :sub:`11high` + - Z\ :sub:`12low` + - Z\ :sub:`12high` + - Z\ :sub:`13low` + - Z\ :sub:`13high` + * - start + 16: + - Z\ :sub:`20low` + - Z\ :sub:`20high` + - Z\ :sub:`21low` + - Z\ :sub:`21high` + - Z\ :sub:`22low` + - Z\ :sub:`22high` + - Z\ :sub:`23low` + - Z\ :sub:`23high` + * - start + 24: + - Z\ :sub:`30low` + - Z\ :sub:`30high` + - Z\ :sub:`31low` + - Z\ :sub:`31high` + - Z\ :sub:`32low` + - Z\ :sub:`32high` + - Z\ :sub:`33low` + - Z\ :sub:`33high` diff --git a/Documentation/media/uapi/v4l/pixfmt.rst b/Documentation/media/uapi/v4l/pixfmt.rst index 81222a99f7ce..4d297f6eb5f1 100644 --- a/Documentation/media/uapi/v4l/pixfmt.rst +++ b/Documentation/media/uapi/v4l/pixfmt.rst @@ -6,8 +6,8 @@ Image Formats ############# The V4L2 API was primarily designed for devices exchanging image data -with applications. The :ref:`struct v4l2_pix_format <v4l2-pix-format>` and -:ref:`struct v4l2_pix_format_mplane <v4l2-pix-format-mplane>` structures define the +with applications. The struct :c:type:`v4l2_pix_format` and +struct :c:type:`v4l2_pix_format_mplane` structures define the format and layout of an image in memory. The former is used with the single-planar API, while the latter is used with the multi-planar version (see :ref:`planar-apis`). Image formats are negotiated with @@ -32,4 +32,5 @@ see also :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`.) depth-formats pixfmt-013 sdr-formats + tch-formats pixfmt-reserved diff --git a/Documentation/media/uapi/v4l/planar-apis.rst b/Documentation/media/uapi/v4l/planar-apis.rst index 5fe2e1188230..4e059fb44153 100644 --- a/Documentation/media/uapi/v4l/planar-apis.rst +++ b/Documentation/media/uapi/v4l/planar-apis.rst @@ -22,7 +22,7 @@ application can choose whether to use one or the other by passing a corresponding buffer type to its ioctl calls. Multi-planar versions of buffer types are suffixed with an ``_MPLANE`` string. For a list of available multi-planar buffer types see enum -:ref:`v4l2_buf_type <v4l2-buf-type>`. +:c:type:`v4l2_buf_type`. Multi-planar formats @@ -46,16 +46,16 @@ Calls that distinguish between single and multi-planar APIs :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` New structures for describing multi-planar formats are added: struct - :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` and - struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>`. + :c:type:`v4l2_pix_format_mplane` and + struct :c:type:`v4l2_plane_pix_format`. Drivers may define new multi-planar formats, which have distinct FourCC codes from the existing single-planar ones. :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` - A new struct :ref:`v4l2_plane <v4l2-plane>` structure for + A new struct :c:type:`v4l2_plane` structure for describing planes is added. Arrays of this structure are passed in the new ``m.planes`` field of struct - :ref:`v4l2_buffer <v4l2-buffer>`. + :c:type:`v4l2_buffer`. :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` Will allocate multi-planar buffers as requested. diff --git a/Documentation/media/uapi/v4l/rw.rst b/Documentation/media/uapi/v4l/rw.rst index dcac379c484f..91596c0cc2f3 100644 --- a/Documentation/media/uapi/v4l/rw.rst +++ b/Documentation/media/uapi/v4l/rw.rst @@ -9,7 +9,7 @@ Read/Write Input and output devices support the :ref:`read() <func-read>` and :ref:`write() <func-write>` function, respectively, when the ``V4L2_CAP_READWRITE`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl is set. Drivers may need the CPU to copy the data, but they may also support DMA diff --git a/Documentation/media/uapi/v4l/selection-api-005.rst b/Documentation/media/uapi/v4l/selection-api-005.rst index 94731a13efdb..5b47a28ac6d7 100644 --- a/Documentation/media/uapi/v4l/selection-api-005.rst +++ b/Documentation/media/uapi/v4l/selection-api-005.rst @@ -16,19 +16,19 @@ cropping from an image inside a memory buffer. The application could configure a capture device to fill only a part of an image by abusing V4L2 API. Cropping a smaller image from a larger one is achieved by setting the field ``bytesperline`` at struct -:ref:`v4l2_pix_format <v4l2-pix-format>`. +:c:type:`v4l2_pix_format`. Introducing an image offsets could be done by modifying field ``m_userptr`` at struct -:ref:`v4l2_buffer <v4l2-buffer>` before calling +:c:type:`v4l2_buffer` before calling :ref:`VIDIOC_QBUF`. Those operations should be avoided because they are not portable (endianness), and do not work for macroblock and Bayer formats and mmap buffers. The selection API deals with configuration of buffer cropping/composing in a clear, intuitive and portable way. Next, with the selection API the concepts of the padded target and constraints -flags are introduced. Finally, struct :ref:`v4l2_crop <v4l2-crop>` -and struct :ref:`v4l2_cropcap <v4l2-cropcap>` have no reserved +flags are introduced. Finally, struct :c:type:`v4l2_crop` +and struct :c:type:`v4l2_cropcap` have no reserved fields. Therefore there is no way to extend their functionality. The new -struct :ref:`v4l2_selection <v4l2-selection>` provides a lot of place +struct :c:type:`v4l2_selection` provides a lot of place for future extensions. Driver developers are encouraged to implement only selection API. The former cropping API would be simulated using the new one. diff --git a/Documentation/media/uapi/v4l/standard.rst b/Documentation/media/uapi/v4l/standard.rst index c4f678f545ec..75a14895aed7 100644 --- a/Documentation/media/uapi/v4l/standard.rst +++ b/Documentation/media/uapi/v4l/standard.rst @@ -9,8 +9,8 @@ Video Standards Video devices typically support one or more different video standards or variations of standards. Each video input and output may support another set of standards. This set is reported by the ``std`` field of struct -:ref:`v4l2_input <v4l2-input>` and struct -:ref:`v4l2_output <v4l2-output>` returned by the +:c:type:`v4l2_input` and struct +:c:type:`v4l2_output` returned by the :ref:`VIDIOC_ENUMINPUT` and :ref:`VIDIOC_ENUMOUTPUT` ioctls, respectively. @@ -41,7 +41,9 @@ output applications call the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and *received* standard can be sensed with the :ref:`VIDIOC_QUERYSTD` ioctl. -..note:: The parameter of all these ioctls is a pointer to a +.. note:: + + The parameter of all these ioctls is a pointer to a :ref:`v4l2_std_id <v4l2-std-id>` type (a standard set), *not* an index into the standard enumeration. Drivers must implement all video standard ioctls when the device has one or more video inputs or outputs. @@ -56,8 +58,8 @@ output device which is: - that does not support the video standard formats at all. Here the driver shall set the ``std`` field of struct -:ref:`v4l2_input <v4l2-input>` and struct -:ref:`v4l2_output <v4l2-output>` to zero and the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`, +:c:type:`v4l2_input` and struct +:c:type:`v4l2_output` to zero and the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`, :ref:`VIDIOC_S_STD <VIDIOC_G_STD>`, :ref:`VIDIOC_QUERYSTD` and :ref:`VIDIOC_ENUMSTD` ioctls shall return the ``ENOTTY`` error code or the ``EINVAL`` error code. diff --git a/Documentation/media/uapi/v4l/streaming-par.rst b/Documentation/media/uapi/v4l/streaming-par.rst index b07b0f0b35d4..f9b93c53f75c 100644 --- a/Documentation/media/uapi/v4l/streaming-par.rst +++ b/Documentation/media/uapi/v4l/streaming-par.rst @@ -25,7 +25,7 @@ section discussing the :ref:`read() <func-read>` function. To get and set the streaming parameters applications call the :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take -a pointer to a struct :ref:`v4l2_streamparm <v4l2-streamparm>`, which +a pointer to a struct :c:type:`v4l2_streamparm`, which contains a union holding separate parameters for input and output devices. diff --git a/Documentation/media/uapi/v4l/subdev-formats.rst b/Documentation/media/uapi/v4l/subdev-formats.rst index 6dbb27b09c34..e144370f62a0 100644 --- a/Documentation/media/uapi/v4l/subdev-formats.rst +++ b/Documentation/media/uapi/v4l/subdev-formats.rst @@ -5,97 +5,53 @@ Media Bus Formats ================= +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| -.. _v4l2-mbus-framefmt: +.. c:type:: v4l2_mbus_framefmt .. flat-table:: struct v4l2_mbus_framefmt :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``width`` - - - Image width, in pixels. - - - .. row 2 - - - __u32 - - - ``height`` - - - Image height, in pixels. - - - .. row 3 - - - __u32 - - - ``code`` - - - Format code, from enum - :ref:`v4l2_mbus_pixelcode <v4l2-mbus-pixelcode>`. - - - .. row 4 - - - __u32 - - - ``field`` - - - Field order, from enum :ref:`v4l2_field <v4l2-field>`. See - :ref:`field-order` for details. - - - .. row 5 - - - __u32 - - - ``colorspace`` - - - Image colorspace, from enum - :ref:`v4l2_colorspace <v4l2-colorspace>`. See - :ref:`colorspaces` for details. - - - .. row 6 - - - enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` - - - ``ycbcr_enc`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. - - - .. row 7 - - - enum :ref:`v4l2_quantization <v4l2-quantization>` - - - ``quantization`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. - - - .. row 8 - - - enum :ref:`v4l2_xfer_func <v4l2-xfer-func>` - - - ``xfer_func`` - - - This information supplements the ``colorspace`` and must be set by - the driver for capture streams and by the application for output - streams, see :ref:`colorspaces`. - - - .. row 9 - - - __u16 - - - ``reserved``\ [11] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. + * - __u32 + - ``width`` + - Image width, in pixels. + * - __u32 + - ``height`` + - Image height, in pixels. + * - __u32 + - ``code`` + - Format code, from enum + :ref:`v4l2_mbus_pixelcode <v4l2-mbus-pixelcode>`. + * - __u32 + - ``field`` + - Field order, from enum :c:type:`v4l2_field`. See + :ref:`field-order` for details. + * - __u32 + - ``colorspace`` + - Image colorspace, from enum + :c:type:`v4l2_colorspace`. See + :ref:`colorspaces` for details. + * - enum :c:type:`v4l2_ycbcr_encoding` + - ``ycbcr_enc`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. + * - enum :c:type:`v4l2_quantization` + - ``quantization`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. + * - enum :c:type:`v4l2_xfer_func` + - ``xfer_func`` + - This information supplements the ``colorspace`` and must be set by + the driver for capture streams and by the application for output + streams, see :ref:`colorspaces`. + * - __u16 + - ``reserved``\ [11] + - Reserved for future extensions. Applications and drivers must set + the array to zero. @@ -153,2203 +109,1159 @@ half of the green value) transferred first will be named The following tables list existing packed RGB formats. +.. HACK: ideally, we would be using adjustbox here. However, Sphinx +.. is a very bad behaviored guy: if the table has more than 30 cols, +.. it switches to long table, and there's no way to override it. -.. _v4l2-mbus-pixelcode-rgb: - -.. flat-table:: RGB formats - :header-rows: 2 - :stub-columns: 0 - - - - .. row 1 - - - Identifier - - - Code - - - - - :cspan:`31` Data organization - - - .. row 2 - - - - - - - Bit - - - 31 - - - 30 - - - 29 - - - 28 - - - 27 - - - 26 - - - 25 - - - 24 - - - 23 - - - 22 - - - 21 - - - 20 - - - 19 - - - 18 - - - 17 - - - 16 - - - 15 - - - 14 - - - 13 - - - 12 - - - 11 - - - 10 - - - 9 - - - 8 - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _MEDIA-BUS-FMT-RGB444-1X12: - - - MEDIA_BUS_FMT_RGB444_1X12 - - - 0x1016 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB444-2X8-PADHI-BE: - - - MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE - - - 0x1001 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. row 5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB444-2X8-PADHI-LE: - - - MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE - - - 0x1002 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. row 7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB555-2X8-PADHI-BE: - - - MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE - - - 0x1003 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. row 9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB555-2X8-PADHI-LE: - - - MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE - - - 0x1004 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. row 11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. _MEDIA-BUS-FMT-RGB565-1X16: - - - MEDIA_BUS_FMT_RGB565_1X16 - - - 0x1017 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-BGR565-2X8-BE: - - - MEDIA_BUS_FMT_BGR565_2X8_BE - - - 0x1005 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. row 14 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-BGR565-2X8-LE: - - - MEDIA_BUS_FMT_BGR565_2X8_LE - - - 0x1006 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. row 16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. _MEDIA-BUS-FMT-RGB565-2X8-BE: - - - MEDIA_BUS_FMT_RGB565_2X8_BE - - - 0x1007 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. row 18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB565-2X8-LE: - - - MEDIA_BUS_FMT_RGB565_2X8_LE - - - 0x1008 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. row 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`4` - - - r\ :sub:`3` - - r\ :sub:`2` +.. tabularcolumns:: |p{4.0cm}|p{0.7cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}| - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - .. _MEDIA-BUS-FMT-RGB666-1X18: - - - MEDIA_BUS_FMT_RGB666_1X18 - - - 0x1009 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RBG888-1X24: - - - MEDIA_BUS_FMT_RBG888_1X24 - - - 0x100e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB666-1X24_CPADHI: - - - MEDIA_BUS_FMT_RGB666_1X24_CPADHI - - - 0x1015 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - 0 - - - 0 - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - 0 - - - 0 - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-BGR888-1X24: - - - MEDIA_BUS_FMT_BGR888_1X24 - - - 0x1013 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-GBR888-1X24: - - - MEDIA_BUS_FMT_GBR888_1X24 - - - 0x1014 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB888-1X24: - - - MEDIA_BUS_FMT_RGB888_1X24 - - - 0x100a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB888-2X12-BE: - - - MEDIA_BUS_FMT_RGB888_2X12_BE - - - 0x100b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - .. row 28 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB888-2X12-LE: - - - MEDIA_BUS_FMT_RGB888_2X12_LE - - - 0x100c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. row 30 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - .. _MEDIA-BUS-FMT-ARGB888-1X32: - - - MEDIA_BUS_FMT_ARGB888_1X32 - - - 0x100d - - - - - a\ :sub:`7` - - - a\ :sub:`6` - - - a\ :sub:`5` - - - a\ :sub:`4` - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB888-1X32-PADHI: - - - MEDIA_BUS_FMT_RGB888_1X32_PADHI - - - 0x100f - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` +.. _v4l2-mbus-pixelcode-rgb: - - b\ :sub:`1` +.. raw:: latex - - b\ :sub:`0` + \begingroup + \tiny + \setlength{\tabcolsep}{2pt} +.. flat-table:: RGB formats + :header-rows: 2 + :stub-columns: 0 + :widths: 36 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 + + * - Identifier + - Code + - + - :cspan:`31` Data organization + * - + - + - Bit + - 31 + - 30 + - 29 + - 28 + - 27 + - 26 + - 25 + - 24 + - 23 + - 22 + - 21 + - 20 + - 19 + - 18 + - 17 + - 16 + - 15 + - 14 + - 13 + - 12 + - 11 + - 10 + - 9 + - 8 + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + * .. _MEDIA-BUS-FMT-RGB444-1X12: + + - MEDIA_BUS_FMT_RGB444_1X12 + - 0x1016 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB444-2X8-PADHI-BE: + + - MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE + - 0x1001 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - 0 + - 0 + - 0 + - 0 + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB444-2X8-PADHI-LE: + + - MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE + - 0x1002 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - 0 + - 0 + - 0 + - 0 + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB555-2X8-PADHI-BE: + + - MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE + - 0x1003 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - 0 + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`4` + - g\ :sub:`3` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB555-2X8-PADHI-LE: + + - MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE + - 0x1004 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - 0 + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`4` + - g\ :sub:`3` + * .. _MEDIA-BUS-FMT-RGB565-1X16: + + - MEDIA_BUS_FMT_RGB565_1X16 + - 0x1017 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-BGR565-2X8-BE: + + - MEDIA_BUS_FMT_BGR565_2X8_BE + - 0x1005 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-BGR565-2X8-LE: + + - MEDIA_BUS_FMT_BGR565_2X8_LE + - 0x1006 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + * .. _MEDIA-BUS-FMT-RGB565-2X8-BE: + + - MEDIA_BUS_FMT_RGB565_2X8_BE + - 0x1007 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB565-2X8-LE: + + - MEDIA_BUS_FMT_RGB565_2X8_LE + - 0x1008 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + * .. _MEDIA-BUS-FMT-RGB666-1X18: + + - MEDIA_BUS_FMT_RGB666_1X18 + - 0x1009 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RBG888-1X24: + + - MEDIA_BUS_FMT_RBG888_1X24 + - 0x100e + - + - + - + - + - + - + - + - + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB666-1X24_CPADHI: + + - MEDIA_BUS_FMT_RGB666_1X24_CPADHI + - 0x1015 + - + - + - + - + - + - + - + - + - + - 0 + - 0 + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - 0 + - 0 + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - 0 + - 0 + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-BGR888-1X24: + + - MEDIA_BUS_FMT_BGR888_1X24 + - 0x1013 + - + - + - + - + - + - + - + - + - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-GBR888-1X24: + + - MEDIA_BUS_FMT_GBR888_1X24 + - 0x1014 + - + - + - + - + - + - + - + - + - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB888-1X24: + + - MEDIA_BUS_FMT_RGB888_1X24 + - 0x100a + - + - + - + - + - + - + - + - + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB888-2X12-BE: + + - MEDIA_BUS_FMT_RGB888_2X12_BE + - 0x100b + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB888-2X12-LE: + + - MEDIA_BUS_FMT_RGB888_2X12_LE + - 0x100c + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + * .. _MEDIA-BUS-FMT-ARGB888-1X32: + + - MEDIA_BUS_FMT_ARGB888_1X32 + - 0x100d + - + - a\ :sub:`7` + - a\ :sub:`6` + - a\ :sub:`5` + - a\ :sub:`4` + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB888-1X32-PADHI: + + - MEDIA_BUS_FMT_RGB888_1X32_PADHI + - 0x100f + - + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + +.. raw:: latex + + \endgroup On LVDS buses, usually each sample is transferred serialized in seven time slots per pixel clock, on three (18-bit) or four (24-bit) @@ -2359,6 +1271,9 @@ for control signals as defined by SPWG/PSWG/VESA or JEIDA standards. The JEIDA defined bit mapping will be named ``MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA``, for example. +.. raw:: latex + + \begin{adjustbox}{width=\columnwidth} .. _v4l2-mbus-pixelcode-rgb-lvds: @@ -2366,354 +1281,197 @@ JEIDA defined bit mapping will be named :header-rows: 2 :stub-columns: 0 - - - .. row 1 - - - Identifier - - - Code - - - - - - - :cspan:`3` Data organization - - - .. row 2 - - - - - - - Timeslot - - - Lane - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _MEDIA-BUS-FMT-RGB666-1X7X3-SPWG: - - - MEDIA_BUS_FMT_RGB666_1X7X3_SPWG - - - 0x1010 - - - 0 - - - - - - - - - d - - - b\ :sub:`1` - - - g\ :sub:`0` - - - .. row 4 - - - - - - - 1 - - - - - - - - - d - - - b\ :sub:`0` - - - r\ :sub:`5` - - - .. row 5 - - - - - - - 2 - - - - - - - - - d - - - g\ :sub:`5` - - - r\ :sub:`4` - - - .. row 6 - - - - - - - 3 - - - - - - - - - b\ :sub:`5` - - - g\ :sub:`4` - - - r\ :sub:`3` - - - .. row 7 - - - - - - - 4 - - - - - - - - - b\ :sub:`4` - - - g\ :sub:`3` - - - r\ :sub:`2` - - - .. row 8 - - - - - - - 5 - - - - - - - - - b\ :sub:`3` - - - g\ :sub:`2` - - - r\ :sub:`1` - - - .. row 9 - - - - - - - 6 - - - - - - - - - b\ :sub:`2` - - - g\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB888-1X7X4-SPWG: - - - MEDIA_BUS_FMT_RGB888_1X7X4_SPWG - - - 0x1011 - - - 0 - - - - - d - - - d - - - b\ :sub:`1` - - - g\ :sub:`0` - - - .. row 11 - - - - - - - 1 - - - - - b\ :sub:`7` - - - d - - - b\ :sub:`0` - - - r\ :sub:`5` - - - .. row 12 - - - - - - - 2 - - - - - b\ :sub:`6` - - - d - - - g\ :sub:`5` - - - r\ :sub:`4` - - - .. row 13 - - - - - - - 3 - - - - - g\ :sub:`7` - - - b\ :sub:`5` - - - g\ :sub:`4` - - - r\ :sub:`3` - - - .. row 14 - - - - - - - 4 - - - - - g\ :sub:`6` - - - b\ :sub:`4` - - - g\ :sub:`3` - - - r\ :sub:`2` - - - .. row 15 - - - - - - - 5 - - - - - r\ :sub:`7` - - - b\ :sub:`3` - - - g\ :sub:`2` - - - r\ :sub:`1` - - - .. row 16 - - - - - - - 6 - - - - - r\ :sub:`6` - - - b\ :sub:`2` - - - g\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-RGB888-1X7X4-JEIDA: - - - MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA - - - 0x1012 - - - 0 - - - - - d - - - d - - - b\ :sub:`3` - - - g\ :sub:`2` - - - .. row 18 - - - - - - - 1 - - - - - b\ :sub:`1` - - - d - - - b\ :sub:`2` - - - r\ :sub:`7` - - - .. row 19 - - - - - - - 2 - - - - - b\ :sub:`0` - - - d - - - g\ :sub:`7` - - - r\ :sub:`6` - - - .. row 20 - - - - - - - 3 - - - - - g\ :sub:`1` - - - b\ :sub:`7` - - - g\ :sub:`6` - - - r\ :sub:`5` - - - .. row 21 - - - - - - - 4 - - - - - g\ :sub:`0` - - - b\ :sub:`6` - - - g\ :sub:`5` - - - r\ :sub:`4` - - - .. row 22 - - - - - - - 5 - - - - - r\ :sub:`1` - - - b\ :sub:`5` - - - g\ :sub:`4` - - - r\ :sub:`3` - - - .. row 23 - - - - - - - 6 - - - - - r\ :sub:`0` - - - b\ :sub:`4` - - - g\ :sub:`3` - - - r\ :sub:`2` - + * - Identifier + - Code + - + - + - :cspan:`3` Data organization + * - + - + - Timeslot + - Lane + - 3 + - 2 + - 1 + - 0 + * .. _MEDIA-BUS-FMT-RGB666-1X7X3-SPWG: + + - MEDIA_BUS_FMT_RGB666_1X7X3_SPWG + - 0x1010 + - 0 + - + - + - d + - b\ :sub:`1` + - g\ :sub:`0` + * - + - + - 1 + - + - + - d + - b\ :sub:`0` + - r\ :sub:`5` + * - + - + - 2 + - + - + - d + - g\ :sub:`5` + - r\ :sub:`4` + * - + - + - 3 + - + - + - b\ :sub:`5` + - g\ :sub:`4` + - r\ :sub:`3` + * - + - + - 4 + - + - + - b\ :sub:`4` + - g\ :sub:`3` + - r\ :sub:`2` + * - + - + - 5 + - + - + - b\ :sub:`3` + - g\ :sub:`2` + - r\ :sub:`1` + * - + - + - 6 + - + - + - b\ :sub:`2` + - g\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB888-1X7X4-SPWG: + + - MEDIA_BUS_FMT_RGB888_1X7X4_SPWG + - 0x1011 + - 0 + - + - d + - d + - b\ :sub:`1` + - g\ :sub:`0` + * - + - + - 1 + - + - b\ :sub:`7` + - d + - b\ :sub:`0` + - r\ :sub:`5` + * - + - + - 2 + - + - b\ :sub:`6` + - d + - g\ :sub:`5` + - r\ :sub:`4` + * - + - + - 3 + - + - g\ :sub:`7` + - b\ :sub:`5` + - g\ :sub:`4` + - r\ :sub:`3` + * - + - + - 4 + - + - g\ :sub:`6` + - b\ :sub:`4` + - g\ :sub:`3` + - r\ :sub:`2` + * - + - + - 5 + - + - r\ :sub:`7` + - b\ :sub:`3` + - g\ :sub:`2` + - r\ :sub:`1` + * - + - + - 6 + - + - r\ :sub:`6` + - b\ :sub:`2` + - g\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-RGB888-1X7X4-JEIDA: + + - MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA + - 0x1012 + - 0 + - + - d + - d + - b\ :sub:`3` + - g\ :sub:`2` + * - + - + - 1 + - + - b\ :sub:`1` + - d + - b\ :sub:`2` + - r\ :sub:`7` + * - + - + - 2 + - + - b\ :sub:`0` + - d + - g\ :sub:`7` + - r\ :sub:`6` + * - + - + - 3 + - + - g\ :sub:`1` + - b\ :sub:`7` + - g\ :sub:`6` + - r\ :sub:`5` + * - + - + - 4 + - + - g\ :sub:`0` + - b\ :sub:`6` + - g\ :sub:`5` + - r\ :sub:`4` + * - + - + - 5 + - + - r\ :sub:`1` + - b\ :sub:`5` + - g\ :sub:`4` + - r\ :sub:`3` + * - + - + - 6 + - + - r\ :sub:`0` + - b\ :sub:`4` + - g\ :sub:`3` + - r\ :sub:`2` + +.. raw:: latex + + \end{adjustbox}\newline\newline Bayer Formats @@ -2768,912 +1526,795 @@ The following table lists existing packed Bayer formats. The data organization is given as an example for the first pixel only. -.. _v4l2-mbus-pixelcode-bayer: - -.. flat-table:: Bayer Formats - :header-rows: 2 - :stub-columns: 0 - - - - .. row 1 - - - Identifier - - - Code - - - - - :cspan:`11` Data organization - - - .. row 2 - - - - - - - Bit - - - 11 - - - 10 - - - 9 - - - 8 - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _MEDIA-BUS-FMT-SBGGR8-1X8: - - - MEDIA_BUS_FMT_SBGGR8_1X8 - - - 0x3001 - - - - - - - - - - - - - - - - - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGBRG8-1X8: - - - MEDIA_BUS_FMT_SGBRG8_1X8 - - - 0x3013 - - - - - - - - - - - - - - - - - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGRBG8-1X8: - - - MEDIA_BUS_FMT_SGRBG8_1X8 - - - 0x3002 - - - - - - - - - - - - - - - - - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SRGGB8-1X8: - - - MEDIA_BUS_FMT_SRGGB8_1X8 - - - 0x3014 - - - - - - - - - - - - - - - - - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SBGGR10-ALAW8-1X8: - - - MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8 - - - 0x3015 - - - - - - - - - - - - - - - - - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGBRG10-ALAW8-1X8: - - - MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8 - - - 0x3016 - - - - - - - - - - - - - - - - - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGRBG10-ALAW8-1X8: - - - MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8 - - - 0x3017 - - - - - - - - - - - - - - +.. raw:: latex - - - + \newline\newline\begin{adjustbox}{width=\columnwidth} - - g\ :sub:`7` +.. tabularcolumns:: |p{7.6cm}|p{1.6cm}|p{0.7cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}| - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SRGGB10-ALAW8-1X8: - - - MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8 - - - 0x3018 - - - - - - - - - - - - - - - - - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SBGGR10-DPCM8-1X8: - - - MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8 - - - 0x300b - - - - - - - - - - - - - - - - - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGBRG10-DPCM8-1X8: - - - MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8 - - - 0x300c - - - - - - - - - - - - - - - - - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGRBG10-DPCM8-1X8: - - - MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8 - - - 0x3009 - - - - - - - - - - - - - - - - - - - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SRGGB10-DPCM8-1X8: - - - MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8 - - - 0x300d - - - - - - - - - - - - - - - - - - - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-BE: - - - MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE - - - 0x3003 - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - b\ :sub:`9` - - - b\ :sub:`8` - - - .. row 16 - - - - - - - - - - - - - - - - - - - - - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-LE: - - - MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE - - - 0x3004 - - - - - - - - - - - - - - - - - - - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. row 18 - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - b\ :sub:`9` - - - b\ :sub:`8` - - - .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-BE: - - - MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE - - - 0x3005 - - - - - - - - - - - - - - - - - - - - - b\ :sub:`9` - - - b\ :sub:`8` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - .. row 20 - - - - - - - - - - - - - - - - - - - - - - - - - b\ :sub:`1` - - - b\ :sub:`0` - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-LE: - - - MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE - - - 0x3006 - - - - - - - - - - - - - - - - - - - - - b\ :sub:`1` - - - b\ :sub:`0` - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - .. row 22 - - - - - - - - - - - - - - - - - - - - - - - - - b\ :sub:`9` - - - b\ :sub:`8` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - .. _MEDIA-BUS-FMT-SBGGR10-1X10: - - - MEDIA_BUS_FMT_SBGGR10_1X10 - - - 0x3007 - - - - - - - - - - - - - b\ :sub:`9` - - - b\ :sub:`8` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGBRG10-1X10: - - - MEDIA_BUS_FMT_SGBRG10_1X10 - - - 0x300e - - - - - - - - - - - - - g\ :sub:`9` - - - g\ :sub:`8` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGRBG10-1X10: - - - MEDIA_BUS_FMT_SGRBG10_1X10 - - - 0x300a - - - - - - - - - - - - - g\ :sub:`9` - - - g\ :sub:`8` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SRGGB10-1X10: - - - MEDIA_BUS_FMT_SRGGB10_1X10 - - - 0x300f - - - - - - - - - - - - - r\ :sub:`9` - - - r\ :sub:`8` - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` - - - r\ :sub:`1` - - - r\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SBGGR12-1X12: - - - MEDIA_BUS_FMT_SBGGR12_1X12 - - - 0x3008 - - - - - b\ :sub:`11` - - - b\ :sub:`10` - - - b\ :sub:`9` - - - b\ :sub:`8` - - - b\ :sub:`7` - - - b\ :sub:`6` - - - b\ :sub:`5` - - - b\ :sub:`4` - - - b\ :sub:`3` - - - b\ :sub:`2` - - - b\ :sub:`1` - - - b\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGBRG12-1X12: - - - MEDIA_BUS_FMT_SGBRG12_1X12 - - - 0x3010 - - - - - g\ :sub:`11` - - - g\ :sub:`10` - - - g\ :sub:`9` - - - g\ :sub:`8` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SGRBG12-1X12: - - - MEDIA_BUS_FMT_SGRBG12_1X12 - - - 0x3011 - - - - - g\ :sub:`11` - - - g\ :sub:`10` - - - g\ :sub:`9` - - - g\ :sub:`8` - - - g\ :sub:`7` - - - g\ :sub:`6` - - - g\ :sub:`5` - - - g\ :sub:`4` - - - g\ :sub:`3` - - - g\ :sub:`2` - - - g\ :sub:`1` - - - g\ :sub:`0` - - - .. _MEDIA-BUS-FMT-SRGGB12-1X12: - - - MEDIA_BUS_FMT_SRGGB12_1X12 - - - 0x3012 - - - - - r\ :sub:`11` - - - r\ :sub:`10` - - - r\ :sub:`9` - - - r\ :sub:`8` - - - r\ :sub:`7` - - - r\ :sub:`6` - - - r\ :sub:`5` - - - r\ :sub:`4` - - - r\ :sub:`3` - - - r\ :sub:`2` +.. _v4l2-mbus-pixelcode-bayer: - - r\ :sub:`1` +.. cssclass: longtable - - r\ :sub:`0` +.. flat-table:: Bayer Formats + :header-rows: 2 + :stub-columns: 0 + * - Identifier + - Code + - + - :cspan:`15` Data organization + * - + - + - Bit + - 15 + - 14 + - 13 + - 12 + - 11 + - 10 + - 9 + - 8 + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + * .. _MEDIA-BUS-FMT-SBGGR8-1X8: + + - MEDIA_BUS_FMT_SBGGR8_1X8 + - 0x3001 + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGBRG8-1X8: + + - MEDIA_BUS_FMT_SGBRG8_1X8 + - 0x3013 + - + - + - + - + - + - - + - - + - - + - - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGRBG8-1X8: + + - MEDIA_BUS_FMT_SGRBG8_1X8 + - 0x3002 + - + - + - + - + - + - - + - - + - - + - - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SRGGB8-1X8: + + - MEDIA_BUS_FMT_SRGGB8_1X8 + - 0x3014 + - + - + - + - + - + - - + - - + - - + - - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-SBGGR10-ALAW8-1X8: + + - MEDIA_BUS_FMT_SBGGR10_ALAW8_1X8 + - 0x3015 + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGBRG10-ALAW8-1X8: + + - MEDIA_BUS_FMT_SGBRG10_ALAW8_1X8 + - 0x3016 + - + - + - + - + - + - - + - - + - - + - - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGRBG10-ALAW8-1X8: + + - MEDIA_BUS_FMT_SGRBG10_ALAW8_1X8 + - 0x3017 + - + - + - + - + - + - - + - - + - - + - - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SRGGB10-ALAW8-1X8: + + - MEDIA_BUS_FMT_SRGGB10_ALAW8_1X8 + - 0x3018 + - + - + - + - + - + - - + - - + - - + - - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-SBGGR10-DPCM8-1X8: + + - MEDIA_BUS_FMT_SBGGR10_DPCM8_1X8 + - 0x300b + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGBRG10-DPCM8-1X8: + + - MEDIA_BUS_FMT_SGBRG10_DPCM8_1X8 + - 0x300c + - + - + - + - + - + - - + - - + - - + - - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGRBG10-DPCM8-1X8: + + - MEDIA_BUS_FMT_SGRBG10_DPCM8_1X8 + - 0x3009 + - + - + - + - + - + - - + - - + - - + - - + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SRGGB10-DPCM8-1X8: + + - MEDIA_BUS_FMT_SRGGB10_DPCM8_1X8 + - 0x300d + - + - + - + - + - + - - + - - + - - + - - + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-BE: + + - MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_BE + - 0x3003 + - + - + - + - + - + - - + - - + - - + - - + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - b\ :sub:`9` + - b\ :sub:`8` + * - + - + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADHI-LE: + + - MEDIA_BUS_FMT_SBGGR10_2X8_PADHI_LE + - 0x3004 + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * - + - + - + - + - + - + - + - - + - - + - - + - - + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - b\ :sub:`9` + - b\ :sub:`8` + * .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-BE: + + - MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_BE + - 0x3005 + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`9` + - b\ :sub:`8` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + * - + - + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`1` + - b\ :sub:`0` + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + * .. _MEDIA-BUS-FMT-SBGGR10-2X8-PADLO-LE: + + - MEDIA_BUS_FMT_SBGGR10_2X8_PADLO_LE + - 0x3006 + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`1` + - b\ :sub:`0` + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + * - + - + - + - + - + - + - + - - + - - + - - + - - + - b\ :sub:`9` + - b\ :sub:`8` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + * .. _MEDIA-BUS-FMT-SBGGR10-1X10: + + - MEDIA_BUS_FMT_SBGGR10_1X10 + - 0x3007 + - + - + - + - - + - - + - - + - - + - b\ :sub:`9` + - b\ :sub:`8` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGBRG10-1X10: + + - MEDIA_BUS_FMT_SGBRG10_1X10 + - 0x300e + - + - + - + - - + - - + - - + - - + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGRBG10-1X10: + + - MEDIA_BUS_FMT_SGRBG10_1X10 + - 0x300a + - + - + - + - - + - - + - - + - - + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SRGGB10-1X10: + + - MEDIA_BUS_FMT_SRGGB10_1X10 + - 0x300f + - + - + - + - - + - - + - - + - - + - r\ :sub:`9` + - r\ :sub:`8` + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-SBGGR12-1X12: + + - MEDIA_BUS_FMT_SBGGR12_1X12 + - 0x3008 + - + - - + - - + - - + - - + - b\ :sub:`11` + - b\ :sub:`10` + - b\ :sub:`9` + - b\ :sub:`8` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGBRG12-1X12: + + - MEDIA_BUS_FMT_SGBRG12_1X12 + - 0x3010 + - + - - + - - + - - + - - + - g\ :sub:`11` + - g\ :sub:`10` + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGRBG12-1X12: + + - MEDIA_BUS_FMT_SGRBG12_1X12 + - 0x3011 + - + - - + - - + - - + - - + - g\ :sub:`11` + - g\ :sub:`10` + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SRGGB12-1X12: + + - MEDIA_BUS_FMT_SRGGB12_1X12 + - 0x3012 + - + - - + - - + - - + - - + - r\ :sub:`11` + - r\ :sub:`10` + - r\ :sub:`9` + - r\ :sub:`8` + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-SBGGR14-1X14: + + - MEDIA_BUS_FMT_SBGGR14_1X14 + - 0x3019 + - + - - + - - + - b\ :sub:`13` + - b\ :sub:`12` + - b\ :sub:`11` + - b\ :sub:`10` + - b\ :sub:`9` + - b\ :sub:`8` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGBRG14-1X14: + + - MEDIA_BUS_FMT_SGBRG14_1X14 + - 0x301a + - + - - + - - + - g\ :sub:`13` + - g\ :sub:`12` + - g\ :sub:`11` + - g\ :sub:`10` + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGRBG14-1X14: + + - MEDIA_BUS_FMT_SGRBG14_1X14 + - 0x301b + - + - - + - - + - g\ :sub:`13` + - g\ :sub:`12` + - g\ :sub:`11` + - g\ :sub:`10` + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SRGGB14-1X14: + + - MEDIA_BUS_FMT_SRGGB14_1X14 + - 0x301c + - + - - + - - + - r\ :sub:`13` + - r\ :sub:`12` + - r\ :sub:`11` + - r\ :sub:`10` + - r\ :sub:`9` + - r\ :sub:`8` + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + * .. _MEDIA-BUS-FMT-SBGGR16-1X16: + + - MEDIA_BUS_FMT_SBGGR16_1X16 + - 0x301d + - + - b\ :sub:`15` + - b\ :sub:`14` + - b\ :sub:`13` + - b\ :sub:`12` + - b\ :sub:`11` + - b\ :sub:`10` + - b\ :sub:`9` + - b\ :sub:`8` + - b\ :sub:`7` + - b\ :sub:`6` + - b\ :sub:`5` + - b\ :sub:`4` + - b\ :sub:`3` + - b\ :sub:`2` + - b\ :sub:`1` + - b\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGBRG16-1X16: + + - MEDIA_BUS_FMT_SGBRG16_1X16 + - 0x301e + - + - g\ :sub:`15` + - g\ :sub:`14` + - g\ :sub:`13` + - g\ :sub:`12` + - g\ :sub:`11` + - g\ :sub:`10` + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SGRBG16-1X16: + + - MEDIA_BUS_FMT_SGRBG16_1X16 + - 0x301f + - + - g\ :sub:`15` + - g\ :sub:`14` + - g\ :sub:`13` + - g\ :sub:`12` + - g\ :sub:`11` + - g\ :sub:`10` + - g\ :sub:`9` + - g\ :sub:`8` + - g\ :sub:`7` + - g\ :sub:`6` + - g\ :sub:`5` + - g\ :sub:`4` + - g\ :sub:`3` + - g\ :sub:`2` + - g\ :sub:`1` + - g\ :sub:`0` + * .. _MEDIA-BUS-FMT-SRGGB16-1X16: + + - MEDIA_BUS_FMT_SRGGB16_1X16 + - 0x3020 + - + - r\ :sub:`15` + - r\ :sub:`14` + - r\ :sub:`13` + - r\ :sub:`12` + - r\ :sub:`11` + - r\ :sub:`10` + - r\ :sub:`9` + - r\ :sub:`8` + - r\ :sub:`7` + - r\ :sub:`6` + - r\ :sub:`5` + - r\ :sub:`4` + - r\ :sub:`3` + - r\ :sub:`2` + - r\ :sub:`1` + - r\ :sub:`0` + +.. raw:: latex + + \end{adjustbox}\newline\newline Packed YUV Formats @@ -3726,7693 +2367,3963 @@ the following codes. - a\ :sub:`x` for alpha component bit number x -- - for non-available bits (for positions higher than the bus width) +- for non-available bits (for positions higher than the bus width) - d for dummy bits +.. HACK: ideally, we would be using adjustbox here. However, this +.. will never work for this table, as, even with tiny font, it is +.. to big for a single page. So, we need to manually adjust the +.. size. + +.. raw:: latex + + \begingroup + \tiny + \setlength{\tabcolsep}{2pt} + +.. tabularcolumns:: |p{4.0cm}|p{0.7cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}|p{0.22cm}| .. _v4l2-mbus-pixelcode-yuv8: .. flat-table:: YUV Formats :header-rows: 2 :stub-columns: 0 - - - - .. row 1 - - - Identifier - - - Code - - - - - :cspan:`31` Data organization - - - .. row 2 - - - - - - - Bit - - - 31 - - - 30 - - - 29 - - - 28 - - - 27 - - - 26 - - - 25 - - - 24 - - - 23 - - - 22 - - - 21 - - - 10 - - - 19 - - - 18 - - - 17 - - - 16 - - - 15 - - - 14 - - - 13 - - - 12 - - - 11 - - - 10 - - - 9 - - - 8 - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _MEDIA-BUS-FMT-Y8-1X8: - - - MEDIA_BUS_FMT_Y8_1X8 - - - 0x2001 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-UV8-1X8: - - - MEDIA_BUS_FMT_UV8_1X8 - - - 0x2015 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-UYVY8-1_5X8: - - - MEDIA_BUS_FMT_UYVY8_1_5X8 - - - 0x2002 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 8 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 9 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-VYUY8-1_5X8: - - - MEDIA_BUS_FMT_VYUY8_1_5X8 - - - 0x2003 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 13 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 14 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 15 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 16 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 17 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUYV8-1_5X8: - - - MEDIA_BUS_FMT_YUYV8_1_5X8 - - - 0x2004 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 19 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 21 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 22 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 23 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YVYU8-1_5X8: - - - MEDIA_BUS_FMT_YVYU8_1_5X8 - - - 0x2005 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 25 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 26 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 27 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 28 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 29 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. _MEDIA-BUS-FMT-UYVY8-2X8: - - - MEDIA_BUS_FMT_UYVY8_2X8 - - - 0x2006 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 31 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 32 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 33 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-VYUY8-2X8: - - - MEDIA_BUS_FMT_VYUY8_2X8 - - - 0x2007 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 35 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 36 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 37 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUYV8-2X8: - - - MEDIA_BUS_FMT_YUYV8_2X8 - - - 0x2008 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 39 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 40 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 41 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YVYU8-2X8: - - - MEDIA_BUS_FMT_YVYU8_2X8 - - - 0x2009 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 43 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 44 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 45 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. _MEDIA-BUS-FMT-Y10-1X10: - - - MEDIA_BUS_FMT_Y10_1X10 - - - 0x200a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-UYVY10-2X10: - - - MEDIA_BUS_FMT_UYVY10_2X10 - - - 0x2018 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 48 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 49 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 50 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-VYUY10-2X10: - - - MEDIA_BUS_FMT_VYUY10_2X10 - - - 0x2019 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 52 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 53 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 54 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUYV10-2X10: - - - MEDIA_BUS_FMT_YUYV10_2X10 - - - 0x200b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 56 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 57 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 58 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YVYU10-2X10: - - - MEDIA_BUS_FMT_YVYU10_2X10 - - - 0x200c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 60 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 61 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 62 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. _MEDIA-BUS-FMT-Y12-1X12: - - - MEDIA_BUS_FMT_Y12_1X12 - - - 0x2013 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-UYVY12-2X12: - - - MEDIA_BUS_FMT_UYVY12_2X12 - - - 0x201c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`11` - - - u\ :sub:`10` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 65 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 66 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`11` - - - v\ :sub:`10` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 67 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-VYUY12-2X12: - - - MEDIA_BUS_FMT_VYUY12_2X12 - - - 0x201d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`11` - - - v\ :sub:`10` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 69 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 70 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`11` - - - u\ :sub:`10` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 71 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUYV12-2X12: - - - MEDIA_BUS_FMT_YUYV12_2X12 - - - 0x201e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 73 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`11` - - - u\ :sub:`10` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 74 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 75 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`11` - - - v\ :sub:`10` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YVYU12-2X12: - - - MEDIA_BUS_FMT_YVYU12_2X12 - - - 0x201f - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 77 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`11` - - - v\ :sub:`10` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 78 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 79 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`11` - - - u\ :sub:`10` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. _MEDIA-BUS-FMT-UYVY8-1X16: - - - MEDIA_BUS_FMT_UYVY8_1X16 - - - 0x200f - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 81 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-VYUY8-1X16: - - - MEDIA_BUS_FMT_VYUY8_1X16 - - - 0x2010 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 83 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUYV8-1X16: - - - MEDIA_BUS_FMT_YUYV8_1X16 - - - 0x2011 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 85 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YVYU8-1X16: - - - MEDIA_BUS_FMT_YVYU8_1X16 - - - 0x2012 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 87 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YDYUYDYV8-1X16: - - - MEDIA_BUS_FMT_YDYUYDYV8_1X16 - - - 0x2014 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - d - - - d - - - d - - - d - - - d - - - d - - - d - - - d - - - .. row 89 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 90 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - d - - - d - - - d - - - d - - - d - - - d - - - d - - - d - - - .. row 91 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-UYVY10-1X20: - - - MEDIA_BUS_FMT_UYVY10_1X20 - - - 0x201a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 93 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-VYUY10-1X20: - - - MEDIA_BUS_FMT_VYUY10_1X20 - - - 0x201b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 95 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUYV10-1X20: - - - MEDIA_BUS_FMT_YUYV10_1X20 - - - 0x200d - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 97 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YVYU10-1X20: - - - MEDIA_BUS_FMT_YVYU10_1X20 - - - 0x200e - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 99 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. _MEDIA-BUS-FMT-VUY8-1X24: - - - MEDIA_BUS_FMT_VUY8_1X24 - - - 0x201a - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUV8-1X24: - - - MEDIA_BUS_FMT_YUV8_1X24 - - - 0x2025 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-UYVY12-1X24: - - - MEDIA_BUS_FMT_UYVY12_1X24 - - - 0x2020 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`11` - - - u\ :sub:`10` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 103 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`11` - - - v\ :sub:`10` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-VYUY12-1X24: - - - MEDIA_BUS_FMT_VYUY12_1X24 - - - 0x2021 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - v\ :sub:`11` - - - v\ :sub:`10` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. row 105 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - u\ :sub:`11` - - - u\ :sub:`10` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUYV12-1X24: - - - MEDIA_BUS_FMT_YUYV12_1X24 - - - 0x2022 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`11` - - - u\ :sub:`10` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. row 107 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - v\ :sub:`11` - - - v\ :sub:`10` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YVYU12-1X24: - - - MEDIA_BUS_FMT_YVYU12_1X24 - - - 0x2023 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - v\ :sub:`11` - - - v\ :sub:`10` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. row 109 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - y\ :sub:`11` - - - y\ :sub:`10` - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`11` - - - u\ :sub:`10` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - .. _MEDIA-BUS-FMT-YUV10-1X30: - - - MEDIA_BUS_FMT_YUV10_1X30 - - - 0x2016 - - - - - - - - - - - - - y\ :sub:`9` - - - y\ :sub:`8` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`9` - - - u\ :sub:`8` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - v\ :sub:`9` - - - v\ :sub:`8` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - - .. _MEDIA-BUS-FMT-AYUV8-1X32: - - - MEDIA_BUS_FMT_AYUV8_1X32 - - - 0x2017 - - - - - a\ :sub:`7` - - - a\ :sub:`6` - - - a\ :sub:`5` - - - a\ :sub:`4` - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - y\ :sub:`7` - - - y\ :sub:`6` - - - y\ :sub:`5` - - - y\ :sub:`4` - - - y\ :sub:`3` - - - y\ :sub:`2` - - - y\ :sub:`1` - - - y\ :sub:`0` - - - u\ :sub:`7` - - - u\ :sub:`6` - - - u\ :sub:`5` - - - u\ :sub:`4` - - - u\ :sub:`3` - - - u\ :sub:`2` - - - u\ :sub:`1` - - - u\ :sub:`0` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - - + :widths: 36 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 + + * - Identifier + - Code + - + - :cspan:`31` Data organization + * - + - + - Bit + - 31 + - 30 + - 29 + - 28 + - 27 + - 26 + - 25 + - 24 + - 23 + - 22 + - 21 + - 10 + - 19 + - 18 + - 17 + - 16 + - 15 + - 14 + - 13 + - 12 + - 11 + - 10 + - 9 + - 8 + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + * .. _MEDIA-BUS-FMT-Y8-1X8: + + - MEDIA_BUS_FMT_Y8_1X8 + - 0x2001 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-UV8-1X8: + + - MEDIA_BUS_FMT_UV8_1X8 + - 0x2015 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-UYVY8-1_5X8: + + - MEDIA_BUS_FMT_UYVY8_1_5X8 + - 0x2002 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-VYUY8-1_5X8: + + - MEDIA_BUS_FMT_VYUY8_1_5X8 + - 0x2003 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUYV8-1_5X8: + + - MEDIA_BUS_FMT_YUYV8_1_5X8 + - 0x2004 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-YVYU8-1_5X8: + + - MEDIA_BUS_FMT_YVYU8_1_5X8 + - 0x2005 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * .. _MEDIA-BUS-FMT-UYVY8-2X8: + + - MEDIA_BUS_FMT_UYVY8_2X8 + - 0x2006 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-VYUY8-2X8: + + - MEDIA_BUS_FMT_VYUY8_2X8 + - 0x2007 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUYV8-2X8: + + - MEDIA_BUS_FMT_YUYV8_2X8 + - 0x2008 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-YVYU8-2X8: + + - MEDIA_BUS_FMT_YVYU8_2X8 + - 0x2009 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * .. _MEDIA-BUS-FMT-Y10-1X10: + + - MEDIA_BUS_FMT_Y10_1X10 + - 0x200a + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-UYVY10-2X10: + + - MEDIA_BUS_FMT_UYVY10_2X10 + - 0x2018 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-VYUY10-2X10: + + - MEDIA_BUS_FMT_VYUY10_2X10 + - 0x2019 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUYV10-2X10: + + - MEDIA_BUS_FMT_YUYV10_2X10 + - 0x200b + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-YVYU10-2X10: + + - MEDIA_BUS_FMT_YVYU10_2X10 + - 0x200c + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * .. _MEDIA-BUS-FMT-Y12-1X12: + + - MEDIA_BUS_FMT_Y12_1X12 + - 0x2013 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-UYVY12-2X12: + + - MEDIA_BUS_FMT_UYVY12_2X12 + - 0x201c + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`11` + - u\ :sub:`10` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`11` + - v\ :sub:`10` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-VYUY12-2X12: + + - MEDIA_BUS_FMT_VYUY12_2X12 + - 0x201d + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`11` + - v\ :sub:`10` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`11` + - u\ :sub:`10` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUYV12-2X12: + + - MEDIA_BUS_FMT_YUYV12_2X12 + - 0x201e + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`11` + - u\ :sub:`10` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`11` + - v\ :sub:`10` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-YVYU12-2X12: + + - MEDIA_BUS_FMT_YVYU12_2X12 + - 0x201f + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`11` + - v\ :sub:`10` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`11` + - u\ :sub:`10` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * .. _MEDIA-BUS-FMT-UYVY8-1X16: + + - MEDIA_BUS_FMT_UYVY8_1X16 + - 0x200f + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-VYUY8-1X16: + + - MEDIA_BUS_FMT_VYUY8_1X16 + - 0x2010 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUYV8-1X16: + + - MEDIA_BUS_FMT_YUYV8_1X16 + - 0x2011 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-YVYU8-1X16: + + - MEDIA_BUS_FMT_YVYU8_1X16 + - 0x2012 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * .. _MEDIA-BUS-FMT-YDYUYDYV8-1X16: + + - MEDIA_BUS_FMT_YDYUYDYV8_1X16 + - 0x2014 + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - d + - d + - d + - d + - d + - d + - d + - d + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - d + - d + - d + - d + - d + - d + - d + - d + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-UYVY10-1X20: + + - MEDIA_BUS_FMT_UYVY10_1X20 + - 0x201a + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-VYUY10-1X20: + + - MEDIA_BUS_FMT_VYUY10_1X20 + - 0x201b + - + - + - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUYV10-1X20: + + - MEDIA_BUS_FMT_YUYV10_1X20 + - 0x200d + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-YVYU10-1X20: + + - MEDIA_BUS_FMT_YVYU10_1X20 + - 0x200e + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * .. _MEDIA-BUS-FMT-VUY8-1X24: + + - MEDIA_BUS_FMT_VUY8_1X24 + - 0x201a + - + - + - + - + - + - + - + - + - + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUV8-1X24: + + - MEDIA_BUS_FMT_YUV8_1X24 + - 0x2025 + - + - + - + - + - + - + - + - + - + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-UYVY12-1X24: + + - MEDIA_BUS_FMT_UYVY12_1X24 + - 0x2020 + - + - + - + - + - + - + - + - + - + - u\ :sub:`11` + - u\ :sub:`10` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - v\ :sub:`11` + - v\ :sub:`10` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-VYUY12-1X24: + + - MEDIA_BUS_FMT_VYUY12_1X24 + - 0x2021 + - + - + - + - + - + - + - + - + - + - v\ :sub:`11` + - v\ :sub:`10` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - u\ :sub:`11` + - u\ :sub:`10` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUYV12-1X24: + + - MEDIA_BUS_FMT_YUYV12_1X24 + - 0x2022 + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`11` + - u\ :sub:`10` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - v\ :sub:`11` + - v\ :sub:`10` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-YVYU12-1X24: + + - MEDIA_BUS_FMT_YVYU12_1X24 + - 0x2023 + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - v\ :sub:`11` + - v\ :sub:`10` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * - + - + - + - + - + - + - + - + - + - + - + - y\ :sub:`11` + - y\ :sub:`10` + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`11` + - u\ :sub:`10` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + * .. _MEDIA-BUS-FMT-YUV10-1X30: + + - MEDIA_BUS_FMT_YUV10_1X30 + - 0x2016 + - + - + - + - y\ :sub:`9` + - y\ :sub:`8` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`9` + - u\ :sub:`8` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - v\ :sub:`9` + - v\ :sub:`8` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + * .. _MEDIA-BUS-FMT-AYUV8-1X32: + + - MEDIA_BUS_FMT_AYUV8_1X32 + - 0x2017 + - + - a\ :sub:`7` + - a\ :sub:`6` + - a\ :sub:`5` + - a\ :sub:`4` + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - y\ :sub:`7` + - y\ :sub:`6` + - y\ :sub:`5` + - y\ :sub:`4` + - y\ :sub:`3` + - y\ :sub:`2` + - y\ :sub:`1` + - y\ :sub:`0` + - u\ :sub:`7` + - u\ :sub:`6` + - u\ :sub:`5` + - u\ :sub:`4` + - u\ :sub:`3` + - u\ :sub:`2` + - u\ :sub:`1` + - u\ :sub:`0` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + + +.. raw:: latex + + \endgroup HSV/HSL Formats ^^^^^^^^^^^^^^^ @@ -11447,164 +6358,99 @@ following information. The following table lists existing HSV/HSL formats. +.. raw:: latex + + \newline\newline\begin{adjustbox}{width=\columnwidth} + +.. tabularcolumns:: |p{6.2cm}|p{1.6cm}|p{0.7cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}|p{0.5cm}| .. _v4l2-mbus-pixelcode-hsv: .. flat-table:: HSV/HSL formats :header-rows: 2 :stub-columns: 0 - - - - .. row 1 - - - Identifier - - - Code - - - - - :cspan:`31` Data organization - - - .. row 2 - - - - - - - Bit - - - 31 - - - 30 - - - 29 - - - 28 - - - 27 - - - 26 - - - 25 - - - 24 - - - 23 - - - 22 - - - 21 - - - 20 - - - 19 - - - 18 - - - 17 - - - 16 - - - 15 - - - 14 - - - 13 - - - 12 - - - 11 - - - 10 - - - 9 - - - 8 - - - 7 - - - 6 - - - 5 - - - 4 - - - 3 - - - 2 - - - 1 - - - 0 - - - .. _MEDIA-BUS-FMT-AHSV8888-1X32: - - - MEDIA_BUS_FMT_AHSV8888_1X32 - - - 0x6001 - - - - - a\ :sub:`7` - - - a\ :sub:`6` - - - a\ :sub:`5` - - - a\ :sub:`4` - - - a\ :sub:`3` - - - a\ :sub:`2` - - - a\ :sub:`1` - - - a\ :sub:`0` - - - h\ :sub:`7` - - - h\ :sub:`6` - - - h\ :sub:`5` - - - h\ :sub:`4` - - - h\ :sub:`3` - - - h\ :sub:`2` - - - h\ :sub:`1` - - - h\ :sub:`0` - - - s\ :sub:`7` - - - s\ :sub:`6` - - - s\ :sub:`5` - - - s\ :sub:`4` - - - s\ :sub:`3` - - - s\ :sub:`2` - - - s\ :sub:`1` - - - s\ :sub:`0` - - - v\ :sub:`7` - - - v\ :sub:`6` - - - v\ :sub:`5` - - - v\ :sub:`4` - - - v\ :sub:`3` - - - v\ :sub:`2` - - - v\ :sub:`1` - - - v\ :sub:`0` - + :widths: 28 7 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 + + * - Identifier + - Code + - + - :cspan:`31` Data organization + * - + - + - Bit + - 31 + - 30 + - 29 + - 28 + - 27 + - 26 + - 25 + - 24 + - 23 + - 22 + - 21 + - 20 + - 19 + - 18 + - 17 + - 16 + - 15 + - 14 + - 13 + - 12 + - 11 + - 10 + - 9 + - 8 + - 7 + - 6 + - 5 + - 4 + - 3 + - 2 + - 1 + - 0 + * .. _MEDIA-BUS-FMT-AHSV8888-1X32: + + - MEDIA_BUS_FMT_AHSV8888_1X32 + - 0x6001 + - + - a\ :sub:`7` + - a\ :sub:`6` + - a\ :sub:`5` + - a\ :sub:`4` + - a\ :sub:`3` + - a\ :sub:`2` + - a\ :sub:`1` + - a\ :sub:`0` + - h\ :sub:`7` + - h\ :sub:`6` + - h\ :sub:`5` + - h\ :sub:`4` + - h\ :sub:`3` + - h\ :sub:`2` + - h\ :sub:`1` + - h\ :sub:`0` + - s\ :sub:`7` + - s\ :sub:`6` + - s\ :sub:`5` + - s\ :sub:`4` + - s\ :sub:`3` + - s\ :sub:`2` + - s\ :sub:`1` + - s\ :sub:`0` + - v\ :sub:`7` + - v\ :sub:`6` + - v\ :sub:`5` + - v\ :sub:`4` + - v\ :sub:`3` + - v\ :sub:`2` + - v\ :sub:`1` + - v\ :sub:`0` + +.. raw:: latex + + \end{adjustbox}\newline\newline JPEG Compressed Formats @@ -11626,28 +6472,22 @@ The following table lists existing JPEG compressed formats. .. _v4l2-mbus-pixelcode-jpeg: +.. tabularcolumns:: |p{5.6cm}|p{1.2cm}|p{10.7cm}| + .. flat-table:: JPEG Formats :header-rows: 1 :stub-columns: 0 + * - Identifier + - Code + - Remarks + * .. _MEDIA-BUS-FMT-JPEG-1X8: - - .. row 1 - - - Identifier - - - Code - - - Remarks - - - .. _MEDIA-BUS-FMT-JPEG-1X8: - - - MEDIA_BUS_FMT_JPEG_1X8 - - - 0x4001 - - - Besides of its usage for the parallel bus this format is - recommended for transmission of JPEG data over MIPI CSI bus using - the User Defined 8-bit Data types. + - MEDIA_BUS_FMT_JPEG_1X8 + - 0x4001 + - Besides of its usage for the parallel bus this format is + recommended for transmission of JPEG data over MIPI CSI bus using + the User Defined 8-bit Data types. @@ -11665,24 +6505,18 @@ formats. .. _v4l2-mbus-pixelcode-vendor-specific: +.. tabularcolumns:: |p{6.6cm}|p{1.2cm}|p{9.7cm}| + .. flat-table:: Vendor and device specific formats :header-rows: 1 :stub-columns: 0 + * - Identifier + - Code + - Comments + * .. _MEDIA-BUS-FMT-S5C-UYVY-JPEG-1X8: - - .. row 1 - - - Identifier - - - Code - - - Comments - - - .. _MEDIA-BUS-FMT-S5C-UYVY-JPEG-1X8: - - - MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8 - - - 0x5001 - - - Interleaved raw UYVY and JPEG image format with embedded meta-data - used by Samsung S3C73MX camera sensors. + - MEDIA_BUS_FMT_S5C_UYVY_JPEG_1X8 + - 0x5001 + - Interleaved raw UYVY and JPEG image format with embedded meta-data + used by Samsung S3C73MX camera sensors. diff --git a/Documentation/media/uapi/v4l/tch-formats.rst b/Documentation/media/uapi/v4l/tch-formats.rst new file mode 100644 index 000000000000..dbaabf33a5b8 --- /dev/null +++ b/Documentation/media/uapi/v4l/tch-formats.rst @@ -0,0 +1,18 @@ +.. -*- coding: utf-8; mode: rst -*- + +.. _tch-formats: + +************* +Touch Formats +************* + +These formats are used for :ref:`touch` interface only. + + +.. toctree:: + :maxdepth: 1 + + pixfmt-tch-td16 + pixfmt-tch-td08 + pixfmt-tch-tu16 + pixfmt-tch-tu08 diff --git a/Documentation/media/uapi/v4l/tuner.rst b/Documentation/media/uapi/v4l/tuner.rst index 37eb4b9b95fb..ad117b068831 100644 --- a/Documentation/media/uapi/v4l/tuner.rst +++ b/Documentation/media/uapi/v4l/tuner.rst @@ -13,7 +13,7 @@ Tuners Video input devices can have one or more tuners demodulating a RF signal. Each tuner is associated with one or more video inputs, depending on the number of RF connectors on the tuner. The ``type`` -field of the respective struct :ref:`v4l2_input <v4l2-input>` +field of the respective struct :c:type:`v4l2_input` returned by the :ref:`VIDIOC_ENUMINPUT` ioctl is set to ``V4L2_INPUT_TYPE_TUNER`` and its ``tuner`` field contains the index number of the tuner. @@ -24,15 +24,17 @@ inputs. To query and change tuner properties applications use the :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The -struct :ref:`v4l2_tuner <v4l2-tuner>` returned by :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` +struct :c:type:`v4l2_tuner` returned by :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` also contains signal status information applicable when the tuner of the current video or radio input is queried. -.. note:: :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` does not switch the +.. note:: + + :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` does not switch the current tuner, when there is more than one at all. The tuner is solely determined by the current video input. Drivers must support both ioctls - and set the ``V4L2_CAP_TUNER`` flag in the struct :ref:`v4l2_capability - <v4l2-capability>` returned by the :ref:`VIDIOC_QUERYCAP` ioctl when the + and set the ``V4L2_CAP_TUNER`` flag in the struct :c:type:`v4l2_capability` + returned by the :ref:`VIDIOC_QUERYCAP` ioctl when the device has one or more tuners. @@ -44,7 +46,7 @@ video signal for radiation or connection to the antenna input of a TV set or video recorder. Each modulator is associated with one or more video outputs, depending on the number of RF connectors on the modulator. The ``type`` field of the respective struct -:ref:`v4l2_output <v4l2-output>` returned by the +:c:type:`v4l2_output` returned by the :ref:`VIDIOC_ENUMOUTPUT` ioctl is set to ``V4L2_OUTPUT_TYPE_MODULATOR`` and its ``modulator`` field contains the index number of the modulator. @@ -66,7 +68,7 @@ To query and change modulator properties applications use the is more than one at all. The modulator is solely determined by the current video output. Drivers must support both ioctls and set the ``V4L2_CAP_MODULATOR`` flag in the struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl when the device has one or more modulators. @@ -77,7 +79,7 @@ Radio Frequency To get and set the tuner or modulator radio frequency applications use the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl which both take -a pointer to a struct :ref:`v4l2_frequency <v4l2-frequency>`. These +a pointer to a struct :c:type:`v4l2_frequency`. These ioctls are used for TV and radio devices alike. Drivers must support both ioctls when the tuner or modulator ioctls are supported, or when the device is a radio device. diff --git a/Documentation/media/uapi/v4l/userp.rst b/Documentation/media/uapi/v4l/userp.rst index 1d8b14bd4cdc..dc2893a60d65 100644 --- a/Documentation/media/uapi/v4l/userp.rst +++ b/Documentation/media/uapi/v4l/userp.rst @@ -8,7 +8,7 @@ Streaming I/O (User Pointers) Input and output devices support this I/O method when the ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct -:ref:`v4l2_capability <v4l2-capability>` returned by the +:c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl is set. If the particular user pointer method (not only memory mapping) is supported must be determined by calling the :ref:`VIDIOC_REQBUFS` ioctl @@ -18,8 +18,8 @@ This I/O method combines advantages of the read/write and memory mapping methods. Buffers (planes) are allocated by the application itself, and can reside for example in virtual or shared memory. Only pointers to data are exchanged, these pointers and meta-information are passed in -struct :ref:`v4l2_buffer <v4l2-buffer>` (or in struct -:ref:`v4l2_plane <v4l2-plane>` in the multi-planar API case). The +struct :c:type:`v4l2_buffer` (or in struct +:c:type:`v4l2_plane` in the multi-planar API case). The driver must be switched into user pointer I/O mode by calling the :ref:`VIDIOC_REQBUFS` with the desired buffer type. No buffers (planes) are allocated beforehand, consequently they are not @@ -88,11 +88,13 @@ To start and stop capturing or output applications call the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctl. -.. note:: ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` removes all buffers from +.. note:: + + ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` removes all buffers from both queues and unlocks all buffers as a side effect. Since there is no notion of doing anything "now" on a multitasking system, if an application needs to synchronize with another event it should examine - the struct :ref:`v4l2_buffer <v4l2-buffer>` ``timestamp`` of captured or + the struct :c:type:`v4l2_buffer` ``timestamp`` of captured or outputted buffers. Drivers implementing user pointer I/O must support the diff --git a/Documentation/media/uapi/v4l/v4l2-selection-flags.rst b/Documentation/media/uapi/v4l/v4l2-selection-flags.rst index 3ce3731faf5f..1f9a03851d0f 100644 --- a/Documentation/media/uapi/v4l/v4l2-selection-flags.rst +++ b/Documentation/media/uapi/v4l/v4l2-selection-flags.rst @@ -6,6 +6,7 @@ Selection flags *************** +.. tabularcolumns:: |p{5.2cm}|p{2.0cm}|p{6.5cm}|p{1.2cm}|p{1.6cm}| .. _v4l2-selection-flags-table: @@ -13,59 +14,31 @@ Selection flags :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - Flag name - - - id - - - Definition - - - Valid for V4L2 - - - Valid for V4L2 subdev - - - .. row 2 - - - ``V4L2_SEL_FLAG_GE`` - - - (1 << 0) - - - Suggest the driver it should choose greater or equal rectangle (in - size) than was requested. Albeit the driver may choose a lesser - size, it will only do so due to hardware limitations. Without this - flag (and ``V4L2_SEL_FLAG_LE``) the behaviour is to choose the - closest possible rectangle. - - - Yes - - - Yes - - - .. row 3 - - - ``V4L2_SEL_FLAG_LE`` - - - (1 << 1) - - - Suggest the driver it should choose lesser or equal rectangle (in - size) than was requested. Albeit the driver may choose a greater - size, it will only do so due to hardware limitations. - - - Yes - - - Yes - - - .. row 4 - - - ``V4L2_SEL_FLAG_KEEP_CONFIG`` - - - (1 << 2) - - - The configuration must not be propagated to any further processing - steps. If this flag is not given, the configuration is propagated - inside the subdevice to all further processing steps. - - - No - - - Yes + * - Flag name + - id + - Definition + - Valid for V4L2 + - Valid for V4L2 subdev + * - ``V4L2_SEL_FLAG_GE`` + - (1 << 0) + - Suggest the driver it should choose greater or equal rectangle (in + size) than was requested. Albeit the driver may choose a lesser + size, it will only do so due to hardware limitations. Without this + flag (and ``V4L2_SEL_FLAG_LE``) the behaviour is to choose the + closest possible rectangle. + - Yes + - Yes + * - ``V4L2_SEL_FLAG_LE`` + - (1 << 1) + - Suggest the driver it should choose lesser or equal rectangle (in + size) than was requested. Albeit the driver may choose a greater + size, it will only do so due to hardware limitations. + - Yes + - Yes + * - ``V4L2_SEL_FLAG_KEEP_CONFIG`` + - (1 << 2) + - The configuration must not be propagated to any further processing + steps. If this flag is not given, the configuration is propagated + inside the subdevice to all further processing steps. + - No + - Yes diff --git a/Documentation/media/uapi/v4l/v4l2-selection-targets.rst b/Documentation/media/uapi/v4l/v4l2-selection-targets.rst index 7519099a50cd..cab07de6f4da 100644 --- a/Documentation/media/uapi/v4l/v4l2-selection-targets.rst +++ b/Documentation/media/uapi/v4l/v4l2-selection-targets.rst @@ -12,124 +12,63 @@ of the two interfaces they are used. .. _v4l2-selection-targets-table: +.. tabularcolumns:: |p{5.8cm}|p{1.4cm}|p{6.5cm}|p{1.2cm}|p{1.6cm}| + .. flat-table:: Selection target definitions :header-rows: 1 :stub-columns: 0 - - - .. row 1 - - - Target name - - - id - - - Definition - - - Valid for V4L2 - - - Valid for V4L2 subdev - - - .. row 2 - - - ``V4L2_SEL_TGT_CROP`` - - - 0x0000 - - - Crop rectangle. Defines the cropped area. - - - Yes - - - Yes - - - .. row 3 - - - ``V4L2_SEL_TGT_CROP_DEFAULT`` - - - 0x0001 - - - Suggested cropping rectangle that covers the "whole picture". - - - Yes - - - No - - - .. row 4 - - - ``V4L2_SEL_TGT_CROP_BOUNDS`` - - - 0x0002 - - - Bounds of the crop rectangle. All valid crop rectangles fit inside - the crop bounds rectangle. - - - Yes - - - Yes - - - .. row 5 - - - ``V4L2_SEL_TGT_NATIVE_SIZE`` - - - 0x0003 - - - The native size of the device, e.g. a sensor's pixel array. - ``left`` and ``top`` fields are zero for this target. Setting the - native size will generally only make sense for memory to memory - devices where the software can create a canvas of a given size in - which for example a video frame can be composed. In that case - V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size of - that canvas. - - - Yes - - - Yes - - - .. row 6 - - - ``V4L2_SEL_TGT_COMPOSE`` - - - 0x0100 - - - Compose rectangle. Used to configure scaling and composition. - - - Yes - - - Yes - - - .. row 7 - - - ``V4L2_SEL_TGT_COMPOSE_DEFAULT`` - - - 0x0101 - - - Suggested composition rectangle that covers the "whole picture". - - - Yes - - - No - - - .. row 8 - - - ``V4L2_SEL_TGT_COMPOSE_BOUNDS`` - - - 0x0102 - - - Bounds of the compose rectangle. All valid compose rectangles fit - inside the compose bounds rectangle. - - - Yes - - - Yes - - - .. row 9 - - - ``V4L2_SEL_TGT_COMPOSE_PADDED`` - - - 0x0103 - - - The active area and all padding pixels that are inserted or - modified by hardware. - - - Yes - - - No + * - Target name + - id + - Definition + - Valid for V4L2 + - Valid for V4L2 subdev + * - ``V4L2_SEL_TGT_CROP`` + - 0x0000 + - Crop rectangle. Defines the cropped area. + - Yes + - Yes + * - ``V4L2_SEL_TGT_CROP_DEFAULT`` + - 0x0001 + - Suggested cropping rectangle that covers the "whole picture". + - Yes + - No + * - ``V4L2_SEL_TGT_CROP_BOUNDS`` + - 0x0002 + - Bounds of the crop rectangle. All valid crop rectangles fit inside + the crop bounds rectangle. + - Yes + - Yes + * - ``V4L2_SEL_TGT_NATIVE_SIZE`` + - 0x0003 + - The native size of the device, e.g. a sensor's pixel array. + ``left`` and ``top`` fields are zero for this target. Setting the + native size will generally only make sense for memory to memory + devices where the software can create a canvas of a given size in + which for example a video frame can be composed. In that case + V4L2_SEL_TGT_NATIVE_SIZE can be used to configure the size of + that canvas. + - Yes + - Yes + * - ``V4L2_SEL_TGT_COMPOSE`` + - 0x0100 + - Compose rectangle. Used to configure scaling and composition. + - Yes + - Yes + * - ``V4L2_SEL_TGT_COMPOSE_DEFAULT`` + - 0x0101 + - Suggested composition rectangle that covers the "whole picture". + - Yes + - No + * - ``V4L2_SEL_TGT_COMPOSE_BOUNDS`` + - 0x0102 + - Bounds of the compose rectangle. All valid compose rectangles fit + inside the compose bounds rectangle. + - Yes + - Yes + * - ``V4L2_SEL_TGT_COMPOSE_PADDED`` + - 0x0103 + - The active area and all padding pixels that are inserted or + modified by hardware. + - Yes + - No diff --git a/Documentation/media/uapi/v4l/v4l2.rst b/Documentation/media/uapi/v4l/v4l2.rst index 5e41a8505301..55b959dda07e 100644 --- a/Documentation/media/uapi/v4l/v4l2.rst +++ b/Documentation/media/uapi/v4l/v4l2.rst @@ -112,16 +112,16 @@ DVB device nodes. Add support for Tuner sub-device. :revision: 3.19 / 2014-12-05 (*hv*) Rewrote Colorspace chapter, added new enum -:ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` and enum -:ref:`v4l2_quantization <v4l2-quantization>` fields to struct -:ref:`v4l2_pix_format <v4l2-pix-format>`, struct -:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` and struct -:ref:`v4l2_mbus_framefmt <v4l2-mbus-framefmt>`. +:c:type:`v4l2_ycbcr_encoding` and enum +:c:type:`v4l2_quantization` fields to struct +:c:type:`v4l2_pix_format`, struct +:c:type:`v4l2_pix_format_mplane` and struct +:c:type:`v4l2_mbus_framefmt`. :revision: 3.17 / 2014-08-04 (*lp, hv*) -Extended struct :ref:`v4l2_pix_format <v4l2-pix-format>`. Added +Extended struct :c:type:`v4l2_pix_format`. Added format flags. Added compound control types and VIDIOC_QUERY_EXT_CTRL. diff --git a/Documentation/media/uapi/v4l/video.rst b/Documentation/media/uapi/v4l/video.rst index d3f00715fbc1..a205fb87d566 100644 --- a/Documentation/media/uapi/v4l/video.rst +++ b/Documentation/media/uapi/v4l/video.rst @@ -16,7 +16,7 @@ To learn about the number and attributes of the available inputs and outputs applications can enumerate them with the :ref:`VIDIOC_ENUMINPUT` and :ref:`VIDIOC_ENUMOUTPUT` ioctl, respectively. The -struct :ref:`v4l2_input <v4l2-input>` returned by the +struct :c:type:`v4l2_input` returned by the :ref:`VIDIOC_ENUMINPUT` ioctl also contains signal :status information applicable when the current video input is queried. diff --git a/Documentation/media/uapi/v4l/vidioc-create-bufs.rst b/Documentation/media/uapi/v4l/vidioc-create-bufs.rst index abdc0b4d83d5..aaca12fca06e 100644 --- a/Documentation/media/uapi/v4l/vidioc-create-bufs.rst +++ b/Documentation/media/uapi/v4l/vidioc-create-bufs.rst @@ -15,7 +15,8 @@ VIDIOC_CREATE_BUFS - Create buffers for Memory Mapped or User Pointer or DMA Buf Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_create_buffers *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *argp ) + :name: VIDIOC_CREATE_BUFS Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_CREATE_BUFS - ``argp`` @@ -41,14 +39,14 @@ over buffers is required. This ioctl can be called multiple times to create buffers of different sizes. To allocate the device buffers applications must initialize the relevant -fields of the :ref:`struct v4l2_create_buffers <v4l2-create-buffers>` structure. The +fields of the struct :c:type:`v4l2_create_buffers` structure. The ``count`` field must be set to the number of requested buffers, the ``memory`` field specifies the requested I/O method and the ``reserved`` array must be zeroed. The ``format`` field specifies the image format that the buffers must be able to handle. The application has to fill in this struct -:ref:`v4l2_format <v4l2-format>`. Usually this will be done using the +:c:type:`v4l2_format`. Usually this will be done using the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` or :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctls to ensure that the requested format is supported by the driver. Based on the format's @@ -73,62 +71,39 @@ the ``index`` fields respectively. On return ``count`` can be smaller than the number requested. -.. _v4l2-create-buffers: +.. c:type:: v4l2_create_buffers + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_create_buffers :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - The starting buffer index, returned by the driver. - - - .. row 2 - - - __u32 - - - ``count`` - - - The number of buffers requested or granted. If count == 0, then - :ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of - created buffers, and it will check the validity of ``memory`` and - ``format.type``. If those are invalid -1 is returned and errno is - set to ``EINVAL`` error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns - 0. It will never set errno to ``EBUSY`` error code in this particular - case. - - - .. row 3 - - - __u32 - - - ``memory`` - - - Applications set this field to ``V4L2_MEMORY_MMAP``, - ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See - :ref:`v4l2-memory` - - - .. row 4 - - - struct :ref:`v4l2_format <v4l2-format>` - - - ``format`` - - - Filled in by the application, preserved by the driver. - - - .. row 5 - - - __u32 - - - ``reserved``\ [8] - - - A place holder for future extensions. Drivers and applications - must set the array to zero. + * - __u32 + - ``index`` + - The starting buffer index, returned by the driver. + * - __u32 + - ``count`` + - The number of buffers requested or granted. If count == 0, then + :ref:`VIDIOC_CREATE_BUFS` will set ``index`` to the current number of + created buffers, and it will check the validity of ``memory`` and + ``format.type``. If those are invalid -1 is returned and errno is + set to ``EINVAL`` error code, otherwise :ref:`VIDIOC_CREATE_BUFS` returns + 0. It will never set errno to ``EBUSY`` error code in this particular + case. + * - __u32 + - ``memory`` + - Applications set this field to ``V4L2_MEMORY_MMAP``, + ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See + :c:type:`v4l2_memory` + * - struct :c:type:`v4l2_format` + - ``format`` + - Filled in by the application, preserved by the driver. + * - __u32 + - ``reserved``\ [8] + - A place holder for future extensions. Drivers and applications + must set the array to zero. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-cropcap.rst b/Documentation/media/uapi/v4l/vidioc-cropcap.rst index 8dcbe6d26219..f21a69b554e1 100644 --- a/Documentation/media/uapi/v4l/vidioc-cropcap.rst +++ b/Documentation/media/uapi/v4l/vidioc-cropcap.rst @@ -15,7 +15,8 @@ VIDIOC_CROPCAP - Information about the video cropping and scaling abilities Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_cropcap *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_CROPCAP, struct v4l2_cropcap *argp ) + :name: VIDIOC_CROPCAP Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_CROPCAP - ``argp`` @@ -52,107 +50,71 @@ support cropping and/or scaling and/or have non-square pixels, and for overlay devices. -.. _v4l2-cropcap: +.. c:type:: v4l2_cropcap + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_cropcap :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``type`` - - - Type of the data stream, set by the application. Only these types - are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``, - ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and - ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`. - - - .. row 2 - - - struct :ref:`v4l2_rect <v4l2-rect-crop>` - - - ``bounds`` - - - Defines the window within capturing or output is possible, this - may exclude for example the horizontal and vertical blanking - areas. The cropping rectangle cannot exceed these limits. Width - and height are defined in pixels, the driver writer is free to - choose origin and units of the coordinate system in the analog - domain. - - - .. row 3 - - - struct :ref:`v4l2_rect <v4l2-rect-crop>` - - - ``defrect`` - - - Default cropping rectangle, it shall cover the "whole picture". - Assuming pixel aspect 1/1 this could be for example a 640 × 480 - rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM - centered over the active picture area. The same co-ordinate system - as for ``bounds`` is used. - - - .. row 4 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``pixelaspect`` - - - This is the pixel aspect (y / x) when no scaling is applied, the - ratio of the actual sampling frequency and the frequency required - to get square pixels. - - When cropping coordinates refer to square pixels, the driver sets - ``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and - SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`]. + * - __u32 + - ``type`` + - Type of the data stream, set by the application. Only these types + are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``, + ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and + ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :c:type:`v4l2_buf_type`. + * - struct :ref:`v4l2_rect <v4l2-rect-crop>` + - ``bounds`` + - Defines the window within capturing or output is possible, this + may exclude for example the horizontal and vertical blanking + areas. The cropping rectangle cannot exceed these limits. Width + and height are defined in pixels, the driver writer is free to + choose origin and units of the coordinate system in the analog + domain. + * - struct :ref:`v4l2_rect <v4l2-rect-crop>` + - ``defrect`` + - Default cropping rectangle, it shall cover the "whole picture". + Assuming pixel aspect 1/1 this could be for example a 640 × 480 + rectangle for NTSC, a 768 × 576 rectangle for PAL and SECAM + centered over the active picture area. The same co-ordinate system + as for ``bounds`` is used. + * - struct :c:type:`v4l2_fract` + - ``pixelaspect`` + - This is the pixel aspect (y / x) when no scaling is applied, the + ratio of the actual sampling frequency and the frequency required + to get square pixels. + + When cropping coordinates refer to square pixels, the driver sets + ``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and + SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`]. .. _v4l2-rect-crop: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + .. flat-table:: struct v4l2_rect :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __s32 - - - ``left`` - - - Horizontal offset of the top, left corner of the rectangle, in - pixels. - - - .. row 2 - - - __s32 - - - ``top`` - - - Vertical offset of the top, left corner of the rectangle, in - pixels. - - - .. row 3 - - - __u32 - - - ``width`` - - - Width of the rectangle, in pixels. - - - .. row 4 - - - __u32 - - - ``height`` - - - Height of the rectangle, in pixels. + * - __s32 + - ``left`` + - Horizontal offset of the top, left corner of the rectangle, in + pixels. + * - __s32 + - ``top`` + - Vertical offset of the top, left corner of the rectangle, in + pixels. + * - __u32 + - ``width`` + - Width of the rectangle, in pixels. + * - __u32 + - ``height`` + - Height of the rectangle, in pixels. Return Value @@ -163,5 +125,8 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_cropcap <v4l2-cropcap>` ``type`` is + The struct :c:type:`v4l2_cropcap` ``type`` is invalid. + +ENODATA + Cropping is not supported for this input or output. diff --git a/Documentation/media/uapi/v4l/vidioc-dbg-g-chip-info.rst b/Documentation/media/uapi/v4l/vidioc-dbg-g-chip-info.rst index f7e1b80af29e..e1e5507e79ff 100644 --- a/Documentation/media/uapi/v4l/vidioc-dbg-g-chip-info.rst +++ b/Documentation/media/uapi/v4l/vidioc-dbg-g-chip-info.rst @@ -15,7 +15,8 @@ VIDIOC_DBG_G_CHIP_INFO - Identify the chips on a TV card Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dbg_chip_info *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_DBG_G_CHIP_INFO, struct v4l2_dbg_chip_info *argp ) + :name: VIDIOC_DBG_G_CHIP_INFO Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_DBG_G_CHIP_INFO - ``argp`` @@ -50,7 +48,7 @@ Additionally the Linux kernel must be compiled with the To query the driver applications must initialize the ``match.type`` and ``match.addr`` or ``match.name`` fields of a struct -:ref:`v4l2_dbg_chip_info <v4l2-dbg-chip-info>` and call +:c:type:`v4l2_dbg_chip_info` and call :ref:`VIDIOC_DBG_G_CHIP_INFO` with a pointer to this structure. On success the driver stores information about the selected chip in the ``name`` and ``flags`` fields. @@ -78,6 +76,8 @@ is available from the LinuxTV v4l-dvb repository; see instructions. +.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| + .. _name-v4l2-dbg-match: .. flat-table:: struct v4l2_dbg_match @@ -85,87 +85,52 @@ instructions. :stub-columns: 0 :widths: 1 1 1 2 + * - __u32 + - ``type`` + - See :ref:`name-chip-match-types` for a list of possible types. + * - union + - (anonymous) + * - + - __u32 + - ``addr`` + - Match a chip by this number, interpreted according to the ``type`` + field. + * - + - char + - ``name[32]`` + - Match a chip by this name, interpreted according to the ``type`` + field. Currently unused. - - .. row 1 - - - __u32 - - - ``type`` - - - See :ref:`name-chip-match-types` for a list of possible types. - - - .. row 2 - - - union - - - (anonymous) - - - .. row 3 - - - - - __u32 - - ``addr`` - - Match a chip by this number, interpreted according to the ``type`` - field. +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| - - .. row 4 - - - - - char - - - ``name[32]`` - - - Match a chip by this name, interpreted according to the ``type`` - field. Currently unused. - - - -.. _v4l2-dbg-chip-info: +.. c:type:: v4l2_dbg_chip_info .. flat-table:: struct v4l2_dbg_chip_info :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - struct v4l2_dbg_match + - ``match`` + - How to match the chip, see :ref:`name-v4l2-dbg-match`. + * - char + - ``name[32]`` + - The name of the chip. + * - __u32 + - ``flags`` + - Set by the driver. If ``V4L2_CHIP_FL_READABLE`` is set, then the + driver supports reading registers from the device. If + ``V4L2_CHIP_FL_WRITABLE`` is set, then it supports writing + registers. + * - __u32 + - ``reserved[8]`` + - Reserved fields, both application and driver must set these to 0. - - .. row 1 - - - struct v4l2_dbg_match - - - ``match`` - - - How to match the chip, see :ref:`name-v4l2-dbg-match`. - - - .. row 2 - - - char - - - ``name[32]`` - - - The name of the chip. - - - .. row 3 - - - __u32 - - - ``flags`` - - - Set by the driver. If ``V4L2_CHIP_FL_READABLE`` is set, then the - driver supports reading registers from the device. If - ``V4L2_CHIP_FL_WRITABLE`` is set, then it supports writing - registers. - - - .. row 4 - - - __u32 - - - ``reserved[8]`` - - - Reserved fields, both application and driver must set these to 0. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _name-chip-match-types: @@ -174,23 +139,13 @@ instructions. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_CHIP_MATCH_BRIDGE`` - - - 0 - - - Match the nth chip on the card, zero for the bridge chip. Does not - match sub-devices. - - - .. row 2 - - - ``V4L2_CHIP_MATCH_SUBDEV`` - - - 4 - - - Match the nth sub-device. + * - ``V4L2_CHIP_MATCH_BRIDGE`` + - 0 + - Match the nth chip on the card, zero for the bridge chip. Does not + match sub-devices. + * - ``V4L2_CHIP_MATCH_SUBDEV`` + - 4 + - Match the nth sub-device. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-dbg-g-register.rst b/Documentation/media/uapi/v4l/vidioc-dbg-g-register.rst index 09d2880e6170..5960a6547f41 100644 --- a/Documentation/media/uapi/v4l/vidioc-dbg-g-register.rst +++ b/Documentation/media/uapi/v4l/vidioc-dbg-g-register.rst @@ -15,9 +15,11 @@ VIDIOC_DBG_G_REGISTER - VIDIOC_DBG_S_REGISTER - Read or write hardware registers Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dbg_register *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_DBG_G_REGISTER, struct v4l2_dbg_register *argp ) + :name: VIDIOC_DBG_G_REGISTER -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_dbg_register *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_DBG_S_REGISTER, const struct v4l2_dbg_register *argp ) + :name: VIDIOC_DBG_S_REGISTER Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER - ``argp`` @@ -50,7 +49,7 @@ superuser privileges. Additionally the Linux kernel must be compiled with the ``CONFIG_VIDEO_ADV_DEBUG`` option to enable these ioctls. To write a register applications must initialize all fields of a struct -:ref:`v4l2_dbg_register <v4l2-dbg-register>` except for ``size`` and +:c:type:`v4l2_dbg_register` except for ``size`` and call ``VIDIOC_DBG_S_REGISTER`` with a pointer to this structure. The ``match.type`` and ``match.addr`` or ``match.name`` fields select a chip on the TV card, the ``reg`` field specifies a register number and the @@ -86,90 +85,55 @@ It is available from the LinuxTV v4l-dvb repository; see instructions. -.. _v4l2-dbg-match: +.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| + +.. c:type:: v4l2_dbg_match .. flat-table:: struct v4l2_dbg_match :header-rows: 0 :stub-columns: 0 :widths: 1 1 1 2 + * - __u32 + - ``type`` + - See :ref:`chip-match-types` for a list of possible types. + * - union + - (anonymous) + * - + - __u32 + - ``addr`` + - Match a chip by this number, interpreted according to the ``type`` + field. + * - + - char + - ``name[32]`` + - Match a chip by this name, interpreted according to the ``type`` + field. Currently unused. - - .. row 1 - - - __u32 - - - ``type`` - - - See :ref:`chip-match-types` for a list of possible types. - - - .. row 2 - - - union - - - (anonymous) - - - .. row 3 - - - - - __u32 - - ``addr`` - - Match a chip by this number, interpreted according to the ``type`` - field. - - - .. row 4 - - - - - char - - - ``name[32]`` - - - Match a chip by this name, interpreted according to the ``type`` - field. Currently unused. - - - -.. _v4l2-dbg-register: +.. c:type:: v4l2_dbg_register .. flat-table:: struct v4l2_dbg_register :header-rows: 0 :stub-columns: 0 + * - struct v4l2_dbg_match + - ``match`` + - How to match the chip, see :c:type:`v4l2_dbg_match`. + * - __u32 + - ``size`` + - The register size in bytes. + * - __u64 + - ``reg`` + - A register number. + * - __u64 + - ``val`` + - The value read from, or to be written into the register. - - .. row 1 - - - struct v4l2_dbg_match - - - ``match`` - - - How to match the chip, see :ref:`v4l2-dbg-match`. - - - .. row 2 - - - __u32 - - - ``size`` - - - The register size in bytes. - - - .. row 3 - - - __u64 - - - ``reg`` - - - A register number. - - - .. row 4 - - - __u64 - - - ``val`` - - - The value read from, or to be written into the register. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _chip-match-types: @@ -178,23 +142,13 @@ instructions. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_CHIP_MATCH_BRIDGE`` - - - 0 - - - Match the nth chip on the card, zero for the bridge chip. Does not - match sub-devices. - - - .. row 2 - - - ``V4L2_CHIP_MATCH_SUBDEV`` - - - 4 - - - Match the nth sub-device. + * - ``V4L2_CHIP_MATCH_BRIDGE`` + - 0 + - Match the nth chip on the card, zero for the bridge chip. Does not + match sub-devices. + * - ``V4L2_CHIP_MATCH_SUBDEV`` + - 4 + - Match the nth sub-device. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst b/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst index 2a36e91b57b9..85c916b0ce07 100644 --- a/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst +++ b/Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst @@ -15,7 +15,12 @@ VIDIOC_DECODER_CMD - VIDIOC_TRY_DECODER_CMD - Execute an decoder command Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_decoder_cmd *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_DECODER_CMD, struct v4l2_decoder_cmd *argp ) + :name: VIDIOC_DECODER_CMD + + +.. c:function:: int ioctl( int fd, VIDIOC_TRY_DECODER_CMD, struct v4l2_decoder_cmd *argp ) + :name: VIDIOC_TRY_DECODER_CMD Arguments @@ -24,10 +29,8 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD - ``argp`` + pointer to struct :c:type:`v4l2_decoder_cmd`. Description @@ -37,7 +40,7 @@ These ioctls control an audio/video (usually MPEG-) decoder. ``VIDIOC_DECODER_CMD`` sends a command to the decoder, ``VIDIOC_TRY_DECODER_CMD`` can be used to try a command without actually executing it. To send a command applications must initialize all fields -of a struct :ref:`v4l2_decoder_cmd <v4l2-decoder-cmd>` and call +of a struct :c:type:`v4l2_decoder_cmd` and call ``VIDIOC_DECODER_CMD`` or ``VIDIOC_TRY_DECODER_CMD`` with a pointer to this structure. @@ -56,204 +59,140 @@ These ioctls are optional, not all drivers may support them. They were introduced in Linux 3.3. -.. _v4l2-decoder-cmd: +.. tabularcolumns:: |p{1.1cm}|p{2.4cm}|p{1.2cm}|p{1.6cm}|p{10.6cm}| + +.. c:type:: v4l2_decoder_cmd + +.. cssclass:: longtable .. flat-table:: struct v4l2_decoder_cmd :header-rows: 0 :stub-columns: 0 - :widths: 1 1 2 1 1 - - - - .. row 1 - - - __u32 - - - ``cmd`` - - - - - - - The decoder command, see :ref:`decoder-cmds`. - - - .. row 2 - - - __u32 - - - ``flags`` - - - - - - - Flags to go with the command. If no flags are defined for this - command, drivers and applications must set this field to zero. - - - .. row 3 - - - union - - - (anonymous) - - - - - - - - - - .. row 4 - - - - - struct - - - ``start`` - - - - - Structure containing additional data for the - ``V4L2_DEC_CMD_START`` command. - - - .. row 5 - - - - - - - __s32 - - - ``speed`` - - - Playback speed and direction. The playback speed is defined as - ``speed``/1000 of the normal speed. So 1000 is normal playback. - Negative numbers denote reverse playback, so -1000 does reverse - playback at normal speed. Speeds -1, 0 and 1 have special - meanings: speed 0 is shorthand for 1000 (normal playback). A speed - of 1 steps just one frame forward, a speed of -1 steps just one - frame back. - - - .. row 6 - - - - - - - __u32 - - - ``format`` - - - Format restrictions. This field is set by the driver, not the - application. Possible values are ``V4L2_DEC_START_FMT_NONE`` if - there are no format restrictions or ``V4L2_DEC_START_FMT_GOP`` if - the decoder operates on full GOPs (*Group Of Pictures*). This is - usually the case for reverse playback: the decoder needs full - GOPs, which it can then play in reverse order. So to implement - reverse playback the application must feed the decoder the last - GOP in the video file, then the GOP before that, etc. etc. - - - .. row 7 - - - - - struct - - - ``stop`` - - - - - Structure containing additional data for the ``V4L2_DEC_CMD_STOP`` - command. - - - .. row 8 - - - - - - - __u64 - - - ``pts`` - - - Stop playback at this ``pts`` or immediately if the playback is - already past that timestamp. Leave to 0 if you want to stop after - the last frame was decoded. - - - .. row 9 - - - - - struct - - - ``raw`` - - - - - - - - .. row 10 - - - - - - - __u32 - - - ``data``\ [16] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - + :widths: 11 24 12 16 106 + + * - __u32 + - ``cmd`` + - + - + - The decoder command, see :ref:`decoder-cmds`. + * - __u32 + - ``flags`` + - + - + - Flags to go with the command. If no flags are defined for this + command, drivers and applications must set this field to zero. + * - union + - (anonymous) + - + - + - + * - + - struct + - ``start`` + - + - Structure containing additional data for the + ``V4L2_DEC_CMD_START`` command. + * - + - + - __s32 + - ``speed`` + - Playback speed and direction. The playback speed is defined as + ``speed``/1000 of the normal speed. So 1000 is normal playback. + Negative numbers denote reverse playback, so -1000 does reverse + playback at normal speed. Speeds -1, 0 and 1 have special + meanings: speed 0 is shorthand for 1000 (normal playback). A speed + of 1 steps just one frame forward, a speed of -1 steps just one + frame back. + * - + - + - __u32 + - ``format`` + - Format restrictions. This field is set by the driver, not the + application. Possible values are ``V4L2_DEC_START_FMT_NONE`` if + there are no format restrictions or ``V4L2_DEC_START_FMT_GOP`` if + the decoder operates on full GOPs (*Group Of Pictures*). This is + usually the case for reverse playback: the decoder needs full + GOPs, which it can then play in reverse order. So to implement + reverse playback the application must feed the decoder the last + GOP in the video file, then the GOP before that, etc. etc. + * - + - struct + - ``stop`` + - + - Structure containing additional data for the ``V4L2_DEC_CMD_STOP`` + command. + * - + - + - __u64 + - ``pts`` + - Stop playback at this ``pts`` or immediately if the playback is + already past that timestamp. Leave to 0 if you want to stop after + the last frame was decoded. + * - + - struct + - ``raw`` + - + - + * - + - + - __u32 + - ``data``\ [16] + - Reserved for future extensions. Drivers and applications must set + the array to zero. + + + +.. tabularcolumns:: |p{5.6cm}|p{0.6cm}|p{11.3cm}| .. _decoder-cmds: .. flat-table:: Decoder Commands :header-rows: 0 :stub-columns: 0 - :widths: 3 1 4 - - - - .. row 1 - - - ``V4L2_DEC_CMD_START`` - - - 0 - - - Start the decoder. When the decoder is already running or paused, - this command will just change the playback speed. That means that - calling ``V4L2_DEC_CMD_START`` when the decoder was paused will - *not* resume the decoder. You have to explicitly call - ``V4L2_DEC_CMD_RESUME`` for that. This command has one flag: - ``V4L2_DEC_CMD_START_MUTE_AUDIO``. If set, then audio will be - muted when playing back at a non-standard speed. - - - .. row 2 - - - ``V4L2_DEC_CMD_STOP`` - - - 1 - - - Stop the decoder. When the decoder is already stopped, this - command does nothing. This command has two flags: if - ``V4L2_DEC_CMD_STOP_TO_BLACK`` is set, then the decoder will set - the picture to black after it stopped decoding. Otherwise the last - image will repeat. mem2mem decoders will stop producing new frames - altogether. They will send a ``V4L2_EVENT_EOS`` event when the - last frame has been decoded and all frames are ready to be - dequeued and will set the ``V4L2_BUF_FLAG_LAST`` buffer flag on - the last buffer of the capture queue to indicate there will be no - new buffers produced to dequeue. This buffer may be empty, - indicated by the driver setting the ``bytesused`` field to 0. Once - the ``V4L2_BUF_FLAG_LAST`` flag was set, the - :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore, - but return an ``EPIPE`` error code. If - ``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops - immediately (ignoring the ``pts`` value), otherwise it will keep - decoding until timestamp >= pts or until the last of the pending - data from its internal buffers was decoded. - - - .. row 3 - - - ``V4L2_DEC_CMD_PAUSE`` - - - 2 - - - Pause the decoder. When the decoder has not been started yet, the - driver will return an ``EPERM`` error code. When the decoder is - already paused, this command does nothing. This command has one - flag: if ``V4L2_DEC_CMD_PAUSE_TO_BLACK`` is set, then set the - decoder output to black when paused. - - - .. row 4 - - - ``V4L2_DEC_CMD_RESUME`` - - - 3 - - - Resume decoding after a PAUSE command. When the decoder has not - been started yet, the driver will return an ``EPERM`` error code. When - the decoder is already running, this command does nothing. No - flags are defined for this command. + :widths: 56 6 113 + + * - ``V4L2_DEC_CMD_START`` + - 0 + - Start the decoder. When the decoder is already running or paused, + this command will just change the playback speed. That means that + calling ``V4L2_DEC_CMD_START`` when the decoder was paused will + *not* resume the decoder. You have to explicitly call + ``V4L2_DEC_CMD_RESUME`` for that. This command has one flag: + ``V4L2_DEC_CMD_START_MUTE_AUDIO``. If set, then audio will be + muted when playing back at a non-standard speed. + * - ``V4L2_DEC_CMD_STOP`` + - 1 + - Stop the decoder. When the decoder is already stopped, this + command does nothing. This command has two flags: if + ``V4L2_DEC_CMD_STOP_TO_BLACK`` is set, then the decoder will set + the picture to black after it stopped decoding. Otherwise the last + image will repeat. mem2mem decoders will stop producing new frames + altogether. They will send a ``V4L2_EVENT_EOS`` event when the + last frame has been decoded and all frames are ready to be + dequeued and will set the ``V4L2_BUF_FLAG_LAST`` buffer flag on + the last buffer of the capture queue to indicate there will be no + new buffers produced to dequeue. This buffer may be empty, + indicated by the driver setting the ``bytesused`` field to 0. Once + the ``V4L2_BUF_FLAG_LAST`` flag was set, the + :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore, + but return an ``EPIPE`` error code. If + ``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops + immediately (ignoring the ``pts`` value), otherwise it will keep + decoding until timestamp >= pts or until the last of the pending + data from its internal buffers was decoded. + * - ``V4L2_DEC_CMD_PAUSE`` + - 2 + - Pause the decoder. When the decoder has not been started yet, the + driver will return an ``EPERM`` error code. When the decoder is + already paused, this command does nothing. This command has one + flag: if ``V4L2_DEC_CMD_PAUSE_TO_BLACK`` is set, then set the + decoder output to black when paused. + * - ``V4L2_DEC_CMD_RESUME`` + - 3 + - Resume decoding after a PAUSE command. When the decoder has not + been started yet, the driver will return an ``EPERM`` error code. When + the decoder is already running, this command does nothing. No + flags are defined for this command. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-dqevent.rst b/Documentation/media/uapi/v4l/vidioc-dqevent.rst index 73c0d5be62ee..8d663a73818e 100644 --- a/Documentation/media/uapi/v4l/vidioc-dqevent.rst +++ b/Documentation/media/uapi/v4l/vidioc-dqevent.rst @@ -15,7 +15,8 @@ VIDIOC_DQEVENT - Dequeue event Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_event *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_DQEVENT, struct v4l2_event *argp ) + :name: VIDIOC_DQEVENT Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_DQEVENT - ``argp`` @@ -34,146 +32,89 @@ Description =========== Dequeue an event from a video device. No input is required for this -ioctl. All the fields of the struct :ref:`v4l2_event <v4l2-event>` +ioctl. All the fields of the struct :c:type:`v4l2_event` structure are filled by the driver. The file handle will also receive exceptions which the application may get by e.g. using the select system call. -.. _v4l2-event: +.. tabularcolumns:: |p{3.0cm}|p{4.3cm}|p{2.5cm}|p{7.7cm}| + +.. c:type:: v4l2_event + +.. cssclass: longtable .. flat-table:: struct v4l2_event :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 1 - - - .. row 1 - - - __u32 - - - ``type`` - - - - - Type of the event, see :ref:`event-type`. - - - .. row 2 - - - union - - - ``u`` - - - - - - - - .. row 3 - - - - - struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` - - - ``vsync`` - - - Event data for event ``V4L2_EVENT_VSYNC``. - - - .. row 4 - - - - - struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` - - - ``ctrl`` - - - Event data for event ``V4L2_EVENT_CTRL``. - - - .. row 5 - - - - - struct :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` - - - ``frame_sync`` - - - Event data for event ``V4L2_EVENT_FRAME_SYNC``. - - - .. row 6 - - - - - struct :ref:`v4l2_event_motion_det <v4l2-event-motion-det>` - - - ``motion_det`` - - - Event data for event V4L2_EVENT_MOTION_DET. - - - .. row 7 - - - - - struct :ref:`v4l2_event_src_change <v4l2-event-src-change>` - - - ``src_change`` - - - Event data for event V4L2_EVENT_SOURCE_CHANGE. - - - .. row 8 - - - - - __u8 - - - ``data``\ [64] - - - Event data. Defined by the event type. The union should be used to - define easily accessible type for events. - - - .. row 9 - - - __u32 - - - ``pending`` - - - - - Number of pending events excluding this one. - - - .. row 10 - - - __u32 - - - ``sequence`` - - - - - Event sequence number. The sequence number is incremented for - every subscribed event that takes place. If sequence numbers are - not contiguous it means that events have been lost. - - - .. row 11 - - - struct timespec - - - ``timestamp`` - - - - - Event timestamp. The timestamp has been taken from the - ``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2, - use :c:func:`clock_gettime(2)`. - - - .. row 12 - - - u32 - - - ``id`` - - - - - The ID associated with the event source. If the event does not - have an associated ID (this depends on the event type), then this - is 0. - - - .. row 13 - - - __u32 - - - ``reserved``\ [8] - - - - - Reserved for future extensions. Drivers must set the array to - zero. - - + * - __u32 + - ``type`` + - + - Type of the event, see :ref:`event-type`. + * - union + - ``u`` + - + - + * - + - struct :c:type:`v4l2_event_vsync` + - ``vsync`` + - Event data for event ``V4L2_EVENT_VSYNC``. + * - + - struct :c:type:`v4l2_event_ctrl` + - ``ctrl`` + - Event data for event ``V4L2_EVENT_CTRL``. + * - + - struct :c:type:`v4l2_event_frame_sync` + - ``frame_sync`` + - Event data for event ``V4L2_EVENT_FRAME_SYNC``. + * - + - struct :c:type:`v4l2_event_motion_det` + - ``motion_det`` + - Event data for event V4L2_EVENT_MOTION_DET. + * - + - struct :c:type:`v4l2_event_src_change` + - ``src_change`` + - Event data for event V4L2_EVENT_SOURCE_CHANGE. + * - + - __u8 + - ``data``\ [64] + - Event data. Defined by the event type. The union should be used to + define easily accessible type for events. + * - __u32 + - ``pending`` + - + - Number of pending events excluding this one. + * - __u32 + - ``sequence`` + - + - Event sequence number. The sequence number is incremented for + every subscribed event that takes place. If sequence numbers are + not contiguous it means that events have been lost. + * - struct timespec + - ``timestamp`` + - + - Event timestamp. The timestamp has been taken from the + ``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2, + use :c:func:`clock_gettime`. + * - u32 + - ``id`` + - + - The ID associated with the event source. If the event does not + have an associated ID (this depends on the event type), then this + is 0. + * - __u32 + - ``reserved``\ [8] + - + - Reserved for future extensions. Drivers must set the array to + zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + +.. cssclass:: longtable .. _event-type: @@ -182,330 +123,223 @@ call. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_EVENT_ALL`` - - - 0 - - - All events. V4L2_EVENT_ALL is valid only for - VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. - - - .. row 2 - - - ``V4L2_EVENT_VSYNC`` - - - 1 - - - This event is triggered on the vertical sync. This event has a - struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` associated - with it. - - - .. row 3 - - - ``V4L2_EVENT_EOS`` - - - 2 - - - This event is triggered when the end of a stream is reached. This - is typically used with MPEG decoders to report to the application - when the last of the MPEG stream has been decoded. - - - .. row 4 - - - ``V4L2_EVENT_CTRL`` - - - 3 - - - This event requires that the ``id`` matches the control ID from - which you want to receive events. This event is triggered if the - control's value changes, if a button control is pressed or if the - control's flags change. This event has a struct - :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` associated with it. - This struct contains much of the same information as struct - :ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct - :ref:`v4l2_control <v4l2-control>`. - - If the event is generated due to a call to - :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or - :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the - event will *not* be sent to the file handle that called the ioctl - function. This prevents nasty feedback loops. If you *do* want to - get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK`` - flag. - - This event type will ensure that no information is lost when more - events are raised than there is room internally. In that case the - struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` of the - second-oldest event is kept, but the ``changes`` field of the - second-oldest event is ORed with the ``changes`` field of the - oldest event. - - - .. row 5 - - - ``V4L2_EVENT_FRAME_SYNC`` - - - 4 - - - Triggered immediately when the reception of a frame has begun. - This event has a struct - :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` - associated with it. - - If the hardware needs to be stopped in the case of a buffer - underrun it might not be able to generate this event. In such - cases the ``frame_sequence`` field in struct - :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` will not - be incremented. This causes two consecutive frame sequence numbers - to have n times frame interval in between them. - - - .. row 6 - - - ``V4L2_EVENT_SOURCE_CHANGE`` - - - 5 - - - This event is triggered when a source parameter change is detected - during runtime by the video device. It can be a runtime resolution - change triggered by a video decoder or the format change happening - on an input connector. This event requires that the ``id`` matches - the input index (when used with a video device node) or the pad - index (when used with a subdevice node) from which you want to - receive events. - - This event has a struct - :ref:`v4l2_event_src_change <v4l2-event-src-change>` - associated with it. The ``changes`` bitfield denotes what has - changed for the subscribed pad. If multiple events occurred before - application could dequeue them, then the changes will have the - ORed value of all the events generated. - - - .. row 7 - - - ``V4L2_EVENT_MOTION_DET`` - - - 6 - - - Triggered whenever the motion detection state for one or more of - the regions changes. This event has a struct - :ref:`v4l2_event_motion_det <v4l2-event-motion-det>` - associated with it. - - - .. row 8 - - - ``V4L2_EVENT_PRIVATE_START`` - - - 0x08000000 - - - Base event number for driver-private events. - - - -.. _v4l2-event-vsync: + * - ``V4L2_EVENT_ALL`` + - 0 + - All events. V4L2_EVENT_ALL is valid only for + VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. + * - ``V4L2_EVENT_VSYNC`` + - 1 + - This event is triggered on the vertical sync. This event has a + struct :c:type:`v4l2_event_vsync` associated + with it. + * - ``V4L2_EVENT_EOS`` + - 2 + - This event is triggered when the end of a stream is reached. This + is typically used with MPEG decoders to report to the application + when the last of the MPEG stream has been decoded. + * - ``V4L2_EVENT_CTRL`` + - 3 + - This event requires that the ``id`` matches the control ID from + which you want to receive events. This event is triggered if the + control's value changes, if a button control is pressed or if the + control's flags change. This event has a struct + :c:type:`v4l2_event_ctrl` associated with it. + This struct contains much of the same information as struct + :ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct + :c:type:`v4l2_control`. + + If the event is generated due to a call to + :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or + :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the + event will *not* be sent to the file handle that called the ioctl + function. This prevents nasty feedback loops. If you *do* want to + get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK`` + flag. + + This event type will ensure that no information is lost when more + events are raised than there is room internally. In that case the + struct :c:type:`v4l2_event_ctrl` of the + second-oldest event is kept, but the ``changes`` field of the + second-oldest event is ORed with the ``changes`` field of the + oldest event. + * - ``V4L2_EVENT_FRAME_SYNC`` + - 4 + - Triggered immediately when the reception of a frame has begun. + This event has a struct + :c:type:`v4l2_event_frame_sync` + associated with it. + + If the hardware needs to be stopped in the case of a buffer + underrun it might not be able to generate this event. In such + cases the ``frame_sequence`` field in struct + :c:type:`v4l2_event_frame_sync` will not + be incremented. This causes two consecutive frame sequence numbers + to have n times frame interval in between them. + * - ``V4L2_EVENT_SOURCE_CHANGE`` + - 5 + - This event is triggered when a source parameter change is detected + during runtime by the video device. It can be a runtime resolution + change triggered by a video decoder or the format change happening + on an input connector. This event requires that the ``id`` matches + the input index (when used with a video device node) or the pad + index (when used with a subdevice node) from which you want to + receive events. + + This event has a struct + :c:type:`v4l2_event_src_change` + associated with it. The ``changes`` bitfield denotes what has + changed for the subscribed pad. If multiple events occurred before + application could dequeue them, then the changes will have the + ORed value of all the events generated. + * - ``V4L2_EVENT_MOTION_DET`` + - 6 + - Triggered whenever the motion detection state for one or more of + the regions changes. This event has a struct + :c:type:`v4l2_event_motion_det` + associated with it. + * - ``V4L2_EVENT_PRIVATE_START`` + - 0x08000000 + - Base event number for driver-private events. + + + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_event_vsync .. flat-table:: struct v4l2_event_vsync :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - __u8 + - ``field`` + - The upcoming field. See enum :c:type:`v4l2_field`. - - .. row 1 - - - __u8 - - - ``field`` - - - The upcoming field. See enum :ref:`v4l2_field <v4l2-field>`. +.. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{1.8cm}|p{8.5cm}| -.. _v4l2-event-ctrl: +.. c:type:: v4l2_event_ctrl .. flat-table:: struct v4l2_event_ctrl :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 1 - - - .. row 1 - - - __u32 - - - ``changes`` - - - - - A bitmask that tells what has changed. See - :ref:`ctrl-changes-flags`. - - - .. row 2 - - - __u32 - - - ``type`` - - - - - The type of the control. See enum - :ref:`v4l2_ctrl_type <v4l2-ctrl-type>`. - - - .. row 3 - - - union (anonymous) - - - - - - - - - - .. row 4 - - - - - __s32 - - - ``value`` - - - The 32-bit value of the control for 32-bit control types. This is - 0 for string controls since the value of a string cannot be passed - using :ref:`VIDIOC_DQEVENT`. - - - .. row 5 - - - - - __s64 - - - ``value64`` - - - The 64-bit value of the control for 64-bit control types. - - - .. row 6 - - - __u32 - - - ``flags`` - - - - - The control flags. See :ref:`control-flags`. - - - .. row 7 - - - __s32 - - - ``minimum`` - - - - - The minimum value of the control. See struct - :ref:`v4l2_queryctrl <v4l2-queryctrl>`. - - - .. row 8 - - - __s32 - - - ``maximum`` - - - - - The maximum value of the control. See struct - :ref:`v4l2_queryctrl <v4l2-queryctrl>`. - - - .. row 9 - - - __s32 - - - ``step`` - - - - - The step value of the control. See struct - :ref:`v4l2_queryctrl <v4l2-queryctrl>`. - - - .. row 10 - - - __s32 - - - ``default_value`` - - - - - The default value value of the control. See struct - :ref:`v4l2_queryctrl <v4l2-queryctrl>`. - - - -.. _v4l2-event-frame-sync: + * - __u32 + - ``changes`` + - + - A bitmask that tells what has changed. See + :ref:`ctrl-changes-flags`. + * - __u32 + - ``type`` + - + - The type of the control. See enum + :c:type:`v4l2_ctrl_type`. + * - union (anonymous) + - + - + - + * - + - __s32 + - ``value`` + - The 32-bit value of the control for 32-bit control types. This is + 0 for string controls since the value of a string cannot be passed + using :ref:`VIDIOC_DQEVENT`. + * - + - __s64 + - ``value64`` + - The 64-bit value of the control for 64-bit control types. + * - __u32 + - ``flags`` + - + - The control flags. See :ref:`control-flags`. + * - __s32 + - ``minimum`` + - + - The minimum value of the control. See struct + :ref:`v4l2_queryctrl <v4l2-queryctrl>`. + * - __s32 + - ``maximum`` + - + - The maximum value of the control. See struct + :ref:`v4l2_queryctrl <v4l2-queryctrl>`. + * - __s32 + - ``step`` + - + - The step value of the control. See struct + :ref:`v4l2_queryctrl <v4l2-queryctrl>`. + * - __s32 + - ``default_value`` + - + - The default value value of the control. See struct + :ref:`v4l2_queryctrl <v4l2-queryctrl>`. + + + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_event_frame_sync .. flat-table:: struct v4l2_event_frame_sync :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - __u32 + - ``frame_sequence`` + - The sequence number of the frame being received. - - .. row 1 - - - __u32 - - - ``frame_sequence`` - - The sequence number of the frame being received. +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| - -.. _v4l2-event-src-change: +.. c:type:: v4l2_event_src_change .. flat-table:: struct v4l2_event_src_change :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - __u32 + - ``changes`` + - A bitmask that tells what has changed. See + :ref:`src-changes-flags`. - - .. row 1 - - - __u32 - - - ``changes`` - - A bitmask that tells what has changed. See - :ref:`src-changes-flags`. +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| - -.. _v4l2-event-motion-det: +.. c:type:: v4l2_event_motion_det .. flat-table:: struct v4l2_event_motion_det :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``flags`` - - - Currently only one flag is available: if - ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the - ``frame_sequence`` field is valid, otherwise that field should be - ignored. - - - .. row 2 - - - __u32 - - - ``frame_sequence`` - - - The sequence number of the frame being received. Only valid if the - ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set. - - - .. row 3 - - - __u32 - - - ``region_mask`` - - - The bitmask of the regions that reported motion. There is at least - one region. If this field is 0, then no motion was detected at - all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control - (see :ref:`detect-controls`) to assign a different region to - each cell in the motion detection grid, then that all cells are - automatically assigned to the default region 0. - - + * - __u32 + - ``flags`` + - Currently only one flag is available: if + ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the + ``frame_sequence`` field is valid, otherwise that field should be + ignored. + * - __u32 + - ``frame_sequence`` + - The sequence number of the frame being received. Only valid if the + ``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set. + * - __u32 + - ``region_mask`` + - The bitmask of the regions that reported motion. There is at least + one region. If this field is 0, then no motion was detected at + all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control + (see :ref:`detect-controls`) to assign a different region to + each cell in the motion detection grid, then that all cells are + automatically assigned to the default region 0. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _ctrl-changes-flags: @@ -514,37 +348,24 @@ call. :stub-columns: 0 :widths: 3 1 4 + * - ``V4L2_EVENT_CTRL_CH_VALUE`` + - 0x0001 + - This control event was triggered because the value of the control + changed. Special cases: Volatile controls do no generate this + event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` + flag set, then this event is sent as well, regardless its value. + * - ``V4L2_EVENT_CTRL_CH_FLAGS`` + - 0x0002 + - This control event was triggered because the control flags + changed. + * - ``V4L2_EVENT_CTRL_CH_RANGE`` + - 0x0004 + - This control event was triggered because the minimum, maximum, + step or the default value of the control changed. - - .. row 1 - - - ``V4L2_EVENT_CTRL_CH_VALUE`` - - - 0x0001 - - - This control event was triggered because the value of the control - changed. Special cases: Volatile controls do no generate this - event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` - flag set, then this event is sent as well, regardless its value. - - - .. row 2 - - - ``V4L2_EVENT_CTRL_CH_FLAGS`` - - - 0x0002 - - - This control event was triggered because the control flags - changed. - - - .. row 3 - - - ``V4L2_EVENT_CTRL_CH_RANGE`` - - - 0x0004 - - - This control event was triggered because the minimum, maximum, - step or the default value of the control changed. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _src-changes-flags: @@ -553,16 +374,11 @@ call. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_EVENT_SRC_CH_RESOLUTION`` - - - 0x0001 - - - This event gets triggered when a resolution change is detected at - an input. This can come from an input connector or from a video - decoder. + * - ``V4L2_EVENT_SRC_CH_RESOLUTION`` + - 0x0001 + - This event gets triggered when a resolution change is detected at + an input. This can come from an input connector or from a video + decoder. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst b/Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst index 6e05957013bb..424f3a1c7f56 100644 --- a/Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst +++ b/Documentation/media/uapi/v4l/vidioc-dv-timings-cap.rst @@ -15,7 +15,11 @@ VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the D Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings_cap *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp ) + :name: VIDIOC_DV_TIMINGS_CAP + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp ) + :name: VIDIOC_SUBDEV_DV_TIMINGS_CAP Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP - ``argp`` @@ -35,11 +36,13 @@ Description To query the capabilities of the DV receiver/transmitter applications initialize the ``pad`` field to 0, zero the reserved array of struct -:ref:`v4l2_dv_timings_cap <v4l2-dv-timings-cap>` and call the +:c:type:`v4l2_dv_timings_cap` and call the ``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill in the structure. -.. note:: Drivers may return different values after +.. note:: + + Drivers may return different values after switching the video input or output. When implemented by the driver DV capabilities of subdevices can be @@ -47,157 +50,88 @@ queried by calling the ``VIDIOC_SUBDEV_DV_TIMINGS_CAP`` ioctl directly on a subdevice node. The capabilities are specific to inputs (for DV receivers) or outputs (for DV transmitters), applications must specify the desired pad number in the struct -:ref:`v4l2_dv_timings_cap <v4l2-dv-timings-cap>` ``pad`` field and +:c:type:`v4l2_dv_timings_cap` ``pad`` field and zero the ``reserved`` array. Attempts to query capabilities on a pad that doesn't support them will return an ``EINVAL`` error code. -.. _v4l2-bt-timings-cap: +.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| + +.. c:type:: v4l2_bt_timings_cap .. flat-table:: struct v4l2_bt_timings_cap :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``min_width`` - - - Minimum width of the active video in pixels. - - - .. row 2 - - - __u32 - - - ``max_width`` - - - Maximum width of the active video in pixels. - - - .. row 3 - - - __u32 - - - ``min_height`` - - - Minimum height of the active video in lines. - - - .. row 4 - - - __u32 - - - ``max_height`` - - - Maximum height of the active video in lines. - - - .. row 5 - - - __u64 - - - ``min_pixelclock`` - - - Minimum pixelclock frequency in Hz. - - - .. row 6 - - - __u64 - - - ``max_pixelclock`` - - - Maximum pixelclock frequency in Hz. - - - .. row 7 - - - __u32 - - - ``standards`` - - - The video standard(s) supported by the hardware. See - :ref:`dv-bt-standards` for a list of standards. - - - .. row 8 - - - __u32 - - - ``capabilities`` - - - Several flags giving more information about the capabilities. See - :ref:`dv-bt-cap-capabilities` for a description of the flags. - - - .. row 9 - - - __u32 - - - ``reserved``\ [16] - - - Reserved for future extensions. Drivers must set the array to - zero. - - - -.. _v4l2-dv-timings-cap: + * - __u32 + - ``min_width`` + - Minimum width of the active video in pixels. + * - __u32 + - ``max_width`` + - Maximum width of the active video in pixels. + * - __u32 + - ``min_height`` + - Minimum height of the active video in lines. + * - __u32 + - ``max_height`` + - Maximum height of the active video in lines. + * - __u64 + - ``min_pixelclock`` + - Minimum pixelclock frequency in Hz. + * - __u64 + - ``max_pixelclock`` + - Maximum pixelclock frequency in Hz. + * - __u32 + - ``standards`` + - The video standard(s) supported by the hardware. See + :ref:`dv-bt-standards` for a list of standards. + * - __u32 + - ``capabilities`` + - Several flags giving more information about the capabilities. See + :ref:`dv-bt-cap-capabilities` for a description of the flags. + * - __u32 + - ``reserved``\ [16] + - Reserved for future extensions. + Drivers must set the array to zero. + + + +.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{3.5cm}|p{9.5cm}| + +.. c:type:: v4l2_dv_timings_cap .. flat-table:: struct v4l2_dv_timings_cap :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 1 - - - .. row 1 - - - __u32 - - - ``type`` - - - Type of DV timings as listed in :ref:`dv-timing-types`. - - - .. row 2 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media controller API. This field is - only used when operating on a subdevice node. When operating on a - video node applications must set this field to zero. - - - .. row 3 - - - __u32 - - - ``reserved``\ [2] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - - .. row 4 - - - union - - - - - - - - .. row 5 - - - - - struct :ref:`v4l2_bt_timings_cap <v4l2-bt-timings-cap>` - - - ``bt`` - - - BT.656/1120 timings capabilities of the hardware. - - - .. row 6 - - - - - __u32 - - - ``raw_data``\ [32] - - - - - + * - __u32 + - ``type`` + - Type of DV timings as listed in :ref:`dv-timing-types`. + * - __u32 + - ``pad`` + - Pad number as reported by the media controller API. This field is + only used when operating on a subdevice node. When operating on a + video node applications must set this field to zero. + * - __u32 + - ``reserved``\ [2] + - Reserved for future extensions. + + Drivers and applications must set the array to zero. + * - union + - + - + * - + - struct :c:type:`v4l2_bt_timings_cap` + - ``bt`` + - BT.656/1120 timings capabilities of the hardware. + * - + - __u32 + - ``raw_data``\ [32] + - + +.. tabularcolumns:: |p{7.0cm}|p{10.5cm}| .. _dv-bt-cap-capabilities: @@ -205,43 +139,20 @@ that doesn't support them will return an ``EINVAL`` error code. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - Flag - - - Description - - - .. row 2 - - - - - - - - .. row 3 - - - ``V4L2_DV_BT_CAP_INTERLACED`` - - - Interlaced formats are supported. - - - .. row 4 - - - ``V4L2_DV_BT_CAP_PROGRESSIVE`` - - - Progressive formats are supported. - - - .. row 5 - - - ``V4L2_DV_BT_CAP_REDUCED_BLANKING`` - - - CVT/GTF specific: the timings can make use of reduced blanking - (CVT) or the 'Secondary GTF' curve (GTF). - - - .. row 6 - - - ``V4L2_DV_BT_CAP_CUSTOM`` - - - Can support non-standard timings, i.e. timings not belonging to - the standards set in the ``standards`` field. + * - Flag + - Description + * - + - + * - ``V4L2_DV_BT_CAP_INTERLACED`` + - Interlaced formats are supported. + * - ``V4L2_DV_BT_CAP_PROGRESSIVE`` + - Progressive formats are supported. + * - ``V4L2_DV_BT_CAP_REDUCED_BLANKING`` + - CVT/GTF specific: the timings can make use of reduced blanking + (CVT) or the 'Secondary GTF' curve (GTF). + * - ``V4L2_DV_BT_CAP_CUSTOM`` + - Can support non-standard timings, i.e. timings not belonging to + the standards set in the ``standards`` field. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-encoder-cmd.rst b/Documentation/media/uapi/v4l/vidioc-encoder-cmd.rst index 69bd9b4e0e56..ae20ee573757 100644 --- a/Documentation/media/uapi/v4l/vidioc-encoder-cmd.rst +++ b/Documentation/media/uapi/v4l/vidioc-encoder-cmd.rst @@ -15,7 +15,11 @@ VIDIOC_ENCODER_CMD - VIDIOC_TRY_ENCODER_CMD - Execute an encoder command Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_encoder_cmd *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp ) + :name: VIDIOC_ENCODER_CMD + +.. c:function:: int ioctl( int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp ) + :name: VIDIOC_TRY_ENCODER_CMD Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMD - ``argp`` @@ -39,7 +40,7 @@ These ioctls control an audio/video (usually MPEG-) encoder. executing it. To send a command applications must initialize all fields of a struct -:ref:`v4l2_encoder_cmd <v4l2-encoder-cmd>` and call +:c:type:`v4l2_encoder_cmd` and call ``VIDIOC_ENCODER_CMD`` or ``VIDIOC_TRY_ENCODER_CMD`` with a pointer to this structure. @@ -64,42 +65,31 @@ These ioctls are optional, not all drivers may support them. They were introduced in Linux 2.6.21. -.. _v4l2-encoder-cmd: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_encoder_cmd .. flat-table:: struct v4l2_encoder_cmd :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - __u32 + - ``cmd`` + - The encoder command, see :ref:`encoder-cmds`. + * - __u32 + - ``flags`` + - Flags to go with the command, see :ref:`encoder-flags`. If no + flags are defined for this command, drivers and applications must + set this field to zero. + * - __u32 + - ``data``\ [8] + - Reserved for future extensions. Drivers and applications must set + the array to zero. - - .. row 1 - - - __u32 - - - ``cmd`` - - - The encoder command, see :ref:`encoder-cmds`. - - - .. row 2 - - - __u32 - - - ``flags`` - - - Flags to go with the command, see :ref:`encoder-flags`. If no - flags are defined for this command, drivers and applications must - set this field to zero. - - - .. row 3 - - - __u32 - - - ``data``\ [8] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _encoder-cmds: @@ -108,59 +98,40 @@ introduced in Linux 2.6.21. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_ENC_CMD_START`` - - - 0 - - - Start the encoder. When the encoder is already running or paused, - this command does nothing. No flags are defined for this command. - - - .. row 2 - - - ``V4L2_ENC_CMD_STOP`` - - - 1 - - - Stop the encoder. When the ``V4L2_ENC_CMD_STOP_AT_GOP_END`` flag - is set, encoding will continue until the end of the current *Group - Of Pictures*, otherwise encoding will stop immediately. When the - encoder is already stopped, this command does nothing. mem2mem - encoders will send a ``V4L2_EVENT_EOS`` event when the last frame - has been encoded and all frames are ready to be dequeued and will - set the ``V4L2_BUF_FLAG_LAST`` buffer flag on the last buffer of - the capture queue to indicate there will be no new buffers - produced to dequeue. This buffer may be empty, indicated by the - driver setting the ``bytesused`` field to 0. Once the - ``V4L2_BUF_FLAG_LAST`` flag was set, the - :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore, - but return an ``EPIPE`` error code. - - - .. row 3 - - - ``V4L2_ENC_CMD_PAUSE`` - - - 2 - - - Pause the encoder. When the encoder has not been started yet, the - driver will return an ``EPERM`` error code. When the encoder is - already paused, this command does nothing. No flags are defined - for this command. - - - .. row 4 - - - ``V4L2_ENC_CMD_RESUME`` - - - 3 - - - Resume encoding after a PAUSE command. When the encoder has not - been started yet, the driver will return an ``EPERM`` error code. When - the encoder is already running, this command does nothing. No - flags are defined for this command. - - + * - ``V4L2_ENC_CMD_START`` + - 0 + - Start the encoder. When the encoder is already running or paused, + this command does nothing. No flags are defined for this command. + * - ``V4L2_ENC_CMD_STOP`` + - 1 + - Stop the encoder. When the ``V4L2_ENC_CMD_STOP_AT_GOP_END`` flag + is set, encoding will continue until the end of the current *Group + Of Pictures*, otherwise encoding will stop immediately. When the + encoder is already stopped, this command does nothing. mem2mem + encoders will send a ``V4L2_EVENT_EOS`` event when the last frame + has been encoded and all frames are ready to be dequeued and will + set the ``V4L2_BUF_FLAG_LAST`` buffer flag on the last buffer of + the capture queue to indicate there will be no new buffers + produced to dequeue. This buffer may be empty, indicated by the + driver setting the ``bytesused`` field to 0. Once the + ``V4L2_BUF_FLAG_LAST`` flag was set, the + :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will not block anymore, + but return an ``EPIPE`` error code. + * - ``V4L2_ENC_CMD_PAUSE`` + - 2 + - Pause the encoder. When the encoder has not been started yet, the + driver will return an ``EPERM`` error code. When the encoder is + already paused, this command does nothing. No flags are defined + for this command. + * - ``V4L2_ENC_CMD_RESUME`` + - 3 + - Resume encoding after a PAUSE command. When the encoder has not + been started yet, the driver will return an ``EPERM`` error code. When + the encoder is already running, this command does nothing. No + flags are defined for this command. + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _encoder-flags: @@ -169,15 +140,10 @@ introduced in Linux 2.6.21. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_ENC_CMD_STOP_AT_GOP_END`` - - - 0x0001 - - - Stop encoding at the end of the current *Group Of Pictures*, - rather than immediately. + * - ``V4L2_ENC_CMD_STOP_AT_GOP_END`` + - 0x0001 + - Stop encoding at the end of the current *Group Of Pictures*, + rather than immediately. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst b/Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst index 3ba75d3fb93c..3e9d0f69cc73 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-dv-timings.rst @@ -15,7 +15,11 @@ VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Dig Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_enum_dv_timings *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) + :name: VIDIOC_ENUM_DV_TIMINGS + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) + :name: VIDIOC_SUBDEV_ENUM_DV_TIMINGS Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS - ``argp`` @@ -42,14 +43,16 @@ this list. To query the available timings, applications initialize the ``index`` field, set the ``pad`` field to 0, zero the reserved array of struct -:ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` and call the +:c:type:`v4l2_enum_dv_timings` and call the ``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all supported DV timings, applications shall begin at index zero, incrementing by one until the driver returns ``EINVAL``. -.. note:: Drivers may enumerate a different set of DV timings after +.. note:: + + Drivers may enumerate a different set of DV timings after switching the video input or output. When implemented by the driver DV timings of subdevices can be queried @@ -57,53 +60,35 @@ by calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a subdevice node. The DV timings are specific to inputs (for DV receivers) or outputs (for DV transmitters), applications must specify the desired pad number in the struct -:ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` ``pad`` field. +:c:type:`v4l2_enum_dv_timings` ``pad`` field. Attempts to enumerate timings on a pad that doesn't support them will return an ``EINVAL`` error code. -.. _v4l2-enum-dv-timings: +.. c:type:: v4l2_enum_dv_timings + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_enum_dv_timings :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Number of the DV timings, set by the application. - - - .. row 2 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media controller API. This field is - only used when operating on a subdevice node. When operating on a - video node applications must set this field to zero. - - - .. row 3 - - - __u32 - - - ``reserved``\ [2] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - - .. row 4 - - - struct :ref:`v4l2_dv_timings <v4l2-dv-timings>` - - - ``timings`` - - - The timings. + * - __u32 + - ``index`` + - Number of the DV timings, set by the application. + * - __u32 + - ``pad`` + - Pad number as reported by the media controller API. This field is + only used when operating on a subdevice node. When operating on a + video node applications must set this field to zero. + * - __u32 + - ``reserved``\ [2] + - Reserved for future extensions. Drivers and applications must set + the array to zero. + * - struct :c:type:`v4l2_dv_timings` + - ``timings`` + - The timings. Return Value @@ -114,7 +99,7 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` + The struct :c:type:`v4l2_enum_dv_timings` ``index`` is out of bounds or the ``pad`` number is invalid. ENODATA diff --git a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst index 90996f69d6ae..a2adaa4bd4dd 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-fmt.rst @@ -15,7 +15,8 @@ VIDIOC_ENUM_FMT - Enumerate image formats Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_fmtdesc *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUM_FMT, struct v4l2_fmtdesc *argp ) + :name: VIDIOC_ENUM_FMT Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUM_FMT - ``argp`` @@ -34,98 +32,73 @@ Description =========== To enumerate image formats applications initialize the ``type`` and -``index`` field of struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` and call +``index`` field of struct :c:type:`v4l2_fmtdesc` and call the :ref:`VIDIOC_ENUM_FMT` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code. All formats are enumerable by beginning at index zero and incrementing by one until ``EINVAL`` is returned. -.. note:: After switching input or output the list of enumerated image +.. note:: + + After switching input or output the list of enumerated image formats may be different. -.. _v4l2-fmtdesc: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_fmtdesc .. flat-table:: struct v4l2_fmtdesc :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Number of the format in the enumeration, set by the application. - This is in no way related to the ``pixelformat`` field. - - - .. row 2 - - - __u32 - - - ``type`` - - - Type of the data stream, set by the application. Only these types - are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``, - ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``, - ``V4L2_BUF_TYPE_VIDEO_OUTPUT``, - ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` and - ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`. - - - .. row 3 - - - __u32 - - - ``flags`` - - - See :ref:`fmtdesc-flags` - - - .. row 4 - - - __u8 - - - ``description``\ [32] - - - Description of the format, a NUL-terminated ASCII string. This - information is intended for the user, for example: "YUV 4:2:2". - - - .. row 5 - - - __u32 - - - ``pixelformat`` - - - The image format identifier. This is a four character code as - computed by the v4l2_fourcc() macro: - - - .. row 6 - - - :cspan:`2` - - - .. _v4l2-fourcc: - .. code-block:: c - - #define v4l2_fourcc(a,b,c,d) (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) - - Several image formats are already defined by this specification in - :ref:`pixfmt`. - - .. attention:: These codes are not the same as those used - in the Windows world. - - - .. row 7 - - - __u32 - - - ``reserved``\ [4] - - - Reserved for future extensions. Drivers must set the array to - zero. - - + * - __u32 + - ``index`` + - Number of the format in the enumeration, set by the application. + This is in no way related to the ``pixelformat`` field. + * - __u32 + - ``type`` + - Type of the data stream, set by the application. Only these types + are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``, + ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``, + ``V4L2_BUF_TYPE_VIDEO_OUTPUT``, + ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` and + ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :c:type:`v4l2_buf_type`. + * - __u32 + - ``flags`` + - See :ref:`fmtdesc-flags` + * - __u8 + - ``description``\ [32] + - Description of the format, a NUL-terminated ASCII string. This + information is intended for the user, for example: "YUV 4:2:2". + * - __u32 + - ``pixelformat`` + - The image format identifier. This is a four character code as + computed by the v4l2_fourcc() macro: + * - :cspan:`2` + + .. _v4l2-fourcc: + + ``#define v4l2_fourcc(a,b,c,d)`` + + ``(((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))`` + + Several image formats are already defined by this specification in + :ref:`pixfmt`. + + .. attention:: + + These codes are not the same as those used + in the Windows world. + * - __u32 + - ``reserved``\ [4] + - Reserved for future extensions. Drivers must set the array to + zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _fmtdesc-flags: @@ -134,24 +107,14 @@ one until ``EINVAL`` is returned. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_FMT_FLAG_COMPRESSED`` - - - 0x0001 - - - This is a compressed format. - - - .. row 2 - - - ``V4L2_FMT_FLAG_EMULATED`` - - - 0x0002 - - - This format is not native to the device but emulated through - software (usually libv4l2), where possible try to use a native - format instead for better performance. + * - ``V4L2_FMT_FLAG_COMPRESSED`` + - 0x0001 + - This is a compressed format. + * - ``V4L2_FMT_FLAG_EMULATED`` + - 0x0002 + - This format is not native to the device but emulated through + software (usually libv4l2), where possible try to use a native + format instead for better performance. Return Value @@ -162,5 +125,5 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` ``type`` is not + The struct :c:type:`v4l2_fmtdesc` ``type`` is not supported or the ``index`` is out of bounds. diff --git a/Documentation/media/uapi/v4l/vidioc-enum-frameintervals.rst b/Documentation/media/uapi/v4l/vidioc-enum-frameintervals.rst index ceae6003039e..39492453f02d 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-frameintervals.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-frameintervals.rst @@ -15,7 +15,8 @@ VIDIOC_ENUM_FRAMEINTERVALS - Enumerate frame intervals Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frmivalenum *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUM_FRAMEINTERVALS, struct v4l2_frmivalenum *argp ) + :name: VIDIOC_ENUM_FRAMEINTERVALS Arguments @@ -24,11 +25,8 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUM_FRAMEINTERVALS - ``argp`` - Pointer to a struct :ref:`v4l2_frmivalenum <v4l2-frmivalenum>` + Pointer to a struct :c:type:`v4l2_frmivalenum` structure that contains a pixel format and size and receives a frame interval. @@ -73,7 +71,9 @@ the device supports. Only for the ``V4L2_FRMIVAL_TYPE_DISCRETE`` type does it make sense to increase the index value to receive more frame intervals. -.. note:: The order in which the frame intervals are returned has no +.. note:: + + The order in which the frame intervals are returned has no special meaning. In particular does it not say anything about potential default frame intervals. @@ -101,127 +101,70 @@ the application, *OUT* denotes values that the driver fills in. The application should zero out all members except for the *IN* fields. -.. _v4l2-frmival-stepwise: +.. c:type:: v4l2_frmival_stepwise + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_frmival_stepwise :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``min`` - - - Minimum frame interval [s]. - - - .. row 2 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``max`` - - - Maximum frame interval [s]. - - - .. row 3 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``step`` - - - Frame interval step size [s]. + * - struct :c:type:`v4l2_fract` + - ``min`` + - Minimum frame interval [s]. + * - struct :c:type:`v4l2_fract` + - ``max`` + - Maximum frame interval [s]. + * - struct :c:type:`v4l2_fract` + - ``step`` + - Frame interval step size [s]. -.. _v4l2-frmivalenum: +.. c:type:: v4l2_frmivalenum .. flat-table:: struct v4l2_frmivalenum :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - __u32 - - - ``index`` - - - - - IN: Index of the given frame interval in the enumeration. - - - .. row 2 - - - __u32 - - - ``pixel_format`` - - - - - IN: Pixel format for which the frame intervals are enumerated. - - - .. row 3 - - - __u32 - - - ``width`` - - - - - IN: Frame width for which the frame intervals are enumerated. - - - .. row 4 - - - __u32 - - - ``height`` - - - - - IN: Frame height for which the frame intervals are enumerated. - - - .. row 5 - - - __u32 - - - ``type`` - - - - - OUT: Frame interval type the device supports. - - - .. row 6 - - - union - - - - - - - OUT: Frame interval with the given index. - - - .. row 7 - - - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``discrete`` - - - Frame interval [s]. - - - .. row 8 - - - - - struct :ref:`v4l2_frmival_stepwise <v4l2-frmival-stepwise>` - - - ``stepwise`` - - - - - - .. row 9 - - - __u32 - - - ``reserved[2]`` - - - - - Reserved space for future use. Must be zeroed by drivers and - applications. + * - __u32 + - ``index`` + - + - IN: Index of the given frame interval in the enumeration. + * - __u32 + - ``pixel_format`` + - + - IN: Pixel format for which the frame intervals are enumerated. + * - __u32 + - ``width`` + - + - IN: Frame width for which the frame intervals are enumerated. + * - __u32 + - ``height`` + - + - IN: Frame height for which the frame intervals are enumerated. + * - __u32 + - ``type`` + - + - OUT: Frame interval type the device supports. + * - union + - + - + - OUT: Frame interval with the given index. + * - + - struct :c:type:`v4l2_fract` + - ``discrete`` + - Frame interval [s]. + * - + - struct :c:type:`v4l2_frmival_stepwise` + - ``stepwise`` + - + * - __u32 + - ``reserved[2]`` + - + - Reserved space for future use. Must be zeroed by drivers and + applications. @@ -229,37 +172,24 @@ Enums ===== -.. _v4l2-frmivaltypes: +.. c:type:: v4l2_frmivaltypes + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. flat-table:: enum v4l2_frmivaltypes :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_FRMIVAL_TYPE_DISCRETE`` - - - 1 - - - Discrete frame interval. - - - .. row 2 - - - ``V4L2_FRMIVAL_TYPE_CONTINUOUS`` - - - 2 - - - Continuous frame interval. - - - .. row 3 - - - ``V4L2_FRMIVAL_TYPE_STEPWISE`` - - - 3 - - - Step-wise defined frame interval. + * - ``V4L2_FRMIVAL_TYPE_DISCRETE`` + - 1 + - Discrete frame interval. + * - ``V4L2_FRMIVAL_TYPE_CONTINUOUS`` + - 2 + - Continuous frame interval. + * - ``V4L2_FRMIVAL_TYPE_STEPWISE`` + - 3 + - Step-wise defined frame interval. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst b/Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst index 8b268354d442..628f1aa66338 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-framesizes.rst @@ -15,7 +15,8 @@ VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frmsizeenum *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUM_FRAMESIZES, struct v4l2_frmsizeenum *argp ) + :name: VIDIOC_ENUM_FRAMESIZES Arguments @@ -24,11 +25,8 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUM_FRAMESIZES - ``argp`` - Pointer to a struct :ref:`v4l2_frmsizeenum <v4l2-frmsizeenum>` + Pointer to a struct :c:type:`v4l2_frmsizeenum` that contains an index and pixel format and receives a frame width and height. @@ -72,7 +70,9 @@ the ``type`` field to determine the type of frame size enumeration the device supports. Only for the ``V4L2_FRMSIZE_TYPE_DISCRETE`` type does it make sense to increase the index value to receive more frame sizes. -.. note:: The order in which the frame sizes are returned has no special +.. note:: + + The order in which the frame sizes are returned has no special meaning. In particular does it not say anything about potential default format sizes. @@ -90,159 +90,89 @@ the application, *OUT* denotes values that the driver fills in. The application should zero out all members except for the *IN* fields. -.. _v4l2-frmsize-discrete: +.. c:type:: v4l2_frmsize_discrete + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_frmsize_discrete :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - __u32 + - ``width`` + - Width of the frame [pixel]. + * - __u32 + - ``height`` + - Height of the frame [pixel]. - - .. row 1 - - - __u32 - - - ``width`` - - - Width of the frame [pixel]. - - - .. row 2 - - - __u32 - - - ``height`` - - - Height of the frame [pixel]. +.. c:type:: v4l2_frmsize_stepwise -.. _v4l2-frmsize-stepwise: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_frmsize_stepwise :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``min_width`` - - - Minimum frame width [pixel]. - - - .. row 2 - - - __u32 - - - ``max_width`` - - - Maximum frame width [pixel]. - - - .. row 3 - - - __u32 - - - ``step_width`` - - - Frame width step size [pixel]. - - - .. row 4 - - - __u32 - - - ``min_height`` - - - Minimum frame height [pixel]. - - - .. row 5 - - - __u32 - - - ``max_height`` - - - Maximum frame height [pixel]. - - - .. row 6 - - - __u32 - - - ``step_height`` - - - Frame height step size [pixel]. - - - -.. _v4l2-frmsizeenum: + * - __u32 + - ``min_width`` + - Minimum frame width [pixel]. + * - __u32 + - ``max_width`` + - Maximum frame width [pixel]. + * - __u32 + - ``step_width`` + - Frame width step size [pixel]. + * - __u32 + - ``min_height`` + - Minimum frame height [pixel]. + * - __u32 + - ``max_height`` + - Maximum frame height [pixel]. + * - __u32 + - ``step_height`` + - Frame height step size [pixel]. + + + +.. c:type:: v4l2_frmsizeenum .. flat-table:: struct v4l2_frmsizeenum :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - __u32 - - - ``index`` - - - - - IN: Index of the given frame size in the enumeration. - - - .. row 2 - - - __u32 - - - ``pixel_format`` - - - - - IN: Pixel format for which the frame sizes are enumerated. - - - .. row 3 - - - __u32 - - - ``type`` - - - - - OUT: Frame size type the device supports. - - - .. row 4 - - - union - - - - - - - OUT: Frame size with the given index. - - - .. row 5 - - - - - struct :ref:`v4l2_frmsize_discrete <v4l2-frmsize-discrete>` - - - ``discrete`` - - - - - - .. row 6 - - - - - struct :ref:`v4l2_frmsize_stepwise <v4l2-frmsize-stepwise>` - - - ``stepwise`` - - - - - - .. row 7 - - - __u32 - - - ``reserved[2]`` - - - - - Reserved space for future use. Must be zeroed by drivers and - applications. + * - __u32 + - ``index`` + - + - IN: Index of the given frame size in the enumeration. + * - __u32 + - ``pixel_format`` + - + - IN: Pixel format for which the frame sizes are enumerated. + * - __u32 + - ``type`` + - + - OUT: Frame size type the device supports. + * - union + - + - + - OUT: Frame size with the given index. + * - + - struct :c:type:`v4l2_frmsize_discrete` + - ``discrete`` + - + * - + - struct :c:type:`v4l2_frmsize_stepwise` + - ``stepwise`` + - + * - __u32 + - ``reserved[2]`` + - + - Reserved space for future use. Must be zeroed by drivers and + applications. @@ -250,37 +180,24 @@ Enums ===== -.. _v4l2-frmsizetypes: +.. c:type:: v4l2_frmsizetypes + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. flat-table:: enum v4l2_frmsizetypes :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_FRMSIZE_TYPE_DISCRETE`` - - - 1 - - - Discrete frame size. - - - .. row 2 - - - ``V4L2_FRMSIZE_TYPE_CONTINUOUS`` - - - 2 - - - Continuous frame size. - - - .. row 3 - - - ``V4L2_FRMSIZE_TYPE_STEPWISE`` - - - 3 - - - Step-wise defined frame size. + * - ``V4L2_FRMSIZE_TYPE_DISCRETE`` + - 1 + - Discrete frame size. + * - ``V4L2_FRMSIZE_TYPE_CONTINUOUS`` + - 2 + - Continuous frame size. + * - ``V4L2_FRMSIZE_TYPE_STEPWISE`` + - 3 + - Step-wise defined frame size. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst b/Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst index 00ab5e19cc1d..4e5f5e5bf632 100644 --- a/Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst +++ b/Documentation/media/uapi/v4l/vidioc-enum-freq-bands.rst @@ -15,7 +15,8 @@ VIDIOC_ENUM_FREQ_BANDS - Enumerate supported frequency bands Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frequency_band *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp ) + :name: VIDIOC_ENUM_FREQ_BANDS Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUM_FREQ_BANDS - ``argp`` @@ -36,116 +34,83 @@ Description Enumerates the frequency bands that a tuner or modulator supports. To do this applications initialize the ``tuner``, ``type`` and ``index`` fields, and zero out the ``reserved`` array of a struct -:ref:`v4l2_frequency_band <v4l2-frequency-band>` and call the +:c:type:`v4l2_frequency_band` and call the :ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a pointer to this structure. This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability of the corresponding tuner/modulator is set. -.. _v4l2-frequency-band: +.. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| + +.. c:type:: v4l2_frequency_band .. flat-table:: struct v4l2_frequency_band :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 1 1 - - - .. row 1 - - - __u32 - - - ``tuner`` - - - The tuner or modulator index number. This is the same value as in - the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and - the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or - the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field - and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index`` - field. - - - .. row 2 - - - __u32 - - - ``type`` - - - The tuner type. This is the same value as in the struct - :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be - set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and - to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to - ``V4L2_TUNER_RADIO`` for modulators (currently only radio - modulators are supported). See :ref:`v4l2-tuner-type` - - - .. row 3 - - - __u32 - - - ``index`` - - - Identifies the frequency band, set by the application. - - - .. row 4 - - - __u32 - - - ``capability`` - - - :cspan:`2` The tuner/modulator capability flags for this - frequency band, see :ref:`tuner-capability`. The - ``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER_CAP_1HZ`` capability must - be the same for all frequency bands of the selected - tuner/modulator. So either all bands have that capability set, or - none of them have that capability. - - - .. row 5 - - - __u32 - - - ``rangelow`` - - - :cspan:`2` The lowest tunable frequency in units of 62.5 kHz, or - if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units - of 62.5 Hz, for this frequency band. A 1 Hz unit is used when the - ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. - - - .. row 6 - - - __u32 - - - ``rangehigh`` - - - :cspan:`2` The highest tunable frequency in units of 62.5 kHz, - or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in - units of 62.5 Hz, for this frequency band. A 1 Hz unit is used - when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. - - - .. row 7 - - - __u32 - - - ``modulation`` - - - :cspan:`2` The supported modulation systems of this frequency - band. See :ref:`band-modulation`. - - .. note:: Currently only one modulation system per frequency band - is supported. More work will need to be done if multiple - modulation systems are possible. Contact the linux-media - mailing list - (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__) - if you need such functionality. - - - .. row 8 - - - __u32 - - - ``reserved``\ [9] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. - - + * - __u32 + - ``tuner`` + - The tuner or modulator index number. This is the same value as in + the struct :c:type:`v4l2_input` ``tuner`` field and + the struct :c:type:`v4l2_tuner` ``index`` field, or + the struct :c:type:`v4l2_output` ``modulator`` field + and the struct :c:type:`v4l2_modulator` ``index`` + field. + * - __u32 + - ``type`` + - The tuner type. This is the same value as in the struct + :c:type:`v4l2_tuner` ``type`` field. The type must be + set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and + to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to + ``V4L2_TUNER_RADIO`` for modulators (currently only radio + modulators are supported). See :c:type:`v4l2_tuner_type` + * - __u32 + - ``index`` + - Identifies the frequency band, set by the application. + * - __u32 + - ``capability`` + - :cspan:`2` The tuner/modulator capability flags for this + frequency band, see :ref:`tuner-capability`. The + ``V4L2_TUNER_CAP_LOW`` or ``V4L2_TUNER_CAP_1HZ`` capability must + be the same for all frequency bands of the selected + tuner/modulator. So either all bands have that capability set, or + none of them have that capability. + * - __u32 + - ``rangelow`` + - :cspan:`2` The lowest tunable frequency in units of 62.5 kHz, or + if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units + of 62.5 Hz, for this frequency band. A 1 Hz unit is used when the + ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. + * - __u32 + - ``rangehigh`` + - :cspan:`2` The highest tunable frequency in units of 62.5 kHz, + or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in + units of 62.5 Hz, for this frequency band. A 1 Hz unit is used + when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. + * - __u32 + - ``modulation`` + - :cspan:`2` The supported modulation systems of this frequency + band. See :ref:`band-modulation`. + + .. note:: + + Currently only one modulation system per frequency band + is supported. More work will need to be done if multiple + modulation systems are possible. Contact the linux-media + mailing list + (`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__) + if you need such functionality. + * - __u32 + - ``reserved``\ [9] + - Reserved for future extensions. + + Applications and drivers must set the array to zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _band-modulation: @@ -154,30 +119,15 @@ of the corresponding tuner/modulator is set. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_BAND_MODULATION_VSB`` - - - 0x02 - - - Vestigial Sideband modulation, used for analog TV. - - - .. row 2 - - - ``V4L2_BAND_MODULATION_FM`` - - - 0x04 - - - Frequency Modulation, commonly used for analog radio. - - - .. row 3 - - - ``V4L2_BAND_MODULATION_AM`` - - - 0x08 - - - Amplitude Modulation, commonly used for analog radio. + * - ``V4L2_BAND_MODULATION_VSB`` + - 0x02 + - Vestigial Sideband modulation, used for analog TV. + * - ``V4L2_BAND_MODULATION_FM`` + - 0x04 + - Frequency Modulation, commonly used for analog radio. + * - ``V4L2_BAND_MODULATION_AM`` + - 0x08 + - Amplitude Modulation, commonly used for analog radio. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-enumaudio.rst b/Documentation/media/uapi/v4l/vidioc-enumaudio.rst index bfdc3533240d..74bc3ed0bdd8 100644 --- a/Documentation/media/uapi/v4l/vidioc-enumaudio.rst +++ b/Documentation/media/uapi/v4l/vidioc-enumaudio.rst @@ -15,7 +15,8 @@ VIDIOC_ENUMAUDIO - Enumerate audio inputs Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audio *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp ) + :name: VIDIOC_ENUMAUDIO Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUMAUDIO - ``argp`` @@ -35,14 +33,14 @@ Description To query the attributes of an audio input applications initialize the ``index`` field and zero out the ``reserved`` array of a struct -:ref:`v4l2_audio <v4l2-audio>` and call the :ref:`VIDIOC_ENUMAUDIO` +:c:type:`v4l2_audio` and call the :ref:`VIDIOC_ENUMAUDIO` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all audio inputs applications shall begin at index zero, incrementing by one until the driver returns ``EINVAL``. See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct -:ref:`v4l2_audio <v4l2-audio>`. +:c:type:`v4l2_audio`. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-enumaudioout.rst b/Documentation/media/uapi/v4l/vidioc-enumaudioout.rst index cde1db55834f..4470a1ece5cf 100644 --- a/Documentation/media/uapi/v4l/vidioc-enumaudioout.rst +++ b/Documentation/media/uapi/v4l/vidioc-enumaudioout.rst @@ -15,7 +15,8 @@ VIDIOC_ENUMAUDOUT - Enumerate audio outputs Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audioout *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp ) + :name: VIDIOC_ENUMAUDOUT Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUMAUDOUT - ``argp`` @@ -35,17 +33,19 @@ Description To query the attributes of an audio output applications initialize the ``index`` field and zero out the ``reserved`` array of a struct -:ref:`v4l2_audioout <v4l2-audioout>` and call the ``VIDIOC_G_AUDOUT`` +:c:type:`v4l2_audioout` and call the ``VIDIOC_G_AUDOUT`` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all audio outputs applications shall begin at index zero, incrementing by one until the driver returns ``EINVAL``. -.. note:: Connectors on a TV card to loop back the received audio signal +.. note:: + + Connectors on a TV card to loop back the received audio signal to a sound card are not audio outputs in this sense. See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct -:ref:`v4l2_audioout <v4l2-audioout>`. +:c:type:`v4l2_audioout`. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-enuminput.rst b/Documentation/media/uapi/v4l/vidioc-enuminput.rst index 5060f54e3d18..17aaaf939757 100644 --- a/Documentation/media/uapi/v4l/vidioc-enuminput.rst +++ b/Documentation/media/uapi/v4l/vidioc-enuminput.rst @@ -15,7 +15,8 @@ VIDIOC_ENUMINPUT - Enumerate video inputs Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_input *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUMINPUT, struct v4l2_input *argp ) + :name: VIDIOC_ENUMINPUT Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUMINPUT - ``argp`` @@ -34,119 +32,78 @@ Description =========== To query the attributes of a video input applications initialize the -``index`` field of struct :ref:`v4l2_input <v4l2-input>` and call the +``index`` field of struct :c:type:`v4l2_input` and call the :ref:`VIDIOC_ENUMINPUT` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all inputs applications shall begin at index zero, incrementing by one until the driver returns ``EINVAL``. -.. _v4l2-input: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_input .. flat-table:: struct v4l2_input :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Identifies the input, set by the application. - - - .. row 2 - - - __u8 - - - ``name``\ [32] - - - Name of the video input, a NUL-terminated ASCII string, for - example: "Vin (Composite 2)". This information is intended for the - user, preferably the connector label on the device itself. - - - .. row 3 - - - __u32 - - - ``type`` - - - Type of the input, see :ref:`input-type`. - - - .. row 4 - - - __u32 - - - ``audioset`` - - - Drivers can enumerate up to 32 video and audio inputs. This field - shows which audio inputs were selectable as audio source if this - was the currently selected video input. It is a bit mask. The LSB - corresponds to audio input 0, the MSB to input 31. Any number of - bits can be set, or none. - - When the driver does not enumerate audio inputs no bits must be - set. Applications shall not interpret this as lack of audio - support. Some drivers automatically select audio sources and do - not enumerate them since there is no choice anyway. - - For details on audio inputs and how to select the current input - see :ref:`audio`. - - - .. row 5 - - - __u32 - - - ``tuner`` - - - Capture devices can have zero or more tuners (RF demodulators). - When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an - RF connector and this field identifies the tuner. It corresponds - to struct :ref:`v4l2_tuner <v4l2-tuner>` field ``index``. For - details on tuners see :ref:`tuner`. - - - .. row 6 - - - :ref:`v4l2_std_id <v4l2-std-id>` - - - ``std`` - - - Every video input supports one or more different video standards. - This field is a set of all supported standards. For details on - video standards and how to switch see :ref:`standard`. - - - .. row 7 - - - __u32 - - - ``status`` - - - This field provides status information about the input. See - :ref:`input-status` for flags. With the exception of the sensor - orientation bits ``status`` is only valid when this is the current - input. - - - .. row 8 - - - __u32 - - - ``capabilities`` - - - This field provides capabilities for the input. See - :ref:`input-capabilities` for flags. - - - .. row 9 - - - __u32 - - - ``reserved``\ [3] - - - Reserved for future extensions. Drivers must set the array to - zero. - - + * - __u32 + - ``index`` + - Identifies the input, set by the application. + * - __u8 + - ``name``\ [32] + - Name of the video input, a NUL-terminated ASCII string, for + example: "Vin (Composite 2)". This information is intended for the + user, preferably the connector label on the device itself. + * - __u32 + - ``type`` + - Type of the input, see :ref:`input-type`. + * - __u32 + - ``audioset`` + - Drivers can enumerate up to 32 video and audio inputs. This field + shows which audio inputs were selectable as audio source if this + was the currently selected video input. It is a bit mask. The LSB + corresponds to audio input 0, the MSB to input 31. Any number of + bits can be set, or none. + + When the driver does not enumerate audio inputs no bits must be + set. Applications shall not interpret this as lack of audio + support. Some drivers automatically select audio sources and do + not enumerate them since there is no choice anyway. + + For details on audio inputs and how to select the current input + see :ref:`audio`. + * - __u32 + - ``tuner`` + - Capture devices can have zero or more tuners (RF demodulators). + When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an + RF connector and this field identifies the tuner. It corresponds + to struct :c:type:`v4l2_tuner` field ``index``. For + details on tuners see :ref:`tuner`. + * - :ref:`v4l2_std_id <v4l2-std-id>` + - ``std`` + - Every video input supports one or more different video standards. + This field is a set of all supported standards. For details on + video standards and how to switch see :ref:`standard`. + * - __u32 + - ``status`` + - This field provides status information about the input. See + :ref:`input-status` for flags. With the exception of the sensor + orientation bits ``status`` is only valid when this is the current + input. + * - __u32 + - ``capabilities`` + - This field provides capabilities for the input. See + :ref:`input-capabilities` for flags. + * - __u32 + - ``reserved``\ [3] + - Reserved for future extensions. Drivers must set the array to + zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _input-type: @@ -155,25 +112,20 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. :stub-columns: 0 :widths: 3 1 4 + * - ``V4L2_INPUT_TYPE_TUNER`` + - 1 + - This input uses a tuner (RF demodulator). + * - ``V4L2_INPUT_TYPE_CAMERA`` + - 2 + - Analog baseband input, for example CVBS / Composite Video, + S-Video, RGB. + * - ``V4L2_INPUT_TYPE_TOUCH`` + - 3 + - This input is a touch device for capturing raw touch data. - - .. row 1 - - - ``V4L2_INPUT_TYPE_TUNER`` - - - 1 - - - This input uses a tuner (RF demodulator). - - - .. row 2 - - - ``V4L2_INPUT_TYPE_CAMERA`` - - - 2 - - - Analog baseband input, for example CVBS / Composite Video, - S-Video, RGB. +.. tabularcolumns:: |p{4.8cm}|p{2.6cm}|p{10.1cm}| .. _input-status: @@ -181,142 +133,71 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - :cspan:`2` General - - - .. row 2 - - - ``V4L2_IN_ST_NO_POWER`` - - - 0x00000001 - - - Attached device is off. - - - .. row 3 - - - ``V4L2_IN_ST_NO_SIGNAL`` - - - 0x00000002 - - - - - - .. row 4 - - - ``V4L2_IN_ST_NO_COLOR`` - - - 0x00000004 - - - The hardware supports color decoding, but does not detect color - modulation in the signal. - - - .. row 5 - - - :cspan:`2` Sensor Orientation - - - .. row 6 - - - ``V4L2_IN_ST_HFLIP`` - - - 0x00000010 - - - The input is connected to a device that produces a signal that is - flipped horizontally and does not correct this before passing the - signal to userspace. - - - .. row 7 - - - ``V4L2_IN_ST_VFLIP`` - - - 0x00000020 - - - The input is connected to a device that produces a signal that is - flipped vertically and does not correct this before passing the - signal to userspace. - .. note:: A 180 degree rotation is the same as HFLIP | VFLIP - - - .. row 8 - - - :cspan:`2` Analog Video - - - .. row 9 - - - ``V4L2_IN_ST_NO_H_LOCK`` - - - 0x00000100 - - - No horizontal sync lock. - - - .. row 10 - - - ``V4L2_IN_ST_COLOR_KILL`` - - - 0x00000200 - - - A color killer circuit automatically disables color decoding when - it detects no color modulation. When this flag is set the color - killer is enabled *and* has shut off color decoding. - - - .. row 11 - - - :cspan:`2` Digital Video - - - .. row 12 - - - ``V4L2_IN_ST_NO_SYNC`` - - - 0x00010000 - - - No synchronization lock. - - - .. row 13 - - - ``V4L2_IN_ST_NO_EQU`` - - - 0x00020000 - - - No equalizer lock. - - - .. row 14 - - - ``V4L2_IN_ST_NO_CARRIER`` - - - 0x00040000 - - - Carrier recovery failed. - - - .. row 15 - - - :cspan:`2` VCR and Set-Top Box - - - .. row 16 - - - ``V4L2_IN_ST_MACROVISION`` - - - 0x01000000 - - - Macrovision is an analog copy prevention system mangling the video - signal to confuse video recorders. When this flag is set - Macrovision has been detected. - - - .. row 17 - - - ``V4L2_IN_ST_NO_ACCESS`` - - - 0x02000000 - - - Conditional access denied. - - - .. row 18 - - - ``V4L2_IN_ST_VTR`` - - - 0x04000000 - - - VTR time constant. [?] - - + * - :cspan:`2` General + * - ``V4L2_IN_ST_NO_POWER`` + - 0x00000001 + - Attached device is off. + * - ``V4L2_IN_ST_NO_SIGNAL`` + - 0x00000002 + - + * - ``V4L2_IN_ST_NO_COLOR`` + - 0x00000004 + - The hardware supports color decoding, but does not detect color + modulation in the signal. + * - :cspan:`2` Sensor Orientation + * - ``V4L2_IN_ST_HFLIP`` + - 0x00000010 + - The input is connected to a device that produces a signal that is + flipped horizontally and does not correct this before passing the + signal to userspace. + * - ``V4L2_IN_ST_VFLIP`` + - 0x00000020 + - The input is connected to a device that produces a signal that is + flipped vertically and does not correct this before passing the + signal to userspace. + .. note:: A 180 degree rotation is the same as HFLIP | VFLIP + * - :cspan:`2` Analog Video + * - ``V4L2_IN_ST_NO_H_LOCK`` + - 0x00000100 + - No horizontal sync lock. + * - ``V4L2_IN_ST_COLOR_KILL`` + - 0x00000200 + - A color killer circuit automatically disables color decoding when + it detects no color modulation. When this flag is set the color + killer is enabled *and* has shut off color decoding. + * - ``V4L2_IN_ST_NO_V_LOCK`` + - 0x00000400 + - No vertical sync lock. + * - ``V4L2_IN_ST_NO_STD_LOCK`` + - 0x00000800 + - No standard format lock in case of auto-detection format + by the component. + * - :cspan:`2` Digital Video + * - ``V4L2_IN_ST_NO_SYNC`` + - 0x00010000 + - No synchronization lock. + * - ``V4L2_IN_ST_NO_EQU`` + - 0x00020000 + - No equalizer lock. + * - ``V4L2_IN_ST_NO_CARRIER`` + - 0x00040000 + - Carrier recovery failed. + * - :cspan:`2` VCR and Set-Top Box + * - ``V4L2_IN_ST_MACROVISION`` + - 0x01000000 + - Macrovision is an analog copy prevention system mangling the video + signal to confuse video recorders. When this flag is set + Macrovision has been detected. + * - ``V4L2_IN_ST_NO_ACCESS`` + - 0x02000000 + - Conditional access denied. + * - ``V4L2_IN_ST_VTR`` + - 0x04000000 + - VTR time constant. [?] + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _input-capabilities: @@ -325,34 +206,19 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_IN_CAP_DV_TIMINGS`` - - - 0x00000002 - - - This input supports setting video timings by using - VIDIOC_S_DV_TIMINGS. - - - .. row 2 - - - ``V4L2_IN_CAP_STD`` - - - 0x00000004 - - - This input supports setting the TV standard by using - VIDIOC_S_STD. - - - .. row 3 - - - ``V4L2_IN_CAP_NATIVE_SIZE`` - - - 0x00000008 - - - This input supports setting the native size using the - ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see - :ref:`v4l2-selections-common`. + * - ``V4L2_IN_CAP_DV_TIMINGS`` + - 0x00000002 + - This input supports setting video timings by using + VIDIOC_S_DV_TIMINGS. + * - ``V4L2_IN_CAP_STD`` + - 0x00000004 + - This input supports setting the TV standard by using + VIDIOC_S_STD. + * - ``V4L2_IN_CAP_NATIVE_SIZE`` + - 0x00000008 + - This input supports setting the native size using the + ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see + :ref:`v4l2-selections-common`. Return Value @@ -363,5 +229,5 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_input <v4l2-input>` ``index`` is out of + The struct :c:type:`v4l2_input` ``index`` is out of bounds. diff --git a/Documentation/media/uapi/v4l/vidioc-enumoutput.rst b/Documentation/media/uapi/v4l/vidioc-enumoutput.rst index 82fc9d3b237f..d7dd2742475a 100644 --- a/Documentation/media/uapi/v4l/vidioc-enumoutput.rst +++ b/Documentation/media/uapi/v4l/vidioc-enumoutput.rst @@ -15,7 +15,8 @@ VIDIOC_ENUMOUTPUT - Enumerate video outputs Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_output *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp ) + :name: VIDIOC_ENUMOUTPUT Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUMOUTPUT - ``argp`` @@ -34,7 +32,7 @@ Description =========== To query the attributes of a video outputs applications initialize the -``index`` field of struct :ref:`v4l2_output <v4l2-output>` and call +``index`` field of struct :c:type:`v4l2_output` and call the :ref:`VIDIOC_ENUMOUTPUT` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all outputs applications @@ -42,101 +40,65 @@ shall begin at index zero, incrementing by one until the driver returns EINVAL. -.. _v4l2-output: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_output .. flat-table:: struct v4l2_output :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Identifies the output, set by the application. - - - .. row 2 - - - __u8 - - - ``name``\ [32] - - - Name of the video output, a NUL-terminated ASCII string, for - example: "Vout". This information is intended for the user, - preferably the connector label on the device itself. - - - .. row 3 - - - __u32 - - - ``type`` - - - Type of the output, see :ref:`output-type`. - - - .. row 4 - - - __u32 - - - ``audioset`` - - - Drivers can enumerate up to 32 video and audio outputs. This field - shows which audio outputs were selectable as the current output if - this was the currently selected video output. It is a bit mask. - The LSB corresponds to audio output 0, the MSB to output 31. Any - number of bits can be set, or none. - - When the driver does not enumerate audio outputs no bits must be - set. Applications shall not interpret this as lack of audio - support. Drivers may automatically select audio outputs without - enumerating them. - - For details on audio outputs and how to select the current output - see :ref:`audio`. - - - .. row 5 - - - __u32 - - - ``modulator`` - - - Output devices can have zero or more RF modulators. When the - ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector - and this field identifies the modulator. It corresponds to struct - :ref:`v4l2_modulator <v4l2-modulator>` field ``index``. For - details on modulators see :ref:`tuner`. - - - .. row 6 - - - :ref:`v4l2_std_id <v4l2-std-id>` - - - ``std`` - - - Every video output supports one or more different video standards. - This field is a set of all supported standards. For details on - video standards and how to switch see :ref:`standard`. - - - .. row 7 - - - __u32 - - - ``capabilities`` - - - This field provides capabilities for the output. See - :ref:`output-capabilities` for flags. - - - .. row 8 - - - __u32 - - - ``reserved``\ [3] - - - Reserved for future extensions. Drivers must set the array to - zero. - - + * - __u32 + - ``index`` + - Identifies the output, set by the application. + * - __u8 + - ``name``\ [32] + - Name of the video output, a NUL-terminated ASCII string, for + example: "Vout". This information is intended for the user, + preferably the connector label on the device itself. + * - __u32 + - ``type`` + - Type of the output, see :ref:`output-type`. + * - __u32 + - ``audioset`` + - Drivers can enumerate up to 32 video and audio outputs. This field + shows which audio outputs were selectable as the current output if + this was the currently selected video output. It is a bit mask. + The LSB corresponds to audio output 0, the MSB to output 31. Any + number of bits can be set, or none. + + When the driver does not enumerate audio outputs no bits must be + set. Applications shall not interpret this as lack of audio + support. Drivers may automatically select audio outputs without + enumerating them. + + For details on audio outputs and how to select the current output + see :ref:`audio`. + * - __u32 + - ``modulator`` + - Output devices can have zero or more RF modulators. When the + ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector + and this field identifies the modulator. It corresponds to struct + :c:type:`v4l2_modulator` field ``index``. For + details on modulators see :ref:`tuner`. + * - :ref:`v4l2_std_id <v4l2-std-id>` + - ``std`` + - Every video output supports one or more different video standards. + This field is a set of all supported standards. For details on + video standards and how to switch see :ref:`standard`. + * - __u32 + - ``capabilities`` + - This field provides capabilities for the output. See + :ref:`output-capabilities` for flags. + * - __u32 + - ``reserved``\ [3] + - Reserved for future extensions. Drivers must set the array to + zero. + + + +.. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}| .. _output-type: @@ -145,33 +107,20 @@ EINVAL. :stub-columns: 0 :widths: 3 1 4 + * - ``V4L2_OUTPUT_TYPE_MODULATOR`` + - 1 + - This output is an analog TV modulator. + * - ``V4L2_OUTPUT_TYPE_ANALOG`` + - 2 + - Analog baseband output, for example Composite / CVBS, S-Video, + RGB. + * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY`` + - 3 + - [?] - - .. row 1 - - - ``V4L2_OUTPUT_TYPE_MODULATOR`` - - - 1 - - - This output is an analog TV modulator. - - - .. row 2 - - - ``V4L2_OUTPUT_TYPE_ANALOG`` - - - 2 - - - Analog baseband output, for example Composite / CVBS, S-Video, - RGB. - - - .. row 3 - - - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY`` - - - 3 - - - [?] +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _output-capabilities: @@ -180,34 +129,19 @@ EINVAL. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_OUT_CAP_DV_TIMINGS`` - - - 0x00000002 - - - This output supports setting video timings by using - VIDIOC_S_DV_TIMINGS. - - - .. row 2 - - - ``V4L2_OUT_CAP_STD`` - - - 0x00000004 - - - This output supports setting the TV standard by using - VIDIOC_S_STD. - - - .. row 3 - - - ``V4L2_OUT_CAP_NATIVE_SIZE`` - - - 0x00000008 - - - This output supports setting the native size using the - ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see - :ref:`v4l2-selections-common`. + * - ``V4L2_OUT_CAP_DV_TIMINGS`` + - 0x00000002 + - This output supports setting video timings by using + VIDIOC_S_DV_TIMINGS. + * - ``V4L2_OUT_CAP_STD`` + - 0x00000004 + - This output supports setting the TV standard by using + VIDIOC_S_STD. + * - ``V4L2_OUT_CAP_NATIVE_SIZE`` + - 0x00000008 + - This output supports setting the native size using the + ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see + :ref:`v4l2-selections-common`. Return Value @@ -218,5 +152,5 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_output <v4l2-output>` ``index`` is out of + The struct :c:type:`v4l2_output` ``index`` is out of bounds. diff --git a/Documentation/media/uapi/v4l/vidioc-enumstd.rst b/Documentation/media/uapi/v4l/vidioc-enumstd.rst index 6699b26cdeb4..f2bdd45cfa0d 100644 --- a/Documentation/media/uapi/v4l/vidioc-enumstd.rst +++ b/Documentation/media/uapi/v4l/vidioc-enumstd.rst @@ -15,7 +15,8 @@ VIDIOC_ENUMSTD - Enumerate supported video standards Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_standard *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_ENUMSTD, struct v4l2_standard *argp ) + :name: VIDIOC_ENUMSTD Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_ENUMSTD - ``argp`` @@ -35,7 +33,7 @@ Description To query the attributes of a video standard, especially a custom (driver defined) one, applications initialize the ``index`` field of struct -:ref:`v4l2_standard <v4l2-standard>` and call the :ref:`VIDIOC_ENUMSTD` +:c:type:`v4l2_standard` and call the :ref:`VIDIOC_ENUMSTD` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all standards applications shall begin at index @@ -44,99 +42,64 @@ enumerate a different set of standards after switching the video input or output. [#f1]_ -.. _v4l2-standard: +.. c:type:: v4l2_standard + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_standard :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Number of the video standard, set by the application. - - - .. row 2 - - - :ref:`v4l2_std_id <v4l2-std-id>` - - - ``id`` - - - The bits in this field identify the standard as one of the common - standards listed in :ref:`v4l2-std-id`, or if bits 32 to 63 are - set as custom standards. Multiple bits can be set if the hardware - does not distinguish between these standards, however separate - indices do not indicate the opposite. The ``id`` must be unique. - No other enumerated :ref:`struct v4l2_standard <v4l2-standard>` structure, - for this input or output anyway, can contain the same set of bits. - - - .. row 3 - - - __u8 - - - ``name``\ [24] - - - Name of the standard, a NUL-terminated ASCII string, for example: - "PAL-B/G", "NTSC Japan". This information is intended for the - user. - - - .. row 4 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``frameperiod`` - - - The frame period (not field period) is numerator / denominator. - For example M/NTSC has a frame period of 1001 / 30000 seconds. - - - .. row 5 - - - __u32 - - - ``framelines`` - - - Total lines per frame including blanking, e. g. 625 for B/PAL. - - - .. row 6 - - - __u32 - - - ``reserved``\ [4] - - - Reserved for future extensions. Drivers must set the array to - zero. - - - -.. _v4l2-fract: + * - __u32 + - ``index`` + - Number of the video standard, set by the application. + * - :ref:`v4l2_std_id <v4l2-std-id>` + - ``id`` + - The bits in this field identify the standard as one of the common + standards listed in :ref:`v4l2-std-id`, or if bits 32 to 63 are + set as custom standards. Multiple bits can be set if the hardware + does not distinguish between these standards, however separate + indices do not indicate the opposite. The ``id`` must be unique. + No other enumerated struct :c:type:`v4l2_standard` structure, + for this input or output anyway, can contain the same set of bits. + * - __u8 + - ``name``\ [24] + - Name of the standard, a NUL-terminated ASCII string, for example: + "PAL-B/G", "NTSC Japan". This information is intended for the + user. + * - struct :c:type:`v4l2_fract` + - ``frameperiod`` + - The frame period (not field period) is numerator / denominator. + For example M/NTSC has a frame period of 1001 / 30000 seconds. + * - __u32 + - ``framelines`` + - Total lines per frame including blanking, e. g. 625 for B/PAL. + * - __u32 + - ``reserved``\ [4] + - Reserved for future extensions. Drivers must set the array to + zero. + + + +.. c:type:: v4l2_fract + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_fract :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``numerator`` - - - - - - .. row 2 - - - __u32 - - - ``denominator`` - - - + * - __u32 + - ``numerator`` + - + * - __u32 + - ``denominator`` + - +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. _v4l2-std-id: @@ -145,17 +108,12 @@ or output. [#f1]_ :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u64 - - - ``v4l2_std_id`` - - - This type is a set, each bit representing another video standard - as listed below and in :ref:`video-standards`. The 32 most - significant bits are reserved for custom (driver defined) video - standards. + * - __u64 + - ``v4l2_std_id`` + - This type is a set, each bit representing another video standard + as listed below and in :ref:`video-standards`. The 32 most + significant bits are reserved for custom (driver defined) video + standards. @@ -266,124 +224,77 @@ support digital TV. See also the Linux DVB API at #define V4L2_STD_ALL (V4L2_STD_525_60 | V4L2_STD_625_50) +.. raw:: latex + + \begin{adjustbox}{width=\columnwidth} + +.. NTSC/M PAL/M /N /B /D /H /I SECAM/B /D /K1 /L +.. tabularcolumns:: |p{2.7cm}|p{2.6cm}|p{3.0cm}|p{3.2cm}|p{3.2cm}|p{2.2cm}|p{1.2cm}|p{3.2cm}|p{3.0cm}|p{2.0cm}|p{2.0cm}|p{2.0cm}| .. _video-standards: -.. flat-table:: Video Standards (based on []) +.. flat-table:: Video Standards (based on :ref:`itu470`) :header-rows: 1 :stub-columns: 0 + * - Characteristics + - M/NTSC [#f2]_ + - M/PAL + - N/PAL [#f3]_ + - B, B1, G/PAL + - D, D1, K/PAL + - H/PAL + - I/PAL + - B, G/SECAM + - D, K/SECAM + - K1/SECAM + - L/SECAM + * - Frame lines + - :cspan:`1` 525 + - :cspan:`8` 625 + * - Frame period (s) + - :cspan:`1` 1001/30000 + - :cspan:`8` 1/25 + * - Chrominance sub-carrier frequency (Hz) + - 3579545 ± 10 + - 3579611.49 ± 10 + - 4433618.75 ± 5 + + (3582056.25 ± 5) + - :cspan:`3` 4433618.75 ± 5 + - 4433618.75 ± 1 + - :cspan:`2` f\ :sub:`OR` = 4406250 ± 2000, + + f\ :sub:`OB` = 4250000 ± 2000 + * - Nominal radio-frequency channel bandwidth (MHz) + - 6 + - 6 + - 6 + - B: 7; B1, G: 8 + - 8 + - 8 + - 8 + - 8 + - 8 + - 8 + - 8 + * - Sound carrier relative to vision carrier (MHz) + - 4.5 + - 4.5 + - 4.5 + - 5.5 ± 0.001 [#f4]_ [#f5]_ [#f6]_ [#f7]_ + - 6.5 ± 0.001 + - 5.5 + - 5.9996 ± 0.0005 + - 5.5 ± 0.001 + - 6.5 ± 0.001 + - 6.5 + - 6.5 [#f8]_ + +.. raw:: latex + + \end{adjustbox}\newline\newline - - .. row 1 - - - Characteristics - - - M/NTSC [#f2]_ - - - M/PAL - - - N/PAL [#f3]_ - - - B, B1, G/PAL - - - D, D1, K/PAL - - - H/PAL - - - I/PAL - - - B, G/SECAM - - - D, K/SECAM - - - K1/SECAM - - - L/SECAM - - - .. row 2 - - - Frame lines - - - :cspan:`1` 525 - - - :cspan:`9` 625 - - - .. row 3 - - - Frame period (s) - - - :cspan:`1` 1001/30000 - - - :cspan:`9` 1/25 - - - .. row 4 - - - Chrominance sub-carrier frequency (Hz) - - - 3579545 ± 10 - - - 3579611.49 ± 10 - - - 4433618.75 ± 5 (3582056.25 ± 5) - - - :cspan:`3` 4433618.75 ± 5 - - - 4433618.75 ± 1 - - - :cspan:`3` f\ :sub:`OR` = 4406250 ± 2000, f\ :sub:`OB` = 4250000 - ± 2000 - - - .. row 5 - - - Nominal radio-frequency channel bandwidth (MHz) - - - 6 - - - 6 - - - 6 - - - B: 7; B1, G: 8 - - - 8 - - - 8 - - - 8 - - - 8 - - - 8 - - - 8 - - - 8 - - - .. row 6 - - - Sound carrier relative to vision carrier (MHz) - - - + 4.5 - - - + 4.5 - - - + 4.5 - - - + 5.5 ± 0.001 [#f4]_ [#f5]_ [#f6]_ [#f7]_ - - - + 6.5 ± 0.001 - - - + 5.5 - - - + 5.9996 ± 0.0005 - - - + 5.5 ± 0.001 - - - + 6.5 ± 0.001 - - - + 6.5 - - - + 6.5 [#f8]_ Return Value @@ -394,7 +305,7 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_standard <v4l2-standard>` ``index`` is out + The struct :c:type:`v4l2_standard` ``index`` is out of bounds. ENODATA diff --git a/Documentation/media/uapi/v4l/vidioc-expbuf.rst b/Documentation/media/uapi/v4l/vidioc-expbuf.rst index ded708e647fa..246e48028d40 100644 --- a/Documentation/media/uapi/v4l/vidioc-expbuf.rst +++ b/Documentation/media/uapi/v4l/vidioc-expbuf.rst @@ -15,7 +15,8 @@ VIDIOC_EXPBUF - Export a buffer as a DMABUF file descriptor. Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_exportbuffer *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_EXPBUF, struct v4l2_exportbuffer *argp ) + :name: VIDIOC_EXPBUF Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_EXPBUF - ``argp`` @@ -40,13 +38,13 @@ buffers have been allocated with the :ref:`VIDIOC_REQBUFS` ioctl. To export a buffer, applications fill struct -:ref:`v4l2_exportbuffer <v4l2-exportbuffer>`. The ``type`` field is +:c:type:`v4l2_exportbuffer`. The ``type`` field is set to the same buffer type as was previously used with struct -:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``. +:c:type:`v4l2_requestbuffers` ``type``. Applications must also set the ``index`` field. Valid index numbers range from zero to the number of buffers allocated with :ref:`VIDIOC_REQBUFS` (struct -:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus +:c:type:`v4l2_requestbuffers` ``count``) minus one. For the multi-planar API, applications set the ``plane`` field to the index of the plane to be exported. Valid planes range from zero to the maximal number of valid planes for the currently active format. For @@ -116,73 +114,45 @@ Examples } -.. _v4l2-exportbuffer: +.. c:type:: v4l2_exportbuffer + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_exportbuffer :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``type`` - - - Type of the buffer, same as struct - :ref:`v4l2_format <v4l2-format>` ``type`` or struct - :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set - by the application. See :ref:`v4l2-buf-type` - - - .. row 2 - - - __u32 - - - ``index`` - - - Number of the buffer, set by the application. This field is only - used for :ref:`memory mapping <mmap>` I/O and can range from - zero to the number of buffers allocated with the - :ref:`VIDIOC_REQBUFS` and/or - :ref:`VIDIOC_CREATE_BUFS` ioctls. - - - .. row 3 - - - __u32 - - - ``plane`` - - - Index of the plane to be exported when using the multi-planar API. - Otherwise this value must be set to zero. - - - .. row 4 - - - __u32 - - - ``flags`` - - - Flags for the newly created file, currently only ``O_CLOEXEC``, - ``O_RDONLY``, ``O_WRONLY``, and ``O_RDWR`` are supported, refer to - the manual of open() for more details. - - - .. row 5 - - - __s32 - - - ``fd`` - - - The DMABUF file descriptor associated with a buffer. Set by the - driver. - - - .. row 6 - - - __u32 - - - ``reserved[11]`` - - - Reserved field for future use. Drivers and applications must set - the array to zero. + * - __u32 + - ``type`` + - Type of the buffer, same as struct + :c:type:`v4l2_format` ``type`` or struct + :c:type:`v4l2_requestbuffers` ``type``, set + by the application. See :c:type:`v4l2_buf_type` + * - __u32 + - ``index`` + - Number of the buffer, set by the application. This field is only + used for :ref:`memory mapping <mmap>` I/O and can range from + zero to the number of buffers allocated with the + :ref:`VIDIOC_REQBUFS` and/or + :ref:`VIDIOC_CREATE_BUFS` ioctls. + * - __u32 + - ``plane`` + - Index of the plane to be exported when using the multi-planar API. + Otherwise this value must be set to zero. + * - __u32 + - ``flags`` + - Flags for the newly created file, currently only ``O_CLOEXEC``, + ``O_RDONLY``, ``O_WRONLY``, and ``O_RDWR`` are supported, refer to + the manual of open() for more details. + * - __s32 + - ``fd`` + - The DMABUF file descriptor associated with a buffer. Set by the + driver. + * - __u32 + - ``reserved[11]`` + - Reserved field for future use. Drivers and applications must set + the array to zero. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-audio.rst b/Documentation/media/uapi/v4l/vidioc-g-audio.rst index cccbcdb8c463..5b67e81a0db6 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-audio.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-audio.rst @@ -15,9 +15,11 @@ VIDIOC_G_AUDIO - VIDIOC_S_AUDIO - Query or select the current audio input and it Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audio *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_AUDIO, struct v4l2_audio *argp ) + :name: VIDIOC_G_AUDIO -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_audio *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_AUDIO, const struct v4l2_audio *argp ) + :name: VIDIOC_S_AUDIO Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_AUDIO, VIDIOC_S_AUDIO - ``argp`` @@ -36,7 +35,7 @@ Description =========== To query the current audio input applications zero out the ``reserved`` -array of a struct :ref:`v4l2_audio <v4l2-audio>` and call the +array of a struct :c:type:`v4l2_audio` and call the :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the device has no audio inputs, or none which combine with the current video input. @@ -44,65 +43,44 @@ has no audio inputs, or none which combine with the current video input. Audio inputs have one writable property, the audio mode. To select the current audio input *and* change the audio mode, applications initialize the ``index`` and ``mode`` fields, and the ``reserved`` array of a -:ref:`struct v4l2_audio <v4l2-audio>` structure and call the :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` +struct :c:type:`v4l2_audio` structure and call the :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` ioctl. Drivers may switch to a different audio mode if the request cannot be satisfied. However, this is a write-only ioctl, it does not return the actual new audio mode. -.. _v4l2-audio: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_audio .. flat-table:: struct v4l2_audio :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Identifies the audio input, set by the driver or application. - - - .. row 2 - - - __u8 - - - ``name``\ [32] - - - Name of the audio input, a NUL-terminated ASCII string, for - example: "Line In". This information is intended for the user, - preferably the connector label on the device itself. - - - .. row 3 - - - __u32 - - - ``capability`` - - - Audio capability flags, see :ref:`audio-capability`. - - - .. row 4 - - - __u32 - - - ``mode`` - - - Audio mode flags set by drivers and applications (on - :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` ioctl), see :ref:`audio-mode`. - - - .. row 5 - - - __u32 - - - ``reserved``\ [2] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - + * - __u32 + - ``index`` + - Identifies the audio input, set by the driver or application. + * - __u8 + - ``name``\ [32] + - Name of the audio input, a NUL-terminated ASCII string, for + example: "Line In". This information is intended for the user, + preferably the connector label on the device itself. + * - __u32 + - ``capability`` + - Audio capability flags, see :ref:`audio-capability`. + * - __u32 + - ``mode`` + - Audio mode flags set by drivers and applications (on + :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` ioctl), see :ref:`audio-mode`. + * - __u32 + - ``reserved``\ [2] + - Reserved for future extensions. Drivers and applications must set + the array to zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _audio-capability: @@ -111,27 +89,19 @@ return the actual new audio mode. :stub-columns: 0 :widths: 3 1 4 + * - ``V4L2_AUDCAP_STEREO`` + - 0x00001 + - This is a stereo input. The flag is intended to automatically + disable stereo recording etc. when the signal is always monaural. + The API provides no means to detect if stereo is *received*, + unless the audio input belongs to a tuner. + * - ``V4L2_AUDCAP_AVL`` + - 0x00002 + - Automatic Volume Level mode is supported. - - .. row 1 - - - ``V4L2_AUDCAP_STEREO`` - - - 0x00001 - - - This is a stereo input. The flag is intended to automatically - disable stereo recording etc. when the signal is always monaural. - The API provides no means to detect if stereo is *received*, - unless the audio input belongs to a tuner. - - - .. row 2 - - - ``V4L2_AUDCAP_AVL`` - - - 0x00002 - - - Automatic Volume Level mode is supported. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _audio-mode: @@ -140,14 +110,9 @@ return the actual new audio mode. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_AUDMODE_AVL`` - - - 0x00001 - - - AVL mode is on. + * - ``V4L2_AUDMODE_AVL`` + - 0x00001 + - AVL mode is on. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-audioout.rst b/Documentation/media/uapi/v4l/vidioc-g-audioout.rst index b1c1bfeb251e..d16ecbaddc59 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-audioout.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-audioout.rst @@ -15,9 +15,11 @@ VIDIOC_G_AUDOUT - VIDIOC_S_AUDOUT - Query or select the current audio output Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_audioout *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_AUDOUT, struct v4l2_audioout *argp ) + :name: VIDIOC_G_AUDOUT -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_audioout *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_AUDOUT, const struct v4l2_audioout *argp ) + :name: VIDIOC_S_AUDOUT Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT - ``argp`` @@ -36,7 +35,7 @@ Description =========== To query the current audio output applications zero out the ``reserved`` -array of a struct :ref:`v4l2_audioout <v4l2-audioout>` and call the +array of a struct :c:type:`v4l2_audioout` and call the ``VIDIOC_G_AUDOUT`` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the device has no audio inputs, or none which combine with the current video @@ -45,68 +44,47 @@ output. Audio outputs have no writable properties. Nevertheless, to select the current audio output applications can initialize the ``index`` field and ``reserved`` array (which in the future may contain writable properties) -of a :ref:`struct v4l2_audioout <v4l2-audioout>` structure and call the +of a struct :c:type:`v4l2_audioout` structure and call the ``VIDIOC_S_AUDOUT`` ioctl. Drivers switch to the requested output or return the ``EINVAL`` error code when the index is out of bounds. This is a write-only ioctl, it does not return the current audio output attributes as ``VIDIOC_G_AUDOUT`` does. -.. note:: Connectors on a TV card to loop back the received audio signal +.. note:: + + Connectors on a TV card to loop back the received audio signal to a sound card are not audio outputs in this sense. -.. _v4l2-audioout: +.. c:type:: v4l2_audioout + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_audioout :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Identifies the audio output, set by the driver or application. - - - .. row 2 - - - __u8 - - - ``name``\ [32] - - - Name of the audio output, a NUL-terminated ASCII string, for - example: "Line Out". This information is intended for the user, - preferably the connector label on the device itself. - - - .. row 3 - - - __u32 - - - ``capability`` - - - Audio capability flags, none defined yet. Drivers must set this - field to zero. - - - .. row 4 - - - __u32 - - - ``mode`` - - - Audio mode, none defined yet. Drivers and applications (on - ``VIDIOC_S_AUDOUT``) must set this field to zero. - - - .. row 5 - - - __u32 - - - ``reserved``\ [2] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. + * - __u32 + - ``index`` + - Identifies the audio output, set by the driver or application. + * - __u8 + - ``name``\ [32] + - Name of the audio output, a NUL-terminated ASCII string, for + example: "Line Out". This information is intended for the user, + preferably the connector label on the device itself. + * - __u32 + - ``capability`` + - Audio capability flags, none defined yet. Drivers must set this + field to zero. + * - __u32 + - ``mode`` + - Audio mode, none defined yet. Drivers and applications (on + ``VIDIOC_S_AUDOUT``) must set this field to zero. + * - __u32 + - ``reserved``\ [2] + - Reserved for future extensions. Drivers and applications must set + the array to zero. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-crop.rst b/Documentation/media/uapi/v4l/vidioc-g-crop.rst index 6cf76497937c..56a36340f565 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-crop.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-crop.rst @@ -15,9 +15,11 @@ VIDIOC_G_CROP - VIDIOC_S_CROP - Get or set the current cropping rectangle Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_crop *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_CROP, struct v4l2_crop *argp ) + :name: VIDIOC_G_CROP -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_crop *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp ) + :name: VIDIOC_S_CROP Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_CROP, VIDIOC_S_CROP - ``argp`` @@ -36,13 +35,13 @@ Description =========== To query the cropping rectangle size and position applications set the -``type`` field of a :ref:`struct v4l2_crop <v4l2-crop>` structure to the +``type`` field of a struct :c:type:`v4l2_crop` structure to the respective buffer (stream) type and call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` ioctl with a pointer to this structure. The driver fills the rest of the structure or returns the ``EINVAL`` error code if cropping is not supported. To change the cropping rectangle applications initialize the ``type`` -and struct :ref:`v4l2_rect <v4l2-rect>` substructure named ``c`` of a +and struct :c:type:`v4l2_rect` substructure named ``c`` of a v4l2_crop structure and call the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctl with a pointer to this structure. @@ -76,33 +75,25 @@ When cropping is not supported then no parameters are changed and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` returns the ``EINVAL`` error code. -.. _v4l2-crop: +.. c:type:: v4l2_crop + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_crop :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``type`` - - - Type of the data stream, set by the application. Only these types - are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``, - ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and - ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :ref:`v4l2-buf-type`. - - - .. row 2 - - - struct :ref:`v4l2_rect <v4l2-rect>` - - - ``c`` - - - Cropping rectangle. The same co-ordinate system as for struct - :ref:`v4l2_cropcap <v4l2-cropcap>` ``bounds`` is used. + * - __u32 + - ``type`` + - Type of the data stream, set by the application. Only these types + are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``, + ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and + ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :c:type:`v4l2_buf_type`. + * - struct :c:type:`v4l2_rect` + - ``c`` + - Cropping rectangle. The same co-ordinate system as for struct + :c:type:`v4l2_cropcap` ``bounds`` is used. Return Value @@ -111,3 +102,6 @@ Return Value On success 0 is returned, on error -1 and the ``errno`` variable is set appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. + +ENODATA + Cropping is not supported for this input or output. diff --git a/Documentation/media/uapi/v4l/vidioc-g-ctrl.rst b/Documentation/media/uapi/v4l/vidioc-g-ctrl.rst index ee929f692ebe..d8a379182a34 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-ctrl.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-ctrl.rst @@ -15,7 +15,11 @@ VIDIOC_G_CTRL - VIDIOC_S_CTRL - Get or set the value of a control Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_control *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_CTRL, struct v4l2_control *argp ) + :name: VIDIOC_G_CTRL + +.. c:function:: int ioctl( int fd, VIDIOC_S_CTRL, struct v4l2_control *argp ) + :name: VIDIOC_S_CTRL Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_CTRL, VIDIOC_S_CTRL - ``argp`` @@ -34,10 +35,10 @@ Description =========== To get the current value of a control applications initialize the ``id`` -field of a struct :ref:`struct v4l2_control <v4l2-control>` and call the +field of a struct :c:type:`v4l2_control` and call the :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl with a pointer to this structure. To change the value of a control applications initialize the ``id`` and ``value`` -fields of a struct :ref:`struct v4l2_control <v4l2-control>` and call the +fields of a struct :c:type:`v4l2_control` and call the :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctl. When the ``id`` is invalid drivers return an ``EINVAL`` error code. When the @@ -54,29 +55,21 @@ These ioctls work only with user controls. For other control classes the :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used. -.. _v4l2-control: +.. c:type:: v4l2_control + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_control :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``id`` - - - Identifies the control, set by the application. - - - .. row 2 - - - __s32 - - - ``value`` - - - New value or current value. + * - __u32 + - ``id`` + - Identifies the control, set by the application. + * - __s32 + - ``value`` + - New value or current value. Return Value @@ -87,13 +80,13 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_control <v4l2-control>` ``id`` is invalid + The struct :c:type:`v4l2_control` ``id`` is invalid or the ``value`` is inappropriate for the given control (i.e. if a menu item is selected that is not supported by the driver according to :ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>`). ERANGE - The struct :ref:`v4l2_control <v4l2-control>` ``value`` is out of + The struct :c:type:`v4l2_control` ``value`` is out of bounds. EBUSY diff --git a/Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst b/Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst index f7bf21f49092..7dd943ff14cd 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-dv-timings.rst @@ -15,7 +15,17 @@ VIDIOC_G_DV_TIMINGS - VIDIOC_S_DV_TIMINGS - VIDIOC_SUBDEV_G_DV_TIMINGS - VIDIOC_ Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_DV_TIMINGS, struct v4l2_dv_timings *argp ) + :name: VIDIOC_G_DV_TIMINGS + +.. c:function:: int ioctl( int fd, VIDIOC_S_DV_TIMINGS, struct v4l2_dv_timings *argp ) + :name: VIDIOC_S_DV_TIMINGS + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_DV_TIMINGS, struct v4l2_dv_timings *argp ) + :name: VIDIOC_SUBDEV_G_DV_TIMINGS + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_DV_TIMINGS, struct v4l2_dv_timings *argp ) + :name: VIDIOC_SUBDEV_S_DV_TIMINGS Arguments @@ -24,10 +34,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS, - VIDIOC_SUBDEV_G_DV_TIMINGS, VIDIOC_SUBDEV_S_DV_TIMINGS - ``argp`` @@ -38,8 +44,8 @@ To set DV timings for the input or output, applications use the :ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get the current timings, applications use the :ref:`VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. The detailed timing information is filled in using the structure struct -:ref:`v4l2_dv_timings <v4l2-dv-timings>`. These ioctls take a -pointer to the struct :ref:`v4l2_dv_timings <v4l2-dv-timings>` +:c:type:`v4l2_dv_timings`. These ioctls take a +pointer to the struct :c:type:`v4l2_dv_timings` structure as argument. If the ioctl is not supported or the timing values are not correct, the driver returns ``EINVAL`` error code. @@ -68,202 +74,110 @@ EBUSY The device is busy and therefore can not change the timings. -.. _v4l2-bt-timings: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_bt_timings .. flat-table:: struct v4l2_bt_timings :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``width`` - - - Width of the active video in pixels. - - - .. row 2 - - - __u32 - - - ``height`` - - - Height of the active video frame in lines. So for interlaced - formats the height of the active video in each field is - ``height``/2. - - - .. row 3 - - - __u32 - - - ``interlaced`` - - - Progressive (``V4L2_DV_PROGRESSIVE``) or interlaced (``V4L2_DV_INTERLACED``). - - - .. row 4 - - - __u32 - - - ``polarities`` - - - This is a bit mask that defines polarities of sync signals. bit 0 - (``V4L2_DV_VSYNC_POS_POL``) is for vertical sync polarity and bit - 1 (``V4L2_DV_HSYNC_POS_POL``) is for horizontal sync polarity. If - the bit is set (1) it is positive polarity and if is cleared (0), - it is negative polarity. - - - .. row 5 - - - __u64 - - - ``pixelclock`` - - - Pixel clock in Hz. Ex. 74.25MHz->74250000 - - - .. row 6 - - - __u32 - - - ``hfrontporch`` - - - Horizontal front porch in pixels - - - .. row 7 - - - __u32 - - - ``hsync`` - - - Horizontal sync length in pixels - - - .. row 8 - - - __u32 - - - ``hbackporch`` - - - Horizontal back porch in pixels - - - .. row 9 - - - __u32 - - - ``vfrontporch`` - - - Vertical front porch in lines. For interlaced formats this refers - to the odd field (aka field 1). - - - .. row 10 - - - __u32 - - - ``vsync`` - - - Vertical sync length in lines. For interlaced formats this refers - to the odd field (aka field 1). - - - .. row 11 - - - __u32 - - - ``vbackporch`` - - - Vertical back porch in lines. For interlaced formats this refers - to the odd field (aka field 1). - - - .. row 12 - - - __u32 - - - ``il_vfrontporch`` - - - Vertical front porch in lines for the even field (aka field 2) of - interlaced field formats. Must be 0 for progressive formats. - - - .. row 13 - - - __u32 - - - ``il_vsync`` - - - Vertical sync length in lines for the even field (aka field 2) of - interlaced field formats. Must be 0 for progressive formats. - - - .. row 14 - - - __u32 - - - ``il_vbackporch`` - - - Vertical back porch in lines for the even field (aka field 2) of - interlaced field formats. Must be 0 for progressive formats. - - - .. row 15 - - - __u32 - - - ``standards`` - - - The video standard(s) this format belongs to. This will be filled - in by the driver. Applications must set this to 0. See - :ref:`dv-bt-standards` for a list of standards. - - - .. row 16 - - - __u32 - - - ``flags`` - - - Several flags giving more information about the format. See - :ref:`dv-bt-flags` for a description of the flags. - - - -.. _v4l2-dv-timings: + * - __u32 + - ``width`` + - Width of the active video in pixels. + * - __u32 + - ``height`` + - Height of the active video frame in lines. So for interlaced + formats the height of the active video in each field is + ``height``/2. + * - __u32 + - ``interlaced`` + - Progressive (``V4L2_DV_PROGRESSIVE``) or interlaced (``V4L2_DV_INTERLACED``). + * - __u32 + - ``polarities`` + - This is a bit mask that defines polarities of sync signals. bit 0 + (``V4L2_DV_VSYNC_POS_POL``) is for vertical sync polarity and bit + 1 (``V4L2_DV_HSYNC_POS_POL``) is for horizontal sync polarity. If + the bit is set (1) it is positive polarity and if is cleared (0), + it is negative polarity. + * - __u64 + - ``pixelclock`` + - Pixel clock in Hz. Ex. 74.25MHz->74250000 + * - __u32 + - ``hfrontporch`` + - Horizontal front porch in pixels + * - __u32 + - ``hsync`` + - Horizontal sync length in pixels + * - __u32 + - ``hbackporch`` + - Horizontal back porch in pixels + * - __u32 + - ``vfrontporch`` + - Vertical front porch in lines. For interlaced formats this refers + to the odd field (aka field 1). + * - __u32 + - ``vsync`` + - Vertical sync length in lines. For interlaced formats this refers + to the odd field (aka field 1). + * - __u32 + - ``vbackporch`` + - Vertical back porch in lines. For interlaced formats this refers + to the odd field (aka field 1). + * - __u32 + - ``il_vfrontporch`` + - Vertical front porch in lines for the even field (aka field 2) of + interlaced field formats. Must be 0 for progressive formats. + * - __u32 + - ``il_vsync`` + - Vertical sync length in lines for the even field (aka field 2) of + interlaced field formats. Must be 0 for progressive formats. + * - __u32 + - ``il_vbackporch`` + - Vertical back porch in lines for the even field (aka field 2) of + interlaced field formats. Must be 0 for progressive formats. + * - __u32 + - ``standards`` + - The video standard(s) this format belongs to. This will be filled + in by the driver. Applications must set this to 0. See + :ref:`dv-bt-standards` for a list of standards. + * - __u32 + - ``flags`` + - Several flags giving more information about the format. See + :ref:`dv-bt-flags` for a description of the flags. + * - __u32 + - ``reserved[14]`` + - Reserved for future extensions. Drivers and applications must set + the array to zero. + + +.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{7.0cm}|p{3.5cm}| + +.. c:type:: v4l2_dv_timings .. flat-table:: struct v4l2_dv_timings :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 1 - - - .. row 1 - - - __u32 - - - ``type`` - - - - - Type of DV timings as listed in :ref:`dv-timing-types`. - - - .. row 2 - - - union - - - - - - - - .. row 3 - - - - - struct :ref:`v4l2_bt_timings <v4l2-bt-timings>` - - - ``bt`` - - - Timings defined by BT.656/1120 specifications - - - .. row 4 - - - - - __u32 - - - ``reserved``\ [32] - - - - - + * - __u32 + - ``type`` + - + - Type of DV timings as listed in :ref:`dv-timing-types`. + * - union + - + - + * - + - struct :c:type:`v4l2_bt_timings` + - ``bt`` + - Timings defined by BT.656/1120 specifications + * - + - __u32 + - ``reserved``\ [32] + - + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. _dv-timing-types: @@ -272,28 +186,15 @@ EBUSY :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - Timing type - - - value - - - Description - - - .. row 2 - - - - - - - - - - .. row 3 - - - ``V4L2_DV_BT_656_1120`` - - - 0 - - - BT.656/1120 timings + * - Timing type + - value + - Description + * - + - + - + * - ``V4L2_DV_BT_656_1120`` + - 0 + - BT.656/1120 timings @@ -303,43 +204,22 @@ EBUSY :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - Timing standard - - - Description - - - .. row 2 - - - - - - - - .. row 3 - - - ``V4L2_DV_BT_STD_CEA861`` - - - The timings follow the CEA-861 Digital TV Profile standard - - - .. row 4 - - - ``V4L2_DV_BT_STD_DMT`` - - - The timings follow the VESA Discrete Monitor Timings standard - - - .. row 5 - - - ``V4L2_DV_BT_STD_CVT`` - - - The timings follow the VESA Coordinated Video Timings standard - - - .. row 6 - - - ``V4L2_DV_BT_STD_GTF`` - - - The timings follow the VESA Generalized Timings Formula standard - - + * - Timing standard + - Description + * - ``V4L2_DV_BT_STD_CEA861`` + - The timings follow the CEA-861 Digital TV Profile standard + * - ``V4L2_DV_BT_STD_DMT`` + - The timings follow the VESA Discrete Monitor Timings standard + * - ``V4L2_DV_BT_STD_CVT`` + - The timings follow the VESA Coordinated Video Timings standard + * - ``V4L2_DV_BT_STD_GTF`` + - The timings follow the VESA Generalized Timings Formula standard + * - ``V4L2_DV_BT_STD_SDI`` + - The timings follow the SDI Timings standard. + There are no horizontal syncs/porches at all in this format. + Total blanking timings must be set in hsync or vsync fields only. + +.. tabularcolumns:: |p{6.0cm}|p{11.5cm}| .. _dv-bt-flags: @@ -347,71 +227,46 @@ EBUSY :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - Flag - - - Description - - - .. row 2 - - - - - - - - .. row 3 - - - ``V4L2_DV_FL_REDUCED_BLANKING`` - - - CVT/GTF specific: the timings use reduced blanking (CVT) or the - 'Secondary GTF' curve (GTF). In both cases the horizontal and/or - vertical blanking intervals are reduced, allowing a higher - resolution over the same bandwidth. This is a read-only flag, - applications must not set this. - - - .. row 4 - - - ``V4L2_DV_FL_CAN_REDUCE_FPS`` - - - CEA-861 specific: set for CEA-861 formats with a framerate that is - a multiple of six. These formats can be optionally played at 1 / - 1.001 speed to be compatible with 60 Hz based standards such as - NTSC and PAL-M that use a framerate of 29.97 frames per second. If - the transmitter can't generate such frequencies, then the flag - will also be cleared. This is a read-only flag, applications must - not set this. - - - .. row 5 - - - ``V4L2_DV_FL_REDUCED_FPS`` - - - CEA-861 specific: only valid for video transmitters, the flag is - cleared by receivers. It is also only valid for formats with the - ``V4L2_DV_FL_CAN_REDUCE_FPS`` flag set, for other formats the - flag will be cleared by the driver. If the application sets this - flag, then the pixelclock used to set up the transmitter is - divided by 1.001 to make it compatible with NTSC framerates. If - the transmitter can't generate such frequencies, then the flag - will also be cleared. - - - .. row 6 - - - ``V4L2_DV_FL_HALF_LINE`` - - - Specific to interlaced formats: if set, then the vertical - frontporch of field 1 (aka the odd field) is really one half-line - longer and the vertical backporch of field 2 (aka the even field) - is really one half-line shorter, so each field has exactly the - same number of half-lines. Whether half-lines can be detected or - used depends on the hardware. - - - .. row 7 - - - ``V4L2_DV_FL_IS_CE_VIDEO`` - - - If set, then this is a Consumer Electronics (CE) video format. - Such formats differ from other formats (commonly called IT - formats) in that if R'G'B' encoding is used then by default the - R'G'B' values use limited range (i.e. 16-235) as opposed to full - range (i.e. 0-255). All formats defined in CEA-861 except for the - 640x480p59.94 format are CE formats. + * - Flag + - Description + * - ``V4L2_DV_FL_REDUCED_BLANKING`` + - CVT/GTF specific: the timings use reduced blanking (CVT) or the + 'Secondary GTF' curve (GTF). In both cases the horizontal and/or + vertical blanking intervals are reduced, allowing a higher + resolution over the same bandwidth. This is a read-only flag, + applications must not set this. + * - ``V4L2_DV_FL_CAN_REDUCE_FPS`` + - CEA-861 specific: set for CEA-861 formats with a framerate that is + a multiple of six. These formats can be optionally played at 1 / + 1.001 speed to be compatible with 60 Hz based standards such as + NTSC and PAL-M that use a framerate of 29.97 frames per second. If + the transmitter can't generate such frequencies, then the flag + will also be cleared. This is a read-only flag, applications must + not set this. + * - ``V4L2_DV_FL_REDUCED_FPS`` + - CEA-861 specific: only valid for video transmitters, the flag is + cleared by receivers. It is also only valid for formats with the + ``V4L2_DV_FL_CAN_REDUCE_FPS`` flag set, for other formats the + flag will be cleared by the driver. If the application sets this + flag, then the pixelclock used to set up the transmitter is + divided by 1.001 to make it compatible with NTSC framerates. If + the transmitter can't generate such frequencies, then the flag + will also be cleared. + * - ``V4L2_DV_FL_HALF_LINE`` + - Specific to interlaced formats: if set, then the vertical + frontporch of field 1 (aka the odd field) is really one half-line + longer and the vertical backporch of field 2 (aka the even field) + is really one half-line shorter, so each field has exactly the + same number of half-lines. Whether half-lines can be detected or + used depends on the hardware. + * - ``V4L2_DV_FL_IS_CE_VIDEO`` + - If set, then this is a Consumer Electronics (CE) video format. + Such formats differ from other formats (commonly called IT + formats) in that if R'G'B' encoding is used then by default the + R'G'B' values use limited range (i.e. 16-235) as opposed to full + range (i.e. 0-255). All formats defined in CEA-861 except for the + 640x480p59.94 format are CE formats. + * - ``V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE`` + - Some formats like SMPTE-125M have an interlaced signal with a odd + total height. For these formats, if this flag is set, the first + field has the extra line. Else, it is the second field. diff --git a/Documentation/media/uapi/v4l/vidioc-g-edid.rst b/Documentation/media/uapi/v4l/vidioc-g-edid.rst index 1a982b68a72f..a16a193a1cbf 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-edid.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-edid.rst @@ -15,7 +15,18 @@ VIDIOC_G_EDID - VIDIOC_S_EDID - VIDIOC_SUBDEV_G_EDID - VIDIOC_SUBDEV_S_EDID - Ge Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_edid *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_EDID, struct v4l2_edid *argp ) + :name: VIDIOC_G_EDID + +.. c:function:: int ioctl( int fd, VIDIOC_S_EDID, struct v4l2_edid *argp ) + :name: VIDIOC_S_EDID + + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_EDID, struct v4l2_edid *argp ) + :name: VIDIOC_SUBDEV_G_EDID + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_EDID, struct v4l2_edid *argp ) + :name: VIDIOC_SUBDEV_S_EDID Arguments @@ -24,10 +35,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_EDID, VIDIOC_S_EDID, VIDIOC_SUBDEV_G_EDID, - VIDIOC_SUBDEV_S_EDID - ``argp`` @@ -67,7 +74,9 @@ total number of available EDID blocks and it will return 0 without copying any data. This is an easy way to discover how many EDID blocks there are. -.. note:: If there are no EDID blocks available at all, then +.. note:: + + If there are no EDID blocks available at all, then the driver will set ``blocks`` to 0 and it returns 0. To set the EDID blocks of a receiver the application has to fill in the @@ -88,62 +97,39 @@ the EDID data in some way. In any case, the end result is the same: the EDID is no longer available. -.. _v4l2-edid: +.. c:type:: v4l2_edid + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_edid :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``pad`` - - - Pad for which to get/set the EDID blocks. When used with a video - device node the pad represents the input or output index as - returned by :ref:`VIDIOC_ENUMINPUT` and - :ref:`VIDIOC_ENUMOUTPUT` respectively. - - - .. row 2 - - - __u32 - - - ``start_block`` - - - Read the EDID from starting with this block. Must be 0 when - setting the EDID. - - - .. row 3 - - - __u32 - - - ``blocks`` - - - The number of blocks to get or set. Must be less or equal to 256 - (the maximum number of blocks as defined by the standard). When - you set the EDID and ``blocks`` is 0, then the EDID is disabled or - erased. - - - .. row 4 - - - __u32 - - - ``reserved``\ [5] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. - - - .. row 5 - - - __u8 * - - - ``edid`` - - - Pointer to memory that contains the EDID. The minimum size is - ``blocks`` * 128. + * - __u32 + - ``pad`` + - Pad for which to get/set the EDID blocks. When used with a video + device node the pad represents the input or output index as + returned by :ref:`VIDIOC_ENUMINPUT` and + :ref:`VIDIOC_ENUMOUTPUT` respectively. + * - __u32 + - ``start_block`` + - Read the EDID from starting with this block. Must be 0 when + setting the EDID. + * - __u32 + - ``blocks`` + - The number of blocks to get or set. Must be less or equal to 256 + (the maximum number of blocks as defined by the standard). When + you set the EDID and ``blocks`` is 0, then the EDID is disabled or + erased. + * - __u32 + - ``reserved``\ [5] + - Reserved for future extensions. Applications and drivers must set + the array to zero. + * - __u8 * + - ``edid`` + - Pointer to memory that contains the EDID. The minimum size is + ``blocks`` * 128. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-enc-index.rst b/Documentation/media/uapi/v4l/vidioc-g-enc-index.rst index f0f41ac56b80..418e886fd44b 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-enc-index.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-enc-index.rst @@ -15,7 +15,8 @@ VIDIOC_G_ENC_INDEX - Get meta data about a compressed video stream Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_enc_idx *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_ENC_INDEX, struct v4l2_enc_idx *argp ) + :name: VIDIOC_G_ENC_INDEX Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_ENC_INDEX - ``argp`` @@ -39,7 +37,7 @@ driver, which is useful for random access into the stream without decoding it. To read the data applications must call :ref:`VIDIOC_G_ENC_INDEX <VIDIOC_G_ENC_INDEX>` with a -pointer to a struct :ref:`v4l2_enc_idx <v4l2-enc-idx>`. On success +pointer to a struct :c:type:`v4l2_enc_idx`. On success the driver fills the ``entry`` array, stores the number of elements written in the ``entries`` field, and initializes the ``entries_cap`` field. @@ -57,108 +55,68 @@ Currently this ioctl is only defined for MPEG-2 program streams and video elementary streams. -.. _v4l2-enc-idx: +.. tabularcolumns:: |p{3.5cm}|p{5.6cm}|p{8.4cm}| + +.. c:type:: v4l2_enc_idx .. flat-table:: struct v4l2_enc_idx :header-rows: 0 :stub-columns: 0 - :widths: 1 1 2 1 1 - - - - .. row 1 - - - __u32 - - - ``entries`` - - - The number of entries the driver stored in the ``entry`` array. - - - .. row 2 - - - __u32 - - - ``entries_cap`` - - - The number of entries the driver can buffer. Must be greater than - zero. - - - .. row 3 - - - __u32 - - - ``reserved``\ [4] + :widths: 1 3 8 - - :cspan:`2` Reserved for future extensions. Drivers must set the - array to zero. + * - __u32 + - ``entries`` + - The number of entries the driver stored in the ``entry`` array. + * - __u32 + - ``entries_cap`` + - The number of entries the driver can buffer. Must be greater than + zero. + * - __u32 + - ``reserved``\ [4] + - Reserved for future extensions. Drivers must set the + array to zero. + * - struct :c:type:`v4l2_enc_idx_entry` + - ``entry``\ [``V4L2_ENC_IDX_ENTRIES``] + - Meta data about a compressed video stream. Each element of the + array corresponds to one picture, sorted in ascending order by + their ``offset``. - - .. row 4 - - struct :ref:`v4l2_enc_idx_entry <v4l2-enc-idx-entry>` - - ``entry``\ [``V4L2_ENC_IDX_ENTRIES``] +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| - - Meta data about a compressed video stream. Each element of the - array corresponds to one picture, sorted in ascending order by - their ``offset``. - - - -.. _v4l2-enc-idx-entry: +.. c:type:: v4l2_enc_idx_entry .. flat-table:: struct v4l2_enc_idx_entry :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u64 - - - ``offset`` - - - The offset in bytes from the beginning of the compressed video - stream to the beginning of this picture, that is a *PES packet - header* as defined in :ref:`mpeg2part1` or a *picture header* as - defined in :ref:`mpeg2part2`. When the encoder is stopped, the - driver resets the offset to zero. - - - .. row 2 - - - __u64 - - - ``pts`` - - - The 33 bit *Presentation Time Stamp* of this picture as defined in - :ref:`mpeg2part1`. - - - .. row 3 - - - __u32 - - - ``length`` - - - The length of this picture in bytes. - - - .. row 4 - - - __u32 - - - ``flags`` - - - Flags containing the coding type of this picture, see - :ref:`enc-idx-flags`. - - - .. row 5 - - - __u32 - - - ``reserved``\ [2] - - - Reserved for future extensions. Drivers must set the array to - zero. - - + * - __u64 + - ``offset`` + - The offset in bytes from the beginning of the compressed video + stream to the beginning of this picture, that is a *PES packet + header* as defined in :ref:`mpeg2part1` or a *picture header* as + defined in :ref:`mpeg2part2`. When the encoder is stopped, the + driver resets the offset to zero. + * - __u64 + - ``pts`` + - The 33 bit *Presentation Time Stamp* of this picture as defined in + :ref:`mpeg2part1`. + * - __u32 + - ``length`` + - The length of this picture in bytes. + * - __u32 + - ``flags`` + - Flags containing the coding type of this picture, see + :ref:`enc-idx-flags`. + * - __u32 + - ``reserved``\ [2] + - Reserved for future extensions. Drivers must set the array to + zero. + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _enc-idx-flags: @@ -167,39 +125,19 @@ video elementary streams. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_ENC_IDX_FRAME_I`` - - - 0x00 - - - This is an Intra-coded picture. - - - .. row 2 - - - ``V4L2_ENC_IDX_FRAME_P`` - - - 0x01 - - - This is a Predictive-coded picture. - - - .. row 3 - - - ``V4L2_ENC_IDX_FRAME_B`` - - - 0x02 - - - This is a Bidirectionally predictive-coded picture. - - - .. row 4 - - - ``V4L2_ENC_IDX_FRAME_MASK`` - - - 0x0F - - - *AND* the flags field with this mask to obtain the picture coding - type. + * - ``V4L2_ENC_IDX_FRAME_I`` + - 0x00 + - This is an Intra-coded picture. + * - ``V4L2_ENC_IDX_FRAME_P`` + - 0x01 + - This is a Predictive-coded picture. + * - ``V4L2_ENC_IDX_FRAME_B`` + - 0x02 + - This is a Bidirectionally predictive-coded picture. + * - ``V4L2_ENC_IDX_FRAME_MASK`` + - 0x0F + - *AND* the flags field with this mask to obtain the picture coding + type. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst b/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst index 39e24ad4b825..5ab8d2ac27b9 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-ext-ctrls.rst @@ -15,7 +15,16 @@ VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_ext_controls *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_EXT_CTRLS, struct v4l2_ext_controls *argp ) + :name: VIDIOC_G_EXT_CTRLS + + +.. c:function:: int ioctl( int fd, VIDIOC_S_EXT_CTRLS, struct v4l2_ext_controls *argp ) + :name: VIDIOC_S_EXT_CTRLS + + +.. c:function:: int ioctl( int fd, VIDIOC_TRY_EXT_CTRLS, struct v4l2_ext_controls *argp ) + :name: VIDIOC_TRY_EXT_CTRLS Arguments @@ -24,10 +33,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, - VIDIOC_TRY_EXT_CTRLS - ``argp`` @@ -41,13 +46,13 @@ to the same control class. Applications must always fill in the ``count``, ``which``, ``controls`` and ``reserved`` fields of struct -:ref:`v4l2_ext_controls <v4l2-ext-controls>`, and initialize the -struct :ref:`v4l2_ext_control <v4l2-ext-control>` array pointed to +:c:type:`v4l2_ext_controls`, and initialize the +struct :c:type:`v4l2_ext_control` array pointed to by the ``controls`` fields. To get the current value of a set of controls applications initialize the ``id``, ``size`` and ``reserved2`` fields of each struct -:ref:`v4l2_ext_control <v4l2-ext-control>` and call the +:c:type:`v4l2_ext_control` and call the :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. String controls controls must also set the ``string`` field. Controls of compound types (``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set) must set the ``ptr`` field. @@ -69,14 +74,14 @@ by calling :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`. To change the value of a set of controls applications initialize the ``id``, ``size``, ``reserved2`` and ``value/value64/string/ptr`` fields -of each struct :ref:`v4l2_ext_control <v4l2-ext-control>` and call +of each struct :c:type:`v4l2_ext_control` and call the :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. The controls will only be set if *all* control values are valid. To check if a set of controls have correct values applications initialize the ``id``, ``size``, ``reserved2`` and ``value/value64/string/ptr`` fields of each struct -:ref:`v4l2_ext_control <v4l2-ext-control>` and call the +:c:type:`v4l2_ext_control` and call the :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. It is up to the driver whether wrong values are automatically adjusted to a valid value or if an error is returned. @@ -85,7 +90,7 @@ When the ``id`` or ``which`` is invalid drivers return an ``EINVAL`` error code. When the value is out of bounds drivers can choose to take the closest valid value or return an ``ERANGE`` error code, whatever seems more appropriate. In the first case the new value is set in struct -:ref:`v4l2_ext_control <v4l2-ext-control>`. If the new control value +:c:type:`v4l2_ext_control`. If the new control value is inappropriate (e.g. the given menu index is not supported by the menu control), then this will also result in an ``EINVAL`` error code error. @@ -95,264 +100,190 @@ were set/get. Only low-level errors (e. g. a failed i2c command) can still cause this situation. -.. _v4l2-ext-control: +.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{1.5cm}|p{11.8cm}| + +.. c:type:: v4l2_ext_control + +.. cssclass: longtable .. flat-table:: struct v4l2_ext_control :header-rows: 0 :stub-columns: 0 :widths: 1 1 1 2 - - - .. row 1 - - - __u32 - - - ``id`` - - - - - Identifies the control, set by the application. - - - .. row 2 - - - __u32 - - - ``size`` - - - - - The total size in bytes of the payload of this control. This is - normally 0, but for pointer controls this should be set to the - size of the memory containing the payload, or that will receive - the payload. If :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` finds that this value is - less than is required to store the payload result, then it is set - to a value large enough to store the payload result and ``ENOSPC`` is - returned. - - .. note:: For string controls, this ``size`` field should - not be confused with the length of the string. This field refers - to the size of the memory that contains the string. The actual - *length* of the string may well be much smaller. - - - .. row 3 - - - __u32 - - - ``reserved2``\ [1] - - - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - - .. row 4 - - - union - - - (anonymous) - - - .. row 5 - - - - - __s32 - - - ``value`` - - - New value or current value. Valid if this control is not of type - ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is - not set. - - - .. row 6 - - - - - __s64 - - - ``value64`` - - - New value or current value. Valid if this control is of type - ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is - not set. - - - .. row 7 - - - - - char * - - - ``string`` - - - A pointer to a string. Valid if this control is of type - ``V4L2_CTRL_TYPE_STRING``. - - - .. row 8 - - - - - __u8 * - - - ``p_u8`` - - - A pointer to a matrix control of unsigned 8-bit values. Valid if - this control is of type ``V4L2_CTRL_TYPE_U8``. - - - .. row 9 - - - - - __u16 * - - - ``p_u16`` - - - A pointer to a matrix control of unsigned 16-bit values. Valid if - this control is of type ``V4L2_CTRL_TYPE_U16``. - - - .. row 10 - - - - - __u32 * - - - ``p_u32`` - - - A pointer to a matrix control of unsigned 32-bit values. Valid if - this control is of type ``V4L2_CTRL_TYPE_U32``. - - - .. row 11 - - - - - void * - - - ``ptr`` - - - A pointer to a compound type which can be an N-dimensional array - and/or a compound type (the control's type is >= - ``V4L2_CTRL_COMPOUND_TYPES``). Valid if - ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control. - - - -.. _v4l2-ext-controls: + * - __u32 + - ``id`` + - + - Identifies the control, set by the application. + * - __u32 + - ``size`` + - + - The total size in bytes of the payload of this control. This is + normally 0, but for pointer controls this should be set to the + size of the memory containing the payload, or that will receive + the payload. If :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` finds that this value is + less than is required to store the payload result, then it is set + to a value large enough to store the payload result and ``ENOSPC`` is + returned. + + .. note:: + + For string controls, this ``size`` field should + not be confused with the length of the string. This field refers + to the size of the memory that contains the string. The actual + *length* of the string may well be much smaller. + * - __u32 + - ``reserved2``\ [1] + - + - Reserved for future extensions. Drivers and applications must set + the array to zero. + * - union + - (anonymous) + * - + - __s32 + - ``value`` + - New value or current value. Valid if this control is not of type + ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is + not set. + * - + - __s64 + - ``value64`` + - New value or current value. Valid if this control is of type + ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is + not set. + * - + - char * + - ``string`` + - A pointer to a string. Valid if this control is of type + ``V4L2_CTRL_TYPE_STRING``. + * - + - __u8 * + - ``p_u8`` + - A pointer to a matrix control of unsigned 8-bit values. Valid if + this control is of type ``V4L2_CTRL_TYPE_U8``. + * - + - __u16 * + - ``p_u16`` + - A pointer to a matrix control of unsigned 16-bit values. Valid if + this control is of type ``V4L2_CTRL_TYPE_U16``. + * - + - __u32 * + - ``p_u32`` + - A pointer to a matrix control of unsigned 32-bit values. Valid if + this control is of type ``V4L2_CTRL_TYPE_U32``. + * - + - void * + - ``ptr`` + - A pointer to a compound type which can be an N-dimensional array + and/or a compound type (the control's type is >= + ``V4L2_CTRL_COMPOUND_TYPES``). Valid if + ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control. + + +.. tabularcolumns:: |p{4.0cm}|p{2.0cm}|p{2.0cm}|p{8.5cm}| + +.. c:type:: v4l2_ext_controls + +.. cssclass:: longtable .. flat-table:: struct v4l2_ext_controls :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 1 - - - .. row 1 - - - union - - - (anonymous) - - - .. row 2 - - - - - __u32 - - - ``ctrl_class`` - - - The control class to which all controls belong, see - :ref:`ctrl-class`. Drivers that use a kernel framework for - handling controls will also accept a value of 0 here, meaning that - the controls can belong to any control class. Whether drivers - support this can be tested by setting ``ctrl_class`` to 0 and - calling :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` with a ``count`` of 0. If that - succeeds, then the driver supports this feature. - - - .. row 3 - - - - - __u32 - - - ``which`` - - - Which value of the control to get/set/try. - ``V4L2_CTRL_WHICH_CUR_VAL`` will return the current value of the - control and ``V4L2_CTRL_WHICH_DEF_VAL`` will return the default - value of the control. - - .. note:: You can only get the default value of the control, - you cannot set or try it. - - For backwards compatibility you can also use a control class here - (see :ref:`ctrl-class`). In that case all controls have to - belong to that control class. This usage is deprecated, instead - just use ``V4L2_CTRL_WHICH_CUR_VAL``. There are some very old - drivers that do not yet support ``V4L2_CTRL_WHICH_CUR_VAL`` and - that require a control class here. You can test for such drivers - by setting ctrl_class to ``V4L2_CTRL_WHICH_CUR_VAL`` and calling - VIDIOC_TRY_EXT_CTRLS with a count of 0. If that fails, then the - driver does not support ``V4L2_CTRL_WHICH_CUR_VAL``. - - - .. row 4 - - - __u32 - - - ``count`` - - - The number of controls in the controls array. May also be zero. - - - .. row 5 - - - __u32 - - - ``error_idx`` - - - Set by the driver in case of an error. If the error is associated - with a particular control, then ``error_idx`` is set to the index - of that control. If the error is not related to a specific - control, or the validation step failed (see below), then - ``error_idx`` is set to ``count``. The value is undefined if the - ioctl returned 0 (success). - - Before controls are read from/written to hardware a validation - step takes place: this checks if all controls in the list are - valid controls, if no attempt is made to write to a read-only - control or read from a write-only control, and any other up-front - checks that can be done without accessing the hardware. The exact - validations done during this step are driver dependent since some - checks might require hardware access for some devices, thus making - it impossible to do those checks up-front. However, drivers should - make a best-effort to do as many up-front checks as possible. - - This check is done to avoid leaving the hardware in an - inconsistent state due to easy-to-avoid problems. But it leads to - another problem: the application needs to know whether an error - came from the validation step (meaning that the hardware was not - touched) or from an error during the actual reading from/writing - to hardware. - - The, in hindsight quite poor, solution for that is to set - ``error_idx`` to ``count`` if the validation failed. This has the - unfortunate side-effect that it is not possible to see which - control failed the validation. If the validation was successful - and the error happened while accessing the hardware, then - ``error_idx`` is less than ``count`` and only the controls up to - ``error_idx-1`` were read or written correctly, and the state of - the remaining controls is undefined. - - Since :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` does not access hardware there is - also no need to handle the validation step in this special way, so - ``error_idx`` will just be set to the control that failed the - validation step instead of to ``count``. This means that if - :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``, - then you can call :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` to try to discover the - actual control that failed the validation step. Unfortunately, - there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`. - - - .. row 6 - - - __u32 - - - ``reserved``\ [2] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - - .. row 7 - - - struct :ref:`v4l2_ext_control <v4l2-ext-control>` * - - - ``controls`` - - - Pointer to an array of ``count`` v4l2_ext_control structures. - Ignored if ``count`` equals zero. - - + * - union + - (anonymous) + * - + - __u32 + - ``ctrl_class`` + - The control class to which all controls belong, see + :ref:`ctrl-class`. Drivers that use a kernel framework for + handling controls will also accept a value of 0 here, meaning that + the controls can belong to any control class. Whether drivers + support this can be tested by setting ``ctrl_class`` to 0 and + calling :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` with a ``count`` of 0. If that + succeeds, then the driver supports this feature. + * - + - __u32 + - ``which`` + - Which value of the control to get/set/try. + ``V4L2_CTRL_WHICH_CUR_VAL`` will return the current value of the + control and ``V4L2_CTRL_WHICH_DEF_VAL`` will return the default + value of the control. + + .. note:: + + You can only get the default value of the control, + you cannot set or try it. + + For backwards compatibility you can also use a control class here + (see :ref:`ctrl-class`). In that case all controls have to + belong to that control class. This usage is deprecated, instead + just use ``V4L2_CTRL_WHICH_CUR_VAL``. There are some very old + drivers that do not yet support ``V4L2_CTRL_WHICH_CUR_VAL`` and + that require a control class here. You can test for such drivers + by setting ctrl_class to ``V4L2_CTRL_WHICH_CUR_VAL`` and calling + VIDIOC_TRY_EXT_CTRLS with a count of 0. If that fails, then the + driver does not support ``V4L2_CTRL_WHICH_CUR_VAL``. + * - __u32 + - ``count`` + - The number of controls in the controls array. May also be zero. + * - __u32 + - ``error_idx`` + - Set by the driver in case of an error. If the error is associated + with a particular control, then ``error_idx`` is set to the index + of that control. If the error is not related to a specific + control, or the validation step failed (see below), then + ``error_idx`` is set to ``count``. The value is undefined if the + ioctl returned 0 (success). + + Before controls are read from/written to hardware a validation + step takes place: this checks if all controls in the list are + valid controls, if no attempt is made to write to a read-only + control or read from a write-only control, and any other up-front + checks that can be done without accessing the hardware. The exact + validations done during this step are driver dependent since some + checks might require hardware access for some devices, thus making + it impossible to do those checks up-front. However, drivers should + make a best-effort to do as many up-front checks as possible. + + This check is done to avoid leaving the hardware in an + inconsistent state due to easy-to-avoid problems. But it leads to + another problem: the application needs to know whether an error + came from the validation step (meaning that the hardware was not + touched) or from an error during the actual reading from/writing + to hardware. + + The, in hindsight quite poor, solution for that is to set + ``error_idx`` to ``count`` if the validation failed. This has the + unfortunate side-effect that it is not possible to see which + control failed the validation. If the validation was successful + and the error happened while accessing the hardware, then + ``error_idx`` is less than ``count`` and only the controls up to + ``error_idx-1`` were read or written correctly, and the state of + the remaining controls is undefined. + + Since :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` does not access hardware there is + also no need to handle the validation step in this special way, so + ``error_idx`` will just be set to the control that failed the + validation step instead of to ``count``. This means that if + :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``, + then you can call :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` to try to discover the + actual control that failed the validation step. Unfortunately, + there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`. + * - __u32 + - ``reserved``\ [2] + - Reserved for future extensions. + + Drivers and applications must set the array to zero. + * - struct :c:type:`v4l2_ext_control` * + - ``controls`` + - Pointer to an array of ``count`` v4l2_ext_control structures. + + Ignored if ``count`` equals zero. + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _ctrl-class: @@ -361,99 +292,49 @@ still cause this situation. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_CTRL_CLASS_USER`` - - - 0x980000 - - - The class containing user controls. These controls are described - in :ref:`control`. All controls that can be set using the - :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and - :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this - class. - - - .. row 2 - - - ``V4L2_CTRL_CLASS_MPEG`` - - - 0x990000 - - - The class containing MPEG compression controls. These controls are - described in :ref:`mpeg-controls`. - - - .. row 3 - - - ``V4L2_CTRL_CLASS_CAMERA`` - - - 0x9a0000 - - - The class containing camera controls. These controls are described - in :ref:`camera-controls`. - - - .. row 4 - - - ``V4L2_CTRL_CLASS_FM_TX`` - - - 0x9b0000 - - - The class containing FM Transmitter (FM TX) controls. These - controls are described in :ref:`fm-tx-controls`. - - - .. row 5 - - - ``V4L2_CTRL_CLASS_FLASH`` - - - 0x9c0000 - - - The class containing flash device controls. These controls are - described in :ref:`flash-controls`. - - - .. row 6 - - - ``V4L2_CTRL_CLASS_JPEG`` - - - 0x9d0000 - - - The class containing JPEG compression controls. These controls are - described in :ref:`jpeg-controls`. - - - .. row 7 - - - ``V4L2_CTRL_CLASS_IMAGE_SOURCE`` - - - 0x9e0000 - - - The class containing image source controls. These controls are - described in :ref:`image-source-controls`. - - - .. row 8 - - - ``V4L2_CTRL_CLASS_IMAGE_PROC`` - - - 0x9f0000 - - - The class containing image processing controls. These controls are - described in :ref:`image-process-controls`. - - - .. row 9 - - - ``V4L2_CTRL_CLASS_FM_RX`` - - - 0xa10000 - - - The class containing FM Receiver (FM RX) controls. These controls - are described in :ref:`fm-rx-controls`. - - - .. row 10 - - - ``V4L2_CTRL_CLASS_RF_TUNER`` - - - 0xa20000 - - - The class containing RF tuner controls. These controls are - described in :ref:`rf-tuner-controls`. + * - ``V4L2_CTRL_CLASS_USER`` + - 0x980000 + - The class containing user controls. These controls are described + in :ref:`control`. All controls that can be set using the + :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and + :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this + class. + * - ``V4L2_CTRL_CLASS_MPEG`` + - 0x990000 + - The class containing MPEG compression controls. These controls are + described in :ref:`mpeg-controls`. + * - ``V4L2_CTRL_CLASS_CAMERA`` + - 0x9a0000 + - The class containing camera controls. These controls are described + in :ref:`camera-controls`. + * - ``V4L2_CTRL_CLASS_FM_TX`` + - 0x9b0000 + - The class containing FM Transmitter (FM TX) controls. These + controls are described in :ref:`fm-tx-controls`. + * - ``V4L2_CTRL_CLASS_FLASH`` + - 0x9c0000 + - The class containing flash device controls. These controls are + described in :ref:`flash-controls`. + * - ``V4L2_CTRL_CLASS_JPEG`` + - 0x9d0000 + - The class containing JPEG compression controls. These controls are + described in :ref:`jpeg-controls`. + * - ``V4L2_CTRL_CLASS_IMAGE_SOURCE`` + - 0x9e0000 + - The class containing image source controls. These controls are + described in :ref:`image-source-controls`. + * - ``V4L2_CTRL_CLASS_IMAGE_PROC`` + - 0x9f0000 + - The class containing image processing controls. These controls are + described in :ref:`image-process-controls`. + * - ``V4L2_CTRL_CLASS_FM_RX`` + - 0xa10000 + - The class containing FM Receiver (FM RX) controls. These controls + are described in :ref:`fm-rx-controls`. + * - ``V4L2_CTRL_CLASS_RF_TUNER`` + - 0xa20000 + - The class containing RF tuner controls. These controls are + described in :ref:`rf-tuner-controls`. Return Value @@ -464,17 +345,17 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_ext_control <v4l2-ext-control>` ``id`` is - invalid, the struct :ref:`v4l2_ext_controls <v4l2-ext-controls>` + The struct :c:type:`v4l2_ext_control` ``id`` is + invalid, the struct :c:type:`v4l2_ext_controls` ``which`` is invalid, or the struct - :ref:`v4l2_ext_control <v4l2-ext-control>` ``value`` was + :c:type:`v4l2_ext_control` ``value`` was inappropriate (e.g. the given menu index is not supported by the driver). This error code is also returned by the :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctls if two or more control values are in conflict. ERANGE - The struct :ref:`v4l2_ext_control <v4l2-ext-control>` ``value`` + The struct :c:type:`v4l2_ext_control` ``value`` is out of bounds. EBUSY diff --git a/Documentation/media/uapi/v4l/vidioc-g-fbuf.rst b/Documentation/media/uapi/v4l/vidioc-g-fbuf.rst index d182d9f5a50d..4a6a03d158ca 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-fbuf.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-fbuf.rst @@ -15,9 +15,11 @@ VIDIOC_G_FBUF - VIDIOC_S_FBUF - Get or set frame buffer overlay parameters Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_framebuffer *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_FBUF, struct v4l2_framebuffer *argp ) + :name: VIDIOC_G_FBUF -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_framebuffer *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_FBUF, const struct v4l2_framebuffer *argp ) + :name: VIDIOC_S_FBUF Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_FBUF, VIDIOC_S_FBUF - ``argp`` @@ -50,13 +49,13 @@ VGA signal or graphics into a video signal. *Video Output Overlays* are always non-destructive. To get the current parameters applications call the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` -ioctl with a pointer to a :ref:`struct v4l2_framebuffer <v4l2-framebuffer>` +ioctl with a pointer to a struct :c:type:`v4l2_framebuffer` structure. The driver fills all fields of the structure or returns an EINVAL error code when overlays are not supported. To set the parameters for a *Video Output Overlay*, applications must initialize the ``flags`` field of a struct -:ref:`struct v4l2_framebuffer <v4l2-framebuffer>`. Since the framebuffer is +struct :c:type:`v4l2_framebuffer`. Since the framebuffer is implemented on the TV card all other parameters are determined by the driver. When an application calls :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` with a pointer to this structure, the driver prepares for the overlay and returns the @@ -76,210 +75,140 @@ hardware, therefore only the superuser can set the parameters for a destructive video overlay. -.. _v4l2-framebuffer: +.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| + +.. c:type:: v4l2_framebuffer + +.. cssclass:: longtable .. flat-table:: struct v4l2_framebuffer :header-rows: 0 :stub-columns: 0 :widths: 1 1 1 2 - - - .. row 1 - - - __u32 - - - ``capability`` - - - - - Overlay capability flags set by the driver, see - :ref:`framebuffer-cap`. - - - .. row 2 - - - __u32 - - - ``flags`` - - - - - Overlay control flags set by application and driver, see - :ref:`framebuffer-flags` - - - .. row 3 - - - void * - - - ``base`` - - - - - Physical base address of the framebuffer, that is the address of - the pixel in the top left corner of the framebuffer. [#f1]_ - - - .. row 4 - - - - - - - - - This field is irrelevant to *non-destructive Video Overlays*. For - *destructive Video Overlays* applications must provide a base - address. The driver may accept only base addresses which are a - multiple of two, four or eight bytes. For *Video Output Overlays* - the driver must return a valid base address, so applications can - find the corresponding Linux framebuffer device (see - :ref:`osd`). - - - .. row 5 - - - struct - - - ``fmt`` - - - - - Layout of the frame buffer. - - - .. row 6 - - - - - __u32 - - - ``width`` - - - Width of the frame buffer in pixels. - - - .. row 7 - - - - - __u32 - - - ``height`` - - - Height of the frame buffer in pixels. - - - .. row 8 - - - - - __u32 - - - ``pixelformat`` - - - The pixel format of the framebuffer. - - - .. row 9 - - - - - - - - - For *non-destructive Video Overlays* this field only defines a - format for the struct :ref:`v4l2_window <v4l2-window>` - ``chromakey`` field. - - - .. row 10 - - - - - - - - - For *destructive Video Overlays* applications must initialize this - field. For *Video Output Overlays* the driver must return a valid - format. - - - .. row 11 - - - - - - - - - Usually this is an RGB format (for example - :ref:`V4L2_PIX_FMT_RGB565 <V4L2-PIX-FMT-RGB565>`) but YUV - formats (only packed YUV formats when chroma keying is used, not - including ``V4L2_PIX_FMT_YUYV`` and ``V4L2_PIX_FMT_UYVY``) and the - ``V4L2_PIX_FMT_PAL8`` format are also permitted. The behavior of - the driver when an application requests a compressed format is - undefined. See :ref:`pixfmt` for information on pixel formats. - - - .. row 12 - - - - - enum :ref:`v4l2_field <v4l2-field>` - - - ``field`` - - - Drivers and applications shall ignore this field. If applicable, - the field order is selected with the - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, using the ``field`` - field of struct :ref:`v4l2_window <v4l2-window>`. - - - .. row 13 - - - - - __u32 - - - ``bytesperline`` - - - Distance in bytes between the leftmost pixels in two adjacent - lines. - - - .. row 14 - - - :cspan:`3` - - This field is irrelevant to *non-destructive Video Overlays*. - - For *destructive Video Overlays* both applications and drivers can - set this field to request padding bytes at the end of each line. - Drivers however may ignore the requested value, returning - ``width`` times bytes-per-pixel or a larger value required by the - hardware. That implies applications can just set this field to - zero to get a reasonable default. - - For *Video Output Overlays* the driver must return a valid value. - - Video hardware may access padding bytes, therefore they must - reside in accessible memory. Consider for example the case where - padding bytes after the last line of an image cross a system page - boundary. Capture devices may write padding bytes, the value is - undefined. Output devices ignore the contents of padding bytes. - - When the image format is planar the ``bytesperline`` value applies - to the first plane and is divided by the same factor as the - ``width`` field for the other planes. For example the Cb and Cr - planes of a YUV 4:2:0 image have half as many padding bytes - following each line as the Y plane. To avoid ambiguities drivers - must return a ``bytesperline`` value rounded up to a multiple of - the scale factor. - - - .. row 15 - - - - - __u32 - - - ``sizeimage`` - - - This field is irrelevant to *non-destructive Video Overlays*. For - *destructive Video Overlays* applications must initialize this - field. For *Video Output Overlays* the driver must return a valid - format. - - Together with ``base`` it defines the framebuffer memory - accessible by the driver. - - - .. row 16 - - - - - enum :ref:`v4l2_colorspace <v4l2-colorspace>` - - - ``colorspace`` - - - This information supplements the ``pixelformat`` and must be set - by the driver, see :ref:`colorspaces`. - - - .. row 17 - - - - - __u32 - - - ``priv`` - - - Reserved. Drivers and applications must set this field to zero. - - + * - __u32 + - ``capability`` + - + - Overlay capability flags set by the driver, see + :ref:`framebuffer-cap`. + * - __u32 + - ``flags`` + - + - Overlay control flags set by application and driver, see + :ref:`framebuffer-flags` + * - void * + - ``base`` + - + - Physical base address of the framebuffer, that is the address of + the pixel in the top left corner of the framebuffer. [#f1]_ + * - + - + - + - This field is irrelevant to *non-destructive Video Overlays*. For + *destructive Video Overlays* applications must provide a base + address. The driver may accept only base addresses which are a + multiple of two, four or eight bytes. For *Video Output Overlays* + the driver must return a valid base address, so applications can + find the corresponding Linux framebuffer device (see + :ref:`osd`). + * - struct + - ``fmt`` + - + - Layout of the frame buffer. + * - + - __u32 + - ``width`` + - Width of the frame buffer in pixels. + * - + - __u32 + - ``height`` + - Height of the frame buffer in pixels. + * - + - __u32 + - ``pixelformat`` + - The pixel format of the framebuffer. + * - + - + - + - For *non-destructive Video Overlays* this field only defines a + format for the struct :c:type:`v4l2_window` + ``chromakey`` field. + * - + - + - + - For *destructive Video Overlays* applications must initialize this + field. For *Video Output Overlays* the driver must return a valid + format. + * - + - + - + - Usually this is an RGB format (for example + :ref:`V4L2_PIX_FMT_RGB565 <V4L2-PIX-FMT-RGB565>`) but YUV + formats (only packed YUV formats when chroma keying is used, not + including ``V4L2_PIX_FMT_YUYV`` and ``V4L2_PIX_FMT_UYVY``) and the + ``V4L2_PIX_FMT_PAL8`` format are also permitted. The behavior of + the driver when an application requests a compressed format is + undefined. See :ref:`pixfmt` for information on pixel formats. + * - + - enum :c:type:`v4l2_field` + - ``field`` + - Drivers and applications shall ignore this field. If applicable, + the field order is selected with the + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, using the ``field`` + field of struct :c:type:`v4l2_window`. + * - + - __u32 + - ``bytesperline`` + - Distance in bytes between the leftmost pixels in two adjacent + lines. + * - :cspan:`3` + + This field is irrelevant to *non-destructive Video Overlays*. + + For *destructive Video Overlays* both applications and drivers can + set this field to request padding bytes at the end of each line. + Drivers however may ignore the requested value, returning + ``width`` times bytes-per-pixel or a larger value required by the + hardware. That implies applications can just set this field to + zero to get a reasonable default. + + For *Video Output Overlays* the driver must return a valid value. + + Video hardware may access padding bytes, therefore they must + reside in accessible memory. Consider for example the case where + padding bytes after the last line of an image cross a system page + boundary. Capture devices may write padding bytes, the value is + undefined. Output devices ignore the contents of padding bytes. + + When the image format is planar the ``bytesperline`` value applies + to the first plane and is divided by the same factor as the + ``width`` field for the other planes. For example the Cb and Cr + planes of a YUV 4:2:0 image have half as many padding bytes + following each line as the Y plane. To avoid ambiguities drivers + must return a ``bytesperline`` value rounded up to a multiple of + the scale factor. + * - + - __u32 + - ``sizeimage`` + - This field is irrelevant to *non-destructive Video Overlays*. For + *destructive Video Overlays* applications must initialize this + field. For *Video Output Overlays* the driver must return a valid + format. + + Together with ``base`` it defines the framebuffer memory + accessible by the driver. + * - + - enum :c:type:`v4l2_colorspace` + - ``colorspace`` + - This information supplements the ``pixelformat`` and must be set + by the driver, see :ref:`colorspaces`. + * - + - __u32 + - ``priv`` + - Reserved. Drivers and applications must set this field to zero. + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _framebuffer-cap: @@ -288,194 +217,119 @@ destructive video overlay. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_FBUF_CAP_EXTERNOVERLAY`` - - - 0x0001 - - - The device is capable of non-destructive overlays. When the driver - clears this flag, only destructive overlays are supported. There - are no drivers yet which support both destructive and - non-destructive overlays. Video Output Overlays are in practice - always non-destructive. - - - .. row 2 - - - ``V4L2_FBUF_CAP_CHROMAKEY`` - - - 0x0002 - - - The device supports clipping by chroma-keying the images. That is, - image pixels replace pixels in the VGA or video signal only where - the latter assume a certain color. Chroma-keying makes no sense - for destructive overlays. - - - .. row 3 - - - ``V4L2_FBUF_CAP_LIST_CLIPPING`` - - - 0x0004 - - - The device supports clipping using a list of clip rectangles. - - - .. row 4 - - - ``V4L2_FBUF_CAP_BITMAP_CLIPPING`` - - - 0x0008 - - - The device supports clipping using a bit mask. - - - .. row 5 - - - ``V4L2_FBUF_CAP_LOCAL_ALPHA`` - - - 0x0010 - - - The device supports clipping/blending using the alpha channel of - the framebuffer or VGA signal. Alpha blending makes no sense for - destructive overlays. - - - .. row 6 - - - ``V4L2_FBUF_CAP_GLOBAL_ALPHA`` - - - 0x0020 - - - The device supports alpha blending using a global alpha value. - Alpha blending makes no sense for destructive overlays. - - - .. row 7 - - - ``V4L2_FBUF_CAP_LOCAL_INV_ALPHA`` - - - 0x0040 - - - The device supports clipping/blending using the inverted alpha - channel of the framebuffer or VGA signal. Alpha blending makes no - sense for destructive overlays. - - - .. row 8 - - - ``V4L2_FBUF_CAP_SRC_CHROMAKEY`` - - - 0x0080 - - - The device supports Source Chroma-keying. Video pixels with the - chroma-key colors are replaced by framebuffer pixels, which is - exactly opposite of ``V4L2_FBUF_CAP_CHROMAKEY`` - - + * - ``V4L2_FBUF_CAP_EXTERNOVERLAY`` + - 0x0001 + - The device is capable of non-destructive overlays. When the driver + clears this flag, only destructive overlays are supported. There + are no drivers yet which support both destructive and + non-destructive overlays. Video Output Overlays are in practice + always non-destructive. + * - ``V4L2_FBUF_CAP_CHROMAKEY`` + - 0x0002 + - The device supports clipping by chroma-keying the images. That is, + image pixels replace pixels in the VGA or video signal only where + the latter assume a certain color. Chroma-keying makes no sense + for destructive overlays. + * - ``V4L2_FBUF_CAP_LIST_CLIPPING`` + - 0x0004 + - The device supports clipping using a list of clip rectangles. + * - ``V4L2_FBUF_CAP_BITMAP_CLIPPING`` + - 0x0008 + - The device supports clipping using a bit mask. + * - ``V4L2_FBUF_CAP_LOCAL_ALPHA`` + - 0x0010 + - The device supports clipping/blending using the alpha channel of + the framebuffer or VGA signal. Alpha blending makes no sense for + destructive overlays. + * - ``V4L2_FBUF_CAP_GLOBAL_ALPHA`` + - 0x0020 + - The device supports alpha blending using a global alpha value. + Alpha blending makes no sense for destructive overlays. + * - ``V4L2_FBUF_CAP_LOCAL_INV_ALPHA`` + - 0x0040 + - The device supports clipping/blending using the inverted alpha + channel of the framebuffer or VGA signal. Alpha blending makes no + sense for destructive overlays. + * - ``V4L2_FBUF_CAP_SRC_CHROMAKEY`` + - 0x0080 + - The device supports Source Chroma-keying. Video pixels with the + chroma-key colors are replaced by framebuffer pixels, which is + exactly opposite of ``V4L2_FBUF_CAP_CHROMAKEY`` + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _framebuffer-flags: +.. cssclass:: longtable + .. flat-table:: Frame Buffer Flags :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_FBUF_FLAG_PRIMARY`` - - - 0x0001 - - - The framebuffer is the primary graphics surface. In other words, - the overlay is destructive. This flag is typically set by any - driver that doesn't have the ``V4L2_FBUF_CAP_EXTERNOVERLAY`` - capability and it is cleared otherwise. - - - .. row 2 - - - ``V4L2_FBUF_FLAG_OVERLAY`` - - - 0x0002 - - - If this flag is set for a video capture device, then the driver - will set the initial overlay size to cover the full framebuffer - size, otherwise the existing overlay size (as set by - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) will be used. Only one - video capture driver (bttv) supports this flag. The use of this - flag for capture devices is deprecated. There is no way to detect - which drivers support this flag, so the only reliable method of - setting the overlay size is through - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. If this flag is set for a - video output device, then the video output overlay window is - relative to the top-left corner of the framebuffer and restricted - to the size of the framebuffer. If it is cleared, then the video - output overlay window is relative to the video output display. - - - .. row 3 - - - ``V4L2_FBUF_FLAG_CHROMAKEY`` - - - 0x0004 - - - Use chroma-keying. The chroma-key color is determined by the - ``chromakey`` field of struct :ref:`v4l2_window <v4l2-window>` - and negotiated with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` - ioctl, see :ref:`overlay` and :ref:`osd`. - - - .. row 4 - - - :cspan:`2` There are no flags to enable clipping using a list of - clip rectangles or a bitmap. These methods are negotiated with the - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay` - and :ref:`osd`. - - - .. row 5 - - - ``V4L2_FBUF_FLAG_LOCAL_ALPHA`` - - - 0x0008 - - - Use the alpha channel of the framebuffer to clip or blend - framebuffer pixels with video images. The blend function is: - output = framebuffer pixel * alpha + video pixel * (1 - alpha). - The actual alpha depth depends on the framebuffer pixel format. - - - .. row 6 - - - ``V4L2_FBUF_FLAG_GLOBAL_ALPHA`` - - - 0x0010 - - - Use a global alpha value to blend the framebuffer with video - images. The blend function is: output = (framebuffer pixel * alpha - + video pixel * (255 - alpha)) / 255. The alpha value is - determined by the ``global_alpha`` field of struct - :ref:`v4l2_window <v4l2-window>` and negotiated with the - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay` - and :ref:`osd`. - - - .. row 7 - - - ``V4L2_FBUF_FLAG_LOCAL_INV_ALPHA`` - - - 0x0020 - - - Like ``V4L2_FBUF_FLAG_LOCAL_ALPHA``, use the alpha channel of the - framebuffer to clip or blend framebuffer pixels with video images, - but with an inverted alpha value. The blend function is: output = - framebuffer pixel * (1 - alpha) + video pixel * alpha. The actual - alpha depth depends on the framebuffer pixel format. - - - .. row 8 - - - ``V4L2_FBUF_FLAG_SRC_CHROMAKEY`` - - - 0x0040 - - - Use source chroma-keying. The source chroma-key color is - determined by the ``chromakey`` field of struct - :ref:`v4l2_window <v4l2-window>` and negotiated with the - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay` - and :ref:`osd`. Both chroma-keying are mutual exclusive to each - other, so same ``chromakey`` field of struct - :ref:`v4l2_window <v4l2-window>` is being used. + * - ``V4L2_FBUF_FLAG_PRIMARY`` + - 0x0001 + - The framebuffer is the primary graphics surface. In other words, + the overlay is destructive. This flag is typically set by any + driver that doesn't have the ``V4L2_FBUF_CAP_EXTERNOVERLAY`` + capability and it is cleared otherwise. + * - ``V4L2_FBUF_FLAG_OVERLAY`` + - 0x0002 + - If this flag is set for a video capture device, then the driver + will set the initial overlay size to cover the full framebuffer + size, otherwise the existing overlay size (as set by + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`) will be used. Only one + video capture driver (bttv) supports this flag. The use of this + flag for capture devices is deprecated. There is no way to detect + which drivers support this flag, so the only reliable method of + setting the overlay size is through + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. If this flag is set for a + video output device, then the video output overlay window is + relative to the top-left corner of the framebuffer and restricted + to the size of the framebuffer. If it is cleared, then the video + output overlay window is relative to the video output display. + * - ``V4L2_FBUF_FLAG_CHROMAKEY`` + - 0x0004 + - Use chroma-keying. The chroma-key color is determined by the + ``chromakey`` field of struct :c:type:`v4l2_window` + and negotiated with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` + ioctl, see :ref:`overlay` and :ref:`osd`. + * - :cspan:`2` There are no flags to enable clipping using a list of + clip rectangles or a bitmap. These methods are negotiated with the + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay` + and :ref:`osd`. + * - ``V4L2_FBUF_FLAG_LOCAL_ALPHA`` + - 0x0008 + - Use the alpha channel of the framebuffer to clip or blend + framebuffer pixels with video images. The blend function is: + output = framebuffer pixel * alpha + video pixel * (1 - alpha). + The actual alpha depth depends on the framebuffer pixel format. + * - ``V4L2_FBUF_FLAG_GLOBAL_ALPHA`` + - 0x0010 + - Use a global alpha value to blend the framebuffer with video + images. The blend function is: output = (framebuffer pixel * alpha + + video pixel * (255 - alpha)) / 255. The alpha value is + determined by the ``global_alpha`` field of struct + :c:type:`v4l2_window` and negotiated with the + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay` + and :ref:`osd`. + * - ``V4L2_FBUF_FLAG_LOCAL_INV_ALPHA`` + - 0x0020 + - Like ``V4L2_FBUF_FLAG_LOCAL_ALPHA``, use the alpha channel of the + framebuffer to clip or blend framebuffer pixels with video images, + but with an inverted alpha value. The blend function is: output = + framebuffer pixel * (1 - alpha) + video pixel * alpha. The actual + alpha depth depends on the framebuffer pixel format. + * - ``V4L2_FBUF_FLAG_SRC_CHROMAKEY`` + - 0x0040 + - Use source chroma-keying. The source chroma-key color is + determined by the ``chromakey`` field of struct + :c:type:`v4l2_window` and negotiated with the + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay` + and :ref:`osd`. Both chroma-keying are mutual exclusive to each + other, so same ``chromakey`` field of struct + :c:type:`v4l2_window` is being used. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-fmt.rst b/Documentation/media/uapi/v4l/vidioc-g-fmt.rst index ee6f11978fd6..b853e48312e2 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-fmt.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-fmt.rst @@ -15,8 +15,14 @@ VIDIOC_G_FMT - VIDIOC_S_FMT - VIDIOC_TRY_FMT - Get or set the data format, try a Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_format *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_FMT, struct v4l2_format *argp ) + :name: VIDIOC_G_FMT +.. c:function:: int ioctl( int fd, VIDIOC_S_FMT, struct v4l2_format *argp ) + :name: VIDIOC_S_FMT + +.. c:function:: int ioctl( int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp ) + :name: VIDIOC_TRY_FMT Arguments ========= @@ -24,9 +30,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT - ``argp`` @@ -37,15 +40,15 @@ These ioctls are used to negotiate the format of data (typically image format) exchanged between driver and application. To query the current parameters applications set the ``type`` field of a -struct :ref:`struct v4l2_format <v4l2-format>` to the respective buffer (stream) +struct :c:type:`v4l2_format` to the respective buffer (stream) type. For example video capture devices use ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. When the application calls the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure the driver fills the respective member of the ``fmt`` union. In case of video capture devices that is either the struct -:ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct -:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp`` +:c:type:`v4l2_pix_format` ``pix`` or the struct +:c:type:`v4l2_pix_format_mplane` ``pix_mp`` member. When the requested buffer type is not supported drivers return an ``EINVAL`` error code. @@ -55,7 +58,7 @@ For details see the documentation of the various devices types in :ref:`devices`. Good practice is to query the current parameters first, and to modify only those parameters not suitable for the application. When the application calls the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with -a pointer to a :ref:`struct v4l2_format <v4l2-format>` structure the driver +a pointer to a struct :c:type:`v4l2_format` structure the driver checks and adjusts the parameters against hardware abilities. Drivers should not return an error code unless the ``type`` field is invalid, this is a mechanism to fathom device capabilities and to approach @@ -82,98 +85,56 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` returns for the same input or output. -.. _v4l2-format: +.. c:type:: v4l2_format + +.. tabularcolumns:: |p{1.2cm}|p{4.3cm}|p{3.0cm}|p{9.0cm}| .. flat-table:: struct v4l2_format :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - __u32 - - - ``type`` - - - - - Type of the data stream, see :ref:`v4l2-buf-type`. - - - .. row 2 - - - union - - - ``fmt`` - - - .. row 3 - - - - - struct :ref:`v4l2_pix_format <v4l2-pix-format>` - - - ``pix`` - - - Definition of an image format, see :ref:`pixfmt`, used by video - capture and output devices. - - - .. row 4 - - - - - struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` - - - ``pix_mp`` - - - Definition of an image format, see :ref:`pixfmt`, used by video - capture and output devices that support the - :ref:`multi-planar version of the API <planar-apis>`. - - - .. row 5 - - - - - struct :ref:`v4l2_window <v4l2-window>` - - - ``win`` - - - Definition of an overlaid image, see :ref:`overlay`, used by - video overlay devices. - - - .. row 6 - - - - - struct :ref:`v4l2_vbi_format <v4l2-vbi-format>` - - - ``vbi`` - - - Raw VBI capture or output parameters. This is discussed in more - detail in :ref:`raw-vbi`. Used by raw VBI capture and output - devices. - - - .. row 7 - - - - - struct :ref:`v4l2_sliced_vbi_format <v4l2-sliced-vbi-format>` - - - ``sliced`` - - - Sliced VBI capture or output parameters. See :ref:`sliced` for - details. Used by sliced VBI capture and output devices. - - - .. row 8 - - - - - struct :ref:`v4l2_sdr_format <v4l2-sdr-format>` - - - ``sdr`` - - - Definition of a data format, see :ref:`pixfmt`, used by SDR - capture and output devices. - - - .. row 9 - - - - - __u8 - - - ``raw_data``\ [200] - - - Place holder for future extensions. + * - __u32 + - ``type`` + - + - Type of the data stream, see :c:type:`v4l2_buf_type`. + * - union + - ``fmt`` + * - + - struct :c:type:`v4l2_pix_format` + - ``pix`` + - Definition of an image format, see :ref:`pixfmt`, used by video + capture and output devices. + * - + - struct :c:type:`v4l2_pix_format_mplane` + - ``pix_mp`` + - Definition of an image format, see :ref:`pixfmt`, used by video + capture and output devices that support the + :ref:`multi-planar version of the API <planar-apis>`. + * - + - struct :c:type:`v4l2_window` + - ``win`` + - Definition of an overlaid image, see :ref:`overlay`, used by + video overlay devices. + * - + - struct :c:type:`v4l2_vbi_format` + - ``vbi`` + - Raw VBI capture or output parameters. This is discussed in more + detail in :ref:`raw-vbi`. Used by raw VBI capture and output + devices. + * - + - struct :c:type:`v4l2_sliced_vbi_format` + - ``sliced`` + - Sliced VBI capture or output parameters. See :ref:`sliced` for + details. Used by sliced VBI capture and output devices. + * - + - struct :c:type:`v4l2_sdr_format` + - ``sdr`` + - Definition of a data format, see :ref:`pixfmt`, used by SDR + capture and output devices. + * - + - __u8 + - ``raw_data``\ [200] + - Place holder for future extensions. Return Value @@ -184,5 +145,5 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_format <v4l2-format>` ``type`` field is + The struct :c:type:`v4l2_format` ``type`` field is invalid or the requested buffer type not supported. diff --git a/Documentation/media/uapi/v4l/vidioc-g-frequency.rst b/Documentation/media/uapi/v4l/vidioc-g-frequency.rst index a1fd2a870de4..46ab276f412b 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-frequency.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-frequency.rst @@ -15,9 +15,11 @@ VIDIOC_G_FREQUENCY - VIDIOC_S_FREQUENCY - Get or set tuner or modulator radio fr Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_frequency *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_FREQUENCY, struct v4l2_frequency *argp ) + :name: VIDIOC_G_FREQUENCY -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_frequency *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_FREQUENCY, const struct v4l2_frequency *argp ) + :name: VIDIOC_S_FREQUENCY Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY - ``argp`` @@ -37,7 +36,7 @@ Description To get the current tuner or modulator radio frequency applications set the ``tuner`` field of a struct -:ref:`v4l2_frequency <v4l2-frequency>` to the respective tuner or +:c:type:`v4l2_frequency` to the respective tuner or modulator number (only input devices have tuners, only output devices have modulators), zero out the ``reserved`` array and call the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl with a pointer to this structure. The @@ -45,67 +44,49 @@ driver stores the current frequency in the ``frequency`` field. To change the current tuner or modulator radio frequency applications initialize the ``tuner``, ``type`` and ``frequency`` fields, and the -``reserved`` array of a struct :ref:`v4l2_frequency <v4l2-frequency>` +``reserved`` array of a struct :c:type:`v4l2_frequency` and call the :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl with a pointer to this structure. When the requested frequency is not possible the driver assumes the closest possible value. However :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` is a write-only ioctl, it does not return the actual new frequency. -.. _v4l2-frequency: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_frequency .. flat-table:: struct v4l2_frequency :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``tuner`` - - - The tuner or modulator index number. This is the same value as in - the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and - the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or - the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field - and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index`` - field. - - - .. row 2 - - - __u32 - - - ``type`` - - - The tuner type. This is the same value as in the struct - :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be - set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and - to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to - ``V4L2_TUNER_RADIO`` for modulators (currently only radio - modulators are supported). See :ref:`v4l2-tuner-type` - - - .. row 3 - - - __u32 - - - ``frequency`` - - - Tuning frequency in units of 62.5 kHz, or if the struct - :ref:`v4l2_tuner <v4l2-tuner>` or struct - :ref:`v4l2_modulator <v4l2-modulator>` ``capability`` flag - ``V4L2_TUNER_CAP_LOW`` is set, in units of 62.5 Hz. A 1 Hz unit is - used when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. - - - .. row 4 - - - __u32 - - - ``reserved``\ [8] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. + * - __u32 + - ``tuner`` + - The tuner or modulator index number. This is the same value as in + the struct :c:type:`v4l2_input` ``tuner`` field and + the struct :c:type:`v4l2_tuner` ``index`` field, or + the struct :c:type:`v4l2_output` ``modulator`` field + and the struct :c:type:`v4l2_modulator` ``index`` + field. + * - __u32 + - ``type`` + - The tuner type. This is the same value as in the struct + :c:type:`v4l2_tuner` ``type`` field. The type must be + set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and + to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to + ``V4L2_TUNER_RADIO`` for modulators (currently only radio + modulators are supported). See :c:type:`v4l2_tuner_type` + * - __u32 + - ``frequency`` + - Tuning frequency in units of 62.5 kHz, or if the struct + :c:type:`v4l2_tuner` or struct + :c:type:`v4l2_modulator` ``capability`` flag + ``V4L2_TUNER_CAP_LOW`` is set, in units of 62.5 Hz. A 1 Hz unit is + used when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. + * - __u32 + - ``reserved``\ [8] + - Reserved for future extensions. Drivers and applications must set + the array to zero. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-input.rst b/Documentation/media/uapi/v4l/vidioc-g-input.rst index 29e22f6f8028..1364a918fbce 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-input.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-input.rst @@ -15,7 +15,11 @@ VIDIOC_G_INPUT - VIDIOC_S_INPUT - Query or select the current video input Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, int *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_INPUT, int *argp ) + :name: VIDIOC_G_INPUT + +.. c:function:: int ioctl( int fd, VIDIOC_S_INPUT, int *argp ) + :name: VIDIOC_S_INPUT Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_INPUT, VIDIOC_S_INPUT - ``argp`` @@ -36,7 +37,7 @@ Description To query the current video input applications call the :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver stores the number of the input, as in the struct -:ref:`v4l2_input <v4l2-input>` ``index`` field. This ioctl will fail +:c:type:`v4l2_input` ``index`` field. This ioctl will fail only when there are no video inputs, returning ``EINVAL``. To select a video input applications store the number of the desired diff --git a/Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst b/Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst index f5bf8b7915ed..8ba353067b33 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-jpegcomp.rst @@ -15,9 +15,11 @@ VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, v4l2_jpegcompression *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp ) + :name: VIDIOC_G_JPEGCOMP -.. cpp:function:: int ioctl( int fd, int request, const v4l2_jpegcompression *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp ) + :name: VIDIOC_S_JPEGCOMP Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP - ``argp`` @@ -55,77 +54,45 @@ encoded. If you omit them, applications assume you've used standard encoding. You usually do want to add them. -.. _v4l2-jpegcompression: +.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| + +.. c:type:: v4l2_jpegcompression .. flat-table:: struct v4l2_jpegcompression :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - int - - - ``quality`` - - - Deprecated. If - :ref:`V4L2_CID_JPEG_COMPRESSION_QUALITY <jpeg-quality-control>` - control is exposed by a driver applications should use it instead - and ignore this field. - - - .. row 2 - - - int - - - ``APPn`` - - - - - - .. row 3 - - - int - - - ``APP_len`` - - - - - - .. row 4 - - - char - - - ``APP_data``\ [60] - - - - - - .. row 5 - - - int - - - ``COM_len`` - - - - - - .. row 6 - - - char - - - ``COM_data``\ [60] - - - - - - .. row 7 - - - __u32 - - - ``jpeg_markers`` - - - See :ref:`jpeg-markers`. Deprecated. If - :ref:`V4L2_CID_JPEG_ACTIVE_MARKER <jpeg-active-marker-control>` - control is exposed by a driver applications should use it instead - and ignore this field. - - + * - int + - ``quality`` + - Deprecated. If + :ref:`V4L2_CID_JPEG_COMPRESSION_QUALITY <jpeg-quality-control>` + control is exposed by a driver applications should use it instead + and ignore this field. + * - int + - ``APPn`` + - + * - int + - ``APP_len`` + - + * - char + - ``APP_data``\ [60] + - + * - int + - ``COM_len`` + - + * - char + - ``COM_data``\ [60] + - + * - __u32 + - ``jpeg_markers`` + - See :ref:`jpeg-markers`. Deprecated. If + :ref:`V4L2_CID_JPEG_ACTIVE_MARKER <jpeg-active-marker-control>` + control is exposed by a driver applications should use it instead + and ignore this field. + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _jpeg-markers: @@ -134,46 +101,21 @@ encoding. You usually do want to add them. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_JPEG_MARKER_DHT`` - - - (1<<3) - - - Define Huffman Tables - - - .. row 2 - - - ``V4L2_JPEG_MARKER_DQT`` - - - (1<<4) - - - Define Quantization Tables - - - .. row 3 - - - ``V4L2_JPEG_MARKER_DRI`` - - - (1<<5) - - - Define Restart Interval - - - .. row 4 - - - ``V4L2_JPEG_MARKER_COM`` - - - (1<<6) - - - Comment segment - - - .. row 5 - - - ``V4L2_JPEG_MARKER_APP`` - - - (1<<7) - - - App segment, driver will always use APP0 + * - ``V4L2_JPEG_MARKER_DHT`` + - (1<<3) + - Define Huffman Tables + * - ``V4L2_JPEG_MARKER_DQT`` + - (1<<4) + - Define Quantization Tables + * - ``V4L2_JPEG_MARKER_DRI`` + - (1<<5) + - Define Restart Interval + * - ``V4L2_JPEG_MARKER_COM`` + - (1<<6) + - Comment segment + * - ``V4L2_JPEG_MARKER_APP`` + - (1<<7) + - App segment, driver will always use APP0 Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-modulator.rst b/Documentation/media/uapi/v4l/vidioc-g-modulator.rst index a2e8c73f0678..77d017eb3fcc 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-modulator.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-modulator.rst @@ -15,9 +15,11 @@ VIDIOC_G_MODULATOR - VIDIOC_S_MODULATOR - Get or set modulator attributes Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_modulator *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_MODULATOR, struct v4l2_modulator *argp ) + :name: VIDIOC_G_MODULATOR -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_modulator *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_MODULATOR, const struct v4l2_modulator *argp ) + :name: VIDIOC_S_MODULATOR Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR - ``argp`` @@ -37,7 +36,7 @@ Description To query the attributes of a modulator applications initialize the ``index`` field and zero out the ``reserved`` array of a struct -:ref:`v4l2_modulator <v4l2-modulator>` and call the +:c:type:`v4l2_modulator` and call the :ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all modulators applications shall @@ -61,100 +60,68 @@ To change the radio frequency the :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. -.. _v4l2-modulator: +.. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| + +.. c:type:: v4l2_modulator .. flat-table:: struct v4l2_modulator :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 1 1 - - - .. row 1 - - - __u32 - - - ``index`` - - - Identifies the modulator, set by the application. - - - .. row 2 - - - __u8 - - - ``name``\ [32] - - - Name of the modulator, a NUL-terminated ASCII string. This - information is intended for the user. - - - .. row 3 - - - __u32 - - - ``capability`` - - - Modulator capability flags. No flags are defined for this field, - the tuner flags in struct :ref:`v4l2_tuner <v4l2-tuner>` are - used accordingly. The audio flags indicate the ability to encode - audio subprograms. They will *not* change for example with the - current video standard. - - - .. row 4 - - - __u32 - - - ``rangelow`` - - - The lowest tunable frequency in units of 62.5 KHz, or if the - ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of - 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is - set, in units of 1 Hz. - - - .. row 5 - - - __u32 - - - ``rangehigh`` - - - The highest tunable frequency in units of 62.5 KHz, or if the - ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of - 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is - set, in units of 1 Hz. - - - .. row 6 - - - __u32 - - - ``txsubchans`` - - - With this field applications can determine how audio sub-carriers - shall be modulated. It contains a set of flags as defined in - :ref:`modulator-txsubchans`. - - .. note:: The tuner ``rxsubchans`` flags are reused, but the - semantics are different. Video output devices - are assumed to have an analog or PCM audio input with 1-3 - channels. The ``txsubchans`` flags select one or more channels - for modulation, together with some audio subprogram indicator, - for example, a stereo pilot tone. - - - .. row 7 - - - __u32 - - - ``type`` - - - :cspan:`2` Type of the modulator, see :ref:`v4l2-tuner-type`. - - - .. row 8 - - - __u32 - - - ``reserved``\ [3] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - + * - __u32 + - ``index`` + - Identifies the modulator, set by the application. + * - __u8 + - ``name``\ [32] + - Name of the modulator, a NUL-terminated ASCII string. + + This information is intended for the user. + * - __u32 + - ``capability`` + - Modulator capability flags. No flags are defined for this field, + the tuner flags in struct :c:type:`v4l2_tuner` are + used accordingly. The audio flags indicate the ability to encode + audio subprograms. They will *not* change for example with the + current video standard. + * - __u32 + - ``rangelow`` + - The lowest tunable frequency in units of 62.5 KHz, or if the + ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of + 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is + set, in units of 1 Hz. + * - __u32 + - ``rangehigh`` + - The highest tunable frequency in units of 62.5 KHz, or if the + ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units of + 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is + set, in units of 1 Hz. + * - __u32 + - ``txsubchans`` + - With this field applications can determine how audio sub-carriers + shall be modulated. It contains a set of flags as defined in + :ref:`modulator-txsubchans`. + + .. note:: + + The tuner ``rxsubchans`` flags are reused, but the + semantics are different. Video output devices + are assumed to have an analog or PCM audio input with 1-3 + channels. The ``txsubchans`` flags select one or more channels + for modulation, together with some audio subprogram indicator, + for example, a stereo pilot tone. + * - __u32 + - ``type`` + - :cspan:`2` Type of the modulator, see :c:type:`v4l2_tuner_type`. + * - __u32 + - ``reserved``\ [3] + - Reserved for future extensions. + + Drivers and applications must set the array to zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _modulator-txsubchans: @@ -163,86 +130,56 @@ To change the radio frequency the :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_TUNER_SUB_MONO`` - - - 0x0001 - - - Modulate channel 1 as mono audio, when the input has more - channels, a down-mix of channel 1 and 2. This flag does not - combine with ``V4L2_TUNER_SUB_STEREO`` or - ``V4L2_TUNER_SUB_LANG1``. - - - .. row 2 - - - ``V4L2_TUNER_SUB_STEREO`` - - - 0x0002 - - - Modulate channel 1 and 2 as left and right channel of a stereo - audio signal. When the input has only one channel or two channels - and ``V4L2_TUNER_SUB_SAP`` is also set, channel 1 is encoded as - left and right channel. This flag does not combine with - ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_LANG1``. When the - driver does not support stereo audio it shall fall back to mono. - - - .. row 3 - - - ``V4L2_TUNER_SUB_LANG1`` - - - 0x0008 - - - Modulate channel 1 and 2 as primary and secondary language of a - bilingual audio signal. When the input has only one channel it is - used for both languages. It is not possible to encode the primary - or secondary language only. This flag does not combine with - ``V4L2_TUNER_SUB_MONO``, ``V4L2_TUNER_SUB_STEREO`` or - ``V4L2_TUNER_SUB_SAP``. If the hardware does not support the - respective audio matrix, or the current video standard does not - permit bilingual audio the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall - return an ``EINVAL`` error code and the driver shall fall back to mono - or stereo mode. - - - .. row 4 - - - ``V4L2_TUNER_SUB_LANG2`` - - - 0x0004 - - - Same effect as ``V4L2_TUNER_SUB_SAP``. - - - .. row 5 - - - ``V4L2_TUNER_SUB_SAP`` - - - 0x0004 - - - When combined with ``V4L2_TUNER_SUB_MONO`` the first channel is - encoded as mono audio, the last channel as Second Audio Program. - When the input has only one channel it is used for both audio - tracks. When the input has three channels the mono track is a - down-mix of channel 1 and 2. When combined with - ``V4L2_TUNER_SUB_STEREO`` channel 1 and 2 are encoded as left and - right stereo audio, channel 3 as Second Audio Program. When the - input has only two channels, the first is encoded as left and - right channel and the second as SAP. When the input has only one - channel it is used for all audio tracks. It is not possible to - encode a Second Audio Program only. This flag must combine with - ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_STEREO``. If the - hardware does not support the respective audio matrix, or the - current video standard does not permit SAP the - :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an ``EINVAL`` error code and - driver shall fall back to mono or stereo mode. - - - .. row 6 - - - ``V4L2_TUNER_SUB_RDS`` - - - 0x0010 - - - Enable the RDS encoder for a radio FM transmitter. + * - ``V4L2_TUNER_SUB_MONO`` + - 0x0001 + - Modulate channel 1 as mono audio, when the input has more + channels, a down-mix of channel 1 and 2. This flag does not + combine with ``V4L2_TUNER_SUB_STEREO`` or + ``V4L2_TUNER_SUB_LANG1``. + * - ``V4L2_TUNER_SUB_STEREO`` + - 0x0002 + - Modulate channel 1 and 2 as left and right channel of a stereo + audio signal. When the input has only one channel or two channels + and ``V4L2_TUNER_SUB_SAP`` is also set, channel 1 is encoded as + left and right channel. This flag does not combine with + ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_LANG1``. When the + driver does not support stereo audio it shall fall back to mono. + * - ``V4L2_TUNER_SUB_LANG1`` + - 0x0008 + - Modulate channel 1 and 2 as primary and secondary language of a + bilingual audio signal. When the input has only one channel it is + used for both languages. It is not possible to encode the primary + or secondary language only. This flag does not combine with + ``V4L2_TUNER_SUB_MONO``, ``V4L2_TUNER_SUB_STEREO`` or + ``V4L2_TUNER_SUB_SAP``. If the hardware does not support the + respective audio matrix, or the current video standard does not + permit bilingual audio the :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall + return an ``EINVAL`` error code and the driver shall fall back to mono + or stereo mode. + * - ``V4L2_TUNER_SUB_LANG2`` + - 0x0004 + - Same effect as ``V4L2_TUNER_SUB_SAP``. + * - ``V4L2_TUNER_SUB_SAP`` + - 0x0004 + - When combined with ``V4L2_TUNER_SUB_MONO`` the first channel is + encoded as mono audio, the last channel as Second Audio Program. + When the input has only one channel it is used for both audio + tracks. When the input has three channels the mono track is a + down-mix of channel 1 and 2. When combined with + ``V4L2_TUNER_SUB_STEREO`` channel 1 and 2 are encoded as left and + right stereo audio, channel 3 as Second Audio Program. When the + input has only two channels, the first is encoded as left and + right channel and the second as SAP. When the input has only one + channel it is used for all audio tracks. It is not possible to + encode a Second Audio Program only. This flag must combine with + ``V4L2_TUNER_SUB_MONO`` or ``V4L2_TUNER_SUB_STEREO``. If the + hardware does not support the respective audio matrix, or the + current video standard does not permit SAP the + :ref:`VIDIOC_S_MODULATOR <VIDIOC_G_MODULATOR>` ioctl shall return an ``EINVAL`` error code and + driver shall fall back to mono or stereo mode. + * - ``V4L2_TUNER_SUB_RDS`` + - 0x0010 + - Enable the RDS encoder for a radio FM transmitter. Return Value @@ -253,5 +190,5 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_modulator <v4l2-modulator>` ``index`` is + The struct :c:type:`v4l2_modulator` ``index`` is out of bounds. diff --git a/Documentation/media/uapi/v4l/vidioc-g-output.rst b/Documentation/media/uapi/v4l/vidioc-g-output.rst index ae0ad577ba97..7750948fc61b 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-output.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-output.rst @@ -15,7 +15,11 @@ VIDIOC_G_OUTPUT - VIDIOC_S_OUTPUT - Query or select the current video output Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, int *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_OUTPUT, int *argp ) + :name: VIDIOC_G_OUTPUT + +.. c:function:: int ioctl( int fd, VIDIOC_S_OUTPUT, int *argp ) + :name: VIDIOC_S_OUTPUT Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT - ``argp`` @@ -36,7 +37,7 @@ Description To query the current video output applications call the :ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver stores the number of the output, as in the struct -:ref:`v4l2_output <v4l2-output>` ``index`` field. This ioctl will +:c:type:`v4l2_output` ``index`` field. This ioctl will fail only when there are no video outputs, returning the ``EINVAL`` error code. diff --git a/Documentation/media/uapi/v4l/vidioc-g-parm.rst b/Documentation/media/uapi/v4l/vidioc-g-parm.rst index 7116e0decddc..3b2e6e59a334 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-parm.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-parm.rst @@ -15,7 +15,11 @@ VIDIOC_G_PARM - VIDIOC_S_PARM - Get or set streaming parameters Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, v4l2_streamparm *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_PARM, v4l2_streamparm *argp ) + :name: VIDIOC_G_PARM + +.. c:function:: int ioctl( int fd, VIDIOC_S_PARM, v4l2_streamparm *argp ) + :name: VIDIOC_S_PARM Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_PARM, VIDIOC_S_PARM - ``argp`` @@ -46,237 +47,157 @@ section discussing the :ref:`read() <func-read>` function. To get and set the streaming parameters applications call the :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take a -pointer to a struct :ref:`struct v4l2_streamparm <v4l2-streamparm>` which contains a +pointer to a struct :c:type:`v4l2_streamparm` which contains a union holding separate parameters for input and output devices. -.. _v4l2-streamparm: +.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| + +.. c:type:: v4l2_streamparm .. flat-table:: struct v4l2_streamparm :header-rows: 0 :stub-columns: 0 :widths: 1 1 1 2 - - - .. row 1 - - - __u32 - - - ``type`` - - - - - The buffer (stream) type, same as struct - :ref:`v4l2_format <v4l2-format>` ``type``, set by the - application. See :ref:`v4l2-buf-type` - - - .. row 2 - - - union - - - ``parm`` - - - - - - - - .. row 3 - - - - - struct :ref:`v4l2_captureparm <v4l2-captureparm>` - - - ``capture`` - - - Parameters for capture devices, used when ``type`` is - ``V4L2_BUF_TYPE_VIDEO_CAPTURE``. - - - .. row 4 - - - - - struct :ref:`v4l2_outputparm <v4l2-outputparm>` - - - ``output`` - - - Parameters for output devices, used when ``type`` is - ``V4L2_BUF_TYPE_VIDEO_OUTPUT``. - - - .. row 5 - - - - - __u8 - - - ``raw_data``\ [200] - - - A place holder for future extensions. - - - -.. _v4l2-captureparm: + * - __u32 + - ``type`` + - + - The buffer (stream) type, same as struct + :c:type:`v4l2_format` ``type``, set by the + application. See :c:type:`v4l2_buf_type` + * - union + - ``parm`` + - + - + * - + - struct :c:type:`v4l2_captureparm` + - ``capture`` + - Parameters for capture devices, used when ``type`` is + ``V4L2_BUF_TYPE_VIDEO_CAPTURE``. + * - + - struct :c:type:`v4l2_outputparm` + - ``output`` + - Parameters for output devices, used when ``type`` is + ``V4L2_BUF_TYPE_VIDEO_OUTPUT``. + * - + - __u8 + - ``raw_data``\ [200] + - A place holder for future extensions. + + + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_captureparm .. flat-table:: struct v4l2_captureparm :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``capability`` - - - See :ref:`parm-caps`. - - - .. row 2 - - - __u32 - - - ``capturemode`` - - - Set by drivers and applications, see :ref:`parm-flags`. - - - .. row 3 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``timeperframe`` - - - This is the desired period between successive frames captured by - the driver, in seconds. The field is intended to skip frames on - the driver side, saving I/O bandwidth. - - Applications store here the desired frame period, drivers return - the actual frame period, which must be greater or equal to the - nominal frame period determined by the current video standard - (struct :ref:`v4l2_standard <v4l2-standard>` ``frameperiod`` - field). Changing the video standard (also implicitly by switching - the video input) may reset this parameter to the nominal frame - period. To reset manually applications can just set this field to - zero. - - Drivers support this function only when they set the - ``V4L2_CAP_TIMEPERFRAME`` flag in the ``capability`` field. - - - .. row 4 - - - __u32 - - - ``extendedmode`` - - - Custom (driver specific) streaming parameters. When unused, - applications and drivers must set this field to zero. Applications - using this field should check the driver name and version, see - :ref:`querycap`. - - - .. row 5 - - - __u32 - - - ``readbuffers`` - - - Applications set this field to the desired number of buffers used - internally by the driver in :ref:`read() <func-read>` mode. - Drivers return the actual number of buffers. When an application - requests zero buffers, drivers should just return the current - setting rather than the minimum or an error code. For details see - :ref:`rw`. - - - .. row 6 - - - __u32 - - - ``reserved``\ [4] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - - -.. _v4l2-outputparm: + * - __u32 + - ``capability`` + - See :ref:`parm-caps`. + * - __u32 + - ``capturemode`` + - Set by drivers and applications, see :ref:`parm-flags`. + * - struct :c:type:`v4l2_fract` + - ``timeperframe`` + - This is the desired period between successive frames captured by + the driver, in seconds. The field is intended to skip frames on + the driver side, saving I/O bandwidth. + + Applications store here the desired frame period, drivers return + the actual frame period, which must be greater or equal to the + nominal frame period determined by the current video standard + (struct :c:type:`v4l2_standard` ``frameperiod`` + field). Changing the video standard (also implicitly by switching + the video input) may reset this parameter to the nominal frame + period. To reset manually applications can just set this field to + zero. + + Drivers support this function only when they set the + ``V4L2_CAP_TIMEPERFRAME`` flag in the ``capability`` field. + * - __u32 + - ``extendedmode`` + - Custom (driver specific) streaming parameters. When unused, + applications and drivers must set this field to zero. Applications + using this field should check the driver name and version, see + :ref:`querycap`. + * - __u32 + - ``readbuffers`` + - Applications set this field to the desired number of buffers used + internally by the driver in :ref:`read() <func-read>` mode. + Drivers return the actual number of buffers. When an application + requests zero buffers, drivers should just return the current + setting rather than the minimum or an error code. For details see + :ref:`rw`. + * - __u32 + - ``reserved``\ [4] + - Reserved for future extensions. Drivers and applications must set + the array to zero. + + + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_outputparm .. flat-table:: struct v4l2_outputparm :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``capability`` - - - See :ref:`parm-caps`. - - - .. row 2 - - - __u32 - - - ``outputmode`` - - - Set by drivers and applications, see :ref:`parm-flags`. - - - .. row 3 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``timeperframe`` - - - This is the desired period between successive frames output by the - driver, in seconds. - - - .. row 4 - - - :cspan:`2` - - The field is intended to repeat frames on the driver side in - :ref:`write() <func-write>` mode (in streaming mode timestamps - can be used to throttle the output), saving I/O bandwidth. - - Applications store here the desired frame period, drivers return - the actual frame period, which must be greater or equal to the - nominal frame period determined by the current video standard - (struct :ref:`v4l2_standard <v4l2-standard>` ``frameperiod`` - field). Changing the video standard (also implicitly by switching - the video output) may reset this parameter to the nominal frame - period. To reset manually applications can just set this field to - zero. - - Drivers support this function only when they set the - ``V4L2_CAP_TIMEPERFRAME`` flag in the ``capability`` field. - - - .. row 5 - - - __u32 - - - ``extendedmode`` - - - Custom (driver specific) streaming parameters. When unused, - applications and drivers must set this field to zero. Applications - using this field should check the driver name and version, see - :ref:`querycap`. - - - .. row 6 - - - __u32 - - - ``writebuffers`` - - - Applications set this field to the desired number of buffers used - internally by the driver in :ref:`write() <func-write>` mode. Drivers - return the actual number of buffers. When an application requests - zero buffers, drivers should just return the current setting - rather than the minimum or an error code. For details see - :ref:`rw`. - - - .. row 7 - - - __u32 - - - ``reserved``\ [4] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. - - + * - __u32 + - ``capability`` + - See :ref:`parm-caps`. + * - __u32 + - ``outputmode`` + - Set by drivers and applications, see :ref:`parm-flags`. + * - struct :c:type:`v4l2_fract` + - ``timeperframe`` + - This is the desired period between successive frames output by the + driver, in seconds. + * - :cspan:`2` + + The field is intended to repeat frames on the driver side in + :ref:`write() <func-write>` mode (in streaming mode timestamps + can be used to throttle the output), saving I/O bandwidth. + + Applications store here the desired frame period, drivers return + the actual frame period, which must be greater or equal to the + nominal frame period determined by the current video standard + (struct :c:type:`v4l2_standard` ``frameperiod`` + field). Changing the video standard (also implicitly by switching + the video output) may reset this parameter to the nominal frame + period. To reset manually applications can just set this field to + zero. + + Drivers support this function only when they set the + ``V4L2_CAP_TIMEPERFRAME`` flag in the ``capability`` field. + * - __u32 + - ``extendedmode`` + - Custom (driver specific) streaming parameters. When unused, + applications and drivers must set this field to zero. Applications + using this field should check the driver name and version, see + :ref:`querycap`. + * - __u32 + - ``writebuffers`` + - Applications set this field to the desired number of buffers used + internally by the driver in :ref:`write() <func-write>` mode. Drivers + return the actual number of buffers. When an application requests + zero buffers, drivers should just return the current setting + rather than the minimum or an error code. For details see + :ref:`rw`. + * - __u32 + - ``reserved``\ [4] + - Reserved for future extensions. Drivers and applications must set + the array to zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _parm-caps: @@ -285,17 +206,14 @@ union holding separate parameters for input and output devices. :stub-columns: 0 :widths: 3 1 4 + * - ``V4L2_CAP_TIMEPERFRAME`` + - 0x1000 + - The frame skipping/repeating controlled by the ``timeperframe`` + field is supported. - - .. row 1 - - - ``V4L2_CAP_TIMEPERFRAME`` - - - 0x1000 - - - The frame skipping/repeating controlled by the ``timeperframe`` - field is supported. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _parm-flags: @@ -304,41 +222,36 @@ union holding separate parameters for input and output devices. :stub-columns: 0 :widths: 3 1 4 + * - ``V4L2_MODE_HIGHQUALITY`` + - 0x0001 + - High quality imaging mode. High quality mode is intended for still + imaging applications. The idea is to get the best possible image + quality that the hardware can deliver. It is not defined how the + driver writer may achieve that; it will depend on the hardware and + the ingenuity of the driver writer. High quality mode is a + different mode from the regular motion video capture modes. In + high quality mode: - - .. row 1 - - - ``V4L2_MODE_HIGHQUALITY`` - - - 0x0001 - - - High quality imaging mode. High quality mode is intended for still - imaging applications. The idea is to get the best possible image - quality that the hardware can deliver. It is not defined how the - driver writer may achieve that; it will depend on the hardware and - the ingenuity of the driver writer. High quality mode is a - different mode from the regular motion video capture modes. In - high quality mode: - - - The driver may be able to capture higher resolutions than for - motion capture. + - The driver may be able to capture higher resolutions than for + motion capture. - - The driver may support fewer pixel formats than motion capture - (eg; true color). + - The driver may support fewer pixel formats than motion capture + (eg; true color). - - The driver may capture and arithmetically combine multiple - successive fields or frames to remove color edge artifacts and - reduce the noise in the video data. + - The driver may capture and arithmetically combine multiple + successive fields or frames to remove color edge artifacts and + reduce the noise in the video data. - - The driver may capture images in slices like a scanner in order - to handle larger format images than would otherwise be - possible. + - The driver may capture images in slices like a scanner in order + to handle larger format images than would otherwise be + possible. - - An image capture operation may be significantly slower than - motion capture. + - An image capture operation may be significantly slower than + motion capture. - - Moving objects in the image might have excessive motion blur. + - Moving objects in the image might have excessive motion blur. - - Capture might only work through the :ref:`read() <func-read>` call. + - Capture might only work through the :ref:`read() <func-read>` call. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-priority.rst b/Documentation/media/uapi/v4l/vidioc-g-priority.rst index 9f774ce400a4..a763988f64e4 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-priority.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-priority.rst @@ -15,9 +15,11 @@ VIDIOC_G_PRIORITY - VIDIOC_S_PRIORITY - Query or request the access priority ass Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, enum v4l2_priority *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_PRIORITY, enum v4l2_priority *argp ) + :name: VIDIOC_G_PRIORITY -.. cpp:function:: int ioctl( int fd, int request, const enum v4l2_priority *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_PRIORITY, const enum v4l2_priority *argp ) + :name: VIDIOC_S_PRIORITY Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY - ``argp`` Pointer to an enum v4l2_priority type. @@ -45,62 +44,39 @@ an enum v4l2_priority variable and call :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORI with a pointer to this variable. -.. _v4l2-priority: +.. c:type:: v4l2_priority + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. flat-table:: enum v4l2_priority :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_PRIORITY_UNSET`` - - - 0 - - - - - - .. row 2 - - - ``V4L2_PRIORITY_BACKGROUND`` - - - 1 - - - Lowest priority, usually applications running in background, for - example monitoring VBI transmissions. A proxy application running - in user space will be necessary if multiple applications want to - read from a device at this priority. - - - .. row 3 - - - ``V4L2_PRIORITY_INTERACTIVE`` - - - 2 - - - - - - .. row 4 - - - ``V4L2_PRIORITY_DEFAULT`` - - - 2 - - - Medium priority, usually applications started and interactively - controlled by the user. For example TV viewers, Teletext browsers, - or just "panel" applications to change the channel or video - controls. This is the default priority unless an application - requests another. - - - .. row 5 - - - ``V4L2_PRIORITY_RECORD`` - - - 3 - - - Highest priority. Only one file descriptor can have this priority, - it blocks any other fd from changing device properties. Usually - applications which must not be interrupted, like video recording. + * - ``V4L2_PRIORITY_UNSET`` + - 0 + - + * - ``V4L2_PRIORITY_BACKGROUND`` + - 1 + - Lowest priority, usually applications running in background, for + example monitoring VBI transmissions. A proxy application running + in user space will be necessary if multiple applications want to + read from a device at this priority. + * - ``V4L2_PRIORITY_INTERACTIVE`` + - 2 + - + * - ``V4L2_PRIORITY_DEFAULT`` + - 2 + - Medium priority, usually applications started and interactively + controlled by the user. For example TV viewers, Teletext browsers, + or just "panel" applications to change the channel or video + controls. This is the default priority unless an application + requests another. + * - ``V4L2_PRIORITY_RECORD`` + - 3 + - Highest priority. Only one file descriptor can have this priority, + it blocks any other fd from changing device properties. Usually + applications which must not be interrupted, like video recording. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-selection.rst b/Documentation/media/uapi/v4l/vidioc-g-selection.rst index 953931fabd00..3145a9166bad 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-selection.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-selection.rst @@ -15,7 +15,12 @@ VIDIOC_G_SELECTION - VIDIOC_S_SELECTION - Get or set one of the selection rectan Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_selection *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_SELECTION, struct v4l2_selection *argp ) + :name: VIDIOC_G_SELECTION + + +.. c:function:: int ioctl( int fd, VIDIOC_S_SELECTION, struct v4l2_selection *argp ) + :name: VIDIOC_S_SELECTION Arguments @@ -36,43 +41,43 @@ Description The ioctls are used to query and configure selection rectangles. To query the cropping (composing) rectangle set struct -:ref:`v4l2_selection <v4l2-selection>` ``type`` field to the +:c:type:`v4l2_selection` ``type`` field to the respective buffer type. Do not use the multiplanar buffer types. Use ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` instead of ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and use ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` instead of ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``. The next step is setting the -value of struct :ref:`v4l2_selection <v4l2-selection>` ``target`` +value of struct :c:type:`v4l2_selection` ``target`` field to ``V4L2_SEL_TGT_CROP`` (``V4L2_SEL_TGT_COMPOSE``). Please refer to table :ref:`v4l2-selections-common` or :ref:`selection-api` for additional targets. The ``flags`` and ``reserved`` fields of struct -:ref:`v4l2_selection <v4l2-selection>` are ignored and they must be +:c:type:`v4l2_selection` are ignored and they must be filled with zeros. The driver fills the rest of the structure or returns EINVAL error code if incorrect buffer type or target was used. If cropping (composing) is not supported then the active rectangle is not mutable and it is always equal to the bounds rectangle. Finally, the -struct :ref:`v4l2_rect <v4l2-rect>` ``r`` rectangle is filled with +struct :c:type:`v4l2_rect` ``r`` rectangle is filled with the current cropping (composing) coordinates. The coordinates are expressed in driver-dependent units. The only exception are rectangles for images in raw formats, whose coordinates are always expressed in pixels. To change the cropping (composing) rectangle set the struct -:ref:`v4l2_selection <v4l2-selection>` ``type`` field to the +:c:type:`v4l2_selection` ``type`` field to the respective buffer type. Do not use multiplanar buffers. Use ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` instead of ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. Use ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` instead of ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``. The next step is setting the -value of struct :ref:`v4l2_selection <v4l2-selection>` ``target`` to +value of struct :c:type:`v4l2_selection` ``target`` to ``V4L2_SEL_TGT_CROP`` (``V4L2_SEL_TGT_COMPOSE``). Please refer to table :ref:`v4l2-selections-common` or :ref:`selection-api` for additional -targets. The struct :ref:`v4l2_rect <v4l2-rect>` ``r`` rectangle need +targets. The struct :c:type:`v4l2_rect` ``r`` rectangle need to be set to the desired active area. Field struct -:ref:`v4l2_selection <v4l2-selection>` ``reserved`` is ignored and +:c:type:`v4l2_selection` ``reserved`` is ignored and must be filled with zeros. The driver may adjust coordinates of the requested rectangle. An application may introduce constraints to control -rounding behaviour. The struct :ref:`v4l2_selection <v4l2-selection>` +rounding behaviour. The struct :c:type:`v4l2_selection` ``flags`` field must be set to one of the following: - ``0`` - The driver can adjust the rectangle size freely and shall @@ -97,7 +102,7 @@ horizontal and vertical offset and sizes are chosen according to following priority: 1. Satisfy constraints from struct - :ref:`v4l2_selection <v4l2-selection>` ``flags``. + :c:type:`v4l2_selection` ``flags``. 2. Adjust width, height, left, and top to hardware limits and alignments. @@ -110,7 +115,7 @@ following priority: 5. Keep horizontal and vertical offset as close as possible to original ones. -On success the struct :ref:`v4l2_rect <v4l2-rect>` ``r`` field +On success the struct :c:type:`v4l2_rect` ``r`` field contains the adjusted rectangle. When the parameters are unsuitable the application may modify the cropping (composing) or image parameters and repeat the cycle until satisfactory parameters have been negotiated. If @@ -135,57 +140,34 @@ Selection targets and flags are documented in -.. _v4l2-selection: +.. c:type:: v4l2_selection + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_selection :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``type`` - - - Type of the buffer (from enum - :ref:`v4l2_buf_type <v4l2-buf-type>`). - - - .. row 2 - - - __u32 - - - ``target`` - - - Used to select between - :ref:`cropping and composing rectangles <v4l2-selections-common>`. - - - .. row 3 - - - __u32 - - - ``flags`` - - - Flags controlling the selection rectangle adjustments, refer to - :ref:`selection flags <v4l2-selection-flags>`. - - - .. row 4 - - - struct :ref:`v4l2_rect <v4l2-rect>` - - - ``r`` - - - The selection rectangle. - - - .. row 5 - - - __u32 - - - ``reserved[9]`` - - - Reserved fields for future use. Drivers and applications must zero - this array. + * - __u32 + - ``type`` + - Type of the buffer (from enum + :c:type:`v4l2_buf_type`). + * - __u32 + - ``target`` + - Used to select between + :ref:`cropping and composing rectangles <v4l2-selections-common>`. + * - __u32 + - ``flags`` + - Flags controlling the selection rectangle adjustments, refer to + :ref:`selection flags <v4l2-selection-flags>`. + * - struct :c:type:`v4l2_rect` + - ``r`` + - The selection rectangle. + * - __u32 + - ``reserved[9]`` + - Reserved fields for future use. Drivers and applications must zero + this array. Return Value @@ -200,10 +182,13 @@ EINVAL supported, or the ``flags`` argument is not valid. ERANGE - It is not possible to adjust struct :ref:`v4l2_rect <v4l2-rect>` + It is not possible to adjust struct :c:type:`v4l2_rect` ``r`` rectangle to satisfy all constraints given in the ``flags`` argument. +ENODATA + Selection is not supported for this input or output. + EBUSY It is not possible to apply change of the selection rectangle at the moment. Usually because streaming is in progress. diff --git a/Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst b/Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst index f1f661d0200c..d7e2b2fa8b88 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-sliced-vbi-cap.rst @@ -15,7 +15,8 @@ VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_sliced_vbi_cap *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp ) + :name: VIDIOC_G_SLICED_VBI_CAP Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_SLICED_VBI_CAP - ``argp`` @@ -35,141 +33,98 @@ Description To find out which data services are supported by a sliced VBI capture or output device, applications initialize the ``type`` field of a struct -:ref:`v4l2_sliced_vbi_cap <v4l2-sliced-vbi-cap>`, clear the +:c:type:`v4l2_sliced_vbi_cap`, clear the ``reserved`` array and call the :ref:`VIDIOC_G_SLICED_VBI_CAP <VIDIOC_G_SLICED_VBI_CAP>` ioctl. The driver fills in the remaining fields or returns an ``EINVAL`` error code if the sliced VBI API is unsupported or ``type`` is invalid. -.. note:: The ``type`` field was added, and the ioctl changed from read-only +.. note:: + + The ``type`` field was added, and the ioctl changed from read-only to write-read, in Linux 2.6.19. -.. _v4l2-sliced-vbi-cap: +.. c:type:: v4l2_sliced_vbi_cap + +.. tabularcolumns:: |p{1.2cm}|p{4.2cm}|p{4.1cm}|p{4.0cm}|p{4.0cm}| .. flat-table:: struct v4l2_sliced_vbi_cap :header-rows: 0 :stub-columns: 0 :widths: 3 3 2 2 2 - - - .. row 1 - - - __u16 - - - ``service_set`` - - - :cspan:`2` A set of all data services supported by the driver. - Equal to the union of all elements of the ``service_lines`` array. - - - .. row 2 - - - __u16 - - - ``service_lines``\ [2][24] - - - :cspan:`2` Each element of this array contains a set of data - services the hardware can look for or insert into a particular - scan line. Data services are defined in :ref:`vbi-services`. - Array indices map to ITU-R line numbers (see also :ref:`vbi-525` - and :ref:`vbi-625`) as follows: - - - .. row 3 - - - - - - - Element - - - 525 line systems - - - 625 line systems - - - .. row 4 - - - - - - - ``service_lines``\ [0][1] - - - 1 - - - 1 - - - .. row 5 - - - - - - - ``service_lines``\ [0][23] - - - 23 - - - 23 - - - .. row 6 - - - - - - - ``service_lines``\ [1][1] - - - 264 - - - 314 - - - .. row 7 - - - - - - - ``service_lines``\ [1][23] - - - 286 - - - 336 - - - .. row 8 - - - - - - .. row 9 - - - - - - - :cspan:`2` The number of VBI lines the hardware can capture or - output per frame, or the number of services it can identify on a - given line may be limited. For example on PAL line 16 the hardware - may be able to look for a VPS or Teletext signal, but not both at - the same time. Applications can learn about these limits using the - :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in - :ref:`sliced`. - - - .. row 10 - - - - - - .. row 11 - - - - - - - :cspan:`2` Drivers must set ``service_lines`` [0][0] and - ``service_lines``\ [1][0] to zero. - - - .. row 12 - - - __u32 - - - ``type`` - - - Type of the data stream, see :ref:`v4l2-buf-type`. Should be - ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or - ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``. - - - .. row 13 - - - __u32 - - - ``reserved``\ [3] - - - :cspan:`2` This array is reserved for future extensions. - Applications and drivers must set it to zero. - - + * - __u16 + - ``service_set`` + - :cspan:`2` A set of all data services supported by the driver. + + Equal to the union of all elements of the ``service_lines`` array. + * - __u16 + - ``service_lines``\ [2][24] + - :cspan:`2` Each element of this array contains a set of data + services the hardware can look for or insert into a particular + scan line. Data services are defined in :ref:`vbi-services`. + Array indices map to ITU-R line numbers\ [#f1]_ as follows: + * - + - + - Element + - 525 line systems + - 625 line systems + * - + - + - ``service_lines``\ [0][1] + - 1 + - 1 + * - + - + - ``service_lines``\ [0][23] + - 23 + - 23 + * - + - + - ``service_lines``\ [1][1] + - 264 + - 314 + * - + - + - ``service_lines``\ [1][23] + - 286 + - 336 + * - + * - + - + - :cspan:`2` The number of VBI lines the hardware can capture or + output per frame, or the number of services it can identify on a + given line may be limited. For example on PAL line 16 the hardware + may be able to look for a VPS or Teletext signal, but not both at + the same time. Applications can learn about these limits using the + :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl as described in + :ref:`sliced`. + * - + * - + - + - :cspan:`2` Drivers must set ``service_lines`` [0][0] and + ``service_lines``\ [1][0] to zero. + * - __u32 + - ``type`` + - Type of the data stream, see :c:type:`v4l2_buf_type`. Should be + ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or + ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``. + * - __u32 + - ``reserved``\ [3] + - :cspan:`2` This array is reserved for future extensions. + + Applications and drivers must set it to zero. + +.. [#f1] + + See also :ref:`vbi-525` and :ref:`vbi-625`. + + +.. raw:: latex + + \begin{adjustbox}{width=\columnwidth} + +.. tabularcolumns:: |p{5.0cm}|p{1.4cm}|p{3.0cm}|p{2.5cm}|p{9.0cm}| .. _vbi-services: @@ -178,91 +133,54 @@ the sliced VBI API is unsupported or ``type`` is invalid. :stub-columns: 0 :widths: 2 1 1 2 2 - - - .. row 1 - - - Symbol - - - Value - - - Reference - - - Lines, usually - - - Payload - - - .. row 2 - - - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B) - - - 0x0001 - - - :ref:`ets300706`, :ref:`itu653` - - - PAL/SECAM line 7-22, 320-335 (second field 7-22) - - - Last 42 of the 45 byte Teletext packet, that is without clock - run-in and framing code, lsb first transmitted. - - - .. row 3 - - - ``V4L2_SLICED_VPS`` - - - 0x0400 - - - :ref:`ets300231` - - - PAL line 16 - - - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb - first transmitted. - - - .. row 4 - - - ``V4L2_SLICED_CAPTION_525`` - - - 0x1000 - - - :ref:`cea608` - - - NTSC line 21, 284 (second field 21) - - - Two bytes in transmission order, including parity bit, lsb first - transmitted. - - - .. row 5 - - - ``V4L2_SLICED_WSS_625`` - - - 0x4000 - - - :ref:`en300294`, :ref:`itu1119` - - - PAL/SECAM line 23 - - - - - :: - - Byte 0 1 - msb lsb msb lsb - Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9 - - - .. row 6 - - - ``V4L2_SLICED_VBI_525`` - - - 0x1000 - - - :cspan:`2` Set of services applicable to 525 line systems. - - - .. row 7 - - - ``V4L2_SLICED_VBI_625`` - - - 0x4401 - - - :cspan:`2` Set of services applicable to 625 line systems. + * - Symbol + - Value + - Reference + - Lines, usually + - Payload + * - ``V4L2_SLICED_TELETEXT_B`` (Teletext System B) + - 0x0001 + - :ref:`ets300706`, + + :ref:`itu653` + - PAL/SECAM line 7-22, 320-335 (second field 7-22) + - Last 42 of the 45 byte Teletext packet, that is without clock + run-in and framing code, lsb first transmitted. + * - ``V4L2_SLICED_VPS`` + - 0x0400 + - :ref:`ets300231` + - PAL line 16 + - Byte number 3 to 15 according to Figure 9 of ETS 300 231, lsb + first transmitted. + * - ``V4L2_SLICED_CAPTION_525`` + - 0x1000 + - :ref:`cea608` + - NTSC line 21, 284 (second field 21) + - Two bytes in transmission order, including parity bit, lsb first + transmitted. + * - ``V4L2_SLICED_WSS_625`` + - 0x4000 + - :ref:`en300294`, + + :ref:`itu1119` + - PAL/SECAM line 23 + - + + :: + + Byte 0 1 + msb lsb msb lsb + Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9 + * - ``V4L2_SLICED_VBI_525`` + - 0x1000 + - :cspan:`2` Set of services applicable to 525 line systems. + * - ``V4L2_SLICED_VBI_625`` + - 0x4401 + - :cspan:`2` Set of services applicable to 625 line systems. + +.. raw:: latex + + \end{adjustbox}\newline\newline Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-g-std.rst b/Documentation/media/uapi/v4l/vidioc-g-std.rst index 5c2b861f8d26..cd856ad21a28 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-std.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-std.rst @@ -15,9 +15,11 @@ VIDIOC_G_STD - VIDIOC_S_STD - Query or select the video standard of the current Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, v4l2_std_id *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_STD, v4l2_std_id *argp ) + :name: VIDIOC_G_STD -.. cpp:function:: int ioctl( int fd, int request, const v4l2_std_id *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_STD, const v4l2_std_id *argp ) + :name: VIDIOC_S_STD Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_STD, VIDIOC_S_STD - ``argp`` @@ -39,9 +38,9 @@ To query and select the current video standard applications use the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` and :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` ioctls which take a pointer to a :ref:`v4l2_std_id <v4l2-std-id>` type as argument. :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` can return a single flag or a set of flags as in struct -:ref:`v4l2_standard <v4l2-standard>` field ``id``. The flags must be +:c:type:`v4l2_standard` field ``id``. The flags must be unambiguous such that they appear in only one enumerated -:ref:`struct v4l2_standard <v4l2-standard>` structure. +struct :c:type:`v4l2_standard` structure. :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` accepts one or more flags, being a write-only ioctl it does not return the actual new standard as :ref:`VIDIOC_G_STD <VIDIOC_G_STD>` does. When diff --git a/Documentation/media/uapi/v4l/vidioc-g-tuner.rst b/Documentation/media/uapi/v4l/vidioc-g-tuner.rst index 614db06b8b4b..e8aa8cd7065f 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-tuner.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-tuner.rst @@ -15,9 +15,11 @@ VIDIOC_G_TUNER - VIDIOC_S_TUNER - Get or set tuner attributes Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_tuner *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp ) + :name: VIDIOC_G_TUNER -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_tuner *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp ) + :name: VIDIOC_S_TUNER Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_G_TUNER, VIDIOC_S_TUNER - ``argp`` @@ -37,7 +36,7 @@ Description To query the attributes of a tuner applications initialize the ``index`` field and zero out the ``reserved`` array of a struct -:ref:`v4l2_tuner <v4l2-tuner>` and call the ``VIDIOC_G_TUNER`` ioctl +:c:type:`v4l2_tuner` and call the ``VIDIOC_G_TUNER`` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code when the index is out of bounds. To enumerate all tuners applications shall begin at index zero, @@ -60,396 +59,247 @@ To change the radio frequency the :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. -.. _v4l2-tuner: + .. tabularcolumns:: |p{1.3cm}|p{3.0cm}|p{6.6cm}|p{6.6cm}| + +.. c:type:: v4l2_tuner + +.. cssclass:: longtable .. flat-table:: struct v4l2_tuner :header-rows: 0 :stub-columns: 0 - - - .. row 1 - - - __u32 - - - ``index`` - - - :cspan:`1` Identifies the tuner, set by the application. - - - .. row 2 - - - __u8 - - - ``name``\ [32] - - - :cspan:`1` - - Name of the tuner, a NUL-terminated ASCII string. This information - is intended for the user. - - - .. row 3 - - - __u32 - - - ``type`` - - - :cspan:`1` Type of the tuner, see :ref:`v4l2-tuner-type`. - - - .. row 4 - - - __u32 - - - ``capability`` - - - :cspan:`1` - - Tuner capability flags, see :ref:`tuner-capability`. Audio flags - indicate the ability to decode audio subprograms. They will *not* - change, for example with the current video standard. - - When the structure refers to a radio tuner the - ``V4L2_TUNER_CAP_LANG1``, ``V4L2_TUNER_CAP_LANG2`` and - ``V4L2_TUNER_CAP_NORM`` flags can't be used. - - If multiple frequency bands are supported, then ``capability`` is - the union of all ``capability`` fields of each struct - :ref:`v4l2_frequency_band <v4l2-frequency-band>`. - - - .. row 5 - - - __u32 - - - ``rangelow`` - - - :cspan:`1` The lowest tunable frequency in units of 62.5 kHz, or - if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units - of 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` - is set, in units of 1 Hz. If multiple frequency bands are - supported, then ``rangelow`` is the lowest frequency of all the - frequency bands. - - - .. row 6 - - - __u32 - - - ``rangehigh`` - - - :cspan:`1` The highest tunable frequency in units of 62.5 kHz, - or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in - units of 62.5 Hz, or if the ``capability`` flag - ``V4L2_TUNER_CAP_1HZ`` is set, in units of 1 Hz. If multiple - frequency bands are supported, then ``rangehigh`` is the highest - frequency of all the frequency bands. - - - .. row 7 - - - __u32 - - - ``rxsubchans`` - - - :cspan:`1` - - Some tuners or audio decoders can determine the received audio - subprograms by analyzing audio carriers, pilot tones or other - indicators. To pass this information drivers set flags defined in - :ref:`tuner-rxsubchans` in this field. For example: - - - .. row 8 - - - - - - - ``V4L2_TUNER_SUB_MONO`` - - - receiving mono audio - - - .. row 9 - - - - - - - ``STEREO | SAP`` - - - receiving stereo audio and a secondary audio program - - - .. row 10 - - - - - - - ``MONO | STEREO`` - - - receiving mono or stereo audio, the hardware cannot distinguish - - - .. row 11 - - - - - - - ``LANG1 | LANG2`` - - - receiving bilingual audio - - - .. row 12 - - - - - - - ``MONO | STEREO | LANG1 | LANG2`` - - - receiving mono, stereo or bilingual audio - - - .. row 13 - - - - - - - :cspan:`1` - - When the ``V4L2_TUNER_CAP_STEREO``, ``_LANG1``, ``_LANG2`` or - ``_SAP`` flag is cleared in the ``capability`` field, the - corresponding ``V4L2_TUNER_SUB_`` flag must not be set here. - - This field is valid only if this is the tuner of the current video - input, or when the structure refers to a radio tuner. - - - .. row 14 - - - __u32 - - - ``audmode`` - - - :cspan:`1` - - The selected audio mode, see :ref:`tuner-audmode` for valid - values. The audio mode does not affect audio subprogram detection, - and like a :ref:`control` it does not automatically - change unless the requested mode is invalid or unsupported. See - :ref:`tuner-matrix` for possible results when the selected and - received audio programs do not match. - - Currently this is the only field of struct - :ref:`struct v4l2_tuner <v4l2-tuner>` applications can change. - - - .. row 15 - - - __u32 - - - ``signal`` - - - :cspan:`1` The signal strength if known, ranging from 0 to - 65535. Higher values indicate a better signal. - - - .. row 16 - - - __s32 - - - ``afc`` - - - :cspan:`1` Automatic frequency control: When the ``afc`` value - is negative, the frequency is too low, when positive too high. - - - .. row 17 - - - __u32 - - - ``reserved``\ [4] - - - :cspan:`1` Reserved for future extensions. Drivers and - applications must set the array to zero. - - - -.. _v4l2-tuner-type: + * - __u32 + - ``index`` + - :cspan:`1` Identifies the tuner, set by the application. + * - __u8 + - ``name``\ [32] + - :cspan:`1` + + Name of the tuner, a NUL-terminated ASCII string. + + This information is intended for the user. + * - __u32 + - ``type`` + - :cspan:`1` Type of the tuner, see :c:type:`v4l2_tuner_type`. + * - __u32 + - ``capability`` + - :cspan:`1` + + Tuner capability flags, see :ref:`tuner-capability`. Audio flags + indicate the ability to decode audio subprograms. They will *not* + change, for example with the current video standard. + + When the structure refers to a radio tuner the + ``V4L2_TUNER_CAP_LANG1``, ``V4L2_TUNER_CAP_LANG2`` and + ``V4L2_TUNER_CAP_NORM`` flags can't be used. + + If multiple frequency bands are supported, then ``capability`` is + the union of all ``capability`` fields of each struct + :c:type:`v4l2_frequency_band`. + * - __u32 + - ``rangelow`` + - :cspan:`1` The lowest tunable frequency in units of 62.5 kHz, or + if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in units + of 62.5 Hz, or if the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` + is set, in units of 1 Hz. If multiple frequency bands are + supported, then ``rangelow`` is the lowest frequency of all the + frequency bands. + * - __u32 + - ``rangehigh`` + - :cspan:`1` The highest tunable frequency in units of 62.5 kHz, + or if the ``capability`` flag ``V4L2_TUNER_CAP_LOW`` is set, in + units of 62.5 Hz, or if the ``capability`` flag + ``V4L2_TUNER_CAP_1HZ`` is set, in units of 1 Hz. If multiple + frequency bands are supported, then ``rangehigh`` is the highest + frequency of all the frequency bands. + * - __u32 + - ``rxsubchans`` + - :cspan:`1` + + Some tuners or audio decoders can determine the received audio + subprograms by analyzing audio carriers, pilot tones or other + indicators. To pass this information drivers set flags defined in + :ref:`tuner-rxsubchans` in this field. For example: + * - + - + - ``V4L2_TUNER_SUB_MONO`` + - receiving mono audio + * - + - + - ``STEREO | SAP`` + - receiving stereo audio and a secondary audio program + * - + - + - ``MONO | STEREO`` + - receiving mono or stereo audio, the hardware cannot distinguish + * - + - + - ``LANG1 | LANG2`` + - receiving bilingual audio + * - + - + - ``MONO | STEREO | LANG1 | LANG2`` + - receiving mono, stereo or bilingual audio + * - + - + - :cspan:`1` + + When the ``V4L2_TUNER_CAP_STEREO``, ``_LANG1``, ``_LANG2`` or + ``_SAP`` flag is cleared in the ``capability`` field, the + corresponding ``V4L2_TUNER_SUB_`` flag must not be set here. + + This field is valid only if this is the tuner of the current video + input, or when the structure refers to a radio tuner. + * - __u32 + - ``audmode`` + - :cspan:`1` + + The selected audio mode, see :ref:`tuner-audmode` for valid + values. The audio mode does not affect audio subprogram detection, + and like a :ref:`control` it does not automatically + change unless the requested mode is invalid or unsupported. See + :ref:`tuner-matrix` for possible results when the selected and + received audio programs do not match. + + Currently this is the only field of struct + struct :c:type:`v4l2_tuner` applications can change. + * - __u32 + - ``signal`` + - :cspan:`1` The signal strength if known. + + Ranging from 0 to 65535. Higher values indicate a better signal. + * - __s32 + - ``afc`` + - :cspan:`1` Automatic frequency control. + + When the ``afc`` value is negative, the frequency is too + low, when positive too high. + * - __u32 + - ``reserved``\ [4] + - :cspan:`1` Reserved for future extensions. + + Drivers and applications must set the array to zero. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| + +.. c:type:: v4l2_tuner_type .. flat-table:: enum v4l2_tuner_type :header-rows: 0 :stub-columns: 0 - :widths: 3 1 4 - - - - .. row 1 - - - ``V4L2_TUNER_RADIO`` + :widths: 3 1 6 - - 1 - - - - - - .. row 2 - - - ``V4L2_TUNER_ANALOG_TV`` - - - 2 - - - - - - .. row 3 - - - ``V4L2_TUNER_SDR`` - - - 4 - - - - - - .. row 4 - - - ``V4L2_TUNER_RF`` - - - 5 - - - + * - ``V4L2_TUNER_RADIO`` + - 1 + - Tuner supports radio + * - ``V4L2_TUNER_ANALOG_TV`` + - 2 + - Tuner supports analog TV + * - ``V4L2_TUNER_SDR`` + - 4 + - Tuner controls the A/D and/or D/A block of a + Sofware Digital Radio (SDR) + * - ``V4L2_TUNER_RF`` + - 5 + - Tuner controls the RF part of a Sofware Digital Radio (SDR) +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _tuner-capability: +.. cssclass:: longtable + .. flat-table:: Tuner and Modulator Capability Flags :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_TUNER_CAP_LOW`` - - - 0x0001 - - - When set, tuning frequencies are expressed in units of 62.5 Hz - instead of 62.5 kHz. - - - .. row 2 - - - ``V4L2_TUNER_CAP_NORM`` - - - 0x0002 - - - This is a multi-standard tuner; the video standard can or must be - switched. (B/G PAL tuners for example are typically not considered - multi-standard because the video standard is automatically - determined from the frequency band.) The set of supported video - standards is available from the struct - :ref:`v4l2_input <v4l2-input>` pointing to this tuner, see the - description of ioctl :ref:`VIDIOC_ENUMINPUT` - for details. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this - capability. - - - .. row 3 - - - ``V4L2_TUNER_CAP_HWSEEK_BOUNDED`` - - - 0x0004 - - - If set, then this tuner supports the hardware seek functionality - where the seek stops when it reaches the end of the frequency - range. - - - .. row 4 - - - ``V4L2_TUNER_CAP_HWSEEK_WRAP`` - - - 0x0008 - - - If set, then this tuner supports the hardware seek functionality - where the seek wraps around when it reaches the end of the - frequency range. - - - .. row 5 - - - ``V4L2_TUNER_CAP_STEREO`` - - - 0x0010 - - - Stereo audio reception is supported. - - - .. row 6 - - - ``V4L2_TUNER_CAP_LANG1`` - - - 0x0040 - - - Reception of the primary language of a bilingual audio program is - supported. Bilingual audio is a feature of two-channel systems, - transmitting the primary language monaural on the main audio - carrier and a secondary language monaural on a second carrier. - Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability. - - - .. row 7 - - - ``V4L2_TUNER_CAP_LANG2`` - - - 0x0020 - - - Reception of the secondary language of a bilingual audio program - is supported. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this - capability. - - - .. row 8 - - - ``V4L2_TUNER_CAP_SAP`` - - - 0x0020 - - - Reception of a secondary audio program is supported. This is a - feature of the BTSC system which accompanies the NTSC video - standard. Two audio carriers are available for mono or stereo - transmissions of a primary language, and an independent third - carrier for a monaural secondary language. Only - ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability. - - .. note:: The ``V4L2_TUNER_CAP_LANG2`` and ``V4L2_TUNER_CAP_SAP`` - flags are synonyms. ``V4L2_TUNER_CAP_SAP`` applies when the tuner - supports the ``V4L2_STD_NTSC_M`` video standard. - - - .. row 9 - - - ``V4L2_TUNER_CAP_RDS`` - - - 0x0080 - - - RDS capture is supported. This capability is only valid for radio - tuners. - - - .. row 10 - - - ``V4L2_TUNER_CAP_RDS_BLOCK_IO`` - - - 0x0100 - - - The RDS data is passed as unparsed RDS blocks. - - - .. row 11 - - - ``V4L2_TUNER_CAP_RDS_CONTROLS`` - - - 0x0200 - - - The RDS data is parsed by the hardware and set via controls. - - - .. row 12 - - - ``V4L2_TUNER_CAP_FREQ_BANDS`` - - - 0x0400 - - - The :ref:`VIDIOC_ENUM_FREQ_BANDS` - ioctl can be used to enumerate the available frequency bands. - - - .. row 13 - - - ``V4L2_TUNER_CAP_HWSEEK_PROG_LIM`` - - - 0x0800 - - - The range to search when using the hardware seek functionality is - programmable, see - :ref:`VIDIOC_S_HW_FREQ_SEEK` for - details. - - - .. row 14 - - - ``V4L2_TUNER_CAP_1HZ`` - - - 0x1000 - - - When set, tuning frequencies are expressed in units of 1 Hz - instead of 62.5 kHz. - - + * - ``V4L2_TUNER_CAP_LOW`` + - 0x0001 + - When set, tuning frequencies are expressed in units of 62.5 Hz + instead of 62.5 kHz. + * - ``V4L2_TUNER_CAP_NORM`` + - 0x0002 + - This is a multi-standard tuner; the video standard can or must be + switched. (B/G PAL tuners for example are typically not considered + multi-standard because the video standard is automatically + determined from the frequency band.) The set of supported video + standards is available from the struct + :c:type:`v4l2_input` pointing to this tuner, see the + description of ioctl :ref:`VIDIOC_ENUMINPUT` + for details. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this + capability. + * - ``V4L2_TUNER_CAP_HWSEEK_BOUNDED`` + - 0x0004 + - If set, then this tuner supports the hardware seek functionality + where the seek stops when it reaches the end of the frequency + range. + * - ``V4L2_TUNER_CAP_HWSEEK_WRAP`` + - 0x0008 + - If set, then this tuner supports the hardware seek functionality + where the seek wraps around when it reaches the end of the + frequency range. + * - ``V4L2_TUNER_CAP_STEREO`` + - 0x0010 + - Stereo audio reception is supported. + * - ``V4L2_TUNER_CAP_LANG1`` + - 0x0040 + - Reception of the primary language of a bilingual audio program is + supported. Bilingual audio is a feature of two-channel systems, + transmitting the primary language monaural on the main audio + carrier and a secondary language monaural on a second carrier. + Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability. + * - ``V4L2_TUNER_CAP_LANG2`` + - 0x0020 + - Reception of the secondary language of a bilingual audio program + is supported. Only ``V4L2_TUNER_ANALOG_TV`` tuners can have this + capability. + * - ``V4L2_TUNER_CAP_SAP`` + - 0x0020 + - Reception of a secondary audio program is supported. This is a + feature of the BTSC system which accompanies the NTSC video + standard. Two audio carriers are available for mono or stereo + transmissions of a primary language, and an independent third + carrier for a monaural secondary language. Only + ``V4L2_TUNER_ANALOG_TV`` tuners can have this capability. + + .. note:: + + The ``V4L2_TUNER_CAP_LANG2`` and ``V4L2_TUNER_CAP_SAP`` + flags are synonyms. ``V4L2_TUNER_CAP_SAP`` applies when the tuner + supports the ``V4L2_STD_NTSC_M`` video standard. + * - ``V4L2_TUNER_CAP_RDS`` + - 0x0080 + - RDS capture is supported. This capability is only valid for radio + tuners. + * - ``V4L2_TUNER_CAP_RDS_BLOCK_IO`` + - 0x0100 + - The RDS data is passed as unparsed RDS blocks. + * - ``V4L2_TUNER_CAP_RDS_CONTROLS`` + - 0x0200 + - The RDS data is parsed by the hardware and set via controls. + * - ``V4L2_TUNER_CAP_FREQ_BANDS`` + - 0x0400 + - The :ref:`VIDIOC_ENUM_FREQ_BANDS` + ioctl can be used to enumerate the available frequency bands. + * - ``V4L2_TUNER_CAP_HWSEEK_PROG_LIM`` + - 0x0800 + - The range to search when using the hardware seek functionality is + programmable, see + :ref:`VIDIOC_S_HW_FREQ_SEEK` for + details. + * - ``V4L2_TUNER_CAP_1HZ`` + - 0x1000 + - When set, tuning frequencies are expressed in units of 1 Hz + instead of 62.5 kHz. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _tuner-rxsubchans: @@ -458,63 +308,37 @@ To change the radio frequency the :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_TUNER_SUB_MONO`` - - - 0x0001 - - - The tuner receives a mono audio signal. - - - .. row 2 - - - ``V4L2_TUNER_SUB_STEREO`` - - - 0x0002 - - - The tuner receives a stereo audio signal. - - - .. row 3 - - - ``V4L2_TUNER_SUB_LANG1`` - - - 0x0008 - - - The tuner receives the primary language of a bilingual audio - signal. Drivers must clear this flag when the current video - standard is ``V4L2_STD_NTSC_M``. - - - .. row 4 - - - ``V4L2_TUNER_SUB_LANG2`` - - - 0x0004 - - - The tuner receives the secondary language of a bilingual audio - signal (or a second audio program). - - - .. row 5 - - - ``V4L2_TUNER_SUB_SAP`` - - - 0x0004 - - - The tuner receives a Second Audio Program. - - .. note:: The ``V4L2_TUNER_SUB_LANG2`` and ``V4L2_TUNER_SUB_SAP`` - flags are synonyms. The ``V4L2_TUNER_SUB_SAP`` flag applies - when the current video standard is ``V4L2_STD_NTSC_M``. - - - .. row 6 - - - ``V4L2_TUNER_SUB_RDS`` - - - 0x0010 - - - The tuner receives an RDS channel. - - + * - ``V4L2_TUNER_SUB_MONO`` + - 0x0001 + - The tuner receives a mono audio signal. + * - ``V4L2_TUNER_SUB_STEREO`` + - 0x0002 + - The tuner receives a stereo audio signal. + * - ``V4L2_TUNER_SUB_LANG1`` + - 0x0008 + - The tuner receives the primary language of a bilingual audio + signal. Drivers must clear this flag when the current video + standard is ``V4L2_STD_NTSC_M``. + * - ``V4L2_TUNER_SUB_LANG2`` + - 0x0004 + - The tuner receives the secondary language of a bilingual audio + signal (or a second audio program). + * - ``V4L2_TUNER_SUB_SAP`` + - 0x0004 + - The tuner receives a Second Audio Program. + + .. note:: + + The ``V4L2_TUNER_SUB_LANG2`` and ``V4L2_TUNER_SUB_SAP`` + flags are synonyms. The ``V4L2_TUNER_SUB_SAP`` flag applies + when the current video standard is ``V4L2_STD_NTSC_M``. + * - ``V4L2_TUNER_SUB_RDS`` + - 0x0010 + - The tuner receives an RDS channel. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _tuner-audmode: @@ -523,80 +347,52 @@ To change the radio frequency the :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_TUNER_MODE_MONO`` - - - 0 - - - Play mono audio. When the tuner receives a stereo signal this a - down-mix of the left and right channel. When the tuner receives a - bilingual or SAP signal this mode selects the primary language. - - - .. row 2 - - - ``V4L2_TUNER_MODE_STEREO`` - - - 1 - - - Play stereo audio. When the tuner receives bilingual audio it may - play different languages on the left and right channel or the - primary language is played on both channels. - - Playing different languages in this mode is deprecated. New - drivers should do this only in ``MODE_LANG1_LANG2``. - - When the tuner receives no stereo signal or does not support - stereo reception the driver shall fall back to ``MODE_MONO``. - - - .. row 3 - - - ``V4L2_TUNER_MODE_LANG1`` - - - 3 - - - Play the primary language, mono or stereo. Only - ``V4L2_TUNER_ANALOG_TV`` tuners support this mode. - - - .. row 4 - - - ``V4L2_TUNER_MODE_LANG2`` - - - 2 - - - Play the secondary language, mono. When the tuner receives no - bilingual audio or SAP, or their reception is not supported the - driver shall fall back to mono or stereo mode. Only - ``V4L2_TUNER_ANALOG_TV`` tuners support this mode. - - - .. row 5 - - - ``V4L2_TUNER_MODE_SAP`` - - - 2 - - - Play the Second Audio Program. When the tuner receives no - bilingual audio or SAP, or their reception is not supported the - driver shall fall back to mono or stereo mode. Only - ``V4L2_TUNER_ANALOG_TV`` tuners support this mode. - - .. note:: The ``V4L2_TUNER_MODE_LANG2`` and ``V4L2_TUNER_MODE_SAP`` - are synonyms. - - - .. row 6 - - - ``V4L2_TUNER_MODE_LANG1_LANG2`` - - - 4 - - - Play the primary language on the left channel, the secondary - language on the right channel. When the tuner receives no - bilingual audio or SAP, it shall fall back to ``MODE_LANG1`` or - ``MODE_MONO``. Only ``V4L2_TUNER_ANALOG_TV`` tuners support this - mode. - - + * - ``V4L2_TUNER_MODE_MONO`` + - 0 + - Play mono audio. When the tuner receives a stereo signal this a + down-mix of the left and right channel. When the tuner receives a + bilingual or SAP signal this mode selects the primary language. + * - ``V4L2_TUNER_MODE_STEREO`` + - 1 + - Play stereo audio. When the tuner receives bilingual audio it may + play different languages on the left and right channel or the + primary language is played on both channels. + + Playing different languages in this mode is deprecated. New + drivers should do this only in ``MODE_LANG1_LANG2``. + + When the tuner receives no stereo signal or does not support + stereo reception the driver shall fall back to ``MODE_MONO``. + * - ``V4L2_TUNER_MODE_LANG1`` + - 3 + - Play the primary language, mono or stereo. Only + ``V4L2_TUNER_ANALOG_TV`` tuners support this mode. + * - ``V4L2_TUNER_MODE_LANG2`` + - 2 + - Play the secondary language, mono. When the tuner receives no + bilingual audio or SAP, or their reception is not supported the + driver shall fall back to mono or stereo mode. Only + ``V4L2_TUNER_ANALOG_TV`` tuners support this mode. + * - ``V4L2_TUNER_MODE_SAP`` + - 2 + - Play the Second Audio Program. When the tuner receives no + bilingual audio or SAP, or their reception is not supported the + driver shall fall back to mono or stereo mode. Only + ``V4L2_TUNER_ANALOG_TV`` tuners support this mode. + + .. note:: The ``V4L2_TUNER_MODE_LANG2`` and ``V4L2_TUNER_MODE_SAP`` + are synonyms. + * - ``V4L2_TUNER_MODE_LANG1_LANG2`` + - 4 + - Play the primary language on the left channel, the secondary + language on the right channel. When the tuner receives no + bilingual audio or SAP, it shall fall back to ``MODE_LANG1`` or + ``MODE_MONO``. Only ``V4L2_TUNER_ANALOG_TV`` tuners support this + mode. + +.. raw:: latex + + \begin{adjustbox}{width=\columnwidth} .. _tuner-matrix: @@ -604,96 +400,48 @@ To change the radio frequency the :header-rows: 2 :stub-columns: 0 - - - .. row 1 - - - - - :cspan:`5` Selected ``V4L2_TUNER_MODE_`` - - - .. row 2 - - - Received ``V4L2_TUNER_SUB_`` - - - ``MONO`` - - - ``STEREO`` - - - ``LANG1`` - - - ``LANG2 = SAP`` - - - ``LANG1_LANG2``\ [#f1]_ - - - .. row 3 - - - ``MONO`` - - - Mono - - - Mono/Mono - - - Mono - - - Mono - - - Mono/Mono - - - .. row 4 - - - ``MONO | SAP`` - - - Mono - - - Mono/Mono - - - Mono - - - SAP - - - Mono/SAP (preferred) or Mono/Mono - - - .. row 5 - - - ``STEREO`` - - - L+R - - - L/R - - - Stereo L/R (preferred) or Mono L+R - - - Stereo L/R (preferred) or Mono L+R - - - L/R (preferred) or L+R/L+R - - - .. row 6 - - - ``STEREO | SAP`` - - - L+R - - - L/R - - - Stereo L/R (preferred) or Mono L+R - - - SAP - - - L+R/SAP (preferred) or L/R or L+R/L+R - - - .. row 7 - - - ``LANG1 | LANG2`` - - - Language 1 - - - Lang1/Lang2 (deprecated [#f2]_) or Lang1/Lang1 - - - Language 1 - - - Language 2 - - - Lang1/Lang2 (preferred) or Lang1/Lang1 - + * - + - :cspan:`5` Selected ``V4L2_TUNER_MODE_`` + * - Received ``V4L2_TUNER_SUB_`` + - ``MONO`` + - ``STEREO`` + - ``LANG1`` + - ``LANG2 = SAP`` + - ``LANG1_LANG2``\ [#f1]_ + * - ``MONO`` + - Mono + - Mono/Mono + - Mono + - Mono + - Mono/Mono + * - ``MONO | SAP`` + - Mono + - Mono/Mono + - Mono + - SAP + - Mono/SAP (preferred) or Mono/Mono + * - ``STEREO`` + - L+R + - L/R + - Stereo L/R (preferred) or Mono L+R + - Stereo L/R (preferred) or Mono L+R + - L/R (preferred) or L+R/L+R + * - ``STEREO | SAP`` + - L+R + - L/R + - Stereo L/R (preferred) or Mono L+R + - SAP + - L+R/SAP (preferred) or L/R or L+R/L+R + * - ``LANG1 | LANG2`` + - Language 1 + - Lang1/Lang2 (deprecated [#f2]_) or Lang1/Lang1 + - Language 1 + - Language 2 + - Lang1/Lang2 (preferred) or Lang1/Lang1 + +.. raw:: latex + + \end{adjustbox}\newline\newline Return Value ============ @@ -703,7 +451,7 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. EINVAL - The struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` is out of + The struct :c:type:`v4l2_tuner` ``index`` is out of bounds. .. [#f1] diff --git a/Documentation/media/uapi/v4l/vidioc-log-status.rst b/Documentation/media/uapi/v4l/vidioc-log-status.rst index 66fc352c0ffa..bbeb7b5f516b 100644 --- a/Documentation/media/uapi/v4l/vidioc-log-status.rst +++ b/Documentation/media/uapi/v4l/vidioc-log-status.rst @@ -15,12 +15,15 @@ VIDIOC_LOG_STATUS - Log driver status information Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request ) +.. c:function:: int ioctl( int fd, VIDIOC_LOG_STATUS) + :name: VIDIOC_LOG_STATUS Arguments ========= +``fd`` + File descriptor returned by :ref:`open() <func-open>`. Description diff --git a/Documentation/media/uapi/v4l/vidioc-overlay.rst b/Documentation/media/uapi/v4l/vidioc-overlay.rst index 191dbc144ef7..cd7b62ebc53b 100644 --- a/Documentation/media/uapi/v4l/vidioc-overlay.rst +++ b/Documentation/media/uapi/v4l/vidioc-overlay.rst @@ -15,7 +15,8 @@ VIDIOC_OVERLAY - Start or stop video overlay Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, const int *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_OVERLAY, const int *argp ) + :name: VIDIOC_OVERLAY Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_OVERLAY - ``argp`` diff --git a/Documentation/media/uapi/v4l/vidioc-prepare-buf.rst b/Documentation/media/uapi/v4l/vidioc-prepare-buf.rst index 79076dff46fd..bdcfd9fe550d 100644 --- a/Documentation/media/uapi/v4l/vidioc-prepare-buf.rst +++ b/Documentation/media/uapi/v4l/vidioc-prepare-buf.rst @@ -15,7 +15,8 @@ VIDIOC_PREPARE_BUF - Prepare a buffer for I/O Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_PREPARE_BUF, struct v4l2_buffer *argp ) + :name: VIDIOC_PREPARE_BUF Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_PREPARE_BUF - ``argp`` @@ -42,7 +40,7 @@ operations are not required, the application can use one of ``V4L2_BUF_FLAG_NO_CACHE_INVALIDATE`` and ``V4L2_BUF_FLAG_NO_CACHE_CLEAN`` flags to skip the respective step. -The :ref:`struct v4l2_buffer <v4l2-buffer>` structure is specified in +The struct :c:type:`v4l2_buffer` structure is specified in :ref:`buffer`. diff --git a/Documentation/media/uapi/v4l/vidioc-qbuf.rst b/Documentation/media/uapi/v4l/vidioc-qbuf.rst index 3b927f36fb5b..1f3612637200 100644 --- a/Documentation/media/uapi/v4l/vidioc-qbuf.rst +++ b/Documentation/media/uapi/v4l/vidioc-qbuf.rst @@ -15,7 +15,11 @@ VIDIOC_QBUF - VIDIOC_DQBUF - Exchange a buffer with the driver Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_QBUF, struct v4l2_buffer *argp ) + :name: VIDIOC_QBUF + +.. c:function:: int ioctl( int fd, VIDIOC_DQBUF, struct v4l2_buffer *argp ) + :name: VIDIOC_DQBUF Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_QBUF, VIDIOC_DQBUF - ``argp`` @@ -38,14 +39,14 @@ Applications call the ``VIDIOC_QBUF`` ioctl to enqueue an empty The semantics depend on the selected I/O method. To enqueue a buffer applications set the ``type`` field of a struct -:ref:`v4l2_buffer <v4l2-buffer>` to the same buffer type as was -previously used with struct :ref:`v4l2_format <v4l2-format>` ``type`` -and struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``. +:c:type:`v4l2_buffer` to the same buffer type as was +previously used with struct :c:type:`v4l2_format` ``type`` +and struct :c:type:`v4l2_requestbuffers` ``type``. Applications must also set the ``index`` field. Valid index numbers range from zero to the number of buffers allocated with :ref:`VIDIOC_REQBUFS` (struct -:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus -one. The contents of the struct :ref:`struct v4l2_buffer <v4l2-buffer>` returned +:c:type:`v4l2_requestbuffers` ``count``) minus +one. The contents of the struct :c:type:`v4l2_buffer` returned by a :ref:`VIDIOC_QUERYBUF` ioctl will do as well. When the buffer is intended for output (``type`` is ``V4L2_BUF_TYPE_VIDEO_OUTPUT``, ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``, @@ -55,7 +56,7 @@ for details. Applications must also set ``flags`` to 0. The ``reserved2`` and ``reserved`` fields must be set to 0. When using the :ref:`multi-planar API <planar-apis>`, the ``m.planes`` field must contain a userspace pointer to a filled-in array of struct -:ref:`v4l2_plane <v4l2-plane>` and the ``length`` field must be set +:c:type:`v4l2_plane` and the ``length`` field must be set to the number of elements in that array. To enqueue a :ref:`memory mapped <mmap>` buffer applications set the @@ -69,7 +70,7 @@ To enqueue a :ref:`user pointer <userp>` buffer applications set the ``memory`` field to ``V4L2_MEMORY_USERPTR``, the ``m.userptr`` field to the address of the buffer and ``length`` to its size. When the multi-planar API is used, ``m.userptr`` and ``length`` members of the -passed array of struct :ref:`v4l2_plane <v4l2-plane>` have to be used +passed array of struct :c:type:`v4l2_plane` have to be used instead. When ``VIDIOC_QBUF`` is called with a pointer to this structure the driver sets the ``V4L2_BUF_FLAG_QUEUED`` flag and clears the ``V4L2_BUF_FLAG_MAPPED`` and ``V4L2_BUF_FLAG_DONE`` flags in the @@ -84,7 +85,7 @@ To enqueue a :ref:`DMABUF <dmabuf>` buffer applications set the ``memory`` field to ``V4L2_MEMORY_DMABUF`` and the ``m.fd`` field to a file descriptor associated with a DMABUF buffer. When the multi-planar API is used the ``m.fd`` fields of the passed array of struct -:ref:`v4l2_plane <v4l2-plane>` have to be used instead. When +:c:type:`v4l2_plane` have to be used instead. When ``VIDIOC_QBUF`` is called with a pointer to this structure the driver sets the ``V4L2_BUF_FLAG_QUEUED`` flag and clears the ``V4L2_BUF_FLAG_MAPPED`` and ``V4L2_BUF_FLAG_DONE`` flags in the @@ -99,7 +100,7 @@ device is closed. Applications call the ``VIDIOC_DQBUF`` ioctl to dequeue a filled (capturing) or displayed (output) buffer from the driver's outgoing queue. They just set the ``type``, ``memory`` and ``reserved`` fields of -a struct :ref:`v4l2_buffer <v4l2-buffer>` as above, when +a struct :c:type:`v4l2_buffer` as above, when ``VIDIOC_DQBUF`` is called with a pointer to this structure the driver fills the remaining fields or returns an error code. The driver may also set ``V4L2_BUF_FLAG_ERROR`` in the ``flags`` field. It indicates a @@ -113,7 +114,7 @@ queue. When the ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function, ``VIDIOC_DQBUF`` returns immediately with an ``EAGAIN`` error code when no buffer is available. -The :ref:`struct v4l2_buffer <v4l2-buffer>` structure is specified in +The struct :c:type:`v4l2_buffer` structure is specified in :ref:`buffer`. @@ -137,7 +138,9 @@ EIO ``VIDIOC_DQBUF`` failed due to an internal error. Can also indicate temporary problems like signal loss. - .. note:: The driver might dequeue an (empty) buffer despite returning + .. note:: + + The driver might dequeue an (empty) buffer despite returning an error, or even stop capturing. Reusing such buffer may be unsafe though and its details (e.g. ``index``) may not be returned either. It is recommended that drivers indicate recoverable errors by setting diff --git a/Documentation/media/uapi/v4l/vidioc-query-dv-timings.rst b/Documentation/media/uapi/v4l/vidioc-query-dv-timings.rst index 416d8d604af4..0d16853b1b51 100644 --- a/Documentation/media/uapi/v4l/vidioc-query-dv-timings.rst +++ b/Documentation/media/uapi/v4l/vidioc-query-dv-timings.rst @@ -15,7 +15,11 @@ VIDIOC_QUERY_DV_TIMINGS - VIDIOC_SUBDEV_QUERY_DV_TIMINGS - Sense the DV preset r Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_dv_timings *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp ) + :name: VIDIOC_QUERY_DV_TIMINGS + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp ) + :name: VIDIOC_SUBDEV_QUERY_DV_TIMINGS Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_QUERY_DV_TIMINGS, VIDIOC_SUBDEV_QUERY_DV_TIMINGS - ``argp`` @@ -36,10 +37,12 @@ Description The hardware may be able to detect the current DV timings automatically, similar to sensing the video standard. To do so, applications call :ref:`VIDIOC_QUERY_DV_TIMINGS` with a pointer to a struct -:ref:`v4l2_dv_timings <v4l2-dv-timings>`. Once the hardware detects +:c:type:`v4l2_dv_timings`. Once the hardware detects the timings, it will fill in the timings structure. -.. note:: Drivers shall *not* switch timings automatically if new +.. note:: + + Drivers shall *not* switch timings automatically if new timings are detected. Instead, drivers should send the ``V4L2_EVENT_SOURCE_CHANGE`` event (if they support this) and expect that userspace will take action by calling :ref:`VIDIOC_QUERY_DV_TIMINGS`. diff --git a/Documentation/media/uapi/v4l/vidioc-querybuf.rst b/Documentation/media/uapi/v4l/vidioc-querybuf.rst index 32af6f7b5060..0bdc8e0abddc 100644 --- a/Documentation/media/uapi/v4l/vidioc-querybuf.rst +++ b/Documentation/media/uapi/v4l/vidioc-querybuf.rst @@ -15,7 +15,8 @@ VIDIOC_QUERYBUF - Query the status of a buffer Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_buffer *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_QUERYBUF, struct v4l2_buffer *argp ) + :name: VIDIOC_QUERYBUF Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_QUERYBUF - ``argp`` @@ -38,17 +36,17 @@ be used to query the status of a buffer at any time after buffers have been allocated with the :ref:`VIDIOC_REQBUFS` ioctl. Applications set the ``type`` field of a struct -:ref:`v4l2_buffer <v4l2-buffer>` to the same buffer type as was -previously used with struct :ref:`v4l2_format <v4l2-format>` ``type`` -and struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, +:c:type:`v4l2_buffer` to the same buffer type as was +previously used with struct :c:type:`v4l2_format` ``type`` +and struct :c:type:`v4l2_requestbuffers` ``type``, and the ``index`` field. Valid index numbers range from zero to the number of buffers allocated with :ref:`VIDIOC_REQBUFS` (struct -:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus +:c:type:`v4l2_requestbuffers` ``count``) minus one. The ``reserved`` and ``reserved2`` fields must be set to 0. When using the :ref:`multi-planar API <planar-apis>`, the ``m.planes`` field must contain a userspace pointer to an array of struct -:ref:`v4l2_plane <v4l2-plane>` and the ``length`` field has to be set +:c:type:`v4l2_plane` and the ``length`` field has to be set to the number of elements in that array. After calling :ref:`VIDIOC_QUERYBUF` with a pointer to this structure drivers return an error code or fill the rest of the structure. @@ -61,11 +59,11 @@ set to the current I/O method. For the single-planar API, the device memory, the ``length`` field its size. For the multi-planar API, fields ``m.mem_offset`` and ``length`` in the ``m.planes`` array elements will be used instead and the ``length`` field of struct -:ref:`v4l2_buffer <v4l2-buffer>` is set to the number of filled-in +:c:type:`v4l2_buffer` is set to the number of filled-in array elements. The driver may or may not set the remaining fields and flags, they are meaningless in this context. -The :ref:`struct v4l2_buffer <v4l2-buffer>` structure is specified in +The struct :c:type:`v4l2_buffer` structure is specified in :ref:`buffer`. diff --git a/Documentation/media/uapi/v4l/vidioc-querycap.rst b/Documentation/media/uapi/v4l/vidioc-querycap.rst index b10fed313f99..165d8314327e 100644 --- a/Documentation/media/uapi/v4l/vidioc-querycap.rst +++ b/Documentation/media/uapi/v4l/vidioc-querycap.rst @@ -15,7 +15,8 @@ VIDIOC_QUERYCAP - Query device capabilities Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_capability *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_QUERYCAP, struct v4l2_capability *argp ) + :name: VIDIOC_QUERYCAP Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_QUERYCAP - ``argp`` @@ -36,389 +34,226 @@ Description All V4L2 devices support the ``VIDIOC_QUERYCAP`` ioctl. It is used to identify kernel devices compatible with this specification and to obtain information about driver and hardware capabilities. The ioctl takes a -pointer to a struct :ref:`v4l2_capability <v4l2-capability>` which is +pointer to a struct :c:type:`v4l2_capability` which is filled by the driver. When the driver is not compatible with this specification the ioctl returns an ``EINVAL`` error code. -.. _v4l2-capability: +.. tabularcolumns:: |p{1.5cm}|p{2.5cm}|p{13cm}| + +.. c:type:: v4l2_capability .. flat-table:: struct v4l2_capability :header-rows: 0 :stub-columns: 0 - :widths: 1 1 2 - - - - .. row 1 - - - __u8 - - - ``driver``\ [16] - - - Name of the driver, a unique NUL-terminated ASCII string. For - example: "bttv". Driver specific applications can use this - information to verify the driver identity. It is also useful to - work around known bugs, or to identify drivers in error reports. - - Storing strings in fixed sized arrays is bad practice but - unavoidable here. Drivers and applications should take precautions - to never read or write beyond the end of the array and to make - sure the strings are properly NUL-terminated. - - - .. row 2 - - - __u8 - - - ``card``\ [32] - - - Name of the device, a NUL-terminated UTF-8 string. For example: - "Yoyodyne TV/FM". One driver may support different brands or - models of video hardware. This information is intended for users, - for example in a menu of available devices. Since multiple TV - cards of the same brand may be installed which are supported by - the same driver, this name should be combined with the character - device file name (e. g. ``/dev/video2``) or the ``bus_info`` - string to avoid ambiguities. - - - .. row 3 - - - __u8 - - - ``bus_info``\ [32] - - - Location of the device in the system, a NUL-terminated ASCII - string. For example: "PCI:0000:05:06.0". This information is - intended for users, to distinguish multiple identical devices. If - no such information is available the field must simply count the - devices controlled by the driver ("platform:vivi-000"). The - bus_info must start with "PCI:" for PCI boards, "PCIe:" for PCI - Express boards, "usb-" for USB devices, "I2C:" for i2c devices, - "ISA:" for ISA devices, "parport" for parallel port devices and - "platform:" for platform devices. - - - .. row 4 - - - __u32 - - - ``version`` - - - Version number of the driver. - - Starting with kernel 3.1, the version reported is provided by the - V4L2 subsystem following the kernel numbering scheme. However, it - may not always return the same version as the kernel if, for - example, a stable or distribution-modified kernel uses the V4L2 - stack from a newer kernel. - - The version number is formatted using the ``KERNEL_VERSION()`` - macro: - - - .. row 5 - - - :cspan:`2` - - - .. code-block:: c - - #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) - - __u32 version = KERNEL_VERSION(0, 8, 1); - - printf ("Version: %u.%u.%u\\n", - (version >> 16) & 0xFF, - (version >> 8) & 0xFF, - version & 0xFF); - - - .. row 6 - - - __u32 - - - ``capabilities`` - - - Available capabilities of the physical device as a whole, see - :ref:`device-capabilities`. The same physical device can export - multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and - /dev/radioZ). The ``capabilities`` field should contain a union of - all capabilities available around the several V4L2 devices - exported to userspace. For all those devices the ``capabilities`` - field returns the same set of capabilities. This allows - applications to open just one of the devices (typically the video - device) and discover whether video, vbi and/or radio are also - supported. - - - .. row 7 - - - __u32 - - - ``device_caps`` - - - Device capabilities of the opened device, see - :ref:`device-capabilities`. Should contain the available - capabilities of that specific device node. So, for example, - ``device_caps`` of a radio device will only contain radio related - capabilities and no video or vbi capabilities. This field is only - set if the ``capabilities`` field contains the - ``V4L2_CAP_DEVICE_CAPS`` capability. Only the ``capabilities`` - field can have the ``V4L2_CAP_DEVICE_CAPS`` capability, - ``device_caps`` will never set ``V4L2_CAP_DEVICE_CAPS``. - - - .. row 8 - - - __u32 - - - ``reserved``\ [3] - - - Reserved for future extensions. Drivers must set this array to - zero. - - + :widths: 3 4 20 + + * - __u8 + - ``driver``\ [16] + - Name of the driver, a unique NUL-terminated ASCII string. For + example: "bttv". Driver specific applications can use this + information to verify the driver identity. It is also useful to + work around known bugs, or to identify drivers in error reports. + + Storing strings in fixed sized arrays is bad practice but + unavoidable here. Drivers and applications should take precautions + to never read or write beyond the end of the array and to make + sure the strings are properly NUL-terminated. + * - __u8 + - ``card``\ [32] + - Name of the device, a NUL-terminated UTF-8 string. For example: + "Yoyodyne TV/FM". One driver may support different brands or + models of video hardware. This information is intended for users, + for example in a menu of available devices. Since multiple TV + cards of the same brand may be installed which are supported by + the same driver, this name should be combined with the character + device file name (e. g. ``/dev/video2``) or the ``bus_info`` + string to avoid ambiguities. + * - __u8 + - ``bus_info``\ [32] + - Location of the device in the system, a NUL-terminated ASCII + string. For example: "PCI:0000:05:06.0". This information is + intended for users, to distinguish multiple identical devices. If + no such information is available the field must simply count the + devices controlled by the driver ("platform:vivi-000"). The + bus_info must start with "PCI:" for PCI boards, "PCIe:" for PCI + Express boards, "usb-" for USB devices, "I2C:" for i2c devices, + "ISA:" for ISA devices, "parport" for parallel port devices and + "platform:" for platform devices. + * - __u32 + - ``version`` + - Version number of the driver. + + Starting with kernel 3.1, the version reported is provided by the + V4L2 subsystem following the kernel numbering scheme. However, it + may not always return the same version as the kernel if, for + example, a stable or distribution-modified kernel uses the V4L2 + stack from a newer kernel. + + The version number is formatted using the ``KERNEL_VERSION()`` + macro: + * - :cspan:`2` + + ``#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))`` + + ``__u32 version = KERNEL_VERSION(0, 8, 1);`` + + ``printf ("Version: %u.%u.%u\\n",`` + + ``(version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);`` + * - __u32 + - ``capabilities`` + - Available capabilities of the physical device as a whole, see + :ref:`device-capabilities`. The same physical device can export + multiple devices in /dev (e.g. /dev/videoX, /dev/vbiY and + /dev/radioZ). The ``capabilities`` field should contain a union of + all capabilities available around the several V4L2 devices + exported to userspace. For all those devices the ``capabilities`` + field returns the same set of capabilities. This allows + applications to open just one of the devices (typically the video + device) and discover whether video, vbi and/or radio are also + supported. + * - __u32 + - ``device_caps`` + - Device capabilities of the opened device, see + :ref:`device-capabilities`. Should contain the available + capabilities of that specific device node. So, for example, + ``device_caps`` of a radio device will only contain radio related + capabilities and no video or vbi capabilities. This field is only + set if the ``capabilities`` field contains the + ``V4L2_CAP_DEVICE_CAPS`` capability. Only the ``capabilities`` + field can have the ``V4L2_CAP_DEVICE_CAPS`` capability, + ``device_caps`` will never set ``V4L2_CAP_DEVICE_CAPS``. + * - __u32 + - ``reserved``\ [3] + - Reserved for future extensions. Drivers must set this array to + zero. + + + +.. tabularcolumns:: |p{6cm}|p{2.2cm}|p{8.8cm}| .. _device-capabilities: +.. cssclass:: longtable + .. flat-table:: Device Capabilities Flags :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_CAP_VIDEO_CAPTURE`` - - - 0x00000001 - - - The device supports the single-planar API through the - :ref:`Video Capture <capture>` interface. - - - .. row 2 - - - ``V4L2_CAP_VIDEO_CAPTURE_MPLANE`` - - - 0x00001000 - - - The device supports the :ref:`multi-planar API <planar-apis>` - through the :ref:`Video Capture <capture>` interface. - - - .. row 3 - - - ``V4L2_CAP_VIDEO_OUTPUT`` - - - 0x00000002 - - - The device supports the single-planar API through the - :ref:`Video Output <output>` interface. - - - .. row 4 - - - ``V4L2_CAP_VIDEO_OUTPUT_MPLANE`` - - - 0x00002000 - - - The device supports the :ref:`multi-planar API <planar-apis>` - through the :ref:`Video Output <output>` interface. - - - .. row 5 - - - ``V4L2_CAP_VIDEO_M2M`` - - - 0x00004000 - - - The device supports the single-planar API through the Video - Memory-To-Memory interface. - - - .. row 6 - - - ``V4L2_CAP_VIDEO_M2M_MPLANE`` - - - 0x00008000 - - - The device supports the :ref:`multi-planar API <planar-apis>` - through the Video Memory-To-Memory interface. - - - .. row 7 - - - ``V4L2_CAP_VIDEO_OVERLAY`` - - - 0x00000004 - - - The device supports the :ref:`Video Overlay <overlay>` - interface. A video overlay device typically stores captured images - directly in the video memory of a graphics card, with hardware - clipping and scaling. - - - .. row 8 - - - ``V4L2_CAP_VBI_CAPTURE`` - - - 0x00000010 - - - The device supports the :ref:`Raw VBI Capture <raw-vbi>` - interface, providing Teletext and Closed Caption data. - - - .. row 9 - - - ``V4L2_CAP_VBI_OUTPUT`` - - - 0x00000020 - - - The device supports the :ref:`Raw VBI Output <raw-vbi>` - interface. - - - .. row 10 - - - ``V4L2_CAP_SLICED_VBI_CAPTURE`` - - - 0x00000040 - - - The device supports the :ref:`Sliced VBI Capture <sliced>` - interface. - - - .. row 11 - - - ``V4L2_CAP_SLICED_VBI_OUTPUT`` - - - 0x00000080 - - - The device supports the :ref:`Sliced VBI Output <sliced>` - interface. - - - .. row 12 - - - ``V4L2_CAP_RDS_CAPTURE`` - - - 0x00000100 - - - The device supports the :ref:`RDS <rds>` capture interface. - - - .. row 13 - - - ``V4L2_CAP_VIDEO_OUTPUT_OVERLAY`` - - - 0x00000200 - - - The device supports the :ref:`Video Output Overlay <osd>` (OSD) - interface. Unlike the *Video Overlay* interface, this is a - secondary function of video output devices and overlays an image - onto an outgoing video signal. When the driver sets this flag, it - must clear the ``V4L2_CAP_VIDEO_OVERLAY`` flag and vice - versa. [#f1]_ - - - .. row 14 - - - ``V4L2_CAP_HW_FREQ_SEEK`` - - - 0x00000400 - - - The device supports the - :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl - for hardware frequency seeking. - - - .. row 15 - - - ``V4L2_CAP_RDS_OUTPUT`` - - - 0x00000800 - - - The device supports the :ref:`RDS <rds>` output interface. - - - .. row 16 - - - ``V4L2_CAP_TUNER`` - - - 0x00010000 - - - The device has some sort of tuner to receive RF-modulated video - signals. For more information about tuner programming see - :ref:`tuner`. - - - .. row 17 - - - ``V4L2_CAP_AUDIO`` - - - 0x00020000 - - - The device has audio inputs or outputs. It may or may not support - audio recording or playback, in PCM or compressed formats. PCM - audio support must be implemented as ALSA or OSS interface. For - more information on audio inputs and outputs see :ref:`audio`. - - - .. row 18 - - - ``V4L2_CAP_RADIO`` - - - 0x00040000 - - - This is a radio receiver. - - - .. row 19 - - - ``V4L2_CAP_MODULATOR`` - - - 0x00080000 - - - The device has some sort of modulator to emit RF-modulated - video/audio signals. For more information about modulator - programming see :ref:`tuner`. - - - .. row 20 - - - ``V4L2_CAP_SDR_CAPTURE`` - - - 0x00100000 - - - The device supports the :ref:`SDR Capture <sdr>` interface. - - - .. row 21 - - - ``V4L2_CAP_EXT_PIX_FORMAT`` - - - 0x00200000 - - - The device supports the struct - :ref:`v4l2_pix_format <v4l2-pix-format>` extended fields. - - - .. row 22 - - - ``V4L2_CAP_SDR_OUTPUT`` - - - 0x00400000 - - - The device supports the :ref:`SDR Output <sdr>` interface. - - - .. row 23 - - - ``V4L2_CAP_READWRITE`` - - - 0x01000000 - - - The device supports the :ref:`read() <rw>` and/or - :ref:`write() <rw>` I/O methods. - - - .. row 24 - - - ``V4L2_CAP_ASYNCIO`` - - - 0x02000000 - - - The device supports the :ref:`asynchronous <async>` I/O methods. - - - .. row 25 - - - ``V4L2_CAP_STREAMING`` - - - 0x04000000 - - - The device supports the :ref:`streaming <mmap>` I/O method. - - - .. row 26 - - - ``V4L2_CAP_DEVICE_CAPS`` - - - 0x80000000 - - - The driver fills the ``device_caps`` field. This capability can - only appear in the ``capabilities`` field and never in the - ``device_caps`` field. + * - ``V4L2_CAP_VIDEO_CAPTURE`` + - 0x00000001 + - The device supports the single-planar API through the + :ref:`Video Capture <capture>` interface. + * - ``V4L2_CAP_VIDEO_CAPTURE_MPLANE`` + - 0x00001000 + - The device supports the :ref:`multi-planar API <planar-apis>` + through the :ref:`Video Capture <capture>` interface. + * - ``V4L2_CAP_VIDEO_OUTPUT`` + - 0x00000002 + - The device supports the single-planar API through the + :ref:`Video Output <output>` interface. + * - ``V4L2_CAP_VIDEO_OUTPUT_MPLANE`` + - 0x00002000 + - The device supports the :ref:`multi-planar API <planar-apis>` + through the :ref:`Video Output <output>` interface. + * - ``V4L2_CAP_VIDEO_M2M`` + - 0x00004000 + - The device supports the single-planar API through the Video + Memory-To-Memory interface. + * - ``V4L2_CAP_VIDEO_M2M_MPLANE`` + - 0x00008000 + - The device supports the :ref:`multi-planar API <planar-apis>` + through the Video Memory-To-Memory interface. + * - ``V4L2_CAP_VIDEO_OVERLAY`` + - 0x00000004 + - The device supports the :ref:`Video Overlay <overlay>` + interface. A video overlay device typically stores captured images + directly in the video memory of a graphics card, with hardware + clipping and scaling. + * - ``V4L2_CAP_VBI_CAPTURE`` + - 0x00000010 + - The device supports the :ref:`Raw VBI Capture <raw-vbi>` + interface, providing Teletext and Closed Caption data. + * - ``V4L2_CAP_VBI_OUTPUT`` + - 0x00000020 + - The device supports the :ref:`Raw VBI Output <raw-vbi>` + interface. + * - ``V4L2_CAP_SLICED_VBI_CAPTURE`` + - 0x00000040 + - The device supports the :ref:`Sliced VBI Capture <sliced>` + interface. + * - ``V4L2_CAP_SLICED_VBI_OUTPUT`` + - 0x00000080 + - The device supports the :ref:`Sliced VBI Output <sliced>` + interface. + * - ``V4L2_CAP_RDS_CAPTURE`` + - 0x00000100 + - The device supports the :ref:`RDS <rds>` capture interface. + * - ``V4L2_CAP_VIDEO_OUTPUT_OVERLAY`` + - 0x00000200 + - The device supports the :ref:`Video Output Overlay <osd>` (OSD) + interface. Unlike the *Video Overlay* interface, this is a + secondary function of video output devices and overlays an image + onto an outgoing video signal. When the driver sets this flag, it + must clear the ``V4L2_CAP_VIDEO_OVERLAY`` flag and vice + versa. [#f1]_ + * - ``V4L2_CAP_HW_FREQ_SEEK`` + - 0x00000400 + - The device supports the + :ref:`VIDIOC_S_HW_FREQ_SEEK` ioctl + for hardware frequency seeking. + * - ``V4L2_CAP_RDS_OUTPUT`` + - 0x00000800 + - The device supports the :ref:`RDS <rds>` output interface. + * - ``V4L2_CAP_TUNER`` + - 0x00010000 + - The device has some sort of tuner to receive RF-modulated video + signals. For more information about tuner programming see + :ref:`tuner`. + * - ``V4L2_CAP_AUDIO`` + - 0x00020000 + - The device has audio inputs or outputs. It may or may not support + audio recording or playback, in PCM or compressed formats. PCM + audio support must be implemented as ALSA or OSS interface. For + more information on audio inputs and outputs see :ref:`audio`. + * - ``V4L2_CAP_RADIO`` + - 0x00040000 + - This is a radio receiver. + * - ``V4L2_CAP_MODULATOR`` + - 0x00080000 + - The device has some sort of modulator to emit RF-modulated + video/audio signals. For more information about modulator + programming see :ref:`tuner`. + * - ``V4L2_CAP_SDR_CAPTURE`` + - 0x00100000 + - The device supports the :ref:`SDR Capture <sdr>` interface. + * - ``V4L2_CAP_EXT_PIX_FORMAT`` + - 0x00200000 + - The device supports the struct + :c:type:`v4l2_pix_format` extended fields. + * - ``V4L2_CAP_SDR_OUTPUT`` + - 0x00400000 + - The device supports the :ref:`SDR Output <sdr>` interface. + * - ``V4L2_CAP_READWRITE`` + - 0x01000000 + - The device supports the :ref:`read() <rw>` and/or + :ref:`write() <rw>` I/O methods. + * - ``V4L2_CAP_ASYNCIO`` + - 0x02000000 + - The device supports the :ref:`asynchronous <async>` I/O methods. + * - ``V4L2_CAP_STREAMING`` + - 0x04000000 + - The device supports the :ref:`streaming <mmap>` I/O method. + * - ``V4L2_CAP_TOUCH`` + - 0x10000000 + - This is a touch device. + * - ``V4L2_CAP_DEVICE_CAPS`` + - 0x80000000 + - The driver fills the ``device_caps`` field. This capability can + only appear in the ``capabilities`` field and never in the + ``device_caps`` field. Return Value @@ -429,6 +264,6 @@ appropriately. The generic error codes are described at the :ref:`Generic Error Codes <gen-errors>` chapter. .. [#f1] - The struct :ref:`v4l2_framebuffer <v4l2-framebuffer>` lacks an - enum :ref:`v4l2_buf_type <v4l2-buf-type>` field, therefore the + The struct :c:type:`v4l2_framebuffer` lacks an + enum :c:type:`v4l2_buf_type` field, therefore the type of overlay is implied by the driver capabilities. diff --git a/Documentation/media/uapi/v4l/vidioc-queryctrl.rst b/Documentation/media/uapi/v4l/vidioc-queryctrl.rst index 8d6e61a7284d..82769de801b1 100644 --- a/Documentation/media/uapi/v4l/vidioc-queryctrl.rst +++ b/Documentation/media/uapi/v4l/vidioc-queryctrl.rst @@ -15,11 +15,14 @@ VIDIOC_QUERYCTRL - VIDIOC_QUERY_EXT_CTRL - VIDIOC_QUERYMENU - Enumerate controls Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_queryctrl *argp ) +.. c:function:: int ioctl( int fd, int VIDIOC_QUERYCTRL, struct v4l2_queryctrl *argp ) + :name: VIDIOC_QUERYCTRL -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_query_ext_ctrl *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_QUERY_EXT_CTRL, struct v4l2_query_ext_ctrl *argp ) + :name: VIDIOC_QUERY_EXT_CTRL -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_querymenu *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_QUERYMENU, struct v4l2_querymenu *argp ) + :name: VIDIOC_QUERYMENU Arguments @@ -28,9 +31,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL, VIDIOC_QUERYMENU - ``argp`` @@ -84,7 +84,9 @@ fills the rest of the structure or returns an ``EINVAL`` error code when the :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``minimum`` to ``maximum``, inclusive. -.. note:: It is possible for ``VIDIOC_QUERYMENU`` to return +.. note:: + + It is possible for ``VIDIOC_QUERYMENU`` to return an ``EINVAL`` error code for some indices between ``minimum`` and ``maximum``. In that case that particular menu item is not supported by this driver. Also note that the ``minimum`` value is not necessarily 0. @@ -92,283 +94,187 @@ inclusive. See also the examples in :ref:`control`. +.. tabularcolumns:: |p{1.2cm}|p{3.6cm}|p{12.7cm}| + .. _v4l2-queryctrl: +.. cssclass:: longtable + .. flat-table:: struct v4l2_queryctrl :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``id`` - - - Identifies the control, set by the application. See - :ref:`control-id` for predefined IDs. When the ID is ORed with - V4L2_CTRL_FLAG_NEXT_CTRL the driver clears the flag and - returns the first control with a higher ID. Drivers which do not - support this flag yet always return an ``EINVAL`` error code. - - - .. row 2 - - - __u32 - - - ``type`` - - - Type of control, see :ref:`v4l2-ctrl-type`. - - - .. row 3 - - - __u8 - - - ``name``\ [32] - - - Name of the control, a NUL-terminated ASCII string. This - information is intended for the user. - - - .. row 4 - - - __s32 - - - ``minimum`` - - - Minimum value, inclusive. This field gives a lower bound for the - control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how - the minimum value is to be used for each possible control type. - Note that this a signed 32-bit value. - - - .. row 5 - - - __s32 - - - ``maximum`` - - - Maximum value, inclusive. This field gives an upper bound for the - control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how - the maximum value is to be used for each possible control type. - Note that this a signed 32-bit value. - - - .. row 6 - - - __s32 - - - ``step`` - - - This field gives a step size for the control. See enum - :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how the step value is - to be used for each possible control type. Note that this an - unsigned 32-bit value. - - Generally drivers should not scale hardware control values. It may - be necessary for example when the ``name`` or ``id`` imply a - particular unit and the hardware actually accepts only multiples - of said unit. If so, drivers must take care values are properly - rounded when scaling, such that errors will not accumulate on - repeated read-write cycles. - - This field gives the smallest change of an integer control - actually affecting hardware. Often the information is needed when - the user can change controls by keyboard or GUI buttons, rather - than a slider. When for example a hardware register accepts values - 0-511 and the driver reports 0-65535, step should be 128. - - Note that although signed, the step value is supposed to be always - positive. - - - .. row 7 - - - __s32 - - - ``default_value`` - - - The default value of a ``V4L2_CTRL_TYPE_INTEGER``, ``_BOOLEAN``, - ``_BITMASK``, ``_MENU`` or ``_INTEGER_MENU`` control. Not valid - for other types of controls. - - .. note:: Drivers reset controls to their default value only when - the driver is first loaded, never afterwards. - - - .. row 8 - - - __u32 - - - ``flags`` - - - Control flags, see :ref:`control-flags`. - - - .. row 9 - - - __u32 - - - ``reserved``\ [2] - - - Reserved for future extensions. Drivers must set the array to - zero. - - + * - __u32 + - ``id`` + - Identifies the control, set by the application. See + :ref:`control-id` for predefined IDs. When the ID is ORed with + V4L2_CTRL_FLAG_NEXT_CTRL the driver clears the flag and + returns the first control with a higher ID. Drivers which do not + support this flag yet always return an ``EINVAL`` error code. + * - __u32 + - ``type`` + - Type of control, see :c:type:`v4l2_ctrl_type`. + * - __u8 + - ``name``\ [32] + - Name of the control, a NUL-terminated ASCII string. This + information is intended for the user. + * - __s32 + - ``minimum`` + - Minimum value, inclusive. This field gives a lower bound for the + control. See enum :c:type:`v4l2_ctrl_type` how + the minimum value is to be used for each possible control type. + Note that this a signed 32-bit value. + * - __s32 + - ``maximum`` + - Maximum value, inclusive. This field gives an upper bound for the + control. See enum :c:type:`v4l2_ctrl_type` how + the maximum value is to be used for each possible control type. + Note that this a signed 32-bit value. + * - __s32 + - ``step`` + - This field gives a step size for the control. See enum + :c:type:`v4l2_ctrl_type` how the step value is + to be used for each possible control type. Note that this an + unsigned 32-bit value. + + Generally drivers should not scale hardware control values. It may + be necessary for example when the ``name`` or ``id`` imply a + particular unit and the hardware actually accepts only multiples + of said unit. If so, drivers must take care values are properly + rounded when scaling, such that errors will not accumulate on + repeated read-write cycles. + + This field gives the smallest change of an integer control + actually affecting hardware. Often the information is needed when + the user can change controls by keyboard or GUI buttons, rather + than a slider. When for example a hardware register accepts values + 0-511 and the driver reports 0-65535, step should be 128. + + Note that although signed, the step value is supposed to be always + positive. + * - __s32 + - ``default_value`` + - The default value of a ``V4L2_CTRL_TYPE_INTEGER``, ``_BOOLEAN``, + ``_BITMASK``, ``_MENU`` or ``_INTEGER_MENU`` control. Not valid + for other types of controls. + + .. note:: + + Drivers reset controls to their default value only when + the driver is first loaded, never afterwards. + * - __u32 + - ``flags`` + - Control flags, see :ref:`control-flags`. + * - __u32 + - ``reserved``\ [2] + - Reserved for future extensions. Drivers must set the array to + zero. + + + +.. tabularcolumns:: |p{1.2cm}|p{5.0cm}|p{11.3cm}| .. _v4l2-query-ext-ctrl: +.. cssclass:: longtable + .. flat-table:: struct v4l2_query_ext_ctrl :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``id`` - - - Identifies the control, set by the application. See - :ref:`control-id` for predefined IDs. When the ID is ORed with - ``V4L2_CTRL_FLAG_NEXT_CTRL`` the driver clears the flag and - returns the first non-compound control with a higher ID. When the - ID is ORed with ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` the driver clears - the flag and returns the first compound control with a higher ID. - Set both to get the first control (compound or not) with a higher - ID. - - - .. row 2 - - - __u32 - - - ``type`` - - - Type of control, see :ref:`v4l2-ctrl-type`. - - - .. row 3 - - - char - - - ``name``\ [32] - - - Name of the control, a NUL-terminated ASCII string. This - information is intended for the user. - - - .. row 4 - - - __s64 - - - ``minimum`` - - - Minimum value, inclusive. This field gives a lower bound for the - control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how - the minimum value is to be used for each possible control type. - Note that this a signed 64-bit value. - - - .. row 5 - - - __s64 - - - ``maximum`` - - - Maximum value, inclusive. This field gives an upper bound for the - control. See enum :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how - the maximum value is to be used for each possible control type. - Note that this a signed 64-bit value. - - - .. row 6 - - - __u64 - - - ``step`` - - - This field gives a step size for the control. See enum - :ref:`v4l2_ctrl_type <v4l2-ctrl-type>` how the step value is - to be used for each possible control type. Note that this an - unsigned 64-bit value. - - Generally drivers should not scale hardware control values. It may - be necessary for example when the ``name`` or ``id`` imply a - particular unit and the hardware actually accepts only multiples - of said unit. If so, drivers must take care values are properly - rounded when scaling, such that errors will not accumulate on - repeated read-write cycles. - - This field gives the smallest change of an integer control - actually affecting hardware. Often the information is needed when - the user can change controls by keyboard or GUI buttons, rather - than a slider. When for example a hardware register accepts values - 0-511 and the driver reports 0-65535, step should be 128. - - - .. row 7 - - - __s64 - - - ``default_value`` - - - The default value of a ``V4L2_CTRL_TYPE_INTEGER``, ``_INTEGER64``, - ``_BOOLEAN``, ``_BITMASK``, ``_MENU``, ``_INTEGER_MENU``, ``_U8`` - or ``_U16`` control. Not valid for other types of controls. - - .. note:: Drivers reset controls to their default value only when - the driver is first loaded, never afterwards. - - - .. row 8 - - - __u32 - - - ``flags`` - - - Control flags, see :ref:`control-flags`. - - - .. row 9 - - - __u32 - - - ``elem_size`` - - - The size in bytes of a single element of the array. Given a char - pointer ``p`` to a 3-dimensional array you can find the position - of cell ``(z, y, x)`` as follows: - ``p + ((z * dims[1] + y) * dims[0] + x) * elem_size``. - ``elem_size`` is always valid, also when the control isn't an - array. For string controls ``elem_size`` is equal to - ``maximum + 1``. - - - .. row 10 - - - __u32 - - - ``elems`` - - - The number of elements in the N-dimensional array. If this control - is not an array, then ``elems`` is 1. The ``elems`` field can - never be 0. - - - .. row 11 - - - __u32 - - - ``nr_of_dims`` - - - The number of dimension in the N-dimensional array. If this - control is not an array, then this field is 0. - - - .. row 12 - - - __u32 - - - ``dims[V4L2_CTRL_MAX_DIMS]`` - - - The size of each dimension. The first ``nr_of_dims`` elements of - this array must be non-zero, all remaining elements must be zero. - - - .. row 13 - - - __u32 - - - ``reserved``\ [32] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. - - + * - __u32 + - ``id`` + - Identifies the control, set by the application. See + :ref:`control-id` for predefined IDs. When the ID is ORed with + ``V4L2_CTRL_FLAG_NEXT_CTRL`` the driver clears the flag and + returns the first non-compound control with a higher ID. When the + ID is ORed with ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` the driver clears + the flag and returns the first compound control with a higher ID. + Set both to get the first control (compound or not) with a higher + ID. + * - __u32 + - ``type`` + - Type of control, see :c:type:`v4l2_ctrl_type`. + * - char + - ``name``\ [32] + - Name of the control, a NUL-terminated ASCII string. This + information is intended for the user. + * - __s64 + - ``minimum`` + - Minimum value, inclusive. This field gives a lower bound for the + control. See enum :c:type:`v4l2_ctrl_type` how + the minimum value is to be used for each possible control type. + Note that this a signed 64-bit value. + * - __s64 + - ``maximum`` + - Maximum value, inclusive. This field gives an upper bound for the + control. See enum :c:type:`v4l2_ctrl_type` how + the maximum value is to be used for each possible control type. + Note that this a signed 64-bit value. + * - __u64 + - ``step`` + - This field gives a step size for the control. See enum + :c:type:`v4l2_ctrl_type` how the step value is + to be used for each possible control type. Note that this an + unsigned 64-bit value. + + Generally drivers should not scale hardware control values. It may + be necessary for example when the ``name`` or ``id`` imply a + particular unit and the hardware actually accepts only multiples + of said unit. If so, drivers must take care values are properly + rounded when scaling, such that errors will not accumulate on + repeated read-write cycles. + + This field gives the smallest change of an integer control + actually affecting hardware. Often the information is needed when + the user can change controls by keyboard or GUI buttons, rather + than a slider. When for example a hardware register accepts values + 0-511 and the driver reports 0-65535, step should be 128. + * - __s64 + - ``default_value`` + - The default value of a ``V4L2_CTRL_TYPE_INTEGER``, ``_INTEGER64``, + ``_BOOLEAN``, ``_BITMASK``, ``_MENU``, ``_INTEGER_MENU``, ``_U8`` + or ``_U16`` control. Not valid for other types of controls. + + .. note:: + + Drivers reset controls to their default value only when + the driver is first loaded, never afterwards. + * - __u32 + - ``flags`` + - Control flags, see :ref:`control-flags`. + * - __u32 + - ``elem_size`` + - The size in bytes of a single element of the array. Given a char + pointer ``p`` to a 3-dimensional array you can find the position + of cell ``(z, y, x)`` as follows: + ``p + ((z * dims[1] + y) * dims[0] + x) * elem_size``. + ``elem_size`` is always valid, also when the control isn't an + array. For string controls ``elem_size`` is equal to + ``maximum + 1``. + * - __u32 + - ``elems`` + - The number of elements in the N-dimensional array. If this control + is not an array, then ``elems`` is 1. The ``elems`` field can + never be 0. + * - __u32 + - ``nr_of_dims`` + - The number of dimension in the N-dimensional array. If this + control is not an array, then this field is 0. + * - __u32 + - ``dims[V4L2_CTRL_MAX_DIMS]`` + - The size of each dimension. The first ``nr_of_dims`` elements of + this array must be non-zero, all remaining elements must be zero. + * - __u32 + - ``reserved``\ [32] + - Reserved for future extensions. Applications and drivers must set + the array to zero. + + + +.. tabularcolumns:: |p{1.2cm}|p{0.6cm}|p{1.6cm}|p{13.5cm}| .. _v4l2-querymenu: @@ -377,386 +283,230 @@ See also the examples in :ref:`control`. :stub-columns: 0 :widths: 1 1 2 1 - - - .. row 1 - - - __u32 - - - - - ``id`` - - - Identifies the control, set by the application from the respective - struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``id``. - - - .. row 2 - - - __u32 - - - - - ``index`` - - - Index of the menu item, starting at zero, set by the application. - - - .. row 3 - - - union - - - - - - - - - - .. row 4 - - - - - __u8 - - - ``name``\ [32] - - - Name of the menu item, a NUL-terminated ASCII string. This - information is intended for the user. This field is valid for - ``V4L2_CTRL_FLAG_MENU`` type controls. - - - .. row 5 - - - - - __s64 - - - ``value`` - - - Value of the integer menu item. This field is valid for - ``V4L2_CTRL_FLAG_INTEGER_MENU`` type controls. - - - .. row 6 - - - __u32 - - - - - ``reserved`` - - - Reserved for future extensions. Drivers must set the array to - zero. - - - -.. _v4l2-ctrl-type: + * - __u32 + - + - ``id`` + - Identifies the control, set by the application from the respective + struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` ``id``. + * - __u32 + - + - ``index`` + - Index of the menu item, starting at zero, set by the application. + * - union + - + - + - + * - + - __u8 + - ``name``\ [32] + - Name of the menu item, a NUL-terminated ASCII string. This + information is intended for the user. This field is valid for + ``V4L2_CTRL_FLAG_MENU`` type controls. + * - + - __s64 + - ``value`` + - Value of the integer menu item. This field is valid for + ``V4L2_CTRL_FLAG_INTEGER_MENU`` type controls. + * - __u32 + - + - ``reserved`` + - Reserved for future extensions. Drivers must set the array to + zero. + + + +.. tabularcolumns:: |p{5.8cm}|p{1.4cm}|p{1.0cm}|p{1.4cm}|p{6.9cm}| + +.. c:type:: v4l2_ctrl_type + +.. cssclass:: longtable .. flat-table:: enum v4l2_ctrl_type :header-rows: 1 :stub-columns: 0 :widths: 30 5 5 5 55 - - - .. row 1 - - - Type - - - ``minimum`` - - - ``step`` - - - ``maximum`` - - - Description - - - .. row 2 - - - ``V4L2_CTRL_TYPE_INTEGER`` - - - any - - - any - - - any - - - An integer-valued control ranging from minimum to maximum - inclusive. The step value indicates the increment between values. - - - .. row 3 - - - ``V4L2_CTRL_TYPE_BOOLEAN`` - - - 0 - - - 1 - - - 1 - - - A boolean-valued control. Zero corresponds to "disabled", and one - means "enabled". - - - .. row 4 - - - ``V4L2_CTRL_TYPE_MENU`` - - - ≥ 0 - - - 1 - - - N-1 - - - The control has a menu of N choices. The names of the menu items - can be enumerated with the ``VIDIOC_QUERYMENU`` ioctl. - - - .. row 5 - - - ``V4L2_CTRL_TYPE_INTEGER_MENU`` - - - ≥ 0 - - - 1 - - - N-1 - - - The control has a menu of N choices. The values of the menu items - can be enumerated with the ``VIDIOC_QUERYMENU`` ioctl. This is - similar to ``V4L2_CTRL_TYPE_MENU`` except that instead of strings, - the menu items are signed 64-bit integers. - - - .. row 6 - - - ``V4L2_CTRL_TYPE_BITMASK`` - - - 0 - - - n/a - - - any - - - A bitmask field. The maximum value is the set of bits that can be - used, all other bits are to be 0. The maximum value is interpreted - as a __u32, allowing the use of bit 31 in the bitmask. - - - .. row 7 - - - ``V4L2_CTRL_TYPE_BUTTON`` - - - 0 - - - 0 - - - 0 - - - A control which performs an action when set. Drivers must ignore - the value passed with ``VIDIOC_S_CTRL`` and return an ``EINVAL`` error - code on a ``VIDIOC_G_CTRL`` attempt. - - - .. row 8 - - - ``V4L2_CTRL_TYPE_INTEGER64`` - - - any - - - any - - - any - - - A 64-bit integer valued control. Minimum, maximum and step size - cannot be queried using ``VIDIOC_QUERYCTRL``. Only - ``VIDIOC_QUERY_EXT_CTRL`` can retrieve the 64-bit min/max/step - values, they should be interpreted as n/a when using - ``VIDIOC_QUERYCTRL``. - - - .. row 9 - - - ``V4L2_CTRL_TYPE_STRING`` - - - ≥ 0 - - - ≥ 1 - - - ≥ 0 - - - The minimum and maximum string lengths. The step size means that - the string must be (minimum + N * step) characters long for N ≥ 0. - These lengths do not include the terminating zero, so in order to - pass a string of length 8 to - :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you need to - set the ``size`` field of struct - :ref:`v4l2_ext_control <v4l2-ext-control>` to 9. For - :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you can set - the ``size`` field to ``maximum`` + 1. Which character encoding is - used will depend on the string control itself and should be part - of the control documentation. - - - .. row 10 - - - ``V4L2_CTRL_TYPE_CTRL_CLASS`` - - - n/a - - - n/a - - - n/a - - - This is not a control. When ``VIDIOC_QUERYCTRL`` is called with a - control ID equal to a control class code (see :ref:`ctrl-class`) - + 1, the ioctl returns the name of the control class and this - control type. Older drivers which do not support this feature - return an ``EINVAL`` error code. - - - .. row 11 - - - ``V4L2_CTRL_TYPE_U8`` - - - any - - - any - - - any - - - An unsigned 8-bit valued control ranging from minimum to maximum - inclusive. The step value indicates the increment between values. - - - .. row 12 - - - ``V4L2_CTRL_TYPE_U16`` - - - any - - - any - - - any - - - An unsigned 16-bit valued control ranging from minimum to maximum - inclusive. The step value indicates the increment between values. - - - .. row 13 - - - ``V4L2_CTRL_TYPE_U32`` - - - any - - - any - - - any - - - An unsigned 32-bit valued control ranging from minimum to maximum - inclusive. The step value indicates the increment between values. - - + * - Type + - ``minimum`` + - ``step`` + - ``maximum`` + - Description + * - ``V4L2_CTRL_TYPE_INTEGER`` + - any + - any + - any + - An integer-valued control ranging from minimum to maximum + inclusive. The step value indicates the increment between values. + * - ``V4L2_CTRL_TYPE_BOOLEAN`` + - 0 + - 1 + - 1 + - A boolean-valued control. Zero corresponds to "disabled", and one + means "enabled". + * - ``V4L2_CTRL_TYPE_MENU`` + - ≥ 0 + - 1 + - N-1 + - The control has a menu of N choices. The names of the menu items + can be enumerated with the ``VIDIOC_QUERYMENU`` ioctl. + * - ``V4L2_CTRL_TYPE_INTEGER_MENU`` + - ≥ 0 + - 1 + - N-1 + - The control has a menu of N choices. The values of the menu items + can be enumerated with the ``VIDIOC_QUERYMENU`` ioctl. This is + similar to ``V4L2_CTRL_TYPE_MENU`` except that instead of strings, + the menu items are signed 64-bit integers. + * - ``V4L2_CTRL_TYPE_BITMASK`` + - 0 + - n/a + - any + - A bitmask field. The maximum value is the set of bits that can be + used, all other bits are to be 0. The maximum value is interpreted + as a __u32, allowing the use of bit 31 in the bitmask. + * - ``V4L2_CTRL_TYPE_BUTTON`` + - 0 + - 0 + - 0 + - A control which performs an action when set. Drivers must ignore + the value passed with ``VIDIOC_S_CTRL`` and return an ``EINVAL`` error + code on a ``VIDIOC_G_CTRL`` attempt. + * - ``V4L2_CTRL_TYPE_INTEGER64`` + - any + - any + - any + - A 64-bit integer valued control. Minimum, maximum and step size + cannot be queried using ``VIDIOC_QUERYCTRL``. Only + ``VIDIOC_QUERY_EXT_CTRL`` can retrieve the 64-bit min/max/step + values, they should be interpreted as n/a when using + ``VIDIOC_QUERYCTRL``. + * - ``V4L2_CTRL_TYPE_STRING`` + - ≥ 0 + - ≥ 1 + - ≥ 0 + - The minimum and maximum string lengths. The step size means that + the string must be (minimum + N * step) characters long for N ≥ 0. + These lengths do not include the terminating zero, so in order to + pass a string of length 8 to + :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you need to + set the ``size`` field of struct + :c:type:`v4l2_ext_control` to 9. For + :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` you can set + the ``size`` field to ``maximum`` + 1. Which character encoding is + used will depend on the string control itself and should be part + of the control documentation. + * - ``V4L2_CTRL_TYPE_CTRL_CLASS`` + - n/a + - n/a + - n/a + - This is not a control. When ``VIDIOC_QUERYCTRL`` is called with a + control ID equal to a control class code (see :ref:`ctrl-class`) + + 1, the ioctl returns the name of the control class and this + control type. Older drivers which do not support this feature + return an ``EINVAL`` error code. + * - ``V4L2_CTRL_TYPE_U8`` + - any + - any + - any + - An unsigned 8-bit valued control ranging from minimum to maximum + inclusive. The step value indicates the increment between values. + * - ``V4L2_CTRL_TYPE_U16`` + - any + - any + - any + - An unsigned 16-bit valued control ranging from minimum to maximum + inclusive. The step value indicates the increment between values. + * - ``V4L2_CTRL_TYPE_U32`` + - any + - any + - any + - An unsigned 32-bit valued control ranging from minimum to maximum + inclusive. The step value indicates the increment between values. + + + +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _control-flags: +.. cssclass:: longtable + .. flat-table:: Control Flags :header-rows: 0 :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_CTRL_FLAG_DISABLED`` - - - 0x0001 - - - This control is permanently disabled and should be ignored by the - application. Any attempt to change the control will result in an - ``EINVAL`` error code. - - - .. row 2 - - - ``V4L2_CTRL_FLAG_GRABBED`` - - - 0x0002 - - - This control is temporarily unchangeable, for example because - another application took over control of the respective resource. - Such controls may be displayed specially in a user interface. - Attempts to change the control may result in an ``EBUSY`` error code. - - - .. row 3 - - - ``V4L2_CTRL_FLAG_READ_ONLY`` - - - 0x0004 - - - This control is permanently readable only. Any attempt to change - the control will result in an ``EINVAL`` error code. - - - .. row 4 - - - ``V4L2_CTRL_FLAG_UPDATE`` - - - 0x0008 - - - A hint that changing this control may affect the value of other - controls within the same control class. Applications should update - their user interface accordingly. - - - .. row 5 - - - ``V4L2_CTRL_FLAG_INACTIVE`` - - - 0x0010 - - - This control is not applicable to the current configuration and - should be displayed accordingly in a user interface. For example - the flag may be set on a MPEG audio level 2 bitrate control when - MPEG audio encoding level 1 was selected with another control. - - - .. row 6 - - - ``V4L2_CTRL_FLAG_SLIDER`` - - - 0x0020 - - - A hint that this control is best represented as a slider-like - element in a user interface. - - - .. row 7 - - - ``V4L2_CTRL_FLAG_WRITE_ONLY`` - - - 0x0040 - - - This control is permanently writable only. Any attempt to read the - control will result in an ``EACCES`` error code error code. This flag - is typically present for relative controls or action controls - where writing a value will cause the device to carry out a given - action (e. g. motor control) but no meaningful value can be - returned. - - - .. row 8 - - - ``V4L2_CTRL_FLAG_VOLATILE`` - - - 0x0080 - - - This control is volatile, which means that the value of the - control changes continuously. A typical example would be the - current gain value if the device is in auto-gain mode. In such a - case the hardware calculates the gain value based on the lighting - conditions which can change over time. - - .. note:: Setting a new value for a volatile control will have no - effect and no ``V4L2_EVENT_CTRL_CH_VALUE`` will be sent, unless - the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` flag (see below) is - also set. Otherwise the new value will just be ignored. - - - .. row 9 - - - ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` - - - 0x0100 - - - This control has a pointer type, so its value has to be accessed - using one of the pointer fields of struct - :ref:`v4l2_ext_control <v4l2-ext-control>`. This flag is set - for controls that are an array, string, or have a compound type. - In all cases you have to set a pointer to memory containing the - payload of the control. - - - .. row 10 - - - ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` - - - 0x0200 - - - The value provided to the control will be propagated to the driver - even if it remains constant. This is required when the control - represents an action on the hardware. For example: clearing an - error flag or triggering the flash. All the controls of the type - ``V4L2_CTRL_TYPE_BUTTON`` have this flag set. + * - ``V4L2_CTRL_FLAG_DISABLED`` + - 0x0001 + - This control is permanently disabled and should be ignored by the + application. Any attempt to change the control will result in an + ``EINVAL`` error code. + * - ``V4L2_CTRL_FLAG_GRABBED`` + - 0x0002 + - This control is temporarily unchangeable, for example because + another application took over control of the respective resource. + Such controls may be displayed specially in a user interface. + Attempts to change the control may result in an ``EBUSY`` error code. + * - ``V4L2_CTRL_FLAG_READ_ONLY`` + - 0x0004 + - This control is permanently readable only. Any attempt to change + the control will result in an ``EINVAL`` error code. + * - ``V4L2_CTRL_FLAG_UPDATE`` + - 0x0008 + - A hint that changing this control may affect the value of other + controls within the same control class. Applications should update + their user interface accordingly. + * - ``V4L2_CTRL_FLAG_INACTIVE`` + - 0x0010 + - This control is not applicable to the current configuration and + should be displayed accordingly in a user interface. For example + the flag may be set on a MPEG audio level 2 bitrate control when + MPEG audio encoding level 1 was selected with another control. + * - ``V4L2_CTRL_FLAG_SLIDER`` + - 0x0020 + - A hint that this control is best represented as a slider-like + element in a user interface. + * - ``V4L2_CTRL_FLAG_WRITE_ONLY`` + - 0x0040 + - This control is permanently writable only. Any attempt to read the + control will result in an ``EACCES`` error code error code. This flag + is typically present for relative controls or action controls + where writing a value will cause the device to carry out a given + action (e. g. motor control) but no meaningful value can be + returned. + * - ``V4L2_CTRL_FLAG_VOLATILE`` + - 0x0080 + - This control is volatile, which means that the value of the + control changes continuously. A typical example would be the + current gain value if the device is in auto-gain mode. In such a + case the hardware calculates the gain value based on the lighting + conditions which can change over time. + + .. note:: + + Setting a new value for a volatile control will be ignored + unless + :ref:`V4L2_CTRL_FLAG_EXECUTE_ON_WRITE <FLAG_EXECUTE_ON_WRITE>` + is also set. + Setting a new value for a volatile control will *never* trigger a + :ref:`V4L2_EVENT_CTRL_CH_VALUE <ctrl-changes-flags>` event. + * - ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` + - 0x0100 + - This control has a pointer type, so its value has to be accessed + using one of the pointer fields of struct + :c:type:`v4l2_ext_control`. This flag is set + for controls that are an array, string, or have a compound type. + In all cases you have to set a pointer to memory containing the + payload of the control. + * .. _FLAG_EXECUTE_ON_WRITE: + + - ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE`` + - 0x0200 + - The value provided to the control will be propagated to the driver + even if it remains constant. This is required when the control + represents an action on the hardware. For example: clearing an + error flag or triggering the flash. All the controls of the type + ``V4L2_CTRL_TYPE_BUTTON`` have this flag set. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-querystd.rst b/Documentation/media/uapi/v4l/vidioc-querystd.rst index b4a4e222c7b0..3ef9ab37f582 100644 --- a/Documentation/media/uapi/v4l/vidioc-querystd.rst +++ b/Documentation/media/uapi/v4l/vidioc-querystd.rst @@ -15,7 +15,8 @@ VIDIOC_QUERYSTD - Sense the video standard received by the current input Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, v4l2_std_id *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_QUERYSTD, v4l2_std_id *argp ) + :name: VIDIOC_QUERYSTD Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_QUERYSTD - ``argp`` @@ -43,7 +41,9 @@ will return V4L2_STD_UNKNOWN. When detection is not possible or fails, the set must contain all standards supported by the current video input or output. -.. note:: Drivers shall *not* switch the video standard +.. note:: + + Drivers shall *not* switch the video standard automatically if a new video standard is detected. Instead, drivers should send the ``V4L2_EVENT_SOURCE_CHANGE`` event (if they support this) and expect that userspace will take action by calling diff --git a/Documentation/media/uapi/v4l/vidioc-reqbufs.rst b/Documentation/media/uapi/v4l/vidioc-reqbufs.rst index 5d0bc6d31c07..a4180d576ee5 100644 --- a/Documentation/media/uapi/v4l/vidioc-reqbufs.rst +++ b/Documentation/media/uapi/v4l/vidioc-reqbufs.rst @@ -15,7 +15,8 @@ VIDIOC_REQBUFS - Initiate Memory Mapping, User Pointer I/O or DMA buffer I/O Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_requestbuffers *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_REQBUFS, struct v4l2_requestbuffers *argp ) + :name: VIDIOC_REQBUFS Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_REQBUFS - ``argp`` @@ -45,7 +43,7 @@ configures the driver into DMABUF I/O mode without performing any direct allocation. To allocate device buffers applications initialize all fields of the -:ref:`struct v4l2_requestbuffers <v4l2-requestbuffers>` structure. They set the ``type`` +struct :c:type:`v4l2_requestbuffers` structure. They set the ``type`` field to the respective stream or buffer type, the ``count`` field to the desired number of buffers, ``memory`` must be set to the requested I/O method and the ``reserved`` array must be zeroed. When the ioctl is @@ -67,50 +65,32 @@ any DMA in progress, an implicit :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`. -.. _v4l2-requestbuffers: +.. c:type:: v4l2_requestbuffers + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_requestbuffers :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``count`` - - - The number of buffers requested or granted. - - - .. row 2 - - - __u32 - - - ``type`` - - - Type of the stream or buffers, this is the same as the struct - :ref:`v4l2_format <v4l2-format>` ``type`` field. See - :ref:`v4l2-buf-type` for valid values. - - - .. row 3 - - - __u32 - - - ``memory`` - - - Applications set this field to ``V4L2_MEMORY_MMAP``, - ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See - :ref:`v4l2-memory`. - - - .. row 4 - - - __u32 - - - ``reserved``\ [2] - - - A place holder for future extensions. Drivers and applications - must set the array to zero. + * - __u32 + - ``count`` + - The number of buffers requested or granted. + * - __u32 + - ``type`` + - Type of the stream or buffers, this is the same as the struct + :c:type:`v4l2_format` ``type`` field. See + :c:type:`v4l2_buf_type` for valid values. + * - __u32 + - ``memory`` + - Applications set this field to ``V4L2_MEMORY_MMAP``, + ``V4L2_MEMORY_DMABUF`` or ``V4L2_MEMORY_USERPTR``. See + :c:type:`v4l2_memory`. + * - __u32 + - ``reserved``\ [2] + - A place holder for future extensions. Drivers and applications + must set the array to zero. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-s-hw-freq-seek.rst b/Documentation/media/uapi/v4l/vidioc-s-hw-freq-seek.rst index 5fd332a5bfee..5672ca48d2bd 100644 --- a/Documentation/media/uapi/v4l/vidioc-s-hw-freq-seek.rst +++ b/Documentation/media/uapi/v4l/vidioc-s-hw-freq-seek.rst @@ -15,7 +15,8 @@ VIDIOC_S_HW_FREQ_SEEK - Perform a hardware frequency seek Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_hw_freq_seek *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_S_HW_FREQ_SEEK, struct v4l2_hw_freq_seek *argp ) + :name: VIDIOC_S_HW_FREQ_SEEK Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_S_HW_FREQ_SEEK - ``argp`` @@ -37,12 +35,12 @@ Start a hardware frequency seek from the current frequency. To do this applications initialize the ``tuner``, ``type``, ``seek_upward``, ``wrap_around``, ``spacing``, ``rangelow`` and ``rangehigh`` fields, and zero out the ``reserved`` array of a struct -:ref:`v4l2_hw_freq_seek <v4l2-hw-freq-seek>` and call the +:c:type:`v4l2_hw_freq_seek` and call the ``VIDIOC_S_HW_FREQ_SEEK`` ioctl with a pointer to this structure. The ``rangelow`` and ``rangehigh`` fields can be set to a non-zero value to tell the driver to search a specific band. If the struct -:ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has the +:c:type:`v4l2_tuner` ``capability`` field has the ``V4L2_TUNER_CAP_HWSEEK_PROG_LIM`` flag set, these values must fall within one of the bands returned by :ref:`VIDIOC_ENUM_FREQ_BANDS`. If the @@ -61,99 +59,61 @@ If this ioctl is called from a non-blocking filehandle, then ``EAGAIN`` error code is returned and no seek takes place. -.. _v4l2-hw-freq-seek: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_hw_freq_seek .. flat-table:: struct v4l2_hw_freq_seek :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``tuner`` - - - The tuner index number. This is the same value as in the struct - :ref:`v4l2_input <v4l2-input>` ``tuner`` field and the struct - :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field. - - - .. row 2 - - - __u32 - - - ``type`` - - - The tuner type. This is the same value as in the struct - :ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. See - :ref:`v4l2-tuner-type` - - - .. row 3 - - - __u32 - - - ``seek_upward`` - - - If non-zero, seek upward from the current frequency, else seek - downward. - - - .. row 4 - - - __u32 - - - ``wrap_around`` - - - If non-zero, wrap around when at the end of the frequency range, - else stop seeking. The struct :ref:`v4l2_tuner <v4l2-tuner>` - ``capability`` field will tell you what the hardware supports. - - - .. row 5 - - - __u32 - - - ``spacing`` - - - If non-zero, defines the hardware seek resolution in Hz. The - driver selects the nearest value that is supported by the device. - If spacing is zero a reasonable default value is used. - - - .. row 6 - - - __u32 - - - ``rangelow`` - - - If non-zero, the lowest tunable frequency of the band to search in - units of 62.5 kHz, or if the struct - :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has the - ``V4L2_TUNER_CAP_LOW`` flag set, in units of 62.5 Hz or if the - struct :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has - the ``V4L2_TUNER_CAP_1HZ`` flag set, in units of 1 Hz. If - ``rangelow`` is zero a reasonable default value is used. - - - .. row 7 - - - __u32 - - - ``rangehigh`` - - - If non-zero, the highest tunable frequency of the band to search - in units of 62.5 kHz, or if the struct - :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has the - ``V4L2_TUNER_CAP_LOW`` flag set, in units of 62.5 Hz or if the - struct :ref:`v4l2_tuner <v4l2-tuner>` ``capability`` field has - the ``V4L2_TUNER_CAP_1HZ`` flag set, in units of 1 Hz. If - ``rangehigh`` is zero a reasonable default value is used. - - - .. row 8 - - - __u32 - - - ``reserved``\ [5] - - - Reserved for future extensions. Applications must set the array to - zero. + * - __u32 + - ``tuner`` + - The tuner index number. This is the same value as in the struct + :c:type:`v4l2_input` ``tuner`` field and the struct + :c:type:`v4l2_tuner` ``index`` field. + * - __u32 + - ``type`` + - The tuner type. This is the same value as in the struct + :c:type:`v4l2_tuner` ``type`` field. See + :c:type:`v4l2_tuner_type` + * - __u32 + - ``seek_upward`` + - If non-zero, seek upward from the current frequency, else seek + downward. + * - __u32 + - ``wrap_around`` + - If non-zero, wrap around when at the end of the frequency range, + else stop seeking. The struct :c:type:`v4l2_tuner` + ``capability`` field will tell you what the hardware supports. + * - __u32 + - ``spacing`` + - If non-zero, defines the hardware seek resolution in Hz. The + driver selects the nearest value that is supported by the device. + If spacing is zero a reasonable default value is used. + * - __u32 + - ``rangelow`` + - If non-zero, the lowest tunable frequency of the band to search in + units of 62.5 kHz, or if the struct + :c:type:`v4l2_tuner` ``capability`` field has the + ``V4L2_TUNER_CAP_LOW`` flag set, in units of 62.5 Hz or if the + struct :c:type:`v4l2_tuner` ``capability`` field has + the ``V4L2_TUNER_CAP_1HZ`` flag set, in units of 1 Hz. If + ``rangelow`` is zero a reasonable default value is used. + * - __u32 + - ``rangehigh`` + - If non-zero, the highest tunable frequency of the band to search + in units of 62.5 kHz, or if the struct + :c:type:`v4l2_tuner` ``capability`` field has the + ``V4L2_TUNER_CAP_LOW`` flag set, in units of 62.5 Hz or if the + struct :c:type:`v4l2_tuner` ``capability`` field has + the ``V4L2_TUNER_CAP_1HZ`` flag set, in units of 1 Hz. If + ``rangehigh`` is zero a reasonable default value is used. + * - __u32 + - ``reserved``\ [5] + - Reserved for future extensions. Applications must set the array to + zero. Return Value diff --git a/Documentation/media/uapi/v4l/vidioc-streamon.rst b/Documentation/media/uapi/v4l/vidioc-streamon.rst index bb23745ebcaf..972d5b3c74aa 100644 --- a/Documentation/media/uapi/v4l/vidioc-streamon.rst +++ b/Documentation/media/uapi/v4l/vidioc-streamon.rst @@ -15,7 +15,11 @@ VIDIOC_STREAMON - VIDIOC_STREAMOFF - Start or stop streaming I/O Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, const int *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_STREAMON, const int *argp ) + :name: VIDIOC_STREAMON + +.. c:function:: int ioctl( int fd, VIDIOC_STREAMOFF, const int *argp ) + :name: VIDIOC_STREAMOFF Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_STREAMON, VIDIOC_STREAMOFF - ``argp`` @@ -68,7 +69,7 @@ accordingly. Both ioctls take a pointer to an integer, the desired buffer or stream type. This is the same as struct -:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``. +:c:type:`v4l2_requestbuffers` ``type``. If ``VIDIOC_STREAMON`` is called when streaming is already in progress, or if ``VIDIOC_STREAMOFF`` is called when streaming is already stopped, @@ -76,7 +77,9 @@ then 0 is returned. Nothing happens in the case of ``VIDIOC_STREAMON``, but ``VIDIOC_STREAMOFF`` will return queued buffers to their starting state as mentioned above. -.. note:: Applications can be preempted for unknown periods right before +.. note:: + + Applications can be preempted for unknown periods right before or after the ``VIDIOC_STREAMON`` or ``VIDIOC_STREAMOFF`` calls, there is no notion of starting or stopping "now". Buffer timestamps can be used to synchronize with other events. diff --git a/Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-interval.rst b/Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-interval.rst index 0aa6482a91a6..1a02c935c8b5 100644 --- a/Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-interval.rst +++ b/Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-interval.rst @@ -15,7 +15,8 @@ VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL - Enumerate frame intervals Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_interval_enum * argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, struct v4l2_subdev_frame_interval_enum * argp ) + :name: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL - ``argp`` @@ -45,7 +43,7 @@ when enumerating frame intervals. To enumerate frame intervals applications initialize the ``index``, ``pad``, ``which``, ``code``, ``width`` and ``height`` fields of struct -:ref:`v4l2_subdev_frame_interval_enum <v4l2-subdev-frame-interval-enum>` +:c:type:`v4l2_subdev_frame_interval_enum` and call the :ref:`VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an EINVAL error code if one of the input fields is invalid. All frame @@ -61,81 +59,42 @@ Sub-devices that support the frame interval enumeration ioctl should implemented it on a single pad only. Its behaviour when supported on multiple pads of the same sub-device is not defined. +.. c:type:: v4l2_subdev_frame_interval_enum -.. _v4l2-subdev-frame-interval-enum: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_subdev_frame_interval_enum :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Number of the format in the enumeration, set by the application. - - - .. row 2 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media controller API. - - - .. row 3 - - - __u32 - - - ``code`` - - - The media bus format code, as defined in - :ref:`v4l2-mbus-format`. - - - .. row 4 - - - __u32 - - - ``width`` - - - Frame width, in pixels. - - - .. row 5 - - - __u32 - - - ``height`` - - - Frame height, in pixels. - - - .. row 6 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``interval`` - - - Period, in seconds, between consecutive video frames. - - - .. row 7 - - - __u32 - - - ``which`` - - - Frame intervals to be enumerated, from enum - :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. - - - .. row 8 - - - __u32 - - - ``reserved``\ [8] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. + * - __u32 + - ``index`` + - Number of the format in the enumeration, set by the application. + * - __u32 + - ``pad`` + - Pad number as reported by the media controller API. + * - __u32 + - ``code`` + - The media bus format code, as defined in + :ref:`v4l2-mbus-format`. + * - __u32 + - ``width`` + - Frame width, in pixels. + * - __u32 + - ``height`` + - Frame height, in pixels. + * - struct :c:type:`v4l2_fract` + - ``interval`` + - Period, in seconds, between consecutive video frames. + * - __u32 + - ``which`` + - Frame intervals to be enumerated, from enum + :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. + * - __u32 + - ``reserved``\ [8] + - Reserved for future extensions. Applications and drivers must set + the array to zero. Return Value @@ -147,7 +106,7 @@ appropriately. The generic error codes are described at the EINVAL The struct - :ref:`v4l2_subdev_frame_interval_enum <v4l2-subdev-frame-interval-enum>` + :c:type:`v4l2_subdev_frame_interval_enum` ``pad`` references a non-existing pad, one of the ``code``, ``width`` or ``height`` fields are invalid for the given pad or the ``index`` field is out of bounds. diff --git a/Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-size.rst b/Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-size.rst index 7a5811b71b68..746c24ed97a0 100644 --- a/Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-size.rst +++ b/Documentation/media/uapi/v4l/vidioc-subdev-enum-frame-size.rst @@ -15,7 +15,8 @@ VIDIOC_SUBDEV_ENUM_FRAME_SIZE - Enumerate media bus frame sizes Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_size_enum * argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_FRAME_SIZE, struct v4l2_subdev_frame_size_enum * argp ) + :name: VIDIOC_SUBDEV_ENUM_FRAME_SIZE Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_SUBDEV_ENUM_FRAME_SIZE - ``argp`` @@ -41,7 +39,7 @@ ioctl. To enumerate frame sizes applications initialize the ``pad``, ``which`` , ``code`` and ``index`` fields of the struct -:ref:`v4l2_subdev_mbus_code_enum <v4l2-subdev-mbus-code-enum>` and +:c:type:`v4l2_subdev_mbus_code_enum` and call the :ref:`VIDIOC_SUBDEV_ENUM_FRAME_SIZE` ioctl with a pointer to the structure. Drivers fill the minimum and maximum frame sizes or return an EINVAL error code if one of the input parameters is invalid. @@ -64,88 +62,45 @@ current values of V4L2 controls. See information about try formats. -.. _v4l2-subdev-frame-size-enum: +.. c:type:: v4l2_subdev_frame_size_enum + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_subdev_frame_size_enum :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``index`` - - - Number of the format in the enumeration, set by the application. - - - .. row 2 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media controller API. - - - .. row 3 - - - __u32 - - - ``code`` - - - The media bus format code, as defined in - :ref:`v4l2-mbus-format`. - - - .. row 4 - - - __u32 - - - ``min_width`` - - - Minimum frame width, in pixels. - - - .. row 5 - - - __u32 - - - ``max_width`` - - - Maximum frame width, in pixels. - - - .. row 6 - - - __u32 - - - ``min_height`` - - - Minimum frame height, in pixels. - - - .. row 7 - - - __u32 - - - ``max_height`` - - - Maximum frame height, in pixels. - - - .. row 8 - - - __u32 - - - ``which`` - - - Frame sizes to be enumerated, from enum - :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. - - - .. row 9 - - - __u32 - - - ``reserved``\ [8] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. + * - __u32 + - ``index`` + - Number of the format in the enumeration, set by the application. + * - __u32 + - ``pad`` + - Pad number as reported by the media controller API. + * - __u32 + - ``code`` + - The media bus format code, as defined in + :ref:`v4l2-mbus-format`. + * - __u32 + - ``min_width`` + - Minimum frame width, in pixels. + * - __u32 + - ``max_width`` + - Maximum frame width, in pixels. + * - __u32 + - ``min_height`` + - Minimum frame height, in pixels. + * - __u32 + - ``max_height`` + - Maximum frame height, in pixels. + * - __u32 + - ``which`` + - Frame sizes to be enumerated, from enum + :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. + * - __u32 + - ``reserved``\ [8] + - Reserved for future extensions. Applications and drivers must set + the array to zero. Return Value @@ -157,6 +112,6 @@ appropriately. The generic error codes are described at the EINVAL The struct - :ref:`v4l2_subdev_frame_size_enum <v4l2-subdev-frame-size-enum>` + :c:type:`v4l2_subdev_frame_size_enum` ``pad`` references a non-existing pad, the ``code`` is invalid for the given pad or the ``index`` field is out of bounds. diff --git a/Documentation/media/uapi/v4l/vidioc-subdev-enum-mbus-code.rst b/Documentation/media/uapi/v4l/vidioc-subdev-enum-mbus-code.rst index bc0531eb56fa..0dfee3829ee2 100644 --- a/Documentation/media/uapi/v4l/vidioc-subdev-enum-mbus-code.rst +++ b/Documentation/media/uapi/v4l/vidioc-subdev-enum-mbus-code.rst @@ -15,7 +15,8 @@ VIDIOC_SUBDEV_ENUM_MBUS_CODE - Enumerate media bus formats Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_mbus_code_enum * argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_MBUS_CODE, struct v4l2_subdev_mbus_code_enum * argp ) + :name: VIDIOC_SUBDEV_ENUM_MBUS_CODE Arguments @@ -24,9 +25,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_SUBDEV_ENUM_MBUS_CODE - ``argp`` @@ -36,7 +34,7 @@ Description To enumerate media bus formats available at a given sub-device pad applications initialize the ``pad``, ``which`` and ``index`` fields of struct -:ref:`v4l2_subdev_mbus_code_enum <v4l2-subdev-mbus-code-enum>` and +:c:type:`v4l2_subdev_mbus_code_enum` and call the :ref:`VIDIOC_SUBDEV_ENUM_MBUS_CODE` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an ``EINVAL`` error code if either the ``pad`` or ``index`` are invalid. All media bus @@ -49,56 +47,33 @@ See :ref:`VIDIOC_SUBDEV_G_FMT` for more information about the try formats. -.. _v4l2-subdev-mbus-code-enum: +.. c:type:: v4l2_subdev_mbus_code_enum + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_subdev_mbus_code_enum :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media controller API. - - - .. row 2 - - - __u32 - - - ``index`` - - - Number of the format in the enumeration, set by the application. - - - .. row 3 - - - __u32 - - - ``code`` - - - The media bus format code, as defined in - :ref:`v4l2-mbus-format`. - - - .. row 4 - - - __u32 - - - ``which`` - - - Media bus format codes to be enumerated, from enum - :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. - - - .. row 5 - - - __u32 - - - ``reserved``\ [8] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. + * - __u32 + - ``pad`` + - Pad number as reported by the media controller API. + * - __u32 + - ``index`` + - Number of the format in the enumeration, set by the application. + * - __u32 + - ``code`` + - The media bus format code, as defined in + :ref:`v4l2-mbus-format`. + * - __u32 + - ``which`` + - Media bus format codes to be enumerated, from enum + :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. + * - __u32 + - ``reserved``\ [8] + - Reserved for future extensions. Applications and drivers must set + the array to zero. Return Value @@ -110,6 +85,6 @@ appropriately. The generic error codes are described at the EINVAL The struct - :ref:`v4l2_subdev_mbus_code_enum <v4l2-subdev-mbus-code-enum>` + :c:type:`v4l2_subdev_mbus_code_enum` ``pad`` references a non-existing pad, or the ``index`` field is out of bounds. diff --git a/Documentation/media/uapi/v4l/vidioc-subdev-g-crop.rst b/Documentation/media/uapi/v4l/vidioc-subdev-g-crop.rst index ae802f1594e7..000e8fcd3f25 100644 --- a/Documentation/media/uapi/v4l/vidioc-subdev-g-crop.rst +++ b/Documentation/media/uapi/v4l/vidioc-subdev-g-crop.rst @@ -15,9 +15,11 @@ VIDIOC_SUBDEV_G_CROP - VIDIOC_SUBDEV_S_CROP - Get or set the crop rectangle on a Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_crop *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_CROP, struct v4l2_subdev_crop *argp ) + :name: VIDIOC_SUBDEV_G_CROP -.. cpp:function:: int ioctl( int fd, int request, const struct v4l2_subdev_crop *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_CROP, const struct v4l2_subdev_crop *argp ) + :name: VIDIOC_SUBDEV_S_CROP Arguments @@ -26,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP - ``argp`` @@ -42,7 +41,7 @@ Description :ref:`the selection API <VIDIOC_SUBDEV_G_SELECTION>`. To retrieve the current crop rectangle applications set the ``pad`` -field of a struct :ref:`v4l2_subdev_crop <v4l2-subdev-crop>` to the +field of a struct :c:type:`v4l2_subdev_crop` to the desired pad number as reported by the media API and the ``which`` field to ``V4L2_SUBDEV_FORMAT_ACTIVE``. They then call the ``VIDIOC_SUBDEV_G_CROP`` ioctl with a pointer to this structure. The @@ -55,7 +54,7 @@ and ``which`` fields and all members of the ``rect`` field. They then call the ``VIDIOC_SUBDEV_S_CROP`` ioctl with a pointer to this structure. The driver verifies the requested crop rectangle, adjusts it based on the hardware capabilities and configures the device. Upon -return the struct :ref:`v4l2_subdev_crop <v4l2-subdev-crop>` +return the struct :c:type:`v4l2_subdev_crop` contains the current format as would be returned by a ``VIDIOC_SUBDEV_G_CROP`` call. @@ -72,47 +71,29 @@ modify the rectangle to match what the hardware can provide. The modified format should be as close as possible to the original request. -.. _v4l2-subdev-crop: +.. c:type:: v4l2_subdev_crop + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_subdev_crop :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media framework. - - - .. row 2 - - - __u32 - - - ``which`` - - - Crop rectangle to get or set, from enum - :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. - - - .. row 3 - - - struct :ref:`v4l2_rect <v4l2-rect>` - - - ``rect`` - - - Crop rectangle boundaries, in pixels. - - - .. row 4 - - - __u32 - - - ``reserved``\ [8] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. + * - __u32 + - ``pad`` + - Pad number as reported by the media framework. + * - __u32 + - ``which`` + - Crop rectangle to get or set, from enum + :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. + * - struct :c:type:`v4l2_rect` + - ``rect`` + - Crop rectangle boundaries, in pixels. + * - __u32 + - ``reserved``\ [8] + - Reserved for future extensions. Applications and drivers must set + the array to zero. Return Value @@ -130,7 +111,7 @@ EBUSY ``VIDIOC_SUBDEV_S_CROP`` EINVAL - The struct :ref:`v4l2_subdev_crop <v4l2-subdev-crop>` ``pad`` + The struct :c:type:`v4l2_subdev_crop` ``pad`` references a non-existing pad, the ``which`` field references a non-existing format, or cropping is not supported on the given subdev pad. diff --git a/Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst b/Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst index 90e2a6635ebc..b352456dfe2c 100644 --- a/Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst +++ b/Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst @@ -15,7 +15,11 @@ VIDIOC_SUBDEV_G_FMT - VIDIOC_SUBDEV_S_FMT - Get or set the data format on a subd Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_format *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_FMT, struct v4l2_subdev_format *argp ) + :name: VIDIOC_SUBDEV_G_FMT + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_FMT, struct v4l2_subdev_format *argp ) + :name: VIDIOC_SUBDEV_S_FMT Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT - ``argp`` @@ -37,7 +38,7 @@ These ioctls are used to negotiate the frame format at specific subdev pads in the image pipeline. To retrieve the current format applications set the ``pad`` field of a -struct :ref:`v4l2_subdev_format <v4l2-subdev-format>` to the desired +struct :c:type:`v4l2_subdev_format` to the desired pad number as reported by the media API and the ``which`` field to ``V4L2_SUBDEV_FORMAT_ACTIVE``. When they call the ``VIDIOC_SUBDEV_G_FMT`` ioctl with a pointer to this structure the @@ -48,7 +49,7 @@ To change the current format applications set both the ``pad`` and the ``VIDIOC_SUBDEV_S_FMT`` ioctl with a pointer to this structure the driver verifies the requested format, adjusts it based on the hardware capabilities and configures the device. Upon return the struct -:ref:`v4l2_subdev_format <v4l2-subdev-format>` contains the current +:c:type:`v4l2_subdev_format` contains the current format as would be returned by a ``VIDIOC_SUBDEV_G_FMT`` call. Applications can query the device capabilities by setting the ``which`` @@ -75,50 +76,34 @@ format to match what the hardware can provide. The modified format should be as close as possible to the original request. -.. _v4l2-subdev-format: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_subdev_format .. flat-table:: struct v4l2_subdev_format :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - __u32 + - ``pad`` + - Pad number as reported by the media controller API. + * - __u32 + - ``which`` + - Format to modified, from enum + :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. + * - struct :c:type:`v4l2_mbus_framefmt` + - ``format`` + - Definition of an image format, see :c:type:`v4l2_mbus_framefmt` for + details. + * - __u32 + - ``reserved``\ [8] + - Reserved for future extensions. Applications and drivers must set + the array to zero. - - .. row 1 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media controller API. - - - .. row 2 - - - __u32 - - - ``which`` - - - Format to modified, from enum - :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. - - - .. row 3 - - - struct :ref:`v4l2_mbus_framefmt <v4l2-mbus-framefmt>` - - - ``format`` - - - Definition of an image format, see :ref:`v4l2-mbus-framefmt` for - details. - - - .. row 4 - - - __u32 - - - ``reserved``\ [8] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _v4l2-subdev-format-whence: @@ -127,22 +112,12 @@ should be as close as possible to the original request. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - V4L2_SUBDEV_FORMAT_TRY - - - 0 - - - Try formats, used for querying device capabilities. - - - .. row 2 - - - V4L2_SUBDEV_FORMAT_ACTIVE - - - 1 - - - Active formats, applied to the hardware. + * - V4L2_SUBDEV_FORMAT_TRY + - 0 + - Try formats, used for querying device capabilities. + * - V4L2_SUBDEV_FORMAT_ACTIVE + - 1 + - Active formats, applied to the hardware. Return Value @@ -159,7 +134,7 @@ EBUSY fix the problem first. Only returned by ``VIDIOC_SUBDEV_S_FMT`` EINVAL - The struct :ref:`v4l2_subdev_format <v4l2-subdev-format>` + The struct :c:type:`v4l2_subdev_format` ``pad`` references a non-existing pad, or the ``which`` field references a non-existing format. diff --git a/Documentation/media/uapi/v4l/vidioc-subdev-g-frame-interval.rst b/Documentation/media/uapi/v4l/vidioc-subdev-g-frame-interval.rst index d8a1cabbd272..46159dcfce30 100644 --- a/Documentation/media/uapi/v4l/vidioc-subdev-g-frame-interval.rst +++ b/Documentation/media/uapi/v4l/vidioc-subdev-g-frame-interval.rst @@ -15,7 +15,11 @@ VIDIOC_SUBDEV_G_FRAME_INTERVAL - VIDIOC_SUBDEV_S_FRAME_INTERVAL - Get or set the Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_frame_interval *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp ) + :name: VIDIOC_SUBDEV_G_FRAME_INTERVAL + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp ) + :name: VIDIOC_SUBDEV_S_FRAME_INTERVAL Arguments @@ -24,10 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_SUBDEV_G_FRAME_INTERVAL, - VIDIOC_SUBDEV_S_FRAME_INTERVAL - ``argp`` @@ -42,7 +42,7 @@ don't support frame intervals must not implement these ioctls. To retrieve the current frame interval applications set the ``pad`` field of a struct -:ref:`v4l2_subdev_frame_interval <v4l2-subdev-frame-interval>` to +:c:type:`v4l2_subdev_frame_interval` to the desired pad number as reported by the media controller API. When they call the ``VIDIOC_SUBDEV_G_FRAME_INTERVAL`` ioctl with a pointer to this structure the driver fills the members of the ``interval`` field. @@ -53,7 +53,7 @@ field and all members of the ``interval`` field. When they call the structure the driver verifies the requested interval, adjusts it based on the hardware capabilities and configures the device. Upon return the struct -:ref:`v4l2_subdev_frame_interval <v4l2-subdev-frame-interval>` +:c:type:`v4l2_subdev_frame_interval` contains the current frame interval as would be returned by a ``VIDIOC_SUBDEV_G_FRAME_INTERVAL`` call. @@ -67,38 +67,25 @@ on a single pad only. Their behaviour when supported on multiple pads of the same sub-device is not defined. -.. _v4l2-subdev-frame-interval: +.. c:type:: v4l2_subdev_frame_interval + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_subdev_frame_interval :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media controller API. - - - .. row 2 - - - struct :ref:`v4l2_fract <v4l2-fract>` - - - ``interval`` - - - Period, in seconds, between consecutive video frames. - - - .. row 3 - - - __u32 - - - ``reserved``\ [9] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. + * - __u32 + - ``pad`` + - Pad number as reported by the media controller API. + * - struct :c:type:`v4l2_fract` + - ``interval`` + - Period, in seconds, between consecutive video frames. + * - __u32 + - ``reserved``\ [9] + - Reserved for future extensions. Applications and drivers must set + the array to zero. Return Value @@ -117,6 +104,6 @@ EBUSY EINVAL The struct - :ref:`v4l2_subdev_frame_interval <v4l2-subdev-frame-interval>` + :c:type:`v4l2_subdev_frame_interval` ``pad`` references a non-existing pad, or the pad doesn't support frame intervals. diff --git a/Documentation/media/uapi/v4l/vidioc-subdev-g-selection.rst b/Documentation/media/uapi/v4l/vidioc-subdev-g-selection.rst index 50838a4a429e..071d9c033db6 100644 --- a/Documentation/media/uapi/v4l/vidioc-subdev-g-selection.rst +++ b/Documentation/media/uapi/v4l/vidioc-subdev-g-selection.rst @@ -15,7 +15,11 @@ VIDIOC_SUBDEV_G_SELECTION - VIDIOC_SUBDEV_S_SELECTION - Get or set selection rec Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_subdev_selection *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_SELECTION, struct v4l2_subdev_selection *argp ) + :name: VIDIOC_SUBDEV_G_SELECTION + +.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_SELECTION, struct v4l2_subdev_selection *argp ) + :name: VIDIOC_SUBDEV_S_SELECTION Arguments @@ -24,9 +28,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION - ``argp`` @@ -64,63 +65,35 @@ Selection targets and flags are documented in :ref:`v4l2-selections-common`. -.. _v4l2-subdev-selection: +.. c:type:: v4l2_subdev_selection + +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. flat-table:: struct v4l2_subdev_selection :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 - - - .. row 1 - - - __u32 - - - ``which`` - - - Active or try selection, from enum - :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. - - - .. row 2 - - - __u32 - - - ``pad`` - - - Pad number as reported by the media framework. - - - .. row 3 - - - __u32 - - - ``target`` - - - Target selection rectangle. See :ref:`v4l2-selections-common`. - - - .. row 4 - - - __u32 - - - ``flags`` - - - Flags. See :ref:`v4l2-selection-flags`. - - - .. row 5 - - - struct :ref:`v4l2_rect <v4l2-rect>` - - - ``r`` - - - Selection rectangle, in pixels. - - - .. row 6 - - - __u32 - - - ``reserved``\ [8] - - - Reserved for future extensions. Applications and drivers must set - the array to zero. + * - __u32 + - ``which`` + - Active or try selection, from enum + :ref:`v4l2_subdev_format_whence <v4l2-subdev-format-whence>`. + * - __u32 + - ``pad`` + - Pad number as reported by the media framework. + * - __u32 + - ``target`` + - Target selection rectangle. See :ref:`v4l2-selections-common`. + * - __u32 + - ``flags`` + - Flags. See :ref:`v4l2-selection-flags`. + * - struct :c:type:`v4l2_rect` + - ``r`` + - Selection rectangle, in pixels. + * - __u32 + - ``reserved``\ [8] + - Reserved for future extensions. Applications and drivers must set + the array to zero. Return Value @@ -138,7 +111,7 @@ EBUSY ``VIDIOC_SUBDEV_S_SELECTION`` EINVAL - The struct :ref:`v4l2_subdev_selection <v4l2-subdev-selection>` + The struct :c:type:`v4l2_subdev_selection` ``pad`` references a non-existing pad, the ``which`` field references a non-existing format, or the selection target is not supported on the given subdev pad. diff --git a/Documentation/media/uapi/v4l/vidioc-subscribe-event.rst b/Documentation/media/uapi/v4l/vidioc-subscribe-event.rst index 3f28e8c47960..e4a51431032c 100644 --- a/Documentation/media/uapi/v4l/vidioc-subscribe-event.rst +++ b/Documentation/media/uapi/v4l/vidioc-subscribe-event.rst @@ -16,7 +16,11 @@ VIDIOC_SUBSCRIBE_EVENT - VIDIOC_UNSUBSCRIBE_EVENT - Subscribe or unsubscribe eve Synopsis ======== -.. cpp:function:: int ioctl( int fd, int request, struct v4l2_event_subscription *argp ) +.. c:function:: int ioctl( int fd, VIDIOC_SUBSCRIBE_EVENT, struct v4l2_event_subscription *argp ) + :name: VIDIOC_SUBSCRIBE_EVENT + +.. c:function:: int ioctl( int fd, VIDIOC_UNSUBSCRIBE_EVENT, struct v4l2_event_subscription *argp ) + :name: VIDIOC_UNSUBSCRIBE_EVENT Arguments @@ -25,9 +29,6 @@ Arguments ``fd`` File descriptor returned by :ref:`open() <func-open>`. -``request`` - VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT - ``argp`` @@ -38,54 +39,40 @@ Subscribe or unsubscribe V4L2 event. Subscribed events are dequeued by using the :ref:`VIDIOC_DQEVENT` ioctl. -.. _v4l2-event-subscription: +.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| + +.. c:type:: v4l2_event_subscription .. flat-table:: struct v4l2_event_subscription :header-rows: 0 :stub-columns: 0 :widths: 1 1 2 + * - __u32 + - ``type`` + - Type of the event, see :ref:`event-type`. - - .. row 1 - - - __u32 - - - ``type`` - - - Type of the event, see :ref:`event-type`. - - .. note:: ``V4L2_EVENT_ALL`` can be used with - :ref:`VIDIOC_UNSUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>` for - unsubscribing all events at once. - - - .. row 2 - - - __u32 - - - ``id`` - - - ID of the event source. If there is no ID associated with the - event source, then set this to 0. Whether or not an event needs an - ID depends on the event type. - - - .. row 3 - - - __u32 - - - ``flags`` + .. note:: - - Event flags, see :ref:`event-flags`. + ``V4L2_EVENT_ALL`` can be used with + :ref:`VIDIOC_UNSUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>` for + unsubscribing all events at once. + * - __u32 + - ``id`` + - ID of the event source. If there is no ID associated with the + event source, then set this to 0. Whether or not an event needs an + ID depends on the event type. + * - __u32 + - ``flags`` + - Event flags, see :ref:`event-flags`. + * - __u32 + - ``reserved``\ [5] + - Reserved for future extensions. Drivers and applications must set + the array to zero. - - .. row 4 - - - __u32 - - - ``reserved``\ [5] - - - Reserved for future extensions. Drivers and applications must set - the array to zero. +.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. _event-flags: @@ -94,40 +81,30 @@ using the :ref:`VIDIOC_DQEVENT` ioctl. :stub-columns: 0 :widths: 3 1 4 - - - .. row 1 - - - ``V4L2_EVENT_SUB_FL_SEND_INITIAL`` - - - 0x0001 - - - When this event is subscribed an initial event will be sent - containing the current status. This only makes sense for events - that are triggered by a status change such as ``V4L2_EVENT_CTRL``. - Other events will ignore this flag. - - - .. row 2 - - - ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK`` - - - 0x0002 - - - If set, then events directly caused by an ioctl will also be sent - to the filehandle that called that ioctl. For example, changing a - control using :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` will cause - a V4L2_EVENT_CTRL to be sent back to that same filehandle. - Normally such events are suppressed to prevent feedback loops - where an application changes a control to a one value and then - another, and then receives an event telling it that that control - has changed to the first value. - - Since it can't tell whether that event was caused by another - application or by the :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` - call it is hard to decide whether to set the control to the value - in the event, or ignore it. - - Think carefully when you set this flag so you won't get into - situations like that. + * - ``V4L2_EVENT_SUB_FL_SEND_INITIAL`` + - 0x0001 + - When this event is subscribed an initial event will be sent + containing the current status. This only makes sense for events + that are triggered by a status change such as ``V4L2_EVENT_CTRL``. + Other events will ignore this flag. + * - ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK`` + - 0x0002 + - If set, then events directly caused by an ioctl will also be sent + to the filehandle that called that ioctl. For example, changing a + control using :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` will cause + a V4L2_EVENT_CTRL to be sent back to that same filehandle. + Normally such events are suppressed to prevent feedback loops + where an application changes a control to a one value and then + another, and then receives an event telling it that that control + has changed to the first value. + + Since it can't tell whether that event was caused by another + application or by the :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` + call it is hard to decide whether to set the control to the value + in the event, or ignore it. + + Think carefully when you set this flag so you won't get into + situations like that. Return Value diff --git a/Documentation/media/v4l-drivers/bttv.rst b/Documentation/media/v4l-drivers/bttv.rst index f78c135b40e7..7abc1c9a261b 100644 --- a/Documentation/media/v4l-drivers/bttv.rst +++ b/Documentation/media/v4l-drivers/bttv.rst @@ -586,6 +586,7 @@ Cards ----- .. note:: + For a more updated list, please check https://linuxtv.org/wiki/index.php/Hardware_Device_Information diff --git a/Documentation/media/v4l-drivers/cpia2.rst b/Documentation/media/v4l-drivers/cpia2.rst index 763705c1f50f..b5125016cfcb 100644 --- a/Documentation/media/v4l-drivers/cpia2.rst +++ b/Documentation/media/v4l-drivers/cpia2.rst @@ -55,6 +55,9 @@ may be done automatically by your distribution. Driver options ~~~~~~~~~~~~~~ +.. tabularcolumns:: |p{13ex}|L| + + ============== ======================================================== Option Description ============== ======================================================== diff --git a/Documentation/media/v4l-drivers/cx23885-cardlist.rst b/Documentation/media/v4l-drivers/cx23885-cardlist.rst index ded3b9139317..f38003255b9a 100644 --- a/Documentation/media/v4l-drivers/cx23885-cardlist.rst +++ b/Documentation/media/v4l-drivers/cx23885-cardlist.rst @@ -60,3 +60,4 @@ cx23885 cards list 54 -> ViewCast 260e [1576:0260] 55 -> ViewCast 460e [1576:0460] 56 -> Hauppauge WinTV-QuadHD-DVB [0070:6a28,0070:6b28] + 57 -> Hauppauge WinTV-QuadHD-ATSC [0070:6a18,0070:6b18] diff --git a/Documentation/media/v4l-drivers/fourcc.rst b/Documentation/media/v4l-drivers/fourcc.rst index f7c8cefff02a..9c82106e8a26 100644 --- a/Documentation/media/v4l-drivers/fourcc.rst +++ b/Documentation/media/v4l-drivers/fourcc.rst @@ -1,4 +1,4 @@ -Guidelines for Linux4Linux pixel format 4CCs +Guidelines for Video4Linux pixel format 4CCs ============================================ Guidelines for Video4Linux 4CC codes defined using v4l2_fourcc() are diff --git a/Documentation/media/v4l-drivers/si476x.rst b/Documentation/media/v4l-drivers/si476x.rst index d5c07bb7524d..677512566f15 100644 --- a/Documentation/media/v4l-drivers/si476x.rst +++ b/Documentation/media/v4l-drivers/si476x.rst @@ -31,31 +31,33 @@ The drivers exposes following files: information. The contents of the file is binary data of the following layout: + .. tabularcolumns:: |p{7ex}|p{12ex}|L| + ============= ============== ==================================== - Offset Name Description + Offset Name Description ============= ============== ==================================== - 0x00 blend_int Flag, set when stereo separation has + 0x00 blend_int Flag, set when stereo separation has crossed below the blend threshold - 0x01 hblend_int Flag, set when HiBlend cutoff + 0x01 hblend_int Flag, set when HiBlend cutoff frequency is lower than threshold - 0x02 hicut_int Flag, set when HiCut cutoff + 0x02 hicut_int Flag, set when HiCut cutoff frequency is lower than threshold - 0x03 chbw_int Flag, set when channel filter + 0x03 chbw_int Flag, set when channel filter bandwidth is less than threshold - 0x04 softmute_int Flag indicating that softmute + 0x04 softmute_int Flag indicating that softmute attenuation has increased above softmute threshold 0x05 smute 0 - Audio is not soft muted 1 - Audio is soft muted - 0x06 smattn Soft mute attenuation level in dB - 0x07 chbw Channel filter bandwidth in kHz - 0x08 hicut HiCut cutoff frequency in units of + 0x06 smattn Soft mute attenuation level in dB + 0x07 chbw Channel filter bandwidth in kHz + 0x08 hicut HiCut cutoff frequency in units of 100Hz - 0x09 hiblend HiBlend cutoff frequency in units + 0x09 hiblend HiBlend cutoff frequency in units of 100 Hz - 0x10 pilot 0 - Stereo pilot is not present + 0x10 pilot 0 - Stereo pilot is not present 1 - Stereo pilot is present - 0x11 stblend Stereo blend in % + 0x11 stblend Stereo blend in % ============= ============== ==================================== @@ -63,12 +65,14 @@ The drivers exposes following files: This file contains statistics about RDS receptions. It's binary data has the following layout: + .. tabularcolumns:: |p{7ex}|p{12ex}|L| + ============= ============== ==================================== - Offset Name Description + Offset Name Description ============= ============== ==================================== - 0x00 expected Number of expected RDS blocks - 0x02 received Number of received RDS blocks - 0x04 uncorrectable Number of uncorrectable RDS blocks + 0x00 expected Number of expected RDS blocks + 0x02 received Number of received RDS blocks + 0x04 uncorrectable Number of uncorrectable RDS blocks ============= ============== ==================================== * /sys/kernel/debug/<device-name>/agc @@ -77,21 +81,23 @@ The drivers exposes following files: The layout is: + .. tabularcolumns:: |p{7ex}|p{12ex}|L| + ============= ============== ==================================== - Offset Name Description + Offset Name Description ============= ============== ==================================== - 0x00 mxhi 0 - FM Mixer PD high threshold is + 0x00 mxhi 0 - FM Mixer PD high threshold is not tripped 1 - FM Mixer PD high threshold is tripped - 0x01 mxlo ditto for FM Mixer PD low - 0x02 lnahi ditto for FM LNA PD high - 0x03 lnalo ditto for FM LNA PD low - 0x04 fmagc1 FMAGC1 attenuator resistance + 0x01 mxlo ditto for FM Mixer PD low + 0x02 lnahi ditto for FM LNA PD high + 0x03 lnalo ditto for FM LNA PD low + 0x04 fmagc1 FMAGC1 attenuator resistance (see datasheet for more detail) - 0x05 fmagc2 ditto for FMAGC2 - 0x06 pgagain PGA gain in dB - 0x07 fmwblang FM/WB LNA Gain in dB + 0x05 fmagc2 ditto for FMAGC2 + 0x06 pgagain PGA gain in dB + 0x07 fmwblang FM/WB LNA Gain in dB ============= ============== ==================================== * /sys/kernel/debug/<device-name>/rsq @@ -100,48 +106,50 @@ The drivers exposes following files: The layout is: + .. tabularcolumns:: |p{7ex}|p{12ex}|p{60ex}| + ============= ============== ==================================== - Offset Name Description + Offset Name Description ============= ============== ==================================== - 0x00 multhint 0 - multipath value has not crossed + 0x00 multhint 0 - multipath value has not crossed the Multipath high threshold 1 - multipath value has crossed the Multipath high threshold - 0x01 multlint ditto for Multipath low threshold - 0x02 snrhint 0 - received signal's SNR has not + 0x01 multlint ditto for Multipath low threshold + 0x02 snrhint 0 - received signal's SNR has not crossed high threshold 1 - received signal's SNR has crossed high threshold - 0x03 snrlint ditto for low threshold - 0x04 rssihint ditto for RSSI high threshold - 0x05 rssilint ditto for RSSI low threshold - 0x06 bltf Flag indicating if seek command + 0x03 snrlint ditto for low threshold + 0x04 rssihint ditto for RSSI high threshold + 0x05 rssilint ditto for RSSI low threshold + 0x06 bltf Flag indicating if seek command reached/wrapped seek band limit - 0x07 snr_ready Indicates that SNR metrics is ready - 0x08 rssiready ditto for RSSI metrics - 0x09 injside 0 - Low-side injection is being used + 0x07 snr_ready Indicates that SNR metrics is ready + 0x08 rssiready ditto for RSSI metrics + 0x09 injside 0 - Low-side injection is being used 1 - High-side injection is used - 0x10 afcrl Flag indicating if AFC rails - 0x11 valid Flag indicating if channel is valid - 0x12 readfreq Current tuned frequency - 0x14 freqoff Signed frequency offset in units of + 0x10 afcrl Flag indicating if AFC rails + 0x11 valid Flag indicating if channel is valid + 0x12 readfreq Current tuned frequency + 0x14 freqoff Signed frequency offset in units of 2ppm - 0x15 rssi Signed value of RSSI in dBuV - 0x16 snr Signed RF SNR in dB - 0x17 issi Signed Image Strength Signal + 0x15 rssi Signed value of RSSI in dBuV + 0x16 snr Signed RF SNR in dB + 0x17 issi Signed Image Strength Signal indicator - 0x18 lassi Signed Low side adjacent Channel + 0x18 lassi Signed Low side adjacent Channel Strength indicator - 0x19 hassi ditto fpr High side - 0x20 mult Multipath indicator - 0x21 dev Frequency deviation - 0x24 assi Adjacent channel SSI - 0x25 usn Ultrasonic noise indicator - 0x26 pilotdev Pilot deviation in units of 100 Hz - 0x27 rdsdev ditto for RDS - 0x28 assidev ditto for ASSI - 0x29 strongdev Frequency deviation - 0x30 rdspi RDS PI code + 0x19 hassi ditto fpr High side + 0x20 mult Multipath indicator + 0x21 dev Frequency deviation + 0x24 assi Adjacent channel SSI + 0x25 usn Ultrasonic noise indicator + 0x26 pilotdev Pilot deviation in units of 100 Hz + 0x27 rdsdev ditto for RDS + 0x28 assidev ditto for ASSI + 0x29 strongdev Frequency deviation + 0x30 rdspi RDS PI code ============= ============== ==================================== * /sys/kernel/debug/<device-name>/rsq_primary diff --git a/Documentation/media/v4l-drivers/zr364xx.rst b/Documentation/media/v4l-drivers/zr364xx.rst index d8d1171887cd..f5280e366826 100644 --- a/Documentation/media/v4l-drivers/zr364xx.rst +++ b/Documentation/media/v4l-drivers/zr364xx.rst @@ -5,7 +5,7 @@ site: http://royale.zerezo.com/zr364xx/ mail: royale@zerezo.com -.. note: +.. note:: This documentation is outdated diff --git a/Documentation/media/video.h.rst.exceptions b/Documentation/media/video.h.rst.exceptions index 8866145e8269..a91aa884ce0e 100644 --- a/Documentation/media/video.h.rst.exceptions +++ b/Documentation/media/video.h.rst.exceptions @@ -28,13 +28,13 @@ ignore define VIDEO_CAP_NAVI ignore define VIDEO_CAP_CSS # some typedefs should point to struct/enums -replace typedef video_format_t video-format -replace typedef video_system_t video-system -replace typedef video_displayformat_t video-displayformat -replace typedef video_size_t video-size -replace typedef video_stream_source_t video-stream-source -replace typedef video_play_state_t video-play-state -replace typedef video_highlight_t video-highlight -replace typedef video_spu_t video-spu -replace typedef video_spu_palette_t video-spu-palette -replace typedef video_navi_pack_t video-navi-pack +replace typedef video_format_t :c:type:`video_format` +replace typedef video_system_t :c:type:`video_system` +replace typedef video_displayformat_t :c:type:`video_displayformat` +replace typedef video_size_t :c:type:`video_size` +replace typedef video_stream_source_t :c:type:`video_stream_source` +replace typedef video_play_state_t :c:type:`video_play_state` +replace typedef video_highlight_t :c:type:`video_highlight` +replace typedef video_spu_t :c:type:`video_spu` +replace typedef video_spu_palette_t :c:type:`video_spu_palette` +replace typedef video_navi_pack_t :c:type:`video_navi_pack` diff --git a/Documentation/media/videodev2.h.rst.exceptions b/Documentation/media/videodev2.h.rst.exceptions index 9bb9a6cc39d8..1d3f27d922b2 100644 --- a/Documentation/media/videodev2.h.rst.exceptions +++ b/Documentation/media/videodev2.h.rst.exceptions @@ -15,115 +15,115 @@ ignore symbol V4L2_TUNER_DIGITAL_TV ignore symbol V4L2_COLORSPACE_BT878 # Documented enum v4l2_field -replace symbol V4L2_FIELD_ALTERNATE v4l2-field -replace symbol V4L2_FIELD_ANY v4l2-field -replace symbol V4L2_FIELD_BOTTOM v4l2-field -replace symbol V4L2_FIELD_INTERLACED v4l2-field -replace symbol V4L2_FIELD_INTERLACED_BT v4l2-field -replace symbol V4L2_FIELD_INTERLACED_TB v4l2-field -replace symbol V4L2_FIELD_NONE v4l2-field -replace symbol V4L2_FIELD_SEQ_BT v4l2-field -replace symbol V4L2_FIELD_SEQ_TB v4l2-field -replace symbol V4L2_FIELD_TOP v4l2-field +replace symbol V4L2_FIELD_ALTERNATE :c:type:`v4l2_field` +replace symbol V4L2_FIELD_ANY :c:type:`v4l2_field` +replace symbol V4L2_FIELD_BOTTOM :c:type:`v4l2_field` +replace symbol V4L2_FIELD_INTERLACED :c:type:`v4l2_field` +replace symbol V4L2_FIELD_INTERLACED_BT :c:type:`v4l2_field` +replace symbol V4L2_FIELD_INTERLACED_TB :c:type:`v4l2_field` +replace symbol V4L2_FIELD_NONE :c:type:`v4l2_field` +replace symbol V4L2_FIELD_SEQ_BT :c:type:`v4l2_field` +replace symbol V4L2_FIELD_SEQ_TB :c:type:`v4l2_field` +replace symbol V4L2_FIELD_TOP :c:type:`v4l2_field` # Documented enum v4l2_buf_type -replace symbol V4L2_BUF_TYPE_SDR_CAPTURE v4l2-buf-type -replace symbol V4L2_BUF_TYPE_SDR_OUTPUT v4l2-buf-type -replace symbol V4L2_BUF_TYPE_SLICED_VBI_CAPTURE v4l2-buf-type -replace symbol V4L2_BUF_TYPE_SLICED_VBI_OUTPUT v4l2-buf-type -replace symbol V4L2_BUF_TYPE_VBI_CAPTURE v4l2-buf-type -replace symbol V4L2_BUF_TYPE_VBI_OUTPUT v4l2-buf-type -replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE v4l2-buf-type -replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE v4l2-buf-type -replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT v4l2-buf-type -replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE v4l2-buf-type -replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY v4l2-buf-type -replace symbol V4L2_BUF_TYPE_VIDEO_OVERLAY v4l2-buf-type +replace symbol V4L2_BUF_TYPE_SDR_CAPTURE :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_SDR_OUTPUT :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_SLICED_VBI_CAPTURE :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_SLICED_VBI_OUTPUT :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_VBI_CAPTURE :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_VBI_OUTPUT :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY :c:type:`v4l2_buf_type` +replace symbol V4L2_BUF_TYPE_VIDEO_OVERLAY :c:type:`v4l2_buf_type` # Documented enum v4l2_tuner_type -replace symbol V4L2_TUNER_ANALOG_TV v4l2-tuner-type -replace symbol V4L2_TUNER_RADIO v4l2-tuner-type -replace symbol V4L2_TUNER_RF v4l2-tuner-type -replace symbol V4L2_TUNER_SDR v4l2-tuner-type +replace symbol V4L2_TUNER_ANALOG_TV :c:type:`v4l2_tuner_type` +replace symbol V4L2_TUNER_RADIO :c:type:`v4l2_tuner_type` +replace symbol V4L2_TUNER_RF :c:type:`v4l2_tuner_type` +replace symbol V4L2_TUNER_SDR :c:type:`v4l2_tuner_type` # Documented enum v4l2_memory -replace symbol V4L2_MEMORY_DMABUF v4l2-memory -replace symbol V4L2_MEMORY_MMAP v4l2-memory -replace symbol V4L2_MEMORY_OVERLAY v4l2-memory -replace symbol V4L2_MEMORY_USERPTR v4l2-memory +replace symbol V4L2_MEMORY_DMABUF :c:type:`v4l2_memory` +replace symbol V4L2_MEMORY_MMAP :c:type:`v4l2_memory` +replace symbol V4L2_MEMORY_OVERLAY :c:type:`v4l2_memory` +replace symbol V4L2_MEMORY_USERPTR :c:type:`v4l2_memory` # Documented enum v4l2_colorspace -replace symbol V4L2_COLORSPACE_470_SYSTEM_BG v4l2-colorspace -replace symbol V4L2_COLORSPACE_470_SYSTEM_M v4l2-colorspace -replace symbol V4L2_COLORSPACE_ADOBERGB v4l2-colorspace -replace symbol V4L2_COLORSPACE_BT2020 v4l2-colorspace -replace symbol V4L2_COLORSPACE_DCI_P3 v4l2-colorspace -replace symbol V4L2_COLORSPACE_DEFAULT v4l2-colorspace -replace symbol V4L2_COLORSPACE_JPEG v4l2-colorspace -replace symbol V4L2_COLORSPACE_RAW v4l2-colorspace -replace symbol V4L2_COLORSPACE_REC709 v4l2-colorspace -replace symbol V4L2_COLORSPACE_SMPTE170M v4l2-colorspace -replace symbol V4L2_COLORSPACE_SMPTE240M v4l2-colorspace -replace symbol V4L2_COLORSPACE_SRGB v4l2-colorspace +replace symbol V4L2_COLORSPACE_470_SYSTEM_BG :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_470_SYSTEM_M :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_ADOBERGB :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_BT2020 :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_DCI_P3 :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_DEFAULT :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_JPEG :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_RAW :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_REC709 :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_SMPTE170M :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_SMPTE240M :c:type:`v4l2_colorspace` +replace symbol V4L2_COLORSPACE_SRGB :c:type:`v4l2_colorspace` # Documented enum v4l2_xfer_func -replace symbol V4L2_XFER_FUNC_709 v4l2-xfer-func -replace symbol V4L2_XFER_FUNC_ADOBERGB v4l2-xfer-func -replace symbol V4L2_XFER_FUNC_DCI_P3 v4l2-xfer-func -replace symbol V4L2_XFER_FUNC_DEFAULT v4l2-xfer-func -replace symbol V4L2_XFER_FUNC_NONE v4l2-xfer-func -replace symbol V4L2_XFER_FUNC_SMPTE2084 v4l2-xfer-func -replace symbol V4L2_XFER_FUNC_SMPTE240M v4l2-xfer-func -replace symbol V4L2_XFER_FUNC_SRGB v4l2-xfer-func +replace symbol V4L2_XFER_FUNC_709 :c:type:`v4l2_xfer_func` +replace symbol V4L2_XFER_FUNC_ADOBERGB :c:type:`v4l2_xfer_func` +replace symbol V4L2_XFER_FUNC_DCI_P3 :c:type:`v4l2_xfer_func` +replace symbol V4L2_XFER_FUNC_DEFAULT :c:type:`v4l2_xfer_func` +replace symbol V4L2_XFER_FUNC_NONE :c:type:`v4l2_xfer_func` +replace symbol V4L2_XFER_FUNC_SMPTE2084 :c:type:`v4l2_xfer_func` +replace symbol V4L2_XFER_FUNC_SMPTE240M :c:type:`v4l2_xfer_func` +replace symbol V4L2_XFER_FUNC_SRGB :c:type:`v4l2_xfer_func` # Documented enum v4l2_ycbcr_encoding -replace symbol V4L2_YCBCR_ENC_601 v4l2-ycbcr-encoding -replace symbol V4L2_YCBCR_ENC_709 v4l2-ycbcr-encoding -replace symbol V4L2_YCBCR_ENC_BT2020 v4l2-ycbcr-encoding -replace symbol V4L2_YCBCR_ENC_BT2020_CONST_LUM v4l2-ycbcr-encoding -replace symbol V4L2_YCBCR_ENC_DEFAULT v4l2-ycbcr-encoding -replace symbol V4L2_YCBCR_ENC_SYCC v4l2-ycbcr-encoding -replace symbol V4L2_YCBCR_ENC_XV601 v4l2-ycbcr-encoding -replace symbol V4L2_YCBCR_ENC_XV709 v4l2-ycbcr-encoding -replace symbol V4L2_YCBCR_ENC_SMPTE240M v4l2-ycbcr-encoding +replace symbol V4L2_YCBCR_ENC_601 :c:type:`v4l2_ycbcr_encoding` +replace symbol V4L2_YCBCR_ENC_709 :c:type:`v4l2_ycbcr_encoding` +replace symbol V4L2_YCBCR_ENC_BT2020 :c:type:`v4l2_ycbcr_encoding` +replace symbol V4L2_YCBCR_ENC_BT2020_CONST_LUM :c:type:`v4l2_ycbcr_encoding` +replace symbol V4L2_YCBCR_ENC_DEFAULT :c:type:`v4l2_ycbcr_encoding` +replace symbol V4L2_YCBCR_ENC_SYCC :c:type:`v4l2_ycbcr_encoding` +replace symbol V4L2_YCBCR_ENC_XV601 :c:type:`v4l2_ycbcr_encoding` +replace symbol V4L2_YCBCR_ENC_XV709 :c:type:`v4l2_ycbcr_encoding` +replace symbol V4L2_YCBCR_ENC_SMPTE240M :c:type:`v4l2_ycbcr_encoding` # Documented enum v4l2_quantization -replace symbol V4L2_QUANTIZATION_DEFAULT v4l2-quantization -replace symbol V4L2_QUANTIZATION_FULL_RANGE v4l2-quantization -replace symbol V4L2_QUANTIZATION_LIM_RANGE v4l2-quantization +replace symbol V4L2_QUANTIZATION_DEFAULT :c:type:`v4l2_quantization` +replace symbol V4L2_QUANTIZATION_FULL_RANGE :c:type:`v4l2_quantization` +replace symbol V4L2_QUANTIZATION_LIM_RANGE :c:type:`v4l2_quantization` # Documented enum v4l2_priority -replace symbol V4L2_PRIORITY_BACKGROUND v4l2-priority -replace symbol V4L2_PRIORITY_DEFAULT v4l2-priority -replace symbol V4L2_PRIORITY_INTERACTIVE v4l2-priority -replace symbol V4L2_PRIORITY_RECORD v4l2-priority -replace symbol V4L2_PRIORITY_UNSET v4l2-priority +replace symbol V4L2_PRIORITY_BACKGROUND :c:type:`v4l2_priority` +replace symbol V4L2_PRIORITY_DEFAULT :c:type:`v4l2_priority` +replace symbol V4L2_PRIORITY_INTERACTIVE :c:type:`v4l2_priority` +replace symbol V4L2_PRIORITY_RECORD :c:type:`v4l2_priority` +replace symbol V4L2_PRIORITY_UNSET :c:type:`v4l2_priority` # Documented enum v4l2_frmsizetypes -replace symbol V4L2_FRMSIZE_TYPE_CONTINUOUS v4l2-frmsizetypes -replace symbol V4L2_FRMSIZE_TYPE_DISCRETE v4l2-frmsizetypes -replace symbol V4L2_FRMSIZE_TYPE_STEPWISE v4l2-frmsizetypes +replace symbol V4L2_FRMSIZE_TYPE_CONTINUOUS :c:type:`v4l2_frmsizetypes` +replace symbol V4L2_FRMSIZE_TYPE_DISCRETE :c:type:`v4l2_frmsizetypes` +replace symbol V4L2_FRMSIZE_TYPE_STEPWISE :c:type:`v4l2_frmsizetypes` # Documented enum frmivaltypes -replace symbol V4L2_FRMIVAL_TYPE_CONTINUOUS v4l2-frmivaltypes -replace symbol V4L2_FRMIVAL_TYPE_DISCRETE v4l2-frmivaltypes -replace symbol V4L2_FRMIVAL_TYPE_STEPWISE v4l2-frmivaltypes +replace symbol V4L2_FRMIVAL_TYPE_CONTINUOUS :c:type:`v4l2_frmivaltypes` +replace symbol V4L2_FRMIVAL_TYPE_DISCRETE :c:type:`v4l2_frmivaltypes` +replace symbol V4L2_FRMIVAL_TYPE_STEPWISE :c:type:`v4l2_frmivaltypes` -# Documented enum v4l2-ctrl-type +# Documented enum :c:type:`v4l2_ctrl_type` replace symbol V4L2_CTRL_COMPOUND_TYPES vidioc_queryctrl -replace symbol V4L2_CTRL_TYPE_BITMASK v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_BOOLEAN v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_BUTTON v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_CTRL_CLASS v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_INTEGER v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_INTEGER64 v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_INTEGER_MENU v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_MENU v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_STRING v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_U16 v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_U32 v4l2-ctrl-type -replace symbol V4L2_CTRL_TYPE_U8 v4l2-ctrl-type +replace symbol V4L2_CTRL_TYPE_BITMASK :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_BOOLEAN :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_BUTTON :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_CTRL_CLASS :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_INTEGER :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_INTEGER64 :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_INTEGER_MENU :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_MENU :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_STRING :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_U16 :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_U32 :c:type:`v4l2_ctrl_type` +replace symbol V4L2_CTRL_TYPE_U8 :c:type:`v4l2_ctrl_type` # V4L2 capability defines replace define V4L2_CAP_VIDEO_CAPTURE device-capabilities @@ -152,9 +152,10 @@ replace define V4L2_CAP_READWRITE device-capabilities replace define V4L2_CAP_ASYNCIO device-capabilities replace define V4L2_CAP_STREAMING device-capabilities replace define V4L2_CAP_DEVICE_CAPS device-capabilities +replace define V4L2_CAP_TOUCH device-capabilities # V4L2 pix flags -replace define V4L2_PIX_FMT_PRIV_MAGIC v4l2-pix-format +replace define V4L2_PIX_FMT_PRIV_MAGIC :c:type:`v4l2_pix_format` replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA reserved-formats # V4L2 format flags @@ -204,7 +205,7 @@ replace define V4L2_FBUF_FLAG_SRC_CHROMAKEY framebuffer-flags # Used on VIDIOC_G_PARM replace define V4L2_MODE_HIGHQUALITY parm-flags -replace define V4L2_CAP_TIMEPERFRAME v4l2-captureparm +replace define V4L2_CAP_TIMEPERFRAME :c:type:`v4l2_captureparm` # The V4L2_STD_foo are all defined at v4l2_std_id table @@ -257,22 +258,24 @@ replace define V4L2_STD_ALL v4l2-std-id # V4L2 DT BT timings definitions -replace define V4L2_DV_PROGRESSIVE v4l2-bt-timings -replace define V4L2_DV_INTERLACED v4l2-bt-timings +replace define V4L2_DV_PROGRESSIVE :c:type:`v4l2_bt_timings` +replace define V4L2_DV_INTERLACED :c:type:`v4l2_bt_timings` -replace define V4L2_DV_VSYNC_POS_POL v4l2-bt-timings -replace define V4L2_DV_HSYNC_POS_POL v4l2-bt-timings +replace define V4L2_DV_VSYNC_POS_POL :c:type:`v4l2_bt_timings` +replace define V4L2_DV_HSYNC_POS_POL :c:type:`v4l2_bt_timings` replace define V4L2_DV_BT_STD_CEA861 dv-bt-standards replace define V4L2_DV_BT_STD_DMT dv-bt-standards replace define V4L2_DV_BT_STD_CVT dv-bt-standards replace define V4L2_DV_BT_STD_GTF dv-bt-standards +replace define V4L2_DV_BT_STD_SDI dv-bt-standards replace define V4L2_DV_FL_REDUCED_BLANKING dv-bt-standards replace define V4L2_DV_FL_CAN_REDUCE_FPS dv-bt-standards replace define V4L2_DV_FL_REDUCED_FPS dv-bt-standards replace define V4L2_DV_FL_HALF_LINE dv-bt-standards replace define V4L2_DV_FL_IS_CE_VIDEO dv-bt-standards +replace define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE dv-bt-standards replace define V4L2_DV_BT_656_1120 dv-timing-types @@ -285,6 +288,7 @@ replace define V4L2_DV_BT_CAP_CUSTOM framebuffer-cap replace define V4L2_INPUT_TYPE_TUNER input-type replace define V4L2_INPUT_TYPE_CAMERA input-type +replace define V4L2_INPUT_TYPE_TOUCH input-type replace define V4L2_IN_ST_NO_POWER input-status replace define V4L2_IN_ST_NO_SIGNAL input-status @@ -299,6 +303,8 @@ replace define V4L2_IN_ST_NO_CARRIER input-status replace define V4L2_IN_ST_MACROVISION input-status replace define V4L2_IN_ST_NO_ACCESS input-status replace define V4L2_IN_ST_VTR input-status +replace define V4L2_IN_ST_NO_V_LOCK input-status +replace define V4L2_IN_ST_NO_STD_LOCK input-status replace define V4L2_IN_CAP_DV_TIMINGS input-capabilities replace define V4L2_IN_CAP_STD input-capabilities @@ -385,11 +391,11 @@ replace define V4L2_AUDMODE_AVL audio-mode # MPEG -replace define V4L2_ENC_IDX_FRAME_I v4l2-enc-idx -replace define V4L2_ENC_IDX_FRAME_P v4l2-enc-idx -replace define V4L2_ENC_IDX_FRAME_B v4l2-enc-idx -replace define V4L2_ENC_IDX_FRAME_MASK v4l2-enc-idx -replace define V4L2_ENC_IDX_ENTRIES v4l2-enc-idx +replace define V4L2_ENC_IDX_FRAME_I :c:type:`v4l2_enc_idx` +replace define V4L2_ENC_IDX_FRAME_P :c:type:`v4l2_enc_idx` +replace define V4L2_ENC_IDX_FRAME_B :c:type:`v4l2_enc_idx` +replace define V4L2_ENC_IDX_FRAME_MASK :c:type:`v4l2_enc_idx` +replace define V4L2_ENC_IDX_ENTRIES :c:type:`v4l2_enc_idx` replace define V4L2_ENC_CMD_START encoder-cmds replace define V4L2_ENC_CMD_STOP encoder-cmds @@ -416,10 +422,10 @@ replace define V4L2_DEC_START_FMT_GOP decoder-cmds replace define V4L2_VBI_UNSYNC vbifmt-flags replace define V4L2_VBI_INTERLACED vbifmt-flags -replace define V4L2_VBI_ITU_525_F1_START v4l2-vbi-format -replace define V4L2_VBI_ITU_525_F2_START v4l2-vbi-format -replace define V4L2_VBI_ITU_625_F1_START v4l2-vbi-format -replace define V4L2_VBI_ITU_625_F2_START v4l2-vbi-format +replace define V4L2_VBI_ITU_525_F1_START :c:type:`v4l2_vbi_format` +replace define V4L2_VBI_ITU_525_F2_START :c:type:`v4l2_vbi_format` +replace define V4L2_VBI_ITU_625_F1_START :c:type:`v4l2_vbi_format` +replace define V4L2_VBI_ITU_625_F2_START :c:type:`v4l2_vbi_format` replace define V4L2_SLICED_TELETEXT_B vbi-services @@ -454,7 +460,7 @@ replace define V4L2_EVENT_CTRL_CH_RANGE ctrl-changes-flags replace define V4L2_EVENT_SRC_CH_RESOLUTION src-changes-flags -replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ v4l2-event-motion-det +replace define V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ :c:type:`v4l2_event_motion_det` replace define V4L2_EVENT_SUB_FL_SEND_INITIAL event-flags replace define V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK event-flags diff --git a/Documentation/sphinx/parse-headers.pl b/Documentation/sphinx/parse-headers.pl index 74089b0da798..db0186a7618f 100755 --- a/Documentation/sphinx/parse-headers.pl +++ b/Documentation/sphinx/parse-headers.pl @@ -2,12 +2,18 @@ use strict; use Text::Tabs; -# Uncomment if debug is needed -#use Data::Dumper; - -# change to 1 to generate some debug prints my $debug = 0; +while ($ARGV[0] =~ m/^-(.*)/) { + my $cmd = shift @ARGV; + if ($cmd eq "--debug") { + require Data::Dumper; + $debug = 1; + next; + } + die "argument $cmd unknown"; +} + if (scalar @ARGV < 2 || scalar @ARGV > 3) { die "Usage:\n\t$0 <file in> <file out> [<exceptions file>]\n"; } @@ -51,7 +57,7 @@ while (<IN>) { $n =~ tr/A-Z/a-z/; $n =~ tr/_/-/; - $enum_symbols{$s} = $n; + $enum_symbols{$s} = "\\ :ref:`$s <$n>`\\ "; $is_enum = 0 if ($is_enum && m/\}/); next; @@ -63,7 +69,7 @@ while (<IN>) { my $n = $1; $n =~ tr/A-Z/a-z/; - $ioctls{$s} = $n; + $ioctls{$s} = "\\ :ref:`$s <$n>`\\ "; next; } @@ -73,17 +79,15 @@ while (<IN>) { $n =~ tr/A-Z/a-z/; $n =~ tr/_/-/; - $defines{$s} = $n; + $defines{$s} = "\\ :ref:`$s <$n>`\\ "; next; } - if ($ln =~ m/^\s*typedef\s+.*\s+([_\w][\w\d_]+);/) { - my $s = $1; - my $n = $1; - $n =~ tr/A-Z/a-z/; - $n =~ tr/_/-/; + if ($ln =~ m/^\s*typedef\s+([_\w][\w\d_]+)\s+(.*)\s+([_\w][\w\d_]+);/) { + my $s = $2; + my $n = $3; - $typedefs{$s} = $n; + $typedefs{$n} = "\\ :c:type:`$n <$s>`\\ "; next; } if ($ln =~ m/^\s*enum\s+([_\w][\w\d_]+)\s+\{/ @@ -91,11 +95,8 @@ while (<IN>) { || $ln =~ m/^\s*typedef\s*enum\s+([_\w][\w\d_]+)\s+\{/ || $ln =~ m/^\s*typedef\s*enum\s+([_\w][\w\d_]+)$/) { my $s = $1; - my $n = $1; - $n =~ tr/A-Z/a-z/; - $n =~ tr/_/-/; - $enums{$s} = $n; + $enums{$s} = "enum :c:type:`$s`\\ "; $is_enum = $1; next; @@ -106,11 +107,8 @@ while (<IN>) { || $ln =~ m/^\s*typedef\s*struct\s+([[_\w][\w\d_]+)$/ ) { my $s = $1; - my $n = $1; - $n =~ tr/A-Z/a-z/; - $n =~ tr/_/-/; - $structs{$s} = $n; + $structs{$s} = "struct :c:type:`$s`\\ "; next; } } @@ -123,12 +121,9 @@ close IN; my @matches = ($data =~ m/typedef\s+struct\s+\S+?\s*\{[^\}]+\}\s*(\S+)\s*\;/g, $data =~ m/typedef\s+enum\s+\S+?\s*\{[^\}]+\}\s*(\S+)\s*\;/g,); foreach my $m (@matches) { - my $s = $m; - my $n = $m; - $n =~ tr/A-Z/a-z/; - $n =~ tr/_/-/; + my $s = $m; - $typedefs{$s} = $n; + $typedefs{$s} = "\\ :c:type:`$s`\\ "; next; } @@ -136,6 +131,15 @@ foreach my $m (@matches) { # Handle exceptions, if any # +my %def_reftype = ( + "ioctl" => ":ref", + "define" => ":ref", + "symbol" => ":ref", + "typedef" => ":c:type", + "enum" => ":c:type", + "struct" => ":c:type", +); + if ($file_exceptions) { open IN, $file_exceptions or die "Can't read $file_exceptions"; while (<IN>) { @@ -169,29 +173,49 @@ if ($file_exceptions) { } # Parsers to replace a symbol + my ($type, $old, $new, $reftype); + + if (m/^replace\s+(\S+)\s+(\S+)\s+(\S+)/) { + $type = $1; + $old = $2; + $new = $3; + } else { + die "Can't parse $file_exceptions: $_"; + } + + if ($new =~ m/^\:c\:(data|func|macro|type)\:\`(.+)\`/) { + $reftype = ":c:$1"; + $new = $2; + } elsif ($new =~ m/\:ref\:\`(.+)\`/) { + $reftype = ":ref"; + $new = $1; + } else { + $reftype = $def_reftype{$type}; + } + $new = "$reftype:`$old <$new>`"; - if (m/^replace\s+ioctl\s+(\S+)\s+(\S+)/) { - $ioctls{$1} = $2 if (exists($ioctls{$1})); + if ($type eq "ioctl") { + $ioctls{$old} = $new if (exists($ioctls{$old})); next; } - if (m/^replace\s+define\s+(\S+)\s+(\S+)/) { - $defines{$1} = $2 if (exists($defines{$1})); + if ($type eq "define") { + $defines{$old} = $new if (exists($defines{$old})); next; } - if (m/^replace\s+typedef\s+(\S+)\s+(\S+)/) { - $typedefs{$1} = $2 if (exists($typedefs{$1})); + if ($type eq "symbol") { + $enum_symbols{$old} = $new if (exists($enum_symbols{$old})); next; } - if (m/^replace\s+enum\s+(\S+)\s+(\S+)/) { - $enums{$1} = $2 if (exists($enums{$1})); + if ($type eq "typedef") { + $typedefs{$old} = $new if (exists($typedefs{$old})); next; } - if (m/^replace\s+symbol\s+(\S+)\s+(\S+)/) { - $enum_symbols{$1} = $2 if (exists($enum_symbols{$1})); + if ($type eq "enum") { + $enums{$old} = $new if (exists($enums{$old})); next; } - if (m/^replace\s+struct\s+(\S+)\s+(\S+)/) { - $structs{$1} = $2 if (exists($structs{$1})); + if ($type eq "struct") { + $structs{$old} = $new if (exists($structs{$old})); next; } @@ -232,9 +256,7 @@ my $start_delim = "[ \n\t\(\=\*\@]"; my $end_delim = "(\\s|,|\\\\=|\\\\:|\\;|\\\)|\\}|\\{)"; foreach my $r (keys %ioctls) { - my $n = $ioctls{$r}; - - my $s = "\\ :ref:`$r <$n>`\\ "; + my $s = $ioctls{$r}; $r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g; @@ -244,9 +266,7 @@ foreach my $r (keys %ioctls) { } foreach my $r (keys %defines) { - my $n = $defines{$r}; - - my $s = "\\ :ref:`$r <$n>`\\ "; + my $s = $defines{$r}; $r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g; @@ -256,9 +276,7 @@ foreach my $r (keys %defines) { } foreach my $r (keys %enum_symbols) { - my $n = $enum_symbols{$r}; - - my $s = "\\ :ref:`$r <$n>`\\ "; + my $s = $enum_symbols{$r}; $r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g; @@ -268,9 +286,7 @@ foreach my $r (keys %enum_symbols) { } foreach my $r (keys %enums) { - my $n = $enums{$r}; - - my $s = "\\ :ref:`enum $r <$n>`\\ "; + my $s = $enums{$r}; $r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g; @@ -280,9 +296,7 @@ foreach my $r (keys %enums) { } foreach my $r (keys %structs) { - my $n = $structs{$r}; - - my $s = "\\ :ref:`struct $r <$n>`\\ "; + my $s = $structs{$r}; $r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g; @@ -292,18 +306,15 @@ foreach my $r (keys %structs) { } foreach my $r (keys %typedefs) { - my $n = $typedefs{$r}; - - my $s = "\\ :ref:`$r <$n>`\\ "; + my $s = $typedefs{$r}; $r =~ s,([\_\`\*\<\>\&\\\\:\/]),\\\\$1,g; print "$r -> $s\n" if ($debug); - $data =~ s/($start_delim)($r)$end_delim/$1$s$3/g; } -$data =~ s/\\ \n/\n/g; +$data =~ s/\\ ([\n\s])/\1/g; # # Generate output file |