Merge tag 'media/v5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab: - a new sensor driver for ov5675 - a new platform driver for Allwinner A10 sensor interface - some new remote controller keymaps - some cosmetic changes at V4L2 core in order to avoid #ifdefs and to merge two core modules into one - removal of bcm2048 radio driver from staging - removal of davinci_vpfe video driver from staging - regression fix since Kernel 5.1 at the legacy VideoBuffer version 1 core - added some documentation for remote controller protocols - pixel format documentation was split on two files - lots of other driver improvements and cleanups * tag 'media/v5.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (321 commits) media: videobuf-core.c: poll_wait needs a non-NULL buf pointer media: sun4i: Make sun4i_csi_formats static media: imx: remove unused including <linux/version.h> media: stm32-dcmi: Delete an unnecessary of_node_put() call in dcmi_probe() media: pvrusb2: qctrl.flag will be uninitlaized if cx2341x_ctrl_query() returns error code media: em28xx: Fix exception handling in em28xx_alloc_urbs() media: don't do a 31 bit shift on a signed int media: use the BIT() macro media: ov9650: add a sanity check media: aspeed-video: address a protential usage of an unitialized var media: vicodec: make life easier for static analyzers media: remove include stdarg.h from some drivers v4l2-core: fix coding style for the two new c files media: v4l2-core: Remove BUG() from i2c and spi helpers media: v4l2-core: introduce a helper to unregister a i2c subdev media: v4l2-core: introduce a helper to unregister a spi subdev media: v4l2-core: move i2c helpers out of v4l2-common.c media: v4l2-core: move spi helpers out of v4l2-common.c media: v4l2-core: Module re-organization media: usbvision: Remove dead code ...
This commit is contained in:
@@ -0,0 +1,109 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/arm/allwinner,sun4i-a10-csi.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Allwinner A10 CMOS Sensor Interface (CSI) Device Tree Bindings
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Chen-Yu Tsai <wens@csie.org>
|
||||||
|
- Maxime Ripard <maxime.ripard@bootlin.com>
|
||||||
|
|
||||||
|
description: |-
|
||||||
|
The Allwinner A10 and later has a CMOS Sensor Interface to retrieve
|
||||||
|
frames from a parallel or BT656 sensor.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: allwinner,sun7i-a20-csi0
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
items:
|
||||||
|
- description: The CSI interface clock
|
||||||
|
- description: The CSI module clock
|
||||||
|
- description: The CSI ISP clock
|
||||||
|
- description: The CSI DRAM clock
|
||||||
|
|
||||||
|
clock-names:
|
||||||
|
items:
|
||||||
|
- const: bus
|
||||||
|
- const: mod
|
||||||
|
- const: isp
|
||||||
|
- const: ram
|
||||||
|
|
||||||
|
resets:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
# See ./video-interfaces.txt for details
|
||||||
|
port:
|
||||||
|
type: object
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
properties:
|
||||||
|
endpoint:
|
||||||
|
type: object
|
||||||
|
|
||||||
|
properties:
|
||||||
|
bus-width:
|
||||||
|
enum: [8, 16]
|
||||||
|
|
||||||
|
data-active: true
|
||||||
|
hsync-active: true
|
||||||
|
pclk-sample: true
|
||||||
|
remote-endpoint: true
|
||||||
|
vsync-active: true
|
||||||
|
|
||||||
|
required:
|
||||||
|
- bus-width
|
||||||
|
- data-active
|
||||||
|
- hsync-active
|
||||||
|
- pclk-sample
|
||||||
|
- remote-endpoint
|
||||||
|
- vsync-active
|
||||||
|
|
||||||
|
required:
|
||||||
|
- endpoint
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- interrupts
|
||||||
|
- clocks
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||||
|
#include <dt-bindings/clock/sun7i-a20-ccu.h>
|
||||||
|
#include <dt-bindings/reset/sun4i-a10-ccu.h>
|
||||||
|
|
||||||
|
csi0: csi@1c09000 {
|
||||||
|
compatible = "allwinner,sun7i-a20-csi0";
|
||||||
|
reg = <0x01c09000 0x1000>;
|
||||||
|
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI0>,
|
||||||
|
<&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>;
|
||||||
|
clock-names = "bus", "mod", "isp", "ram";
|
||||||
|
resets = <&ccu RST_CSI0>;
|
||||||
|
|
||||||
|
port {
|
||||||
|
csi_from_ov5640: endpoint {
|
||||||
|
remote-endpoint = <&ov5640_to_csi>;
|
||||||
|
bus-width = <8>;
|
||||||
|
hsync-active = <1>; /* Active high */
|
||||||
|
vsync-active = <0>; /* Active low */
|
||||||
|
data-active = <1>; /* Active high */
|
||||||
|
pclk-sample = <1>; /* Rising */
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
@@ -0,0 +1,80 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/media/allwinner,sun4i-a10-ir.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Allwinner A10 Infrared Controller Device Tree Bindings
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Chen-Yu Tsai <wens@csie.org>
|
||||||
|
- Maxime Ripard <maxime.ripard@bootlin.com>
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: "rc.yaml#"
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
oneOf:
|
||||||
|
- const: allwinner,sun4i-a10-ir
|
||||||
|
- const: allwinner,sun5i-a13-ir
|
||||||
|
- items:
|
||||||
|
- const: allwinner,sun8i-a83t-ir
|
||||||
|
- const: allwinner,sun6i-a31-ir
|
||||||
|
- const: allwinner,sun6i-a31-ir
|
||||||
|
- items:
|
||||||
|
- const: allwinner,sun50i-a64-ir
|
||||||
|
- const: allwinner,sun6i-a31-ir
|
||||||
|
- items:
|
||||||
|
- const: allwinner,sun50i-h6-ir
|
||||||
|
- const: allwinner,sun6i-a31-ir
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
items:
|
||||||
|
- description: Bus Clock
|
||||||
|
- description: Module Clock
|
||||||
|
|
||||||
|
clock-names:
|
||||||
|
items:
|
||||||
|
- const: apb
|
||||||
|
- const: ir
|
||||||
|
|
||||||
|
resets:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
clock-frequency:
|
||||||
|
default: 8000000
|
||||||
|
description:
|
||||||
|
IR Receiver clock frequency, in Hertz.
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- interrupts
|
||||||
|
- clocks
|
||||||
|
- clock-names
|
||||||
|
|
||||||
|
# FIXME: We should set it, but it would report all the generic
|
||||||
|
# properties as additional properties.
|
||||||
|
# additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
ir0: ir@1c21800 {
|
||||||
|
compatible = "allwinner,sun4i-a10-ir";
|
||||||
|
clocks = <&apb0_gates 6>, <&ir0_clk>;
|
||||||
|
clock-names = "apb", "ir";
|
||||||
|
clock-frequency = <3000000>;
|
||||||
|
resets = <&apb0_rst 1>;
|
||||||
|
interrupts = <0 5 1>;
|
||||||
|
reg = <0x01C21800 0x40>;
|
||||||
|
linux,rc-map-name = "rc-rc6-mce";
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
@@ -5,7 +5,8 @@ The Cadence MIPI-CSI2 TX controller is a CSI-2 bridge supporting up to
|
|||||||
4 CSI lanes in output, and up to 4 different pixel streams in input.
|
4 CSI lanes in output, and up to 4 different pixel streams in input.
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible: must be set to "cdns,csi2tx"
|
- compatible: must be set to "cdns,csi2tx" or "cdns,csi2tx-1.3"
|
||||||
|
for version 1.3 of the controller, "cdns,csi2tx-2.1" for v2.1
|
||||||
- reg: base address and size of the memory mapped region
|
- reg: base address and size of the memory mapped region
|
||||||
- clocks: phandles to the clocks driving the controller
|
- clocks: phandles to the clocks driving the controller
|
||||||
- clock-names: must contain:
|
- clock-names: must contain:
|
||||||
|
@@ -9,7 +9,7 @@ to connect directly to external CMOS image sensors.
|
|||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
|
|
||||||
- compatible : "fsl,imx7-csi";
|
- compatible : "fsl,imx7-csi" or "fsl,imx6ul-csi";
|
||||||
- reg : base address and length of the register set for the device;
|
- reg : base address and length of the register set for the device;
|
||||||
- interrupts : should contain CSI interrupt;
|
- interrupts : should contain CSI interrupt;
|
||||||
- clocks : list of clock specifiers, see
|
- clocks : list of clock specifiers, see
|
||||||
|
@@ -5,10 +5,12 @@ to handle communication between HDMI connected devices over the CEC bus.
|
|||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible : value should be following depending on the SoC :
|
- compatible : value should be following depending on the SoC :
|
||||||
For GXBB, GXL, GXM and G12A (AO_CEC_A module) :
|
For GXBB, GXL, GXM, G12A and SM1 (AO_CEC_A module) :
|
||||||
"amlogic,meson-gx-ao-cec"
|
"amlogic,meson-gx-ao-cec"
|
||||||
For G12A (AO_CEC_B module) :
|
For G12A (AO_CEC_B module) :
|
||||||
"amlogic,meson-g12a-ao-cec"
|
"amlogic,meson-g12a-ao-cec"
|
||||||
|
For SM1 (AO_CEC_B module) :
|
||||||
|
"amlogic,meson-sm1-ao-cec"
|
||||||
|
|
||||||
- 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.
|
||||||
@@ -16,9 +18,9 @@ Required properties:
|
|||||||
- interrupts : AO-CEC interrupt number to the CPU.
|
- interrupts : AO-CEC interrupt number to the CPU.
|
||||||
- clocks : from common clock binding: handle to AO-CEC clock.
|
- clocks : from common clock binding: handle to AO-CEC clock.
|
||||||
- clock-names : from common clock binding, must contain :
|
- clock-names : from common clock binding, must contain :
|
||||||
For GXBB, GXL, GXM and G12A (AO_CEC_A module) :
|
For GXBB, GXL, GXM, G12A and SM1 (AO_CEC_A module) :
|
||||||
- "core"
|
- "core"
|
||||||
For G12A (AO_CEC_B module) :
|
For G12A, SM1 (AO_CEC_B module) :
|
||||||
- "oscin"
|
- "oscin"
|
||||||
corresponding to entry in the clocks property.
|
corresponding to entry in the clocks property.
|
||||||
- hdmi-phandle: phandle to the HDMI controller
|
- hdmi-phandle: phandle to the HDMI controller
|
||||||
|
@@ -35,6 +35,7 @@ Optional properties:
|
|||||||
- resets : Must contain an entry for each entry in reset-names.
|
- resets : Must contain an entry for each entry in reset-names.
|
||||||
- reset-names : Must include the following entries:
|
- reset-names : Must include the following entries:
|
||||||
- mc
|
- mc
|
||||||
|
- iommus: Must contain phandle to the IOMMU device node.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -59,4 +60,5 @@ video-codec@6001a000 {
|
|||||||
clocks = <&tegra_car TEGRA20_CLK_VDE>;
|
clocks = <&tegra_car TEGRA20_CLK_VDE>;
|
||||||
reset-names = "vde", "mc";
|
reset-names = "vde", "mc";
|
||||||
resets = <&tegra_car 61>, <&mc TEGRA20_MC_RESET_VDE>;
|
resets = <&tegra_car 61>, <&mc TEGRA20_MC_RESET_VDE>;
|
||||||
|
iommus = <&mc TEGRA_SWGROUP_VDE>;
|
||||||
};
|
};
|
||||||
|
@@ -1,117 +1 @@
|
|||||||
The following properties are common to the infrared remote controllers:
|
This file has been moved to rc.yaml.
|
||||||
|
|
||||||
- linux,rc-map-name: string, specifies the scancode/key mapping table
|
|
||||||
defined in-kernel for the remote controller. Support values are:
|
|
||||||
* "rc-adstech-dvb-t-pci"
|
|
||||||
* "rc-alink-dtu-m"
|
|
||||||
* "rc-anysee"
|
|
||||||
* "rc-apac-viewcomp"
|
|
||||||
* "rc-asus-pc39"
|
|
||||||
* "rc-asus-ps3-100"
|
|
||||||
* "rc-ati-tv-wonder-hd-600"
|
|
||||||
* "rc-ati-x10"
|
|
||||||
* "rc-avermedia-a16d"
|
|
||||||
* "rc-avermedia-cardbus"
|
|
||||||
* "rc-avermedia-dvbt"
|
|
||||||
* "rc-avermedia-m135a"
|
|
||||||
* "rc-avermedia-m733a-rm-k6"
|
|
||||||
* "rc-avermedia-rm-ks"
|
|
||||||
* "rc-avermedia"
|
|
||||||
* "rc-avertv-303"
|
|
||||||
* "rc-azurewave-ad-tu700"
|
|
||||||
* "rc-behold-columbus"
|
|
||||||
* "rc-behold"
|
|
||||||
* "rc-budget-ci-old"
|
|
||||||
* "rc-cec"
|
|
||||||
* "rc-cinergy-1400"
|
|
||||||
* "rc-cinergy"
|
|
||||||
* "rc-delock-61959"
|
|
||||||
* "rc-dib0700-nec"
|
|
||||||
* "rc-dib0700-rc5"
|
|
||||||
* "rc-digitalnow-tinytwin"
|
|
||||||
* "rc-digittrade"
|
|
||||||
* "rc-dm1105-nec"
|
|
||||||
* "rc-dntv-live-dvbt-pro"
|
|
||||||
* "rc-dntv-live-dvb-t"
|
|
||||||
* "rc-dtt200u"
|
|
||||||
* "rc-dvbsky"
|
|
||||||
* "rc-empty"
|
|
||||||
* "rc-em-terratec"
|
|
||||||
* "rc-encore-enltv2"
|
|
||||||
* "rc-encore-enltv-fm53"
|
|
||||||
* "rc-encore-enltv"
|
|
||||||
* "rc-evga-indtube"
|
|
||||||
* "rc-eztv"
|
|
||||||
* "rc-flydvb"
|
|
||||||
* "rc-flyvideo"
|
|
||||||
* "rc-fusionhdtv-mce"
|
|
||||||
* "rc-gadmei-rm008z"
|
|
||||||
* "rc-geekbox"
|
|
||||||
* "rc-genius-tvgo-a11mce"
|
|
||||||
* "rc-gotview7135"
|
|
||||||
* "rc-hauppauge"
|
|
||||||
* "rc-imon-mce"
|
|
||||||
* "rc-imon-pad"
|
|
||||||
* "rc-iodata-bctv7e"
|
|
||||||
* "rc-it913x-v1"
|
|
||||||
* "rc-it913x-v2"
|
|
||||||
* "rc-kaiomy"
|
|
||||||
* "rc-kworld-315u"
|
|
||||||
* "rc-kworld-pc150u"
|
|
||||||
* "rc-kworld-plus-tv-analog"
|
|
||||||
* "rc-leadtek-y04g0051"
|
|
||||||
* "rc-lirc"
|
|
||||||
* "rc-lme2510"
|
|
||||||
* "rc-manli"
|
|
||||||
* "rc-medion-x10"
|
|
||||||
* "rc-medion-x10-digitainer"
|
|
||||||
* "rc-medion-x10-or2x"
|
|
||||||
* "rc-msi-digivox-ii"
|
|
||||||
* "rc-msi-digivox-iii"
|
|
||||||
* "rc-msi-tvanywhere-plus"
|
|
||||||
* "rc-msi-tvanywhere"
|
|
||||||
* "rc-nebula"
|
|
||||||
* "rc-nec-terratec-cinergy-xs"
|
|
||||||
* "rc-norwood"
|
|
||||||
* "rc-npgtech"
|
|
||||||
* "rc-pctv-sedna"
|
|
||||||
* "rc-pinnacle-color"
|
|
||||||
* "rc-pinnacle-grey"
|
|
||||||
* "rc-pinnacle-pctv-hd"
|
|
||||||
* "rc-pixelview-new"
|
|
||||||
* "rc-pixelview"
|
|
||||||
* "rc-pixelview-002t"
|
|
||||||
* "rc-pixelview-mk12"
|
|
||||||
* "rc-powercolor-real-angel"
|
|
||||||
* "rc-proteus-2309"
|
|
||||||
* "rc-purpletv"
|
|
||||||
* "rc-pv951"
|
|
||||||
* "rc-hauppauge"
|
|
||||||
* "rc-rc5-tv"
|
|
||||||
* "rc-rc6-mce"
|
|
||||||
* "rc-real-audio-220-32-keys"
|
|
||||||
* "rc-reddo"
|
|
||||||
* "rc-snapstream-firefly"
|
|
||||||
* "rc-streamzap"
|
|
||||||
* "rc-tbs-nec"
|
|
||||||
* "rc-technisat-ts35"
|
|
||||||
* "rc-technisat-usb2"
|
|
||||||
* "rc-terratec-cinergy-c-pci"
|
|
||||||
* "rc-terratec-cinergy-s2-hd"
|
|
||||||
* "rc-terratec-cinergy-xs"
|
|
||||||
* "rc-terratec-slim"
|
|
||||||
* "rc-terratec-slim-2"
|
|
||||||
* "rc-tevii-nec"
|
|
||||||
* "rc-tivo"
|
|
||||||
* "rc-total-media-in-hand"
|
|
||||||
* "rc-total-media-in-hand-02"
|
|
||||||
* "rc-trekstor"
|
|
||||||
* "rc-tt-1500"
|
|
||||||
* "rc-twinhan-dtv-cab-ci"
|
|
||||||
* "rc-twinhan1027"
|
|
||||||
* "rc-videomate-k100"
|
|
||||||
* "rc-videomate-s350"
|
|
||||||
* "rc-videomate-tv-pvr"
|
|
||||||
* "rc-winfast"
|
|
||||||
* "rc-winfast-usbii-deluxe"
|
|
||||||
* "rc-su3000"
|
|
||||||
|
145
Documentation/devicetree/bindings/media/rc.yaml
Normal file
145
Documentation/devicetree/bindings/media/rc.yaml
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/media/rc.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Generic Infrared Remote Controller Device Tree Bindings
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Mauro Carvalho Chehab <mchehab@kernel.org>
|
||||||
|
- Sean Young <sean@mess.org>
|
||||||
|
|
||||||
|
properties:
|
||||||
|
$nodename:
|
||||||
|
pattern: "^ir(@[a-f0-9]+)?$"
|
||||||
|
|
||||||
|
linux,rc-map-name:
|
||||||
|
description:
|
||||||
|
Specifies the scancode/key mapping table defined in-kernel for
|
||||||
|
the remote controller.
|
||||||
|
allOf:
|
||||||
|
- $ref: '/schemas/types.yaml#/definitions/string'
|
||||||
|
- enum:
|
||||||
|
- rc-adstech-dvb-t-pci
|
||||||
|
- rc-alink-dtu-m
|
||||||
|
- rc-anysee
|
||||||
|
- rc-apac-viewcomp
|
||||||
|
- rc-astrometa-t2hybrid
|
||||||
|
- rc-asus-pc39
|
||||||
|
- rc-asus-ps3-100
|
||||||
|
- rc-ati-tv-wonder-hd-600
|
||||||
|
- rc-ati-x10
|
||||||
|
- rc-avermedia
|
||||||
|
- rc-avermedia-a16d
|
||||||
|
- rc-avermedia-cardbus
|
||||||
|
- rc-avermedia-dvbt
|
||||||
|
- rc-avermedia-m135a
|
||||||
|
- rc-avermedia-m733a-rm-k6
|
||||||
|
- rc-avermedia-rm-ks
|
||||||
|
- rc-avertv-303
|
||||||
|
- rc-azurewave-ad-tu700
|
||||||
|
- rc-behold
|
||||||
|
- rc-behold-columbus
|
||||||
|
- rc-budget-ci-old
|
||||||
|
- rc-cec
|
||||||
|
- rc-cinergy
|
||||||
|
- rc-cinergy-1400
|
||||||
|
- rc-d680-dmb
|
||||||
|
- rc-delock-61959
|
||||||
|
- rc-dib0700-nec
|
||||||
|
- rc-dib0700-rc5
|
||||||
|
- rc-digitalnow-tinytwin
|
||||||
|
- rc-digittrade
|
||||||
|
- rc-dm1105-nec
|
||||||
|
- rc-dntv-live-dvb-t
|
||||||
|
- rc-dntv-live-dvbt-pro
|
||||||
|
- rc-dtt200u
|
||||||
|
- rc-dvbsky
|
||||||
|
- rc-dvico-mce
|
||||||
|
- rc-dvico-portable
|
||||||
|
- rc-em-terratec
|
||||||
|
- rc-empty
|
||||||
|
- rc-encore-enltv
|
||||||
|
- rc-encore-enltv-fm53
|
||||||
|
- rc-encore-enltv2
|
||||||
|
- rc-evga-indtube
|
||||||
|
- rc-eztv
|
||||||
|
- rc-flydvb
|
||||||
|
- rc-flyvideo
|
||||||
|
- rc-fusionhdtv-mce
|
||||||
|
- rc-gadmei-rm008z
|
||||||
|
- rc-geekbox
|
||||||
|
- rc-genius-tvgo-a11mce
|
||||||
|
- rc-gotview7135
|
||||||
|
- rc-hauppauge
|
||||||
|
- rc-hauppauge
|
||||||
|
- rc-hisi-poplar
|
||||||
|
- rc-hisi-tv-demo
|
||||||
|
- rc-imon-mce
|
||||||
|
- rc-imon-pad
|
||||||
|
- rc-imon-rsc
|
||||||
|
- rc-iodata-bctv7e
|
||||||
|
- rc-it913x-v1
|
||||||
|
- rc-it913x-v2
|
||||||
|
- rc-kaiomy
|
||||||
|
- rc-kworld-315u
|
||||||
|
- rc-kworld-pc150u
|
||||||
|
- rc-kworld-plus-tv-analog
|
||||||
|
- rc-leadtek-y04g0051
|
||||||
|
- rc-lme2510
|
||||||
|
- rc-manli
|
||||||
|
- rc-medion-x10
|
||||||
|
- rc-medion-x10-digitainer
|
||||||
|
- rc-medion-x10-or2x
|
||||||
|
- rc-msi-digivox-ii
|
||||||
|
- rc-msi-digivox-iii
|
||||||
|
- rc-msi-tvanywhere
|
||||||
|
- rc-msi-tvanywhere-plus
|
||||||
|
- rc-nebula
|
||||||
|
- rc-nec-terratec-cinergy-xs
|
||||||
|
- rc-norwood
|
||||||
|
- rc-npgtech
|
||||||
|
- rc-pctv-sedna
|
||||||
|
- rc-pinnacle-color
|
||||||
|
- rc-pinnacle-grey
|
||||||
|
- rc-pinnacle-pctv-hd
|
||||||
|
- rc-pixelview
|
||||||
|
- rc-pixelview-002t
|
||||||
|
- rc-pixelview-mk12
|
||||||
|
- rc-pixelview-new
|
||||||
|
- rc-powercolor-real-angel
|
||||||
|
- rc-proteus-2309
|
||||||
|
- rc-purpletv
|
||||||
|
- rc-pv951
|
||||||
|
- rc-rc5-tv
|
||||||
|
- rc-rc6-mce
|
||||||
|
- rc-real-audio-220-32-keys
|
||||||
|
- rc-reddo
|
||||||
|
- rc-snapstream-firefly
|
||||||
|
- rc-streamzap
|
||||||
|
- rc-su3000
|
||||||
|
- rc-tango
|
||||||
|
- rc-tbs-nec
|
||||||
|
- rc-technisat-ts35
|
||||||
|
- rc-technisat-usb2
|
||||||
|
- rc-terratec-cinergy-c-pci
|
||||||
|
- rc-terratec-cinergy-s2-hd
|
||||||
|
- rc-terratec-cinergy-xs
|
||||||
|
- rc-terratec-slim
|
||||||
|
- rc-terratec-slim-2
|
||||||
|
- rc-tevii-nec
|
||||||
|
- rc-tivo
|
||||||
|
- rc-total-media-in-hand
|
||||||
|
- rc-total-media-in-hand-02
|
||||||
|
- rc-trekstor
|
||||||
|
- rc-tt-1500
|
||||||
|
- rc-twinhan-dtv-cab-ci
|
||||||
|
- rc-twinhan1027
|
||||||
|
- rc-videomate-k100
|
||||||
|
- rc-videomate-s350
|
||||||
|
- rc-videomate-tv-pvr
|
||||||
|
- rc-winfast
|
||||||
|
- rc-winfast-usbii-deluxe
|
||||||
|
- rc-xbox-dvd
|
||||||
|
- rc-zx-irdec
|
@@ -1,14 +1,17 @@
|
|||||||
device-tree bindings for rockchip VPU codec
|
device-tree bindings for rockchip VPU codec
|
||||||
|
|
||||||
Rockchip (Video Processing Unit) present in various Rockchip platforms,
|
Rockchip (Video Processing Unit) present in various Rockchip platforms,
|
||||||
such as RK3288 and RK3399.
|
such as RK3288, RK3328 and RK3399.
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- compatible: value should be one of the following
|
- compatible: value should be one of the following
|
||||||
"rockchip,rk3288-vpu";
|
"rockchip,rk3288-vpu";
|
||||||
|
"rockchip,rk3328-vpu";
|
||||||
"rockchip,rk3399-vpu";
|
"rockchip,rk3399-vpu";
|
||||||
- interrupts: encoding and decoding interrupt specifiers
|
- interrupts: encoding and decoding interrupt specifiers
|
||||||
- interrupt-names: should be "vepu" and "vdpu"
|
- interrupt-names: should be
|
||||||
|
"vepu", "vdpu" on RK3288 and RK3399,
|
||||||
|
"vdpu" on RK3328.
|
||||||
- clocks: phandle to VPU aclk, hclk clocks
|
- clocks: phandle to VPU aclk, hclk clocks
|
||||||
- clock-names: should be "aclk" and "hclk"
|
- clock-names: should be "aclk" and "hclk"
|
||||||
- power-domains: phandle to power domain node
|
- power-domains: phandle to power domain node
|
||||||
@@ -27,3 +30,14 @@ SoC-specific DT entry:
|
|||||||
power-domains = <&power RK3288_PD_VIDEO>;
|
power-domains = <&power RK3288_PD_VIDEO>;
|
||||||
iommus = <&vpu_mmu>;
|
iommus = <&vpu_mmu>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vpu: video-codec@ff350000 {
|
||||||
|
compatible = "rockchip,rk3328-vpu";
|
||||||
|
reg = <0x0 0xff350000 0x0 0x800>;
|
||||||
|
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
interrupt-names = "vdpu";
|
||||||
|
clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>;
|
||||||
|
clock-names = "aclk", "hclk";
|
||||||
|
power-domains = <&power RK3328_PD_VPU>;
|
||||||
|
iommus = <&vpu_mmu>;
|
||||||
|
};
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
Device-Tree bindings for SUNXI IR controller found in sunXi SoC family
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible : "allwinner,sun4i-a10-ir" or "allwinner,sun5i-a13-ir"
|
|
||||||
- clocks : list of clock specifiers, corresponding to
|
|
||||||
entries in clock-names property;
|
|
||||||
- clock-names : should contain "apb" and "ir" entries;
|
|
||||||
- interrupts : should contain IR IRQ number;
|
|
||||||
- reg : should contain IO map address for IR.
|
|
||||||
|
|
||||||
Optional properties:
|
|
||||||
- linux,rc-map-name: see rc.txt file in the same directory.
|
|
||||||
- resets : phandle + reset specifier pair
|
|
||||||
- clock-frequency : IR Receiver clock frequency, in Hertz. Defaults to 8 MHz
|
|
||||||
if missing.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
ir0: ir@1c21800 {
|
|
||||||
compatible = "allwinner,sun4i-a10-ir";
|
|
||||||
clocks = <&apb0_gates 6>, <&ir0_clk>;
|
|
||||||
clock-names = "apb", "ir";
|
|
||||||
clock-frequency = <3000000>;
|
|
||||||
resets = <&apb0_rst 1>;
|
|
||||||
interrupts = <0 5 1>;
|
|
||||||
reg = <0x01C21800 0x40>;
|
|
||||||
linux,rc-map-name = "rc-rc6-mce";
|
|
||||||
};
|
|
@@ -49,9 +49,13 @@ where
|
|||||||
|
|
||||||
The transmitter drivers must, if possible, configure the CSI-2
|
The transmitter drivers must, if possible, configure the CSI-2
|
||||||
transmitter to *LP-11 mode* whenever the transmitter is powered on but
|
transmitter to *LP-11 mode* whenever the transmitter is powered on but
|
||||||
not active. Some transmitters do this automatically but some have to
|
not active, and maintain *LP-11 mode* until stream on. Only at stream
|
||||||
be explicitly programmed to do so, and some are unable to do so
|
on should the transmitter activate the clock on the clock lane and
|
||||||
altogether due to hardware constraints.
|
transition to *HS mode*.
|
||||||
|
|
||||||
|
Some transmitters do this automatically but some have to be explicitly
|
||||||
|
programmed to do so, and some are unable to do so altogether due to
|
||||||
|
hardware constraints.
|
||||||
|
|
||||||
Stopping the transmitter
|
Stopping the transmitter
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -72,3 +76,10 @@ the transmitter up by using the
|
|||||||
:c:type:`v4l2_subdev_core_ops`->s_power() callback. This may take
|
:c:type:`v4l2_subdev_core_ops`->s_power() callback. This may take
|
||||||
place either indirectly by using :c:func:`v4l2_pipeline_pm_use` or
|
place either indirectly by using :c:func:`v4l2_pipeline_pm_use` or
|
||||||
directly.
|
directly.
|
||||||
|
|
||||||
|
Formats
|
||||||
|
-------
|
||||||
|
|
||||||
|
The media bus pixel codes document parallel formats. Should the pixel data be
|
||||||
|
transported over a serial bus, the media bus pixel code that describes a
|
||||||
|
parallel format that transfers a sample on a single clock cycle is used.
|
||||||
|
@@ -288,6 +288,7 @@ Mask Description
|
|||||||
0x08 Log the read and write file operations and the VIDIOC_QBUF and
|
0x08 Log the read and write file operations and the VIDIOC_QBUF and
|
||||||
VIDIOC_DQBUF ioctls.
|
VIDIOC_DQBUF ioctls.
|
||||||
0x10 Log the poll file operation.
|
0x10 Log the poll file operation.
|
||||||
|
0x20 Log error and messages in the control operations.
|
||||||
===== ================================================================
|
===== ================================================================
|
||||||
|
|
||||||
Video device cleanup
|
Video device cleanup
|
||||||
|
@@ -20,6 +20,9 @@ data between userspace and kernelspace. Fundamentally, it is just a chardev
|
|||||||
file_operations defined on it. With respect to transporting raw IR and
|
file_operations defined on it. With respect to transporting raw IR and
|
||||||
decoded scancodes to and fro, the essential fops are read, write and ioctl.
|
decoded scancodes to and fro, the essential fops are read, write and ioctl.
|
||||||
|
|
||||||
|
It is also possible to attach a BPF program to a LIRC device for decoding
|
||||||
|
raw IR into scancodes.
|
||||||
|
|
||||||
Example dmesg output upon a driver registering w/LIRC:
|
Example dmesg output upon a driver registering w/LIRC:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
@@ -34,6 +37,16 @@ What you should see for a chardev:
|
|||||||
$ ls -l /dev/lirc*
|
$ ls -l /dev/lirc*
|
||||||
crw-rw---- 1 root root 248, 0 Jul 2 22:20 /dev/lirc0
|
crw-rw---- 1 root root 248, 0 Jul 2 22:20 /dev/lirc0
|
||||||
|
|
||||||
|
Note that the package `v4l-utils <https://git.linuxtv.org/v4l-utils.git/>`_
|
||||||
|
contains tools for working with LIRC devices:
|
||||||
|
|
||||||
|
- ir-ctl: can receive raw IR and transmit IR, as well as query LIRC
|
||||||
|
device features.
|
||||||
|
|
||||||
|
- ir-keytable: can load keymaps; allows you to set IR kernel protocols; load
|
||||||
|
BPF IR decoders and test IR decoding. Some BPF IR decoders are also
|
||||||
|
provided.
|
||||||
|
|
||||||
.. _lirc_modes:
|
.. _lirc_modes:
|
||||||
|
|
||||||
**********
|
**********
|
||||||
@@ -53,11 +66,12 @@ on the following table.
|
|||||||
|
|
||||||
For transmitting (aka sending), create a ``struct lirc_scancode`` with
|
For transmitting (aka sending), create a ``struct lirc_scancode`` with
|
||||||
the desired scancode set in the ``scancode`` member, :c:type:`rc_proto`
|
the desired scancode set in the ``scancode`` member, :c:type:`rc_proto`
|
||||||
set the IR protocol, and all other members set to 0. Write this struct to
|
set to the :ref:`IR protocol <Remote_controllers_Protocols>`, and all other
|
||||||
the lirc device.
|
members set to 0. Write this struct to the lirc device.
|
||||||
|
|
||||||
For receiving, you read ``struct lirc_scancode`` from the lirc device,
|
For receiving, you read ``struct lirc_scancode`` from the LIRC device.
|
||||||
with ``scancode`` set to the received scancode and the IR protocol
|
The ``scancode`` field is set to the received scancode and the
|
||||||
|
:ref:`IR protocol <Remote_controllers_Protocols>` is set in
|
||||||
:c:type:`rc_proto`. If the scancode maps to a valid key code, this is set
|
:c:type:`rc_proto`. If the scancode maps to a valid key code, this is set
|
||||||
in the ``keycode`` field, else it is set to ``KEY_RESERVED``.
|
in the ``keycode`` field, else it is set to ``KEY_RESERVED``.
|
||||||
|
|
||||||
@@ -129,12 +143,29 @@ on the following table.
|
|||||||
|
|
||||||
This mode is used only for IR send.
|
This mode is used only for IR send.
|
||||||
|
|
||||||
|
********************
|
||||||
|
BPF based IR decoder
|
||||||
|
********************
|
||||||
|
|
||||||
**************************
|
The kernel has support for decoding the most common
|
||||||
Remote Controller protocol
|
:ref:`IR protocols <Remote_controllers_Protocols>`, but there
|
||||||
**************************
|
are many protocols which are not supported. To support these, it is possible
|
||||||
|
to load an BPF program which does the decoding. This can only be done on
|
||||||
|
LIRC devices which support reading raw IR.
|
||||||
|
|
||||||
An enum :c:type:`rc_proto` in the :ref:`lirc_header` lists all the
|
First, using the `bpf(2)`_ syscall with the ``BPF_LOAD_PROG`` argument,
|
||||||
supported IR protocols:
|
program must be loaded of type ``BPF_PROG_TYPE_LIRC_MODE2``. Once attached
|
||||||
|
to the LIRC device, this program will be called for each pulse, space or
|
||||||
|
timeout event on the LIRC device. The context for the BPF program is a
|
||||||
|
pointer to a unsigned int, which is a :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`
|
||||||
|
value. When the program has decoded the scancode, it can be submitted using
|
||||||
|
the BPF functions ``bpf_rc_keydown()`` or ``bpf_rc_repeat()``. Mouse or pointer
|
||||||
|
movements can be reported using ``bpf_rc_pointer_rel()``.
|
||||||
|
|
||||||
.. kernel-doc:: include/uapi/linux/lirc.h
|
Once you have the file descriptor for the ``BPF_PROG_TYPE_LIRC_MODE2`` BPF
|
||||||
|
program, it can be attached to the LIRC device using the `bpf(2)`_ syscall.
|
||||||
|
The target must be the file descriptor for the LIRC device, and the
|
||||||
|
attach type must be ``BPF_LIRC_MODE2``. No more than 64 BPF programs can be
|
||||||
|
attached to a single LIRC device at a time.
|
||||||
|
|
||||||
|
.. _bpf(2): http://man7.org/linux/man-pages/man2/bpf.2.html
|
||||||
|
@@ -62,7 +62,8 @@ read from the chardev.
|
|||||||
Alternatively, :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` can be available,
|
Alternatively, :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` can be available,
|
||||||
in this mode scancodes which are either decoded by software decoders, or
|
in this mode scancodes which are either decoded by software decoders, or
|
||||||
by hardware decoders. The :c:type:`rc_proto` member is set to the
|
by hardware decoders. The :c:type:`rc_proto` member is set to the
|
||||||
protocol used for transmission, and ``scancode`` to the decoded scancode,
|
:ref:`IR protocol <Remote_controllers_Protocols>`
|
||||||
|
used for transmission, and ``scancode`` to the decoded scancode,
|
||||||
and the ``keycode`` set to the keycode or ``KEY_RESERVED``.
|
and the ``keycode`` set to the keycode or ``KEY_RESERVED``.
|
||||||
|
|
||||||
|
|
||||||
|
@@ -64,7 +64,8 @@ driver returns ``EINVAL``.
|
|||||||
When in :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` mode, one
|
When in :ref:`LIRC_MODE_SCANCODE <lirc-mode-scancode>` mode, one
|
||||||
``struct lirc_scancode`` must be written to the chardev at a time, else
|
``struct lirc_scancode`` must be written to the chardev at a time, else
|
||||||
``EINVAL`` is returned. Set the desired scancode in the ``scancode`` member,
|
``EINVAL`` is returned. Set the desired scancode in the ``scancode`` member,
|
||||||
and the protocol in the :c:type:`rc_proto`: member. All other members must be
|
and the :ref:`IR protocol <Remote_controllers_Protocols>` in the
|
||||||
|
:c:type:`rc_proto`: member. All other members must be
|
||||||
set to 0, else ``EINVAL`` is returned. If there is no protocol encoder
|
set to 0, else ``EINVAL`` is returned. If there is no protocol encoder
|
||||||
for the protocol or the scancode is not valid for the specified protocol,
|
for the protocol or the scancode is not valid for the specified protocol,
|
||||||
``EINVAL`` is returned. The write function blocks until the scancode
|
``EINVAL`` is returned. The write function blocks until the scancode
|
||||||
|
456
Documentation/media/uapi/rc/rc-protos.rst
Normal file
456
Documentation/media/uapi/rc/rc-protos.rst
Normal file
@@ -0,0 +1,456 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
..
|
||||||
|
.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
|
||||||
|
|
||||||
|
.. _Remote_controllers_Protocols:
|
||||||
|
|
||||||
|
*****************************************
|
||||||
|
Remote Controller Protocols and Scancodes
|
||||||
|
*****************************************
|
||||||
|
|
||||||
|
IR is encoded as a series of pulses and spaces, using a protocol. These
|
||||||
|
protocols can encode e.g. an address (which device should respond) and a
|
||||||
|
command: what it should do. The values for these are not always consistent
|
||||||
|
across different devices for a given protocol.
|
||||||
|
|
||||||
|
Therefore out the output of the IR decoder is a scancode; a single u32
|
||||||
|
value. Using keymap tables this can be mapped to linux key codes.
|
||||||
|
|
||||||
|
Other things can be encoded too. Some IR protocols encode a toggle bit; this
|
||||||
|
is to distinguish whether the same button is being held down, or has been
|
||||||
|
released and pressed again. If has been released and pressed again, the
|
||||||
|
toggle bit will invert from one IR message to the next.
|
||||||
|
|
||||||
|
Some remotes have a pointer-type device which can used to control the
|
||||||
|
mouse; some air conditioning systems can have their target temperature
|
||||||
|
target set in IR.
|
||||||
|
|
||||||
|
The following are the protocols the kernel knows about and also lists
|
||||||
|
how scancodes are encoded for each protocol.
|
||||||
|
|
||||||
|
rc-5 (RC_PROTO_RC5)
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
This IR protocol uses manchester encoding to encode 14 bits. There is a
|
||||||
|
detailed description here https://www.sbprojects.net/knowledge/ir/rc5.php.
|
||||||
|
|
||||||
|
The scancode encoding is *not* consistent with the lirc daemon (lircd) rc5
|
||||||
|
protocol, or the manchester BPF decoder.
|
||||||
|
|
||||||
|
.. flat-table:: rc5 bits scancode mapping
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - rc-5 bit
|
||||||
|
|
||||||
|
- scancode bit
|
||||||
|
|
||||||
|
- description
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- none
|
||||||
|
|
||||||
|
- Start bit, always set
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- 6 (inverted)
|
||||||
|
|
||||||
|
- 2nd start bit in rc5, re-used as 6th command bit
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- none
|
||||||
|
|
||||||
|
- Toggle bit
|
||||||
|
|
||||||
|
* - 5
|
||||||
|
|
||||||
|
- 8 to 13
|
||||||
|
|
||||||
|
- Address
|
||||||
|
|
||||||
|
* - 6
|
||||||
|
|
||||||
|
- 0 to 5
|
||||||
|
|
||||||
|
- Command
|
||||||
|
|
||||||
|
There is a variant of rc5 called either rc5x or extended rc5
|
||||||
|
where there the second stop bit is the 6th commmand bit, but inverted.
|
||||||
|
This is done so it the scancodes and encoding is compatible with existing
|
||||||
|
schemes. This bit is stored in bit 6 of the scancode, inverted. This is
|
||||||
|
done to keep it compatible with plain rc-5 where there are two start bits.
|
||||||
|
|
||||||
|
rc-5-sz (RC_PROTO_RC5_SZ)
|
||||||
|
-------------------------
|
||||||
|
This is much like rc-5 but one bit longer. The scancode is encoded
|
||||||
|
differently.
|
||||||
|
|
||||||
|
.. flat-table:: rc-5-sz bits scancode mapping
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - rc-5-sz bits
|
||||||
|
|
||||||
|
- scancode bit
|
||||||
|
|
||||||
|
- description
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- none
|
||||||
|
|
||||||
|
- Start bit, always set
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- 13
|
||||||
|
|
||||||
|
- Address bit
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- none
|
||||||
|
|
||||||
|
- Toggle bit
|
||||||
|
|
||||||
|
* - 6
|
||||||
|
|
||||||
|
- 6 to 11
|
||||||
|
|
||||||
|
- Address
|
||||||
|
|
||||||
|
* - 6
|
||||||
|
|
||||||
|
- 0 to 5
|
||||||
|
|
||||||
|
- Command
|
||||||
|
|
||||||
|
rc-5x-20 (RC_PROTO_RC5X_20)
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
This rc-5 extended to encoded 20 bits. The is a 3555 microseconds space
|
||||||
|
after the 8th bit.
|
||||||
|
|
||||||
|
.. flat-table:: rc-5x-20 bits scancode mapping
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - rc-5-sz bits
|
||||||
|
|
||||||
|
- scancode bit
|
||||||
|
|
||||||
|
- description
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- none
|
||||||
|
|
||||||
|
- Start bit, always set
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- 14
|
||||||
|
|
||||||
|
- Address bit
|
||||||
|
|
||||||
|
* - 1
|
||||||
|
|
||||||
|
- none
|
||||||
|
|
||||||
|
- Toggle bit
|
||||||
|
|
||||||
|
* - 5
|
||||||
|
|
||||||
|
- 16 to 20
|
||||||
|
|
||||||
|
- Address
|
||||||
|
|
||||||
|
* - 6
|
||||||
|
|
||||||
|
- 8 to 13
|
||||||
|
|
||||||
|
- Address
|
||||||
|
|
||||||
|
* - 6
|
||||||
|
|
||||||
|
- 0 to 5
|
||||||
|
|
||||||
|
- Command
|
||||||
|
|
||||||
|
|
||||||
|
jvc (RC_PROTO_JVC)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
The jvc protocol is much like nec, without the inverted values. It is
|
||||||
|
described here https://www.sbprojects.net/knowledge/ir/jvc.php.
|
||||||
|
|
||||||
|
The scancode is a 16 bits value, where the address is the lower 8 bits
|
||||||
|
and the command the higher 8 bits; this is reversed from IR order.
|
||||||
|
|
||||||
|
sony-12 (RC_PROTO_SONY12)
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
The sony protocol is a pulse-width encoding. There are three variants,
|
||||||
|
which just differ in number of bits and scancode encoding.
|
||||||
|
|
||||||
|
.. flat-table:: sony-12 bits scancode mapping
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - sony-12 bits
|
||||||
|
|
||||||
|
- scancode bit
|
||||||
|
|
||||||
|
- description
|
||||||
|
|
||||||
|
* - 5
|
||||||
|
|
||||||
|
- 16 to 20
|
||||||
|
|
||||||
|
- device
|
||||||
|
|
||||||
|
* - 7
|
||||||
|
|
||||||
|
- 0 to 6
|
||||||
|
|
||||||
|
- function
|
||||||
|
|
||||||
|
sony-15 (RC_PROTO_SONY15)
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
The sony protocol is a pulse-width encoding. There are three variants,
|
||||||
|
which just differ in number of bits and scancode encoding.
|
||||||
|
|
||||||
|
.. flat-table:: sony-12 bits scancode mapping
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - sony-12 bits
|
||||||
|
|
||||||
|
- scancode bit
|
||||||
|
|
||||||
|
- description
|
||||||
|
|
||||||
|
* - 8
|
||||||
|
|
||||||
|
- 16 to 23
|
||||||
|
|
||||||
|
- device
|
||||||
|
|
||||||
|
* - 7
|
||||||
|
|
||||||
|
- 0 to 6
|
||||||
|
|
||||||
|
- function
|
||||||
|
|
||||||
|
sony-20 (RC_PROTO_SONY20)
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
The sony protocol is a pulse-width encoding. There are three variants,
|
||||||
|
which just differ in number of bits and scancode encoding.
|
||||||
|
|
||||||
|
.. flat-table:: sony-20 bits scancode mapping
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - sony-20 bits
|
||||||
|
|
||||||
|
- scancode bit
|
||||||
|
|
||||||
|
- description
|
||||||
|
|
||||||
|
* - 5
|
||||||
|
|
||||||
|
- 16 to 20
|
||||||
|
|
||||||
|
- device
|
||||||
|
|
||||||
|
* - 7
|
||||||
|
|
||||||
|
- 0 to 7
|
||||||
|
|
||||||
|
- device
|
||||||
|
|
||||||
|
* - 8
|
||||||
|
|
||||||
|
- 8 to 15
|
||||||
|
|
||||||
|
- extended bits
|
||||||
|
|
||||||
|
nec (RC_PROTO_NEC)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
The nec protocol encodes an 8 bit address and an 8 bit command. It is
|
||||||
|
described here https://www.sbprojects.net/knowledge/ir/nec.php. Note
|
||||||
|
that the protocol sends least significant bit first.
|
||||||
|
|
||||||
|
As a check, the nec protocol sends the address and command twice; the
|
||||||
|
second time it is inverted. This is done for verification.
|
||||||
|
|
||||||
|
A plain nec IR message has 16 bits; the high 8 bits are the address
|
||||||
|
and the low 8 bits are the command.
|
||||||
|
|
||||||
|
nec-x (RC_PROTO_NECX)
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Extended nec has a 16 bit address and a 8 bit command. This is encoded
|
||||||
|
as a 24 bit value as you would expect, with the lower 8 bits the command
|
||||||
|
and the upper 16 bits the address.
|
||||||
|
|
||||||
|
nec-32 (RC_PROTO_NEC32)
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
nec-32 does not send an inverted address or an inverted command; the
|
||||||
|
entire message, all 32 bits, are used.
|
||||||
|
|
||||||
|
For this to be decoded correctly, the second 8 bits must not be the
|
||||||
|
inverted value of the first, and also the last 8 bits must not be the
|
||||||
|
inverted value of the third 8 bit value.
|
||||||
|
|
||||||
|
The scancode has a somewhat unusual encoding.
|
||||||
|
|
||||||
|
.. flat-table:: nec-32 bits scancode mapping
|
||||||
|
|
||||||
|
* - nec-32 bits
|
||||||
|
|
||||||
|
- scancode bit
|
||||||
|
|
||||||
|
* - First 8 bits
|
||||||
|
|
||||||
|
- 16 to 23
|
||||||
|
|
||||||
|
* - Second 8 bits
|
||||||
|
|
||||||
|
- 24 to 31
|
||||||
|
|
||||||
|
* - Third 8 bits
|
||||||
|
|
||||||
|
- 0 to 7
|
||||||
|
|
||||||
|
* - Fourth 8 bits
|
||||||
|
|
||||||
|
- 8 to 15
|
||||||
|
|
||||||
|
sanyo (RC_PROTO_SANYO)
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The sanyo protocol is like the nec protocol, but with 13 bits address
|
||||||
|
rather than 8 bits. Both the address and the command are followed by
|
||||||
|
their inverted versions, but these are not present in the scancodes.
|
||||||
|
|
||||||
|
Bis 8 to 20 of the scancode is the 13 bits address, and the lower 8
|
||||||
|
bits are the command.
|
||||||
|
|
||||||
|
mcir2-kbd (RC_PROTO_MCIR2_KBD)
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
This protocol is generated by the Microsoft MCE keyboard for keyboard
|
||||||
|
events. Refer to the ir-mce_kbd-decoder.c to see how it is encoded.
|
||||||
|
|
||||||
|
mcir2-mse (RC_PROTO_MCIR2_MSE)
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
This protocol is generated by the Microsoft MCE keyboard for pointer
|
||||||
|
events. Refer to the ir-mce_kbd-decoder.c to see how it is encoded.
|
||||||
|
|
||||||
|
rc-6-0 (RC_PROTO_RC6_0)
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
This is the rc-6 in mode 0. rc-6 is described here
|
||||||
|
https://www.sbprojects.net/knowledge/ir/rc6.php.
|
||||||
|
The scancode is the exact 16 bits as in the protocol. There is also a
|
||||||
|
toggle bit.
|
||||||
|
|
||||||
|
rc-6-6a-20 (RC_PROTO_RC6_6A_20)
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
This is the rc-6 in mode 6a, 20 bits. rc-6 is described here
|
||||||
|
https://www.sbprojects.net/knowledge/ir/rc6.php.
|
||||||
|
The scancode is the exact 20 bits
|
||||||
|
as in the protocol. There is also a toggle bit.
|
||||||
|
|
||||||
|
rc-6-6a-24 (RC_PROTO_RC6_6A_24)
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
This is the rc-6 in mode 6a, 24 bits. rc-6 is described here
|
||||||
|
https://www.sbprojects.net/knowledge/ir/rc6.php.
|
||||||
|
The scancode is the exact 24 bits
|
||||||
|
as in the protocol. There is also a toggle bit.
|
||||||
|
|
||||||
|
rc-6-6a-32 (RC_PROTO_RC6_6A_32)
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
This is the rc-6 in mode 6a, 32 bits. rc-6 is described here
|
||||||
|
https://www.sbprojects.net/knowledge/ir/rc6.php.
|
||||||
|
The upper 16 bits are the vendor,
|
||||||
|
and the lower 16 bits are the vendor-specific bits. This protocol is
|
||||||
|
for the non-Microsoft MCE variant (vendor != 0x800f).
|
||||||
|
|
||||||
|
|
||||||
|
rc-6-mce (RC_PROTO_RC6_MCE)
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
This is the rc-6 in mode 6a, 32 bits. The upper 16 bits are the vendor,
|
||||||
|
and the lower 16 bits are the vendor-specific bits. This protocol is
|
||||||
|
for the Microsoft MCE variant (vendor = 0x800f). The toggle bit in the
|
||||||
|
protocol itself is ignored, and the 16th bit should be takes as the toggle
|
||||||
|
bit.
|
||||||
|
|
||||||
|
sharp (RC_PROTO_SHARP)
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
This is a protocol used by Sharp VCRs, is described here
|
||||||
|
https://www.sbprojects.net/knowledge/ir/sharp.php. There is a very long
|
||||||
|
(40ms) space between the normal and inverted values, and some IR receivers
|
||||||
|
cannot decode this.
|
||||||
|
|
||||||
|
There is a 5 bit address and a 8 bit command. In the scancode the address is
|
||||||
|
in bits 8 to 12, and the command in bits 0 to 7.
|
||||||
|
|
||||||
|
xmp (RC_PROTO_XMP)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
This protocol has several versions and only version 1 is supported. Refer
|
||||||
|
to the decoder (ir-xmp-decoder.c) to see how it is encoded.
|
||||||
|
|
||||||
|
|
||||||
|
cec (RC_PROTO_CEC)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
This is not an IR protocol, this is a protocol over CEC. The CEC
|
||||||
|
infrastructure uses rc-core for handling CEC commands, so that they
|
||||||
|
can easily be remapped.
|
||||||
|
|
||||||
|
imon (RC_PROTO_IMON)
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
This protocol is used by Antec Veris/SoundGraph iMON remotes.
|
||||||
|
|
||||||
|
The protocol
|
||||||
|
describes both button presses and pointer movements. The protocol encodes
|
||||||
|
31 bits, and the scancode is simply the 31 bits with the top bit always 0.
|
||||||
|
|
||||||
|
rc-mm-12 (RC_PROTO_RCMM12)
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
The rc-mm protocol is described here
|
||||||
|
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
|
||||||
|
the 12 bits.
|
||||||
|
|
||||||
|
rc-mm-24 (RC_PROTO_RCMM24)
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
The rc-mm protocol is described here
|
||||||
|
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
|
||||||
|
the 24 bits.
|
||||||
|
|
||||||
|
rc-mm-32 (RC_PROTO_RCMM32)
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
The rc-mm protocol is described here
|
||||||
|
https://www.sbprojects.net/knowledge/ir/rcmm.php. The scancode is simply
|
||||||
|
the 32 bits.
|
||||||
|
|
||||||
|
xbox-dvd (RC_PROTO_XBOX_DVD)
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
This protocol is used by XBox DVD Remote, which was made for the original
|
||||||
|
XBox. There is no in-kernel decoder or encoder for this protocol. The usb
|
||||||
|
device decodes the protocol. There is a BPF decoder available in v4l-utils.
|
@@ -27,6 +27,7 @@ Part III - Remote Controller API
|
|||||||
|
|
||||||
rc-intro
|
rc-intro
|
||||||
rc-sysfs-nodes
|
rc-sysfs-nodes
|
||||||
|
rc-protos
|
||||||
rc-tables
|
rc-tables
|
||||||
rc-table-change
|
rc-table-change
|
||||||
lirc-dev
|
lirc-dev
|
||||||
|
@@ -395,3 +395,13 @@ colimg
|
|||||||
:title: Color Imaging: Fundamentals and Applications
|
:title: Color Imaging: Fundamentals and Applications
|
||||||
|
|
||||||
:author: Erik Reinhard et al.
|
:author: Erik Reinhard et al.
|
||||||
|
|
||||||
|
.. _vp8:
|
||||||
|
|
||||||
|
VP8
|
||||||
|
===
|
||||||
|
|
||||||
|
|
||||||
|
:title: RFC 6386: "VP8 Data Format and Decoding Guide"
|
||||||
|
|
||||||
|
:author: J. Bankoski et al.
|
||||||
|
@@ -295,7 +295,7 @@ Control IDs
|
|||||||
Sets the alpha color component. When a capture device (or capture
|
Sets the alpha color component. When a capture device (or capture
|
||||||
queue of a mem-to-mem device) produces a frame format that includes
|
queue of a mem-to-mem device) produces a frame format that includes
|
||||||
an alpha component (e.g.
|
an alpha component (e.g.
|
||||||
:ref:`packed RGB image formats <rgb-formats>`) and the alpha value
|
:ref:`packed RGB image formats <pixfmt-rgb>`) and the alpha value
|
||||||
is not defined by the device or the mem-to-mem input data this
|
is not defined by the device or the mem-to-mem input data this
|
||||||
control lets you select the alpha component value of all pixels.
|
control lets you select the alpha component value of all pixels.
|
||||||
When an output device (or output queue of a mem-to-mem device)
|
When an output device (or output queue of a mem-to-mem device)
|
||||||
|
1101
Documentation/media/uapi/v4l/dev-decoder.rst
Normal file
1101
Documentation/media/uapi/v4l/dev-decoder.rst
Normal file
File diff suppressed because it is too large
Load Diff
@@ -39,4 +39,10 @@ file handle is visible through another file handle).
|
|||||||
One of the most common memory-to-memory device is the codec. Codecs
|
One of the most common memory-to-memory device is the codec. Codecs
|
||||||
are more complicated than most and require additional setup for
|
are more complicated than most and require additional setup for
|
||||||
their codec parameters. This is done through codec controls.
|
their codec parameters. This is done through codec controls.
|
||||||
See :ref:`mpeg-controls`.
|
See :ref:`mpeg-controls`. More details on how to use codec memory-to-memory
|
||||||
|
devices are given in the following sections.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
dev-decoder
|
||||||
|
@@ -1747,6 +1747,14 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
|
|||||||
* - __u32
|
* - __u32
|
||||||
- ``size``
|
- ``size``
|
||||||
-
|
-
|
||||||
|
* - __u32
|
||||||
|
- ``start_byte_offset``
|
||||||
|
Offset (in bytes) from the beginning of the OUTPUT buffer to the start
|
||||||
|
of the slice. If the slice starts with a start code, then this is the
|
||||||
|
offset to such start code. When operating in slice-based decoding mode
|
||||||
|
(see :c:type:`v4l2_mpeg_video_h264_decode_mode`), this field should
|
||||||
|
be set to 0. When operating in frame-based decoding mode, this field
|
||||||
|
should be 0 for the first slice.
|
||||||
* - __u32
|
* - __u32
|
||||||
- ``header_bit_size``
|
- ``header_bit_size``
|
||||||
-
|
-
|
||||||
@@ -1930,19 +1938,13 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
|
|||||||
-
|
-
|
||||||
* - __u16
|
* - __u16
|
||||||
- ``num_slices``
|
- ``num_slices``
|
||||||
- Number of slices needed to decode the current frame
|
- Number of slices needed to decode the current frame/field. When
|
||||||
|
operating in slice-based decoding mode (see
|
||||||
|
:c:type:`v4l2_mpeg_video_h264_decode_mode`), this field
|
||||||
|
should always be set to one.
|
||||||
* - __u16
|
* - __u16
|
||||||
- ``nal_ref_idc``
|
- ``nal_ref_idc``
|
||||||
- NAL reference ID value coming from the NAL Unit header
|
- NAL reference ID value coming from the NAL Unit header
|
||||||
* - __u8
|
|
||||||
- ``ref_pic_list_p0[32]``
|
|
||||||
- Backward reference list used by P-frames in the original bitstream order
|
|
||||||
* - __u8
|
|
||||||
- ``ref_pic_list_b0[32]``
|
|
||||||
- Backward reference list used by B-frames in the original bitstream order
|
|
||||||
* - __u8
|
|
||||||
- ``ref_pic_list_b1[32]``
|
|
||||||
- Forward reference list used by B-frames in the original bitstream order
|
|
||||||
* - __s32
|
* - __s32
|
||||||
- ``top_field_order_cnt``
|
- ``top_field_order_cnt``
|
||||||
- Picture Order Count for the coded top field
|
- Picture Order Count for the coded top field
|
||||||
@@ -2021,6 +2023,83 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
|
|||||||
- 0x00000004
|
- 0x00000004
|
||||||
- The DPB entry is a long term reference frame
|
- The DPB entry is a long term reference frame
|
||||||
|
|
||||||
|
``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE (enum)``
|
||||||
|
Specifies the decoding mode to use. Currently exposes slice-based and
|
||||||
|
frame-based decoding but new modes might be added later on.
|
||||||
|
This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
|
||||||
|
pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
|
||||||
|
are required to set this control in order to specify the decoding mode
|
||||||
|
that is expected for the buffer.
|
||||||
|
Drivers may expose a single or multiple decoding modes, depending
|
||||||
|
on what they can support.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This menu control is not yet part of the public kernel API and
|
||||||
|
it is expected to change.
|
||||||
|
|
||||||
|
.. c:type:: v4l2_mpeg_video_h264_decode_mode
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. flat-table::
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_SLICE_BASED``
|
||||||
|
- 0
|
||||||
|
- Decoding is done at the slice granularity.
|
||||||
|
In this mode, ``num_slices`` field in struct
|
||||||
|
:c:type:`v4l2_ctrl_h264_decode_params` should be set to 1,
|
||||||
|
and ``start_byte_offset`` in struct
|
||||||
|
:c:type:`v4l2_ctrl_h264_slice_params` should be set to 0.
|
||||||
|
The OUTPUT buffer must contain a single slice.
|
||||||
|
* - ``V4L2_MPEG_VIDEO_H264_DECODE_MODE_FRAME_BASED``
|
||||||
|
- 1
|
||||||
|
- Decoding is done at the frame granularity.
|
||||||
|
In this mode, ``num_slices`` field in struct
|
||||||
|
:c:type:`v4l2_ctrl_h264_decode_params` should be set to the number
|
||||||
|
of slices in the frame, and ``start_byte_offset`` in struct
|
||||||
|
:c:type:`v4l2_ctrl_h264_slice_params` should be set accordingly
|
||||||
|
for each slice. For the first slice, ``start_byte_offset`` should
|
||||||
|
be zero.
|
||||||
|
The OUTPUT buffer must contain all slices needed to decode the
|
||||||
|
frame. The OUTPUT buffer must also contain both fields.
|
||||||
|
|
||||||
|
``V4L2_CID_MPEG_VIDEO_H264_START_CODE (enum)``
|
||||||
|
Specifies the H264 slice start code expected for each slice.
|
||||||
|
This control is used as a modifier for V4L2_PIX_FMT_H264_SLICE
|
||||||
|
pixel format. Applications that support V4L2_PIX_FMT_H264_SLICE
|
||||||
|
are required to set this control in order to specify the start code
|
||||||
|
that is expected for the buffer.
|
||||||
|
Drivers may expose a single or multiple start codes, depending
|
||||||
|
on what they can support.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This menu control is not yet part of the public kernel API and
|
||||||
|
it is expected to change.
|
||||||
|
|
||||||
|
.. c:type:: v4l2_mpeg_video_h264_start_code
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. flat-table::
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - ``V4L2_MPEG_VIDEO_H264_START_CODE_NONE``
|
||||||
|
- 0
|
||||||
|
- Selecting this value specifies that H264 slices are passed
|
||||||
|
to the driver without any start code.
|
||||||
|
* - ``V4L2_MPEG_VIDEO_H264_START_CODE_ANNEX_B``
|
||||||
|
- 1
|
||||||
|
- Selecting this value specifies that H264 slices are expected
|
||||||
|
to be prefixed by Annex B start codes. According to :ref:`h264`
|
||||||
|
valid start codes can be 3-bytes 0x000001 or 4-bytes 0x00000001.
|
||||||
|
|
||||||
.. _v4l2-mpeg-mpeg2:
|
.. _v4l2-mpeg-mpeg2:
|
||||||
|
|
||||||
``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
|
``V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS (struct)``
|
||||||
@@ -2234,6 +2313,329 @@ enum v4l2_mpeg_video_h264_hierarchical_coding_type -
|
|||||||
Quantization parameter for a P frame for FWHT. Valid range: from 1
|
Quantization parameter for a P frame for FWHT. Valid range: from 1
|
||||||
to 31.
|
to 31.
|
||||||
|
|
||||||
|
.. _v4l2-mpeg-vp8:
|
||||||
|
|
||||||
|
``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER (struct)``
|
||||||
|
Specifies the frame parameters for the associated VP8 parsed frame data.
|
||||||
|
This includes the necessary parameters for
|
||||||
|
configuring a stateless hardware decoding pipeline for VP8.
|
||||||
|
The bitstream parameters are defined according to :ref:`vp8`.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This compound control is not yet part of the public kernel API and
|
||||||
|
it is expected to change.
|
||||||
|
|
||||||
|
.. c:type:: v4l2_ctrl_vp8_frame_header
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. tabularcolumns:: |p{5.8cm}|p{4.8cm}|p{6.6cm}|
|
||||||
|
|
||||||
|
.. flat-table:: struct v4l2_ctrl_vp8_frame_header
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - struct :c:type:`v4l2_vp8_segment_header`
|
||||||
|
- ``segment_header``
|
||||||
|
- Structure with segment-based adjustments metadata.
|
||||||
|
* - struct :c:type:`v4l2_vp8_loopfilter_header`
|
||||||
|
- ``loopfilter_header``
|
||||||
|
- Structure with loop filter level adjustments metadata.
|
||||||
|
* - struct :c:type:`v4l2_vp8_quantization_header`
|
||||||
|
- ``quant_header``
|
||||||
|
- Structure with VP8 dequantization indices metadata.
|
||||||
|
* - struct :c:type:`v4l2_vp8_entropy_header`
|
||||||
|
- ``entropy_header``
|
||||||
|
- Structure with VP8 entropy coder probabilities metadata.
|
||||||
|
* - struct :c:type:`v4l2_vp8_entropy_coder_state`
|
||||||
|
- ``coder_state``
|
||||||
|
- Structure with VP8 entropy coder state.
|
||||||
|
* - __u16
|
||||||
|
- ``width``
|
||||||
|
- The width of the frame. Must be set for all frames.
|
||||||
|
* - __u16
|
||||||
|
- ``height``
|
||||||
|
- The height of the frame. Must be set for all frames.
|
||||||
|
* - __u8
|
||||||
|
- ``horizontal_scale``
|
||||||
|
- Horizontal scaling factor.
|
||||||
|
* - __u8
|
||||||
|
- ``vertical_scaling factor``
|
||||||
|
- Vertical scale.
|
||||||
|
* - __u8
|
||||||
|
- ``version``
|
||||||
|
- Bitstream version.
|
||||||
|
* - __u8
|
||||||
|
- ``prob_skip_false``
|
||||||
|
- Indicates the probability that the macroblock is not skipped.
|
||||||
|
* - __u8
|
||||||
|
- ``prob_intra``
|
||||||
|
- Indicates the probability that a macroblock is intra-predicted.
|
||||||
|
* - __u8
|
||||||
|
- ``prob_last``
|
||||||
|
- Indicates the probability that the last reference frame is used
|
||||||
|
for inter-prediction
|
||||||
|
* - __u8
|
||||||
|
- ``prob_gf``
|
||||||
|
- Indicates the probability that the golden reference frame is used
|
||||||
|
for inter-prediction
|
||||||
|
* - __u8
|
||||||
|
- ``num_dct_parts``
|
||||||
|
- Number of DCT coefficients partitions. Must be one of: 1, 2, 4, or 8.
|
||||||
|
* - __u32
|
||||||
|
- ``first_part_size``
|
||||||
|
- Size of the first partition, i.e. the control partition.
|
||||||
|
* - __u32
|
||||||
|
- ``first_part_header_bits``
|
||||||
|
- Size in bits of the first partition header portion.
|
||||||
|
* - __u32
|
||||||
|
- ``dct_part_sizes[8]``
|
||||||
|
- DCT coefficients sizes.
|
||||||
|
* - __u64
|
||||||
|
- ``last_frame_ts``
|
||||||
|
- Timestamp for the V4L2 capture buffer to use as last reference frame, used
|
||||||
|
with inter-coded frames. The timestamp refers to the ``timestamp`` field in
|
||||||
|
struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
|
||||||
|
function to convert the struct :c:type:`timeval` in struct
|
||||||
|
:c:type:`v4l2_buffer` to a __u64.
|
||||||
|
* - __u64
|
||||||
|
- ``golden_frame_ts``
|
||||||
|
- Timestamp for the V4L2 capture buffer to use as last reference frame, used
|
||||||
|
with inter-coded frames. The timestamp refers to the ``timestamp`` field in
|
||||||
|
struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
|
||||||
|
function to convert the struct :c:type:`timeval` in struct
|
||||||
|
:c:type:`v4l2_buffer` to a __u64.
|
||||||
|
* - __u64
|
||||||
|
- ``alt_frame_ts``
|
||||||
|
- Timestamp for the V4L2 capture buffer to use as alternate reference frame, used
|
||||||
|
with inter-coded frames. The timestamp refers to the ``timestamp`` field in
|
||||||
|
struct :c:type:`v4l2_buffer`. Use the :c:func:`v4l2_timeval_to_ns()`
|
||||||
|
function to convert the struct :c:type:`timeval` in struct
|
||||||
|
:c:type:`v4l2_buffer` to a __u64.
|
||||||
|
* - __u64
|
||||||
|
- ``flags``
|
||||||
|
- See :ref:`Frame Header Flags <vp8_frame_header_flags>`
|
||||||
|
|
||||||
|
.. _vp8_frame_header_flags:
|
||||||
|
|
||||||
|
``Frame Header Flags``
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. flat-table::
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - ``V4L2_VP8_FRAME_HEADER_FLAG_KEY_FRAME``
|
||||||
|
- 0x01
|
||||||
|
- Indicates if the frame is a key frame.
|
||||||
|
* - ``V4L2_VP8_FRAME_HEADER_FLAG_EXPERIMENTAL``
|
||||||
|
- 0x02
|
||||||
|
- Experimental bitstream.
|
||||||
|
* - ``V4L2_VP8_FRAME_HEADER_FLAG_SHOW_FRAME``
|
||||||
|
- 0x04
|
||||||
|
- Show frame flag, indicates if the frame is for display.
|
||||||
|
* - ``V4L2_VP8_FRAME_HEADER_FLAG_MB_NO_SKIP_COEFF``
|
||||||
|
- 0x08
|
||||||
|
- Enable/disable skipping of macroblocks with no non-zero coefficients.
|
||||||
|
* - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_GOLDEN``
|
||||||
|
- 0x10
|
||||||
|
- Sign of motion vectors when the golden frame is referenced.
|
||||||
|
* - ``V4L2_VP8_FRAME_HEADER_FLAG_SIGN_BIAS_ALT``
|
||||||
|
- 0x20
|
||||||
|
- Sign of motion vectors when the alt frame is referenced.
|
||||||
|
|
||||||
|
.. c:type:: v4l2_vp8_entropy_coder_state
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
|
||||||
|
|
||||||
|
.. flat-table:: struct v4l2_vp8_entropy_coder_state
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - __u8
|
||||||
|
- ``range``
|
||||||
|
-
|
||||||
|
* - __u8
|
||||||
|
- ``value``
|
||||||
|
-
|
||||||
|
* - __u8
|
||||||
|
- ``bit_count``
|
||||||
|
-
|
||||||
|
* - __u8
|
||||||
|
- ``padding``
|
||||||
|
- Applications and drivers must set this to zero.
|
||||||
|
|
||||||
|
.. c:type:: v4l2_vp8_segment_header
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
|
||||||
|
|
||||||
|
.. flat-table:: struct v4l2_vp8_segment_header
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - __s8
|
||||||
|
- ``quant_update[4]``
|
||||||
|
- Signed quantizer value update.
|
||||||
|
* - __s8
|
||||||
|
- ``lf_update[4]``
|
||||||
|
- Signed loop filter level value update.
|
||||||
|
* - __u8
|
||||||
|
- ``segment_probs[3]``
|
||||||
|
- Segment probabilities.
|
||||||
|
* - __u8
|
||||||
|
- ``padding``
|
||||||
|
- Applications and drivers must set this to zero.
|
||||||
|
* - __u32
|
||||||
|
- ``flags``
|
||||||
|
- See :ref:`Segment Header Flags <vp8_segment_header_flags>`
|
||||||
|
|
||||||
|
.. _vp8_segment_header_flags:
|
||||||
|
|
||||||
|
``Segment Header Flags``
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. flat-table::
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - ``V4L2_VP8_SEGMENT_HEADER_FLAG_ENABLED``
|
||||||
|
- 0x01
|
||||||
|
- Enable/disable segment-based adjustments.
|
||||||
|
* - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_MAP``
|
||||||
|
- 0x02
|
||||||
|
- Indicates if the macroblock segmentation map is updated in this frame.
|
||||||
|
* - ``V4L2_VP8_SEGMENT_HEADER_FLAG_UPDATE_FEATURE_DATA``
|
||||||
|
- 0x04
|
||||||
|
- Indicates if the segment feature data is updated in this frame.
|
||||||
|
* - ``V4L2_VP8_SEGMENT_HEADER_FLAG_DELTA_VALUE_MODE``
|
||||||
|
- 0x08
|
||||||
|
- If is set, the segment feature data mode is delta-value.
|
||||||
|
If cleared, it's absolute-value.
|
||||||
|
|
||||||
|
.. c:type:: v4l2_vp8_loopfilter_header
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
|
||||||
|
|
||||||
|
.. flat-table:: struct v4l2_vp8_loopfilter_header
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - __s8
|
||||||
|
- ``ref_frm_delta[4]``
|
||||||
|
- Reference adjustment (signed) delta value.
|
||||||
|
* - __s8
|
||||||
|
- ``mb_mode_delta[4]``
|
||||||
|
- Macroblock prediction mode adjustment (signed) delta value.
|
||||||
|
* - __u8
|
||||||
|
- ``sharpness_level``
|
||||||
|
- Sharpness level
|
||||||
|
* - __u8
|
||||||
|
- ``level``
|
||||||
|
- Filter level
|
||||||
|
* - __u16
|
||||||
|
- ``padding``
|
||||||
|
- Applications and drivers must set this to zero.
|
||||||
|
* - __u32
|
||||||
|
- ``flags``
|
||||||
|
- See :ref:`Loopfilter Header Flags <vp8_loopfilter_header_flags>`
|
||||||
|
|
||||||
|
.. _vp8_loopfilter_header_flags:
|
||||||
|
|
||||||
|
``Loopfilter Header Flags``
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. flat-table::
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - ``V4L2_VP8_LF_HEADER_ADJ_ENABLE``
|
||||||
|
- 0x01
|
||||||
|
- Enable/disable macroblock-level loop filter adjustment.
|
||||||
|
* - ``V4L2_VP8_LF_HEADER_DELTA_UPDATE``
|
||||||
|
- 0x02
|
||||||
|
- Indicates if the delta values used in an adjustment are updated.
|
||||||
|
* - ``V4L2_VP8_LF_FILTER_TYPE_SIMPLE``
|
||||||
|
- 0x04
|
||||||
|
- If set, indicates the filter type is simple.
|
||||||
|
If cleared, the filter type is normal.
|
||||||
|
|
||||||
|
.. c:type:: v4l2_vp8_quantization_header
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
|
||||||
|
|
||||||
|
.. flat-table:: struct v4l2_vp8_quantization_header
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - __u8
|
||||||
|
- ``y_ac_qi``
|
||||||
|
- Luma AC coefficient table index.
|
||||||
|
* - __s8
|
||||||
|
- ``y_dc_delta``
|
||||||
|
- Luma DC delta vaue.
|
||||||
|
* - __s8
|
||||||
|
- ``y2_dc_delta``
|
||||||
|
- Y2 block DC delta value.
|
||||||
|
* - __s8
|
||||||
|
- ``y2_ac_delta``
|
||||||
|
- Y2 block AC delta value.
|
||||||
|
* - __s8
|
||||||
|
- ``uv_dc_delta``
|
||||||
|
- Chroma DC delta value.
|
||||||
|
* - __s8
|
||||||
|
- ``uv_ac_delta``
|
||||||
|
- Chroma AC delta value.
|
||||||
|
* - __u16
|
||||||
|
- ``padding``
|
||||||
|
- Applications and drivers must set this to zero.
|
||||||
|
|
||||||
|
.. c:type:: v4l2_vp8_entropy_header
|
||||||
|
|
||||||
|
.. cssclass:: longtable
|
||||||
|
|
||||||
|
.. tabularcolumns:: |p{1.5cm}|p{6.3cm}|p{9.4cm}|
|
||||||
|
|
||||||
|
.. flat-table:: struct v4l2_vp8_entropy_header
|
||||||
|
:header-rows: 0
|
||||||
|
:stub-columns: 0
|
||||||
|
:widths: 1 1 2
|
||||||
|
|
||||||
|
* - __u8
|
||||||
|
- ``coeff_probs[4][8][3][11]``
|
||||||
|
- Coefficient update probabilities.
|
||||||
|
* - __u8
|
||||||
|
- ``y_mode_probs[4]``
|
||||||
|
- Luma mode update probabilities.
|
||||||
|
* - __u8
|
||||||
|
- ``uv_mode_probs[3]``
|
||||||
|
- Chroma mode update probabilities.
|
||||||
|
* - __u8
|
||||||
|
- ``mv_probs[2][19]``
|
||||||
|
- MV decoding update probabilities.
|
||||||
|
* - __u8
|
||||||
|
- ``padding[3]``
|
||||||
|
- Applications and drivers must set this to zero.
|
||||||
|
|
||||||
.. raw:: latex
|
.. raw:: latex
|
||||||
|
|
||||||
\normalsize
|
\normalsize
|
||||||
|
@@ -900,7 +900,7 @@ V4L2 in Linux 2.6.19
|
|||||||
:ref:`VIDIOC_ENUM_FRAMEINTERVALS`
|
:ref:`VIDIOC_ENUM_FRAMEINTERVALS`
|
||||||
were added.
|
were added.
|
||||||
|
|
||||||
3. A new pixel format ``V4L2_PIX_FMT_RGB444`` (:ref:`rgb-formats`) was
|
3. A new pixel format ``V4L2_PIX_FMT_RGB444`` (:ref:`pixfmt-rgb`) was
|
||||||
added.
|
added.
|
||||||
|
|
||||||
|
|
||||||
|
38
Documentation/media/uapi/v4l/pixfmt-bayer.rst
Normal file
38
Documentation/media/uapi/v4l/pixfmt-bayer.rst
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
.. Permission is granted to copy, distribute and/or modify this
|
||||||
|
.. document under the terms of the GNU Free Documentation License,
|
||||||
|
.. Version 1.1 or any later version published by the Free Software
|
||||||
|
.. Foundation, with no Invariant Sections, no Front-Cover Texts
|
||||||
|
.. and no Back-Cover Texts. A copy of the license is included at
|
||||||
|
.. Documentation/media/uapi/fdl-appendix.rst.
|
||||||
|
..
|
||||||
|
.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
|
||||||
|
|
||||||
|
.. _pixfmt-bayer:
|
||||||
|
|
||||||
|
*****************
|
||||||
|
Raw Bayer Formats
|
||||||
|
*****************
|
||||||
|
|
||||||
|
Description
|
||||||
|
===========
|
||||||
|
|
||||||
|
The raw Bayer formats are used by image sensors before much if any processing is
|
||||||
|
performed on the image. The formats contain green, red and blue components, with
|
||||||
|
alternating lines of red and green, and blue and green pixels in different
|
||||||
|
orders. See also `the Wikipedia article on Bayer filter
|
||||||
|
<https://en.wikipedia.org/wiki/Bayer_filter>`__.
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
pixfmt-srggb8
|
||||||
|
pixfmt-srggb10
|
||||||
|
pixfmt-srggb10p
|
||||||
|
pixfmt-srggb10alaw8
|
||||||
|
pixfmt-srggb10dpcm8
|
||||||
|
pixfmt-srggb10-ipu3
|
||||||
|
pixfmt-srggb12
|
||||||
|
pixfmt-srggb12p
|
||||||
|
pixfmt-srggb14p
|
||||||
|
pixfmt-srggb16
|
@@ -41,7 +41,12 @@ Compressed Formats
|
|||||||
|
|
||||||
- ``V4L2_PIX_FMT_H264``
|
- ``V4L2_PIX_FMT_H264``
|
||||||
- 'H264'
|
- 'H264'
|
||||||
- H264 video elementary stream with start codes.
|
- H264 Access Unit.
|
||||||
|
The decoder expects one Access Unit per buffer.
|
||||||
|
The encoder generates one Access Unit per buffer.
|
||||||
|
If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
|
||||||
|
then the decoder has no requirements since it can parse all the
|
||||||
|
information from the raw bytestream.
|
||||||
* .. _V4L2-PIX-FMT-H264-NO-SC:
|
* .. _V4L2-PIX-FMT-H264-NO-SC:
|
||||||
|
|
||||||
- ``V4L2_PIX_FMT_H264_NO_SC``
|
- ``V4L2_PIX_FMT_H264_NO_SC``
|
||||||
@@ -52,16 +57,19 @@ Compressed Formats
|
|||||||
- ``V4L2_PIX_FMT_H264_MVC``
|
- ``V4L2_PIX_FMT_H264_MVC``
|
||||||
- 'M264'
|
- 'M264'
|
||||||
- H264 MVC video elementary stream.
|
- H264 MVC video elementary stream.
|
||||||
* .. _V4L2-PIX-FMT-H264-SLICE-RAW:
|
* .. _V4L2-PIX-FMT-H264-SLICE:
|
||||||
|
|
||||||
- ``V4L2_PIX_FMT_H264_SLICE_RAW``
|
- ``V4L2_PIX_FMT_H264_SLICE``
|
||||||
- 'S264'
|
- 'S264'
|
||||||
- H264 parsed slice data, without the start code and as
|
- H264 parsed slice data, without the start code and as
|
||||||
extracted from the H264 bitstream. This format is adapted for
|
extracted from the H264 bitstream. This format is adapted for
|
||||||
stateless video decoders that implement an H264 pipeline
|
stateless video decoders that implement an H264 pipeline
|
||||||
(using the :ref:`mem2mem` and :ref:`media-request-api`).
|
(using the :ref:`mem2mem` and :ref:`media-request-api`).
|
||||||
Metadata associated with the frame to decode are required to
|
This pixelformat has two modifiers that must be set at least once
|
||||||
be passed through the ``V4L2_CID_MPEG_VIDEO_H264_SPS``,
|
through the ``V4L2_CID_MPEG_VIDEO_H264_DECODE_MODE``
|
||||||
|
and ``V4L2_CID_MPEG_VIDEO_H264_START_CODE`` controls.
|
||||||
|
In addition, metadata associated with the frame to decode are
|
||||||
|
required to be passed through the ``V4L2_CID_MPEG_VIDEO_H264_SPS``,
|
||||||
``V4L2_CID_MPEG_VIDEO_H264_PPS``,
|
``V4L2_CID_MPEG_VIDEO_H264_PPS``,
|
||||||
``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX``,
|
``V4L2_CID_MPEG_VIDEO_H264_SCALING_MATRIX``,
|
||||||
``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS`` and
|
``V4L2_CID_MPEG_VIDEO_H264_SLICE_PARAMS`` and
|
||||||
@@ -86,12 +94,20 @@ Compressed Formats
|
|||||||
|
|
||||||
- ``V4L2_PIX_FMT_MPEG1``
|
- ``V4L2_PIX_FMT_MPEG1``
|
||||||
- 'MPG1'
|
- 'MPG1'
|
||||||
- MPEG1 video elementary stream.
|
- MPEG1 Picture. Each buffer starts with a Picture header, followed
|
||||||
|
by other headers as needed and ending with the Picture data.
|
||||||
|
If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
|
||||||
|
then the decoder has no requirements since it can parse all the
|
||||||
|
information from the raw bytestream.
|
||||||
* .. _V4L2-PIX-FMT-MPEG2:
|
* .. _V4L2-PIX-FMT-MPEG2:
|
||||||
|
|
||||||
- ``V4L2_PIX_FMT_MPEG2``
|
- ``V4L2_PIX_FMT_MPEG2``
|
||||||
- 'MPG2'
|
- 'MPG2'
|
||||||
- MPEG2 video elementary stream.
|
- MPEG2 Picture. Each buffer starts with a Picture header, followed
|
||||||
|
by other headers as needed and ending with the Picture data.
|
||||||
|
If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
|
||||||
|
then the decoder has no requirements since it can parse all the
|
||||||
|
information from the raw bytestream.
|
||||||
* .. _V4L2-PIX-FMT-MPEG2-SLICE:
|
* .. _V4L2-PIX-FMT-MPEG2-SLICE:
|
||||||
|
|
||||||
- ``V4L2_PIX_FMT_MPEG2_SLICE``
|
- ``V4L2_PIX_FMT_MPEG2_SLICE``
|
||||||
@@ -132,17 +148,46 @@ Compressed Formats
|
|||||||
|
|
||||||
- ``V4L2_PIX_FMT_VP8``
|
- ``V4L2_PIX_FMT_VP8``
|
||||||
- 'VP80'
|
- 'VP80'
|
||||||
- VP8 video elementary stream.
|
- VP8 compressed video frame. The encoder generates one
|
||||||
|
compressed frame per buffer, and the decoder requires one
|
||||||
|
compressed frame per buffer.
|
||||||
|
* .. _V4L2-PIX-FMT-VP8-FRAME:
|
||||||
|
|
||||||
|
- ``V4L2_PIX_FMT_VP8_FRAME``
|
||||||
|
- 'VP8F'
|
||||||
|
- VP8 parsed frame, as extracted from the container.
|
||||||
|
This format is adapted for stateless video decoders that implement a
|
||||||
|
VP8 pipeline (using the :ref:`mem2mem` and :ref:`media-request-api`).
|
||||||
|
Metadata associated with the frame to decode is required to be passed
|
||||||
|
through the ``V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER`` control.
|
||||||
|
See the :ref:`associated Codec Control IDs <v4l2-mpeg-vp8>`.
|
||||||
|
Exactly one output and one capture buffer must be provided for use with
|
||||||
|
this pixel format. The output buffer must contain the appropriate number
|
||||||
|
of macroblocks to decode a full corresponding frame to the matching
|
||||||
|
capture buffer.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
This format is not yet part of the public kernel API and it
|
||||||
|
is expected to change.
|
||||||
|
|
||||||
* .. _V4L2-PIX-FMT-VP9:
|
* .. _V4L2-PIX-FMT-VP9:
|
||||||
|
|
||||||
- ``V4L2_PIX_FMT_VP9``
|
- ``V4L2_PIX_FMT_VP9``
|
||||||
- 'VP90'
|
- 'VP90'
|
||||||
- VP9 video elementary stream.
|
- VP9 compressed video frame. The encoder generates one
|
||||||
|
compressed frame per buffer, and the decoder requires one
|
||||||
|
compressed frame per buffer.
|
||||||
* .. _V4L2-PIX-FMT-HEVC:
|
* .. _V4L2-PIX-FMT-HEVC:
|
||||||
|
|
||||||
- ``V4L2_PIX_FMT_HEVC``
|
- ``V4L2_PIX_FMT_HEVC``
|
||||||
- 'HEVC'
|
- 'HEVC'
|
||||||
- HEVC/H.265 video elementary stream.
|
- HEVC/H.265 Access Unit.
|
||||||
|
The decoder expects one Access Unit per buffer.
|
||||||
|
The encoder generates one Access Unit per buffer.
|
||||||
|
If :ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
|
||||||
|
then the decoder has no requirements since it can parse all the
|
||||||
|
information from the raw bytestream.
|
||||||
* .. _V4L2-PIX-FMT-FWHT:
|
* .. _V4L2-PIX-FMT-FWHT:
|
||||||
|
|
||||||
- ``V4L2_PIX_FMT_FWHT``
|
- ``V4L2_PIX_FMT_FWHT``
|
||||||
@@ -150,6 +195,8 @@ Compressed Formats
|
|||||||
- Video elementary stream using a codec based on the Fast Walsh Hadamard
|
- Video elementary stream using a codec based on the Fast Walsh Hadamard
|
||||||
Transform. This codec is implemented by the vicodec ('Virtual Codec')
|
Transform. This codec is implemented by the vicodec ('Virtual Codec')
|
||||||
driver. See the codec-fwht.h header for more details.
|
driver. See the codec-fwht.h header for more details.
|
||||||
|
:ref:`VIDIOC_ENUM_FMT` reports ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
|
||||||
|
since the decoder can parse all the information from the raw bytestream.
|
||||||
* .. _V4L2-PIX-FMT-FWHT-STATELESS:
|
* .. _V4L2-PIX-FMT-FWHT-STATELESS:
|
||||||
|
|
||||||
- ``V4L2_PIX_FMT_FWHT_STATELESS``
|
- ``V4L2_PIX_FMT_FWHT_STATELESS``
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -39,12 +39,17 @@ Single-planar format structure
|
|||||||
to a multiple of the scale factor of any smaller planes. For
|
to a multiple of the scale factor of any smaller planes. For
|
||||||
example when the image format is YUV 4:2:0, ``width`` and
|
example when the image format is YUV 4:2:0, ``width`` and
|
||||||
``height`` must be multiples of two.
|
``height`` must be multiples of two.
|
||||||
|
|
||||||
|
For compressed formats that contain the resolution information encoded
|
||||||
|
inside the stream, when fed to a stateful mem2mem decoder, the fields
|
||||||
|
may be zero to rely on the decoder to detect the right values. For more
|
||||||
|
details see :ref:`decoder` and format descriptions.
|
||||||
* - __u32
|
* - __u32
|
||||||
- ``pixelformat``
|
- ``pixelformat``
|
||||||
- The pixel format or type of compression, set by the application.
|
- The pixel format or type of compression, set by the application.
|
||||||
This is a little endian
|
This is a little endian
|
||||||
:ref:`four character code <v4l2-fourcc>`. V4L2 defines standard
|
:ref:`four character code <v4l2-fourcc>`. V4L2 defines standard
|
||||||
RGB formats in :ref:`rgb-formats`, YUV formats in
|
RGB formats in :ref:`pixfmt-rgb`, YUV formats in
|
||||||
:ref:`yuv-formats`, and reserved codes in
|
:ref:`yuv-formats`, and reserved codes in
|
||||||
:ref:`reserved-formats`
|
:ref:`reserved-formats`
|
||||||
* - __u32
|
* - __u32
|
||||||
|
@@ -31,6 +31,7 @@ see also :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`.)
|
|||||||
pixfmt-intro
|
pixfmt-intro
|
||||||
pixfmt-indexed
|
pixfmt-indexed
|
||||||
pixfmt-rgb
|
pixfmt-rgb
|
||||||
|
pixfmt-bayer
|
||||||
yuv-formats
|
yuv-formats
|
||||||
hsv-formats
|
hsv-formats
|
||||||
depth-formats
|
depth-formats
|
||||||
|
@@ -85,6 +85,14 @@ formats in memory (a raw Bayer image won't be magically converted to
|
|||||||
JPEG just by storing it to memory), there is no one-to-one
|
JPEG just by storing it to memory), there is no one-to-one
|
||||||
correspondence between them.
|
correspondence between them.
|
||||||
|
|
||||||
|
The media bus pixel codes document parallel formats. Should the pixel data be
|
||||||
|
transported over a serial bus, the media bus pixel code that describes a
|
||||||
|
parallel format that transfers a sample on a single clock cycle is used. For
|
||||||
|
instance, both MEDIA_BUS_FMT_BGR888_1X24 and MEDIA_BUS_FMT_BGR888_3X8 are used
|
||||||
|
on parallel busses for transferring an 8 bits per sample BGR data, whereas on
|
||||||
|
serial busses the data in this format is only referred to using
|
||||||
|
MEDIA_BUS_FMT_BGR888_1X24. This is because there is effectively only a single
|
||||||
|
way to transport that format on the serial busses.
|
||||||
|
|
||||||
Packed RGB Formats
|
Packed RGB Formats
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
@@ -60,6 +60,10 @@ Authors, in alphabetical order:
|
|||||||
|
|
||||||
- Original author of the V4L2 API and documentation.
|
- Original author of the V4L2 API and documentation.
|
||||||
|
|
||||||
|
- Figa, Tomasz <tfiga@chromium.org>
|
||||||
|
|
||||||
|
- Documented the memory-to-memory decoder interface.
|
||||||
|
|
||||||
- H Schimek, Michael <mschimek@gmx.at>
|
- H Schimek, Michael <mschimek@gmx.at>
|
||||||
|
|
||||||
- Original author of the V4L2 API and documentation.
|
- Original author of the V4L2 API and documentation.
|
||||||
@@ -68,6 +72,10 @@ Authors, in alphabetical order:
|
|||||||
|
|
||||||
- Documented the Digital Video timings API.
|
- Documented the Digital Video timings API.
|
||||||
|
|
||||||
|
- Osciak, Pawel <posciak@chromium.org>
|
||||||
|
|
||||||
|
- Documented the memory-to-memory decoder interface.
|
||||||
|
|
||||||
- Osciak, Pawel <pawel@osciak.com>
|
- Osciak, Pawel <pawel@osciak.com>
|
||||||
|
|
||||||
- Designed and documented the multi-planar API.
|
- Designed and documented the multi-planar API.
|
||||||
@@ -92,7 +100,7 @@ Authors, in alphabetical order:
|
|||||||
|
|
||||||
- Designed and documented the VIDIOC_LOG_STATUS ioctl, the extended control ioctls, major parts of the sliced VBI API, the MPEG encoder and decoder APIs and the DV Timings API.
|
- Designed and documented the VIDIOC_LOG_STATUS ioctl, the extended control ioctls, major parts of the sliced VBI API, the MPEG encoder and decoder APIs and the DV Timings API.
|
||||||
|
|
||||||
**Copyright** |copy| 1999-2016: Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, Pawel Osciak, Sakari Ailus & Antti Palosaari.
|
**Copyright** |copy| 1999-2018: Bill Dirks, Michael H. Schimek, Hans Verkuil, Martin Rubli, Andy Walls, Muralidharan Karicheri, Mauro Carvalho Chehab, Pawel Osciak, Sakari Ailus & Antti Palosaari, Tomasz Figa
|
||||||
|
|
||||||
Except when explicitly stated as GPL, programming examples within this
|
Except when explicitly stated as GPL, programming examples within this
|
||||||
part can be used and distributed without restrictions.
|
part can be used and distributed without restrictions.
|
||||||
|
@@ -56,14 +56,16 @@ The ``cmd`` field must contain the command code. Some commands use the
|
|||||||
|
|
||||||
A :ref:`write() <func-write>` or :ref:`VIDIOC_STREAMON`
|
A :ref:`write() <func-write>` or :ref:`VIDIOC_STREAMON`
|
||||||
call sends an implicit START command to the decoder if it has not been
|
call sends an implicit START command to the decoder if it has not been
|
||||||
started yet.
|
started yet. Applies to both queues of mem2mem decoders.
|
||||||
|
|
||||||
A :ref:`close() <func-close>` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`
|
A :ref:`close() <func-close>` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`
|
||||||
call of a streaming file descriptor sends an implicit immediate STOP
|
call of a streaming file descriptor sends an implicit immediate STOP
|
||||||
command to the decoder, and all buffered data is discarded.
|
command to the decoder, and all buffered data is discarded. Applies to both
|
||||||
|
queues of mem2mem decoders.
|
||||||
|
|
||||||
These ioctls are optional, not all drivers may support them. They were
|
In principle, these ioctls are optional, not all drivers may support them. They were
|
||||||
introduced in Linux 3.3.
|
introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decoders
|
||||||
|
(as further documented in :ref:`decoder`).
|
||||||
|
|
||||||
|
|
||||||
.. tabularcolumns:: |p{1.1cm}|p{2.4cm}|p{1.2cm}|p{1.6cm}|p{10.6cm}|
|
.. tabularcolumns:: |p{1.1cm}|p{2.4cm}|p{1.2cm}|p{1.6cm}|p{10.6cm}|
|
||||||
@@ -167,26 +169,32 @@ introduced in Linux 3.3.
|
|||||||
``V4L2_DEC_CMD_RESUME`` for that. This command has one flag:
|
``V4L2_DEC_CMD_RESUME`` for that. This command has one flag:
|
||||||
``V4L2_DEC_CMD_START_MUTE_AUDIO``. If set, then audio will be
|
``V4L2_DEC_CMD_START_MUTE_AUDIO``. If set, then audio will be
|
||||||
muted when playing back at a non-standard speed.
|
muted when playing back at a non-standard speed.
|
||||||
|
|
||||||
|
For a device implementing the :ref:`decoder`, once the drain sequence
|
||||||
|
is initiated with the ``V4L2_DEC_CMD_STOP`` command, it must be driven
|
||||||
|
to completion before this command can be invoked. Any attempt to
|
||||||
|
invoke the command while the drain sequence is in progress will trigger
|
||||||
|
an ``EBUSY`` error code. The command may be also used to restart the
|
||||||
|
decoder in case of an implicit stop initiated by the decoder itself,
|
||||||
|
without the ``V4L2_DEC_CMD_STOP`` being called explicitly. See
|
||||||
|
:ref:`decoder` for more details.
|
||||||
* - ``V4L2_DEC_CMD_STOP``
|
* - ``V4L2_DEC_CMD_STOP``
|
||||||
- 1
|
- 1
|
||||||
- Stop the decoder. When the decoder is already stopped, this
|
- Stop the decoder. When the decoder is already stopped, this
|
||||||
command does nothing. This command has two flags: if
|
command does nothing. This command has two flags: if
|
||||||
``V4L2_DEC_CMD_STOP_TO_BLACK`` is set, then the decoder will set
|
``V4L2_DEC_CMD_STOP_TO_BLACK`` is set, then the decoder will set
|
||||||
the picture to black after it stopped decoding. Otherwise the last
|
the picture to black after it stopped decoding. Otherwise the last
|
||||||
image will repeat. mem2mem decoders will stop producing new frames
|
image will repeat. If
|
||||||
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
|
``V4L2_DEC_CMD_STOP_IMMEDIATELY`` is set, then the decoder stops
|
||||||
immediately (ignoring the ``pts`` value), otherwise it will keep
|
immediately (ignoring the ``pts`` value), otherwise it will keep
|
||||||
decoding until timestamp >= pts or until the last of the pending
|
decoding until timestamp >= pts or until the last of the pending
|
||||||
data from its internal buffers was decoded.
|
data from its internal buffers was decoded.
|
||||||
|
|
||||||
|
For a device implementing the :ref:`decoder`, the command will initiate
|
||||||
|
the drain sequence as documented in :ref:`decoder`. No flags or other
|
||||||
|
arguments are accepted in this case. Any attempt to invoke the command
|
||||||
|
again before the sequence completes will trigger an ``EBUSY`` error
|
||||||
|
code.
|
||||||
* - ``V4L2_DEC_CMD_PAUSE``
|
* - ``V4L2_DEC_CMD_PAUSE``
|
||||||
- 2
|
- 2
|
||||||
- Pause the decoder. When the decoder has not been started yet, the
|
- Pause the decoder. When the decoder has not been started yet, the
|
||||||
@@ -209,6 +217,11 @@ On success 0 is returned, on error -1 and the ``errno`` variable is set
|
|||||||
appropriately. The generic error codes are described at the
|
appropriately. The generic error codes are described at the
|
||||||
:ref:`Generic Error Codes <gen-errors>` chapter.
|
:ref:`Generic Error Codes <gen-errors>` chapter.
|
||||||
|
|
||||||
|
EBUSY
|
||||||
|
A drain sequence of a device implementing the :ref:`decoder` is still in
|
||||||
|
progress. It is not allowed to issue another decoder command until it
|
||||||
|
completes.
|
||||||
|
|
||||||
EINVAL
|
EINVAL
|
||||||
The ``cmd`` field is invalid.
|
The ``cmd`` field is invalid.
|
||||||
|
|
||||||
|
@@ -389,14 +389,19 @@ call.
|
|||||||
decoder. Applications will have to query the new resolution (if
|
decoder. Applications will have to query the new resolution (if
|
||||||
any, the signal may also have been lost).
|
any, the signal may also have been lost).
|
||||||
|
|
||||||
|
For stateful decoders follow the guidelines in :ref:`decoder`.
|
||||||
|
Video Capture devices have to query the new timings using
|
||||||
|
:ref:`VIDIOC_QUERY_DV_TIMINGS` or
|
||||||
|
:ref:`VIDIOC_QUERYSTD <VIDIOC_QUERYSTD>`.
|
||||||
|
|
||||||
*Important*: even if the new video timings appear identical to the old
|
*Important*: even if the new video timings appear identical to the old
|
||||||
ones, receiving this event indicates that there was an issue with the
|
ones, receiving this event indicates that there was an issue with the
|
||||||
video signal and you must stop and restart streaming
|
video signal and you must stop and restart streaming
|
||||||
(:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`
|
(:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`
|
||||||
followed by :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`). The reason is
|
followed by :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`). The reason is
|
||||||
that many devices are not able to recover from a temporary loss of
|
that many Video Capture devices are not able to recover from a temporary
|
||||||
signal and so restarting streaming I/O is required in order for the
|
loss of signal and so restarting streaming I/O is required in order for
|
||||||
hardware to synchronize to the video signal.
|
the hardware to synchronize to the video signal.
|
||||||
|
|
||||||
|
|
||||||
Return Value
|
Return Value
|
||||||
|
@@ -127,6 +127,22 @@ one until ``EINVAL`` is returned.
|
|||||||
- This format is not native to the device but emulated through
|
- This format is not native to the device but emulated through
|
||||||
software (usually libv4l2), where possible try to use a native
|
software (usually libv4l2), where possible try to use a native
|
||||||
format instead for better performance.
|
format instead for better performance.
|
||||||
|
* - ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
|
||||||
|
- 0x0004
|
||||||
|
- The hardware decoder for this compressed bytestream format (aka coded
|
||||||
|
format) is capable of parsing a continuous bytestream. Applications do
|
||||||
|
not need to parse the bytestream themselves to find the boundaries
|
||||||
|
between frames/fields. This flag can only be used in combination with
|
||||||
|
the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to compressed
|
||||||
|
formats only. This flag is valid for stateful decoders only.
|
||||||
|
* - ``V4L2_FMT_FLAG_DYN_RESOLUTION``
|
||||||
|
- 0x0008
|
||||||
|
- Dynamic resolution switching is supported by the device for this
|
||||||
|
compressed bytestream format (aka coded format). It will notify the user
|
||||||
|
via the event ``V4L2_EVENT_SOURCE_CHANGE`` when changes in the video
|
||||||
|
parameters are detected. This flag can only be used in combination
|
||||||
|
with the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to
|
||||||
|
compressed formats only. It is also only applies to stateful codecs.
|
||||||
|
|
||||||
|
|
||||||
Return Value
|
Return Value
|
||||||
|
@@ -39,8 +39,8 @@ Arguments
|
|||||||
File descriptor returned by :ref:`open() <func-open>`.
|
File descriptor returned by :ref:`open() <func-open>`.
|
||||||
|
|
||||||
``argp``
|
``argp``
|
||||||
Pointer to struct :c:type:`v4l2_queryctl`, :c:type:`v4l2_query_ext_ctrl`
|
Pointer to struct :c:type:`v4l2_queryctrl`, :c:type:`v4l2_query_ext_ctrl`
|
||||||
or :c:type`v4l2_querymenu` (depending on the ioctl).
|
or :c:type:`v4l2_querymenu` (depending on the ioctl).
|
||||||
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
@@ -41,7 +41,7 @@ data from MIPI CSI-2 camera sensor. It has one source pad, corresponding to the
|
|||||||
virtual channel 0. This module is compliant to previous version of Samsung
|
virtual channel 0. This module is compliant to previous version of Samsung
|
||||||
D-phy, and supports two D-PHY Rx Data lanes.
|
D-phy, and supports two D-PHY Rx Data lanes.
|
||||||
|
|
||||||
csi_mux
|
csi-mux
|
||||||
-------
|
-------
|
||||||
|
|
||||||
This is the video multiplexer. It has two sink pads to select from either camera
|
This is the video multiplexer. It has two sink pads to select from either camera
|
||||||
@@ -56,7 +56,7 @@ can interface directly with Parallel and MIPI CSI-2 buses. It has 256 x 64 FIFO
|
|||||||
to store received image pixel data and embedded DMA controllers to transfer data
|
to store received image pixel data and embedded DMA controllers to transfer data
|
||||||
from the FIFO through AHB bus.
|
from the FIFO through AHB bus.
|
||||||
|
|
||||||
This entity has one sink pad that receives from the csi_mux entity and a single
|
This entity has one sink pad that receives from the csi-mux entity and a single
|
||||||
source pad that routes video frames directly to memory buffers. This pad is
|
source pad that routes video frames directly to memory buffers. This pad is
|
||||||
routed to a capture device node.
|
routed to a capture device node.
|
||||||
|
|
||||||
@@ -81,14 +81,14 @@ an output of 800x600, and BGGR 10 bit bayer format:
|
|||||||
|
|
||||||
# Setup links
|
# Setup links
|
||||||
media-ctl -l "'ov2680 1-0036':0 -> 'imx7-mipi-csis.0':0[1]"
|
media-ctl -l "'ov2680 1-0036':0 -> 'imx7-mipi-csis.0':0[1]"
|
||||||
media-ctl -l "'imx7-mipi-csis.0':1 -> 'csi_mux':1[1]"
|
media-ctl -l "'imx7-mipi-csis.0':1 -> 'csi-mux':1[1]"
|
||||||
media-ctl -l "'csi_mux':2 -> 'csi':0[1]"
|
media-ctl -l "'csi-mux':2 -> 'csi':0[1]"
|
||||||
media-ctl -l "'csi':1 -> 'csi capture':0[1]"
|
media-ctl -l "'csi':1 -> 'csi capture':0[1]"
|
||||||
|
|
||||||
# Configure pads for pipeline
|
# Configure pads for pipeline
|
||||||
media-ctl -V "'ov2680 1-0036':0 [fmt:SBGGR10_1X10/800x600 field:none]"
|
media-ctl -V "'ov2680 1-0036':0 [fmt:SBGGR10_1X10/800x600 field:none]"
|
||||||
media-ctl -V "'csi_mux':1 [fmt:SBGGR10_1X10/800x600 field:none]"
|
media-ctl -V "'csi-mux':1 [fmt:SBGGR10_1X10/800x600 field:none]"
|
||||||
media-ctl -V "'csi_mux':2 [fmt:SBGGR10_1X10/800x600 field:none]"
|
media-ctl -V "'csi-mux':2 [fmt:SBGGR10_1X10/800x600 field:none]"
|
||||||
media-ctl -V "'imx7-mipi-csis.0':0 [fmt:SBGGR10_1X10/800x600 field:none]"
|
media-ctl -V "'imx7-mipi-csis.0':0 [fmt:SBGGR10_1X10/800x600 field:none]"
|
||||||
media-ctl -V "'csi':0 [fmt:SBGGR10_1X10/800x600 field:none]"
|
media-ctl -V "'csi':0 [fmt:SBGGR10_1X10/800x600 field:none]"
|
||||||
|
|
||||||
@@ -97,27 +97,27 @@ the resolutions supported by the sensor.
|
|||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
root@imx7s-warp:~# media-ctl -p
|
# media-ctl -p
|
||||||
Media controller API version 4.17.0
|
Media controller API version 5.2.0
|
||||||
|
|
||||||
Media device information
|
Media device information
|
||||||
------------------------
|
------------------------
|
||||||
driver imx-media
|
driver imx7-csi
|
||||||
model imx-media
|
model imx-media
|
||||||
serial
|
serial
|
||||||
bus info
|
bus info
|
||||||
hw revision 0x0
|
hw revision 0x0
|
||||||
driver version 4.17.0
|
driver version 5.2.0
|
||||||
|
|
||||||
Device topology
|
Device topology
|
||||||
- entity 1: csi (2 pads, 2 links)
|
- entity 1: csi (2 pads, 2 links)
|
||||||
type V4L2 subdev subtype Unknown flags 0
|
type V4L2 subdev subtype Unknown flags 0
|
||||||
device node name /dev/v4l-subdev0
|
device node name /dev/v4l-subdev0
|
||||||
pad0: Sink
|
pad0: Sink
|
||||||
[fmt:SBGGR10_1X10/800x600 field:none]
|
[fmt:SBGGR10_1X10/800x600 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
|
||||||
<- "csi_mux":2 [ENABLED]
|
<- "csi-mux":2 [ENABLED]
|
||||||
pad1: Source
|
pad1: Source
|
||||||
[fmt:SBGGR10_1X10/800x600 field:none]
|
[fmt:SBGGR10_1X10/800x600 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range]
|
||||||
-> "csi capture":0 [ENABLED]
|
-> "csi capture":0 [ENABLED]
|
||||||
|
|
||||||
- entity 4: csi capture (1 pad, 1 link)
|
- entity 4: csi capture (1 pad, 1 link)
|
||||||
@@ -126,16 +126,16 @@ the resolutions supported by the sensor.
|
|||||||
pad0: Sink
|
pad0: Sink
|
||||||
<- "csi":1 [ENABLED]
|
<- "csi":1 [ENABLED]
|
||||||
|
|
||||||
- entity 10: csi_mux (3 pads, 2 links)
|
- entity 10: csi-mux (3 pads, 2 links)
|
||||||
type V4L2 subdev subtype Unknown flags 0
|
type V4L2 subdev subtype Unknown flags 0
|
||||||
device node name /dev/v4l-subdev1
|
device node name /dev/v4l-subdev1
|
||||||
pad0: Sink
|
pad0: Sink
|
||||||
[fmt:unknown/0x0]
|
[fmt:Y8_1X8/1x1 field:none]
|
||||||
pad1: Sink
|
pad1: Sink
|
||||||
[fmt:unknown/800x600 field:none]
|
[fmt:SBGGR10_1X10/800x600 field:none]
|
||||||
<- "imx7-mipi-csis.0":1 [ENABLED]
|
<- "imx7-mipi-csis.0":1 [ENABLED]
|
||||||
pad2: Source
|
pad2: Source
|
||||||
[fmt:unknown/800x600 field:none]
|
[fmt:SBGGR10_1X10/800x600 field:none]
|
||||||
-> "csi":0 [ENABLED]
|
-> "csi":0 [ENABLED]
|
||||||
|
|
||||||
- entity 14: imx7-mipi-csis.0 (2 pads, 2 links)
|
- entity 14: imx7-mipi-csis.0 (2 pads, 2 links)
|
||||||
@@ -146,16 +146,15 @@ the resolutions supported by the sensor.
|
|||||||
<- "ov2680 1-0036":0 [ENABLED]
|
<- "ov2680 1-0036":0 [ENABLED]
|
||||||
pad1: Source
|
pad1: Source
|
||||||
[fmt:SBGGR10_1X10/800x600 field:none]
|
[fmt:SBGGR10_1X10/800x600 field:none]
|
||||||
-> "csi_mux":1 [ENABLED]
|
-> "csi-mux":1 [ENABLED]
|
||||||
|
|
||||||
- entity 17: ov2680 1-0036 (1 pad, 1 link)
|
- entity 17: ov2680 1-0036 (1 pad, 1 link)
|
||||||
type V4L2 subdev subtype Sensor flags 0
|
type V4L2 subdev subtype Sensor flags 0
|
||||||
device node name /dev/v4l-subdev3
|
device node name /dev/v4l-subdev3
|
||||||
pad0: Source
|
pad0: Source
|
||||||
[fmt:SBGGR10_1X10/800x600 field:none]
|
[fmt:SBGGR10_1X10/800x600@1/30 field:none colorspace:srgb]
|
||||||
-> "imx7-mipi-csis.0":0 [ENABLED]
|
-> "imx7-mipi-csis.0":0 [ENABLED]
|
||||||
|
|
||||||
|
|
||||||
References
|
References
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@ recompile the driver to achieve your own topology. This is the default topology:
|
|||||||
.. _vimc_topology_graph:
|
.. _vimc_topology_graph:
|
||||||
|
|
||||||
.. kernel-figure:: vimc.dot
|
.. kernel-figure:: vimc.dot
|
||||||
:alt: vimc.dot
|
:alt: Diagram of the default media pipeline topology
|
||||||
:align: center
|
:align: center
|
||||||
|
|
||||||
Media pipeline graph on vimc
|
Media pipeline graph on vimc
|
||||||
@@ -96,3 +96,14 @@ those arguments to each subdevice, not to the vimc module. For example::
|
|||||||
Window size to calculate the mean. Note: the window size needs to be an
|
Window size to calculate the mean. Note: the window size needs to be an
|
||||||
odd number, as the main pixel stays in the center of the window,
|
odd number, as the main pixel stays in the center of the window,
|
||||||
otherwise the next odd number is considered (the default value is 3).
|
otherwise the next odd number is considered (the default value is 3).
|
||||||
|
|
||||||
|
Source code documentation
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
vimc-streamer
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. kernel-doc:: drivers/media/platform/vimc/vimc-streamer.h
|
||||||
|
:internal:
|
||||||
|
|
||||||
|
.. kernel-doc:: drivers/media/platform/vimc/vimc-streamer.c
|
||||||
|
@@ -180,15 +180,17 @@ replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA reserved-formats
|
|||||||
# V4L2 format flags
|
# V4L2 format flags
|
||||||
replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags
|
replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags
|
||||||
replace define V4L2_FMT_FLAG_EMULATED fmtdesc-flags
|
replace define V4L2_FMT_FLAG_EMULATED fmtdesc-flags
|
||||||
|
replace define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM fmtdesc-flags
|
||||||
|
replace define V4L2_FMT_FLAG_DYN_RESOLUTION fmtdesc-flags
|
||||||
|
|
||||||
# V4L2 tymecode types
|
# V4L2 timecode types
|
||||||
replace define V4L2_TC_TYPE_24FPS timecode-type
|
replace define V4L2_TC_TYPE_24FPS timecode-type
|
||||||
replace define V4L2_TC_TYPE_25FPS timecode-type
|
replace define V4L2_TC_TYPE_25FPS timecode-type
|
||||||
replace define V4L2_TC_TYPE_30FPS timecode-type
|
replace define V4L2_TC_TYPE_30FPS timecode-type
|
||||||
replace define V4L2_TC_TYPE_50FPS timecode-type
|
replace define V4L2_TC_TYPE_50FPS timecode-type
|
||||||
replace define V4L2_TC_TYPE_60FPS timecode-type
|
replace define V4L2_TC_TYPE_60FPS timecode-type
|
||||||
|
|
||||||
# V4L2 tymecode flags
|
# V4L2 timecode flags
|
||||||
replace define V4L2_TC_FLAG_DROPFRAME timecode-flags
|
replace define V4L2_TC_FLAG_DROPFRAME timecode-flags
|
||||||
replace define V4L2_TC_FLAG_COLORFRAME timecode-flags
|
replace define V4L2_TC_FLAG_COLORFRAME timecode-flags
|
||||||
replace define V4L2_TC_USERBITS_field timecode-flags
|
replace define V4L2_TC_USERBITS_field timecode-flags
|
||||||
|
36
MAINTAINERS
36
MAINTAINERS
@@ -1412,6 +1412,14 @@ F: drivers/pinctrl/sunxi/
|
|||||||
F: drivers/soc/sunxi/
|
F: drivers/soc/sunxi/
|
||||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
|
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git
|
||||||
|
|
||||||
|
Allwinner A10 CSI driver
|
||||||
|
M: Maxime Ripard <mripard@kernel.org>
|
||||||
|
L: linux-media@vger.kernel.org
|
||||||
|
T: git git://linuxtv.org/media_tree.git
|
||||||
|
F: drivers/media/platform/sunxi/sun4i-csi/
|
||||||
|
F: Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
|
||||||
|
S: Maintained
|
||||||
|
|
||||||
ARM/Amlogic Meson SoC CLOCK FRAMEWORK
|
ARM/Amlogic Meson SoC CLOCK FRAMEWORK
|
||||||
M: Neil Armstrong <narmstrong@baylibre.com>
|
M: Neil Armstrong <narmstrong@baylibre.com>
|
||||||
M: Jerome Brunet <jbrunet@baylibre.com>
|
M: Jerome Brunet <jbrunet@baylibre.com>
|
||||||
@@ -11846,6 +11854,21 @@ T: git git://linuxtv.org/media_tree.git
|
|||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/media/i2c/ov5647.c
|
F: drivers/media/i2c/ov5647.c
|
||||||
|
|
||||||
|
OMNIVISION OV5670 SENSOR DRIVER
|
||||||
|
M: Chiranjeevi Rapolu <chiranjeevi.rapolu@intel.com>
|
||||||
|
M: Hyungwoo Yang <hyungwoo.yang@intel.com>
|
||||||
|
L: linux-media@vger.kernel.org
|
||||||
|
T: git git://linuxtv.org/media_tree.git
|
||||||
|
S: Maintained
|
||||||
|
F: drivers/media/i2c/ov5670.c
|
||||||
|
|
||||||
|
OMNIVISION OV5675 SENSOR DRIVER
|
||||||
|
M: Shawn Tu <shawnx.tu@intel.com>
|
||||||
|
L: linux-media@vger.kernel.org
|
||||||
|
T: git git://linuxtv.org/media_tree.git
|
||||||
|
S: Maintained
|
||||||
|
F: drivers/media/i2c/ov5675.c
|
||||||
|
|
||||||
OMNIVISION OV5695 SENSOR DRIVER
|
OMNIVISION OV5695 SENSOR DRIVER
|
||||||
M: Shunqian Zheng <zhengsq@rock-chips.com>
|
M: Shunqian Zheng <zhengsq@rock-chips.com>
|
||||||
L: linux-media@vger.kernel.org
|
L: linux-media@vger.kernel.org
|
||||||
@@ -13747,7 +13770,8 @@ F: include/linux/hid-roccat*
|
|||||||
F: Documentation/ABI/*/sysfs-driver-hid-roccat*
|
F: Documentation/ABI/*/sysfs-driver-hid-roccat*
|
||||||
|
|
||||||
ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
|
ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
|
||||||
M: Jacob chen <jacob2.chen@rock-chips.com>
|
M: Jacob Chen <jacob-chen@iotwrt.com>
|
||||||
|
M: Ezequiel Garcia <ezequiel@collabora.com>
|
||||||
L: linux-media@vger.kernel.org
|
L: linux-media@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/media/platform/rockchip/rga/
|
F: drivers/media/platform/rockchip/rga/
|
||||||
@@ -13757,7 +13781,7 @@ HANTRO VPU CODEC DRIVER
|
|||||||
M: Ezequiel Garcia <ezequiel@collabora.com>
|
M: Ezequiel Garcia <ezequiel@collabora.com>
|
||||||
L: linux-media@vger.kernel.org
|
L: linux-media@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: drivers/staging/media/platform/hantro/
|
F: drivers/staging/media/hantro/
|
||||||
F: Documentation/devicetree/bindings/media/rockchip-vpu.txt
|
F: Documentation/devicetree/bindings/media/rockchip-vpu.txt
|
||||||
|
|
||||||
ROCKER DRIVER
|
ROCKER DRIVER
|
||||||
@@ -17822,14 +17846,6 @@ S: Maintained
|
|||||||
F: mm/zpool.c
|
F: mm/zpool.c
|
||||||
F: include/linux/zpool.h
|
F: include/linux/zpool.h
|
||||||
|
|
||||||
ZR36067 VIDEO FOR LINUX DRIVER
|
|
||||||
L: mjpeg-users@lists.sourceforge.net
|
|
||||||
L: linux-media@vger.kernel.org
|
|
||||||
W: http://mjpeg.sourceforge.net/driver-zoran/
|
|
||||||
T: hg https://linuxtv.org/hg/v4l-dvb
|
|
||||||
S: Odd Fixes
|
|
||||||
F: drivers/staging/media/zoran/
|
|
||||||
|
|
||||||
ZRAM COMPRESSED RAM BLOCK DEVICE DRVIER
|
ZRAM COMPRESSED RAM BLOCK DEVICE DRVIER
|
||||||
M: Minchan Kim <minchan@kernel.org>
|
M: Minchan Kim <minchan@kernel.org>
|
||||||
M: Nitin Gupta <ngupta@vflare.org>
|
M: Nitin Gupta <ngupta@vflare.org>
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/err.h>
|
#include <linux/err.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
@@ -43,11 +44,17 @@ static struct resource omap_vout_resource[2] = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static u64 omap_vout_dma_mask = DMA_BIT_MASK(32);
|
||||||
|
|
||||||
static struct platform_device omap_vout_device = {
|
static struct platform_device omap_vout_device = {
|
||||||
.name = "omap_vout",
|
.name = "omap_vout",
|
||||||
.num_resources = ARRAY_SIZE(omap_vout_resource),
|
.num_resources = ARRAY_SIZE(omap_vout_resource),
|
||||||
.resource = &omap_vout_resource[0],
|
.resource = &omap_vout_resource[0],
|
||||||
.id = -1,
|
.id = -1,
|
||||||
|
.dev = {
|
||||||
|
.dma_mask = &omap_vout_dma_mask,
|
||||||
|
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
int __init omap_init_vout(void)
|
int __init omap_init_vout(void)
|
||||||
|
@@ -186,7 +186,7 @@ static const struct v4l2_pix_format sur40_pix_format[] = {
|
|||||||
.width = SENSOR_RES_X / 2,
|
.width = SENSOR_RES_X / 2,
|
||||||
.height = SENSOR_RES_Y / 2,
|
.height = SENSOR_RES_Y / 2,
|
||||||
.field = V4L2_FIELD_NONE,
|
.field = V4L2_FIELD_NONE,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
.colorspace = V4L2_COLORSPACE_RAW,
|
||||||
.bytesperline = SENSOR_RES_X / 2,
|
.bytesperline = SENSOR_RES_X / 2,
|
||||||
.sizeimage = (SENSOR_RES_X/2) * (SENSOR_RES_Y/2),
|
.sizeimage = (SENSOR_RES_X/2) * (SENSOR_RES_Y/2),
|
||||||
},
|
},
|
||||||
@@ -195,7 +195,7 @@ static const struct v4l2_pix_format sur40_pix_format[] = {
|
|||||||
.width = SENSOR_RES_X / 2,
|
.width = SENSOR_RES_X / 2,
|
||||||
.height = SENSOR_RES_Y / 2,
|
.height = SENSOR_RES_Y / 2,
|
||||||
.field = V4L2_FIELD_NONE,
|
.field = V4L2_FIELD_NONE,
|
||||||
.colorspace = V4L2_COLORSPACE_SRGB,
|
.colorspace = V4L2_COLORSPACE_RAW,
|
||||||
.bytesperline = SENSOR_RES_X / 2,
|
.bytesperline = SENSOR_RES_X / 2,
|
||||||
.sizeimage = (SENSOR_RES_X/2) * (SENSOR_RES_Y/2),
|
.sizeimage = (SENSOR_RES_X/2) * (SENSOR_RES_Y/2),
|
||||||
}
|
}
|
||||||
|
@@ -190,7 +190,7 @@ config MEDIA_SUBDRV_AUTOSELECT
|
|||||||
depends on HAS_IOMEM
|
depends on HAS_IOMEM
|
||||||
select I2C
|
select I2C
|
||||||
select I2C_MUX
|
select I2C_MUX
|
||||||
default y
|
default y if !EMBEDDED
|
||||||
help
|
help
|
||||||
By default, a media driver auto-selects all possible ancillary
|
By default, a media driver auto-selects all possible ancillary
|
||||||
devices such as tuners, sensors, video encoders/decoders and
|
devices such as tuners, sensors, video encoders/decoders and
|
||||||
@@ -207,6 +207,11 @@ config MEDIA_SUBDRV_AUTOSELECT
|
|||||||
|
|
||||||
If unsure say Y.
|
If unsure say Y.
|
||||||
|
|
||||||
|
config MEDIA_HIDE_ANCILLARY_SUBDRV
|
||||||
|
bool
|
||||||
|
depends on MEDIA_SUBDRV_AUTOSELECT && !COMPILE_TEST && !EXPERT
|
||||||
|
default y
|
||||||
|
|
||||||
config MEDIA_ATTACH
|
config MEDIA_ATTACH
|
||||||
bool
|
bool
|
||||||
depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
|
depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
|
||||||
|
@@ -1614,6 +1614,9 @@ EXPORT_SYMBOL_GPL(cec_s_phys_addr_from_edid);
|
|||||||
void cec_s_conn_info(struct cec_adapter *adap,
|
void cec_s_conn_info(struct cec_adapter *adap,
|
||||||
const struct cec_connector_info *conn_info)
|
const struct cec_connector_info *conn_info)
|
||||||
{
|
{
|
||||||
|
if (IS_ERR_OR_NULL(adap))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!(adap->capabilities & CEC_CAP_CONNECTOR_INFO))
|
if (!(adap->capabilities & CEC_CAP_CONNECTOR_INFO))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -218,6 +218,8 @@ void cec_notifier_unregister(struct cec_notifier *n)
|
|||||||
|
|
||||||
mutex_lock(&n->lock);
|
mutex_lock(&n->lock);
|
||||||
n->callback = NULL;
|
n->callback = NULL;
|
||||||
|
n->cec_adap->notifier = NULL;
|
||||||
|
n->cec_adap = NULL;
|
||||||
mutex_unlock(&n->lock);
|
mutex_unlock(&n->lock);
|
||||||
cec_notifier_put(n);
|
cec_notifier_put(n);
|
||||||
}
|
}
|
||||||
|
@@ -20,62 +20,52 @@ MODULE_PARM_DESC(max_memory, "maximum memory usage for capture buffers (default:
|
|||||||
/* format descriptions for capture and preview */
|
/* format descriptions for capture and preview */
|
||||||
static struct saa7146_format formats[] = {
|
static struct saa7146_format formats[] = {
|
||||||
{
|
{
|
||||||
.name = "RGB-8 (3-3-2)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_RGB332,
|
.pixelformat = V4L2_PIX_FMT_RGB332,
|
||||||
.trans = RGB08_COMPOSED,
|
.trans = RGB08_COMPOSED,
|
||||||
.depth = 8,
|
.depth = 8,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
}, {
|
}, {
|
||||||
.name = "RGB-16 (5/B-6/G-5/R)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_RGB565,
|
.pixelformat = V4L2_PIX_FMT_RGB565,
|
||||||
.trans = RGB16_COMPOSED,
|
.trans = RGB16_COMPOSED,
|
||||||
.depth = 16,
|
.depth = 16,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
}, {
|
}, {
|
||||||
.name = "RGB-24 (B-G-R)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_BGR24,
|
.pixelformat = V4L2_PIX_FMT_BGR24,
|
||||||
.trans = RGB24_COMPOSED,
|
.trans = RGB24_COMPOSED,
|
||||||
.depth = 24,
|
.depth = 24,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
}, {
|
}, {
|
||||||
.name = "RGB-32 (B-G-R)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_BGR32,
|
.pixelformat = V4L2_PIX_FMT_BGR32,
|
||||||
.trans = RGB32_COMPOSED,
|
.trans = RGB32_COMPOSED,
|
||||||
.depth = 32,
|
.depth = 32,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
}, {
|
}, {
|
||||||
.name = "RGB-32 (R-G-B)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_RGB32,
|
.pixelformat = V4L2_PIX_FMT_RGB32,
|
||||||
.trans = RGB32_COMPOSED,
|
.trans = RGB32_COMPOSED,
|
||||||
.depth = 32,
|
.depth = 32,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
.swap = 0x2,
|
.swap = 0x2,
|
||||||
}, {
|
}, {
|
||||||
.name = "Greyscale-8",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_GREY,
|
.pixelformat = V4L2_PIX_FMT_GREY,
|
||||||
.trans = Y8,
|
.trans = Y8,
|
||||||
.depth = 8,
|
.depth = 8,
|
||||||
.flags = 0,
|
.flags = 0,
|
||||||
}, {
|
}, {
|
||||||
.name = "YUV 4:2:2 planar (Y-Cb-Cr)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_YUV422P,
|
.pixelformat = V4L2_PIX_FMT_YUV422P,
|
||||||
.trans = YUV422_DECOMPOSED,
|
.trans = YUV422_DECOMPOSED,
|
||||||
.depth = 16,
|
.depth = 16,
|
||||||
.flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR,
|
.flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR,
|
||||||
}, {
|
}, {
|
||||||
.name = "YVU 4:2:0 planar (Y-Cb-Cr)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_YVU420,
|
.pixelformat = V4L2_PIX_FMT_YVU420,
|
||||||
.trans = YUV420_DECOMPOSED,
|
.trans = YUV420_DECOMPOSED,
|
||||||
.depth = 12,
|
.depth = 12,
|
||||||
.flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR,
|
.flags = FORMAT_BYTE_SWAP|FORMAT_IS_PLANAR,
|
||||||
}, {
|
}, {
|
||||||
.name = "YUV 4:2:0 planar (Y-Cb-Cr)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_YUV420,
|
.pixelformat = V4L2_PIX_FMT_YUV420,
|
||||||
.trans = YUV420_DECOMPOSED,
|
.trans = YUV420_DECOMPOSED,
|
||||||
.depth = 12,
|
.depth = 12,
|
||||||
.flags = FORMAT_IS_PLANAR,
|
.flags = FORMAT_IS_PLANAR,
|
||||||
}, {
|
}, {
|
||||||
.name = "YUV 4:2:2 (U-Y-V-Y)",
|
|
||||||
.pixelformat = V4L2_PIX_FMT_UYVY,
|
.pixelformat = V4L2_PIX_FMT_UYVY,
|
||||||
.trans = YUV422_COMPOSED,
|
.trans = YUV422_COMPOSED,
|
||||||
.depth = 16,
|
.depth = 16,
|
||||||
@@ -147,10 +137,10 @@ int saa7146_start_preview(struct saa7146_fh *fh)
|
|||||||
}
|
}
|
||||||
vv->ov.win = fmt.fmt.win;
|
vv->ov.win = fmt.fmt.win;
|
||||||
|
|
||||||
DEB_D("%dx%d+%d+%d %s field=%s\n",
|
DEB_D("%dx%d+%d+%d 0x%08x field=%s\n",
|
||||||
vv->ov.win.w.width, vv->ov.win.w.height,
|
vv->ov.win.w.width, vv->ov.win.w.height,
|
||||||
vv->ov.win.w.left, vv->ov.win.w.top,
|
vv->ov.win.w.left, vv->ov.win.w.top,
|
||||||
vv->ov_fmt->name, v4l2_field_names[vv->ov.win.field]);
|
vv->ov_fmt->pixelformat, v4l2_field_names[vv->ov.win.field]);
|
||||||
|
|
||||||
if (0 != (ret = saa7146_enable_overlay(fh))) {
|
if (0 != (ret = saa7146_enable_overlay(fh))) {
|
||||||
DEB_D("enabling overlay failed: %d\n", ret);
|
DEB_D("enabling overlay failed: %d\n", ret);
|
||||||
@@ -515,8 +505,6 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *fh, struct v4l2_fmtd
|
|||||||
{
|
{
|
||||||
if (f->index >= ARRAY_SIZE(formats))
|
if (f->index >= ARRAY_SIZE(formats))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
strscpy((char *)f->description, formats[f->index].name,
|
|
||||||
sizeof(f->description));
|
|
||||||
f->pixelformat = formats[f->index].pixelformat;
|
f->pixelformat = formats[f->index].pixelformat;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -217,9 +217,21 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
|
|||||||
case V4L2_PIX_FMT_RGB444:
|
case V4L2_PIX_FMT_RGB444:
|
||||||
case V4L2_PIX_FMT_XRGB444:
|
case V4L2_PIX_FMT_XRGB444:
|
||||||
case V4L2_PIX_FMT_ARGB444:
|
case V4L2_PIX_FMT_ARGB444:
|
||||||
|
case V4L2_PIX_FMT_RGBX444:
|
||||||
|
case V4L2_PIX_FMT_RGBA444:
|
||||||
|
case V4L2_PIX_FMT_XBGR444:
|
||||||
|
case V4L2_PIX_FMT_ABGR444:
|
||||||
|
case V4L2_PIX_FMT_BGRX444:
|
||||||
|
case V4L2_PIX_FMT_BGRA444:
|
||||||
case V4L2_PIX_FMT_RGB555:
|
case V4L2_PIX_FMT_RGB555:
|
||||||
case V4L2_PIX_FMT_XRGB555:
|
case V4L2_PIX_FMT_XRGB555:
|
||||||
case V4L2_PIX_FMT_ARGB555:
|
case V4L2_PIX_FMT_ARGB555:
|
||||||
|
case V4L2_PIX_FMT_RGBX555:
|
||||||
|
case V4L2_PIX_FMT_RGBA555:
|
||||||
|
case V4L2_PIX_FMT_XBGR555:
|
||||||
|
case V4L2_PIX_FMT_ABGR555:
|
||||||
|
case V4L2_PIX_FMT_BGRX555:
|
||||||
|
case V4L2_PIX_FMT_BGRA555:
|
||||||
case V4L2_PIX_FMT_RGB555X:
|
case V4L2_PIX_FMT_RGB555X:
|
||||||
case V4L2_PIX_FMT_XRGB555X:
|
case V4L2_PIX_FMT_XRGB555X:
|
||||||
case V4L2_PIX_FMT_ARGB555X:
|
case V4L2_PIX_FMT_ARGB555X:
|
||||||
@@ -232,6 +244,10 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
|
|||||||
case V4L2_PIX_FMT_XBGR32:
|
case V4L2_PIX_FMT_XBGR32:
|
||||||
case V4L2_PIX_FMT_ARGB32:
|
case V4L2_PIX_FMT_ARGB32:
|
||||||
case V4L2_PIX_FMT_ABGR32:
|
case V4L2_PIX_FMT_ABGR32:
|
||||||
|
case V4L2_PIX_FMT_RGBX32:
|
||||||
|
case V4L2_PIX_FMT_BGRX32:
|
||||||
|
case V4L2_PIX_FMT_RGBA32:
|
||||||
|
case V4L2_PIX_FMT_BGRA32:
|
||||||
tpg->color_enc = TGP_COLOR_ENC_RGB;
|
tpg->color_enc = TGP_COLOR_ENC_RGB;
|
||||||
break;
|
break;
|
||||||
case V4L2_PIX_FMT_GREY:
|
case V4L2_PIX_FMT_GREY:
|
||||||
@@ -343,9 +359,21 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
|
|||||||
case V4L2_PIX_FMT_RGB444:
|
case V4L2_PIX_FMT_RGB444:
|
||||||
case V4L2_PIX_FMT_XRGB444:
|
case V4L2_PIX_FMT_XRGB444:
|
||||||
case V4L2_PIX_FMT_ARGB444:
|
case V4L2_PIX_FMT_ARGB444:
|
||||||
|
case V4L2_PIX_FMT_RGBX444:
|
||||||
|
case V4L2_PIX_FMT_RGBA444:
|
||||||
|
case V4L2_PIX_FMT_XBGR444:
|
||||||
|
case V4L2_PIX_FMT_ABGR444:
|
||||||
|
case V4L2_PIX_FMT_BGRX444:
|
||||||
|
case V4L2_PIX_FMT_BGRA444:
|
||||||
case V4L2_PIX_FMT_RGB555:
|
case V4L2_PIX_FMT_RGB555:
|
||||||
case V4L2_PIX_FMT_XRGB555:
|
case V4L2_PIX_FMT_XRGB555:
|
||||||
case V4L2_PIX_FMT_ARGB555:
|
case V4L2_PIX_FMT_ARGB555:
|
||||||
|
case V4L2_PIX_FMT_RGBX555:
|
||||||
|
case V4L2_PIX_FMT_RGBA555:
|
||||||
|
case V4L2_PIX_FMT_XBGR555:
|
||||||
|
case V4L2_PIX_FMT_ABGR555:
|
||||||
|
case V4L2_PIX_FMT_BGRX555:
|
||||||
|
case V4L2_PIX_FMT_BGRA555:
|
||||||
case V4L2_PIX_FMT_RGB555X:
|
case V4L2_PIX_FMT_RGB555X:
|
||||||
case V4L2_PIX_FMT_XRGB555X:
|
case V4L2_PIX_FMT_XRGB555X:
|
||||||
case V4L2_PIX_FMT_ARGB555X:
|
case V4L2_PIX_FMT_ARGB555X:
|
||||||
@@ -375,6 +403,10 @@ bool tpg_s_fourcc(struct tpg_data *tpg, u32 fourcc)
|
|||||||
case V4L2_PIX_FMT_XBGR32:
|
case V4L2_PIX_FMT_XBGR32:
|
||||||
case V4L2_PIX_FMT_ARGB32:
|
case V4L2_PIX_FMT_ARGB32:
|
||||||
case V4L2_PIX_FMT_ABGR32:
|
case V4L2_PIX_FMT_ABGR32:
|
||||||
|
case V4L2_PIX_FMT_RGBX32:
|
||||||
|
case V4L2_PIX_FMT_BGRX32:
|
||||||
|
case V4L2_PIX_FMT_RGBA32:
|
||||||
|
case V4L2_PIX_FMT_BGRA32:
|
||||||
case V4L2_PIX_FMT_YUV32:
|
case V4L2_PIX_FMT_YUV32:
|
||||||
case V4L2_PIX_FMT_AYUV32:
|
case V4L2_PIX_FMT_AYUV32:
|
||||||
case V4L2_PIX_FMT_XYUV32:
|
case V4L2_PIX_FMT_XYUV32:
|
||||||
@@ -1007,6 +1039,12 @@ static void precalculate_color(struct tpg_data *tpg, int k)
|
|||||||
case V4L2_PIX_FMT_RGB444:
|
case V4L2_PIX_FMT_RGB444:
|
||||||
case V4L2_PIX_FMT_XRGB444:
|
case V4L2_PIX_FMT_XRGB444:
|
||||||
case V4L2_PIX_FMT_ARGB444:
|
case V4L2_PIX_FMT_ARGB444:
|
||||||
|
case V4L2_PIX_FMT_RGBX444:
|
||||||
|
case V4L2_PIX_FMT_RGBA444:
|
||||||
|
case V4L2_PIX_FMT_XBGR444:
|
||||||
|
case V4L2_PIX_FMT_ABGR444:
|
||||||
|
case V4L2_PIX_FMT_BGRX444:
|
||||||
|
case V4L2_PIX_FMT_BGRA444:
|
||||||
r >>= 8;
|
r >>= 8;
|
||||||
g >>= 8;
|
g >>= 8;
|
||||||
b >>= 8;
|
b >>= 8;
|
||||||
@@ -1014,6 +1052,12 @@ static void precalculate_color(struct tpg_data *tpg, int k)
|
|||||||
case V4L2_PIX_FMT_RGB555:
|
case V4L2_PIX_FMT_RGB555:
|
||||||
case V4L2_PIX_FMT_XRGB555:
|
case V4L2_PIX_FMT_XRGB555:
|
||||||
case V4L2_PIX_FMT_ARGB555:
|
case V4L2_PIX_FMT_ARGB555:
|
||||||
|
case V4L2_PIX_FMT_RGBX555:
|
||||||
|
case V4L2_PIX_FMT_RGBA555:
|
||||||
|
case V4L2_PIX_FMT_XBGR555:
|
||||||
|
case V4L2_PIX_FMT_ABGR555:
|
||||||
|
case V4L2_PIX_FMT_BGRX555:
|
||||||
|
case V4L2_PIX_FMT_BGRA555:
|
||||||
case V4L2_PIX_FMT_RGB555X:
|
case V4L2_PIX_FMT_RGB555X:
|
||||||
case V4L2_PIX_FMT_XRGB555X:
|
case V4L2_PIX_FMT_XRGB555X:
|
||||||
case V4L2_PIX_FMT_ARGB555X:
|
case V4L2_PIX_FMT_ARGB555X:
|
||||||
@@ -1237,6 +1281,27 @@ static void gen_twopix(struct tpg_data *tpg,
|
|||||||
buf[0][offset] = (g_u_s << 4) | b_v;
|
buf[0][offset] = (g_u_s << 4) | b_v;
|
||||||
buf[0][offset + 1] = (alpha & 0xf0) | r_y_h;
|
buf[0][offset + 1] = (alpha & 0xf0) | r_y_h;
|
||||||
break;
|
break;
|
||||||
|
case V4L2_PIX_FMT_RGBX444:
|
||||||
|
alpha = 0;
|
||||||
|
/* fall through */
|
||||||
|
case V4L2_PIX_FMT_RGBA444:
|
||||||
|
buf[0][offset] = (b_v << 4) | (alpha >> 4);
|
||||||
|
buf[0][offset + 1] = (r_y_h << 4) | g_u_s;
|
||||||
|
break;
|
||||||
|
case V4L2_PIX_FMT_XBGR444:
|
||||||
|
alpha = 0;
|
||||||
|
/* fall through */
|
||||||
|
case V4L2_PIX_FMT_ABGR444:
|
||||||
|
buf[0][offset] = (g_u_s << 4) | r_y_h;
|
||||||
|
buf[0][offset + 1] = (alpha & 0xf0) | b_v;
|
||||||
|
break;
|
||||||
|
case V4L2_PIX_FMT_BGRX444:
|
||||||
|
alpha = 0;
|
||||||
|
/* fall through */
|
||||||
|
case V4L2_PIX_FMT_BGRA444:
|
||||||
|
buf[0][offset] = (r_y_h << 4) | (alpha >> 4);
|
||||||
|
buf[0][offset + 1] = (b_v << 4) | g_u_s;
|
||||||
|
break;
|
||||||
case V4L2_PIX_FMT_RGB555:
|
case V4L2_PIX_FMT_RGB555:
|
||||||
case V4L2_PIX_FMT_XRGB555:
|
case V4L2_PIX_FMT_XRGB555:
|
||||||
alpha = 0;
|
alpha = 0;
|
||||||
@@ -1247,6 +1312,30 @@ static void gen_twopix(struct tpg_data *tpg,
|
|||||||
buf[0][offset + 1] = (alpha & 0x80) | (r_y_h << 2)
|
buf[0][offset + 1] = (alpha & 0x80) | (r_y_h << 2)
|
||||||
| (g_u_s >> 3);
|
| (g_u_s >> 3);
|
||||||
break;
|
break;
|
||||||
|
case V4L2_PIX_FMT_RGBX555:
|
||||||
|
alpha = 0;
|
||||||
|
/* fall through */
|
||||||
|
case V4L2_PIX_FMT_RGBA555:
|
||||||
|
buf[0][offset] = (g_u_s << 6) | (b_v << 1) |
|
||||||
|
((alpha & 0x80) >> 7);
|
||||||
|
buf[0][offset + 1] = (r_y_h << 3) | (g_u_s >> 2);
|
||||||
|
break;
|
||||||
|
case V4L2_PIX_FMT_XBGR555:
|
||||||
|
alpha = 0;
|
||||||
|
/* fall through */
|
||||||
|
case V4L2_PIX_FMT_ABGR555:
|
||||||
|
buf[0][offset] = (g_u_s << 5) | r_y_h;
|
||||||
|
buf[0][offset + 1] = (alpha & 0x80) | (b_v << 2)
|
||||||
|
| (g_u_s >> 3);
|
||||||
|
break;
|
||||||
|
case V4L2_PIX_FMT_BGRX555:
|
||||||
|
alpha = 0;
|
||||||
|
/* fall through */
|
||||||
|
case V4L2_PIX_FMT_BGRA555:
|
||||||
|
buf[0][offset] = (g_u_s << 6) | (r_y_h << 1) |
|
||||||
|
((alpha & 0x80) >> 7);
|
||||||
|
buf[0][offset + 1] = (b_v << 3) | (g_u_s >> 2);
|
||||||
|
break;
|
||||||
case V4L2_PIX_FMT_RGB555X:
|
case V4L2_PIX_FMT_RGB555X:
|
||||||
case V4L2_PIX_FMT_XRGB555X:
|
case V4L2_PIX_FMT_XRGB555X:
|
||||||
alpha = 0;
|
alpha = 0;
|
||||||
@@ -1286,6 +1375,15 @@ static void gen_twopix(struct tpg_data *tpg,
|
|||||||
buf[0][offset + 2] = g_u_s;
|
buf[0][offset + 2] = g_u_s;
|
||||||
buf[0][offset + 3] = b_v;
|
buf[0][offset + 3] = b_v;
|
||||||
break;
|
break;
|
||||||
|
case V4L2_PIX_FMT_RGBX32:
|
||||||
|
alpha = 0;
|
||||||
|
/* fall through */
|
||||||
|
case V4L2_PIX_FMT_RGBA32:
|
||||||
|
buf[0][offset] = r_y_h;
|
||||||
|
buf[0][offset + 1] = g_u_s;
|
||||||
|
buf[0][offset + 2] = b_v;
|
||||||
|
buf[0][offset + 3] = alpha;
|
||||||
|
break;
|
||||||
case V4L2_PIX_FMT_BGR32:
|
case V4L2_PIX_FMT_BGR32:
|
||||||
case V4L2_PIX_FMT_XBGR32:
|
case V4L2_PIX_FMT_XBGR32:
|
||||||
case V4L2_PIX_FMT_VUYX32:
|
case V4L2_PIX_FMT_VUYX32:
|
||||||
@@ -1298,6 +1396,15 @@ static void gen_twopix(struct tpg_data *tpg,
|
|||||||
buf[0][offset + 2] = r_y_h;
|
buf[0][offset + 2] = r_y_h;
|
||||||
buf[0][offset + 3] = alpha;
|
buf[0][offset + 3] = alpha;
|
||||||
break;
|
break;
|
||||||
|
case V4L2_PIX_FMT_BGRX32:
|
||||||
|
alpha = 0;
|
||||||
|
/* fall through */
|
||||||
|
case V4L2_PIX_FMT_BGRA32:
|
||||||
|
buf[0][offset] = alpha;
|
||||||
|
buf[0][offset + 1] = b_v;
|
||||||
|
buf[0][offset + 2] = g_u_s;
|
||||||
|
buf[0][offset + 3] = r_y_h;
|
||||||
|
break;
|
||||||
case V4L2_PIX_FMT_SBGGR8:
|
case V4L2_PIX_FMT_SBGGR8:
|
||||||
buf[0][offset] = odd ? g_u_s : b_v;
|
buf[0][offset] = odd ? g_u_s : b_v;
|
||||||
buf[1][offset] = odd ? r_y_h : g_u_s;
|
buf[1][offset] = odd ? r_y_h : g_u_s;
|
||||||
|
@@ -267,8 +267,14 @@ static void vb2_dc_dmabuf_ops_detach(struct dma_buf *dbuf,
|
|||||||
|
|
||||||
/* release the scatterlist cache */
|
/* release the scatterlist cache */
|
||||||
if (attach->dma_dir != DMA_NONE)
|
if (attach->dma_dir != DMA_NONE)
|
||||||
dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
|
/*
|
||||||
attach->dma_dir);
|
* Cache sync can be skipped here, as the vb2_dc memory is
|
||||||
|
* allocated from device coherent memory, which means the
|
||||||
|
* memory locations do not require any explicit cache
|
||||||
|
* maintenance prior or after being used by the device.
|
||||||
|
*/
|
||||||
|
dma_unmap_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
|
||||||
|
attach->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
|
||||||
sg_free_table(sgt);
|
sg_free_table(sgt);
|
||||||
kfree(attach);
|
kfree(attach);
|
||||||
db_attach->priv = NULL;
|
db_attach->priv = NULL;
|
||||||
@@ -293,14 +299,17 @@ static struct sg_table *vb2_dc_dmabuf_ops_map(
|
|||||||
|
|
||||||
/* release any previous cache */
|
/* release any previous cache */
|
||||||
if (attach->dma_dir != DMA_NONE) {
|
if (attach->dma_dir != DMA_NONE) {
|
||||||
dma_unmap_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
|
dma_unmap_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
|
||||||
attach->dma_dir);
|
attach->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
|
||||||
attach->dma_dir = DMA_NONE;
|
attach->dma_dir = DMA_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mapping to the client with new direction */
|
/*
|
||||||
sgt->nents = dma_map_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
|
* mapping to the client with new direction, no cache sync
|
||||||
dma_dir);
|
* required see comment in vb2_dc_dmabuf_ops_detach()
|
||||||
|
*/
|
||||||
|
sgt->nents = dma_map_sg_attrs(db_attach->dev, sgt->sgl, sgt->orig_nents,
|
||||||
|
dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
|
||||||
if (!sgt->nents) {
|
if (!sgt->nents) {
|
||||||
pr_err("failed to map scatterlist\n");
|
pr_err("failed to map scatterlist\n");
|
||||||
mutex_unlock(lock);
|
mutex_unlock(lock);
|
||||||
|
@@ -872,17 +872,19 @@ EXPORT_SYMBOL_GPL(vb2_queue_release);
|
|||||||
__poll_t vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait)
|
__poll_t vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait)
|
||||||
{
|
{
|
||||||
struct video_device *vfd = video_devdata(file);
|
struct video_device *vfd = video_devdata(file);
|
||||||
__poll_t res = 0;
|
__poll_t res;
|
||||||
|
|
||||||
|
res = vb2_core_poll(q, file, wait);
|
||||||
|
|
||||||
if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) {
|
if (test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags)) {
|
||||||
struct v4l2_fh *fh = file->private_data;
|
struct v4l2_fh *fh = file->private_data;
|
||||||
|
|
||||||
poll_wait(file, &fh->wait, wait);
|
poll_wait(file, &fh->wait, wait);
|
||||||
if (v4l2_event_pending(fh))
|
if (v4l2_event_pending(fh))
|
||||||
res = EPOLLPRI;
|
res |= EPOLLPRI;
|
||||||
}
|
}
|
||||||
|
|
||||||
return res | vb2_core_poll(q, file, wait);
|
return res;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(vb2_poll);
|
EXPORT_SYMBOL_GPL(vb2_poll);
|
||||||
|
|
||||||
|
@@ -152,6 +152,9 @@ static void dvb_frontend_free(struct kref *ref)
|
|||||||
|
|
||||||
static void dvb_frontend_put(struct dvb_frontend *fe)
|
static void dvb_frontend_put(struct dvb_frontend *fe)
|
||||||
{
|
{
|
||||||
|
/* call detach before dropping the reference count */
|
||||||
|
if (fe->ops.detach)
|
||||||
|
fe->ops.detach(fe);
|
||||||
/*
|
/*
|
||||||
* Check if the frontend was registered, as otherwise
|
* Check if the frontend was registered, as otherwise
|
||||||
* kref was not initialized yet.
|
* kref was not initialized yet.
|
||||||
@@ -3040,7 +3043,6 @@ void dvb_frontend_detach(struct dvb_frontend *fe)
|
|||||||
dvb_frontend_invoke_release(fe, fe->ops.release_sec);
|
dvb_frontend_invoke_release(fe, fe->ops.release_sec);
|
||||||
dvb_frontend_invoke_release(fe, fe->ops.tuner_ops.release);
|
dvb_frontend_invoke_release(fe, fe->ops.tuner_ops.release);
|
||||||
dvb_frontend_invoke_release(fe, fe->ops.analog_ops.release);
|
dvb_frontend_invoke_release(fe, fe->ops.analog_ops.release);
|
||||||
dvb_frontend_invoke_release(fe, fe->ops.detach);
|
|
||||||
dvb_frontend_put(fe);
|
dvb_frontend_put(fe);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dvb_frontend_detach);
|
EXPORT_SYMBOL(dvb_frontend_detach);
|
||||||
|
@@ -339,9 +339,11 @@ static int dvb_create_media_entity(struct dvb_device *dvbdev,
|
|||||||
if (npads) {
|
if (npads) {
|
||||||
dvbdev->pads = kcalloc(npads, sizeof(*dvbdev->pads),
|
dvbdev->pads = kcalloc(npads, sizeof(*dvbdev->pads),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!dvbdev->pads)
|
if (!dvbdev->pads) {
|
||||||
|
kfree(dvbdev->entity);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DVB_DEVICE_FRONTEND:
|
case DVB_DEVICE_FRONTEND:
|
||||||
@@ -476,7 +478,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
dvbdevfops = kzalloc(sizeof(struct file_operations), GFP_KERNEL);
|
dvbdevfops = kmemdup(template->fops, sizeof(*dvbdevfops), GFP_KERNEL);
|
||||||
|
|
||||||
if (!dvbdevfops){
|
if (!dvbdevfops){
|
||||||
kfree (dvbdev);
|
kfree (dvbdev);
|
||||||
@@ -492,7 +494,6 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
|
|||||||
dvbdev->fops = dvbdevfops;
|
dvbdev->fops = dvbdevfops;
|
||||||
init_waitqueue_head (&dvbdev->wait_queue);
|
init_waitqueue_head (&dvbdev->wait_queue);
|
||||||
|
|
||||||
memcpy(dvbdevfops, template->fops, sizeof(struct file_operations));
|
|
||||||
dvbdevfops->owner = adap->module;
|
dvbdevfops->owner = adap->module;
|
||||||
|
|
||||||
list_add_tail (&dvbdev->list_head, &adap->device_list);
|
list_add_tail (&dvbdev->list_head, &adap->device_list);
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
|
comment "DVB Frontend drivers hidden by 'Autoselect ancillary drivers'"
|
||||||
|
depends on MEDIA_HIDE_ANCILLARY_SUBDRV
|
||||||
|
|
||||||
menu "Customise DVB Frontends"
|
menu "Customise DVB Frontends"
|
||||||
visible if !MEDIA_SUBDRV_AUTOSELECT || COMPILE_TEST || EXPERT
|
visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
|
||||||
|
|
||||||
comment "Multistandard (satellite) frontends"
|
comment "Multistandard (satellite) frontends"
|
||||||
depends on DVB_CORE
|
depends on DVB_CORE
|
||||||
|
@@ -619,8 +619,10 @@ static int cx24117_load_firmware(struct dvb_frontend *fe,
|
|||||||
|
|
||||||
/* send fw */
|
/* send fw */
|
||||||
ret = i2c_transfer(state->priv->i2c, &msg, 1);
|
ret = i2c_transfer(state->priv->i2c, &msg, 1);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
kfree(buf);
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
|
|
||||||
|
@@ -431,7 +431,7 @@ static u32 cx24123_int_log2(u32 a, u32 b)
|
|||||||
u32 div = a / b;
|
u32 div = a / b;
|
||||||
if (a % b >= b / 2)
|
if (a % b >= b / 2)
|
||||||
++div;
|
++div;
|
||||||
if (div < (1 << 31)) {
|
if (div < (1UL << 31)) {
|
||||||
for (exp = 1; div > exp; nearest++)
|
for (exp = 1; div > exp; nearest++)
|
||||||
exp += exp;
|
exp += exp;
|
||||||
}
|
}
|
||||||
|
@@ -594,7 +594,7 @@ static int write_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount)
|
|||||||
return ecount;
|
return ecount;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct dvb_ca_en50221 en_templ = {
|
static const struct dvb_ca_en50221 en_templ = {
|
||||||
.read_attribute_mem = read_attribute_mem,
|
.read_attribute_mem = read_attribute_mem,
|
||||||
.write_attribute_mem = write_attribute_mem,
|
.write_attribute_mem = write_attribute_mem,
|
||||||
.read_cam_control = read_cam_control,
|
.read_cam_control = read_cam_control,
|
||||||
|
@@ -632,11 +632,10 @@ static int cxd2820r_probe(struct i2c_client *client,
|
|||||||
* one dummy I2C client in in order to get own I2C client for each
|
* one dummy I2C client in in order to get own I2C client for each
|
||||||
* register bank.
|
* register bank.
|
||||||
*/
|
*/
|
||||||
priv->client[1] = i2c_new_dummy(client->adapter, client->addr | (1 << 1));
|
priv->client[1] = i2c_new_dummy_device(client->adapter, client->addr | (1 << 1));
|
||||||
if (!priv->client[1]) {
|
if (IS_ERR(priv->client[1])) {
|
||||||
ret = -ENODEV;
|
ret = PTR_ERR(priv->client[1]);
|
||||||
dev_err(&client->dev, "I2C registration failed\n");
|
dev_err(&client->dev, "I2C registration failed\n");
|
||||||
if (ret)
|
|
||||||
goto err_regmap_0_regmap_exit;
|
goto err_regmap_0_regmap_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2036,7 +2036,8 @@ static int dib7000pc_detection(struct i2c_adapter *i2c_adap)
|
|||||||
if (i2c_transfer(i2c_adap, msg, 2) == 2)
|
if (i2c_transfer(i2c_adap, msg, 2) == 2)
|
||||||
if (rx[0] == 0x01 && rx[1] == 0xb3) {
|
if (rx[0] == 0x01 && rx[1] == 0xb3) {
|
||||||
dprintk("-D- DiB7000PC detected\n");
|
dprintk("-D- DiB7000PC detected\n");
|
||||||
return 1;
|
ret = 1;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg[0].addr = msg[1].addr = 0x40;
|
msg[0].addr = msg[1].addr = 0x40;
|
||||||
@@ -2044,11 +2045,13 @@ static int dib7000pc_detection(struct i2c_adapter *i2c_adap)
|
|||||||
if (i2c_transfer(i2c_adap, msg, 2) == 2)
|
if (i2c_transfer(i2c_adap, msg, 2) == 2)
|
||||||
if (rx[0] == 0x01 && rx[1] == 0xb3) {
|
if (rx[0] == 0x01 && rx[1] == 0xb3) {
|
||||||
dprintk("-D- DiB7000PC detected\n");
|
dprintk("-D- DiB7000PC detected\n");
|
||||||
return 1;
|
ret = 1;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
dprintk("-D- DiB7000PC not detected\n");
|
dprintk("-D- DiB7000PC not detected\n");
|
||||||
|
|
||||||
|
out:
|
||||||
kfree(rx);
|
kfree(rx);
|
||||||
rx_memory_error:
|
rx_memory_error:
|
||||||
kfree(tx);
|
kfree(tx);
|
||||||
|
@@ -12287,7 +12287,8 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
|
|||||||
if (state == NULL)
|
if (state == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
demod = kmalloc(sizeof(struct drx_demod_instance), GFP_KERNEL);
|
demod = kmemdup(&drxj_default_demod_g,
|
||||||
|
sizeof(struct drx_demod_instance), GFP_KERNEL);
|
||||||
if (demod == NULL)
|
if (demod == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@@ -12311,8 +12312,6 @@ struct dvb_frontend *drx39xxj_attach(struct i2c_adapter *i2c)
|
|||||||
state->demod = demod;
|
state->demod = demod;
|
||||||
|
|
||||||
/* setup the demod data */
|
/* setup the demod data */
|
||||||
memcpy(demod, &drxj_default_demod_g, sizeof(struct drx_demod_instance));
|
|
||||||
|
|
||||||
demod->my_i2c_dev_addr = demod_addr;
|
demod->my_i2c_dev_addr = demod_addr;
|
||||||
demod->my_common_attr = demod_comm_attr;
|
demod->my_common_attr = demod_comm_attr;
|
||||||
demod->my_i2c_dev_addr->user_data = state;
|
demod->my_i2c_dev_addr->user_data = state;
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/idr.h>
|
||||||
#include <linux/dvb/frontend.h>
|
#include <linux/dvb/frontend.h>
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
|
|
||||||
@@ -34,8 +35,7 @@ struct dvb_pll_priv {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define DVB_PLL_MAX 64
|
#define DVB_PLL_MAX 64
|
||||||
|
static DEFINE_IDA(pll_ida);
|
||||||
static unsigned int dvb_pll_devcount;
|
|
||||||
|
|
||||||
static int debug;
|
static int debug;
|
||||||
module_param(debug, int, 0644);
|
module_param(debug, int, 0644);
|
||||||
@@ -787,6 +787,7 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
|
|||||||
struct dvb_pll_priv *priv = NULL;
|
struct dvb_pll_priv *priv = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
const struct dvb_pll_desc *desc;
|
const struct dvb_pll_desc *desc;
|
||||||
|
int nr;
|
||||||
|
|
||||||
b1 = kmalloc(1, GFP_KERNEL);
|
b1 = kmalloc(1, GFP_KERNEL);
|
||||||
if (!b1)
|
if (!b1)
|
||||||
@@ -795,9 +796,14 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
|
|||||||
b1[0] = 0;
|
b1[0] = 0;
|
||||||
msg.buf = b1;
|
msg.buf = b1;
|
||||||
|
|
||||||
if ((id[dvb_pll_devcount] > DVB_PLL_UNDEFINED) &&
|
nr = ida_simple_get(&pll_ida, 0, DVB_PLL_MAX, GFP_KERNEL);
|
||||||
(id[dvb_pll_devcount] < ARRAY_SIZE(pll_list)))
|
if (nr < 0) {
|
||||||
pll_desc_id = id[dvb_pll_devcount];
|
kfree(b1);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id[nr] > DVB_PLL_UNDEFINED && id[nr] < ARRAY_SIZE(pll_list))
|
||||||
|
pll_desc_id = id[nr];
|
||||||
|
|
||||||
BUG_ON(pll_desc_id < 1 || pll_desc_id >= ARRAY_SIZE(pll_list));
|
BUG_ON(pll_desc_id < 1 || pll_desc_id >= ARRAY_SIZE(pll_list));
|
||||||
|
|
||||||
@@ -808,24 +814,20 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
|
|||||||
fe->ops.i2c_gate_ctrl(fe, 1);
|
fe->ops.i2c_gate_ctrl(fe, 1);
|
||||||
|
|
||||||
ret = i2c_transfer (i2c, &msg, 1);
|
ret = i2c_transfer (i2c, &msg, 1);
|
||||||
if (ret != 1) {
|
if (ret != 1)
|
||||||
kfree(b1);
|
goto out;
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (fe->ops.i2c_gate_ctrl)
|
if (fe->ops.i2c_gate_ctrl)
|
||||||
fe->ops.i2c_gate_ctrl(fe, 0);
|
fe->ops.i2c_gate_ctrl(fe, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL);
|
priv = kzalloc(sizeof(struct dvb_pll_priv), GFP_KERNEL);
|
||||||
if (!priv) {
|
if (!priv)
|
||||||
kfree(b1);
|
goto out;
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
priv->pll_i2c_address = pll_addr;
|
priv->pll_i2c_address = pll_addr;
|
||||||
priv->i2c = i2c;
|
priv->i2c = i2c;
|
||||||
priv->pll_desc = desc;
|
priv->pll_desc = desc;
|
||||||
priv->nr = dvb_pll_devcount++;
|
priv->nr = nr;
|
||||||
|
|
||||||
memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops,
|
memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops,
|
||||||
sizeof(struct dvb_tuner_ops));
|
sizeof(struct dvb_tuner_ops));
|
||||||
@@ -858,6 +860,11 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
|
|||||||
kfree(b1);
|
kfree(b1);
|
||||||
|
|
||||||
return fe;
|
return fe;
|
||||||
|
out:
|
||||||
|
kfree(b1);
|
||||||
|
ida_simple_remove(&pll_ida, nr);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(dvb_pll_attach);
|
EXPORT_SYMBOL(dvb_pll_attach);
|
||||||
|
|
||||||
@@ -894,9 +901,10 @@ dvb_pll_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
|||||||
|
|
||||||
static int dvb_pll_remove(struct i2c_client *client)
|
static int dvb_pll_remove(struct i2c_client *client)
|
||||||
{
|
{
|
||||||
struct dvb_frontend *fe;
|
struct dvb_frontend *fe = i2c_get_clientdata(client);
|
||||||
|
struct dvb_pll_priv *priv = fe->tuner_priv;
|
||||||
|
|
||||||
fe = i2c_get_clientdata(client);
|
ida_simple_remove(&pll_ida, priv->nr);
|
||||||
dvb_pll_release(fe);
|
dvb_pll_release(fe);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -722,9 +722,9 @@ static int mn88443x_probe(struct i2c_client *client,
|
|||||||
* Chip has two I2C addresses for each satellite/terrestrial system.
|
* Chip has two I2C addresses for each satellite/terrestrial system.
|
||||||
* ISDB-T uses address ISDB-S + 4, so we register a dummy client.
|
* ISDB-T uses address ISDB-S + 4, so we register a dummy client.
|
||||||
*/
|
*/
|
||||||
chip->client_t = i2c_new_dummy(client->adapter, client->addr + 4);
|
chip->client_t = i2c_new_dummy_device(client->adapter, client->addr + 4);
|
||||||
if (!chip->client_t)
|
if (IS_ERR(chip->client_t))
|
||||||
return -ENODEV;
|
return PTR_ERR(chip->client_t);
|
||||||
|
|
||||||
chip->regmap_t = devm_regmap_init_i2c(chip->client_t, ®map_config);
|
chip->regmap_t = devm_regmap_init_i2c(chip->client_t, ®map_config);
|
||||||
if (IS_ERR(chip->regmap_t)) {
|
if (IS_ERR(chip->regmap_t)) {
|
||||||
|
@@ -612,11 +612,10 @@ static int mn88472_probe(struct i2c_client *client,
|
|||||||
* Also, register bank 2 do not support sequential I/O. Only single
|
* Also, register bank 2 do not support sequential I/O. Only single
|
||||||
* register write or read is allowed to that bank.
|
* register write or read is allowed to that bank.
|
||||||
*/
|
*/
|
||||||
dev->client[1] = i2c_new_dummy(client->adapter, 0x1a);
|
dev->client[1] = i2c_new_dummy_device(client->adapter, 0x1a);
|
||||||
if (!dev->client[1]) {
|
if (IS_ERR(dev->client[1])) {
|
||||||
ret = -ENODEV;
|
ret = PTR_ERR(dev->client[1]);
|
||||||
dev_err(&client->dev, "I2C registration failed\n");
|
dev_err(&client->dev, "I2C registration failed\n");
|
||||||
if (ret)
|
|
||||||
goto err_regmap_0_regmap_exit;
|
goto err_regmap_0_regmap_exit;
|
||||||
}
|
}
|
||||||
dev->regmap[1] = regmap_init_i2c(dev->client[1], ®map_config);
|
dev->regmap[1] = regmap_init_i2c(dev->client[1], ®map_config);
|
||||||
@@ -626,11 +625,10 @@ static int mn88472_probe(struct i2c_client *client,
|
|||||||
}
|
}
|
||||||
i2c_set_clientdata(dev->client[1], dev);
|
i2c_set_clientdata(dev->client[1], dev);
|
||||||
|
|
||||||
dev->client[2] = i2c_new_dummy(client->adapter, 0x1c);
|
dev->client[2] = i2c_new_dummy_device(client->adapter, 0x1c);
|
||||||
if (!dev->client[2]) {
|
if (IS_ERR(dev->client[2])) {
|
||||||
ret = -ENODEV;
|
ret = PTR_ERR(dev->client[2]);
|
||||||
dev_err(&client->dev, "2nd I2C registration failed\n");
|
dev_err(&client->dev, "2nd I2C registration failed\n");
|
||||||
if (ret)
|
|
||||||
goto err_regmap_1_regmap_exit;
|
goto err_regmap_1_regmap_exit;
|
||||||
}
|
}
|
||||||
dev->regmap[2] = regmap_init_i2c(dev->client[2], ®map_config);
|
dev->regmap[2] = regmap_init_i2c(dev->client[2], ®map_config);
|
||||||
|
@@ -657,11 +657,10 @@ static int mn88473_probe(struct i2c_client *client,
|
|||||||
* Also, register bank 2 do not support sequential I/O. Only single
|
* Also, register bank 2 do not support sequential I/O. Only single
|
||||||
* register write or read is allowed to that bank.
|
* register write or read is allowed to that bank.
|
||||||
*/
|
*/
|
||||||
dev->client[1] = i2c_new_dummy(client->adapter, 0x1a);
|
dev->client[1] = i2c_new_dummy_device(client->adapter, 0x1a);
|
||||||
if (dev->client[1] == NULL) {
|
if (IS_ERR(dev->client[1])) {
|
||||||
ret = -ENODEV;
|
ret = PTR_ERR(dev->client[1]);
|
||||||
dev_err(&client->dev, "I2C registration failed\n");
|
dev_err(&client->dev, "I2C registration failed\n");
|
||||||
if (ret)
|
|
||||||
goto err_regmap_0_regmap_exit;
|
goto err_regmap_0_regmap_exit;
|
||||||
}
|
}
|
||||||
dev->regmap[1] = regmap_init_i2c(dev->client[1], ®map_config);
|
dev->regmap[1] = regmap_init_i2c(dev->client[1], ®map_config);
|
||||||
@@ -671,11 +670,10 @@ static int mn88473_probe(struct i2c_client *client,
|
|||||||
}
|
}
|
||||||
i2c_set_clientdata(dev->client[1], dev);
|
i2c_set_clientdata(dev->client[1], dev);
|
||||||
|
|
||||||
dev->client[2] = i2c_new_dummy(client->adapter, 0x1c);
|
dev->client[2] = i2c_new_dummy_device(client->adapter, 0x1c);
|
||||||
if (dev->client[2] == NULL) {
|
if (IS_ERR(dev->client[2])) {
|
||||||
ret = -ENODEV;
|
ret = PTR_ERR(dev->client[2]);
|
||||||
dev_err(&client->dev, "2nd I2C registration failed\n");
|
dev_err(&client->dev, "2nd I2C registration failed\n");
|
||||||
if (ret)
|
|
||||||
goto err_regmap_1_regmap_exit;
|
goto err_regmap_1_regmap_exit;
|
||||||
}
|
}
|
||||||
dev->regmap[2] = regmap_init_i2c(dev->client[2], ®map_config);
|
dev->regmap[2] = regmap_init_i2c(dev->client[2], ®map_config);
|
||||||
|
@@ -81,11 +81,9 @@ struct rtl2832_sdr_format {
|
|||||||
|
|
||||||
static struct rtl2832_sdr_format formats[] = {
|
static struct rtl2832_sdr_format formats[] = {
|
||||||
{
|
{
|
||||||
.name = "Complex U8",
|
|
||||||
.pixelformat = V4L2_SDR_FMT_CU8,
|
.pixelformat = V4L2_SDR_FMT_CU8,
|
||||||
.buffersize = BULK_BUFFER_SIZE,
|
.buffersize = BULK_BUFFER_SIZE,
|
||||||
}, {
|
}, {
|
||||||
.name = "Complex U16LE (emulated)",
|
|
||||||
.pixelformat = V4L2_SDR_FMT_CU16LE,
|
.pixelformat = V4L2_SDR_FMT_CU16LE,
|
||||||
.buffersize = BULK_BUFFER_SIZE * 2,
|
.buffersize = BULK_BUFFER_SIZE * 2,
|
||||||
},
|
},
|
||||||
@@ -1116,7 +1114,6 @@ static int rtl2832_sdr_enum_fmt_sdr_cap(struct file *file, void *priv,
|
|||||||
if (f->index >= dev->num_formats)
|
if (f->index >= dev->num_formats)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
strscpy(f->description, formats[f->index].name, sizeof(f->description));
|
|
||||||
f->pixelformat = formats[f->index].pixelformat;
|
f->pixelformat = formats[f->index].pixelformat;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -11,6 +11,13 @@
|
|||||||
|
|
||||||
static const struct dvb_frontend_ops si2168_ops;
|
static const struct dvb_frontend_ops si2168_ops;
|
||||||
|
|
||||||
|
static void cmd_init(struct si2168_cmd *cmd, const u8 *buf, int wlen, int rlen)
|
||||||
|
{
|
||||||
|
memcpy(cmd->args, buf, wlen);
|
||||||
|
cmd->wlen = wlen;
|
||||||
|
cmd->rlen = rlen;
|
||||||
|
}
|
||||||
|
|
||||||
/* execute firmware command */
|
/* execute firmware command */
|
||||||
static int si2168_cmd_execute(struct i2c_client *client, struct si2168_cmd *cmd)
|
static int si2168_cmd_execute(struct i2c_client *client, struct si2168_cmd *cmd)
|
||||||
{
|
{
|
||||||
@@ -82,16 +89,23 @@ static int si2168_ts_bus_ctrl(struct dvb_frontend *fe, int acquire)
|
|||||||
|
|
||||||
dev_dbg(&client->dev, "%s acquire: %d\n", __func__, acquire);
|
dev_dbg(&client->dev, "%s acquire: %d\n", __func__, acquire);
|
||||||
|
|
||||||
|
/* set manual value */
|
||||||
|
if (dev->ts_mode & SI2168_TS_CLK_MANUAL) {
|
||||||
|
cmd_init(&cmd, "\x14\x00\x0d\x10\xe8\x03", 6, 4);
|
||||||
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
/* set TS_MODE property */
|
/* set TS_MODE property */
|
||||||
memcpy(cmd.args, "\x14\x00\x01\x10\x10\x00", 6);
|
cmd_init(&cmd, "\x14\x00\x01\x10\x10\x00", 6, 4);
|
||||||
|
if (dev->ts_mode & SI2168_TS_CLK_MANUAL)
|
||||||
|
cmd.args[4] = SI2168_TS_CLK_MANUAL;
|
||||||
if (acquire)
|
if (acquire)
|
||||||
cmd.args[4] |= dev->ts_mode;
|
cmd.args[4] |= dev->ts_mode;
|
||||||
else
|
else
|
||||||
cmd.args[4] |= SI2168_TS_TRISTATE;
|
cmd.args[4] |= SI2168_TS_TRISTATE;
|
||||||
if (dev->ts_clock_gapped)
|
if (dev->ts_clock_gapped)
|
||||||
cmd.args[4] |= 0x40;
|
cmd.args[4] |= 0x40;
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -115,19 +129,13 @@ static int si2168_read_status(struct dvb_frontend *fe, enum fe_status *status)
|
|||||||
|
|
||||||
switch (c->delivery_system) {
|
switch (c->delivery_system) {
|
||||||
case SYS_DVBT:
|
case SYS_DVBT:
|
||||||
memcpy(cmd.args, "\xa0\x01", 2);
|
cmd_init(&cmd, "\xa0\x01", 2, 13);
|
||||||
cmd.wlen = 2;
|
|
||||||
cmd.rlen = 13;
|
|
||||||
break;
|
break;
|
||||||
case SYS_DVBC_ANNEX_A:
|
case SYS_DVBC_ANNEX_A:
|
||||||
memcpy(cmd.args, "\x90\x01", 2);
|
cmd_init(&cmd, "\x90\x01", 2, 9);
|
||||||
cmd.wlen = 2;
|
|
||||||
cmd.rlen = 9;
|
|
||||||
break;
|
break;
|
||||||
case SYS_DVBT2:
|
case SYS_DVBT2:
|
||||||
memcpy(cmd.args, "\x50\x01", 2);
|
cmd_init(&cmd, "\x50\x01", 2, 14);
|
||||||
cmd.wlen = 2;
|
|
||||||
cmd.rlen = 14;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
@@ -164,9 +172,7 @@ static int si2168_read_status(struct dvb_frontend *fe, enum fe_status *status)
|
|||||||
|
|
||||||
/* BER */
|
/* BER */
|
||||||
if (*status & FE_HAS_VITERBI) {
|
if (*status & FE_HAS_VITERBI) {
|
||||||
memcpy(cmd.args, "\x82\x00", 2);
|
cmd_init(&cmd, "\x82\x00", 2, 3);
|
||||||
cmd.wlen = 2;
|
|
||||||
cmd.rlen = 3;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -197,9 +203,7 @@ static int si2168_read_status(struct dvb_frontend *fe, enum fe_status *status)
|
|||||||
|
|
||||||
/* UCB */
|
/* UCB */
|
||||||
if (*status & FE_HAS_SYNC) {
|
if (*status & FE_HAS_SYNC) {
|
||||||
memcpy(cmd.args, "\x84\x01", 2);
|
cmd_init(&cmd, "\x84\x01", 2, 3);
|
||||||
cmd.wlen = 2;
|
|
||||||
cmd.rlen = 3;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -285,22 +289,18 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(cmd.args, "\x88\x02\x02\x02\x02", 5);
|
cmd_init(&cmd, "\x88\x02\x02\x02\x02", 5, 5);
|
||||||
cmd.wlen = 5;
|
|
||||||
cmd.rlen = 5;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* that has no big effect */
|
/* that has no big effect */
|
||||||
if (c->delivery_system == SYS_DVBT)
|
if (c->delivery_system == SYS_DVBT)
|
||||||
memcpy(cmd.args, "\x89\x21\x06\x11\xff\x98", 6);
|
cmd_init(&cmd, "\x89\x21\x06\x11\xff\x98", 6, 3);
|
||||||
else if (c->delivery_system == SYS_DVBC_ANNEX_A)
|
else if (c->delivery_system == SYS_DVBC_ANNEX_A)
|
||||||
memcpy(cmd.args, "\x89\x21\x06\x11\x89\xf0", 6);
|
cmd_init(&cmd, "\x89\x21\x06\x11\x89\xf0", 6, 3);
|
||||||
else if (c->delivery_system == SYS_DVBT2)
|
else if (c->delivery_system == SYS_DVBT2)
|
||||||
memcpy(cmd.args, "\x89\x21\x06\x11\x89\x20", 6);
|
cmd_init(&cmd, "\x89\x21\x06\x11\x89\x20", 6, 3);
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 3;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -317,103 +317,77 @@ static int si2168_set_frontend(struct dvb_frontend *fe)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(cmd.args, "\x51\x03", 2);
|
cmd_init(&cmd, "\x51\x03", 2, 12);
|
||||||
cmd.wlen = 2;
|
|
||||||
cmd.rlen = 12;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x12\x08\x04", 3);
|
cmd_init(&cmd, "\x12\x08\x04", 3, 3);
|
||||||
cmd.wlen = 3;
|
|
||||||
cmd.rlen = 3;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x0c\x10\x12\x00", 6);
|
cmd_init(&cmd, "\x14\x00\x0c\x10\x12\x00", 6, 4);
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x06\x10\x24\x00", 6);
|
cmd_init(&cmd, "\x14\x00\x06\x10\x24\x00", 6, 4);
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x07\x10\x00\x24", 6);
|
cmd_init(&cmd, "\x14\x00\x07\x10\x00\x24", 6, 4);
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x0a\x10\x00\x00", 6);
|
cmd_init(&cmd, "\x14\x00\x0a\x10\x00\x00", 6, 4);
|
||||||
cmd.args[4] = delivery_system | bandwidth;
|
cmd.args[4] = delivery_system | bandwidth;
|
||||||
if (dev->spectral_inversion)
|
if (dev->spectral_inversion)
|
||||||
cmd.args[5] |= 1;
|
cmd.args[5] |= 1;
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* set DVB-C symbol rate */
|
/* set DVB-C symbol rate */
|
||||||
if (c->delivery_system == SYS_DVBC_ANNEX_A) {
|
if (c->delivery_system == SYS_DVBC_ANNEX_A) {
|
||||||
memcpy(cmd.args, "\x14\x00\x02\x11", 4);
|
cmd_init(&cmd, "\x14\x00\x02\x11\x00\x00", 6, 4);
|
||||||
cmd.args[4] = ((c->symbol_rate / 1000) >> 0) & 0xff;
|
cmd.args[4] = ((c->symbol_rate / 1000) >> 0) & 0xff;
|
||||||
cmd.args[5] = ((c->symbol_rate / 1000) >> 8) & 0xff;
|
cmd.args[5] = ((c->symbol_rate / 1000) >> 8) & 0xff;
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x0f\x10\x10\x00", 6);
|
cmd_init(&cmd, "\x14\x00\x0f\x10\x10\x00", 6, 4);
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x09\x10\xe3\x08", 6);
|
cmd_init(&cmd, "\x14\x00\x09\x10\xe3\x08", 6, 4);
|
||||||
cmd.args[5] |= dev->ts_clock_inv ? 0x00 : 0x10;
|
cmd.args[5] |= dev->ts_clock_inv ? 0x00 : 0x10;
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x08\x10\xd7\x05", 6);
|
cmd_init(&cmd, "\x14\x00\x08\x10\xd7\x05", 6, 4);
|
||||||
cmd.args[5] |= dev->ts_clock_inv ? 0x00 : 0x10;
|
cmd.args[5] |= dev->ts_clock_inv ? 0x00 : 0x10;
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x01\x12\x00\x00", 6);
|
cmd_init(&cmd, "\x14\x00\x01\x12\x00\x00", 6, 4);
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x14\x00\x01\x03\x0c\x00", 6);
|
cmd_init(&cmd, "\x14\x00\x01\x03\x0c\x00", 6, 4);
|
||||||
cmd.wlen = 6;
|
|
||||||
cmd.rlen = 4;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x85", 1);
|
cmd_init(&cmd, "\x85", 1, 1);
|
||||||
cmd.wlen = 1;
|
|
||||||
cmd.rlen = 1;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -443,26 +417,21 @@ static int si2168_init(struct dvb_frontend *fe)
|
|||||||
dev_dbg(&client->dev, "\n");
|
dev_dbg(&client->dev, "\n");
|
||||||
|
|
||||||
/* initialize */
|
/* initialize */
|
||||||
memcpy(cmd.args, "\xc0\x12\x00\x0c\x00\x0d\x16\x00\x00\x00\x00\x00\x00", 13);
|
cmd_init(&cmd, "\xc0\x12\x00\x0c\x00\x0d\x16\x00\x00\x00\x00\x00\x00",
|
||||||
cmd.wlen = 13;
|
13, 0);
|
||||||
cmd.rlen = 0;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (dev->warm) {
|
if (dev->warm) {
|
||||||
/* resume */
|
/* resume */
|
||||||
memcpy(cmd.args, "\xc0\x06\x08\x0f\x00\x20\x21\x01", 8);
|
cmd_init(&cmd, "\xc0\x06\x08\x0f\x00\x20\x21\x01", 8, 1);
|
||||||
cmd.wlen = 8;
|
|
||||||
cmd.rlen = 1;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
udelay(100);
|
udelay(100);
|
||||||
memcpy(cmd.args, "\x85", 1);
|
cmd_init(&cmd, "\x85", 1, 1);
|
||||||
cmd.wlen = 1;
|
|
||||||
cmd.rlen = 1;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -471,9 +440,7 @@ static int si2168_init(struct dvb_frontend *fe)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* power up */
|
/* power up */
|
||||||
memcpy(cmd.args, "\xc0\x06\x01\x0f\x00\x20\x20\x01", 8);
|
cmd_init(&cmd, "\xc0\x06\x01\x0f\x00\x20\x20\x01", 8, 1);
|
||||||
cmd.wlen = 8;
|
|
||||||
cmd.rlen = 1;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -511,9 +478,8 @@ static int si2168_init(struct dvb_frontend *fe)
|
|||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
memcpy(cmd.args, &fw->data[(fw->size - remaining) + 1], len);
|
cmd_init(&cmd, &fw->data[(fw->size - remaining) + 1],
|
||||||
cmd.wlen = len;
|
len, 1);
|
||||||
cmd.rlen = 1;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
@@ -521,10 +487,7 @@ static int si2168_init(struct dvb_frontend *fe)
|
|||||||
} else if (fw->size % 8 == 0) {
|
} else if (fw->size % 8 == 0) {
|
||||||
/* firmware is in the old format */
|
/* firmware is in the old format */
|
||||||
for (remaining = fw->size; remaining > 0; remaining -= 8) {
|
for (remaining = fw->size; remaining > 0; remaining -= 8) {
|
||||||
len = 8;
|
cmd_init(&cmd, &fw->data[fw->size - remaining], 8, 1);
|
||||||
memcpy(cmd.args, &fw->data[fw->size - remaining], len);
|
|
||||||
cmd.wlen = len;
|
|
||||||
cmd.rlen = 1;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
@@ -541,17 +504,13 @@ static int si2168_init(struct dvb_frontend *fe)
|
|||||||
|
|
||||||
release_firmware(fw);
|
release_firmware(fw);
|
||||||
|
|
||||||
memcpy(cmd.args, "\x01\x01", 2);
|
cmd_init(&cmd, "\x01\x01", 2, 1);
|
||||||
cmd.wlen = 2;
|
|
||||||
cmd.rlen = 1;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* query firmware version */
|
/* query firmware version */
|
||||||
memcpy(cmd.args, "\x11", 1);
|
cmd_init(&cmd, "\x11", 1, 10);
|
||||||
cmd.wlen = 1;
|
|
||||||
cmd.rlen = 10;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -609,9 +568,7 @@ static int si2168_sleep(struct dvb_frontend *fe)
|
|||||||
if (dev->version > ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
|
if (dev->version > ('B' << 24 | 4 << 16 | 0 << 8 | 11 << 0))
|
||||||
dev->warm = false;
|
dev->warm = false;
|
||||||
|
|
||||||
memcpy(cmd.args, "\x13", 1);
|
cmd_init(&cmd, "\x13", 1, 0);
|
||||||
cmd.wlen = 1;
|
|
||||||
cmd.rlen = 0;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -637,9 +594,7 @@ static int si2168_select(struct i2c_mux_core *muxc, u32 chan)
|
|||||||
struct si2168_cmd cmd;
|
struct si2168_cmd cmd;
|
||||||
|
|
||||||
/* open I2C gate */
|
/* open I2C gate */
|
||||||
memcpy(cmd.args, "\xc0\x0d\x01", 3);
|
cmd_init(&cmd, "\xc0\x0d\x01", 3, 0);
|
||||||
cmd.wlen = 3;
|
|
||||||
cmd.rlen = 0;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -657,9 +612,7 @@ static int si2168_deselect(struct i2c_mux_core *muxc, u32 chan)
|
|||||||
struct si2168_cmd cmd;
|
struct si2168_cmd cmd;
|
||||||
|
|
||||||
/* close I2C gate */
|
/* close I2C gate */
|
||||||
memcpy(cmd.args, "\xc0\x0d\x00", 3);
|
cmd_init(&cmd, "\xc0\x0d\x00", 3, 0);
|
||||||
cmd.wlen = 3;
|
|
||||||
cmd.rlen = 0;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -730,25 +683,20 @@ static int si2168_probe(struct i2c_client *client,
|
|||||||
mutex_init(&dev->i2c_mutex);
|
mutex_init(&dev->i2c_mutex);
|
||||||
|
|
||||||
/* Initialize */
|
/* Initialize */
|
||||||
memcpy(cmd.args, "\xc0\x12\x00\x0c\x00\x0d\x16\x00\x00\x00\x00\x00\x00", 13);
|
cmd_init(&cmd, "\xc0\x12\x00\x0c\x00\x0d\x16\x00\x00\x00\x00\x00\x00",
|
||||||
cmd.wlen = 13;
|
13, 0);
|
||||||
cmd.rlen = 0;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_kfree;
|
goto err_kfree;
|
||||||
|
|
||||||
/* Power up */
|
/* Power up */
|
||||||
memcpy(cmd.args, "\xc0\x06\x01\x0f\x00\x20\x20\x01", 8);
|
cmd_init(&cmd, "\xc0\x06\x01\x0f\x00\x20\x20\x01", 8, 1);
|
||||||
cmd.wlen = 8;
|
|
||||||
cmd.rlen = 1;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_kfree;
|
goto err_kfree;
|
||||||
|
|
||||||
/* Query chip revision */
|
/* Query chip revision */
|
||||||
memcpy(cmd.args, "\x02", 1);
|
cmd_init(&cmd, "\x02", 1, 13);
|
||||||
cmd.wlen = 1;
|
|
||||||
cmd.rlen = 13;
|
|
||||||
ret = si2168_cmd_execute(client, &cmd);
|
ret = si2168_cmd_execute(client, &cmd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_kfree;
|
goto err_kfree;
|
||||||
|
@@ -30,6 +30,7 @@ struct si2168_config {
|
|||||||
#define SI2168_TS_PARALLEL 0x06
|
#define SI2168_TS_PARALLEL 0x06
|
||||||
#define SI2168_TS_SERIAL 0x03
|
#define SI2168_TS_SERIAL 0x03
|
||||||
#define SI2168_TS_TRISTATE 0x00
|
#define SI2168_TS_TRISTATE 0x00
|
||||||
|
#define SI2168_TS_CLK_MANUAL 0x20
|
||||||
u8 ts_mode;
|
u8 ts_mode;
|
||||||
|
|
||||||
/* TS clock inverted */
|
/* TS clock inverted */
|
||||||
|
@@ -270,7 +270,7 @@ static enum fe_stv0900_error stv0900_initialize(struct stv0900_internal *intp)
|
|||||||
|
|
||||||
static u32 stv0900_get_mclk_freq(struct stv0900_internal *intp, u32 ext_clk)
|
static u32 stv0900_get_mclk_freq(struct stv0900_internal *intp, u32 ext_clk)
|
||||||
{
|
{
|
||||||
u32 mclk = 90000000, div = 0, ad_div = 0;
|
u32 mclk, div, ad_div;
|
||||||
|
|
||||||
div = stv0900_get_bits(intp, F0900_M_DIV);
|
div = stv0900_get_bits(intp, F0900_M_DIV);
|
||||||
ad_div = ((stv0900_get_bits(intp, F0900_SELX1RATIO) == 1) ? 4 : 6);
|
ad_div = ((stv0900_get_bits(intp, F0900_SELX1RATIO) == 1) ? 4 : 6);
|
||||||
|
@@ -421,7 +421,6 @@ static int zd1301_demod_i2c_master_xfer(struct i2c_adapter *adapter,
|
|||||||
} else {
|
} else {
|
||||||
dev_dbg(&pdev->dev, "unknown msg[0].len=%u\n", msg[0].len);
|
dev_dbg(&pdev->dev, "unknown msg[0].len=%u\n", msg[0].len);
|
||||||
ret = -EOPNOTSUPP;
|
ret = -EOPNOTSUPP;
|
||||||
if (ret)
|
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -217,7 +217,7 @@ static const struct file_operations fdtv_ca_fops = {
|
|||||||
.llseek = noop_llseek,
|
.llseek = noop_llseek,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct dvb_device fdtv_ca = {
|
static const struct dvb_device fdtv_ca = {
|
||||||
.users = 1,
|
.users = 1,
|
||||||
.readers = 1,
|
.readers = 1,
|
||||||
.writers = 1,
|
.writers = 1,
|
||||||
|
@@ -22,8 +22,11 @@ config VIDEO_IR_I2C
|
|||||||
# Encoder / Decoder module configuration
|
# Encoder / Decoder module configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
|
comment "I2C drivers hidden by 'Autoselect ancillary drivers'"
|
||||||
|
depends on MEDIA_HIDE_ANCILLARY_SUBDRV
|
||||||
|
|
||||||
menu "I2C Encoders, decoders, sensors and other helper chips"
|
menu "I2C Encoders, decoders, sensors and other helper chips"
|
||||||
visible if !MEDIA_SUBDRV_AUTOSELECT || COMPILE_TEST || EXPERT
|
visible if !MEDIA_HIDE_ANCILLARY_SUBDRV
|
||||||
|
|
||||||
comment "Audio decoders, processors and mixers"
|
comment "Audio decoders, processors and mixers"
|
||||||
|
|
||||||
@@ -723,6 +726,19 @@ config VIDEO_OV5670
|
|||||||
To compile this driver as a module, choose M here: the
|
To compile this driver as a module, choose M here: the
|
||||||
module will be called ov5670.
|
module will be called ov5670.
|
||||||
|
|
||||||
|
config VIDEO_OV5675
|
||||||
|
tristate "OmniVision OV5675 sensor support"
|
||||||
|
depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API
|
||||||
|
depends on MEDIA_CAMERA_SUPPORT
|
||||||
|
depends on MEDIA_CONTROLLER
|
||||||
|
select V4L2_FWNODE
|
||||||
|
help
|
||||||
|
This is a Video4Linux2 sensor driver for the OmniVision
|
||||||
|
OV5675 camera.
|
||||||
|
|
||||||
|
To compile this driver as a module, choose M here: the
|
||||||
|
module will be called ov5675.
|
||||||
|
|
||||||
config VIDEO_OV5695
|
config VIDEO_OV5695
|
||||||
tristate "OmniVision OV5695 sensor support"
|
tristate "OmniVision OV5695 sensor support"
|
||||||
depends on I2C && VIDEO_V4L2
|
depends on I2C && VIDEO_V4L2
|
||||||
|
@@ -70,6 +70,7 @@ obj-$(CONFIG_VIDEO_OV5640) += ov5640.o
|
|||||||
obj-$(CONFIG_VIDEO_OV5645) += ov5645.o
|
obj-$(CONFIG_VIDEO_OV5645) += ov5645.o
|
||||||
obj-$(CONFIG_VIDEO_OV5647) += ov5647.o
|
obj-$(CONFIG_VIDEO_OV5647) += ov5647.o
|
||||||
obj-$(CONFIG_VIDEO_OV5670) += ov5670.o
|
obj-$(CONFIG_VIDEO_OV5670) += ov5670.o
|
||||||
|
obj-$(CONFIG_VIDEO_OV5675) += ov5675.o
|
||||||
obj-$(CONFIG_VIDEO_OV5695) += ov5695.o
|
obj-$(CONFIG_VIDEO_OV5695) += ov5695.o
|
||||||
obj-$(CONFIG_VIDEO_OV6650) += ov6650.o
|
obj-$(CONFIG_VIDEO_OV6650) += ov6650.o
|
||||||
obj-$(CONFIG_VIDEO_OV7251) += ov7251.o
|
obj-$(CONFIG_VIDEO_OV7251) += ov7251.o
|
||||||
|
@@ -1148,10 +1148,10 @@ static int ad9389b_probe(struct i2c_client *client, const struct i2c_device_id *
|
|||||||
v4l2_dbg(1, debug, sd, "reg 0x41 0x%x, chip version (reg 0x00) 0x%x\n",
|
v4l2_dbg(1, debug, sd, "reg 0x41 0x%x, chip version (reg 0x00) 0x%x\n",
|
||||||
ad9389b_rd(sd, 0x41), state->chip_revision);
|
ad9389b_rd(sd, 0x41), state->chip_revision);
|
||||||
|
|
||||||
state->edid_i2c_client = i2c_new_dummy(client->adapter, (0x7e>>1));
|
state->edid_i2c_client = i2c_new_dummy_device(client->adapter, (0x7e >> 1));
|
||||||
if (state->edid_i2c_client == NULL) {
|
if (IS_ERR(state->edid_i2c_client)) {
|
||||||
v4l2_err(sd, "failed to register edid i2c client\n");
|
v4l2_err(sd, "failed to register edid i2c client\n");
|
||||||
err = -ENOMEM;
|
err = PTR_ERR(state->edid_i2c_client);
|
||||||
goto err_entity;
|
goto err_entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1329,17 +1329,17 @@ static int adv7180_probe(struct i2c_client *client,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) {
|
if (state->chip_info->flags & ADV7180_FLAG_MIPI_CSI2) {
|
||||||
state->csi_client = i2c_new_dummy(client->adapter,
|
state->csi_client = i2c_new_dummy_device(client->adapter,
|
||||||
ADV7180_DEFAULT_CSI_I2C_ADDR);
|
ADV7180_DEFAULT_CSI_I2C_ADDR);
|
||||||
if (!state->csi_client)
|
if (IS_ERR(state->csi_client))
|
||||||
return -ENOMEM;
|
return PTR_ERR(state->csi_client);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->chip_info->flags & ADV7180_FLAG_I2P) {
|
if (state->chip_info->flags & ADV7180_FLAG_I2P) {
|
||||||
state->vpp_client = i2c_new_dummy(client->adapter,
|
state->vpp_client = i2c_new_dummy_device(client->adapter,
|
||||||
ADV7180_DEFAULT_VPP_I2C_ADDR);
|
ADV7180_DEFAULT_VPP_I2C_ADDR);
|
||||||
if (!state->vpp_client) {
|
if (IS_ERR(state->vpp_client)) {
|
||||||
ret = -ENOMEM;
|
ret = PTR_ERR(state->vpp_client);
|
||||||
goto err_unregister_csi_client;
|
goto err_unregister_csi_client;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -428,8 +428,7 @@ done:
|
|||||||
return pdata;
|
return pdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int adv7343_probe(struct i2c_client *client,
|
static int adv7343_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct adv7343_state *state;
|
struct adv7343_state *state;
|
||||||
int err;
|
int err;
|
||||||
@@ -524,7 +523,7 @@ static struct i2c_driver adv7343_driver = {
|
|||||||
.of_match_table = of_match_ptr(adv7343_of_match),
|
.of_match_table = of_match_ptr(adv7343_of_match),
|
||||||
.name = "adv7343",
|
.name = "adv7343",
|
||||||
},
|
},
|
||||||
.probe = adv7343_probe,
|
.probe_new = adv7343_probe,
|
||||||
.remove = adv7343_remove,
|
.remove = adv7343_remove,
|
||||||
.id_table = adv7343_id,
|
.id_table = adv7343_id,
|
||||||
};
|
};
|
||||||
|
@@ -668,8 +668,7 @@ static void adv748x_dt_cleanup(struct adv748x_state *state)
|
|||||||
of_node_put(state->endpoints[i]);
|
of_node_put(state->endpoints[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int adv748x_probe(struct i2c_client *client,
|
static int adv748x_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct adv748x_state *state;
|
struct adv748x_state *state;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -797,13 +796,6 @@ static int adv748x_remove(struct i2c_client *client)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct i2c_device_id adv748x_id[] = {
|
|
||||||
{ "adv7481", 0 },
|
|
||||||
{ "adv7482", 0 },
|
|
||||||
{ },
|
|
||||||
};
|
|
||||||
MODULE_DEVICE_TABLE(i2c, adv748x_id);
|
|
||||||
|
|
||||||
static const struct of_device_id adv748x_of_table[] = {
|
static const struct of_device_id adv748x_of_table[] = {
|
||||||
{ .compatible = "adi,adv7481", },
|
{ .compatible = "adi,adv7481", },
|
||||||
{ .compatible = "adi,adv7482", },
|
{ .compatible = "adi,adv7482", },
|
||||||
@@ -816,9 +808,8 @@ static struct i2c_driver adv748x_driver = {
|
|||||||
.name = "adv748x",
|
.name = "adv748x",
|
||||||
.of_match_table = adv748x_of_table,
|
.of_match_table = adv748x_of_table,
|
||||||
},
|
},
|
||||||
.probe = adv748x_probe,
|
.probe_new = adv748x_probe,
|
||||||
.remove = adv748x_remove,
|
.remove = adv748x_remove,
|
||||||
.id_table = adv748x_id,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module_i2c_driver(adv748x_driver);
|
module_i2c_driver(adv748x_driver);
|
||||||
|
@@ -1872,11 +1872,11 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
|
|||||||
goto err_entity;
|
goto err_entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
state->i2c_edid = i2c_new_dummy(client->adapter,
|
state->i2c_edid = i2c_new_dummy_device(client->adapter,
|
||||||
state->i2c_edid_addr >> 1);
|
state->i2c_edid_addr >> 1);
|
||||||
if (state->i2c_edid == NULL) {
|
if (IS_ERR(state->i2c_edid)) {
|
||||||
v4l2_err(sd, "failed to register edid i2c client\n");
|
v4l2_err(sd, "failed to register edid i2c client\n");
|
||||||
err = -ENOMEM;
|
err = PTR_ERR(state->i2c_edid);
|
||||||
goto err_entity;
|
goto err_entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1889,11 +1889,11 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (state->pdata.cec_clk) {
|
if (state->pdata.cec_clk) {
|
||||||
state->i2c_cec = i2c_new_dummy(client->adapter,
|
state->i2c_cec = i2c_new_dummy_device(client->adapter,
|
||||||
state->i2c_cec_addr >> 1);
|
state->i2c_cec_addr >> 1);
|
||||||
if (state->i2c_cec == NULL) {
|
if (IS_ERR(state->i2c_cec)) {
|
||||||
v4l2_err(sd, "failed to register cec i2c client\n");
|
v4l2_err(sd, "failed to register cec i2c client\n");
|
||||||
err = -ENOMEM;
|
err = PTR_ERR(state->i2c_cec);
|
||||||
goto err_unreg_edid;
|
goto err_unreg_edid;
|
||||||
}
|
}
|
||||||
adv7511_wr(sd, 0xe2, 0x00); /* power up cec section */
|
adv7511_wr(sd, 0xe2, 0x00); /* power up cec section */
|
||||||
@@ -1901,10 +1901,10 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
|
|||||||
adv7511_wr(sd, 0xe2, 0x01); /* power down cec section */
|
adv7511_wr(sd, 0xe2, 0x01); /* power down cec section */
|
||||||
}
|
}
|
||||||
|
|
||||||
state->i2c_pktmem = i2c_new_dummy(client->adapter, state->i2c_pktmem_addr >> 1);
|
state->i2c_pktmem = i2c_new_dummy_device(client->adapter, state->i2c_pktmem_addr >> 1);
|
||||||
if (state->i2c_pktmem == NULL) {
|
if (IS_ERR(state->i2c_pktmem)) {
|
||||||
v4l2_err(sd, "failed to register pktmem i2c client\n");
|
v4l2_err(sd, "failed to register pktmem i2c client\n");
|
||||||
err = -ENOMEM;
|
err = PTR_ERR(state->i2c_pktmem);
|
||||||
goto err_unreg_cec;
|
goto err_unreg_cec;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1940,7 +1940,6 @@ static int adv7511_probe(struct i2c_client *client, const struct i2c_device_id *
|
|||||||
err_unreg_pktmem:
|
err_unreg_pktmem:
|
||||||
i2c_unregister_device(state->i2c_pktmem);
|
i2c_unregister_device(state->i2c_pktmem);
|
||||||
err_unreg_cec:
|
err_unreg_cec:
|
||||||
if (state->i2c_cec)
|
|
||||||
i2c_unregister_device(state->i2c_cec);
|
i2c_unregister_device(state->i2c_cec);
|
||||||
err_unreg_edid:
|
err_unreg_edid:
|
||||||
i2c_unregister_device(state->i2c_edid);
|
i2c_unregister_device(state->i2c_edid);
|
||||||
@@ -1967,7 +1966,6 @@ static int adv7511_remove(struct i2c_client *client)
|
|||||||
adv7511_init_setup(sd);
|
adv7511_init_setup(sd);
|
||||||
cancel_delayed_work(&state->edid_handler);
|
cancel_delayed_work(&state->edid_handler);
|
||||||
i2c_unregister_device(state->i2c_edid);
|
i2c_unregister_device(state->i2c_edid);
|
||||||
if (state->i2c_cec)
|
|
||||||
i2c_unregister_device(state->i2c_cec);
|
i2c_unregister_device(state->i2c_cec);
|
||||||
i2c_unregister_device(state->i2c_pktmem);
|
i2c_unregister_device(state->i2c_pktmem);
|
||||||
destroy_workqueue(state->work_queue);
|
destroy_workqueue(state->work_queue);
|
||||||
@@ -1980,14 +1978,14 @@ static int adv7511_remove(struct i2c_client *client)
|
|||||||
/* ----------------------------------------------------------------------- */
|
/* ----------------------------------------------------------------------- */
|
||||||
|
|
||||||
static const struct i2c_device_id adv7511_id[] = {
|
static const struct i2c_device_id adv7511_id[] = {
|
||||||
{ "adv7511", 0 },
|
{ "adv7511-v4l2", 0 },
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, adv7511_id);
|
MODULE_DEVICE_TABLE(i2c, adv7511_id);
|
||||||
|
|
||||||
static struct i2c_driver adv7511_driver = {
|
static struct i2c_driver adv7511_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "adv7511",
|
.name = "adv7511-v4l2",
|
||||||
},
|
},
|
||||||
.probe = adv7511_probe,
|
.probe = adv7511_probe,
|
||||||
.remove = adv7511_remove,
|
.remove = adv7511_remove,
|
||||||
|
@@ -3351,27 +3351,16 @@ static const struct v4l2_ctrl_config adv7842_ctrl_free_run_color = {
|
|||||||
static void adv7842_unregister_clients(struct v4l2_subdev *sd)
|
static void adv7842_unregister_clients(struct v4l2_subdev *sd)
|
||||||
{
|
{
|
||||||
struct adv7842_state *state = to_state(sd);
|
struct adv7842_state *state = to_state(sd);
|
||||||
if (state->i2c_avlink)
|
|
||||||
i2c_unregister_device(state->i2c_avlink);
|
i2c_unregister_device(state->i2c_avlink);
|
||||||
if (state->i2c_cec)
|
|
||||||
i2c_unregister_device(state->i2c_cec);
|
i2c_unregister_device(state->i2c_cec);
|
||||||
if (state->i2c_infoframe)
|
|
||||||
i2c_unregister_device(state->i2c_infoframe);
|
i2c_unregister_device(state->i2c_infoframe);
|
||||||
if (state->i2c_sdp_io)
|
|
||||||
i2c_unregister_device(state->i2c_sdp_io);
|
i2c_unregister_device(state->i2c_sdp_io);
|
||||||
if (state->i2c_sdp)
|
|
||||||
i2c_unregister_device(state->i2c_sdp);
|
i2c_unregister_device(state->i2c_sdp);
|
||||||
if (state->i2c_afe)
|
|
||||||
i2c_unregister_device(state->i2c_afe);
|
i2c_unregister_device(state->i2c_afe);
|
||||||
if (state->i2c_repeater)
|
|
||||||
i2c_unregister_device(state->i2c_repeater);
|
i2c_unregister_device(state->i2c_repeater);
|
||||||
if (state->i2c_edid)
|
|
||||||
i2c_unregister_device(state->i2c_edid);
|
i2c_unregister_device(state->i2c_edid);
|
||||||
if (state->i2c_hdmi)
|
|
||||||
i2c_unregister_device(state->i2c_hdmi);
|
i2c_unregister_device(state->i2c_hdmi);
|
||||||
if (state->i2c_cp)
|
|
||||||
i2c_unregister_device(state->i2c_cp);
|
i2c_unregister_device(state->i2c_cp);
|
||||||
if (state->i2c_vdp)
|
|
||||||
i2c_unregister_device(state->i2c_vdp);
|
i2c_unregister_device(state->i2c_vdp);
|
||||||
|
|
||||||
state->i2c_avlink = NULL;
|
state->i2c_avlink = NULL;
|
||||||
@@ -3400,9 +3389,12 @@ static struct i2c_client *adv7842_dummy_client(struct v4l2_subdev *sd, const cha
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cp = i2c_new_dummy(client->adapter, io_read(sd, io_reg) >> 1);
|
cp = i2c_new_dummy_device(client->adapter, io_read(sd, io_reg) >> 1);
|
||||||
if (!cp)
|
if (IS_ERR(cp)) {
|
||||||
v4l2_err(sd, "register %s on i2c addr 0x%x failed\n", desc, addr);
|
v4l2_err(sd, "register %s on i2c addr 0x%x failed with %ld\n",
|
||||||
|
desc, addr, PTR_ERR(cp));
|
||||||
|
cp = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
@@ -1396,8 +1396,7 @@ static int __maybe_unused et8ek8_resume(struct device *dev)
|
|||||||
return __et8ek8_set_power(sensor, true);
|
return __et8ek8_set_power(sensor, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int et8ek8_probe(struct i2c_client *client,
|
static int et8ek8_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *devid)
|
|
||||||
{
|
{
|
||||||
struct et8ek8_sensor *sensor;
|
struct et8ek8_sensor *sensor;
|
||||||
struct device *dev = &client->dev;
|
struct device *dev = &client->dev;
|
||||||
@@ -1504,7 +1503,7 @@ static struct i2c_driver et8ek8_i2c_driver = {
|
|||||||
.pm = &et8ek8_pm_ops,
|
.pm = &et8ek8_pm_ops,
|
||||||
.of_match_table = et8ek8_of_table,
|
.of_match_table = et8ek8_of_table,
|
||||||
},
|
},
|
||||||
.probe = et8ek8_probe,
|
.probe_new = et8ek8_probe,
|
||||||
.remove = __exit_p(et8ek8_remove),
|
.remove = __exit_p(et8ek8_remove),
|
||||||
.id_table = et8ek8_id_table,
|
.id_table = et8ek8_id_table,
|
||||||
};
|
};
|
||||||
|
@@ -1821,8 +1821,7 @@ static const struct i2c_device_id imx274_id[] = {
|
|||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(i2c, imx274_id);
|
MODULE_DEVICE_TABLE(i2c, imx274_id);
|
||||||
|
|
||||||
static int imx274_probe(struct i2c_client *client,
|
static int imx274_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
struct stimx274 *imx274;
|
struct stimx274 *imx274;
|
||||||
@@ -1984,7 +1983,7 @@ static struct i2c_driver imx274_i2c_driver = {
|
|||||||
.name = DRIVER_NAME,
|
.name = DRIVER_NAME,
|
||||||
.of_match_table = imx274_of_id_table,
|
.of_match_table = imx274_of_id_table,
|
||||||
},
|
},
|
||||||
.probe = imx274_probe,
|
.probe_new = imx274_probe,
|
||||||
.remove = imx274_remove,
|
.remove = imx274_remove,
|
||||||
.id_table = imx274_id,
|
.id_table = imx274_id,
|
||||||
};
|
};
|
||||||
|
@@ -885,9 +885,11 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
|||||||
INIT_DELAYED_WORK(&ir->work, ir_work);
|
INIT_DELAYED_WORK(&ir->work, ir_work);
|
||||||
|
|
||||||
if (probe_tx) {
|
if (probe_tx) {
|
||||||
ir->tx_c = i2c_new_dummy(client->adapter, 0x70);
|
ir->tx_c = i2c_new_dummy_device(client->adapter, 0x70);
|
||||||
if (!ir->tx_c) {
|
if (IS_ERR(ir->tx_c)) {
|
||||||
dev_err(&client->dev, "failed to setup tx i2c address");
|
dev_err(&client->dev, "failed to setup tx i2c address");
|
||||||
|
err = PTR_ERR(ir->tx_c);
|
||||||
|
goto err_out_free;
|
||||||
} else if (!zilog_init(ir)) {
|
} else if (!zilog_init(ir)) {
|
||||||
ir->carrier = 38000;
|
ir->carrier = 38000;
|
||||||
ir->duty_cycle = 40;
|
ir->duty_cycle = 40;
|
||||||
@@ -904,7 +906,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_out_free:
|
err_out_free:
|
||||||
if (ir->tx_c)
|
if (!IS_ERR(ir->tx_c))
|
||||||
i2c_unregister_device(ir->tx_c);
|
i2c_unregister_device(ir->tx_c);
|
||||||
|
|
||||||
/* Only frees rc if it were allocated internally */
|
/* Only frees rc if it were allocated internally */
|
||||||
@@ -916,16 +918,12 @@ static int ir_remove(struct i2c_client *client)
|
|||||||
{
|
{
|
||||||
struct IR_i2c *ir = i2c_get_clientdata(client);
|
struct IR_i2c *ir = i2c_get_clientdata(client);
|
||||||
|
|
||||||
/* kill outstanding polls */
|
|
||||||
cancel_delayed_work_sync(&ir->work);
|
cancel_delayed_work_sync(&ir->work);
|
||||||
|
|
||||||
if (ir->tx_c)
|
|
||||||
i2c_unregister_device(ir->tx_c);
|
i2c_unregister_device(ir->tx_c);
|
||||||
|
|
||||||
/* unregister device */
|
|
||||||
rc_unregister_device(ir->rc);
|
rc_unregister_device(ir->rc);
|
||||||
|
|
||||||
/* free memory */
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1271,8 +1271,7 @@ static int max2175_refout_load_to_bits(struct i2c_client *client, u32 load,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int max2175_probe(struct i2c_client *client,
|
static int max2175_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
bool master = true, am_hiz = false;
|
bool master = true, am_hiz = false;
|
||||||
u32 refout_load, refout_bits = 0; /* REFOUT disabled */
|
u32 refout_load, refout_bits = 0; /* REFOUT disabled */
|
||||||
@@ -1433,7 +1432,7 @@ static struct i2c_driver max2175_driver = {
|
|||||||
.name = DRIVER_NAME,
|
.name = DRIVER_NAME,
|
||||||
.of_match_table = max2175_of_ids,
|
.of_match_table = max2175_of_ids,
|
||||||
},
|
},
|
||||||
.probe = max2175_probe,
|
.probe_new = max2175_probe,
|
||||||
.remove = max2175_remove,
|
.remove = max2175_remove,
|
||||||
.id_table = max2175_id,
|
.id_table = max2175_id,
|
||||||
};
|
};
|
||||||
|
@@ -726,8 +726,7 @@ static const struct v4l2_subdev_ops mt9m001_subdev_ops = {
|
|||||||
.pad = &mt9m001_subdev_pad_ops,
|
.pad = &mt9m001_subdev_pad_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int mt9m001_probe(struct i2c_client *client,
|
static int mt9m001_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *did)
|
|
||||||
{
|
{
|
||||||
struct mt9m001 *mt9m001;
|
struct mt9m001 *mt9m001;
|
||||||
struct i2c_adapter *adapter = client->adapter;
|
struct i2c_adapter *adapter = client->adapter;
|
||||||
@@ -872,7 +871,7 @@ static struct i2c_driver mt9m001_i2c_driver = {
|
|||||||
.pm = &mt9m001_pm_ops,
|
.pm = &mt9m001_pm_ops,
|
||||||
.of_match_table = mt9m001_of_match,
|
.of_match_table = mt9m001_of_match,
|
||||||
},
|
},
|
||||||
.probe = mt9m001_probe,
|
.probe_new = mt9m001_probe,
|
||||||
.remove = mt9m001_remove,
|
.remove = mt9m001_remove,
|
||||||
.id_table = mt9m001_id,
|
.id_table = mt9m001_id,
|
||||||
};
|
};
|
||||||
|
@@ -533,7 +533,7 @@ static int mt9m111_get_fmt(struct v4l2_subdev *sd,
|
|||||||
format->format = *mf;
|
format->format = *mf;
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return -ENOTTY;
|
return -EINVAL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1243,8 +1243,7 @@ out_put_fw:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mt9m111_probe(struct i2c_client *client,
|
static int mt9m111_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *did)
|
|
||||||
{
|
{
|
||||||
struct mt9m111 *mt9m111;
|
struct mt9m111 *mt9m111;
|
||||||
struct i2c_adapter *adapter = client->adapter;
|
struct i2c_adapter *adapter = client->adapter;
|
||||||
@@ -1388,7 +1387,7 @@ static struct i2c_driver mt9m111_i2c_driver = {
|
|||||||
.name = "mt9m111",
|
.name = "mt9m111",
|
||||||
.of_match_table = of_match_ptr(mt9m111_of_match),
|
.of_match_table = of_match_ptr(mt9m111_of_match),
|
||||||
},
|
},
|
||||||
.probe = mt9m111_probe,
|
.probe_new = mt9m111_probe,
|
||||||
.remove = mt9m111_remove,
|
.remove = mt9m111_remove,
|
||||||
.id_table = mt9m111_id,
|
.id_table = mt9m111_id,
|
||||||
};
|
};
|
||||||
|
@@ -929,7 +929,7 @@ static int ov2640_get_fmt(struct v4l2_subdev *sd,
|
|||||||
format->format = *mf;
|
format->format = *mf;
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return -ENOTTY;
|
return -EINVAL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1190,8 +1190,7 @@ static int ov2640_probe_dt(struct i2c_client *client,
|
|||||||
/*
|
/*
|
||||||
* i2c_driver functions
|
* i2c_driver functions
|
||||||
*/
|
*/
|
||||||
static int ov2640_probe(struct i2c_client *client,
|
static int ov2640_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *did)
|
|
||||||
{
|
{
|
||||||
struct ov2640_priv *priv;
|
struct ov2640_priv *priv;
|
||||||
struct i2c_adapter *adapter = client->adapter;
|
struct i2c_adapter *adapter = client->adapter;
|
||||||
@@ -1302,7 +1301,7 @@ static struct i2c_driver ov2640_i2c_driver = {
|
|||||||
.name = "ov2640",
|
.name = "ov2640",
|
||||||
.of_match_table = of_match_ptr(ov2640_of_match),
|
.of_match_table = of_match_ptr(ov2640_of_match),
|
||||||
},
|
},
|
||||||
.probe = ov2640_probe,
|
.probe_new = ov2640_probe,
|
||||||
.remove = ov2640_remove,
|
.remove = ov2640_remove,
|
||||||
.id_table = ov2640_id,
|
.id_table = ov2640_id,
|
||||||
};
|
};
|
||||||
|
@@ -1055,7 +1055,7 @@ static int ov2659_get_fmt(struct v4l2_subdev *sd,
|
|||||||
mutex_unlock(&ov2659->lock);
|
mutex_unlock(&ov2659->lock);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return -ENOTTY;
|
return -EINVAL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1131,8 +1131,6 @@ static int ov2659_set_fmt(struct v4l2_subdev *sd,
|
|||||||
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
||||||
mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
|
mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
|
||||||
*mf = fmt->format;
|
*mf = fmt->format;
|
||||||
#else
|
|
||||||
ret = -ENOTTY;
|
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
s64 val;
|
s64 val;
|
||||||
@@ -1386,8 +1384,7 @@ done:
|
|||||||
return pdata;
|
return pdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ov2659_probe(struct i2c_client *client,
|
static int ov2659_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
const struct ov2659_platform_data *pdata = ov2659_get_pdata(client);
|
const struct ov2659_platform_data *pdata = ov2659_get_pdata(client);
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
@@ -1515,7 +1512,7 @@ static struct i2c_driver ov2659_i2c_driver = {
|
|||||||
.name = DRIVER_NAME,
|
.name = DRIVER_NAME,
|
||||||
.of_match_table = of_match_ptr(ov2659_of_match),
|
.of_match_table = of_match_ptr(ov2659_of_match),
|
||||||
},
|
},
|
||||||
.probe = ov2659_probe,
|
.probe_new = ov2659_probe,
|
||||||
.remove = ov2659_remove,
|
.remove = ov2659_remove,
|
||||||
.id_table = ov2659_id,
|
.id_table = ov2659_id,
|
||||||
};
|
};
|
||||||
|
@@ -675,7 +675,7 @@ static int ov2680_get_fmt(struct v4l2_subdev *sd,
|
|||||||
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
||||||
fmt = v4l2_subdev_get_try_format(&sensor->sd, cfg, format->pad);
|
fmt = v4l2_subdev_get_try_format(&sensor->sd, cfg, format->pad);
|
||||||
#else
|
#else
|
||||||
ret = -ENOTTY;
|
ret = -EINVAL;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
fmt = &sensor->fmt;
|
fmt = &sensor->fmt;
|
||||||
@@ -723,10 +723,7 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
|
|||||||
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
||||||
try_fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
|
try_fmt = v4l2_subdev_get_try_format(sd, cfg, 0);
|
||||||
format->format = *try_fmt;
|
format->format = *try_fmt;
|
||||||
#else
|
|
||||||
ret = -ENOTTY;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1023,7 +1020,7 @@ static int ov2680_check_id(struct ov2680_dev *sensor)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ov2860_parse_dt(struct ov2680_dev *sensor)
|
static int ov2680_parse_dt(struct ov2680_dev *sensor)
|
||||||
{
|
{
|
||||||
struct device *dev = ov2680_to_dev(sensor);
|
struct device *dev = ov2680_to_dev(sensor);
|
||||||
int ret;
|
int ret;
|
||||||
@@ -1064,7 +1061,7 @@ static int ov2680_probe(struct i2c_client *client)
|
|||||||
|
|
||||||
sensor->i2c_client = client;
|
sensor->i2c_client = client;
|
||||||
|
|
||||||
ret = ov2860_parse_dt(sensor);
|
ret = ov2680_parse_dt(sensor);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@@ -158,8 +158,8 @@ static const int ov5640_framerates[] = {
|
|||||||
/* regulator supplies */
|
/* regulator supplies */
|
||||||
static const char * const ov5640_supply_name[] = {
|
static const char * const ov5640_supply_name[] = {
|
||||||
"DOVDD", /* Digital I/O (1.8V) supply */
|
"DOVDD", /* Digital I/O (1.8V) supply */
|
||||||
"DVDD", /* Digital Core (1.5V) supply */
|
|
||||||
"AVDD", /* Analog (2.8V) supply */
|
"AVDD", /* Analog (2.8V) supply */
|
||||||
|
"DVDD", /* Digital Core (1.5V) supply */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define OV5640_NUM_SUPPLIES ARRAY_SIZE(ov5640_supply_name)
|
#define OV5640_NUM_SUPPLIES ARRAY_SIZE(ov5640_supply_name)
|
||||||
@@ -2936,8 +2936,7 @@ power_off:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ov5640_probe(struct i2c_client *client,
|
static int ov5640_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct device *dev = &client->dev;
|
struct device *dev = &client->dev;
|
||||||
struct fwnode_handle *endpoint;
|
struct fwnode_handle *endpoint;
|
||||||
@@ -3022,9 +3021,14 @@ static int ov5640_probe(struct i2c_client *client,
|
|||||||
/* request optional power down pin */
|
/* request optional power down pin */
|
||||||
sensor->pwdn_gpio = devm_gpiod_get_optional(dev, "powerdown",
|
sensor->pwdn_gpio = devm_gpiod_get_optional(dev, "powerdown",
|
||||||
GPIOD_OUT_HIGH);
|
GPIOD_OUT_HIGH);
|
||||||
|
if (IS_ERR(sensor->pwdn_gpio))
|
||||||
|
return PTR_ERR(sensor->pwdn_gpio);
|
||||||
|
|
||||||
/* request optional reset pin */
|
/* request optional reset pin */
|
||||||
sensor->reset_gpio = devm_gpiod_get_optional(dev, "reset",
|
sensor->reset_gpio = devm_gpiod_get_optional(dev, "reset",
|
||||||
GPIOD_OUT_HIGH);
|
GPIOD_OUT_HIGH);
|
||||||
|
if (IS_ERR(sensor->reset_gpio))
|
||||||
|
return PTR_ERR(sensor->reset_gpio);
|
||||||
|
|
||||||
v4l2_i2c_subdev_init(&sensor->sd, client, &ov5640_subdev_ops);
|
v4l2_i2c_subdev_init(&sensor->sd, client, &ov5640_subdev_ops);
|
||||||
|
|
||||||
@@ -3050,7 +3054,7 @@ static int ov5640_probe(struct i2c_client *client,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto entity_cleanup;
|
goto entity_cleanup;
|
||||||
|
|
||||||
ret = v4l2_async_register_subdev(&sensor->sd);
|
ret = v4l2_async_register_subdev_sensor_common(&sensor->sd);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto free_ctrls;
|
goto free_ctrls;
|
||||||
|
|
||||||
@@ -3095,7 +3099,7 @@ static struct i2c_driver ov5640_i2c_driver = {
|
|||||||
.of_match_table = ov5640_dt_ids,
|
.of_match_table = ov5640_dt_ids,
|
||||||
},
|
},
|
||||||
.id_table = ov5640_id,
|
.id_table = ov5640_id,
|
||||||
.probe = ov5640_probe,
|
.probe_new = ov5640_probe,
|
||||||
.remove = ov5640_remove,
|
.remove = ov5640_remove,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -34,10 +34,6 @@
|
|||||||
#include <media/v4l2-fwnode.h>
|
#include <media/v4l2-fwnode.h>
|
||||||
#include <media/v4l2-subdev.h>
|
#include <media/v4l2-subdev.h>
|
||||||
|
|
||||||
#define OV5645_VOLTAGE_ANALOG 2800000
|
|
||||||
#define OV5645_VOLTAGE_DIGITAL_CORE 1500000
|
|
||||||
#define OV5645_VOLTAGE_DIGITAL_IO 1800000
|
|
||||||
|
|
||||||
#define OV5645_SYSTEM_CTRL0 0x3008
|
#define OV5645_SYSTEM_CTRL0 0x3008
|
||||||
#define OV5645_SYSTEM_CTRL0_START 0x02
|
#define OV5645_SYSTEM_CTRL0_START 0x02
|
||||||
#define OV5645_SYSTEM_CTRL0_STOP 0x42
|
#define OV5645_SYSTEM_CTRL0_STOP 0x42
|
||||||
@@ -45,6 +41,8 @@
|
|||||||
#define OV5645_CHIP_ID_HIGH_BYTE 0x56
|
#define OV5645_CHIP_ID_HIGH_BYTE 0x56
|
||||||
#define OV5645_CHIP_ID_LOW 0x300b
|
#define OV5645_CHIP_ID_LOW 0x300b
|
||||||
#define OV5645_CHIP_ID_LOW_BYTE 0x45
|
#define OV5645_CHIP_ID_LOW_BYTE 0x45
|
||||||
|
#define OV5645_IO_MIPI_CTRL00 0x300e
|
||||||
|
#define OV5645_PAD_OUTPUT00 0x3019
|
||||||
#define OV5645_AWB_MANUAL_CONTROL 0x3406
|
#define OV5645_AWB_MANUAL_CONTROL 0x3406
|
||||||
#define OV5645_AWB_MANUAL_ENABLE BIT(0)
|
#define OV5645_AWB_MANUAL_ENABLE BIT(0)
|
||||||
#define OV5645_AEC_PK_MANUAL 0x3503
|
#define OV5645_AEC_PK_MANUAL 0x3503
|
||||||
@@ -55,6 +53,7 @@
|
|||||||
#define OV5645_ISP_VFLIP BIT(2)
|
#define OV5645_ISP_VFLIP BIT(2)
|
||||||
#define OV5645_TIMING_TC_REG21 0x3821
|
#define OV5645_TIMING_TC_REG21 0x3821
|
||||||
#define OV5645_SENSOR_MIRROR BIT(1)
|
#define OV5645_SENSOR_MIRROR BIT(1)
|
||||||
|
#define OV5645_MIPI_CTRL00 0x4800
|
||||||
#define OV5645_PRE_ISP_TEST_SETTING_1 0x503d
|
#define OV5645_PRE_ISP_TEST_SETTING_1 0x503d
|
||||||
#define OV5645_TEST_PATTERN_MASK 0x3
|
#define OV5645_TEST_PATTERN_MASK 0x3
|
||||||
#define OV5645_SET_TEST_PATTERN(x) ((x) & OV5645_TEST_PATTERN_MASK)
|
#define OV5645_SET_TEST_PATTERN(x) ((x) & OV5645_TEST_PATTERN_MASK)
|
||||||
@@ -62,6 +61,15 @@
|
|||||||
#define OV5645_SDE_SAT_U 0x5583
|
#define OV5645_SDE_SAT_U 0x5583
|
||||||
#define OV5645_SDE_SAT_V 0x5584
|
#define OV5645_SDE_SAT_V 0x5584
|
||||||
|
|
||||||
|
/* regulator supplies */
|
||||||
|
static const char * const ov5645_supply_name[] = {
|
||||||
|
"vdddo", /* Digital I/O (1.8V) supply */
|
||||||
|
"vdda", /* Analog (2.8V) supply */
|
||||||
|
"vddd", /* Digital Core (1.5V) supply */
|
||||||
|
};
|
||||||
|
|
||||||
|
#define OV5645_NUM_SUPPLIES ARRAY_SIZE(ov5645_supply_name)
|
||||||
|
|
||||||
struct reg_value {
|
struct reg_value {
|
||||||
u16 reg;
|
u16 reg;
|
||||||
u8 val;
|
u8 val;
|
||||||
@@ -86,9 +94,7 @@ struct ov5645 {
|
|||||||
struct v4l2_rect crop;
|
struct v4l2_rect crop;
|
||||||
struct clk *xclk;
|
struct clk *xclk;
|
||||||
|
|
||||||
struct regulator *io_regulator;
|
struct regulator_bulk_data supplies[OV5645_NUM_SUPPLIES];
|
||||||
struct regulator *core_regulator;
|
|
||||||
struct regulator *analog_regulator;
|
|
||||||
|
|
||||||
const struct ov5645_mode_info *current_mode;
|
const struct ov5645_mode_info *current_mode;
|
||||||
|
|
||||||
@@ -121,7 +127,6 @@ static const struct reg_value ov5645_global_init_setting[] = {
|
|||||||
{ 0x3503, 0x07 },
|
{ 0x3503, 0x07 },
|
||||||
{ 0x3002, 0x1c },
|
{ 0x3002, 0x1c },
|
||||||
{ 0x3006, 0xc3 },
|
{ 0x3006, 0xc3 },
|
||||||
{ 0x300e, 0x45 },
|
|
||||||
{ 0x3017, 0x00 },
|
{ 0x3017, 0x00 },
|
||||||
{ 0x3018, 0x00 },
|
{ 0x3018, 0x00 },
|
||||||
{ 0x302e, 0x0b },
|
{ 0x302e, 0x0b },
|
||||||
@@ -350,7 +355,10 @@ static const struct reg_value ov5645_global_init_setting[] = {
|
|||||||
{ 0x3a1f, 0x14 },
|
{ 0x3a1f, 0x14 },
|
||||||
{ 0x0601, 0x02 },
|
{ 0x0601, 0x02 },
|
||||||
{ 0x3008, 0x42 },
|
{ 0x3008, 0x42 },
|
||||||
{ 0x3008, 0x02 }
|
{ 0x3008, 0x02 },
|
||||||
|
{ OV5645_IO_MIPI_CTRL00, 0x40 },
|
||||||
|
{ OV5645_MIPI_CTRL00, 0x24 },
|
||||||
|
{ OV5645_PAD_OUTPUT00, 0x70 }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct reg_value ov5645_setting_sxga[] = {
|
static const struct reg_value ov5645_setting_sxga[] = {
|
||||||
@@ -533,55 +541,6 @@ static const struct ov5645_mode_info ov5645_mode_info_data[] = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ov5645_regulators_enable(struct ov5645 *ov5645)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = regulator_enable(ov5645->io_regulator);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(ov5645->dev, "set io voltage failed\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = regulator_enable(ov5645->analog_regulator);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(ov5645->dev, "set analog voltage failed\n");
|
|
||||||
goto err_disable_io;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = regulator_enable(ov5645->core_regulator);
|
|
||||||
if (ret) {
|
|
||||||
dev_err(ov5645->dev, "set core voltage failed\n");
|
|
||||||
goto err_disable_analog;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
err_disable_analog:
|
|
||||||
regulator_disable(ov5645->analog_regulator);
|
|
||||||
err_disable_io:
|
|
||||||
regulator_disable(ov5645->io_regulator);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ov5645_regulators_disable(struct ov5645 *ov5645)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = regulator_disable(ov5645->core_regulator);
|
|
||||||
if (ret < 0)
|
|
||||||
dev_err(ov5645->dev, "core regulator disable failed\n");
|
|
||||||
|
|
||||||
ret = regulator_disable(ov5645->analog_regulator);
|
|
||||||
if (ret < 0)
|
|
||||||
dev_err(ov5645->dev, "analog regulator disable failed\n");
|
|
||||||
|
|
||||||
ret = regulator_disable(ov5645->io_regulator);
|
|
||||||
if (ret < 0)
|
|
||||||
dev_err(ov5645->dev, "io regulator disable failed\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int ov5645_write_reg(struct ov5645 *ov5645, u16 reg, u8 val)
|
static int ov5645_write_reg(struct ov5645 *ov5645, u16 reg, u8 val)
|
||||||
{
|
{
|
||||||
u8 regbuf[3];
|
u8 regbuf[3];
|
||||||
@@ -680,15 +639,14 @@ static int ov5645_set_power_on(struct ov5645 *ov5645)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = ov5645_regulators_enable(ov5645);
|
ret = regulator_bulk_enable(OV5645_NUM_SUPPLIES, ov5645->supplies);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
ret = clk_prepare_enable(ov5645->xclk);
|
ret = clk_prepare_enable(ov5645->xclk);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(ov5645->dev, "clk prepare enable failed\n");
|
dev_err(ov5645->dev, "clk prepare enable failed\n");
|
||||||
ov5645_regulators_disable(ov5645);
|
regulator_bulk_disable(OV5645_NUM_SUPPLIES, ov5645->supplies);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -708,7 +666,7 @@ static void ov5645_set_power_off(struct ov5645 *ov5645)
|
|||||||
gpiod_set_value_cansleep(ov5645->rst_gpio, 1);
|
gpiod_set_value_cansleep(ov5645->rst_gpio, 1);
|
||||||
gpiod_set_value_cansleep(ov5645->enable_gpio, 0);
|
gpiod_set_value_cansleep(ov5645->enable_gpio, 0);
|
||||||
clk_disable_unprepare(ov5645->xclk);
|
clk_disable_unprepare(ov5645->xclk);
|
||||||
ov5645_regulators_disable(ov5645);
|
regulator_bulk_disable(OV5645_NUM_SUPPLIES, ov5645->supplies);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ov5645_s_power(struct v4l2_subdev *sd, int on)
|
static int ov5645_s_power(struct v4l2_subdev *sd, int on)
|
||||||
@@ -737,13 +695,9 @@ static int ov5645_s_power(struct v4l2_subdev *sd, int on)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ov5645_write_reg(ov5645, OV5645_SYSTEM_CTRL0,
|
usleep_range(500, 1000);
|
||||||
OV5645_SYSTEM_CTRL0_STOP);
|
|
||||||
if (ret < 0) {
|
|
||||||
ov5645_set_power_off(ov5645);
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
|
ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x58);
|
||||||
ov5645_set_power_off(ov5645);
|
ov5645_set_power_off(ov5645);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1049,11 +1003,20 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable)
|
|||||||
dev_err(ov5645->dev, "could not sync v4l2 controls\n");
|
dev_err(ov5645->dev, "could not sync v4l2 controls\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x45);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
ret = ov5645_write_reg(ov5645, OV5645_SYSTEM_CTRL0,
|
ret = ov5645_write_reg(ov5645, OV5645_SYSTEM_CTRL0,
|
||||||
OV5645_SYSTEM_CTRL0_START);
|
OV5645_SYSTEM_CTRL0_START);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
|
ret = ov5645_write_reg(ov5645, OV5645_IO_MIPI_CTRL00, 0x40);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
ret = ov5645_write_reg(ov5645, OV5645_SYSTEM_CTRL0,
|
ret = ov5645_write_reg(ov5645, OV5645_SYSTEM_CTRL0,
|
||||||
OV5645_SYSTEM_CTRL0_STOP);
|
OV5645_SYSTEM_CTRL0_STOP);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@@ -1086,13 +1049,13 @@ static const struct v4l2_subdev_ops ov5645_subdev_ops = {
|
|||||||
.pad = &ov5645_subdev_pad_ops,
|
.pad = &ov5645_subdev_pad_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ov5645_probe(struct i2c_client *client,
|
static int ov5645_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct device *dev = &client->dev;
|
struct device *dev = &client->dev;
|
||||||
struct device_node *endpoint;
|
struct device_node *endpoint;
|
||||||
struct ov5645 *ov5645;
|
struct ov5645 *ov5645;
|
||||||
u8 chip_id_high, chip_id_low;
|
u8 chip_id_high, chip_id_low;
|
||||||
|
unsigned int i;
|
||||||
u32 xclk_freq;
|
u32 xclk_freq;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -1150,47 +1113,13 @@ static int ov5645_probe(struct i2c_client *client,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ov5645->io_regulator = devm_regulator_get(dev, "vdddo");
|
for (i = 0; i < OV5645_NUM_SUPPLIES; i++)
|
||||||
if (IS_ERR(ov5645->io_regulator)) {
|
ov5645->supplies[i].supply = ov5645_supply_name[i];
|
||||||
dev_err(dev, "cannot get io regulator\n");
|
|
||||||
return PTR_ERR(ov5645->io_regulator);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = regulator_set_voltage(ov5645->io_regulator,
|
ret = devm_regulator_bulk_get(dev, OV5645_NUM_SUPPLIES,
|
||||||
OV5645_VOLTAGE_DIGITAL_IO,
|
ov5645->supplies);
|
||||||
OV5645_VOLTAGE_DIGITAL_IO);
|
if (ret < 0)
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(dev, "cannot set io voltage\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
ov5645->core_regulator = devm_regulator_get(dev, "vddd");
|
|
||||||
if (IS_ERR(ov5645->core_regulator)) {
|
|
||||||
dev_err(dev, "cannot get core regulator\n");
|
|
||||||
return PTR_ERR(ov5645->core_regulator);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = regulator_set_voltage(ov5645->core_regulator,
|
|
||||||
OV5645_VOLTAGE_DIGITAL_CORE,
|
|
||||||
OV5645_VOLTAGE_DIGITAL_CORE);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(dev, "cannot set core voltage\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ov5645->analog_regulator = devm_regulator_get(dev, "vdda");
|
|
||||||
if (IS_ERR(ov5645->analog_regulator)) {
|
|
||||||
dev_err(dev, "cannot get analog regulator\n");
|
|
||||||
return PTR_ERR(ov5645->analog_regulator);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = regulator_set_voltage(ov5645->analog_regulator,
|
|
||||||
OV5645_VOLTAGE_ANALOG,
|
|
||||||
OV5645_VOLTAGE_ANALOG);
|
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(dev, "cannot set analog voltage\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ov5645->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
|
ov5645->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_HIGH);
|
||||||
if (IS_ERR(ov5645->enable_gpio)) {
|
if (IS_ERR(ov5645->enable_gpio)) {
|
||||||
@@ -1355,7 +1284,7 @@ static struct i2c_driver ov5645_i2c_driver = {
|
|||||||
.of_match_table = of_match_ptr(ov5645_of_match),
|
.of_match_table = of_match_ptr(ov5645_of_match),
|
||||||
.name = "ov5645",
|
.name = "ov5645",
|
||||||
},
|
},
|
||||||
.probe = ov5645_probe,
|
.probe_new = ov5645_probe,
|
||||||
.remove = ov5645_remove,
|
.remove = ov5645_remove,
|
||||||
.id_table = ov5645_id,
|
.id_table = ov5645_id,
|
||||||
};
|
};
|
||||||
|
@@ -547,8 +547,7 @@ static int ov5647_parse_dt(struct device_node *np)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ov5647_probe(struct i2c_client *client,
|
static int ov5647_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct device *dev = &client->dev;
|
struct device *dev = &client->dev;
|
||||||
struct ov5647 *sensor;
|
struct ov5647 *sensor;
|
||||||
@@ -644,7 +643,7 @@ static struct i2c_driver ov5647_driver = {
|
|||||||
.of_match_table = of_match_ptr(ov5647_of_match),
|
.of_match_table = of_match_ptr(ov5647_of_match),
|
||||||
.name = SENSOR_NAME,
|
.name = SENSOR_NAME,
|
||||||
},
|
},
|
||||||
.probe = ov5647_probe,
|
.probe_new = ov5647_probe,
|
||||||
.remove = ov5647_remove,
|
.remove = ov5647_remove,
|
||||||
.id_table = ov5647_id,
|
.id_table = ov5647_id,
|
||||||
};
|
};
|
||||||
|
1183
drivers/media/i2c/ov5675.c
Normal file
1183
drivers/media/i2c/ov5675.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -823,9 +823,6 @@ static int ov5695_set_fmt(struct v4l2_subdev *sd,
|
|||||||
if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
|
if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
|
||||||
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
||||||
*v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
|
*v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
|
||||||
#else
|
|
||||||
mutex_unlock(&ov5695->mutex);
|
|
||||||
return -ENOTTY;
|
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
ov5695->cur_mode = mode;
|
ov5695->cur_mode = mode;
|
||||||
@@ -856,7 +853,7 @@ static int ov5695_get_fmt(struct v4l2_subdev *sd,
|
|||||||
fmt->format = *v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
|
fmt->format = *v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
|
||||||
#else
|
#else
|
||||||
mutex_unlock(&ov5695->mutex);
|
mutex_unlock(&ov5695->mutex);
|
||||||
return -ENOTTY;
|
return -EINVAL;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
fmt->format.width = mode->width;
|
fmt->format.width = mode->width;
|
||||||
|
@@ -1110,10 +1110,8 @@ static int ov7670_set_fmt(struct v4l2_subdev *sd,
|
|||||||
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
||||||
mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
|
mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
|
||||||
*mbus_fmt = format->format;
|
*mbus_fmt = format->format;
|
||||||
return 0;
|
|
||||||
#else
|
|
||||||
return -ENOTTY;
|
|
||||||
#endif
|
#endif
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ov7670_try_fmt_internal(sd, &format->format, &info->fmt, &info->wsize);
|
ret = ov7670_try_fmt_internal(sd, &format->format, &info->fmt, &info->wsize);
|
||||||
@@ -1146,7 +1144,7 @@ static int ov7670_get_fmt(struct v4l2_subdev *sd,
|
|||||||
format->format = *mbus_fmt;
|
format->format = *mbus_fmt;
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#else
|
||||||
return -ENOTTY;
|
return -EINVAL;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
format->format = info->format;
|
format->format = info->format;
|
||||||
|
@@ -1352,8 +1352,7 @@ static const struct v4l2_subdev_ops ov772x_subdev_ops = {
|
|||||||
* i2c_driver function
|
* i2c_driver function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int ov772x_probe(struct i2c_client *client,
|
static int ov772x_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *did)
|
|
||||||
{
|
{
|
||||||
struct ov772x_priv *priv;
|
struct ov772x_priv *priv;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -1486,7 +1485,7 @@ static struct i2c_driver ov772x_i2c_driver = {
|
|||||||
.name = "ov772x",
|
.name = "ov772x",
|
||||||
.of_match_table = ov772x_of_match,
|
.of_match_table = ov772x_of_match,
|
||||||
},
|
},
|
||||||
.probe = ov772x_probe,
|
.probe_new = ov772x_probe,
|
||||||
.remove = ov772x_remove,
|
.remove = ov772x_remove,
|
||||||
.id_table = ov772x_id,
|
.id_table = ov772x_id,
|
||||||
};
|
};
|
||||||
|
@@ -827,13 +827,9 @@ static int ov7740_set_fmt(struct v4l2_subdev *sd,
|
|||||||
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
#ifdef CONFIG_VIDEO_V4L2_SUBDEV_API
|
||||||
mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
|
mbus_fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad);
|
||||||
*mbus_fmt = format->format;
|
*mbus_fmt = format->format;
|
||||||
|
#endif
|
||||||
mutex_unlock(&ov7740->mutex);
|
mutex_unlock(&ov7740->mutex);
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
|
||||||
ret = -ENOTTY;
|
|
||||||
goto error;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ov7740_try_fmt_internal(sd, &format->format, &ovfmt, &fsize);
|
ret = ov7740_try_fmt_internal(sd, &format->format, &ovfmt, &fsize);
|
||||||
@@ -868,7 +864,7 @@ static int ov7740_get_fmt(struct v4l2_subdev *sd,
|
|||||||
format->format = *mbus_fmt;
|
format->format = *mbus_fmt;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
#else
|
#else
|
||||||
ret = -ENOTTY;
|
ret = -EINVAL;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
format->format = ov7740->format;
|
format->format = ov7740->format;
|
||||||
@@ -1066,8 +1062,7 @@ static const struct regmap_config ov7740_regmap_config = {
|
|||||||
.max_register = OV7740_MAX_REGISTER,
|
.max_register = OV7740_MAX_REGISTER,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ov7740_probe(struct i2c_client *client,
|
static int ov7740_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct ov7740 *ov7740;
|
struct ov7740 *ov7740;
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
@@ -1229,7 +1224,7 @@ static struct i2c_driver ov7740_i2c_driver = {
|
|||||||
.pm = &ov7740_pm_ops,
|
.pm = &ov7740_pm_ops,
|
||||||
.of_match_table = of_match_ptr(ov7740_of_match),
|
.of_match_table = of_match_ptr(ov7740_of_match),
|
||||||
},
|
},
|
||||||
.probe = ov7740_probe,
|
.probe_new = ov7740_probe,
|
||||||
.remove = ov7740_remove,
|
.remove = ov7740_remove,
|
||||||
.id_table = ov7740_id,
|
.id_table = ov7740_id,
|
||||||
};
|
};
|
||||||
|
@@ -1106,7 +1106,10 @@ static int ov8856_check_hwcfg(struct device *dev)
|
|||||||
if (!fwnode)
|
if (!fwnode)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
fwnode_property_read_u32(fwnode, "clock-frequency", &mclk);
|
ret = fwnode_property_read_u32(fwnode, "clock-frequency", &mclk);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
if (mclk != OV8856_MCLK) {
|
if (mclk != OV8856_MCLK) {
|
||||||
dev_err(dev, "external clock %d is not supported", mclk);
|
dev_err(dev, "external clock %d is not supported", mclk);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@@ -703,6 +703,11 @@ static int ov965x_set_gain(struct ov965x *ov965x, int auto_gain)
|
|||||||
for (m = 6; m >= 0; m--)
|
for (m = 6; m >= 0; m--)
|
||||||
if (gain >= (1 << m) * 16)
|
if (gain >= (1 << m) * 16)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* Sanity check: don't adjust the gain with a negative value */
|
||||||
|
if (m < 0)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
rgain = (gain - ((1 << m) * 16)) / (1 << m);
|
rgain = (gain - ((1 << m) * 16)) / (1 << m);
|
||||||
rgain |= (((1 << m) - 1) << 4);
|
rgain |= (((1 << m) - 1) << 4);
|
||||||
|
|
||||||
@@ -1485,8 +1490,7 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ov965x_probe(struct i2c_client *client,
|
static int ov965x_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
const struct ov9650_platform_data *pdata = client->dev.platform_data;
|
const struct ov9650_platform_data *pdata = client->dev.platform_data;
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
@@ -1613,7 +1617,7 @@ static struct i2c_driver ov965x_i2c_driver = {
|
|||||||
.name = DRIVER_NAME,
|
.name = DRIVER_NAME,
|
||||||
.of_match_table = of_match_ptr(ov965x_of_match),
|
.of_match_table = of_match_ptr(ov965x_of_match),
|
||||||
},
|
},
|
||||||
.probe = ov965x_probe,
|
.probe_new = ov965x_probe,
|
||||||
.remove = ov965x_remove,
|
.remove = ov965x_remove,
|
||||||
.id_table = ov965x_id,
|
.id_table = ov965x_id,
|
||||||
};
|
};
|
||||||
|
@@ -1650,8 +1650,7 @@ static int s5c73m3_get_platform_data(struct s5c73m3 *state)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int s5c73m3_probe(struct i2c_client *client,
|
static int s5c73m3_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct device *dev = &client->dev;
|
struct device *dev = &client->dev;
|
||||||
struct v4l2_subdev *sd;
|
struct v4l2_subdev *sd;
|
||||||
@@ -1806,7 +1805,7 @@ static struct i2c_driver s5c73m3_i2c_driver = {
|
|||||||
.of_match_table = of_match_ptr(s5c73m3_of_match),
|
.of_match_table = of_match_ptr(s5c73m3_of_match),
|
||||||
.name = DRIVER_NAME,
|
.name = DRIVER_NAME,
|
||||||
},
|
},
|
||||||
.probe = s5c73m3_probe,
|
.probe_new = s5c73m3_probe,
|
||||||
.remove = s5c73m3_remove,
|
.remove = s5c73m3_remove,
|
||||||
.id_table = s5c73m3_id,
|
.id_table = s5c73m3_id,
|
||||||
};
|
};
|
||||||
|
@@ -1946,8 +1946,7 @@ static int s5k5baf_configure_regulators(struct s5k5baf *state)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int s5k5baf_probe(struct i2c_client *c,
|
static int s5k5baf_probe(struct i2c_client *c)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct s5k5baf *state;
|
struct s5k5baf *state;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -2046,7 +2045,7 @@ static struct i2c_driver s5k5baf_i2c_driver = {
|
|||||||
.of_match_table = s5k5baf_of_match,
|
.of_match_table = s5k5baf_of_match,
|
||||||
.name = S5K5BAF_DRIVER_NAME
|
.name = S5K5BAF_DRIVER_NAME
|
||||||
},
|
},
|
||||||
.probe = s5k5baf_probe,
|
.probe_new = s5k5baf_probe,
|
||||||
.remove = s5k5baf_remove,
|
.remove = s5k5baf_remove,
|
||||||
.id_table = s5k5baf_id,
|
.id_table = s5k5baf_id,
|
||||||
};
|
};
|
||||||
|
@@ -275,8 +275,7 @@ static const struct v4l2_subdev_ops s5k6a3_subdev_ops = {
|
|||||||
.pad = &s5k6a3_pad_ops,
|
.pad = &s5k6a3_pad_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int s5k6a3_probe(struct i2c_client *client,
|
static int s5k6a3_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
struct device *dev = &client->dev;
|
struct device *dev = &client->dev;
|
||||||
struct s5k6a3 *sensor;
|
struct s5k6a3 *sensor;
|
||||||
@@ -378,7 +377,7 @@ static struct i2c_driver s5k6a3_driver = {
|
|||||||
.of_match_table = of_match_ptr(s5k6a3_of_match),
|
.of_match_table = of_match_ptr(s5k6a3_of_match),
|
||||||
.name = S5K6A3_DRV_NAME,
|
.name = S5K6A3_DRV_NAME,
|
||||||
},
|
},
|
||||||
.probe = s5k6a3_probe,
|
.probe_new = s5k6a3_probe,
|
||||||
.remove = s5k6a3_remove,
|
.remove = s5k6a3_remove,
|
||||||
.id_table = s5k6a3_ids,
|
.id_table = s5k6a3_ids,
|
||||||
};
|
};
|
||||||
|
@@ -2847,8 +2847,7 @@ out_err:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int smiapp_probe(struct i2c_client *client,
|
static int smiapp_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *devid)
|
|
||||||
{
|
{
|
||||||
struct smiapp_sensor *sensor;
|
struct smiapp_sensor *sensor;
|
||||||
struct smiapp_hwconfig *hwcfg = smiapp_get_hwconfig(&client->dev);
|
struct smiapp_hwconfig *hwcfg = smiapp_get_hwconfig(&client->dev);
|
||||||
@@ -3172,7 +3171,7 @@ static struct i2c_driver smiapp_i2c_driver = {
|
|||||||
.name = SMIAPP_NAME,
|
.name = SMIAPP_NAME,
|
||||||
.pm = &smiapp_pm_ops,
|
.pm = &smiapp_pm_ops,
|
||||||
},
|
},
|
||||||
.probe = smiapp_probe,
|
.probe_new = smiapp_probe,
|
||||||
.remove = smiapp_remove,
|
.remove = smiapp_remove,
|
||||||
.id_table = smiapp_id_table,
|
.id_table = smiapp_id_table,
|
||||||
};
|
};
|
||||||
|
@@ -2026,8 +2026,7 @@ static inline int tc358743_probe_of(struct tc358743_state *state)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int tc358743_probe(struct i2c_client *client,
|
static int tc358743_probe(struct i2c_client *client)
|
||||||
const struct i2c_device_id *id)
|
|
||||||
{
|
{
|
||||||
static struct v4l2_dv_timings default_timing =
|
static struct v4l2_dv_timings default_timing =
|
||||||
V4L2_DV_BT_CEA_640X480P59_94;
|
V4L2_DV_BT_CEA_640X480P59_94;
|
||||||
@@ -2222,7 +2221,7 @@ static struct i2c_driver tc358743_driver = {
|
|||||||
.name = "tc358743",
|
.name = "tc358743",
|
||||||
.of_match_table = of_match_ptr(tc358743_of_match),
|
.of_match_table = of_match_ptr(tc358743_of_match),
|
||||||
},
|
},
|
||||||
.probe = tc358743_probe,
|
.probe_new = tc358743_probe,
|
||||||
.remove = tc358743_remove,
|
.remove = tc358743_remove,
|
||||||
.id_table = tc358743_id,
|
.id_table = tc358743_id,
|
||||||
};
|
};
|
||||||
|
@@ -2691,7 +2691,13 @@ static int tda1997x_probe(struct i2c_client *client,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0x34 + ((io_read(sd, REG_SLAVE_ADDR)>>4) & 0x03);
|
ret = 0x34 + ((io_read(sd, REG_SLAVE_ADDR)>>4) & 0x03);
|
||||||
state->client_cec = i2c_new_dummy(client->adapter, ret);
|
state->client_cec = devm_i2c_new_dummy_device(&client->dev,
|
||||||
|
client->adapter, ret);
|
||||||
|
if (IS_ERR(state->client_cec)) {
|
||||||
|
ret = PTR_ERR(state->client_cec);
|
||||||
|
goto err_free_mutex;
|
||||||
|
}
|
||||||
|
|
||||||
v4l_info(client, "CEC slave address 0x%02x\n", ret);
|
v4l_info(client, "CEC slave address 0x%02x\n", ret);
|
||||||
|
|
||||||
ret = tda1997x_core_init(sd);
|
ret = tda1997x_core_init(sd);
|
||||||
@@ -2798,7 +2804,6 @@ static int tda1997x_remove(struct i2c_client *client)
|
|||||||
media_entity_cleanup(&sd->entity);
|
media_entity_cleanup(&sd->entity);
|
||||||
v4l2_ctrl_handler_free(&state->hdl);
|
v4l2_ctrl_handler_free(&state->hdl);
|
||||||
regulator_bulk_disable(TDA1997X_NUM_SUPPLIES, state->supplies);
|
regulator_bulk_disable(TDA1997X_NUM_SUPPLIES, state->supplies);
|
||||||
i2c_unregister_device(state->client_cec);
|
|
||||||
cancel_delayed_work(&state->delayed_work_enable_hpd);
|
cancel_delayed_work(&state->delayed_work_enable_hpd);
|
||||||
mutex_destroy(&state->page_lock);
|
mutex_destroy(&state->page_lock);
|
||||||
mutex_destroy(&state->lock);
|
mutex_destroy(&state->lock);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user