Commit graph

1446 commits

Author SHA1 Message Date
Mauro Carvalho Chehab d78757e780 [media] videobuf2-core: Add it to device-drivers DocBook
Most of the stuff at videobuf2-core are ok for adding it to
DocBook.

Two notes here:
1) As videobuf2-core will be soon be changed, better to
   not spend too much efforts right now, as things will
   change soon;

2) struct vb2_queue has a number of private elements that are
   documented. As Kernel nano documentation format handles
   "private:" arguments, we need to put them on a separate
   comment block or to remove. Keeping the comments is
   obviously better ;)

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 09:05:54 -03:00
Mauro Carvalho Chehab 506bb54bdb [media] v4l-dv-timings.h: Add to device-drivers DocBook
There are already markups for documentation at v4l-dv-timings.h,
however, they're not properly formatted.

Convert them to the right format and add this file to
the device-drivers DocBook.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 09:05:53 -03:00
Mauro Carvalho Chehab b6fce850d9 [media] v4l2-event.h: fix comments and add to DocBook
The comments there are good enough for DocBook, however they're
using a wrong format. Fix and add to device-drivers.xml.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 09:05:52 -03:00
Mauro Carvalho Chehab 7dc879190f [media] v4l2-ctrls.h: Document a few missing arguments
Warning(.//include/media/v4l2-ctrls.h:217): No description found for parameter 'p_new'
Warning(.//include/media/v4l2-ctrls.h:217): No description found for parameter 'p_cur'
Warning(.//include/media/v4l2-ctrls.h:217): Excess struct/union/enum/typedef member 'val64' description in 'v4l2_ctrl'
Warning(.//include/media/v4l2-ctrls.h:314): No description found for parameter 'qmenu_int'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 09:05:52 -03:00
Mauro Carvalho Chehab 276ce3a860 [media] v4l2-ctls: don't document v4l2_ctrl_fill()
This is an obsolete function that has several missing
arguments:
	Warning(.//include/media/v4l2-ctrls.h:340): No description found for parameter 'id'
	Warning(.//include/media/v4l2-ctrls.h:340): No description found for parameter 'name'
	Warning(.//include/media/v4l2-ctrls.h:340): No description found for parameter 'type'
	Warning(.//include/media/v4l2-ctrls.h:340): No description found for parameter 'min'
	Warning(.//include/media/v4l2-ctrls.h:340): No description found for parameter 'max'
	Warning(.//include/media/v4l2-ctrls.h:340): No description found for parameter 'step'
	Warning(.//include/media/v4l2-ctrls.h:340): No description found for parameter 'def'
	Warning(.//include/media/v4l2-ctrls.h:340): No description found for parameter 'flags'

However, this is an obsolete function that should be
removed soon. And are not meant to be used anymore. So,
instead of documenting those stuff, let's just make
DocBook to not handle it, by replacing "/**" by "/*".

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 09:05:51 -03:00
Mauro Carvalho Chehab 8c2721d57a [media] v4l2-ctrls.h: add to device-drivers DocBook
The comments there are using a wrong format. Due to that,
DocBook were unable to parse it.

Fix the tags format, and add it to device-drivers.xml.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 09:05:50 -03:00
Mauro Carvalho Chehab 1d8955b2c3 [media] v4l2-subdev: add remaining argument descriptions
Warning(.//include/media/v4l2-subdev.h:203): No description found for parameter 'ioctl'
Warning(.//include/media/v4l2-subdev.h:203): No description found for parameter 'compat_ioctl32'
Warning(.//include/media/v4l2-subdev.h:203): No description found for parameter 'subscribe_event'
Warning(.//include/media/v4l2-subdev.h:203): No description found for parameter 'unsubscribe_event'
Warning(.//include/media/v4l2-subdev.h:273): No description found for parameter 's_stream'
Warning(.//include/media/v4l2-subdev.h:407): No description found for parameter 's_stream'
Warning(.//include/media/v4l2-subdev.h:623): No description found for parameter 'link_validate'
Warning(.//include/media/v4l2-subdev.h:623): No description found for parameter 'set_frame_desc'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 07:00:26 -03:00
Mauro Carvalho Chehab e44cc20a1d [media] v4l2_subdev: describe ioctl parms at the remaining structs
Fixes the following warnings:

Warning(.//include/media/v4l2-subdev.h:445): No description found for parameter 'g_sliced_vbi_cap'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'enum_mbus_code'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'enum_frame_size'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'enum_frame_interval'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'get_fmt'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'set_fmt'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'get_selection'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'set_selection'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'get_edid'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'set_edid'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'dv_timings_cap'
Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'enum_dv_timings'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 06:40:04 -03:00
Mauro Carvalho Chehab 914728ab60 [media] v4l2_subdev: describe ioctl parms at v4l2_subdev_video_ops
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_std'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_std'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'querystd'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'cropcap'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_crop'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_crop'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_parm'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_parm'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_frame_interval'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_frame_interval'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_dv_timings'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_dv_timings'
Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'query_dv_timings'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 06:39:58 -03:00
Mauro Carvalho Chehab b84aeb03a8 [media] v4l2-subdev: reorder the v4l2_subdev_video_ops comments
The comments for struct v4l2_subdev_video_ops are out of the
order as the parameter would appear at struct. This is not
a problem for DocBook, but humans find harder to mentally
reorder ;)

So, put them at the right order. That makes easier to check
what's missing, and to put the comments in the right place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 06:39:57 -03:00
Mauro Carvalho Chehab 91963aae9a [media] v4l2-subdev: Add description for radio ioctl handlers
Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 's_radio'
Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 's_frequency'
Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 'enum_freq_bands'
Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 'g_tuner'
Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 'g_modulator'
Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 's_modulator'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 06:39:57 -03:00
Mauro Carvalho Chehab 783001adf9 [media] v4l2-subdev: Add description for core ioctl handlers
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'queryctrl'
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'g_ctrl'
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 's_ctrl'
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'g_ext_ctrls'
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 's_ext_ctrls'
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'try_ext_ctrls'
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'querymenu'
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'g_register'
Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 's_register'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 06:39:56 -03:00
Mauro Carvalho Chehab 5c6629847c [media] v4l2-subdev: convert documentation to the right format
struct v4l2_subdev_core_ops has some kernel-doc-nano documentation
using a wrong format, with affects the number of stuff reported at
the DocBook device-drivers.xml.

Properly mark the such comment blocks using the right notation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 06:02:59 -03:00
Mauro Carvalho Chehab 62c0d016da [media] Docbook: Fix comments at v4l2-mem2mem.h
Warning(.//include/media/v4l2-mem2mem.h:50): No description found for parameter 'lock'
Warning(.//include/media/v4l2-mem2mem.h:50): No description found for parameter 'unlock'
Warning(.//include/media/v4l2-mem2mem.h:167): No description found for parameter 'm2m_ctx'
Warning(.//include/media/v4l2-mem2mem.h:177): No description found for parameter 'm2m_ctx'
Warning(.//include/media/v4l2-mem2mem.h:188): No description found for parameter 'm2m_ctx'
Warning(.//include/media/v4l2-mem2mem.h:197): No description found for parameter 'm2m_ctx'
Warning(.//include/media/v4l2-mem2mem.h:206): No description found for parameter 'm2m_ctx'
Warning(.//include/media/v4l2-mem2mem.h:215): No description found for parameter 'm2m_ctx'
Warning(.//include/media/v4l2-mem2mem.h:226): No description found for parameter 'm2m_ctx'
Warning(.//include/media/v4l2-mem2mem.h:235): No description found for parameter 'm2m_ctx'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 05:35:50 -03:00
Mauro Carvalho Chehab 62ba6b22f4 [media] Docbook: fix comments at v4l2-flash-led-class.h
Warning(.//include/media/v4l2-flash-led-class.h:51): bad line: 				unique in the system
Warning(.//include/media/v4l2-flash-led-class.h:56): bad line: 				definitions are available in the header file
Warning(.//include/media/v4l2-flash-led-class.h:57): bad line: 				<linux/led-class-flash.h>
Warning(.//include/media/v4l2-flash-led-class.h:122): No description found for parameter 'ops'
Warning(.//include/media/v4l2-flash-led-class.h:122): Excess function parameter 'flash_ops' description in 'v4l2_flash_init'
Warning(.//include/media/v4l2-flash-led-class.h:130): No description found for parameter 'v4l2_flash'
Warning(.//include/media/v4l2-flash-led-class.h:130): Excess function parameter 'flash' description in 'v4l2_flash_release'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 05:28:44 -03:00
Mauro Carvalho Chehab fa810845ef [media] Docbook: Fix s_rx_carrier_range parameter description
Warning(.//include/media/rc-core.h:178): No description found for parameter 's_rx_carrier_range'
Warning(.//include/media/rc-core.h:178): Excess struct/union/enum/typedef member 's_rx_carrier' description in 'rc_dev'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 05:25:45 -03:00
Mauro Carvalho Chehab f8b2737707 [media] Docbook: Fix comments at v4l2-async.h
Warning(.//include/media/v4l2-async.h:62): No description found for parameter 'match_type'
Warning(.//include/media/v4l2-async.h:62): Excess struct/union/enum/typedef member 'bus_type' description in 'v4l2_async_subdev'
Warning(.//include/media/v4l2-async.h:76): cannot understand function prototype: 'struct v4l2_async_notifier '

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 05:17:27 -03:00
Mauro Carvalho Chehab ec0255cad2 [media] Docbook: Fix description of struct media_devnode
Warning(.//include/media/media-devnode.h:80): No description found for parameter 'fops'
Warning(.//include/media/media-devnode.h:80): No description found for parameter 'dev'
Warning(.//include/media/media-devnode.h:80): No description found for parameter 'cdev'
Warning(.//include/media/media-devnode.h:80): No description found for parameter 'release'

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
2015-08-22 04:45:03 -03:00
Laurent Pinchart 78c66fbcec [media] v4l: omap3isp: Drop platform data support
Platforms using the OMAP3 ISP have all switched to DT, drop platform
data support.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-08-16 13:18:06 -03:00
Mats Randgaard d32d98642d [media] Driver for Toshiba TC358743 HDMI to CSI-2 bridge
The driver is tested on our hardware and all the implemented features
works as expected.

Missing features:
- CEC support
- HDCP repeater support
- IR support

Signed-off-by: Mats Randgaard <matrandg@cisco.com>
[hans.verkuil@cisco.com: updated copyright year to 2015]
[hans.verkuil@cisco.com: update confusing confctl_mutex comment]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-17 09:59:28 -03:00
Lars-Peter Clausen 8ae5640f1b [media] Add helper function for subdev event notifications
Add a new helper function called v4l2_subdev_notify_event() which will
deliver the specified event to both the v4l2 subdev event queue as well as
to the notify callback. The former is typically used by userspace
applications to listen to notification events while the later is used by
bridge drivers. Combining both into the same function avoids boilerplate
code in subdev drivers.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-17 09:45:50 -03:00
David Härdeman 275ddb40bc [media] rc-core: remove the LIRC "protocol"
The LIRC protocol was always a bad fit and if we're ever going to expose
protocol numbers in a user-space API, it'd be better to get rid of the
LIRC "protocol" first.

The sysfs API is kept backwards compatible by always listing the lirc
protocol as present and enabled.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-06 08:26:15 -03:00
David Härdeman fcb1309786 [media] rc-core: use an IDA rather than a bitmap
This patch changes rc-core to use the kernel facilities that are already
available for handling unique numbers instead of rolling its own bitmap
stuff.

Signed-off-by: David Härdeman <david@hardeman.nu>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-06 08:26:15 -03:00
Prashant Laddha 5fea1bb703 [media] v4l2-dv-timings: add support for reduced blanking v2
Added support for reduced blanking version 2 (RB v2) in cvt timings.
Standard specifies a fixed vsync pulse of 8 lines to indicate RB v2
timings. Vertical back porch is fixed at 6 lines and vertical front
porch is remainder of vertical blanking time.

For RB v2, horizontal blanking is fixed at 80 pixels. Horizontal sync
is fixed at 32. All horizontal timing counts (active pixels, front,
back porches) can be specified upto a precision of 1.

RB v2 allows for non standard aspect ratios. In RB v2 vsync does not
indicate aspect ratio. In absence of aspect ratio v4l2_detect_cvt()
cannot calculate image width from image height. Hence extending the
v4l2_detect_cvt() to pass image width in case of RB v2.

Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-07-06 08:25:49 -03:00
Linus Torvalds 13d45f79a2 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem updates from Bryan Wu:
 "In this cycle, we finished to merge patches for LED Flash class
  driver.

  Other than that we have some bug fixes and new drivers for LED
  controllers"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (33 commits)
  leds:lp55xx: fix firmware loading error
  leds: fix max77693-led build errors
  leds: fix aat1290 build errors
  leds: aat1290: pass flags parameter to devm_gpiod_get
  leds: ktd2692: pass flags parameter to devm_gpiod_get
  drivers/leds: don't use module_init in non-modular leds-cobalt-raq.c
  leds: aat1290: add support for V4L2 Flash sub-device
  DT: aat1290: Document handling external strobe sources
  leds: max77693: add support for V4L2 Flash sub-device
  media: Add registration helpers for V4L2 flash sub-devices
  v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it
  Documentation: leds: Add description of v4l2-flash sub-device
  leds: add BCM6358 LED driver
  leds: add DT binding for BCM6358 LED controller
  leds: fix brightness changing when software blinking is active
  Documentation: leds-lp5523: describe master fader attributes
  leds: lp5523: add master_fader support
  leds: leds-gpio: Allow compile test if !GPIOLIB
  leds: leds-gpio: Add missing #include <linux/of.h>
  gpiolib: Add missing dummies for the unified device properties interface
  ...
2015-07-01 19:09:11 -07:00
Jacek Anaszewski 42bd6f59ae media: Add registration helpers for V4L2 flash sub-devices
This patch adds helper functions for registering/unregistering
LED Flash class devices as V4L2 sub-devices. The functions should
be called from the LED subsystem device driver. In case the
support for V4L2 Flash sub-devices is disabled in the kernel
config the functions' empty versions will be used.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-06-22 13:53:16 -07:00
Sakari Ailus 862176512b v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it
V4L2 async sub-devices are currently matched (OF case) based on the struct
device_node pointer in struct device. LED devices may have more than one
LED, and in that case the OF node to match is not directly the device's
node, but a LED's node.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2015-06-15 11:37:05 -07:00
Jan Klötzke 1c35cf9cca [media] rc/keymaps: add keytable for Twinhan DTV CAB CI
This RC map was taken from Christoph Pinkl's patch
(http://patchwork.linuxtv.org/patch/7217/). It is used solely by the respective
mantis based card because the encoding is not known.

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10 11:52:25 -03:00
Jan Klötzke 578e95dd38 [media] rc/keymaps: add keytable for Terratec Cinergy S2 HD
This RC map was taken from Christoph Pinkl's patch
(http://patchwork.linuxtv.org/patch/7217/). It is used solely by the respective
mantis based card because the encoding is not known.

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10 11:51:41 -03:00
Jan Klötzke 4862690d82 [media] rc/keymaps: add keytable for Terratec Cinergy C PCI
This RC map was taken from Christoph Pinkl's patch
(http://patchwork.linuxtv.org/patch/7217/). It is used solely by the respective
mantis based card because the encoding is not known.

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10 11:51:01 -03:00
Jan Klötzke 9b6a065e79 [media] rc/keymaps: add RC keytable for TechniSat TS35
The TS35 remote is distributed with TechniSat CableStar HD2 cards (mantis
chipset). The exact protocol type is unknown, making this rc map probably only
usable by mantis cards.

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-10 11:50:04 -03:00
Prashant Laddha 061ddda681 [media] v4l2-dv-timings: add interlace support in detect cvt/gtf
Extend detect_cvt/gtf API to indicate the format type (interlaced
or progressive). In case of interlaced, the vertical front and back
porch and vsync values for both (odd,even) fields are considered to
derive image height. Populated vsync, vertical front, back porch
values in bt timing structure for even and odd fields and updated
the flags appropriately.

Also modified the functions calling the detect_cvt/gtf(). As of now
these functions are calling detect_cvt/gtf() with interlaced flag
set to false.

Cc: Martin Bugge <marbugge@cisco.com>
Cc: Mats Randgaard <matrandg@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09 17:44:42 -03:00
Hans Verkuil b4dbad8fe3 [media] adv7511: log the currently set infoframes
The adv7511 sets up InfoFrames that are used when transmitting video.
Log the contents of those InfoFrames so it is possible to see exactly what
the transmitter is sending.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09 17:30:39 -03:00
Hans Verkuil 28a769f1ab [media] adv7842: replace uintX_t by uX for consistency
Currently this driver mixes u8/u32 and uint8_t/uint32_t. Standardize on
u8/u32.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09 17:29:12 -03:00
Hans Verkuil 5be50ef1ef [media] adv7511: replace uintX_t by uX for consistency
Currently this driver mixes u8/u16 and uint8_t/uint16_t. Standardize on
u8/u16.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09 17:28:39 -03:00
Hans Verkuil e68cf471e7 [media] v4l2-mem2mem: add support for prepare_buf
This was never added for some reason, so add it now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-09 17:25:35 -03:00
Hans Verkuil 74fdcb2ee1 [media] videodev2.h: add support for transfer functions
In the past the transfer function was implied by the colorspace. However,
it is an independent entity in its own right. Add support for explicitly
choosing the transfer function.

This change will allow us to represent linear RGB (as is used by openGL), and
it will make it easier to work with decoded video material since most codecs
store the transfer function as a separate property as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05 11:45:45 -03:00
Mauro Carvalho Chehab 6b20cf3c0f [media] rc: set IR_MAX_DURATION to 500 ms
The current definition is weird, and produce lots of sparse
warnings:

	drivers/media/i2c/cx25840/cx25840-ir.c:448 txclk_tx_s_max_pulse_width() warn: impossible condition '(ns > 4294967295) => (0-u32max > u32max)'
	drivers/media/i2c/cx25840/cx25840-ir.c:461 rxclk_rx_s_max_pulse_width() warn: impossible condition '(ns > 4294967295) => (0-u32max > u32max)'
	drivers/media/i2c/cx25840/cx25840-ir.c:706 cx25840_ir_rx_read() warn: impossible condition '(v > 4294967295) => (0-u32max > u32max)'
	drivers/media/pci/ivtv/ivtv-queue.c:145 ivtv_queue_move() error: we previously assumed 'steal' could be null (see line 138)
	drivers/media/rc/streamzap.c:155 sz_push_full_pulse() warn: impossible condition '(rawir.duration > 4294967295) => (0-u32max > u32max)'
	drivers/media/rc/streamzap.c:169 sz_push_full_pulse() warn: impossible condition '(rawir.duration > 4294967295) => (0-u32max > u32max)'
	drivers/media/rc/redrat3.c:325 redrat3_us_to_len() warn: impossible condition '(microsec > 4294967295) => (0-u32max > u32max)'
	drivers/media/rc/redrat3.c:383 redrat3_process_ir_data() warn: impossible condition '(rawir.duration > 4294967295) => (0-u32max > u32max)'
	drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3676 pvr2_send_request_ex() error: we previously assumed 'write_data' could be null (see line 3648)
	drivers/media/usb/pvrusb2/pvrusb2-hdw.c:3829 pvr2_send_request_ex() error: we previously assumed 'read_data' could be null (see line 3649)
	drivers/media/pci/cx23885/cx23888-ir.c:463 txclk_tx_s_max_pulse_width() warn: impossible condition '(ns > 4294967295) => (0-u32max > u32max)'
	drivers/media/pci/cx23885/cx23888-ir.c:476 rxclk_rx_s_max_pulse_width() warn: impossible condition '(ns > 4294967295) => (0-u32max > u32max)'
	drivers/media/pci/cx23885/cx23888-ir.c:696 cx23888_ir_rx_read() warn: impossible condition '(v > 4294967295) => (0-u32max > u32max)'

Use a more realistic value for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-06-05 11:26:43 -03:00
Hans Verkuil 48519838cc [media] adv7604/adv7842: replace FMT_CHANGED by V4L2_DEVICE_NOTIFY_EVENT
This makes it easier for the bridge driver to just passthrough such
events to the corresponding device node.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20 13:41:30 -03:00
jean-michel.hautbois@vodalys.com 17e484686b [media] v4l2-subdev: allow subdev to send an event to the v4l2_device notify function
All drivers use custom notifications, in particular when source changes.
The bridge only has to map the subdev that sends it to whatever video node it is connected to.

Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20 13:40:02 -03:00
Hans Verkuil f888ae7e6a [media] adv7842: Make output format configurable through pad format operations
Replace the dummy video format operations by pad format operations that
configure the output format.

Copied from the adv7604 driver.

Note: while arch/blackfin/mach-bf609/boards/ezkit.c uses adv7842_platform_data
this source has not been updated because it is broken since the very
beginning. It depends on a struct adv7842_output_format that does not
exist.

And besides that gcc has no support for bf609 so nobody can compile it
except by installing a toolchain from ADI.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-20 13:37:36 -03:00
Antti Seppälä da7ee60b03 [media] rc: nuvoton-cir: Add support for writing wakeup samples via sysfs filter callback
Nuvoton-cir utilizes the encoding capabilities of rc-core to convert
scancodes from user space to pulse/space format understood by the
underlying hardware.

Converted samples are then written to the wakeup fifo along with other
necessary configuration to enable wake up functionality.

Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Signed-off-by: James Hogan <james@albanarts.com>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-14 14:37:03 -03:00
James Hogan 0d830b2d12 [media] rc: rc-core: Add support for encode_wakeup drivers
Add support in rc-core for drivers which implement the wakeup scancode
filter by encoding the scancode using the raw IR encoders. This is by
way of rc_dev::encode_wakeup which should be set to true to make the
allowed wakeup protocols the same as the set of raw IR encoders.

As well as updating the sysfs interface to know which wakeup protocols
are allowed for encode_wakeup drivers, also ensure that the IR
decoders/encoders are loaded when an encode_wakeup driver is registered.

Signed-off-by: James Hogan <james@albanarts.com>
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Cc: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-14 14:34:53 -03:00
James Hogan 9869da5bac [media] rc: rc-ir-raw: Add scancode encoder callback
Add a callback to raw ir handlers for encoding and modulating a scancode
to a set of raw events. This could be used for transmit, or for
converting a wakeup scancode filter to a form that is more suitable for
raw hardware wake up filters.

Signed-off-by: James Hogan <james@albanarts.com>
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Cc: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-14 14:17:03 -03:00
Philipp Zabel c16218402a [media] videobuf2: return -EPIPE from DQBUF after the last buffer
If the last buffer was dequeued from a capture queue, let poll return
immediately and let DQBUF return -EPIPE to signal there will no more
buffers to dequeue until STREAMOFF.
The driver signals the last buffer by setting the V4L2_BUF_FLAG_LAST.
To reenable dequeuing on the capture queue, the driver must explicitly
call vb2_clear_last_buffer_queued. The last buffer queued flag is
cleared automatically during STREAMOFF.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-12 03:53:06 -03:00
Hans Verkuil ebf984bb15 [media] v4l2: replace s_mbus_fmt by set_fmt in bridge drivers
Replace all calls to s_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.

Remove the old try/s_mbus_fmt video ops since they are now no longer used.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01 09:01:16 -03:00
Hans Verkuil da298c6d98 [media] v4l2: replace video op g_mbus_fmt by pad op get_fmt
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses
by the get_fmt pad op and remove the video op.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Cc: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01 08:36:17 -03:00
Hans Verkuil ebcff5fce6 [media] v4l2: replace enum_mbus_fmt by enum_mbus_code
Replace all calls to the enum_mbus_fmt video op by the pad
enum_mbus_code op and remove the duplicate video op.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kamil Debski <k.debski@samsung.com>
Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01 08:33:45 -03:00
Hans Verkuil 480856f3b4 [media] v4l2-of: fix compiler errors if CONFIG_OF is undefined
You must use static inline otherwise you get these errors if CONFIG_OF is not defined:

In file included from drivers/media/platform/soc_camera/soc_camera.c:39:0:
include/media/v4l2-of.h:112:13: warning: 'v4l2_of_free_endpoint' defined but not used [-Wunused-function]
 static void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint)
             ^
In file included from drivers/media/platform/soc_camera/atmel-isi.c:28:0:
include/media/v4l2-of.h:112:13: warning: 'v4l2_of_free_endpoint' defined but not used [-Wunused-function]
 static void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint)
             ^
In file included from drivers/media/platform/soc_camera/rcar_vin.c:36:0:
include/media/v4l2-of.h:112:13: warning: 'v4l2_of_free_endpoint' defined but not used [-Wunused-function]
 static void v4l2_of_free_endpoint(struct v4l2_of_endpoint *endpoint)
             ^

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-28 08:33:45 -03:00
Pavel Machek 074c57a25f [media] media: i2c/adp1653: Devicetree support for adp1653
Add device tree support for adp1653 flash LED driver.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-27 16:19:23 -03:00