diff options
author | Linus Torvalds | 2016-01-11 22:17:44 -0800 |
---|---|---|
committer | Linus Torvalds | 2016-01-11 22:17:44 -0800 |
commit | 47c62e4be78303ef52ffa8134026919d0890c5a9 (patch) | |
tree | c0ece2346076651da1f9fb33261d89f43b711be9 /include | |
parent | 2c487121e3c4f87e82cff493872675bde52e47fc (diff) | |
parent | c3152592e70bbf023ec106ee9ea271e9060bc09a (diff) |
Merge tag 'media/v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
"The part of patches for Kernel 4.5. There's nothing really big here:
- driver-specific headers for media devices were moved to separate
directories, in order to make clear what headers belong to the core
kABI and require documentation
- Platform data for media drivers were moved from include/media to
include/linux/platform_data/media
- add a driver for cs3308 8-channel volume control, used on some
high-end capture boards
- lirc.h kAPI header were added at include/uapi/linux
- Driver cleanups, new board additions and improvements"
* tag 'media/v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (204 commits)
[media] rc: sunxi-cir: Initialize the spinlock properly
[media] rtl2832: do not filter out slave TS null packets
[media] rtl2832: print reg number on error case
[media] rtl28xxu: return demod reg page from driver cache
[media] coda: enable MPEG-2 ES decoding
[media] coda: don't start streaming without queued buffers
[media] coda: hook up vidioc_prepare_buf
[media] coda: relax coda_jpeg_check_buffer for trailing bytes
[media] coda: make to_coda_video_device static
[media] s5p-mfc: remove volatile attribute from MFC register addresses
[media] s5p-mfc: merge together s5p_mfc_hw_call and s5p_mfc_hw_call_void
[media] s5p-mfc: use spinlock to protect MFC context
[media] s5p-mfc: remove unnecessary callbacks
[media] s5p-mfc: make queue cleanup code common
[media] s5p-mfc: use one implementation of s5p_mfc_get_new_ctx
[media] s5p-mfc: constify s5p_mfc_codec_ops structures
[media] au8522: Avoid memory leak for device config data
[media] ir-lirc-codec.c: don't leak lirc->drv-rbuf
[media] uvcvideo: small cleanup in uvc_video_clock_update()
[media] uvcvideo: Fix reading the current exposure value of UVC
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/platform_data/camera-rcar.h | 25 | ||||
-rw-r--r-- | include/linux/platform_data/media/camera-mx2.h (renamed from include/linux/platform_data/camera-mx2.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/camera-mx3.h (renamed from include/linux/platform_data/camera-mx3.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/camera-pxa.h (renamed from include/linux/platform_data/camera-pxa.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/coda.h (renamed from include/linux/platform_data/coda.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/gpio-ir-recv.h (renamed from include/media/gpio-ir-recv.h) | 1 | ||||
-rw-r--r-- | include/linux/platform_data/media/ir-rx51.h (renamed from include/media/ir-rx51.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/mmp-camera.h (renamed from include/media/mmp-camera.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/omap1_camera.h (renamed from include/media/omap1_camera.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/omap4iss.h (renamed from include/media/omap4iss.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/s5p_hdmi.h (renamed from include/media/s5p_hdmi.h) | 1 | ||||
-rw-r--r-- | include/linux/platform_data/media/si4713.h (renamed from include/media/si4713.h) | 2 | ||||
-rw-r--r-- | include/linux/platform_data/media/sii9234.h (renamed from include/media/sii9234.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/soc_camera_platform.h (renamed from include/media/soc_camera_platform.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/timb_radio.h (renamed from include/media/timb_radio.h) | 0 | ||||
-rw-r--r-- | include/linux/platform_data/media/timb_video.h (renamed from include/media/timb_video.h) | 0 | ||||
-rw-r--r-- | include/linux/videodev2.h | 2 | ||||
-rw-r--r-- | include/media/drv-intf/cx2341x.h (renamed from include/media/cx2341x.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/cx25840.h (renamed from include/media/cx25840.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/exynos-fimc.h (renamed from include/media/exynos-fimc.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/msp3400.h (renamed from include/media/msp3400.h) | 1 | ||||
-rw-r--r-- | include/media/drv-intf/s3c_camif.h (renamed from include/media/s3c_camif.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/saa7146.h (renamed from include/media/saa7146.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/saa7146_vv.h (renamed from include/media/saa7146_vv.h) | 2 | ||||
-rw-r--r-- | include/media/drv-intf/sh_mobile_ceu.h (renamed from include/media/sh_mobile_ceu.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/sh_mobile_csi2.h (renamed from include/media/sh_mobile_csi2.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/sh_vou.h (renamed from include/media/sh_vou.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/si476x.h (renamed from include/media/si476x.h) | 2 | ||||
-rw-r--r-- | include/media/drv-intf/soc_mediabus.h (renamed from include/media/soc_mediabus.h) | 0 | ||||
-rw-r--r-- | include/media/drv-intf/tea575x.h (renamed from include/media/tea575x.h) | 2 | ||||
-rw-r--r-- | include/media/i2c/ad9389b.h (renamed from include/media/ad9389b.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/adp1653.h (renamed from include/media/adp1653.h) | 2 | ||||
-rw-r--r-- | include/media/i2c/adv7183.h (renamed from include/media/adv7183.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/adv7343.h (renamed from include/media/adv7343.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/adv7393.h (renamed from include/media/adv7393.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/adv7511.h (renamed from include/media/adv7511.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/adv7604.h (renamed from include/media/adv7604.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/adv7842.h (renamed from include/media/adv7842.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/ak881x.h (renamed from include/media/ak881x.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/as3645a.h (renamed from include/media/as3645a.h) | 2 | ||||
-rw-r--r-- | include/media/i2c/bt819.h (renamed from include/media/bt819.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/cs5345.h (renamed from include/media/cs5345.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/cs53l32a.h (renamed from include/media/cs53l32a.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/ir-kbd-i2c.h (renamed from include/media/ir-kbd-i2c.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/lm3560.h (renamed from include/media/lm3560.h) | 2 | ||||
-rw-r--r-- | include/media/i2c/lm3646.h (renamed from include/media/lm3646.h) | 2 | ||||
-rw-r--r-- | include/media/i2c/m52790.h (renamed from include/media/m52790.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/m5mols.h (renamed from include/media/m5mols.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/mt9m032.h (renamed from include/media/mt9m032.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/mt9p031.h (renamed from include/media/mt9p031.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/mt9t001.h (renamed from include/media/mt9t001.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/mt9t112.h (renamed from include/media/mt9t112.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/mt9v011.h (renamed from include/media/mt9v011.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/mt9v022.h (renamed from include/media/mt9v022.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/mt9v032.h (renamed from include/media/mt9v032.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/noon010pc30.h (renamed from include/media/noon010pc30.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/ov2659.h (renamed from include/media/ov2659.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/ov7670.h (renamed from include/media/ov7670.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/ov772x.h (renamed from include/media/ov772x.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/ov9650.h (renamed from include/media/ov9650.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/rj54n1cb0c.h (renamed from include/media/rj54n1cb0c.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/s5c73m3.h (renamed from include/media/s5c73m3.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/s5k4ecgx.h (renamed from include/media/s5k4ecgx.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/s5k6aa.h (renamed from include/media/s5k6aa.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/saa6588.h (renamed from include/media/saa6588.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/saa7115.h (renamed from include/media/saa7115.h) | 1 | ||||
-rw-r--r-- | include/media/i2c/saa7127.h (renamed from include/media/saa7127.h) | 1 | ||||
-rw-r--r-- | include/media/i2c/smiapp.h (renamed from include/media/smiapp.h) | 2 | ||||
-rw-r--r-- | include/media/i2c/sr030pc30.h (renamed from include/media/sr030pc30.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/tc358743.h (renamed from include/media/tc358743.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/ths7303.h (renamed from include/media/ths7303.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/tvaudio.h (renamed from include/media/tvaudio.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/tvp514x.h (renamed from include/media/tvp514x.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/tvp5150.h (renamed from include/media/tvp5150.h) | 1 | ||||
-rw-r--r-- | include/media/i2c/tvp7002.h (renamed from include/media/tvp7002.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/tw9910.h (renamed from include/media/tw9910.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/uda1342.h (renamed from include/media/uda1342.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/upd64031a.h (renamed from include/media/upd64031a.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/upd64083.h (renamed from include/media/upd64083.h) | 0 | ||||
-rw-r--r-- | include/media/i2c/wm8775.h (renamed from include/media/wm8775.h) | 0 | ||||
-rw-r--r-- | include/media/lirc.h | 169 | ||||
-rw-r--r-- | include/media/rc-core.h | 1 | ||||
-rw-r--r-- | include/media/rc-map.h | 40 | ||||
-rw-r--r-- | include/media/v4l2-clk.h | 5 | ||||
-rw-r--r-- | include/media/v4l2-dv-timings.h | 25 | ||||
-rw-r--r-- | include/media/videobuf2-core.h | 108 | ||||
-rw-r--r-- | include/media/videobuf2-v4l2.h | 40 | ||||
-rw-r--r-- | include/trace/events/v4l2.h | 4 | ||||
-rw-r--r-- | include/trace/events/vb2.h | 7 | ||||
-rw-r--r-- | include/uapi/drm/drm_fourcc.h | 2 | ||||
-rw-r--r-- | include/uapi/linux/dvb/video.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/lirc.h | 168 | ||||
-rw-r--r-- | include/uapi/linux/usb/video.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/v4l2-controls.h | 6 | ||||
-rw-r--r-- | include/uapi/linux/videodev2.h | 14 |
95 files changed, 343 insertions, 299 deletions
diff --git a/include/linux/platform_data/camera-rcar.h b/include/linux/platform_data/camera-rcar.h deleted file mode 100644 index dfc83c581593..000000000000 --- a/include/linux/platform_data/camera-rcar.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Platform data for Renesas R-Car VIN soc-camera driver - * - * Copyright (C) 2011-2013 Renesas Solutions Corp. - * Copyright (C) 2013 Cogent Embedded, Inc., <source@cogentembedded.com> - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#ifndef __CAMERA_RCAR_H_ -#define __CAMERA_RCAR_H_ - -#define RCAR_VIN_HSYNC_ACTIVE_LOW (1 << 0) -#define RCAR_VIN_VSYNC_ACTIVE_LOW (1 << 1) -#define RCAR_VIN_BT601 (1 << 2) -#define RCAR_VIN_BT656 (1 << 3) - -struct rcar_vin_platform_data { - unsigned int flags; -}; - -#endif /* __CAMERA_RCAR_H_ */ diff --git a/include/linux/platform_data/camera-mx2.h b/include/linux/platform_data/media/camera-mx2.h index 7ded6f1f74bc..7ded6f1f74bc 100644 --- a/include/linux/platform_data/camera-mx2.h +++ b/include/linux/platform_data/media/camera-mx2.h diff --git a/include/linux/platform_data/camera-mx3.h b/include/linux/platform_data/media/camera-mx3.h index a910dadc8258..a910dadc8258 100644 --- a/include/linux/platform_data/camera-mx3.h +++ b/include/linux/platform_data/media/camera-mx3.h diff --git a/include/linux/platform_data/camera-pxa.h b/include/linux/platform_data/media/camera-pxa.h index 6709b1cd7c77..6709b1cd7c77 100644 --- a/include/linux/platform_data/camera-pxa.h +++ b/include/linux/platform_data/media/camera-pxa.h diff --git a/include/linux/platform_data/coda.h b/include/linux/platform_data/media/coda.h index 6ad4410d9e20..6ad4410d9e20 100644 --- a/include/linux/platform_data/coda.h +++ b/include/linux/platform_data/media/coda.h diff --git a/include/media/gpio-ir-recv.h b/include/linux/platform_data/media/gpio-ir-recv.h index 0142736a59db..0c298f569d5a 100644 --- a/include/media/gpio-ir-recv.h +++ b/include/linux/platform_data/media/gpio-ir-recv.h @@ -21,4 +21,3 @@ struct gpio_ir_recv_platform_data { }; #endif /* __GPIO_IR_RECV_H__ */ - diff --git a/include/media/ir-rx51.h b/include/linux/platform_data/media/ir-rx51.h index 104aa892f31b..104aa892f31b 100644 --- a/include/media/ir-rx51.h +++ b/include/linux/platform_data/media/ir-rx51.h diff --git a/include/media/mmp-camera.h b/include/linux/platform_data/media/mmp-camera.h index 7611963a257f..7611963a257f 100644 --- a/include/media/mmp-camera.h +++ b/include/linux/platform_data/media/mmp-camera.h diff --git a/include/media/omap1_camera.h b/include/linux/platform_data/media/omap1_camera.h index 819767cf04d4..819767cf04d4 100644 --- a/include/media/omap1_camera.h +++ b/include/linux/platform_data/media/omap1_camera.h diff --git a/include/media/omap4iss.h b/include/linux/platform_data/media/omap4iss.h index 0d7620db5e32..0d7620db5e32 100644 --- a/include/media/omap4iss.h +++ b/include/linux/platform_data/media/omap4iss.h diff --git a/include/media/s5p_hdmi.h b/include/linux/platform_data/media/s5p_hdmi.h index 181642b8d0a5..bb9cacb0cbb0 100644 --- a/include/media/s5p_hdmi.h +++ b/include/linux/platform_data/media/s5p_hdmi.h @@ -34,4 +34,3 @@ struct s5p_hdmi_platform_data { }; #endif /* S5P_HDMI_H */ - diff --git a/include/media/si4713.h b/include/linux/platform_data/media/si4713.h index be4f58e2440b..932668ad54f7 100644 --- a/include/media/si4713.h +++ b/include/linux/platform_data/media/si4713.h @@ -1,5 +1,5 @@ /* - * include/media/si4713.h + * include/linux/platform_data/media/si4713.h * * Board related data definitions for Si4713 i2c device driver. * diff --git a/include/media/sii9234.h b/include/linux/platform_data/media/sii9234.h index 6a4a809fe9a3..6a4a809fe9a3 100644 --- a/include/media/sii9234.h +++ b/include/linux/platform_data/media/sii9234.h diff --git a/include/media/soc_camera_platform.h b/include/linux/platform_data/media/soc_camera_platform.h index 1e5065dab430..1e5065dab430 100644 --- a/include/media/soc_camera_platform.h +++ b/include/linux/platform_data/media/soc_camera_platform.h diff --git a/include/media/timb_radio.h b/include/linux/platform_data/media/timb_radio.h index a40a6a348d21..a40a6a348d21 100644 --- a/include/media/timb_radio.h +++ b/include/linux/platform_data/media/timb_radio.h diff --git a/include/media/timb_video.h b/include/linux/platform_data/media/timb_video.h index 70ae43970a49..70ae43970a49 100644 --- a/include/media/timb_video.h +++ b/include/linux/platform_data/media/timb_video.h diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 73ea2fb04731..16c0ed6c50a7 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -46,7 +46,7 @@ * All kernel-specific stuff were moved to media/v4l2-dev.h, so * no #if __KERNEL tests are allowed here * - * See http://linuxtv.org for more info + * See https://linuxtv.org for more info * * Author: Bill Dirks <bill@thedirks.org> * Justin Schoeman diff --git a/include/media/cx2341x.h b/include/media/drv-intf/cx2341x.h index 9635eebaab09..9635eebaab09 100644 --- a/include/media/cx2341x.h +++ b/include/media/drv-intf/cx2341x.h diff --git a/include/media/cx25840.h b/include/media/drv-intf/cx25840.h index 783c5bdd63eb..783c5bdd63eb 100644 --- a/include/media/cx25840.h +++ b/include/media/drv-intf/cx25840.h diff --git a/include/media/exynos-fimc.h b/include/media/drv-intf/exynos-fimc.h index 69bcd2a07d5c..69bcd2a07d5c 100644 --- a/include/media/exynos-fimc.h +++ b/include/media/drv-intf/exynos-fimc.h diff --git a/include/media/msp3400.h b/include/media/drv-intf/msp3400.h index 90cf22ada8b4..1e6e80213a77 100644 --- a/include/media/msp3400.h +++ b/include/media/drv-intf/msp3400.h @@ -223,4 +223,3 @@ */ #endif /* MSP3400_H */ - diff --git a/include/media/s3c_camif.h b/include/media/drv-intf/s3c_camif.h index df96c2c789b4..df96c2c789b4 100644 --- a/include/media/s3c_camif.h +++ b/include/media/drv-intf/s3c_camif.h diff --git a/include/media/saa7146.h b/include/media/drv-intf/saa7146.h index 96058a5a4acc..96058a5a4acc 100644 --- a/include/media/saa7146.h +++ b/include/media/drv-intf/saa7146.h diff --git a/include/media/saa7146_vv.h b/include/media/drv-intf/saa7146_vv.h index 92766f77a5de..0da6ccc0615b 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/drv-intf/saa7146_vv.h @@ -4,7 +4,7 @@ #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> #include <media/v4l2-fh.h> -#include <media/saa7146.h> +#include <media/drv-intf/saa7146.h> #include <media/videobuf-dma-sg.h> #define MAX_SAA7146_CAPTURE_BUFFERS 32 /* arbitrary */ diff --git a/include/media/sh_mobile_ceu.h b/include/media/drv-intf/sh_mobile_ceu.h index 7f57056c22ba..7f57056c22ba 100644 --- a/include/media/sh_mobile_ceu.h +++ b/include/media/drv-intf/sh_mobile_ceu.h diff --git a/include/media/sh_mobile_csi2.h b/include/media/drv-intf/sh_mobile_csi2.h index 14030db51f13..14030db51f13 100644 --- a/include/media/sh_mobile_csi2.h +++ b/include/media/drv-intf/sh_mobile_csi2.h diff --git a/include/media/sh_vou.h b/include/media/drv-intf/sh_vou.h index ec3ba9a597a2..ec3ba9a597a2 100644 --- a/include/media/sh_vou.h +++ b/include/media/drv-intf/sh_vou.h diff --git a/include/media/si476x.h b/include/media/drv-intf/si476x.h index e02e241e2d22..ad87fa8483b2 100644 --- a/include/media/si476x.h +++ b/include/media/drv-intf/si476x.h @@ -1,5 +1,5 @@ /* - * include/media/si476x.h -- Common definitions for si476x driver + * include/media/drv-intf/si476x.h -- Common definitions for si476x driver * * Copyright (C) 2012 Innovative Converged Devices(ICD) * Copyright (C) 2013 Andrey Smirnov diff --git a/include/media/soc_mediabus.h b/include/media/drv-intf/soc_mediabus.h index 2ff773785fb6..2ff773785fb6 100644 --- a/include/media/soc_mediabus.h +++ b/include/media/drv-intf/soc_mediabus.h diff --git a/include/media/tea575x.h b/include/media/drv-intf/tea575x.h index 5d096578b736..fb272d48ba33 100644 --- a/include/media/tea575x.h +++ b/include/media/drv-intf/tea575x.h @@ -63,7 +63,7 @@ struct snd_tea575x { u32 band; /* 0: FM, 1: FM-Japan, 2: AM */ u32 freq; /* frequency */ struct mutex mutex; - struct snd_tea575x_ops *ops; + const struct snd_tea575x_ops *ops; void *private_data; u8 card[32]; u8 bus_info[32]; diff --git a/include/media/ad9389b.h b/include/media/i2c/ad9389b.h index 5ba9af869b8b..5ba9af869b8b 100644 --- a/include/media/ad9389b.h +++ b/include/media/i2c/ad9389b.h diff --git a/include/media/adp1653.h b/include/media/i2c/adp1653.h index 9779c8549eb4..0b6709335dff 100644 --- a/include/media/adp1653.h +++ b/include/media/i2c/adp1653.h @@ -1,5 +1,5 @@ /* - * include/media/adp1653.h + * include/media/i2c/adp1653.h * * Copyright (C) 2008--2011 Nokia Corporation * diff --git a/include/media/adv7183.h b/include/media/i2c/adv7183.h index c5c2d377c0a6..c5c2d377c0a6 100644 --- a/include/media/adv7183.h +++ b/include/media/i2c/adv7183.h diff --git a/include/media/adv7343.h b/include/media/i2c/adv7343.h index e4142b1ef8cd..e4142b1ef8cd 100644 --- a/include/media/adv7343.h +++ b/include/media/i2c/adv7343.h diff --git a/include/media/adv7393.h b/include/media/i2c/adv7393.h index b28edf351842..b28edf351842 100644 --- a/include/media/adv7393.h +++ b/include/media/i2c/adv7393.h diff --git a/include/media/adv7511.h b/include/media/i2c/adv7511.h index d83b91d80764..d83b91d80764 100644 --- a/include/media/adv7511.h +++ b/include/media/i2c/adv7511.h diff --git a/include/media/adv7604.h b/include/media/i2c/adv7604.h index a913859bfd30..a913859bfd30 100644 --- a/include/media/adv7604.h +++ b/include/media/i2c/adv7604.h diff --git a/include/media/adv7842.h b/include/media/i2c/adv7842.h index bc249709bf35..bc249709bf35 100644 --- a/include/media/adv7842.h +++ b/include/media/i2c/adv7842.h diff --git a/include/media/ak881x.h b/include/media/i2c/ak881x.h index b7f2add5ce7b..b7f2add5ce7b 100644 --- a/include/media/ak881x.h +++ b/include/media/i2c/ak881x.h diff --git a/include/media/as3645a.h b/include/media/i2c/as3645a.h index 5075496d2c9e..0e07484ddc33 100644 --- a/include/media/as3645a.h +++ b/include/media/i2c/as3645a.h @@ -1,5 +1,5 @@ /* - * include/media/as3645a.h + * include/media/i2c/as3645a.h * * Copyright (C) 2008-2011 Nokia Corporation * diff --git a/include/media/bt819.h b/include/media/i2c/bt819.h index 8025f4bc2bb6..8025f4bc2bb6 100644 --- a/include/media/bt819.h +++ b/include/media/i2c/bt819.h diff --git a/include/media/cs5345.h b/include/media/i2c/cs5345.h index 6ccae24e65ed..6ccae24e65ed 100644 --- a/include/media/cs5345.h +++ b/include/media/i2c/cs5345.h diff --git a/include/media/cs53l32a.h b/include/media/i2c/cs53l32a.h index bf76197d3790..bf76197d3790 100644 --- a/include/media/cs53l32a.h +++ b/include/media/i2c/cs53l32a.h diff --git a/include/media/ir-kbd-i2c.h b/include/media/i2c/ir-kbd-i2c.h index d8564354debb..d8564354debb 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/i2c/ir-kbd-i2c.h diff --git a/include/media/lm3560.h b/include/media/i2c/lm3560.h index 46670706d6f8..5ed942a8ac32 100644 --- a/include/media/lm3560.h +++ b/include/media/i2c/lm3560.h @@ -1,5 +1,5 @@ /* - * include/media/lm3560.h + * include/media/i2c/lm3560.h * * Copyright (C) 2013 Texas Instruments * diff --git a/include/media/lm3646.h b/include/media/i2c/lm3646.h index c6acf5a1d640..724c10003a28 100644 --- a/include/media/lm3646.h +++ b/include/media/i2c/lm3646.h @@ -1,5 +1,5 @@ /* - * include/media/lm3646.h + * include/media/i2c/lm3646.h * * Copyright (C) 2014 Texas Instruments * diff --git a/include/media/m52790.h b/include/media/i2c/m52790.h index 7ddffae31a67..7ddffae31a67 100644 --- a/include/media/m52790.h +++ b/include/media/i2c/m52790.h diff --git a/include/media/m5mols.h b/include/media/i2c/m5mols.h index 4a825ae5c6c8..4a825ae5c6c8 100644 --- a/include/media/m5mols.h +++ b/include/media/i2c/m5mols.h diff --git a/include/media/mt9m032.h b/include/media/i2c/mt9m032.h index c3a78114d7a6..c3a78114d7a6 100644 --- a/include/media/mt9m032.h +++ b/include/media/i2c/mt9m032.h diff --git a/include/media/mt9p031.h b/include/media/i2c/mt9p031.h index 1ba361205af1..1ba361205af1 100644 --- a/include/media/mt9p031.h +++ b/include/media/i2c/mt9p031.h diff --git a/include/media/mt9t001.h b/include/media/i2c/mt9t001.h index 03fd63edd133..03fd63edd133 100644 --- a/include/media/mt9t001.h +++ b/include/media/i2c/mt9t001.h diff --git a/include/media/mt9t112.h b/include/media/i2c/mt9t112.h index a43c74ab05ec..a43c74ab05ec 100644 --- a/include/media/mt9t112.h +++ b/include/media/i2c/mt9t112.h diff --git a/include/media/mt9v011.h b/include/media/i2c/mt9v011.h index ea29fc74cd06..ea29fc74cd06 100644 --- a/include/media/mt9v011.h +++ b/include/media/i2c/mt9v011.h diff --git a/include/media/mt9v022.h b/include/media/i2c/mt9v022.h index 40561801321a..40561801321a 100644 --- a/include/media/mt9v022.h +++ b/include/media/i2c/mt9v022.h diff --git a/include/media/mt9v032.h b/include/media/i2c/mt9v032.h index 12175a63c5b2..12175a63c5b2 100644 --- a/include/media/mt9v032.h +++ b/include/media/i2c/mt9v032.h diff --git a/include/media/noon010pc30.h b/include/media/i2c/noon010pc30.h index 58eafee36b30..58eafee36b30 100644 --- a/include/media/noon010pc30.h +++ b/include/media/i2c/noon010pc30.h diff --git a/include/media/ov2659.h b/include/media/i2c/ov2659.h index 4216adc1ede2..4216adc1ede2 100644 --- a/include/media/ov2659.h +++ b/include/media/i2c/ov2659.h diff --git a/include/media/ov7670.h b/include/media/i2c/ov7670.h index 1913d5123072..1913d5123072 100644 --- a/include/media/ov7670.h +++ b/include/media/i2c/ov7670.h diff --git a/include/media/ov772x.h b/include/media/i2c/ov772x.h index 00dbb7c4feae..00dbb7c4feae 100644 --- a/include/media/ov772x.h +++ b/include/media/i2c/ov772x.h diff --git a/include/media/ov9650.h b/include/media/i2c/ov9650.h index d630cf9e028d..d630cf9e028d 100644 --- a/include/media/ov9650.h +++ b/include/media/i2c/ov9650.h diff --git a/include/media/rj54n1cb0c.h b/include/media/i2c/rj54n1cb0c.h index 8ae3288ae925..8ae3288ae925 100644 --- a/include/media/rj54n1cb0c.h +++ b/include/media/i2c/rj54n1cb0c.h diff --git a/include/media/s5c73m3.h b/include/media/i2c/s5c73m3.h index ccb9e5448762..ccb9e5448762 100644 --- a/include/media/s5c73m3.h +++ b/include/media/i2c/s5c73m3.h diff --git a/include/media/s5k4ecgx.h b/include/media/i2c/s5k4ecgx.h index 90c1be792ffe..90c1be792ffe 100644 --- a/include/media/s5k4ecgx.h +++ b/include/media/i2c/s5k4ecgx.h diff --git a/include/media/s5k6aa.h b/include/media/i2c/s5k6aa.h index ba34f7055e55..ba34f7055e55 100644 --- a/include/media/s5k6aa.h +++ b/include/media/i2c/s5k6aa.h diff --git a/include/media/saa6588.h b/include/media/i2c/saa6588.h index b5ec1aa60ed5..b5ec1aa60ed5 100644 --- a/include/media/saa6588.h +++ b/include/media/i2c/saa6588.h diff --git a/include/media/saa7115.h b/include/media/i2c/saa7115.h index 76911e71de17..53954c90e7f6 100644 --- a/include/media/saa7115.h +++ b/include/media/i2c/saa7115.h @@ -138,4 +138,3 @@ struct saa7115_platform_data { }; #endif - diff --git a/include/media/saa7127.h b/include/media/i2c/saa7127.h index bbcf862141af..7005ba7daa9e 100644 --- a/include/media/saa7127.h +++ b/include/media/i2c/saa7127.h @@ -38,4 +38,3 @@ enum saa7127_output_type { }; #endif - diff --git a/include/media/smiapp.h b/include/media/i2c/smiapp.h index 268a3cdbf6cb..029142ddb95c 100644 --- a/include/media/smiapp.h +++ b/include/media/i2c/smiapp.h @@ -1,5 +1,5 @@ /* - * include/media/smiapp.h + * include/media/i2c/smiapp.h * * Generic driver for SMIA/SMIA++ compliant camera modules * diff --git a/include/media/sr030pc30.h b/include/media/i2c/sr030pc30.h index 6f901a653ba2..6f901a653ba2 100644 --- a/include/media/sr030pc30.h +++ b/include/media/i2c/sr030pc30.h diff --git a/include/media/tc358743.h b/include/media/i2c/tc358743.h index 4513f2f9cfbc..4513f2f9cfbc 100644 --- a/include/media/tc358743.h +++ b/include/media/i2c/tc358743.h diff --git a/include/media/ths7303.h b/include/media/i2c/ths7303.h index a7b49297da82..a7b49297da82 100644 --- a/include/media/ths7303.h +++ b/include/media/i2c/ths7303.h diff --git a/include/media/tvaudio.h b/include/media/i2c/tvaudio.h index 1ac8184693f8..1ac8184693f8 100644 --- a/include/media/tvaudio.h +++ b/include/media/i2c/tvaudio.h diff --git a/include/media/tvp514x.h b/include/media/i2c/tvp514x.h index 86ed7e806830..86ed7e806830 100644 --- a/include/media/tvp514x.h +++ b/include/media/i2c/tvp514x.h diff --git a/include/media/tvp5150.h b/include/media/i2c/tvp5150.h index 72bd2a2b8bfd..649908a25605 100644 --- a/include/media/tvp5150.h +++ b/include/media/i2c/tvp5150.h @@ -31,4 +31,3 @@ #define TVP5150_BLACK_SCREEN 1 #endif - diff --git a/include/media/tvp7002.h b/include/media/i2c/tvp7002.h index fadb6afe9ef0..fadb6afe9ef0 100644 --- a/include/media/tvp7002.h +++ b/include/media/i2c/tvp7002.h diff --git a/include/media/tw9910.h b/include/media/i2c/tw9910.h index 90bcf1fa5421..90bcf1fa5421 100644 --- a/include/media/tw9910.h +++ b/include/media/i2c/tw9910.h diff --git a/include/media/uda1342.h b/include/media/i2c/uda1342.h index cd156403a368..cd156403a368 100644 --- a/include/media/uda1342.h +++ b/include/media/i2c/uda1342.h diff --git a/include/media/upd64031a.h b/include/media/i2c/upd64031a.h index 3ad6a32e1bce..3ad6a32e1bce 100644 --- a/include/media/upd64031a.h +++ b/include/media/i2c/upd64031a.h diff --git a/include/media/upd64083.h b/include/media/i2c/upd64083.h index 59b6f32ba300..59b6f32ba300 100644 --- a/include/media/upd64083.h +++ b/include/media/i2c/upd64083.h diff --git a/include/media/wm8775.h b/include/media/i2c/wm8775.h index d0e801a9935c..d0e801a9935c 100644 --- a/include/media/wm8775.h +++ b/include/media/i2c/wm8775.h diff --git a/include/media/lirc.h b/include/media/lirc.h index 4b3ab2966b5a..554988c860c1 100644 --- a/include/media/lirc.h +++ b/include/media/lirc.h @@ -1,168 +1 @@ -/* - * lirc.h - linux infrared remote control header file - * last modified 2010/07/13 by Jarod Wilson - */ - -#ifndef _LINUX_LIRC_H -#define _LINUX_LIRC_H - -#include <linux/types.h> -#include <linux/ioctl.h> - -#define PULSE_BIT 0x01000000 -#define PULSE_MASK 0x00FFFFFF - -#define LIRC_MODE2_SPACE 0x00000000 -#define LIRC_MODE2_PULSE 0x01000000 -#define LIRC_MODE2_FREQUENCY 0x02000000 -#define LIRC_MODE2_TIMEOUT 0x03000000 - -#define LIRC_VALUE_MASK 0x00FFFFFF -#define LIRC_MODE2_MASK 0xFF000000 - -#define LIRC_SPACE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_SPACE) -#define LIRC_PULSE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_PULSE) -#define LIRC_FREQUENCY(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_FREQUENCY) -#define LIRC_TIMEOUT(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_TIMEOUT) - -#define LIRC_VALUE(val) ((val)&LIRC_VALUE_MASK) -#define LIRC_MODE2(val) ((val)&LIRC_MODE2_MASK) - -#define LIRC_IS_SPACE(val) (LIRC_MODE2(val) == LIRC_MODE2_SPACE) -#define LIRC_IS_PULSE(val) (LIRC_MODE2(val) == LIRC_MODE2_PULSE) -#define LIRC_IS_FREQUENCY(val) (LIRC_MODE2(val) == LIRC_MODE2_FREQUENCY) -#define LIRC_IS_TIMEOUT(val) (LIRC_MODE2(val) == LIRC_MODE2_TIMEOUT) - -/* used heavily by lirc userspace */ -#define lirc_t int - -/*** lirc compatible hardware features ***/ - -#define LIRC_MODE2SEND(x) (x) -#define LIRC_SEND2MODE(x) (x) -#define LIRC_MODE2REC(x) ((x) << 16) -#define LIRC_REC2MODE(x) ((x) >> 16) - -#define LIRC_MODE_RAW 0x00000001 -#define LIRC_MODE_PULSE 0x00000002 -#define LIRC_MODE_MODE2 0x00000004 -#define LIRC_MODE_LIRCCODE 0x00000010 - - -#define LIRC_CAN_SEND_RAW LIRC_MODE2SEND(LIRC_MODE_RAW) -#define LIRC_CAN_SEND_PULSE LIRC_MODE2SEND(LIRC_MODE_PULSE) -#define LIRC_CAN_SEND_MODE2 LIRC_MODE2SEND(LIRC_MODE_MODE2) -#define LIRC_CAN_SEND_LIRCCODE LIRC_MODE2SEND(LIRC_MODE_LIRCCODE) - -#define LIRC_CAN_SEND_MASK 0x0000003f - -#define LIRC_CAN_SET_SEND_CARRIER 0x00000100 -#define LIRC_CAN_SET_SEND_DUTY_CYCLE 0x00000200 -#define LIRC_CAN_SET_TRANSMITTER_MASK 0x00000400 - -#define LIRC_CAN_REC_RAW LIRC_MODE2REC(LIRC_MODE_RAW) -#define LIRC_CAN_REC_PULSE LIRC_MODE2REC(LIRC_MODE_PULSE) -#define LIRC_CAN_REC_MODE2 LIRC_MODE2REC(LIRC_MODE_MODE2) -#define LIRC_CAN_REC_LIRCCODE LIRC_MODE2REC(LIRC_MODE_LIRCCODE) - -#define LIRC_CAN_REC_MASK LIRC_MODE2REC(LIRC_CAN_SEND_MASK) - -#define LIRC_CAN_SET_REC_CARRIER (LIRC_CAN_SET_SEND_CARRIER << 16) -#define LIRC_CAN_SET_REC_DUTY_CYCLE (LIRC_CAN_SET_SEND_DUTY_CYCLE << 16) - -#define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE 0x40000000 -#define LIRC_CAN_SET_REC_CARRIER_RANGE 0x80000000 -#define LIRC_CAN_GET_REC_RESOLUTION 0x20000000 -#define LIRC_CAN_SET_REC_TIMEOUT 0x10000000 -#define LIRC_CAN_SET_REC_FILTER 0x08000000 - -#define LIRC_CAN_MEASURE_CARRIER 0x02000000 -#define LIRC_CAN_USE_WIDEBAND_RECEIVER 0x04000000 - -#define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK) -#define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK) - -#define LIRC_CAN_NOTIFY_DECODE 0x01000000 - -/*** IOCTL commands for lirc driver ***/ - -#define LIRC_GET_FEATURES _IOR('i', 0x00000000, __u32) - -#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32) -#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32) -#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, __u32) -#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, __u32) -#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, __u32) -#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, __u32) -#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, __u32) - -#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, __u32) -#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, __u32) - -#define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, __u32) -#define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, __u32) -#define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, __u32) -#define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, __u32) - -/* code length in bits, currently only for LIRC_MODE_LIRCCODE */ -#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32) - -#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, __u32) -#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, __u32) -/* Note: these can reset the according pulse_width */ -#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, __u32) -#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, __u32) -#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, __u32) -#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, __u32) -#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, __u32) - -/* - * when a timeout != 0 is set the driver will send a - * LIRC_MODE2_TIMEOUT data packet, otherwise LIRC_MODE2_TIMEOUT is - * never sent, timeout is disabled by default - */ -#define LIRC_SET_REC_TIMEOUT _IOW('i', 0x00000018, __u32) - -/* 1 enables, 0 disables timeout reports in MODE2 */ -#define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, __u32) - -/* - * pulses shorter than this are filtered out by hardware (software - * emulation in lirc_dev?) - */ -#define LIRC_SET_REC_FILTER_PULSE _IOW('i', 0x0000001a, __u32) -/* - * spaces shorter than this are filtered out by hardware (software - * emulation in lirc_dev?) - */ -#define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) -/* - * if filter cannot be set independently for pulse/space, this should - * be used - */ -#define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) - -/* - * if enabled from the next key press on the driver will send - * LIRC_MODE2_FREQUENCY packets - */ -#define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32) - -/* - * to set a range use - * LIRC_SET_REC_DUTY_CYCLE_RANGE/LIRC_SET_REC_CARRIER_RANGE with the - * lower bound first and later - * LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound - */ - -#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, __u32) -#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, __u32) - -#define LIRC_NOTIFY_DECODE _IO('i', 0x00000020) - -#define LIRC_SETUP_START _IO('i', 0x00000021) -#define LIRC_SETUP_END _IO('i', 0x00000022) - -#define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, __u32) - -#endif +#include <uapi/linux/lirc.h> diff --git a/include/media/rc-core.h b/include/media/rc-core.h index ec921f6538c7..f6494709e230 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -239,6 +239,7 @@ static inline void init_ir_raw_event(struct ir_raw_event *ev) memset(ev, 0, sizeof(*ev)); } +#define IR_DEFAULT_TIMEOUT MS_TO_NS(125) #define IR_MAX_DURATION 500000000 /* 500 ms */ #define US_TO_NS(usec) ((usec) * 1000) #define MS_TO_US(msec) ((msec) * 1000) diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 7c4bbc4dfab4..7844e9879497 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -33,26 +33,26 @@ enum rc_type { RC_TYPE_XMP = 18, /* XMP protocol */ }; -#define RC_BIT_NONE 0 -#define RC_BIT_UNKNOWN (1 << RC_TYPE_UNKNOWN) -#define RC_BIT_OTHER (1 << RC_TYPE_OTHER) -#define RC_BIT_RC5 (1 << RC_TYPE_RC5) -#define RC_BIT_RC5X (1 << RC_TYPE_RC5X) -#define RC_BIT_RC5_SZ (1 << RC_TYPE_RC5_SZ) -#define RC_BIT_JVC (1 << RC_TYPE_JVC) -#define RC_BIT_SONY12 (1 << RC_TYPE_SONY12) -#define RC_BIT_SONY15 (1 << RC_TYPE_SONY15) -#define RC_BIT_SONY20 (1 << RC_TYPE_SONY20) -#define RC_BIT_NEC (1 << RC_TYPE_NEC) -#define RC_BIT_SANYO (1 << RC_TYPE_SANYO) -#define RC_BIT_MCE_KBD (1 << RC_TYPE_MCE_KBD) -#define RC_BIT_RC6_0 (1 << RC_TYPE_RC6_0) -#define RC_BIT_RC6_6A_20 (1 << RC_TYPE_RC6_6A_20) -#define RC_BIT_RC6_6A_24 (1 << RC_TYPE_RC6_6A_24) -#define RC_BIT_RC6_6A_32 (1 << RC_TYPE_RC6_6A_32) -#define RC_BIT_RC6_MCE (1 << RC_TYPE_RC6_MCE) -#define RC_BIT_SHARP (1 << RC_TYPE_SHARP) -#define RC_BIT_XMP (1 << RC_TYPE_XMP) +#define RC_BIT_NONE 0ULL +#define RC_BIT_UNKNOWN (1ULL << RC_TYPE_UNKNOWN) +#define RC_BIT_OTHER (1ULL << RC_TYPE_OTHER) +#define RC_BIT_RC5 (1ULL << RC_TYPE_RC5) +#define RC_BIT_RC5X (1ULL << RC_TYPE_RC5X) +#define RC_BIT_RC5_SZ (1ULL << RC_TYPE_RC5_SZ) +#define RC_BIT_JVC (1ULL << RC_TYPE_JVC) +#define RC_BIT_SONY12 (1ULL << RC_TYPE_SONY12) +#define RC_BIT_SONY15 (1ULL << RC_TYPE_SONY15) +#define RC_BIT_SONY20 (1ULL << RC_TYPE_SONY20) +#define RC_BIT_NEC (1ULL << RC_TYPE_NEC) +#define RC_BIT_SANYO (1ULL << RC_TYPE_SANYO) +#define RC_BIT_MCE_KBD (1ULL << RC_TYPE_MCE_KBD) +#define RC_BIT_RC6_0 (1ULL << RC_TYPE_RC6_0) +#define RC_BIT_RC6_6A_20 (1ULL << RC_TYPE_RC6_6A_20) +#define RC_BIT_RC6_6A_24 (1ULL << RC_TYPE_RC6_6A_24) +#define RC_BIT_RC6_6A_32 (1ULL << RC_TYPE_RC6_6A_32) +#define RC_BIT_RC6_MCE (1ULL << RC_TYPE_RC6_MCE) +#define RC_BIT_SHARP (1ULL << RC_TYPE_SHARP) +#define RC_BIT_XMP (1ULL << RC_TYPE_XMP) #define RC_BIT_ALL (RC_BIT_UNKNOWN | RC_BIT_OTHER | \ RC_BIT_RC5 | RC_BIT_RC5X | RC_BIT_RC5_SZ | \ diff --git a/include/media/v4l2-clk.h b/include/media/v4l2-clk.h index 3ef6e3d5ed6c..2b94662d005c 100644 --- a/include/media/v4l2-clk.h +++ b/include/media/v4l2-clk.h @@ -65,7 +65,12 @@ static inline struct v4l2_clk *v4l2_clk_register_fixed(const char *dev_id, return __v4l2_clk_register_fixed(dev_id, rate, THIS_MODULE); } +#define V4L2_CLK_NAME_SIZE 64 + #define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \ "%d-%04x", adap, client) +#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \ + "of-%s", of_full_name) + #endif diff --git a/include/media/v4l2-dv-timings.h b/include/media/v4l2-dv-timings.h index a209526b6014..1113c8874c26 100644 --- a/include/media/v4l2-dv-timings.h +++ b/include/media/v4l2-dv-timings.h @@ -107,12 +107,14 @@ bool v4l2_find_dv_timings_cap(struct v4l2_dv_timings *t, * @standard: the timings according to the standard. * @pclock_delta: maximum delta in Hz between standard->pixelclock and * the measured timings. + * @match_reduced_fps: if true, then fail if V4L2_DV_FL_REDUCED_FPS does not + * match. * * Returns true if the two timings match, returns false otherwise. */ bool v4l2_match_dv_timings(const struct v4l2_dv_timings *measured, const struct v4l2_dv_timings *standard, - unsigned pclock_delta); + unsigned pclock_delta, bool match_reduced_fps); /** * v4l2_print_dv_timings() - log the contents of a dv_timings struct @@ -183,4 +185,25 @@ bool v4l2_detect_gtf(unsigned frame_height, unsigned hfreq, unsigned vsync, */ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait); +/* + * reduce_fps - check if conditions for reduced fps are true. + * bt - v4l2 timing structure + * For different timings reduced fps is allowed if following conditions + * are met - + * For CVT timings: if reduced blanking v2 (vsync == 8) is true. + * For CEA861 timings: if V4L2_DV_FL_CAN_REDUCE_FPS flag is true. + */ +static inline bool can_reduce_fps(struct v4l2_bt_timings *bt) +{ + if ((bt->standards & V4L2_DV_BT_STD_CVT) && (bt->vsync == 8)) + return true; + + if ((bt->standards & V4L2_DV_BT_STD_CEA861) && + (bt->flags & V4L2_DV_FL_CAN_REDUCE_FPS)) + return true; + + return false; +} + + #endif diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 647ebfe5174f..ef03ae56b1c1 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -129,6 +129,8 @@ struct vb2_mem_ops { * @dbuf_mapped: flag to show whether dbuf is mapped or not * @bytesused: number of bytes occupied by data in the plane (payload) * @length: size of this plane (NOT the payload) in bytes + * @min_length: minimum required size of this plane (NOT the payload) in bytes. + * @length is always greater or equal to @min_length. * @offset: when memory in the associated struct vb2_buffer is * VB2_MEMORY_MMAP, equals the offset from the start of * the device memory for this plane (or is a "cookie" that @@ -150,6 +152,7 @@ struct vb2_plane { unsigned int dbuf_mapped; unsigned int bytesused; unsigned int length; + unsigned int min_length; union { unsigned int offset; unsigned long userptr; @@ -211,6 +214,7 @@ struct vb2_queue; * @num_planes: number of planes in the buffer * on an internal driver queue * @planes: private per-plane information; do not change + * @timestamp: frame timestamp in ns */ struct vb2_buffer { struct vb2_queue *vb2_queue; @@ -219,6 +223,7 @@ struct vb2_buffer { unsigned int memory; unsigned int num_planes; struct vb2_plane planes[VB2_MAX_PLANES]; + u64 timestamp; /* private: internal use only * @@ -268,21 +273,26 @@ struct vb2_buffer { * struct vb2_ops - driver-specific callbacks * * @queue_setup: called from VIDIOC_REQBUFS and VIDIOC_CREATE_BUFS - * handlers before memory allocation, or, if - * *num_planes != 0, after the allocation to verify a - * smaller number of buffers. Driver should return - * the required number of buffers in *num_buffers, the - * required number of planes per buffer in *num_planes; the - * size of each plane should be set in the sizes[] array - * and optional per-plane allocator specific context in the - * alloc_ctxs[] array. When called from VIDIOC_REQBUFS, - * fmt == NULL, the driver has to use the currently - * configured format and *num_buffers is the total number - * of buffers, that are being allocated. When called from - * VIDIOC_CREATE_BUFS, fmt != NULL and it describes the - * target frame format (if the format isn't valid the - * callback must return -EINVAL). In this case *num_buffers - * are being allocated additionally to q->num_buffers. + * handlers before memory allocation. It can be called + * twice: if the original number of requested buffers + * could not be allocated, then it will be called a + * second time with the actually allocated number of + * buffers to verify if that is OK. + * The driver should return the required number of buffers + * in *num_buffers, the required number of planes per + * buffer in *num_planes, the size of each plane should be + * set in the sizes[] array and optional per-plane + * allocator specific context in the alloc_ctxs[] array. + * When called from VIDIOC_REQBUFS, *num_planes == 0, the + * driver has to use the currently configured format to + * determine the plane sizes and *num_buffers is the total + * number of buffers that are being allocated. When called + * from VIDIOC_CREATE_BUFS, *num_planes != 0 and it + * describes the requested number of planes and sizes[] + * contains the requested plane sizes. If either + * *num_planes or the requested sizes are invalid callback + * must return -EINVAL. In this case *num_buffers are + * being allocated additionally to q->num_buffers. * @wait_prepare: release any locks taken while calling vb2 functions; * it is called before an ioctl needs to wait for a new * buffer to arrive; required to avoid a deadlock in @@ -344,7 +354,7 @@ struct vb2_buffer { * pre-queued buffers before calling STREAMON. */ struct vb2_ops { - int (*queue_setup)(struct vb2_queue *q, const void *parg, + int (*queue_setup)(struct vb2_queue *q, unsigned int *num_buffers, unsigned int *num_planes, unsigned int sizes[], void *alloc_ctxs[]); @@ -362,11 +372,22 @@ struct vb2_ops { void (*buf_queue)(struct vb2_buffer *vb); }; +/** + * struct vb2_ops - driver-specific callbacks + * + * @fill_user_buffer: given a vb2_buffer fill in the userspace structure. + * For V4L2 this is a struct v4l2_buffer. + * @fill_vb2_buffer: given a userspace structure, fill in the vb2_buffer. + * If the userspace structure is invalid, then this op + * will return an error. + * @copy_timestamp: copy the timestamp from a userspace structure to + * the vb2_buffer struct. + */ struct vb2_buf_ops { - int (*fill_user_buffer)(struct vb2_buffer *vb, void *pb); + void (*fill_user_buffer)(struct vb2_buffer *vb, void *pb); int (*fill_vb2_buffer)(struct vb2_buffer *vb, const void *pb, struct vb2_plane *planes); - int (*set_timestamp)(struct vb2_buffer *vb, const void *pb); + void (*copy_timestamp)(struct vb2_buffer *vb, const void *pb); }; /** @@ -429,6 +450,7 @@ struct vb2_buf_ops { * called since poll() needs to return POLLERR in that situation. * @is_multiplanar: set if buffer type is multiplanar * @is_output: set if buffer type is output + * @copy_timestamp: set if vb2-core should set timestamps * @last_buffer_dequeued: used in poll() and DQBUF to immediately return if the * last decoded buffer was already dequeued. Set for capture queues * when a buffer with the V4L2_BUF_FLAG_LAST is dequeued. @@ -470,7 +492,6 @@ struct vb2_queue { wait_queue_head_t done_wq; void *alloc_ctx[VB2_MAX_PLANES]; - unsigned int plane_sizes[VB2_MAX_PLANES]; unsigned int streaming:1; unsigned int start_streaming_called:1; @@ -478,6 +499,7 @@ struct vb2_queue { unsigned int waiting_for_buffers:1; unsigned int is_multiplanar:1; unsigned int is_output:1; + unsigned int copy_timestamp:1; unsigned int last_buffer_dequeued:1; struct vb2_fileio_data *fileio; @@ -503,11 +525,12 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state); void vb2_discard_done(struct vb2_queue *q); int vb2_wait_for_all_buffers(struct vb2_queue *q); -int vb2_core_querybuf(struct vb2_queue *q, unsigned int index, void *pb); +void vb2_core_querybuf(struct vb2_queue *q, unsigned int index, void *pb); int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory, unsigned int *count); int vb2_core_create_bufs(struct vb2_queue *q, enum vb2_memory memory, - unsigned int *count, const void *parg); + unsigned int *count, unsigned requested_planes, + const unsigned int requested_sizes[]); int vb2_core_prepare_buf(struct vb2_queue *q, unsigned int index, void *pb); int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb); int vb2_core_dqbuf(struct vb2_queue *q, void *pb, bool nonblocking); @@ -531,6 +554,42 @@ unsigned long vb2_get_unmapped_area(struct vb2_queue *q, unsigned long pgoff, unsigned long flags); #endif +unsigned int vb2_core_poll(struct vb2_queue *q, struct file *file, + poll_table *wait); +size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count, + loff_t *ppos, int nonblock); +size_t vb2_write(struct vb2_queue *q, const char __user *data, size_t count, + loff_t *ppos, int nonblock); + +/* + * vb2_thread_fnc - callback function for use with vb2_thread + * + * This is called whenever a buffer is dequeued in the thread. + */ +typedef int (*vb2_thread_fnc)(struct vb2_buffer *vb, void *priv); + +/** + * vb2_thread_start() - start a thread for the given queue. + * @q: videobuf queue + * @fnc: callback function + * @priv: priv pointer passed to the callback function + * @thread_name:the name of the thread. This will be prefixed with "vb2-". + * + * This starts a thread that will queue and dequeue until an error occurs + * or @vb2_thread_stop is called. + * + * This function should not be used for anything else but the videobuf2-dvb + * support. If you think you have another good use-case for this, then please + * contact the linux-media mailinglist first. + */ +int vb2_thread_start(struct vb2_queue *q, vb2_thread_fnc fnc, void *priv, + const char *thread_name); + +/** + * vb2_thread_stop() - stop the thread for the given queue. + * @q: videobuf queue + */ +int vb2_thread_stop(struct vb2_queue *q); /** * vb2_is_streaming() - return streaming status of the queue @@ -635,4 +694,11 @@ static inline void vb2_clear_last_buffer_dequeued(struct vb2_queue *q) q->last_buffer_dequeued = false; } +/* + * The following functions are not part of the vb2 core API, but are useful + * functions for videobuf2-*. + */ +bool vb2_buffer_in_use(struct vb2_queue *q, struct vb2_buffer *vb); +int vb2_verify_memory_type(struct vb2_queue *q, + enum vb2_memory memory, unsigned int type); #endif /* _MEDIA_VIDEOBUF2_CORE_H */ diff --git a/include/media/videobuf2-v4l2.h b/include/media/videobuf2-v4l2.h index 5abab1e7c7e8..3cc836f76675 100644 --- a/include/media/videobuf2-v4l2.h +++ b/include/media/videobuf2-v4l2.h @@ -28,7 +28,6 @@ * @vb2_buf: video buffer 2 * @flags: buffer informational flags * @field: enum v4l2_field; field order of the image in the buffer - * @timestamp: frame timestamp * @timecode: frame timecode * @sequence: sequence count of this frame * Should contain enough information to be able to cover all the fields @@ -39,7 +38,6 @@ struct vb2_v4l2_buffer { __u32 flags; __u32 field; - struct timeval timestamp; struct v4l2_timecode timecode; __u32 sequence; }; @@ -65,42 +63,8 @@ int vb2_streamoff(struct vb2_queue *q, enum v4l2_buf_type type); int __must_check vb2_queue_init(struct vb2_queue *q); void vb2_queue_release(struct vb2_queue *q); - -unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait); -size_t vb2_read(struct vb2_queue *q, char __user *data, size_t count, - loff_t *ppos, int nonblock); -size_t vb2_write(struct vb2_queue *q, const char __user *data, size_t count, - loff_t *ppos, int nonblock); - -/* - * vb2_thread_fnc - callback function for use with vb2_thread - * - * This is called whenever a buffer is dequeued in the thread. - */ -typedef int (*vb2_thread_fnc)(struct vb2_buffer *vb, void *priv); - -/** - * vb2_thread_start() - start a thread for the given queue. - * @q: videobuf queue - * @fnc: callback function - * @priv: priv pointer passed to the callback function - * @thread_name:the name of the thread. This will be prefixed with "vb2-". - * - * This starts a thread that will queue and dequeue until an error occurs - * or @vb2_thread_stop is called. - * - * This function should not be used for anything else but the videobuf2-dvb - * support. If you think you have another good use-case for this, then please - * contact the linux-media mailinglist first. - */ -int vb2_thread_start(struct vb2_queue *q, vb2_thread_fnc fnc, void *priv, - const char *thread_name); - -/** - * vb2_thread_stop() - stop the thread for the given queue. - * @q: videobuf queue - */ -int vb2_thread_stop(struct vb2_queue *q); +unsigned int vb2_poll(struct vb2_queue *q, struct file *file, + poll_table *wait); /* * The following functions are not part of the vb2 core API, but are simple diff --git a/include/trace/events/v4l2.h b/include/trace/events/v4l2.h index 22afa26e34b2..ee7754c6e4a1 100644 --- a/include/trace/events/v4l2.h +++ b/include/trace/events/v4l2.h @@ -184,7 +184,7 @@ DECLARE_EVENT_CLASS(vb2_v4l2_event_class, __field(int, minor) __field(u32, flags) __field(u32, field) - __field(s64, timestamp) + __field(u64, timestamp) __field(u32, timecode_type) __field(u32, timecode_flags) __field(u8, timecode_frames) @@ -205,7 +205,7 @@ DECLARE_EVENT_CLASS(vb2_v4l2_event_class, __entry->minor = owner ? owner->vdev->minor : -1; __entry->flags = vbuf->flags; __entry->field = vbuf->field; - __entry->timestamp = timeval_to_ns(&vbuf->timestamp); + __entry->timestamp = vb->timestamp; __entry->timecode_type = vbuf->timecode.type; __entry->timecode_flags = vbuf->timecode.flags; __entry->timecode_frames = vbuf->timecode.frames; diff --git a/include/trace/events/vb2.h b/include/trace/events/vb2.h index bfeceeba3744..c1a22416ed05 100644 --- a/include/trace/events/vb2.h +++ b/include/trace/events/vb2.h @@ -18,6 +18,7 @@ DECLARE_EVENT_CLASS(vb2_event_class, __field(u32, index) __field(u32, type) __field(u32, bytesused) + __field(u64, timestamp) ), TP_fast_assign( @@ -28,14 +29,16 @@ DECLARE_EVENT_CLASS(vb2_event_class, __entry->index = vb->index; __entry->type = vb->type; __entry->bytesused = vb->planes[0].bytesused; + __entry->timestamp = vb->timestamp; ), TP_printk("owner = %p, queued = %u, owned_by_drv = %d, index = %u, " - "type = %u, bytesused = %u", __entry->owner, + "type = %u, bytesused = %u, timestamp = %llu", __entry->owner, __entry->queued_count, __entry->owned_by_drv_count, __entry->index, __entry->type, - __entry->bytesused + __entry->bytesused, + __entry->timestamp ) ) diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index 0b69a7753558..ee2d542c65f5 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -225,7 +225,7 @@ * - multiple of 128 pixels for the width * - multiple of 32 pixels for the height * - * For more information: see http://linuxtv.org/downloads/v4l-dvb-apis/re32.html + * For more information: see https://linuxtv.org/downloads/v4l-dvb-apis/re32.html */ #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) diff --git a/include/uapi/linux/dvb/video.h b/include/uapi/linux/dvb/video.h index d3d14a59d2d5..49392564f9d6 100644 --- a/include/uapi/linux/dvb/video.h +++ b/include/uapi/linux/dvb/video.h @@ -26,7 +26,6 @@ #include <linux/types.h> #ifndef __KERNEL__ -#include <stdint.h> #include <time.h> #endif diff --git a/include/uapi/linux/lirc.h b/include/uapi/linux/lirc.h new file mode 100644 index 000000000000..4b3ab2966b5a --- /dev/null +++ b/include/uapi/linux/lirc.h @@ -0,0 +1,168 @@ +/* + * lirc.h - linux infrared remote control header file + * last modified 2010/07/13 by Jarod Wilson + */ + +#ifndef _LINUX_LIRC_H +#define _LINUX_LIRC_H + +#include <linux/types.h> +#include <linux/ioctl.h> + +#define PULSE_BIT 0x01000000 +#define PULSE_MASK 0x00FFFFFF + +#define LIRC_MODE2_SPACE 0x00000000 +#define LIRC_MODE2_PULSE 0x01000000 +#define LIRC_MODE2_FREQUENCY 0x02000000 +#define LIRC_MODE2_TIMEOUT 0x03000000 + +#define LIRC_VALUE_MASK 0x00FFFFFF +#define LIRC_MODE2_MASK 0xFF000000 + +#define LIRC_SPACE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_SPACE) +#define LIRC_PULSE(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_PULSE) +#define LIRC_FREQUENCY(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_FREQUENCY) +#define LIRC_TIMEOUT(val) (((val)&LIRC_VALUE_MASK) | LIRC_MODE2_TIMEOUT) + +#define LIRC_VALUE(val) ((val)&LIRC_VALUE_MASK) +#define LIRC_MODE2(val) ((val)&LIRC_MODE2_MASK) + +#define LIRC_IS_SPACE(val) (LIRC_MODE2(val) == LIRC_MODE2_SPACE) +#define LIRC_IS_PULSE(val) (LIRC_MODE2(val) == LIRC_MODE2_PULSE) +#define LIRC_IS_FREQUENCY(val) (LIRC_MODE2(val) == LIRC_MODE2_FREQUENCY) +#define LIRC_IS_TIMEOUT(val) (LIRC_MODE2(val) == LIRC_MODE2_TIMEOUT) + +/* used heavily by lirc userspace */ +#define lirc_t int + +/*** lirc compatible hardware features ***/ + +#define LIRC_MODE2SEND(x) (x) +#define LIRC_SEND2MODE(x) (x) +#define LIRC_MODE2REC(x) ((x) << 16) +#define LIRC_REC2MODE(x) ((x) >> 16) + +#define LIRC_MODE_RAW 0x00000001 +#define LIRC_MODE_PULSE 0x00000002 +#define LIRC_MODE_MODE2 0x00000004 +#define LIRC_MODE_LIRCCODE 0x00000010 + + +#define LIRC_CAN_SEND_RAW LIRC_MODE2SEND(LIRC_MODE_RAW) +#define LIRC_CAN_SEND_PULSE LIRC_MODE2SEND(LIRC_MODE_PULSE) +#define LIRC_CAN_SEND_MODE2 LIRC_MODE2SEND(LIRC_MODE_MODE2) +#define LIRC_CAN_SEND_LIRCCODE LIRC_MODE2SEND(LIRC_MODE_LIRCCODE) + +#define LIRC_CAN_SEND_MASK 0x0000003f + +#define LIRC_CAN_SET_SEND_CARRIER 0x00000100 +#define LIRC_CAN_SET_SEND_DUTY_CYCLE 0x00000200 +#define LIRC_CAN_SET_TRANSMITTER_MASK 0x00000400 + +#define LIRC_CAN_REC_RAW LIRC_MODE2REC(LIRC_MODE_RAW) +#define LIRC_CAN_REC_PULSE LIRC_MODE2REC(LIRC_MODE_PULSE) +#define LIRC_CAN_REC_MODE2 LIRC_MODE2REC(LIRC_MODE_MODE2) +#define LIRC_CAN_REC_LIRCCODE LIRC_MODE2REC(LIRC_MODE_LIRCCODE) + +#define LIRC_CAN_REC_MASK LIRC_MODE2REC(LIRC_CAN_SEND_MASK) + +#define LIRC_CAN_SET_REC_CARRIER (LIRC_CAN_SET_SEND_CARRIER << 16) +#define LIRC_CAN_SET_REC_DUTY_CYCLE (LIRC_CAN_SET_SEND_DUTY_CYCLE << 16) + +#define LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE 0x40000000 +#define LIRC_CAN_SET_REC_CARRIER_RANGE 0x80000000 +#define LIRC_CAN_GET_REC_RESOLUTION 0x20000000 +#define LIRC_CAN_SET_REC_TIMEOUT 0x10000000 +#define LIRC_CAN_SET_REC_FILTER 0x08000000 + +#define LIRC_CAN_MEASURE_CARRIER 0x02000000 +#define LIRC_CAN_USE_WIDEBAND_RECEIVER 0x04000000 + +#define LIRC_CAN_SEND(x) ((x)&LIRC_CAN_SEND_MASK) +#define LIRC_CAN_REC(x) ((x)&LIRC_CAN_REC_MASK) + +#define LIRC_CAN_NOTIFY_DECODE 0x01000000 + +/*** IOCTL commands for lirc driver ***/ + +#define LIRC_GET_FEATURES _IOR('i', 0x00000000, __u32) + +#define LIRC_GET_SEND_MODE _IOR('i', 0x00000001, __u32) +#define LIRC_GET_REC_MODE _IOR('i', 0x00000002, __u32) +#define LIRC_GET_SEND_CARRIER _IOR('i', 0x00000003, __u32) +#define LIRC_GET_REC_CARRIER _IOR('i', 0x00000004, __u32) +#define LIRC_GET_SEND_DUTY_CYCLE _IOR('i', 0x00000005, __u32) +#define LIRC_GET_REC_DUTY_CYCLE _IOR('i', 0x00000006, __u32) +#define LIRC_GET_REC_RESOLUTION _IOR('i', 0x00000007, __u32) + +#define LIRC_GET_MIN_TIMEOUT _IOR('i', 0x00000008, __u32) +#define LIRC_GET_MAX_TIMEOUT _IOR('i', 0x00000009, __u32) + +#define LIRC_GET_MIN_FILTER_PULSE _IOR('i', 0x0000000a, __u32) +#define LIRC_GET_MAX_FILTER_PULSE _IOR('i', 0x0000000b, __u32) +#define LIRC_GET_MIN_FILTER_SPACE _IOR('i', 0x0000000c, __u32) +#define LIRC_GET_MAX_FILTER_SPACE _IOR('i', 0x0000000d, __u32) + +/* code length in bits, currently only for LIRC_MODE_LIRCCODE */ +#define LIRC_GET_LENGTH _IOR('i', 0x0000000f, __u32) + +#define LIRC_SET_SEND_MODE _IOW('i', 0x00000011, __u32) +#define LIRC_SET_REC_MODE _IOW('i', 0x00000012, __u32) +/* Note: these can reset the according pulse_width */ +#define LIRC_SET_SEND_CARRIER _IOW('i', 0x00000013, __u32) +#define LIRC_SET_REC_CARRIER _IOW('i', 0x00000014, __u32) +#define LIRC_SET_SEND_DUTY_CYCLE _IOW('i', 0x00000015, __u32) +#define LIRC_SET_REC_DUTY_CYCLE _IOW('i', 0x00000016, __u32) +#define LIRC_SET_TRANSMITTER_MASK _IOW('i', 0x00000017, __u32) + +/* + * when a timeout != 0 is set the driver will send a + * LIRC_MODE2_TIMEOUT data packet, otherwise LIRC_MODE2_TIMEOUT is + * never sent, timeout is disabled by default + */ +#define LIRC_SET_REC_TIMEOUT _IOW('i', 0x00000018, __u32) + +/* 1 enables, 0 disables timeout reports in MODE2 */ +#define LIRC_SET_REC_TIMEOUT_REPORTS _IOW('i', 0x00000019, __u32) + +/* + * pulses shorter than this are filtered out by hardware (software + * emulation in lirc_dev?) + */ +#define LIRC_SET_REC_FILTER_PULSE _IOW('i', 0x0000001a, __u32) +/* + * spaces shorter than this are filtered out by hardware (software + * emulation in lirc_dev?) + */ +#define LIRC_SET_REC_FILTER_SPACE _IOW('i', 0x0000001b, __u32) +/* + * if filter cannot be set independently for pulse/space, this should + * be used + */ +#define LIRC_SET_REC_FILTER _IOW('i', 0x0000001c, __u32) + +/* + * if enabled from the next key press on the driver will send + * LIRC_MODE2_FREQUENCY packets + */ +#define LIRC_SET_MEASURE_CARRIER_MODE _IOW('i', 0x0000001d, __u32) + +/* + * to set a range use + * LIRC_SET_REC_DUTY_CYCLE_RANGE/LIRC_SET_REC_CARRIER_RANGE with the + * lower bound first and later + * LIRC_SET_REC_DUTY_CYCLE/LIRC_SET_REC_CARRIER with the upper bound + */ + +#define LIRC_SET_REC_DUTY_CYCLE_RANGE _IOW('i', 0x0000001e, __u32) +#define LIRC_SET_REC_CARRIER_RANGE _IOW('i', 0x0000001f, __u32) + +#define LIRC_NOTIFY_DECODE _IO('i', 0x00000020) + +#define LIRC_SETUP_START _IO('i', 0x00000021) +#define LIRC_SETUP_END _IO('i', 0x00000022) + +#define LIRC_SET_WIDEBAND_RECEIVER _IOW('i', 0x00000023, __u32) + +#endif diff --git a/include/uapi/linux/usb/video.h b/include/uapi/linux/usb/video.h index 3b3b95e01f71..69ab695fad2e 100644 --- a/include/uapi/linux/usb/video.h +++ b/include/uapi/linux/usb/video.h @@ -28,6 +28,7 @@ /* A.3. Video Interface Protocol Codes */ #define UVC_PC_PROTOCOL_UNDEFINED 0x00 +#define UVC_PC_PROTOCOL_15 0x01 /* A.5. Video Class-Specific VC Interface Descriptor Subtypes */ #define UVC_VC_DESCRIPTOR_UNDEFINED 0x00 diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 1bdce501ad6b..2d225bcdb831 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -158,8 +158,10 @@ enum v4l2_colorfx { * We reserve 16 controls for this driver. */ #define V4L2_CID_USER_S2255_BASE (V4L2_CID_USER_BASE + 0x1030) -/* The base for the si476x driver controls. See include/media/si476x.h for the list - * of controls. Total of 16 controls is reserved for this driver */ +/* + * The base for the si476x driver controls. See include/media/drv-intf/si476x.h + * for the list of controls. Total of 16 controls is reserved for this driver + */ #define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040) /* The base for the TI VPE driver controls. Total of 16 controls is reserved for diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index a0e87d16b726..14cd5ebfee6d 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -46,7 +46,7 @@ * All kernel-specific stuff were moved to media/v4l2-dev.h, so * no #if __KERNEL tests are allowed here * - * See http://linuxtv.org for more info + * See https://linuxtv.org for more info * * Author: Bill Dirks <bill@thedirks.org> * Justin Schoeman @@ -1476,7 +1476,12 @@ struct v4l2_ext_control { } __attribute__ ((packed)); struct v4l2_ext_controls { - __u32 ctrl_class; + union { +#ifndef __KERNEL__ + __u32 ctrl_class; +#endif + __u32 which; + }; __u32 count; __u32 error_idx; __u32 reserved[2]; @@ -1484,9 +1489,14 @@ struct v4l2_ext_controls { }; #define V4L2_CTRL_ID_MASK (0x0fffffff) +#ifndef __KERNEL__ #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) +#endif +#define V4L2_CTRL_ID2WHICH(id) ((id) & 0x0fff0000UL) #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) #define V4L2_CTRL_MAX_DIMS (4) +#define V4L2_CTRL_WHICH_CUR_VAL 0 +#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 enum v4l2_ctrl_type { V4L2_CTRL_TYPE_INTEGER = 1, |