提交 65390ea0 编写于 作者: M Mauro Carvalho Chehab

Merge branch 'patchwork' into v4l_for_linus

* patchwork: (496 commits)
  [media] v4l: tvp5150: Add missing break in set control handler
  [media] v4l: tvp5150: Don't inline the tvp5150_selmux() function
  [media] v4l: tvp5150: Compile tvp5150_link_setup out if !CONFIG_MEDIA_CONTROLLER
  [media] em28xx: don't store usb_device at struct em28xx
  [media] em28xx: use usb_interface for dev_foo() calls
  [media] em28xx: don't change the device's name
  [media] mn88472: fix chip id check on probe
  [media] mn88473: fix chip id check on probe
  [media] lirc: fix error paths in lirc_cdev_add()
  [media] s5p-mfc: Add support for MFC v8 available in Exynos 5433 SoCs
  [media] s5p-mfc: Rework clock handling
  [media] s5p-mfc: Don't keep clock prepared all the time
  [media] s5p-mfc: Kill all IS_ERR_OR_NULL in clocks management code
  [media] s5p-mfc: Remove dead conditional code
  [media] s5p-mfc: Ensure that clock is disabled before turning power off
  [media] s5p-mfc: Remove special clock rate management
  [media] s5p-mfc: Use printk_ratelimited for reporting ioctl errors
  [media] s5p-mfc: Set DMA_ATTR_ALLOC_SINGLE_PAGES
  [media] vivid: Set color_enc on HSV formats
  [media] v4l2-tpg: Init hv_enc field with a valid value
  ...
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
G-Scaler is used for scaling and color space conversion on EXYNOS5 SoCs. G-Scaler is used for scaling and color space conversion on EXYNOS5 SoCs.
Required properties: Required properties:
- compatible: should be "samsung,exynos5-gsc" - compatible: should be "samsung,exynos5-gsc" (for Exynos 5250, 5420 and
5422 SoCs) or "samsung,exynos5433-gsc" (Exynos 5433)
- reg: should contain G-Scaler physical address location and length. - reg: should contain G-Scaler physical address location and length.
- interrupts: should contain G-Scaler interrupt number - interrupts: should contain G-Scaler interrupt number
......
...@@ -8,10 +8,11 @@ Required properties: ...@@ -8,10 +8,11 @@ Required properties:
the device. The interrupt specifier format depends on the interrupt the device. The interrupt specifier format depends on the interrupt
controller parent. controller parent.
- clocks: clock phandle and specifier pair. - clocks: clock phandle and specifier pair.
- hisilicon,power-syscon: phandle of syscon used to control power.
Optional properties: Optional properties:
- linux,rc-map-name : Remote control map name. - linux,rc-map-name : Remote control map name.
- hisilicon,power-syscon: DEPRECATED. Don't use this in new dts files.
Provide correct clocks instead.
Example node: Example node:
...@@ -19,7 +20,6 @@ Example node: ...@@ -19,7 +20,6 @@ Example node:
compatible = "hisilicon,hix5hd2-ir"; compatible = "hisilicon,hix5hd2-ir";
reg = <0xf8001000 0x1000>; reg = <0xf8001000 0x1000>;
interrupts = <0 47 4>; interrupts = <0 47 4>;
clocks = <&clock HIX5HD2_FIXED_24M>; clocks = <&clock HIX5HD2_IR_CLOCK>;
hisilicon,power-syscon = <&sysctrl>;
linux,rc-map-name = "rc-tivo"; linux,rc-map-name = "rc-tivo";
}; };
...@@ -34,6 +34,7 @@ The digital output port node must contain at least one endpoint. ...@@ -34,6 +34,7 @@ The digital output port node must contain at least one endpoint.
Optional Properties: Optional Properties:
- reset-gpios: Reference to the GPIO connected to the device's reset pin. - reset-gpios: Reference to the GPIO connected to the device's reset pin.
- default-input: Select which input is selected after reset.
Optional Endpoint Properties: Optional Endpoint Properties:
...@@ -47,8 +48,6 @@ Optional Endpoint Properties: ...@@ -47,8 +48,6 @@ Optional Endpoint Properties:
If none of hsync-active, vsync-active and pclk-sample is specified the If none of hsync-active, vsync-active and pclk-sample is specified the
endpoint will use embedded BT.656 synchronization. endpoint will use embedded BT.656 synchronization.
- default-input: Select which input is selected after reset.
Example: Example:
hdmi_receiver@4c { hdmi_receiver@4c {
......
* Mediatek Media Data Path
Media Data Path is used for scaling and color space conversion.
Required properties (controller (parent) node):
- compatible: "mediatek,mt8173-mdp"
- mediatek,vpu: the node of video processor unit, see
Documentation/devicetree/bindings/media/mediatek-vpu.txt for details.
Required properties (all function blocks, child node):
- compatible: Should be one of
"mediatek,mt8173-mdp-rdma" - read DMA
"mediatek,mt8173-mdp-rsz" - resizer
"mediatek,mt8173-mdp-wdma" - write DMA
"mediatek,mt8173-mdp-wrot" - write DMA with rotation
- reg: Physical base address and length of the function block register space
- clocks: device clocks, see
Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
- power-domains: a phandle to the power domain, see
Documentation/devicetree/bindings/power/power_domain.txt for details.
Required properties (DMA function blocks, child node):
- compatible: Should be one of
"mediatek,mt8173-mdp-rdma"
"mediatek,mt8173-mdp-wdma"
"mediatek,mt8173-mdp-wrot"
- iommus: should point to the respective IOMMU block with master port as
argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
for details.
- mediatek,larb: must contain the local arbiters in the current Socs, see
Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt
for details.
Example:
mdp {
compatible = "mediatek,mt8173-mdp";
#address-cells = <2>;
#size-cells = <2>;
ranges;
mediatek,vpu = <&vpu>;
mdp_rdma0: rdma@14001000 {
compatible = "mediatek,mt8173-mdp-rdma";
reg = <0 0x14001000 0 0x1000>;
clocks = <&mmsys CLK_MM_MDP_RDMA0>,
<&mmsys CLK_MM_MUTEX_32K>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
iommus = <&iommu M4U_PORT_MDP_RDMA0>;
mediatek,larb = <&larb0>;
};
mdp_rdma1: rdma@14002000 {
compatible = "mediatek,mt8173-mdp-rdma";
reg = <0 0x14002000 0 0x1000>;
clocks = <&mmsys CLK_MM_MDP_RDMA1>,
<&mmsys CLK_MM_MUTEX_32K>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
iommus = <&iommu M4U_PORT_MDP_RDMA1>;
mediatek,larb = <&larb4>;
};
mdp_rsz0: rsz@14003000 {
compatible = "mediatek,mt8173-mdp-rsz";
reg = <0 0x14003000 0 0x1000>;
clocks = <&mmsys CLK_MM_MDP_RSZ0>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
};
mdp_rsz1: rsz@14004000 {
compatible = "mediatek,mt8173-mdp-rsz";
reg = <0 0x14004000 0 0x1000>;
clocks = <&mmsys CLK_MM_MDP_RSZ1>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
};
mdp_rsz2: rsz@14005000 {
compatible = "mediatek,mt8173-mdp-rsz";
reg = <0 0x14005000 0 0x1000>;
clocks = <&mmsys CLK_MM_MDP_RSZ2>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
};
mdp_wdma0: wdma@14006000 {
compatible = "mediatek,mt8173-mdp-wdma";
reg = <0 0x14006000 0 0x1000>;
clocks = <&mmsys CLK_MM_MDP_WDMA>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
iommus = <&iommu M4U_PORT_MDP_WDMA>;
mediatek,larb = <&larb0>;
};
mdp_wrot0: wrot@14007000 {
compatible = "mediatek,mt8173-mdp-wrot";
reg = <0 0x14007000 0 0x1000>;
clocks = <&mmsys CLK_MM_MDP_WROT0>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
iommus = <&iommu M4U_PORT_MDP_WROT0>;
mediatek,larb = <&larb0>;
};
mdp_wrot1: wrot@14008000 {
compatible = "mediatek,mt8173-mdp-wrot";
reg = <0 0x14008000 0 0x1000>;
clocks = <&mmsys CLK_MM_MDP_WROT1>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_MM>;
iommus = <&iommu M4U_PORT_MDP_WROT1>;
mediatek,larb = <&larb4>;
};
};
Mediatek Video Codec Mediatek Video Codec
Mediatek Video Codec is the video codec hw present in Mediatek SoCs which Mediatek Video Codec is the video codec hw present in Mediatek SoCs which
supports high resolution encoding functionalities. supports high resolution encoding and decoding functionalities.
Required properties: Required properties:
- compatible : "mediatek,mt8173-vcodec-enc" for encoder - compatible : "mediatek,mt8173-vcodec-enc" for encoder
"mediatek,mt8173-vcodec-dec" for decoder.
- reg : Physical base address of the video codec registers and length of - reg : Physical base address of the video codec registers and length of
memory mapped region. memory mapped region.
- interrupts : interrupt number to the cpu. - interrupts : interrupt number to the cpu.
- mediatek,larb : must contain the local arbiters in the current Socs. - mediatek,larb : must contain the local arbiters in the current Socs.
- clocks : list of clock specifiers, corresponding to entries in - clocks : list of clock specifiers, corresponding to entries in
the clock-names property. the clock-names property.
- clock-names: encoder must contain "venc_sel_src", "venc_sel", - clock-names: encoder must contain "venc_sel_src", "venc_sel",,
- "venc_lt_sel_src", "venc_lt_sel". "venc_lt_sel_src", "venc_lt_sel", decoder must contain "vcodecpll",
"univpll_d2", "clk_cci400_sel", "vdec_sel", "vdecpll", "vencpll",
"venc_lt_sel", "vdec_bus_clk_src".
- iommus : should point to the respective IOMMU block with master port as - iommus : should point to the respective IOMMU block with master port as
argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
for details. for details.
- mediatek,vpu : the node of video processor unit - mediatek,vpu : the node of video processor unit
Example: Example:
vcodec_enc: vcodec@0x18002000 {
vcodec_dec: vcodec@16000000 {
compatible = "mediatek,mt8173-vcodec-dec";
reg = <0 0x16000000 0 0x100>, /*VDEC_SYS*/
<0 0x16020000 0 0x1000>, /*VDEC_MISC*/
<0 0x16021000 0 0x800>, /*VDEC_LD*/
<0 0x16021800 0 0x800>, /*VDEC_TOP*/
<0 0x16022000 0 0x1000>, /*VDEC_CM*/
<0 0x16023000 0 0x1000>, /*VDEC_AD*/
<0 0x16024000 0 0x1000>, /*VDEC_AV*/
<0 0x16025000 0 0x1000>, /*VDEC_PP*/
<0 0x16026800 0 0x800>, /*VP8_VD*/
<0 0x16027000 0 0x800>, /*VP6_VD*/
<0 0x16027800 0 0x800>, /*VP8_VL*/
<0 0x16028400 0 0x400>; /*VP9_VD*/
interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_LOW>;
mediatek,larb = <&larb1>;
iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
<&iommu M4U_PORT_HW_VDEC_PP_EXT>,
<&iommu M4U_PORT_HW_VDEC_AVC_MV_EXT>,
<&iommu M4U_PORT_HW_VDEC_PRED_RD_EXT>,
<&iommu M4U_PORT_HW_VDEC_PRED_WR_EXT>,
<&iommu M4U_PORT_HW_VDEC_UFO_EXT>,
<&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
<&iommu M4U_PORT_HW_VDEC_VLD2_EXT>;
mediatek,vpu = <&vpu>;
power-domains = <&scpsys MT8173_POWER_DOMAIN_VDEC>;
clocks = <&apmixedsys CLK_APMIXED_VCODECPLL>,
<&topckgen CLK_TOP_UNIVPLL_D2>,
<&topckgen CLK_TOP_CCI400_SEL>,
<&topckgen CLK_TOP_VDEC_SEL>,
<&topckgen CLK_TOP_VCODECPLL>,
<&apmixedsys CLK_APMIXED_VENCPLL>,
<&topckgen CLK_TOP_VENC_LT_SEL>,
<&topckgen CLK_TOP_VCODECPLL_370P5>;
clock-names = "vcodecpll",
"univpll_d2",
"clk_cci400_sel",
"vdec_sel",
"vdecpll",
"vencpll",
"venc_lt_sel",
"vdec_bus_clk_src";
};
vcodec_enc: vcodec@0x18002000 {
compatible = "mediatek,mt8173-vcodec-enc"; compatible = "mediatek,mt8173-vcodec-enc";
reg = <0 0x18002000 0 0x1000>, /*VENC_SYS*/ reg = <0 0x18002000 0 0x1000>, /*VENC_SYS*/
<0 0x19002000 0 0x1000>; /*VENC_LT_SYS*/ <0 0x19002000 0 0x1000>; /*VENC_LT_SYS*/
......
Renesas R-Car Fine Display Processor (FDP1)
-------------------------------------------
The FDP1 is a de-interlacing module which converts interlaced video to
progressive video. It is capable of performing pixel format conversion between
YCbCr/YUV formats and RGB formats. Only YCbCr/YUV formats are supported as
an input to the module.
Required properties:
- compatible: must be "renesas,fdp1"
- reg: the register base and size for the device registers
- interrupts : interrupt specifier for the FDP1 instance
- clocks: reference to the functional clock
Optional properties:
- power-domains: reference to the power domain that the FDP1 belongs to, if
any.
- renesas,fcp: a phandle referencing the FCP that handles memory accesses
for the FDP1. Not needed on Gen2, mandatory on Gen3.
Please refer to the binding documentation for the clock and/or power domain
providers for more details.
Device node example
-------------------
fdp1@fe940000 {
compatible = "renesas,fdp1";
reg = <0 0xfe940000 0 0x2400>;
interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 119>;
power-domains = <&sysc R8A7795_PD_A3VP>;
renesas,fcp = <&fcpf0>;
};
...@@ -12,6 +12,7 @@ Required properties: ...@@ -12,6 +12,7 @@ Required properties:
(b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs
(c) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC (c) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC
(d) "samsung,mfc-v8" for MFC v8 present in Exynos5800 SoC (d) "samsung,mfc-v8" for MFC v8 present in Exynos5800 SoC
(e) "samsung,exynos5433-mfc" for MFC v8 present in Exynos5433 SoC
- reg : Physical base address of the IP registers and length of memory - reg : Physical base address of the IP registers and length of memory
mapped region. mapped region.
......
...@@ -88,7 +88,7 @@ $(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2. ...@@ -88,7 +88,7 @@ $(BUILDDIR)/videodev2.h.rst: ${UAPI}/videodev2.h ${PARSER} $(SRC_DIR)/videodev2.
$(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions $(BUILDDIR)/media.h.rst: ${UAPI}/media.h ${PARSER} $(SRC_DIR)/media.h.rst.exceptions
@$($(quiet)gen_rst) @$($(quiet)gen_rst)
$(BUILDDIR)/cec.h.rst: ${KAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions $(BUILDDIR)/cec.h.rst: ${UAPI}/cec.h ${PARSER} $(SRC_DIR)/cec.h.rst.exceptions
@$($(quiet)gen_rst) @$($(quiet)gen_rst)
$(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions $(BUILDDIR)/lirc.h.rst: ${UAPI}/lirc.h ${PARSER} $(SRC_DIR)/lirc.h.rst.exceptions
......
...@@ -37,9 +37,8 @@ The struct cec_adapter represents the CEC adapter hardware. It is created by ...@@ -37,9 +37,8 @@ The struct cec_adapter represents the CEC adapter hardware. It is created by
calling cec_allocate_adapter() and deleted by calling cec_delete_adapter(): calling cec_allocate_adapter() and deleted by calling cec_delete_adapter():
.. c:function:: .. c:function::
struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, void *priv,
void *priv, const char *name, u32 caps, u8 available_las, const char *name, u32 caps, u8 available_las);
struct device *parent);
.. c:function:: .. c:function::
void cec_delete_adapter(struct cec_adapter *adap); void cec_delete_adapter(struct cec_adapter *adap);
...@@ -66,20 +65,19 @@ available_las: ...@@ -66,20 +65,19 @@ available_las:
the number of simultaneous logical addresses that this the number of simultaneous logical addresses that this
adapter can handle. Must be 1 <= available_las <= CEC_MAX_LOG_ADDRS. adapter can handle. Must be 1 <= available_las <= CEC_MAX_LOG_ADDRS.
parent:
the parent device.
To register the /dev/cecX device node and the remote control device (if To register the /dev/cecX device node and the remote control device (if
CEC_CAP_RC is set) you call: CEC_CAP_RC is set) you call:
.. c:function:: .. c:function::
int cec_register_adapter(struct cec_adapter \*adap); int cec_register_adapter(struct cec_adapter *adap, struct device *parent);
where parent is the parent device.
To unregister the devices call: To unregister the devices call:
.. c:function:: .. c:function::
void cec_unregister_adapter(struct cec_adapter \*adap); void cec_unregister_adapter(struct cec_adapter *adap);
Note: if cec_register_adapter() fails, then call cec_delete_adapter() to Note: if cec_register_adapter() fails, then call cec_delete_adapter() to
clean up. But if cec_register_adapter() succeeded, then only call clean up. But if cec_register_adapter() succeeded, then only call
...@@ -106,13 +104,13 @@ your driver: ...@@ -106,13 +104,13 @@ your driver:
int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr); int (*adap_log_addr)(struct cec_adapter *adap, u8 logical_addr);
int (*adap_transmit)(struct cec_adapter *adap, u8 attempts, int (*adap_transmit)(struct cec_adapter *adap, u8 attempts,
u32 signal_free_time, struct cec_msg *msg); u32 signal_free_time, struct cec_msg *msg);
void (\*adap_log_status)(struct cec_adapter *adap); void (*adap_status)(struct cec_adapter *adap, struct seq_file *file);
/* High-level callbacks */ /* High-level callbacks */
... ...
}; };
The three low-level ops deal with various aspects of controlling the CEC adapter The five low-level ops deal with various aspects of controlling the CEC adapter
hardware: hardware:
...@@ -238,6 +236,18 @@ When a CEC message was received: ...@@ -238,6 +236,18 @@ When a CEC message was received:
Speaks for itself. Speaks for itself.
Implementing the interrupt handler
----------------------------------
Typically the CEC hardware provides interrupts that signal when a transmit
finished and whether it was successful or not, and it provides and interrupt
when a CEC message was received.
The CEC driver should always process the transmit interrupts first before
handling the receive interrupt. The framework expects to see the cec_transmit_done
call before the cec_received_msg call, otherwise it can get confused if the
received message was in reply to the transmitted message.
Implementing the High-Level CEC Adapter Implementing the High-Level CEC Adapter
--------------------------------------- ---------------------------------------
...@@ -247,11 +257,11 @@ CEC protocol driven. The following high-level callbacks are available: ...@@ -247,11 +257,11 @@ CEC protocol driven. The following high-level callbacks are available:
.. code-block:: none .. code-block:: none
struct cec_adap_ops { struct cec_adap_ops {
/\* Low-level callbacks \*/ /* Low-level callbacks */
... ...
/\* High-level CEC message callback \*/ /* High-level CEC message callback */
int (\*received)(struct cec_adapter \*adap, struct cec_msg \*msg); int (*received)(struct cec_adapter *adap, struct cec_msg *msg);
}; };
The received() callback allows the driver to optionally handle a newly The received() callback allows the driver to optionally handle a newly
...@@ -263,7 +273,7 @@ received CEC message ...@@ -263,7 +273,7 @@ received CEC message
If the driver wants to process a CEC message, then it can implement this If the driver wants to process a CEC message, then it can implement this
callback. If it doesn't want to handle this message, then it should return callback. If it doesn't want to handle this message, then it should return
-ENOMSG, otherwise the CEC framework assumes it processed this message and -ENOMSG, otherwise the CEC framework assumes it processed this message and
it will not no anything with it. it will not do anything with it.
CEC framework functions CEC framework functions
......
MIPI CSI-2
==========
CSI-2 is a data bus intended for transferring images from cameras to
the host SoC. It is defined by the `MIPI alliance`_.
.. _`MIPI alliance`: http://www.mipi.org/
Transmitter drivers
-------------------
CSI-2 transmitter, such as a sensor or a TV tuner, drivers need to
provide the CSI-2 receiver with information on the CSI-2 bus
configuration. These include the V4L2_CID_LINK_FREQ and
V4L2_CID_PIXEL_RATE controls and
(:c:type:`v4l2_subdev_video_ops`->s_stream() callback). These
interface elements must be present on the sub-device represents the
CSI-2 transmitter.
The V4L2_CID_LINK_FREQ control is used to tell the receiver driver the
frequency (and not the symbol rate) of the link. The
V4L2_CID_PIXEL_RATE is may be used by the receiver to obtain the pixel
rate the transmitter uses. The
:c:type:`v4l2_subdev_video_ops`->s_stream() callback provides an
ability to start and stop the stream.
The value of the V4L2_CID_PIXEL_RATE is calculated as follows::
pixel_rate = link_freq * 2 * nr_of_lanes / bits_per_sample
where
.. list-table:: variables in pixel rate calculation
:header-rows: 1
* - variable or constant
- description
* - link_freq
- The value of the V4L2_CID_LINK_FREQ integer64 menu item.
* - nr_of_lanes
- Number of data lanes used on the CSI-2 link. This can
be obtained from the OF endpoint configuration.
* - 2
- Two bits are transferred per clock cycle per lane.
* - bits_per_sample
- Number of bits per sample.
The transmitter drivers must configure the CSI-2 transmitter to *LP-11
mode* whenever the transmitter is powered on but not active. Some
transmitters do this automatically but some have to be explicitly
programmed to do so.
Receiver drivers
----------------
Before the receiver driver may enable the CSI-2 transmitter by using
the :c:type:`v4l2_subdev_video_ops`->s_stream(), it must have powered
the transmitter up by using the
:c:type:`v4l2_subdev_core_ops`->s_power() callback. This may take
place either indirectly by using :c:func:`v4l2_pipeline_pm_use` or
directly.
...@@ -8,14 +8,6 @@ Digital TV Common functions ...@@ -8,14 +8,6 @@ Digital TV Common functions
.. kernel-doc:: drivers/media/dvb-core/dvbdev.h .. kernel-doc:: drivers/media/dvb-core/dvbdev.h
.. kernel-doc:: drivers/media/dvb-core/dvb_math.h
:export: drivers/media/dvb-core/dvb_math.c
.. kernel-doc:: drivers/media/dvb-core/dvbdev.h
:export: drivers/media/dvb-core/dvbdev.c
Digital TV Ring buffer Digital TV Ring buffer
---------------------- ----------------------
......
...@@ -33,3 +33,4 @@ For more details see the file COPYING in the source distribution of Linux. ...@@ -33,3 +33,4 @@ For more details see the file COPYING in the source distribution of Linux.
kapi/rc-core kapi/rc-core
kapi/mc-core kapi/mc-core
kapi/cec-core kapi/cec-core
kapi/csi2
...@@ -48,39 +48,19 @@ returns the information to the application. The ioctl never fails. ...@@ -48,39 +48,19 @@ returns the information to the application. The ioctl never fails.
:stub-columns: 0 :stub-columns: 0
:widths: 1 1 16 :widths: 1 1 16
* - char
- .. row 1
- char
- ``driver[32]`` - ``driver[32]``
- The name of the cec adapter driver. - The name of the cec adapter driver.
* - char
- .. row 2
- char
- ``name[32]`` - ``name[32]``
- The name of this CEC adapter. The combination ``driver`` and - The name of this CEC adapter. The combination ``driver`` and
``name`` must be unique. ``name`` must be unique.
* - __u32
- .. row 3
- __u32
- ``capabilities`` - ``capabilities``
- The capabilities of the CEC adapter, see - The capabilities of the CEC adapter, see
:ref:`cec-capabilities`. :ref:`cec-capabilities`.
* - __u32
- .. row 4
- __u32
- ``version`` - ``version``
- CEC Framework API version, formatted with the ``KERNEL_VERSION()`` - CEC Framework API version, formatted with the ``KERNEL_VERSION()``
macro. macro.
...@@ -94,66 +74,48 @@ returns the information to the application. The ioctl never fails. ...@@ -94,66 +74,48 @@ returns the information to the application. The ioctl never fails.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 8 :widths: 3 1 8
* .. _`CEC-CAP-PHYS-ADDR`:
- .. _`CEC-CAP-PHYS-ADDR`:
- ``CEC_CAP_PHYS_ADDR`` - ``CEC_CAP_PHYS_ADDR``
- 0x00000001 - 0x00000001
- Userspace has to configure the physical address by calling - Userspace has to configure the physical address by calling
:ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`. If
this capability isn't set, then setting the physical address is this capability isn't set, then setting the physical address is
handled by the kernel whenever the EDID is set (for an HDMI handled by the kernel whenever the EDID is set (for an HDMI
receiver) or read (for an HDMI transmitter). receiver) or read (for an HDMI transmitter).
* .. _`CEC-CAP-LOG-ADDRS`:
- .. _`CEC-CAP-LOG-ADDRS`:
- ``CEC_CAP_LOG_ADDRS`` - ``CEC_CAP_LOG_ADDRS``
- 0x00000002 - 0x00000002
- Userspace has to configure the logical addresses by calling - Userspace has to configure the logical addresses by calling
:ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. If
this capability isn't set, then the kernel will have configured this capability isn't set, then the kernel will have configured
this. this.
* .. _`CEC-CAP-TRANSMIT`:
- .. _`CEC-CAP-TRANSMIT`:
- ``CEC_CAP_TRANSMIT`` - ``CEC_CAP_TRANSMIT``
- 0x00000004 - 0x00000004
- Userspace can transmit CEC messages by calling - Userspace can transmit CEC messages by calling
:ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. This implies that
userspace can be a follower as well, since being able to transmit userspace can be a follower as well, since being able to transmit
messages is a prerequisite of becoming a follower. If this messages is a prerequisite of becoming a follower. If this
capability isn't set, then the kernel will handle all CEC capability isn't set, then the kernel will handle all CEC
transmits and process all CEC messages it receives. transmits and process all CEC messages it receives.
* .. _`CEC-CAP-PASSTHROUGH`:
- .. _`CEC-CAP-PASSTHROUGH`:
- ``CEC_CAP_PASSTHROUGH`` - ``CEC_CAP_PASSTHROUGH``
- 0x00000008 - 0x00000008
- Userspace can use the passthrough mode by calling - Userspace can use the passthrough mode by calling
:ref:`ioctl CEC_S_MODE <CEC_S_MODE>`. :ref:`ioctl CEC_S_MODE <CEC_S_MODE>`.
* .. _`CEC-CAP-RC`:
- .. _`CEC-CAP-RC`:
- ``CEC_CAP_RC`` - ``CEC_CAP_RC``
- 0x00000010 - 0x00000010
- This adapter supports the remote control protocol. - This adapter supports the remote control protocol.
* .. _`CEC-CAP-MONITOR-ALL`:
- .. _`CEC-CAP-MONITOR-ALL`:
- ``CEC_CAP_MONITOR_ALL`` - ``CEC_CAP_MONITOR_ALL``
- 0x00000020 - 0x00000020
- The CEC hardware can monitor all messages, not just directed and - The CEC hardware can monitor all messages, not just directed and
broadcast messages. broadcast messages.
......
...@@ -77,48 +77,28 @@ logical address types are already defined will return with error ``EBUSY``. ...@@ -77,48 +77,28 @@ logical address types are already defined will return with error ``EBUSY``.
:stub-columns: 0 :stub-columns: 0
:widths: 1 1 16 :widths: 1 1 16
* - __u8
- .. row 1
- __u8
- ``log_addr[CEC_MAX_LOG_ADDRS]`` - ``log_addr[CEC_MAX_LOG_ADDRS]``
- The actual logical addresses that were claimed. This is set by the - The actual logical addresses that were claimed. This is set by the
driver. If no logical address could be claimed, then it is set to driver. If no logical address could be claimed, then it is set to
``CEC_LOG_ADDR_INVALID``. If this adapter is Unregistered, then ``CEC_LOG_ADDR_INVALID``. If this adapter is Unregistered, then
``log_addr[0]`` is set to 0xf and all others to ``log_addr[0]`` is set to 0xf and all others to
``CEC_LOG_ADDR_INVALID``. ``CEC_LOG_ADDR_INVALID``.
* - __u16
- .. row 2
- __u16
- ``log_addr_mask`` - ``log_addr_mask``
- The bitmask of all logical addresses this adapter has claimed. If - The bitmask of all logical addresses this adapter has claimed. If
this adapter is Unregistered then ``log_addr_mask`` sets bit 15 this adapter is Unregistered then ``log_addr_mask`` sets bit 15
and clears all other bits. If this adapter is not configured at and clears all other bits. If this adapter is not configured at
all, then ``log_addr_mask`` is set to 0. Set by the driver. all, then ``log_addr_mask`` is set to 0. Set by the driver.
* - __u8
- .. row 3
- __u8
- ``cec_version`` - ``cec_version``
- The CEC version that this adapter shall use. See - The CEC version that this adapter shall use. See
:ref:`cec-versions`. Used to implement the :ref:`cec-versions`. Used to implement the
``CEC_MSG_CEC_VERSION`` and ``CEC_MSG_REPORT_FEATURES`` messages. ``CEC_MSG_CEC_VERSION`` and ``CEC_MSG_REPORT_FEATURES`` messages.
Note that :ref:`CEC_OP_CEC_VERSION_1_3A <CEC-OP-CEC-VERSION-1-3A>` is not allowed by the CEC Note that :ref:`CEC_OP_CEC_VERSION_1_3A <CEC-OP-CEC-VERSION-1-3A>` is not allowed by the CEC
framework. framework.
* - __u8
- .. row 4
- __u8
- ``num_log_addrs`` - ``num_log_addrs``
- Number of logical addresses to set up. Must be ≤ - Number of logical addresses to set up. Must be ≤
``available_log_addrs`` as returned by ``available_log_addrs`` as returned by
:ref:`CEC_ADAP_G_CAPS`. All arrays in :ref:`CEC_ADAP_G_CAPS`. All arrays in
...@@ -131,74 +111,39 @@ logical address types are already defined will return with error ``EBUSY``. ...@@ -131,74 +111,39 @@ logical address types are already defined will return with error ``EBUSY``.
what was requested. If this field is set to 0, then the CEC what was requested. If this field is set to 0, then the CEC
adapter shall clear all claimed logical addresses and all other adapter shall clear all claimed logical addresses and all other
fields will be ignored. fields will be ignored.
* - __u32
- .. row 5
- __u32
- ``vendor_id`` - ``vendor_id``
- The vendor ID is a 24-bit number that identifies the specific - The vendor ID is a 24-bit number that identifies the specific
vendor or entity. Based on this ID vendor specific commands may be vendor or entity. Based on this ID vendor specific commands may be
defined. If you do not want a vendor ID then set it to defined. If you do not want a vendor ID then set it to
``CEC_VENDOR_ID_NONE``. ``CEC_VENDOR_ID_NONE``.
* - __u32
- .. row 6
- __u32
- ``flags`` - ``flags``
- Flags. See :ref:`cec-log-addrs-flags` for a list of available flags. - Flags. See :ref:`cec-log-addrs-flags` for a list of available flags.
* - char
- .. row 7
- char
- ``osd_name[15]`` - ``osd_name[15]``
- The On-Screen Display name as is returned by the - The On-Screen Display name as is returned by the
``CEC_MSG_SET_OSD_NAME`` message. ``CEC_MSG_SET_OSD_NAME`` message.
* - __u8
- .. row 8
- __u8
- ``primary_device_type[CEC_MAX_LOG_ADDRS]`` - ``primary_device_type[CEC_MAX_LOG_ADDRS]``
- Primary device type for each logical address. See - Primary device type for each logical address. See
:ref:`cec-prim-dev-types` for possible types. :ref:`cec-prim-dev-types` for possible types.
* - __u8
- .. row 9
- __u8
- ``log_addr_type[CEC_MAX_LOG_ADDRS]`` - ``log_addr_type[CEC_MAX_LOG_ADDRS]``
- Logical address types. See :ref:`cec-log-addr-types` for - Logical address types. See :ref:`cec-log-addr-types` for
possible types. The driver will update this with the actual possible types. The driver will update this with the actual
logical address type that it claimed (e.g. it may have to fallback logical address type that it claimed (e.g. it may have to fallback
to :ref:`CEC_LOG_ADDR_TYPE_UNREGISTERED <CEC-LOG-ADDR-TYPE-UNREGISTERED>`). to :ref:`CEC_LOG_ADDR_TYPE_UNREGISTERED <CEC-LOG-ADDR-TYPE-UNREGISTERED>`).
* - __u8
- .. row 10
- __u8
- ``all_device_types[CEC_MAX_LOG_ADDRS]`` - ``all_device_types[CEC_MAX_LOG_ADDRS]``
- CEC 2.0 specific: the bit mask of all device types. See - CEC 2.0 specific: the bit mask of all device types. See
:ref:`cec-all-dev-types-flags`. It is used in the CEC 2.0 :ref:`cec-all-dev-types-flags`. It is used in the CEC 2.0
``CEC_MSG_REPORT_FEATURES`` message. For CEC 1.4 you can either leave ``CEC_MSG_REPORT_FEATURES`` message. For CEC 1.4 you can either leave
this field to 0, or fill it in according to the CEC 2.0 guidelines to this field to 0, or fill it in according to the CEC 2.0 guidelines to
give the CEC framework more information about the device type, even give the CEC framework more information about the device type, even
though the framework won't use it directly in the CEC message. though the framework won't use it directly in the CEC message.
* - __u8
- .. row 11
- __u8
- ``features[CEC_MAX_LOG_ADDRS][12]`` - ``features[CEC_MAX_LOG_ADDRS][12]``
- Features for each logical address. It is used in the CEC 2.0 - Features for each logical address. It is used in the CEC 2.0
``CEC_MSG_REPORT_FEATURES`` message. The 12 bytes include both the ``CEC_MSG_REPORT_FEATURES`` message. The 12 bytes include both the
RC Profile and the Device Features. For CEC 1.4 you can either leave RC Profile and the Device Features. For CEC 1.4 you can either leave
...@@ -213,17 +158,33 @@ logical address types are already defined will return with error ``EBUSY``. ...@@ -213,17 +158,33 @@ logical address types are already defined will return with error ``EBUSY``.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 4 :widths: 3 1 4
* .. _`CEC-LOG-ADDRS-FL-ALLOW-UNREG-FALLBACK`:
- .. _`CEC-LOG-ADDRS-FL-ALLOW-UNREG-FALLBACK`:
- ``CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK`` - ``CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK``
- 1 - 1
- By default if no logical address of the requested type can be claimed, then - By default if no logical address of the requested type can be claimed, then
it will go back to the unconfigured state. If this flag is set, then it will it will go back to the unconfigured state. If this flag is set, then it will
fallback to the Unregistered logical address. Note that if the Unregistered fallback to the Unregistered logical address. Note that if the Unregistered
logical address was explicitly requested, then this flag has no effect. logical address was explicitly requested, then this flag has no effect.
* .. _`CEC-LOG-ADDRS-FL-ALLOW-RC-PASSTHRU`:
- ``CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU``
- 2
- By default the ``CEC_MSG_USER_CONTROL_PRESSED`` and ``CEC_MSG_USER_CONTROL_RELEASED``
messages are only passed on to the follower(s), if any. If this flag is set,
then these messages are also passed on to the remote control input subsystem
and will appear as keystrokes. This features needs to be enabled explicitly.
If CEC is used to enter e.g. passwords, then you may not want to enable this
to avoid trivial snooping of the keystrokes.
* .. _`CEC-LOG-ADDRS-FL-CDC-ONLY`:
- `CEC_LOG_ADDRS_FL_CDC_ONLY`
- 4
- If this flag is set, then the device is CDC-Only. CDC-Only CEC devices
are CEC devices that can only handle CDC messages.
All other messages are ignored.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
...@@ -234,29 +195,20 @@ logical address types are already defined will return with error ``EBUSY``. ...@@ -234,29 +195,20 @@ logical address types are already defined will return with error ``EBUSY``.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 4 :widths: 3 1 4
* .. _`CEC-OP-CEC-VERSION-1-3A`:
- .. _`CEC-OP-CEC-VERSION-1-3A`:
- ``CEC_OP_CEC_VERSION_1_3A`` - ``CEC_OP_CEC_VERSION_1_3A``
- 4 - 4
- CEC version according to the HDMI 1.3a standard. - CEC version according to the HDMI 1.3a standard.
* .. _`CEC-OP-CEC-VERSION-1-4B`:
- .. _`CEC-OP-CEC-VERSION-1-4B`:
- ``CEC_OP_CEC_VERSION_1_4B`` - ``CEC_OP_CEC_VERSION_1_4B``
- 5 - 5
- CEC version according to the HDMI 1.4b standard. - CEC version according to the HDMI 1.4b standard.
* .. _`CEC-OP-CEC-VERSION-2-0`:
- .. _`CEC-OP-CEC-VERSION-2-0`:
- ``CEC_OP_CEC_VERSION_2_0`` - ``CEC_OP_CEC_VERSION_2_0``
- 6 - 6
- CEC version according to the HDMI 2.0 standard. - CEC version according to the HDMI 2.0 standard.
...@@ -269,61 +221,40 @@ logical address types are already defined will return with error ``EBUSY``. ...@@ -269,61 +221,40 @@ logical address types are already defined will return with error ``EBUSY``.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 4 :widths: 3 1 4
* .. _`CEC-OP-PRIM-DEVTYPE-TV`:
- .. _`CEC-OP-PRIM-DEVTYPE-TV`:
- ``CEC_OP_PRIM_DEVTYPE_TV`` - ``CEC_OP_PRIM_DEVTYPE_TV``
- 0 - 0
- Use for a TV. - Use for a TV.
* .. _`CEC-OP-PRIM-DEVTYPE-RECORD`:
- .. _`CEC-OP-PRIM-DEVTYPE-RECORD`:
- ``CEC_OP_PRIM_DEVTYPE_RECORD`` - ``CEC_OP_PRIM_DEVTYPE_RECORD``
- 1 - 1
- Use for a recording device. - Use for a recording device.
* .. _`CEC-OP-PRIM-DEVTYPE-TUNER`:
- .. _`CEC-OP-PRIM-DEVTYPE-TUNER`:
- ``CEC_OP_PRIM_DEVTYPE_TUNER`` - ``CEC_OP_PRIM_DEVTYPE_TUNER``
- 3 - 3
- Use for a device with a tuner. - Use for a device with a tuner.
* .. _`CEC-OP-PRIM-DEVTYPE-PLAYBACK`:
- .. _`CEC-OP-PRIM-DEVTYPE-PLAYBACK`:
- ``CEC_OP_PRIM_DEVTYPE_PLAYBACK`` - ``CEC_OP_PRIM_DEVTYPE_PLAYBACK``
- 4 - 4
- Use for a playback device. - Use for a playback device.
* .. _`CEC-OP-PRIM-DEVTYPE-AUDIOSYSTEM`:
- .. _`CEC-OP-PRIM-DEVTYPE-AUDIOSYSTEM`:
- ``CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM`` - ``CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM``
- 5 - 5
- Use for an audio system (e.g. an audio/video receiver). - Use for an audio system (e.g. an audio/video receiver).
* .. _`CEC-OP-PRIM-DEVTYPE-SWITCH`:
- .. _`CEC-OP-PRIM-DEVTYPE-SWITCH`:
- ``CEC_OP_PRIM_DEVTYPE_SWITCH`` - ``CEC_OP_PRIM_DEVTYPE_SWITCH``
- 6 - 6
- Use for a CEC switch. - Use for a CEC switch.
* .. _`CEC-OP-PRIM-DEVTYPE-VIDEOPROC`:
- .. _`CEC-OP-PRIM-DEVTYPE-VIDEOPROC`:
- ``CEC_OP_PRIM_DEVTYPE_VIDEOPROC`` - ``CEC_OP_PRIM_DEVTYPE_VIDEOPROC``
- 7 - 7
- Use for a video processor device. - Use for a video processor device.
...@@ -336,61 +267,40 @@ logical address types are already defined will return with error ``EBUSY``. ...@@ -336,61 +267,40 @@ logical address types are already defined will return with error ``EBUSY``.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 16 :widths: 3 1 16
* .. _`CEC-LOG-ADDR-TYPE-TV`:
- .. _`CEC-LOG-ADDR-TYPE-TV`:
- ``CEC_LOG_ADDR_TYPE_TV`` - ``CEC_LOG_ADDR_TYPE_TV``
- 0 - 0
- Use for a TV. - Use for a TV.
* .. _`CEC-LOG-ADDR-TYPE-RECORD`:
- .. _`CEC-LOG-ADDR-TYPE-RECORD`:
- ``CEC_LOG_ADDR_TYPE_RECORD`` - ``CEC_LOG_ADDR_TYPE_RECORD``
- 1 - 1
- Use for a recording device. - Use for a recording device.
* .. _`CEC-LOG-ADDR-TYPE-TUNER`:
- .. _`CEC-LOG-ADDR-TYPE-TUNER`:
- ``CEC_LOG_ADDR_TYPE_TUNER`` - ``CEC_LOG_ADDR_TYPE_TUNER``
- 2 - 2
- Use for a tuner device. - Use for a tuner device.
* .. _`CEC-LOG-ADDR-TYPE-PLAYBACK`:
- .. _`CEC-LOG-ADDR-TYPE-PLAYBACK`:
- ``CEC_LOG_ADDR_TYPE_PLAYBACK`` - ``CEC_LOG_ADDR_TYPE_PLAYBACK``
- 3 - 3
- Use for a playback device. - Use for a playback device.
* .. _`CEC-LOG-ADDR-TYPE-AUDIOSYSTEM`:
- .. _`CEC-LOG-ADDR-TYPE-AUDIOSYSTEM`:
- ``CEC_LOG_ADDR_TYPE_AUDIOSYSTEM`` - ``CEC_LOG_ADDR_TYPE_AUDIOSYSTEM``
- 4 - 4
- Use for an audio system device. - Use for an audio system device.
* .. _`CEC-LOG-ADDR-TYPE-SPECIFIC`:
- .. _`CEC-LOG-ADDR-TYPE-SPECIFIC`:
- ``CEC_LOG_ADDR_TYPE_SPECIFIC`` - ``CEC_LOG_ADDR_TYPE_SPECIFIC``
- 5 - 5
- Use for a second TV or for a video processor device. - Use for a second TV or for a video processor device.
* .. _`CEC-LOG-ADDR-TYPE-UNREGISTERED`:
- .. _`CEC-LOG-ADDR-TYPE-UNREGISTERED`:
- ``CEC_LOG_ADDR_TYPE_UNREGISTERED`` - ``CEC_LOG_ADDR_TYPE_UNREGISTERED``
- 6 - 6
- Use this if you just want to remain unregistered. Used for pure - Use this if you just want to remain unregistered. Used for pure
CEC switches or CDC-only devices (CDC: Capability Discovery and CEC switches or CDC-only devices (CDC: Capability Discovery and
Control). Control).
...@@ -406,53 +316,35 @@ logical address types are already defined will return with error ``EBUSY``. ...@@ -406,53 +316,35 @@ logical address types are already defined will return with error ``EBUSY``.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 4 :widths: 3 1 4
* .. _`CEC-OP-ALL-DEVTYPE-TV`:
- .. _`CEC-OP-ALL-DEVTYPE-TV`:
- ``CEC_OP_ALL_DEVTYPE_TV`` - ``CEC_OP_ALL_DEVTYPE_TV``
- 0x80 - 0x80
- This supports the TV type. - This supports the TV type.
* .. _`CEC-OP-ALL-DEVTYPE-RECORD`:
- .. _`CEC-OP-ALL-DEVTYPE-RECORD`:
- ``CEC_OP_ALL_DEVTYPE_RECORD`` - ``CEC_OP_ALL_DEVTYPE_RECORD``
- 0x40 - 0x40
- This supports the Recording type. - This supports the Recording type.
* .. _`CEC-OP-ALL-DEVTYPE-TUNER`:
- .. _`CEC-OP-ALL-DEVTYPE-TUNER`:
- ``CEC_OP_ALL_DEVTYPE_TUNER`` - ``CEC_OP_ALL_DEVTYPE_TUNER``
- 0x20 - 0x20
- This supports the Tuner type. - This supports the Tuner type.
* .. _`CEC-OP-ALL-DEVTYPE-PLAYBACK`:
- .. _`CEC-OP-ALL-DEVTYPE-PLAYBACK`:
- ``CEC_OP_ALL_DEVTYPE_PLAYBACK`` - ``CEC_OP_ALL_DEVTYPE_PLAYBACK``
- 0x10 - 0x10
- This supports the Playback type. - This supports the Playback type.
* .. _`CEC-OP-ALL-DEVTYPE-AUDIOSYSTEM`:
- .. _`CEC-OP-ALL-DEVTYPE-AUDIOSYSTEM`:
- ``CEC_OP_ALL_DEVTYPE_AUDIOSYSTEM`` - ``CEC_OP_ALL_DEVTYPE_AUDIOSYSTEM``
- 0x08 - 0x08
- This supports the Audio System type. - This supports the Audio System type.
* .. _`CEC-OP-ALL-DEVTYPE-SWITCH`:
- .. _`CEC-OP-ALL-DEVTYPE-SWITCH`:
- ``CEC_OP_ALL_DEVTYPE_SWITCH`` - ``CEC_OP_ALL_DEVTYPE_SWITCH``
- 0x04 - 0x04
- This supports the CEC Switch or Video Processing type. - This supports the CEC Switch or Video Processing type.
......
...@@ -58,22 +58,12 @@ it is guaranteed that the state did change in between the two events. ...@@ -58,22 +58,12 @@ it is guaranteed that the state did change in between the two events.
:stub-columns: 0 :stub-columns: 0
:widths: 1 1 8 :widths: 1 1 8
* - __u16
- .. row 1
- __u16
- ``phys_addr`` - ``phys_addr``
- The current physical address. This is ``CEC_PHYS_ADDR_INVALID`` if no - The current physical address. This is ``CEC_PHYS_ADDR_INVALID`` if no
valid physical address is set. valid physical address is set.
* - __u16
- .. row 2
- __u16
- ``log_addr_mask`` - ``log_addr_mask``
- The current set of claimed logical addresses. This is 0 if no logical - The current set of claimed logical addresses. This is 0 if no logical
addresses are claimed or if ``phys_addr`` is ``CEC_PHYS_ADDR_INVALID``. addresses are claimed or if ``phys_addr`` is ``CEC_PHYS_ADDR_INVALID``.
If bit 15 is set (``1 << CEC_LOG_ADDR_UNREGISTERED``) then this device If bit 15 is set (``1 << CEC_LOG_ADDR_UNREGISTERED``) then this device
...@@ -89,13 +79,8 @@ it is guaranteed that the state did change in between the two events. ...@@ -89,13 +79,8 @@ it is guaranteed that the state did change in between the two events.
:stub-columns: 0 :stub-columns: 0
:widths: 1 1 16 :widths: 1 1 16
* - __u32
- .. row 1
- __u32
- ``lost_msgs`` - ``lost_msgs``
- Set to the number of lost messages since the filehandle was opened - Set to the number of lost messages since the filehandle was opened
or since the last time this event was dequeued for this or since the last time this event was dequeued for this
filehandle. The messages lost are the oldest messages. So when a filehandle. The messages lost are the oldest messages. So when a
...@@ -116,60 +101,30 @@ it is guaranteed that the state did change in between the two events. ...@@ -116,60 +101,30 @@ it is guaranteed that the state did change in between the two events.
:stub-columns: 0 :stub-columns: 0
:widths: 1 1 1 8 :widths: 1 1 1 8
* - __u64
- .. row 1
- __u64
- ``ts`` - ``ts``
- :cspan:`1` Timestamp of the event in ns. - :cspan:`1` Timestamp of the event in ns.
The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access The timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access
the same clock from userspace use :c:func:`clock_gettime`. the same clock from userspace use :c:func:`clock_gettime`.
* - __u32
- .. row 2
- __u32
- ``event`` - ``event``
- :cspan:`1` The CEC event type, see :ref:`cec-events`. - :cspan:`1` The CEC event type, see :ref:`cec-events`.
* - __u32
- .. row 3
- __u32
- ``flags`` - ``flags``
- :cspan:`1` Event flags, see :ref:`cec-event-flags`. - :cspan:`1` Event flags, see :ref:`cec-event-flags`.
* - union
- .. row 4
- union
- (anonymous) - (anonymous)
-
- -
- .. row 5
- -
* -
- struct cec_event_state_change - struct cec_event_state_change
- ``state_change`` - ``state_change``
- The new adapter state as sent by the :ref:`CEC_EVENT_STATE_CHANGE <CEC-EVENT-STATE-CHANGE>` - The new adapter state as sent by the :ref:`CEC_EVENT_STATE_CHANGE <CEC-EVENT-STATE-CHANGE>`
event. event.
* -
- .. row 6
-
- struct cec_event_lost_msgs - struct cec_event_lost_msgs
- ``lost_msgs`` - ``lost_msgs``
- The number of lost messages as sent by the :ref:`CEC_EVENT_LOST_MSGS <CEC-EVENT-LOST-MSGS>` - The number of lost messages as sent by the :ref:`CEC_EVENT_LOST_MSGS <CEC-EVENT-LOST-MSGS>`
event. event.
...@@ -183,23 +138,17 @@ it is guaranteed that the state did change in between the two events. ...@@ -183,23 +138,17 @@ it is guaranteed that the state did change in between the two events.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 16 :widths: 3 1 16
* .. _`CEC-EVENT-STATE-CHANGE`:
- .. _`CEC-EVENT-STATE-CHANGE`:
- ``CEC_EVENT_STATE_CHANGE`` - ``CEC_EVENT_STATE_CHANGE``
- 1 - 1
- Generated when the CEC Adapter's state changes. When open() is - Generated when the CEC Adapter's state changes. When open() is
called an initial event will be generated for that filehandle with called an initial event will be generated for that filehandle with
the CEC Adapter's state at that time. the CEC Adapter's state at that time.
* .. _`CEC-EVENT-LOST-MSGS`:
- .. _`CEC-EVENT-LOST-MSGS`:
- ``CEC_EVENT_LOST_MSGS`` - ``CEC_EVENT_LOST_MSGS``
- 2 - 2
- Generated if one or more CEC messages were lost because the - Generated if one or more CEC messages were lost because the
application didn't dequeue CEC messages fast enough. application didn't dequeue CEC messages fast enough.
...@@ -213,13 +162,10 @@ it is guaranteed that the state did change in between the two events. ...@@ -213,13 +162,10 @@ it is guaranteed that the state did change in between the two events.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 8 :widths: 3 1 8
* .. _`CEC-EVENT-FL-INITIAL-VALUE`:
- .. _`CEC-EVENT-FL-INITIAL-VALUE`:
- ``CEC_EVENT_FL_INITIAL_VALUE`` - ``CEC_EVENT_FL_INITIAL_VALUE``
- 1 - 1
- Set for the initial events that are generated when the device is - Set for the initial events that are generated when the device is
opened. See the table above for which events do this. This allows opened. See the table above for which events do this. This allows
applications to learn the initial state of the CEC adapter at applications to learn the initial state of the CEC adapter at
......
...@@ -83,32 +83,23 @@ Available initiator modes are: ...@@ -83,32 +83,23 @@ Available initiator modes are:
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 16 :widths: 3 1 16
* .. _`CEC-MODE-NO-INITIATOR`:
- .. _`CEC-MODE-NO-INITIATOR`:
- ``CEC_MODE_NO_INITIATOR`` - ``CEC_MODE_NO_INITIATOR``
- 0x0 - 0x0
- This is not an initiator, i.e. it cannot transmit CEC messages or - This is not an initiator, i.e. it cannot transmit CEC messages or
make any other changes to the CEC adapter. make any other changes to the CEC adapter.
* .. _`CEC-MODE-INITIATOR`:
- .. _`CEC-MODE-INITIATOR`:
- ``CEC_MODE_INITIATOR`` - ``CEC_MODE_INITIATOR``
- 0x1 - 0x1
- This is an initiator (the default when the device is opened) and - This is an initiator (the default when the device is opened) and
it can transmit CEC messages and make changes to the CEC adapter, it can transmit CEC messages and make changes to the CEC adapter,
unless there is an exclusive initiator. unless there is an exclusive initiator.
* .. _`CEC-MODE-EXCL-INITIATOR`:
- .. _`CEC-MODE-EXCL-INITIATOR`:
- ``CEC_MODE_EXCL_INITIATOR`` - ``CEC_MODE_EXCL_INITIATOR``
- 0x2 - 0x2
- This is an exclusive initiator and this file descriptor is the - This is an exclusive initiator and this file descriptor is the
only one that can transmit CEC messages and make changes to the only one that can transmit CEC messages and make changes to the
CEC adapter. If someone else is already the exclusive initiator CEC adapter. If someone else is already the exclusive initiator
...@@ -127,45 +118,33 @@ Available follower modes are: ...@@ -127,45 +118,33 @@ Available follower modes are:
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 16 :widths: 3 1 16
* .. _`CEC-MODE-NO-FOLLOWER`:
- .. _`CEC-MODE-NO-FOLLOWER`:
- ``CEC_MODE_NO_FOLLOWER`` - ``CEC_MODE_NO_FOLLOWER``
- 0x00 - 0x00
- This is not a follower (the default when the device is opened). - This is not a follower (the default when the device is opened).
* .. _`CEC-MODE-FOLLOWER`:
- .. _`CEC-MODE-FOLLOWER`:
- ``CEC_MODE_FOLLOWER`` - ``CEC_MODE_FOLLOWER``
- 0x10 - 0x10
- This is a follower and it will receive CEC messages unless there - This is a follower and it will receive CEC messages unless there
is an exclusive follower. You cannot become a follower if is an exclusive follower. You cannot become a follower if
:ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>` is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>` :ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>` is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`
was specified, the ``EINVAL`` error code is returned in that case. was specified, the ``EINVAL`` error code is returned in that case.
* .. _`CEC-MODE-EXCL-FOLLOWER`:
- .. _`CEC-MODE-EXCL-FOLLOWER`:
- ``CEC_MODE_EXCL_FOLLOWER`` - ``CEC_MODE_EXCL_FOLLOWER``
- 0x20 - 0x20
- This is an exclusive follower and only this file descriptor will - This is an exclusive follower and only this file descriptor will
receive CEC messages for processing. If someone else is already receive CEC messages for processing. If someone else is already
the exclusive follower then an attempt to become one will return the exclusive follower then an attempt to become one will return
the ``EBUSY`` error code. You cannot become a follower if the ``EBUSY`` error code. You cannot become a follower if
:ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>` is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>` :ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>` is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`
was specified, the ``EINVAL`` error code is returned in that case. was specified, the ``EINVAL`` error code is returned in that case.
* .. _`CEC-MODE-EXCL-FOLLOWER-PASSTHRU`:
- .. _`CEC-MODE-EXCL-FOLLOWER-PASSTHRU`:
- ``CEC_MODE_EXCL_FOLLOWER_PASSTHRU`` - ``CEC_MODE_EXCL_FOLLOWER_PASSTHRU``
- 0x30 - 0x30
- This is an exclusive follower and only this file descriptor will - This is an exclusive follower and only this file descriptor will
receive CEC messages for processing. In addition it will put the receive CEC messages for processing. In addition it will put the
CEC device into passthrough mode, allowing the exclusive follower CEC device into passthrough mode, allowing the exclusive follower
...@@ -175,13 +154,10 @@ Available follower modes are: ...@@ -175,13 +154,10 @@ Available follower modes are:
code. You cannot become a follower if :ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>` code. You cannot become a follower if :ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>`
is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>` was specified, is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>` was specified,
the ``EINVAL`` error code is returned in that case. the ``EINVAL`` error code is returned in that case.
* .. _`CEC-MODE-MONITOR`:
- .. _`CEC-MODE-MONITOR`:
- ``CEC_MODE_MONITOR`` - ``CEC_MODE_MONITOR``
- 0xe0 - 0xe0
- Put the file descriptor into monitor mode. Can only be used in - Put the file descriptor into monitor mode. Can only be used in
combination with :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`, otherwise EINVAL error combination with :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`, otherwise EINVAL error
code will be returned. In monitor mode all messages this CEC code will be returned. In monitor mode all messages this CEC
...@@ -190,13 +166,10 @@ Available follower modes are: ...@@ -190,13 +166,10 @@ Available follower modes are:
be reported. This is very useful for debugging. This is only be reported. This is very useful for debugging. This is only
allowed if the process has the ``CAP_NET_ADMIN`` capability. If allowed if the process has the ``CAP_NET_ADMIN`` capability. If
that is not set, then the ``EPERM`` error code is returned. that is not set, then the ``EPERM`` error code is returned.
* .. _`CEC-MODE-MONITOR-ALL`:
- .. _`CEC-MODE-MONITOR-ALL`:
- ``CEC_MODE_MONITOR_ALL`` - ``CEC_MODE_MONITOR_ALL``
- 0xf0 - 0xf0
- Put the file descriptor into 'monitor all' mode. Can only be used - Put the file descriptor into 'monitor all' mode. Can only be used
in combination with :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`, otherwise in combination with :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`, otherwise
the ``EINVAL`` error code will be returned. In 'monitor all' mode all messages the ``EINVAL`` error code will be returned. In 'monitor all' mode all messages
...@@ -220,74 +193,56 @@ Core message processing details: ...@@ -220,74 +193,56 @@ Core message processing details:
:stub-columns: 0 :stub-columns: 0
:widths: 1 8 :widths: 1 8
* .. _`CEC-MSG-GET-CEC-VERSION`:
- .. _`CEC-MSG-GET-CEC-VERSION`:
- ``CEC_MSG_GET_CEC_VERSION`` - ``CEC_MSG_GET_CEC_VERSION``
- When in passthrough mode this message has to be handled by - When in passthrough mode this message has to be handled by
userspace, otherwise the core will return the CEC version that was userspace, otherwise the core will return the CEC version that was
set with :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. set with :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`.
* .. _`CEC-MSG-GIVE-DEVICE-VENDOR-ID`:
- .. _`CEC-MSG-GIVE-DEVICE-VENDOR-ID`:
- ``CEC_MSG_GIVE_DEVICE_VENDOR_ID`` - ``CEC_MSG_GIVE_DEVICE_VENDOR_ID``
- When in passthrough mode this message has to be handled by - When in passthrough mode this message has to be handled by
userspace, otherwise the core will return the vendor ID that was userspace, otherwise the core will return the vendor ID that was
set with :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. set with :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`.
* .. _`CEC-MSG-ABORT`:
- .. _`CEC-MSG-ABORT`:
- ``CEC_MSG_ABORT`` - ``CEC_MSG_ABORT``
- When in passthrough mode this message has to be handled by - When in passthrough mode this message has to be handled by
userspace, otherwise the core will return a feature refused userspace, otherwise the core will return a feature refused
message as per the specification. message as per the specification.
* .. _`CEC-MSG-GIVE-PHYSICAL-ADDR`:
- .. _`CEC-MSG-GIVE-PHYSICAL-ADDR`:
- ``CEC_MSG_GIVE_PHYSICAL_ADDR`` - ``CEC_MSG_GIVE_PHYSICAL_ADDR``
- When in passthrough mode this message has to be handled by - When in passthrough mode this message has to be handled by
userspace, otherwise the core will report the current physical userspace, otherwise the core will report the current physical
address. address.
* .. _`CEC-MSG-GIVE-OSD-NAME`:
- .. _`CEC-MSG-GIVE-OSD-NAME`:
- ``CEC_MSG_GIVE_OSD_NAME`` - ``CEC_MSG_GIVE_OSD_NAME``
- When in passthrough mode this message has to be handled by - When in passthrough mode this message has to be handled by
userspace, otherwise the core will report the current OSD name as userspace, otherwise the core will report the current OSD name as
was set with :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`. was set with :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`.
* .. _`CEC-MSG-GIVE-FEATURES`:
- .. _`CEC-MSG-GIVE-FEATURES`:
- ``CEC_MSG_GIVE_FEATURES`` - ``CEC_MSG_GIVE_FEATURES``
- When in passthrough mode this message has to be handled by - When in passthrough mode this message has to be handled by
userspace, otherwise the core will report the current features as userspace, otherwise the core will report the current features as
was set with :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` was set with :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`
or the message is ignored if the CEC version was older than 2.0. or the message is ignored if the CEC version was older than 2.0.
* .. _`CEC-MSG-USER-CONTROL-PRESSED`:
- .. _`CEC-MSG-USER-CONTROL-PRESSED`:
- ``CEC_MSG_USER_CONTROL_PRESSED`` - ``CEC_MSG_USER_CONTROL_PRESSED``
- If :ref:`CEC_CAP_RC <CEC-CAP-RC>` is set, then generate a remote control key - If :ref:`CEC_CAP_RC <CEC-CAP-RC>` is set, then generate a remote control key
press. This message is always passed on to userspace. press. This message is always passed on to userspace.
* .. _`CEC-MSG-USER-CONTROL-RELEASED`:
- .. _`CEC-MSG-USER-CONTROL-RELEASED`:
- ``CEC_MSG_USER_CONTROL_RELEASED`` - ``CEC_MSG_USER_CONTROL_RELEASED``
- If :ref:`CEC_CAP_RC <CEC-CAP-RC>` is set, then generate a remote control key - If :ref:`CEC_CAP_RC <CEC-CAP-RC>` is set, then generate a remote control key
release. This message is always passed on to userspace. release. This message is always passed on to userspace.
* .. _`CEC-MSG-REPORT-PHYSICAL-ADDR`:
- .. _`CEC-MSG-REPORT-PHYSICAL-ADDR`:
- ``CEC_MSG_REPORT_PHYSICAL_ADDR`` - ``CEC_MSG_REPORT_PHYSICAL_ADDR``
- The CEC framework will make note of the reported physical address - The CEC framework will make note of the reported physical address
and then just pass the message on to userspace. and then just pass the message on to userspace.
......
...@@ -86,98 +86,53 @@ result. ...@@ -86,98 +86,53 @@ result.
:stub-columns: 0 :stub-columns: 0
:widths: 1 1 16 :widths: 1 1 16
* - __u64
- .. row 1
- __u64
- ``tx_ts`` - ``tx_ts``
- Timestamp in ns of when the last byte of the message was transmitted. - 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 timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access
the same clock from userspace use :c:func:`clock_gettime`. the same clock from userspace use :c:func:`clock_gettime`.
* - __u64
- .. row 2
- __u64
- ``rx_ts`` - ``rx_ts``
- Timestamp in ns of when the last byte of the message was received. - 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 timestamp has been taken from the ``CLOCK_MONOTONIC`` clock. To access
the same clock from userspace use :c:func:`clock_gettime`. the same clock from userspace use :c:func:`clock_gettime`.
* - __u32
- .. row 3
- __u32
- ``len`` - ``len``
- The length of the message. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` this is filled in - The length of the message. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` this is filled in
by the application. The driver will fill this in for by the application. The driver will fill this in for
:ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` it will be :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` it will be
filled in by the driver with the length of the reply message if ``reply`` was set. filled in by the driver with the length of the reply message if ``reply`` was set.
* - __u32
- .. row 4
- __u32
- ``timeout`` - ``timeout``
- The timeout in milliseconds. This is the time the device will wait - The timeout in milliseconds. This is the time the device will wait
for a message to be received before timing out. If it is set to 0, for a message to be received before timing out. If it is set to 0,
then it will wait indefinitely when it is called by :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`. then it will wait indefinitely when it is called by :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
If it is 0 and it is called by :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`, If it is 0 and it is called by :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`,
then it will be replaced by 1000 if the ``reply`` is non-zero or then it will be replaced by 1000 if the ``reply`` is non-zero or
ignored if ``reply`` is 0. ignored if ``reply`` is 0.
* - __u32
- .. row 5
- __u32
- ``sequence`` - ``sequence``
- A non-zero sequence number is automatically assigned by the CEC framework - A non-zero sequence number is automatically assigned by the CEC framework
for all transmitted messages. It is used by the CEC framework when it queues for all transmitted messages. It is used by the CEC framework when it queues
the transmit result (when transmit was called in non-blocking mode). This the transmit result (when transmit was called in non-blocking mode). This
allows the application to associate the received message with the original allows the application to associate the received message with the original
transmit. transmit.
* - __u32
- .. row 6
- __u32
- ``flags`` - ``flags``
- Flags. See :ref:`cec-msg-flags` for a list of available flags.
- Flags. No flags are defined yet, so set this to 0. * - __u8
- .. row 7
- __u8
- ``tx_status`` - ``tx_status``
- The status bits of the transmitted message. See - The status bits of the transmitted message. See
:ref:`cec-tx-status` for the possible status values. It is 0 if :ref:`cec-tx-status` for the possible status values. It is 0 if
this messages was received, not transmitted. this messages was received, not transmitted.
* - __u8
- .. row 8
- __u8
- ``msg[16]`` - ``msg[16]``
- The message payload. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` this is filled in by the - The message payload. For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` this is filled in by the
application. The driver will fill this in for :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`. application. The driver will fill this in for :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` it will be filled in by the driver with For :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` it will be filled in by the driver with
the payload of the reply message if ``timeout`` was set. the payload of the reply message if ``timeout`` was set.
* - __u8
- .. row 8
- __u8
- ``reply`` - ``reply``
- Wait until this message is replied. If ``reply`` is 0 and the - Wait until this message is replied. If ``reply`` is 0 and the
``timeout`` is 0, then don't wait for a reply but return after ``timeout`` is 0, then don't wait for a reply but return after
transmitting the message. Ignored by :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`. transmitting the message. Ignored by :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
...@@ -188,73 +143,71 @@ result. ...@@ -188,73 +143,71 @@ result.
to :ref:`CEC_RX_STATUS_TIMEOUT <CEC-RX-STATUS-TIMEOUT>` or to :ref:`CEC_RX_STATUS_TIMEOUT <CEC-RX-STATUS-TIMEOUT>` or
:ref:`CEC_RX_STATUS_FEATURE_ABORT <CEC-RX-STATUS-FEATURE-ABORT>`. :ref:`CEC_RX_STATUS_FEATURE_ABORT <CEC-RX-STATUS-FEATURE-ABORT>`.
- .. row 9 If the transmitter message is ``CEC_MSG_INITIATE_ARC`` then the ``reply``
values ``CEC_MSG_REPORT_ARC_INITIATED`` and ``CEC_MSG_REPORT_ARC_TERMINATED``
- __u8 are processed differently: either value will match both possible replies.
The reason is that the ``CEC_MSG_INITIATE_ARC`` message is the only CEC
message that has two possible replies other than Feature Abort. The
``reply`` field will be updated with the actual reply so that it is
synchronized with the contents of the received message.
* - __u8
- ``rx_status`` - ``rx_status``
- The status bits of the received message. See - The status bits of the received message. See
:ref:`cec-rx-status` for the possible status values. It is 0 if :ref:`cec-rx-status` for the possible status values. It is 0 if
this message was transmitted, not received, unless this is the this message was transmitted, not received, unless this is the
reply to a transmitted message. In that case both ``rx_status`` reply to a transmitted message. In that case both ``rx_status``
and ``tx_status`` are set. and ``tx_status`` are set.
* - __u8
- .. row 10
- __u8
- ``tx_status`` - ``tx_status``
- The status bits of the transmitted message. See - The status bits of the transmitted message. See
:ref:`cec-tx-status` for the possible status values. It is 0 if :ref:`cec-tx-status` for the possible status values. It is 0 if
this messages was received, not transmitted. this messages was received, not transmitted.
* - __u8
- .. row 11
- __u8
- ``tx_arb_lost_cnt`` - ``tx_arb_lost_cnt``
- A counter of the number of transmit attempts that resulted in the - A counter of the number of transmit attempts that resulted in the
Arbitration Lost error. This is only set if the hardware supports Arbitration Lost error. This is only set if the hardware supports
this, otherwise it is always 0. This counter is only valid if the this, otherwise it is always 0. This counter is only valid if the
:ref:`CEC_TX_STATUS_ARB_LOST <CEC-TX-STATUS-ARB-LOST>` status bit is set. :ref:`CEC_TX_STATUS_ARB_LOST <CEC-TX-STATUS-ARB-LOST>` status bit is set.
* - __u8
- .. row 12
- __u8
- ``tx_nack_cnt`` - ``tx_nack_cnt``
- A counter of the number of transmit attempts that resulted in the - A counter of the number of transmit attempts that resulted in the
Not Acknowledged error. This is only set if the hardware supports Not Acknowledged error. This is only set if the hardware supports
this, otherwise it is always 0. This counter is only valid if the this, otherwise it is always 0. This counter is only valid if the
:ref:`CEC_TX_STATUS_NACK <CEC-TX-STATUS-NACK>` status bit is set. :ref:`CEC_TX_STATUS_NACK <CEC-TX-STATUS-NACK>` status bit is set.
* - __u8
- .. row 13
- __u8
- ``tx_low_drive_cnt`` - ``tx_low_drive_cnt``
- A counter of the number of transmit attempts that resulted in the - A counter of the number of transmit attempts that resulted in the
Arbitration Lost error. This is only set if the hardware supports Arbitration Lost error. This is only set if the hardware supports
this, otherwise it is always 0. This counter is only valid if the this, otherwise it is always 0. This counter is only valid if the
:ref:`CEC_TX_STATUS_LOW_DRIVE <CEC-TX-STATUS-LOW-DRIVE>` status bit is set. :ref:`CEC_TX_STATUS_LOW_DRIVE <CEC-TX-STATUS-LOW-DRIVE>` status bit is set.
* - __u8
- .. row 14
- __u8
- ``tx_error_cnt`` - ``tx_error_cnt``
- A counter of the number of transmit errors other than Arbitration - A counter of the number of transmit errors other than Arbitration
Lost or Not Acknowledged. This is only set if the hardware Lost or Not Acknowledged. This is only set if the hardware
supports this, otherwise it is always 0. This counter is only supports this, otherwise it is always 0. This counter is only
valid if the :ref:`CEC_TX_STATUS_ERROR <CEC-TX-STATUS-ERROR>` status bit is set. valid if the :ref:`CEC_TX_STATUS_ERROR <CEC-TX-STATUS-ERROR>` status bit is set.
.. _cec-msg-flags:
.. flat-table:: Flags for struct cec_msg
:header-rows: 0
:stub-columns: 0
:widths: 3 1 4
* .. _`CEC-MSG-FL-REPLY-TO-FOLLOWERS`:
- ``CEC_MSG_FL_REPLY_TO_FOLLOWERS``
- 1
- If a CEC transmit expects a reply, then by default that reply is only sent to
the filehandle that called :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. If this
flag is set, then the reply is also sent to all followers, if any. If the
filehandle that called :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>` is also a
follower, then that filehandle will receive the reply twice: once as the
result of the :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`, and once via
:ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>`.
.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}|
.. _cec-tx-status: .. _cec-tx-status:
...@@ -264,61 +217,43 @@ result. ...@@ -264,61 +217,43 @@ result.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 16 :widths: 3 1 16
* .. _`CEC-TX-STATUS-OK`:
- .. _`CEC-TX-STATUS-OK`:
- ``CEC_TX_STATUS_OK`` - ``CEC_TX_STATUS_OK``
- 0x01 - 0x01
- The message was transmitted successfully. This is mutually - The message was transmitted successfully. This is mutually
exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES <CEC-TX-STATUS-MAX-RETRIES>`. Other bits can still exclusive with :ref:`CEC_TX_STATUS_MAX_RETRIES <CEC-TX-STATUS-MAX-RETRIES>`. Other bits can still
be set if earlier attempts met with failure before the transmit be set if earlier attempts met with failure before the transmit
was eventually successful. was eventually successful.
* .. _`CEC-TX-STATUS-ARB-LOST`:
- .. _`CEC-TX-STATUS-ARB-LOST`:
- ``CEC_TX_STATUS_ARB_LOST`` - ``CEC_TX_STATUS_ARB_LOST``
- 0x02 - 0x02
- CEC line arbitration was lost. - CEC line arbitration was lost.
* .. _`CEC-TX-STATUS-NACK`:
- .. _`CEC-TX-STATUS-NACK`:
- ``CEC_TX_STATUS_NACK`` - ``CEC_TX_STATUS_NACK``
- 0x04 - 0x04
- Message was not acknowledged. - Message was not acknowledged.
* .. _`CEC-TX-STATUS-LOW-DRIVE`:
- .. _`CEC-TX-STATUS-LOW-DRIVE`:
- ``CEC_TX_STATUS_LOW_DRIVE`` - ``CEC_TX_STATUS_LOW_DRIVE``
- 0x08 - 0x08
- Low drive was detected on the CEC bus. This indicates that a - Low drive was detected on the CEC bus. This indicates that a
follower detected an error on the bus and requests a follower detected an error on the bus and requests a
retransmission. retransmission.
* .. _`CEC-TX-STATUS-ERROR`:
- .. _`CEC-TX-STATUS-ERROR`:
- ``CEC_TX_STATUS_ERROR`` - ``CEC_TX_STATUS_ERROR``
- 0x10 - 0x10
- Some error occurred. This is used for any errors that do not fit - Some error occurred. This is used for any errors that do not fit
the previous two, either because the hardware could not tell which the previous two, either because the hardware could not tell which
error occurred, or because the hardware tested for other error occurred, or because the hardware tested for other
conditions besides those two. conditions besides those two.
* .. _`CEC-TX-STATUS-MAX-RETRIES`:
- .. _`CEC-TX-STATUS-MAX-RETRIES`:
- ``CEC_TX_STATUS_MAX_RETRIES`` - ``CEC_TX_STATUS_MAX_RETRIES``
- 0x20 - 0x20
- The transmit failed after one or more retries. This status bit is - The transmit failed after one or more retries. This status bit is
mutually exclusive with :ref:`CEC_TX_STATUS_OK <CEC-TX-STATUS-OK>`. Other bits can still mutually exclusive with :ref:`CEC_TX_STATUS_OK <CEC-TX-STATUS-OK>`. Other bits can still
be set to explain which failures were seen. be set to explain which failures were seen.
...@@ -333,29 +268,20 @@ result. ...@@ -333,29 +268,20 @@ result.
:stub-columns: 0 :stub-columns: 0
:widths: 3 1 16 :widths: 3 1 16
* .. _`CEC-RX-STATUS-OK`:
- .. _`CEC-RX-STATUS-OK`:
- ``CEC_RX_STATUS_OK`` - ``CEC_RX_STATUS_OK``
- 0x01 - 0x01
- The message was received successfully. - The message was received successfully.
* .. _`CEC-RX-STATUS-TIMEOUT`:
- .. _`CEC-RX-STATUS-TIMEOUT`:
- ``CEC_RX_STATUS_TIMEOUT`` - ``CEC_RX_STATUS_TIMEOUT``
- 0x02 - 0x02
- The reply to an earlier transmitted message timed out. - The reply to an earlier transmitted message timed out.
* .. _`CEC-RX-STATUS-FEATURE-ABORT`:
- .. _`CEC-RX-STATUS-FEATURE-ABORT`:
- ``CEC_RX_STATUS_FEATURE_ABORT`` - ``CEC_RX_STATUS_FEATURE_ABORT``
- 0x04 - 0x04
- The message was received successfully but the reply was - The message was received successfully but the reply was
``CEC_MSG_FEATURE_ABORT``. This status is only set if this message ``CEC_MSG_FEATURE_ABORT``. This status is only set if this message
was the reply to an earlier transmitted message. was the reply to an earlier transmitted message.
......
...@@ -312,21 +312,20 @@ more menu type controls. ...@@ -312,21 +312,20 @@ more menu type controls.
.. _enum_all_controls: .. _enum_all_controls:
Example: Enumerating all user controls Example: Enumerating all controls
====================================== =================================
.. code-block:: c .. code-block:: c
struct v4l2_queryctrl queryctrl; struct v4l2_queryctrl queryctrl;
struct v4l2_querymenu querymenu; struct v4l2_querymenu querymenu;
static void enumerate_menu(void) static void enumerate_menu(__u32 id)
{ {
printf(" Menu items:\\n"); printf(" Menu items:\\n");
memset(&querymenu, 0, sizeof(querymenu)); memset(&querymenu, 0, sizeof(querymenu));
querymenu.id = queryctrl.id; querymenu.id = id;
for (querymenu.index = queryctrl.minimum; for (querymenu.index = queryctrl.minimum;
querymenu.index <= queryctrl.maximum; querymenu.index <= queryctrl.maximum;
...@@ -337,6 +336,55 @@ Example: Enumerating all user controls ...@@ -337,6 +336,55 @@ Example: Enumerating all user controls
} }
} }
memset(&queryctrl, 0, sizeof(queryctrl));
queryctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
if (!(queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)) {
printf("Control %s\\n", queryctrl.name);
if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
enumerate_menu(queryctrl.id);
}
queryctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
}
if (errno != EINVAL) {
perror("VIDIOC_QUERYCTRL");
exit(EXIT_FAILURE);
}
Example: Enumerating all controls including compound controls
=============================================================
.. code-block:: c
struct v4l2_query_ext_ctrl query_ext_ctrl;
memset(&query_ext_ctrl, 0, sizeof(query_ext_ctrl));
query_ext_ctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL | V4L2_CTRL_FLAG_NEXT_COMPOUND;
while (0 == ioctl(fd, VIDIOC_QUERY_EXT_CTRL, &query_ext_ctrl)) {
if (!(query_ext_ctrl.flags & V4L2_CTRL_FLAG_DISABLED)) {
printf("Control %s\\n", query_ext_ctrl.name);
if (query_ext_ctrl.type == V4L2_CTRL_TYPE_MENU)
enumerate_menu(query_ext_ctrl.id);
}
query_ext_ctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL | V4L2_CTRL_FLAG_NEXT_COMPOUND;
}
if (errno != EINVAL) {
perror("VIDIOC_QUERY_EXT_CTRL");
exit(EXIT_FAILURE);
}
Example: Enumerating all user controls (old style)
==================================================
.. code-block:: c
memset(&queryctrl, 0, sizeof(queryctrl)); memset(&queryctrl, 0, sizeof(queryctrl));
for (queryctrl.id = V4L2_CID_BASE; for (queryctrl.id = V4L2_CID_BASE;
...@@ -349,7 +397,7 @@ Example: Enumerating all user controls ...@@ -349,7 +397,7 @@ Example: Enumerating all user controls
printf("Control %s\\n", queryctrl.name); printf("Control %s\\n", queryctrl.name);
if (queryctrl.type == V4L2_CTRL_TYPE_MENU) if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
enumerate_menu(); enumerate_menu(queryctrl.id);
} else { } else {
if (errno == EINVAL) if (errno == EINVAL)
continue; continue;
...@@ -368,7 +416,7 @@ Example: Enumerating all user controls ...@@ -368,7 +416,7 @@ Example: Enumerating all user controls
printf("Control %s\\n", queryctrl.name); printf("Control %s\\n", queryctrl.name);
if (queryctrl.type == V4L2_CTRL_TYPE_MENU) if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
enumerate_menu(); enumerate_menu(queryctrl.id);
} else { } else {
if (errno == EINVAL) if (errno == EINVAL)
break; break;
...@@ -379,32 +427,6 @@ Example: Enumerating all user controls ...@@ -379,32 +427,6 @@ Example: Enumerating all user controls
} }
Example: Enumerating all user controls (alternative)
====================================================
.. code-block:: c
memset(&queryctrl, 0, sizeof(queryctrl));
queryctrl.id = V4L2_CTRL_CLASS_USER | V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == ioctl(fd, VIDIOC_QUERYCTRL, &queryctrl)) {
if (V4L2_CTRL_ID2CLASS(queryctrl.id) != V4L2_CTRL_CLASS_USER)
break;
if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED)
continue;
printf("Control %s\\n", queryctrl.name);
if (queryctrl.type == V4L2_CTRL_TYPE_MENU)
enumerate_menu();
queryctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
}
if (errno != EINVAL) {
perror("VIDIOC_QUERYCTRL");
exit(EXIT_FAILURE);
}
Example: Changing controls Example: Changing controls
========================== ==========================
......
...@@ -26,7 +26,7 @@ parameters ...@@ -26,7 +26,7 @@ parameters
The MPEG controls actually support many more codecs than The MPEG controls actually support many more codecs than
just MPEG. See :ref:`mpeg-controls`. just MPEG. See :ref:`mpeg-controls`.
Memory-to-memory devices can often be used as a shared resource: you can Memory-to-memory devices function as a shared resource: you can
open the video node multiple times, each application setting up their open the video node multiple times, each application setting up their
own codec properties that are local to the file handle, and each can use own codec properties that are local to the file handle, and each can use
it independently from the others. The driver will arbitrate access to it independently from the others. The driver will arbitrate access to
......
...@@ -2846,7 +2846,7 @@ JPEG Control IDs ...@@ -2846,7 +2846,7 @@ JPEG Control IDs
input image is sampled, in respect to maximum sample rate in each input image is sampled, in respect to maximum sample rate in each
spatial dimension. See :ref:`itu-t81`, clause A.1.1. for more spatial dimension. See :ref:`itu-t81`, clause A.1.1. for more
details. The ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING`` control determines details. The ``V4L2_CID_JPEG_CHROMA_SUBSAMPLING`` control determines
how Cb and Cr components are downsampled after coverting an input how Cb and Cr components are downsampled after converting an input
image from RGB to Y'CbCr color space. image from RGB to Y'CbCr color space.
.. tabularcolumns:: |p{7.0cm}|p{10.5cm}| .. tabularcolumns:: |p{7.0cm}|p{10.5cm}|
...@@ -3017,6 +3017,10 @@ Image Process Control IDs ...@@ -3017,6 +3017,10 @@ Image Process Control IDs
test pattern images. These hardware specific test patterns can be test pattern images. These hardware specific test patterns can be
used to test if a device is working properly. used to test if a device is working properly.
``V4L2_CID_DEINTERLACING_MODE (menu)``
The video deinterlacing mode (such as Bob, Weave, ...). The menu items are
driver specific and are documented in :ref:`v4l-drivers`.
.. _dv-controls: .. _dv-controls:
......
.. -*- coding: utf-8; mode: rst -*-
.. _hsv-formats:
***********
HSV Formats
***********
These formats store the color information of the image
in a geometrical representation. The colors are mapped into a
cylinder, where the angle is the HUE, the height is the VALUE
and the distance to the center is the SATURATION. This is a very
useful format for image segmentation algorithms.
.. toctree::
:maxdepth: 1
pixfmt-packed-hsv
...@@ -121,6 +121,11 @@ Single-planar format structure ...@@ -121,6 +121,11 @@ Single-planar format structure
- This information supplements the ``colorspace`` and must be set by - This information supplements the ``colorspace`` and must be set by
the driver for capture streams and by the application for output the driver for capture streams and by the application for output
streams, see :ref:`colorspaces`. streams, see :ref:`colorspaces`.
* - enum :c:type:`v4l2_hsv_encoding`
- ``hsv_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` * - enum :c:type:`v4l2_quantization`
- ``quantization`` - ``quantization``
- This information supplements the ``colorspace`` and must be set by - This information supplements the ``colorspace`` and must be set by
......
...@@ -78,6 +78,11 @@ describing all planes of that format. ...@@ -78,6 +78,11 @@ describing all planes of that format.
- This information supplements the ``colorspace`` and must be set by - This information supplements the ``colorspace`` and must be set by
the driver for capture streams and by the application for output the driver for capture streams and by the application for output
streams, see :ref:`colorspaces`. streams, see :ref:`colorspaces`.
* - enum :c:type:`v4l2_hsv_encoding`
- ``hsv_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` * - enum :c:type:`v4l2_quantization`
- ``quantization`` - ``quantization``
- This information supplements the ``colorspace`` and must be set by - This information supplements the ``colorspace`` and must be set by
......
...@@ -19,9 +19,16 @@ colorspace field of struct :c:type:`v4l2_pix_format` ...@@ -19,9 +19,16 @@ colorspace field of struct :c:type:`v4l2_pix_format`
or struct :c:type:`v4l2_pix_format_mplane` or struct :c:type:`v4l2_pix_format_mplane`
needs to be filled in. needs to be filled in.
.. note:: .. _hsv-colorspace:
The default R'G'B' quantization is full range for all On :ref:`HSV formats <hsv-formats>` the *Hue* is defined as the angle on
the cylindrical color representation. Usually this angle is measured in
degrees, i.e. 0-360. When we map this angle value into 8 bits, there are
two basic ways to do it: Divide the angular value by 2 (0-179), or use the
whole range, 0-255, dividing the angular value by 1.41. The enum
:c:type:`v4l2_hsv_encoding` specifies which encoding is used.
.. note:: The default R'G'B' quantization is full range for all
colorspaces except for BT.2020 which uses limited range R'G'B' colorspaces except for BT.2020 which uses limited range R'G'B'
quantization. quantization.
...@@ -123,6 +130,24 @@ needs to be filled in. ...@@ -123,6 +130,24 @@ needs to be filled in.
.. c:type:: v4l2_hsv_encoding
.. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
.. flat-table:: V4L2 HSV Encodings
:header-rows: 1
:stub-columns: 0
* - Identifier
- Details
* - ``V4L2_HSV_ENC_180``
- For the Hue, each LSB is two degrees.
* - ``V4L2_HSV_ENC_256``
- For the Hue, the 360 degrees are mapped into 8 bits, i.e. each
LSB is roughly 1.41 degrees.
.. c:type:: v4l2_quantization .. c:type:: v4l2_quantization
.. tabularcolumns:: |p{6.5cm}|p{11.0cm}| .. tabularcolumns:: |p{6.5cm}|p{11.0cm}|
...@@ -136,7 +161,7 @@ needs to be filled in. ...@@ -136,7 +161,7 @@ needs to be filled in.
* - ``V4L2_QUANTIZATION_DEFAULT`` * - ``V4L2_QUANTIZATION_DEFAULT``
- Use the default quantization encoding as defined by the - Use the default quantization encoding as defined by the
colorspace. This is always full range for R'G'B' (except for the colorspace. This is always full range for R'G'B' (except for the
BT.2020 colorspace) and usually limited range for Y'CbCr. BT.2020 colorspace) and HSV. It is usually limited range for Y'CbCr.
* - ``V4L2_QUANTIZATION_FULL_RANGE`` * - ``V4L2_QUANTIZATION_FULL_RANGE``
- Use the full range quantization encoding. I.e. the range [0…1] is - 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 mapped to [0…255] (with possible clipping to [1…254] to avoid the
......
...@@ -85,3 +85,8 @@ Compressed Formats ...@@ -85,3 +85,8 @@ Compressed Formats
- ``V4L2_PIX_FMT_VP8`` - ``V4L2_PIX_FMT_VP8``
- 'VP80' - 'VP80'
- VP8 video elementary stream. - VP8 video elementary stream.
* .. _V4L2-PIX-FMT-VP9:
- ``V4L2_PIX_FMT_VP9``
- 'VP90'
- VP9 video elementary stream.
此差异已折叠。
...@@ -234,7 +234,15 @@ please make a proposal on the linux-media mailing list. ...@@ -234,7 +234,15 @@ please make a proposal on the linux-media mailing list.
repeated for each line, i.e. the number of entries in the pointer 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 array. Anything what's in between the UYVY lines is JPEG data and
should be concatenated to form the JPEG stream. should be concatenated to form the JPEG stream.
* .. _V4L2-PIX-FMT-MT21C:
- ``V4L2_PIX_FMT_MT21C``
- 'MT21'
- Compressed two-planar YVU420 format used by Mediatek MT8173.
The compression is lossless.
It is an opaque intermediate format and the MDP hardware must be
used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``,
``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
......
...@@ -12,9 +12,9 @@ RGB Formats ...@@ -12,9 +12,9 @@ RGB Formats
pixfmt-packed-rgb pixfmt-packed-rgb
pixfmt-srggb8 pixfmt-srggb8
pixfmt-sbggr16
pixfmt-srggb10 pixfmt-srggb10
pixfmt-srggb10p pixfmt-srggb10p
pixfmt-srggb10alaw8 pixfmt-srggb10alaw8
pixfmt-srggb10dpcm8 pixfmt-srggb10dpcm8
pixfmt-srggb12 pixfmt-srggb12
pixfmt-srggb16
...@@ -28,7 +28,7 @@ bits of each pixel, in the same order. ...@@ -28,7 +28,7 @@ bits of each pixel, in the same order.
Each n-pixel row contains n/2 green samples and n/2 blue or red samples, 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 with alternating green-red and green-blue rows. They are conventionally
described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
of one of these formats: of a small V4L2_PIX_FMT_SBGGR10P image:
**Byte Order.** **Byte Order.**
Each cell is one byte. Each cell is one byte.
......
...@@ -26,7 +26,7 @@ high bits filled with zeros. Each n-pixel row contains n/2 green samples ...@@ -26,7 +26,7 @@ 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 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 are stored in memory in little endian order. They are conventionally
described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example
of one of these formats: of a small V4L2_PIX_FMT_SBGGR12 image:
**Byte Order.** **Byte Order.**
Each cell is one byte, the 4 most significant bits in the high bytes are Each cell is one byte, the 4 most significant bits in the high bytes are
......
.. -*- coding: utf-8; mode: rst -*- .. -*- coding: utf-8; mode: rst -*-
.. _V4L2-PIX-FMT-SBGGR16: .. _V4L2-PIX-FMT-SRGGB16:
.. _v4l2-pix-fmt-sbggr16:
.. _v4l2-pix-fmt-sgbrg16:
.. _v4l2-pix-fmt-sgrbg16:
*****************************
V4L2_PIX_FMT_SBGGR16 ('BYR2')
*****************************
Bayer RGB format ***************************************************************************************************************************
V4L2_PIX_FMT_SRGGB16 ('RG16'), V4L2_PIX_FMT_SGRBG16 ('GR16'), V4L2_PIX_FMT_SGBRG16 ('GB16'), V4L2_PIX_FMT_SBGGR16 ('BYR2'),
***************************************************************************************************************************
16-bit Bayer formats
Description Description
=========== ===========
This format is similar to These four pixel formats are raw sRGB / Bayer formats with 16 bits per
:ref:`V4L2_PIX_FMT_SBGGR8 <V4L2-PIX-FMT-SBGGR8>`, except each pixel sample. Each sample is stored in a 16-bit word. Each n-pixel row contains
has a depth of 16 bits. The least significant byte is stored at lower n/2 green samples and n/2 blue or red samples, with alternating red and blue
memory addresses (little-endian). 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 a small V4L2_PIX_FMT_SBGGR16 image:
**Byte Order.** **Byte Order.**
Each cell is one byte. Each cell is one byte.
......
...@@ -20,7 +20,7 @@ These four pixel formats are raw sRGB / Bayer formats with 8 bits per ...@@ -20,7 +20,7 @@ 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 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 green samples and n/2 blue or red samples, with alternating red and
blue rows. They are conventionally described as GRGR... BGBG..., blue rows. They are conventionally described as GRGR... BGBG...,
RGRG... GBGB..., etc. Below is an example of one of these formats: RGRG... GBGB..., etc. Below is an example of a small V4L2_PIX_FMT_SBGGR8 image:
**Byte Order.** **Byte Order.**
Each cell is one byte. Each cell is one byte.
......
...@@ -29,6 +29,7 @@ see also :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`.) ...@@ -29,6 +29,7 @@ see also :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`.)
pixfmt-indexed pixfmt-indexed
pixfmt-rgb pixfmt-rgb
yuv-formats yuv-formats
hsv-formats
depth-formats depth-formats
pixfmt-013 pixfmt-013
sdr-formats sdr-formats
......
...@@ -68,6 +68,10 @@ Authors, in alphabetical order: ...@@ -68,6 +68,10 @@ Authors, in alphabetical order:
- SDR API. - SDR API.
- Ribalda, Ricardo
- Introduce HSV formats and other minor changes.
- Rubli, Martin - Rubli, Martin
- Designed and documented the VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS ioctls. - Designed and documented the VIDIOC_ENUM_FRAMESIZES and VIDIOC_ENUM_FRAMEINTERVALS ioctls.
...@@ -89,6 +93,11 @@ part can be used and distributed without restrictions. ...@@ -89,6 +93,11 @@ part can be used and distributed without restrictions.
Revision History Revision History
**************** ****************
:revision: 4.10 / 2016-07-15 (*rr*)
Introduce HSV formats.
:revision: 4.5 / 2015-10-29 (*rr*) :revision: 4.5 / 2015-10-29 (*rr*)
Extend VIDIOC_G_EXT_CTRLS;. Replace ctrl_class with a new union with Extend VIDIOC_G_EXT_CTRLS;. Replace ctrl_class with a new union with
......
...@@ -270,3 +270,14 @@ EBUSY ...@@ -270,3 +270,14 @@ EBUSY
- Some formats like SMPTE-125M have an interlaced signal with a odd - Some formats like SMPTE-125M have an interlaced signal with a odd
total height. For these formats, if this flag is set, the first total height. For these formats, if this flag is set, the first
field has the extra line. Else, it is the second field. field has the extra line. Else, it is the second field.
* - ``V4L2_DV_FL_HAS_PICTURE_ASPECT``
- If set, then the picture_aspect field is valid. Otherwise assume that
the pixels are square, so the picture aspect ratio is the same as the
width to height ratio.
* - ``V4L2_DV_FL_HAS_CEA861_VIC``
- If set, then the cea861_vic field is valid and contains the Video
Identification Code as per the CEA-861 standard.
* - ``V4L2_DV_FL_HAS_HDMI_VIC``
- If set, then the hdmi_vic field is valid and contains the Video
Identification Code as per the HDMI standard (HDMI Vendor Specific
InfoFrame).
...@@ -201,10 +201,10 @@ To change the radio frequency the ...@@ -201,10 +201,10 @@ To change the radio frequency the
* - ``V4L2_TUNER_SDR`` * - ``V4L2_TUNER_SDR``
- 4 - 4
- Tuner controls the A/D and/or D/A block of a - Tuner controls the A/D and/or D/A block of a
Sofware Digital Radio (SDR) Software Digital Radio (SDR)
* - ``V4L2_TUNER_RF`` * - ``V4L2_TUNER_RF``
- 5 - 5
- Tuner controls the RF part of a Sofware Digital Radio (SDR) - Tuner controls the RF part of a Software Digital Radio (SDR)
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
.. include:: <isonum.txt> .. include:: <isonum.txt>
.. _v4l-drivers:
################################################ ################################################
Video4Linux (V4L) driver-specific documentation Video4Linux (V4L) driver-specific documentation
################################################ ################################################
...@@ -46,6 +48,7 @@ For more details see the file COPYING in the source distribution of Linux. ...@@ -46,6 +48,7 @@ For more details see the file COPYING in the source distribution of Linux.
pvrusb2 pvrusb2
pxa_camera pxa_camera
radiotrack radiotrack
rcar-fdp1
saa7134 saa7134
sh_mobile_ceu_camera sh_mobile_ceu_camera
si470x si470x
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册