platform/kernel/linux-rpi.git
11 years ago[media] indycam: remove g_chip_ident op
Hans Verkuil [Wed, 29 May 2013 09:59:49 +0000 (06:59 -0300)]
[media] indycam: remove g_chip_ident op

This is no longer needed since the core now handles this through DBG_G_CHIP_INFO.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio: remove g_chip_ident op
Hans Verkuil [Wed, 29 May 2013 09:59:48 +0000 (06:59 -0300)]
[media] radio: remove g_chip_ident op

This is no longer needed since the core now handles this through DBG_G_CHIP_INFO.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] au8522_decoder: remove g_chip_ident op
Hans Verkuil [Wed, 29 May 2013 09:59:47 +0000 (06:59 -0300)]
[media] au8522_decoder: remove g_chip_ident op

This is no longer needed since the core now handles this through DBG_G_CHIP_INFO.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tveeprom: remove v4l2-chip-ident.h include
Hans Verkuil [Wed, 29 May 2013 09:59:45 +0000 (06:59 -0300)]
[media] tveeprom: remove v4l2-chip-ident.h include

Replace the V4L2_IDENT_* usage with tveeprom-specific defines. This header
is deprecated, so those defines shouldn't be used anymore.
The em28xx driver is the only one that uses the tveeprom audio_processor
field, so that has been updated to use the new tveeprom AUDPROC define.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] marvell-ccic: remove g_chip_ident
Hans Verkuil [Wed, 29 May 2013 09:59:44 +0000 (06:59 -0300)]
[media] marvell-ccic: remove g_chip_ident

Remove g_chip_ident. This driver used some of the V4L2_IDENT defines, replace
those with a driver-specific enum. This makes it possible to drop the
v4l2-chip-ident.h define as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx231xx: remove g_chip_ident
Hans Verkuil [Wed, 29 May 2013 09:59:43 +0000 (06:59 -0300)]
[media] cx231xx: remove g_chip_ident

Remove g_chip_ident and replace it with g_chip_info.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] gspca: remove g_chip_ident
Hans Verkuil [Wed, 29 May 2013 09:59:42 +0000 (06:59 -0300)]
[media] gspca: remove g_chip_ident

Remove g_chip_ident and replace it with g_chip_info.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa6752hs: drop obsolete g_chip_ident
Hans Verkuil [Wed, 29 May 2013 09:59:41 +0000 (06:59 -0300)]
[media] saa6752hs: drop obsolete g_chip_ident

This op and the v4l2-chip-ident.h header are no longer needed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx23885: remove g_chip_ident
Hans Verkuil [Wed, 29 May 2013 09:59:39 +0000 (06:59 -0300)]
[media] cx23885: remove g_chip_ident

Replace g_chip_ident by g_chip_info. Note that the IR support is implemented
as a subdev, so this part no longer needs to be handled as a 'bridge' chip.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ivtv: remove g_chip_ident
Hans Verkuil [Wed, 29 May 2013 09:59:38 +0000 (06:59 -0300)]
[media] ivtv: remove g_chip_ident

g_chip_ident was used to determine if a saa7114 or saa7115 was used. Instead
just check the subdev name.
After that the g_chip_ident function can be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7115: add back the dropped 'found' message
Hans Verkuil [Wed, 29 May 2013 09:59:37 +0000 (06:59 -0300)]
[media] saa7115: add back the dropped 'found' message

The saa7115 driver used to show a 'chip found' message during probe. This
was accidentally dropped during recent commits. Add it back as it is quite
useful.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx18: remove g_chip_ident support
Hans Verkuil [Wed, 29 May 2013 09:59:36 +0000 (06:59 -0300)]
[media] cx18: remove g_chip_ident support

The av-core is really a subdev, so there is no need anymore to act as if it
is a 'second' bridge chip.
As a result of this the g_chip_ident implementation can be completely dropped.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: remove g_chip_ident from bridge drivers where it is easy to do so
Hans Verkuil [Wed, 29 May 2013 09:59:35 +0000 (06:59 -0300)]
[media] v4l2: remove g_chip_ident from bridge drivers where it is easy to do so

VIDIOC_DBG_G_CHIP_IDENT has been replaced by VIDIOC_DBG_G_CHIP_INFO. Remove
g_chip_ident support from bridge drivers since it is no longer needed.
This patch takes care of all the trivial cases.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2-ioctl: dbg_g/s_register: only match BRIDGE and SUBDEV types
Hans Verkuil [Wed, 29 May 2013 09:59:34 +0000 (06:59 -0300)]
[media] v4l2-ioctl: dbg_g/s_register: only match BRIDGE and SUBDEV types

Drop support for V4L2_CHIP_MATCH_I2C_DRIVER/ADDR and V4L2_CHIP_MATCH_AC97
types. The following patches will remove support for those in the drivers
as well.
This means that bridge drivers no longer have to check for the match.type
field in their g/s_register implementations. Only if they also implement
g_chip_info do they still have to check the match.addr field, otherwise the
core will check for that as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: i2c: ths7303: make the pdata as a constant pointer
Lad, Prabhakar [Sat, 25 May 2013 16:39:36 +0000 (13:39 -0300)]
[media] media: i2c: ths7303: make the pdata as a constant pointer

generally the pdata needs to be a constant pointer in the device
state structure. This patch makes the pdata as a constant pointer
and alongside returns -EINVAL when pdata is NULL.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: i2c: ths7303: remove unnecessary function ths7303_setup()
Lad, Prabhakar [Sat, 25 May 2013 16:39:35 +0000 (13:39 -0300)]
[media] media: i2c: ths7303: remove unnecessary function ths7303_setup()

the ths7303_setup() was doing the same thing as ths7303_setval()
except that ths7303_setval() sets it to some particular mode.
This patch removes ths7303_setup() function and calls ths7303_setval()
in the probe setting the device to 480I_576I filter mode in the probe.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: i2c: ths7303: remove init_enable option from pdata
Lad, Prabhakar [Sat, 25 May 2013 16:39:34 +0000 (13:39 -0300)]
[media] media: i2c: ths7303: remove init_enable option from pdata

This patch removes init_enable option from pdata, the init_enable
was intended that the device should start streaming video immediately
but ideally the bridge drivers should call s_stream explicitly for such
devices to start video.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata
Lad, Prabhakar [Sat, 25 May 2013 16:39:33 +0000 (13:39 -0300)]
[media] ARM: davinci: dm365 evm: remove init_enable from ths7303 pdata

Remove init_enable from ths7303 pdata as it is being dropped
from ths7303_platform_data.
The purpose of init_enable was that the device should start streaming video
immediately but instead the bridge drivers should call s_stream explicitly
for such devices. This is in fact what happens for the dm365, so setting
init_enable here never made sense in the first place.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
[hans.verkuil@cisco.com: improve the commit comment]
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-keene: add delay in order to settle hardware
Antti Palosaari [Sun, 2 Jun 2013 22:41:46 +0000 (19:41 -0300)]
[media] radio-keene: add delay in order to settle hardware

It was found by trial and error testing that at least 11 ms delay is
needed before first I/O, otherwise device will skip given command.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-keene: set initial frequency
Hans Verkuil [Sun, 2 Jun 2013 22:41:45 +0000 (19:41 -0300)]
[media] radio-keene: set initial frequency

The device was never set to the initial frequency.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ml86v7667: fix the querystd implementation
Hans Verkuil [Fri, 31 May 2013 08:15:17 +0000 (05:15 -0300)]
[media] ml86v7667: fix the querystd implementation

The *std should be set to V4L2_STD_UNKNOWN, not the function's return code.
Also, *std should be ANDed with 525_60 or 625_50.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ML86V7667: new video decoder driver
Vladimir Barinov [Wed, 29 May 2013 17:52:28 +0000 (14:52 -0300)]
[media] ML86V7667: new video decoder driver

Add OKI Semiconductor ML86V7667 video decoder driver.
[Sergei: added v4l2_device_unregister_subdev() call to the error cleanup path
of ml86v7667_probe(), renamed ml86v7667_try_mbus_fmt() to ml86v7667_mbus_fmt(),
killed v4l2_chip_match_i2c_client() checks in the [gs]_register() methods, fixed
the prototype of the s_register() method, did some cleanup.]

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] adv7180: add more subdev video ops
Vladimir Barinov [Wed, 29 May 2013 17:50:57 +0000 (14:50 -0300)]
[media] adv7180: add more subdev video ops

Add subdev video ops for ADV7180 video decoder.  This makes decoder usable on
the soc-camera drivers.
[Sergei: renamed adv7180_try_mbus_fmt() to adv7180_mbus_fmt().]

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: improve error handling
Hans Verkuil [Wed, 29 May 2013 06:55:15 +0000 (03:55 -0300)]
[media] hdpvr: improve error handling

get_video_info() should never return EFAULT, instead it should return
the low-level usb_control_msg() error. Add a valid field to the hdpvr_video_info
struct so the driver can easily check if a valid format was detected.
Whenever get_video_info is called and it returns an error (e.g. usb_control_msg
failed), then return that error to userspace as well.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: code cleanup
Hans Verkuil [Wed, 29 May 2013 06:55:14 +0000 (03:55 -0300)]
[media] hdpvr: code cleanup

Remove an unnecessary 'else' and invert a condition which makes the code
more readable.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: fix querystd 'unknown format' return
Hans Verkuil [Wed, 29 May 2013 06:55:13 +0000 (03:55 -0300)]
[media] hdpvr: fix querystd 'unknown format' return

If no format has been detected, then querystd should return V4L2_STD_UNKNOWN,
not V4L2_STD_ALL.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] smscoreapi: memory leak fix
Roberto Alcântara [Tue, 21 May 2013 19:32:30 +0000 (16:32 -0300)]
[media] smscoreapi: memory leak fix

Ensure release_firmware is called if kmalloc fails.

[mchehab@redhat.com: patch unmangled and converted from -p2 to -p1]
Signed-off-by: Roberto Alcantara <roberto@eletronica.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: Don't ignore return value of regulator_bulk_enable() in hdmi_drv.c
Sylwester Nawrocki [Mon, 10 Jun 2013 11:54:48 +0000 (08:54 -0300)]
[media] s5p-tv: Don't ignore return value of regulator_bulk_enable() in hdmi_drv.c

This patch fixes following compilation warning:
 CC [M]  drivers/media/platform/s5p-tv/hdmi_drv.o
drivers/media/platform/s5p-tv/hdmi_drv.c: In function ‘hdmi_resource_poweron’:
drivers/media/platform/s5p-tv/hdmi_drv.c:583:23: warning: ignoring return value
 of ‘regulator_bulk_enable’, declared with attribute warn_unused_result

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: Do not ignore regulator/clk API return values in sdo_drv.c
Sylwester Nawrocki [Mon, 10 Jun 2013 11:54:30 +0000 (08:54 -0300)]
[media] s5p-tv: Do not ignore regulator/clk API return values in sdo_drv.c

This patch fixes following compilation warning:
drivers/media/platform/s5p-tv/sdo_drv.c: In function ‘sdo_runtime_resume’:
drivers/media/platform/s5p-tv/sdo_drv.c:268:18: warning: ignoring return value of ‘regulator_enable’,
  declared with attribute warn_unused_result
drivers/media/platform/s5p-tv/sdo_drv.c:269:18: warning: ignoring return value of ‘regulator_enable’,
  declared with attribute warn_unused_result

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: Don't ignore return value of regulator_enable() in sii9234_drv.c
Sylwester Nawrocki [Mon, 10 Jun 2013 11:54:15 +0000 (08:54 -0300)]
[media] s5p-tv: Don't ignore return value of regulator_enable() in sii9234_drv.c

This patch fixes following compilation warning:
  CC [M]  drivers/media/platform/s5p-tv/sii9234_drv.o
drivers/media/platform/s5p-tv/sii9234_drv.c: In function ‘sii9234_runtime_resume’:
drivers/media/platform/s5p-tv/sii9234_drv.c:252:18: warning: ignoring return
  value of ‘regulator_enable’, declared with attribute warn_unused_result

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Extend link_notify handler to support fimc-is/lite pipelines
Sylwester Nawrocki [Fri, 31 May 2013 13:37:27 +0000 (10:37 -0300)]
[media] exynos4-is: Extend link_notify handler to support fimc-is/lite pipelines

This patch corrects the link_notify handler to support more complex
pipelines, including fimc-lite and fimc-is entities.
After the FIMC-IS driver addition the assumptions made in the link_notify
callback are no longer valid, e.g. the link between fimc-lite subdev and
its video node is not immutable any more and there is more subdevs than
just sensor, MIPI-CSIS and FIMC(-LITE).
The graph is now walked and for each video node found a media pipeline
which ends at this node is disabled/enabled (the subdevs are powered
on/off).

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: Change media device link_notify behaviour
Sylwester Nawrocki [Fri, 31 May 2013 13:37:26 +0000 (10:37 -0300)]
[media] media: Change media device link_notify behaviour

Currently the media device link_notify callback is invoked before the
actual change of state of a link when the link is being enabled, and
after the actual change of state when the link is being disabled.
This doesn't allow a media device driver to perform any operations
on a full graph before a link is disabled, as well as performing
any tasks on a modified graph right after a link's state is changed.
This patch modifies signature of the link_notify callback. This
callback is now called always before and after a link's state change.
To distinguish the notifications a 'notification' argument is added
to the link_notify callback: MEDIA_DEV_NOTIFY_PRE_LINK_CH indicates
notification before link's state change and
MEDIA_DEV_NOTIFY_POST_LINK_CH corresponds to a notification after
link flags change.

[mchehab@redhat.com: whitespace cleanups]
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Add isp_dbg() macro
Sylwester Nawrocki [Fri, 31 May 2013 16:47:04 +0000 (13:47 -0300)]
[media] exynos4-is: Add isp_dbg() macro

Add a debug trace macro for the FIMC-IS ISP subdev and the ISP video
node drivers which are going to be added in subsequent patches.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Move __fimc_videoc_querycap() function to the common module
Sylwester Nawrocki [Fri, 31 May 2013 16:47:03 +0000 (13:47 -0300)]
[media] exynos4-is: Move __fimc_videoc_querycap() function to the common module

Move __fimc_videoc_querycap() function to the common exynos4-is-common.ko
module so it don't need to be reimplemented in multiple video node drivers
of the exynos4-is.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Refactor vidioc_s_fmt, vidioc_try_fmt handlers
Sylwester Nawrocki [Fri, 31 May 2013 16:47:02 +0000 (13:47 -0300)]
[media] exynos4-is: Refactor vidioc_s_fmt, vidioc_try_fmt handlers

Remove duplicated code in the vidioc_try_fmt and vidioc_s_fmt handlers.
This is a pre-requsite to allow successful fimc.capture video open even
if its corresponding media entities are not linked into a complete
pipeline.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Remove unused code
Sylwester Nawrocki [Fri, 31 May 2013 16:47:01 +0000 (13:47 -0300)]
[media] exynos4-is: Remove unused code

Remove unused macros and fields of struct fimc_is_video.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Simplify bitmask usage
Phil Carmody [Fri, 31 May 2013 16:47:00 +0000 (13:47 -0300)]
[media] exynos4-is: Simplify bitmask usage

Merge the two sets of flags into one array to simplify accessing
arbitrary bits from them.

Signed-off-by: Phil Carmody <phil.carmody@partner.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Remove leftovers of non-dt FIMC-LITE support
Sylwester Nawrocki [Fri, 31 May 2013 16:46:59 +0000 (13:46 -0300)]
[media] exynos4-is: Remove leftovers of non-dt FIMC-LITE support

FIMC-LITE devices are never looked up by iterating over all platform
devices with bus_for_each_device() as these IP blocks are available
only on dt-only Exynos SoC platforms.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Add locking at fimc(-lite) subdev unregistered handler
Sylwester Nawrocki [Fri, 31 May 2013 14:37:25 +0000 (11:37 -0300)]
[media] exynos4-is: Add locking at fimc(-lite) subdev unregistered handler

Protect the fimc/fimc-lite video nodes unregistration with their video
lock. This prevents a kernel crash when e.g. udev opens a video node
right after the driver registers it and then the driver tries to
unregister it and defers its probing. Using video_is_unregistered()
together with the video mutex allows safe unregistration of the video
nodes at any time.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Fix sensor subdev -> FIMC notification setup
Sylwester Nawrocki [Fri, 31 May 2013 14:37:24 +0000 (11:37 -0300)]
[media] exynos4-is: Fix sensor subdev -> FIMC notification setup

Ensure the v4l2_device notifications from sensor subdev works
also after the media links reconfiguration.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Remove WARN_ON() from __fimc_pipeline_close()
Sylwester Nawrocki [Fri, 31 May 2013 14:37:23 +0000 (11:37 -0300)]
[media] exynos4-is: Remove WARN_ON() from __fimc_pipeline_close()

It's not a critical error to call __fimc_pipeline_close() with missing
sensor subdev entity. Replace WARN_ON() with pr_warn() and return 0
instead of -EINVAL to fix control flow in some conditions.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Use common exynos_media_pipeline data structure
Sylwester Nawrocki [Fri, 31 May 2013 14:37:22 +0000 (11:37 -0300)]
[media] exynos4-is: Use common exynos_media_pipeline data structure

This enumeration is now private to exynos4-is and the exynos5 camera
subsystem driver may have the subdevs handling designed differently.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Do not use asynchronous runtime PM in release fop
Sylwester Nawrocki [Fri, 31 May 2013 14:37:21 +0000 (11:37 -0300)]
[media] exynos4-is: Do not use asynchronous runtime PM in release fop

Use pm_runtime_put_sync() instead of pm_runtime_put() to avoid races
in handling the 'state' bit flags when the fimc-capture drivers'
runtime_resume callback is called from the PM workqueue.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Media graph/video device locking rework
Sylwester Nawrocki [Fri, 31 May 2013 14:37:20 +0000 (11:37 -0300)]
[media] exynos4-is: Media graph/video device locking rework

Remove driver private video node reference counters and use entity->use_count
instead. This makes the video pipelines power handling more similar to the
method used in omap3isp driver.
Now the graph mutex is taken always after the video mutex, as it is not
possible to ensure apposite order at the all modules.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Preserve state of controls between /dev/video open/close
Sylwester Nawrocki [Fri, 31 May 2013 14:37:19 +0000 (11:37 -0300)]
[media] exynos4-is: Preserve state of controls between /dev/video open/close

This patch moves the code for inheriting subdev v4l2 controls on the
FIMC video capture nodes from open()/close() fops to the link setup
notification callback. This allows for the state of the FIMC controls
to be always kept, in opposite to the current situation when it is
lost when last process closes video device.
There is no visible change for the original V4L2 compliant interface.
For the MC aware applications (user_subdev_api == true) inheriting
of the controls is dropped, since there can be same controls on the
subdevs withing single pipeline, now when the ISP (FIMC-IS) is also
used.
This patch is a prerequisite to allow /dev/video device to be opened
without errors even if there is no media links connecting it to an
image source (sensor) subdev. This is required for a libv4l2 plugin
to be initialized while a video node is opened and it also should be
possible to always open the device to query the capabilities.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Add struct exynos_video_entity
Sylwester Nawrocki [Fri, 31 May 2013 14:37:18 +0000 (11:37 -0300)]
[media] exynos4-is: Add struct exynos_video_entity

This patch introduces common structure for the video entities
to handle all video nodes and media pipelines associated with
them in more generic way.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Move common functions to a separate module
Sylwester Nawrocki [Mon, 10 Jun 2013 11:51:44 +0000 (08:51 -0300)]
[media] exynos4-is: Move common functions to a separate module

Create a common module (exynos4-is-common.ko) for common functions
used across the exynos4-is video device and subdev drivers.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5c73m3: Do not ignore errors from regulator_enable()
Sylwester Nawrocki [Fri, 31 May 2013 22:43:35 +0000 (19:43 -0300)]
[media] s5c73m3: Do not ignore errors from regulator_enable()

This fixes following compilation warning:
drivers/media/i2c/s5c73m3/s5c73m3-core.c: In function ‘__s5c73m3_power_off’:
drivers/media/i2c/s5c73m3/s5c73m3-core.c:1389:19: warning: ignoring return value
of ‘regulator_enable’, declared with attribute warn_unused_result

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Staticize local symbols
Sachin Kamat [Tue, 16 Apr 2013 05:02:21 +0000 (02:02 -0300)]
[media] exynos4-is: Staticize local symbols

These symbols are used only in their respective files and hence
should be made static.
[s.nawrocki@samsung.com: dropped the __fimc_is_hw_update_param()
 function change]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-mfc: Remove redundant use of of_match_ptr macro
Sachin Kamat [Thu, 23 May 2013 03:51:19 +0000 (00:51 -0300)]
[media] s5p-mfc: Remove redundant use of of_match_ptr macro

'exynos_mfc_match' is always compiled in. Hence of_match_ptr
is unnecessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos-gsc: Remove redundant use of of_match_ptr macro
Sachin Kamat [Thu, 23 May 2013 03:51:18 +0000 (00:51 -0300)]
[media] exynos-gsc: Remove redundant use of of_match_ptr macro

This is a DT only driver and exynos_gsc_match is always compiled
in. Hence of_match_ptr is unnecessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in mixer_drv.c
Sachin Kamat [Fri, 17 May 2013 03:31:02 +0000 (00:31 -0300)]
[media] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in mixer_drv.c

NULL check on clocks obtained using common clock APIs should not
be done. Use IS_ERR only.
[s.nawrocki: removed unrelated whitespace change]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in hdmi_drv.c
Sachin Kamat [Fri, 17 May 2013 03:31:01 +0000 (00:31 -0300)]
[media] s5p-tv: Fix incorrect usage of IS_ERR_OR_NULL in hdmi_drv.c

NULL check on clocks obtained using common clock APIs should not
be done. Use IS_ERR only.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Correct querycap ioctl handling at fimc-lite driver
Sylwester Nawrocki [Tue, 30 Apr 2013 12:27:53 +0000 (09:27 -0300)]
[media] exynos4-is: Correct querycap ioctl handling at fimc-lite driver

Fill in properly bus_info and card fields and set device_caps.
The querycap ioctl handler is renamed for consistency with the
other ioctls.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Remove platform_device_id table at fimc-lite driver
Sylwester Nawrocki [Tue, 30 Apr 2013 12:27:08 +0000 (09:27 -0300)]
[media] exynos4-is: Remove platform_device_id table at fimc-lite driver

The driver id_table is unused since all SoCs containing the FIMC-LITE
IP block have been dt-only. Just remove it.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Fix example dts in .../bindings/samsung-fimc.txt
Sylwester Nawrocki [Wed, 8 May 2013 17:24:14 +0000 (14:24 -0300)]
[media] exynos4-is: Fix example dts in .../bindings/samsung-fimc.txt

The s5c73m3 sensor node should be off an I2C bus controller node.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: fix error return code in mxr_acquire_video()
Wei Yongjun [Mon, 13 May 2013 04:49:13 +0000 (01:49 -0300)]
[media] s5p-tv: fix error return code in mxr_acquire_video()

Fix to return a negative error code in the vb2_dma_contig_init_ctx()
error handling case instead of 0, as done elsewhere in this function.
Also vb2_dma_contig_init_ctx() return ERR_PTR() in case of error and
never return NULL, so use IS_ERR() replace IS_ERR_OR_NULL().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s3c-camif: Remove redundant NULL check
Sachin Kamat [Tue, 30 Apr 2013 05:16:18 +0000 (02:16 -0300)]
[media] s3c-camif: Remove redundant NULL check

clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
to IS_ERR only.
[s.nawrocki: added initialisation of the clock array to ERR_PTR() value]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] exynos4-is: Remove redundant NULL check in fimc-lite.c
Sachin Kamat [Tue, 30 Apr 2013 03:51:33 +0000 (00:51 -0300)]
[media] exynos4-is: Remove redundant NULL check in fimc-lite.c

clk_unprepare checks for NULL pointer. Hence convert IS_ERR_OR_NULL
to IS_ERR only.
[s.nawrocki: replaced initialisations to NULL with ERR_PTR() value]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5c73m3: Fix whitespace related warnings
Sachin Kamat [Tue, 30 Apr 2013 08:04:09 +0000 (05:04 -0300)]
[media] s5c73m3: Fix whitespace related warnings

Silences the following type of warning:
WARNING: space prohibited before semicolon

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s3c-camif: Use dev_info instead of printk
Sachin Kamat [Tue, 30 Apr 2013 05:16:21 +0000 (02:16 -0300)]
[media] s3c-camif: Use dev_info instead of printk

dev_info is preferred to printk. Silences the related checkpatch
warning.
WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ...
then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s3c-camif: Staticize local symbols
Sachin Kamat [Tue, 30 Apr 2013 05:16:20 +0000 (02:16 -0300)]
[media] s3c-camif: Staticize local symbols

These symbols are local to the file and should be static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: info leak in __media_device_enum_links()
Dan Carpenter [Sat, 13 Apr 2013 09:32:15 +0000 (06:32 -0300)]
[media] media: info leak in __media_device_enum_links()

These structs have holes and reserved struct members which aren't
cleared.  I've added a memset() so we don't leak stack information.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: ccp2: Don't ignore the regulator_enable() return value
Laurent Pinchart [Wed, 29 May 2013 03:47:41 +0000 (00:47 -0300)]
[media] omap3isp: ccp2: Don't ignore the regulator_enable() return value

Check the return value and catch errors correctly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: Defer probe when the IOMMU is not available
Laurent Pinchart [Mon, 11 Mar 2013 15:02:13 +0000 (12:02 -0300)]
[media] omap3isp: Defer probe when the IOMMU is not available

When the OMAP3 ISP driver is compiled in the kernel the device can be
probed before the corresponding IOMMU is available. Defer the probe in
that case, and fix a crash in the error path.

Reported-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: include linux/mm_types.h
Arnd Bergmann [Fri, 31 May 2013 22:22:50 +0000 (19:22 -0300)]
[media] omap3isp: include linux/mm_types.h

The ispqueue.h file uses vm_flags_t, which is defined in
linux/mm_types.h, so we must include that header in order
to build in all configurations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: Remove redundant platform_set_drvdata()
Sachin Kamat [Mon, 13 May 2013 09:17:54 +0000 (06:17 -0300)]
[media] omap3isp: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: Remove most 80-cols checkpatch warnings
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:51 +0000 (11:47 -0300)]
[media] drxk_hard: Remove most 80-cols checkpatch warnings

X-Patchwork-Delegate: mchehab@redhat.com
There are a few cases where breaking the code into separate
lines make it worse to read. However, on several places,
breaking it to make checkpatch.pl happier is OK and improves
code readability.
So, break longer lines where that won't cause harm.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: remove needless parenthesis
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:50 +0000 (11:47 -0300)]
[media] drxk_hard: remove needless parenthesis

X-Patchwork-Delegate: mchehab@redhat.com
There are several places where: state->var = (some_var)
The parenthesis there are doing nothing but making it
harder to read and breaking the 80 columns soft limits.
Just get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard.h: don't use more than 80 columns
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:49 +0000 (11:47 -0300)]
[media] drxk_hard.h: don't use more than 80 columns

X-Patchwork-Delegate: mchehab@redhat.com
Almost all 80-col warnings are related to comments. There's
one, however, that it is due to a one-line enum declaration
for enum agc_ctrl_mode.
Break it into one line per enumered data.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard.h: Remove some alien comment markups
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:48 +0000 (11:47 -0300)]
[media] drxk_hard.h: Remove some alien comment markups

X-Patchwork-Delegate: mchehab@redhat.com
The comments markup language used on Kernel is defined at:
Documentation/kernel-doc-nano-HOWTO.txt
Remove invalid markups from the header file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: use usleep_range()
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:47 +0000 (11:47 -0300)]
[media] drxk_hard: use usleep_range()

X-Patchwork-Delegate: mchehab@redhat.com
Fixes the following checkpatch.pl warnings:
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(10);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
+ msleep(1);

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: don't split strings across lines
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:46 +0000 (11:47 -0300)]
[media] drxk_hard: don't split strings across lines

X-Patchwork-Delegate: mchehab@redhat.com
WARNING: quoted string split across lines
#5416: FILE: media/dvb-frontends/drxk_hard.c:5416:
+ dprintk(1, "Could not set demodulator parameters. Make "
+ "sure qam_demod_parameter_count (%d) is correct for "
WARNING: quoted string split across lines
#5423: FILE: media/dvb-frontends/drxk_hard.c:5423:
+ dprintk(1, "Auto-probing the correct QAM demodulator command "
+ "parameters was successful - using %d parameters.\n",

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: use pr_info/pr_warn/pr_err/... macros
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:45 +0000 (11:47 -0300)]
[media] drxk_hard: use pr_info/pr_warn/pr_err/... macros

X-Patchwork-Delegate: mchehab@redhat.com
replace all occurrences of  printk(KERN_* by
pr_info/pr_warn/pr_err/pr_debug/pr_cont macros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: Don't use CamelCase
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:44 +0000 (11:47 -0300)]
[media] drxk_hard: Don't use CamelCase

X-Patchwork-Delegate: mchehab@redhat.com
Thare are lots of CamelCase warnings produced by checkpatch.pl.
This weren't fixed at the time the driver got submitted due
to the lack of manpower do to such cleanup.
Now that I have one script that automates this task, cleans
it. That makes the driver almost checkpatch-compliant,
except for 80 column warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxk_hard: don't re-implement log10
Mauro Carvalho Chehab [Sun, 28 Apr 2013 14:47:43 +0000 (11:47 -0300)]
[media] drxk_hard: don't re-implement log10

X-Patchwork-Delegate: mchehab@redhat.com
Log10 routine is already defined at dvb_math.h and provides a good
enough approximation for 100 x log10(). So, instead of reinventing
the wheel, use the already existing function.
While here, don't use CamelCase on the function name.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: correct latest device name
Antti Palosaari [Tue, 4 Jun 2013 22:43:30 +0000 (19:43 -0300)]
[media] rtl28xxu: correct latest device name

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Add support for Crypto Redi PC50A device (rtl2832u + FC0012 tuner)
Alessandro Miceli [Tue, 4 Jun 2013 19:10:34 +0000 (16:10 -0300)]
[media] Add support for Crypto Redi PC50A device (rtl2832u + FC0012 tuner)

The device has been tested on a MIPSel box with kernel 3.1.1 and backported media_tree drivers
The kernel detects the device with the following output:
usbcore: registered new interface driver dvb_usb_rtl28xxu
usb 1-2: dvb_usb_v2: found a 'Crypto Redi PC50A' in warm state
usb 1-2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Crypto Redi PC50A)
usb 1-2: DVB: registering adapter 1 frontend 0 (Realtek RTL2832 (DVB-T))...
i2c i2c-4: fc0012: Fitipower FC0012 successfully identified
usb 1-2: dvb_usb_v2: 'Crypto Redi PC50A' successfully initialized and connected

[crope@iki.fi: fix trivial merge conflict]
Signed-off-by: Alessandro Miceli <angelofsky1980@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: use masked reg write where possible
Antti Palosaari [Tue, 4 Jun 2013 21:26:54 +0000 (18:26 -0300)]
[media] rtl28xxu: use masked reg write where possible

Use masked register write inside rtl2832u_power_ctrl().

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: map remote for TerraTec Cinergy T Stick Black
Antti Palosaari [Tue, 4 Jun 2013 20:24:06 +0000 (17:24 -0300)]
[media] rtl28xxu: map remote for TerraTec Cinergy T Stick Black

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: correct some device names
Antti Palosaari [Tue, 4 Jun 2013 20:01:25 +0000 (17:01 -0300)]
[media] rtl28xxu: correct some device names

... just because I want to be perfect ;)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: Add USB ID for Leadtek WinFast DTV Dongle mini
Miroslav Šustek [Tue, 14 May 2013 22:42:11 +0000 (19:42 -0300)]
[media] rtl28xxu: Add USB ID for Leadtek WinFast DTV Dongle mini

USB ID 0413:6a03 is Leadtek WinFast DTV Dongle mini.
Decoder Realtek RTL2832U and tuner Infineon TUA9001.

Signed-off-by: Miroslav Šustek <sustmidown@centrum.cz>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: remove redundant IS_ENABLED macro
Antti Palosaari [Tue, 4 Jun 2013 19:50:54 +0000 (16:50 -0300)]
[media] rtl28xxu: remove redundant IS_ENABLED macro

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl28xxu: reimplement rtl2832u remote controller
Antti Palosaari [Tue, 4 Jun 2013 12:17:03 +0000 (09:17 -0300)]
[media] rtl28xxu: reimplement rtl2832u remote controller

Thanks to Rodrigo for original implementation!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rtl2832u: restore ir remote control support
Rodrigo Tartajo [Sat, 20 Apr 2013 23:02:12 +0000 (20:02 -0300)]
[media] rtl2832u: restore ir remote control support

Hi,
This patch uses the driver from openpli[1] as a template to restore the remote control support.
I had to divert from the original to use the in kernel rc protocol decoder. The key repetition does,
not seem to work but I cant find the problem in the driver. As a raw rc provider, no key table is
hardcoded.
Rodrigo.
[1]: https://aur.archlinux.org/packages/dvb-usb-rtl2832u-openpli/?comments=all

Signed-off-by: Rodrigo Tartajo <rtarty@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: Rename media_entity_remote_source to media_entity_remote_pad
Andrzej Hajda [Mon, 3 Jun 2013 08:16:13 +0000 (05:16 -0300)]
[media] media: Rename media_entity_remote_source to media_entity_remote_pad

Function media_entity_remote_source actually returns the remote pad to
the given one, regardless if this is the source or the sink pad.
Name media_entity_remote_pad is more adequate for this function.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: correct TS mode handling
Antti Palosaari [Mon, 3 Jun 2013 22:39:51 +0000 (19:39 -0300)]
[media] af9035: correct TS mode handling

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: minor log writing changes
Antti Palosaari [Mon, 3 Jun 2013 21:50:43 +0000 (18:50 -0300)]
[media] af9035: minor log writing changes

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: make checkpatch.pl happy!
Antti Palosaari [Mon, 3 Jun 2013 21:42:14 +0000 (18:42 -0300)]
[media] af9035: make checkpatch.pl happy!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] af9035: implement I2C adapter read operation
Antti Palosaari [Mon, 11 Mar 2013 22:05:39 +0000 (19:05 -0300)]
[media] af9035: implement I2C adapter read operation

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Add support for 'Digital Dual TV Receiver CTVDIGDUAL v2
Alessandro Miceli [Fri, 3 May 2013 18:58:21 +0000 (15:58 -0300)]
[media] Add support for 'Digital Dual TV Receiver CTVDIGDUAL v2

Tested on a MIPSel box with 3.3.6 kernel
The kernel output when the device will be detected follows:
usbcore: registered new interface driver dvb_usb_it913x
it913x: Chip Version=01 Chip Type=9135
it913x: Remote propriety (raw) mode
it913x: Dual mode=3 Tuner Type=38
it913x: Chip Version=01 Chip Type=9135
usb 2-1: dvb_usb_v2: found a 'Digital Dual TV Receiver CTVDIGDUAL_V2' in cold state
usb 2-1: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9137-01.fw'
it913x: FRM Starting Firmware Download
it913x: FRM Firmware Download Completed - Resetting Device
it913x: Chip Version=01 Chip Type=9135
it913x: Firmware Version 204147968
usb 2-1: dvb_usb_v2: found a 'Digital Dual TV Receiver CTVDIGDUAL_V2' in warm state
usb 2-1: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Digital Dual TV Receiver CTVDIGDUAL_V2)
it913x-fe: ADF table value      :00
it913x-fe: Crystal Frequency :12000000 Adc Frequency :20250000 ADC X2: 00
it913x-fe: Tuner LNA type :38
usb 2-1: DVB: registering adapter 1 frontend 0 (Digital Dual TV Receiver CTVDIGDUAL_V2_1)...
usb 2-1: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
DVB: registering new adapter (Digital Dual TV Receiver CTVDIGDUAL_V2)
it913x-fe: ADF table value      :00
it913x-fe: Crystal Frequency :12000000 Adc Frequency :20250000 ADC X2: 00
it913x-fe: Tuner LNA type :38
usb 2-1: DVB: registering adapter 2 frontend 0 (Digital Dual TV Receiver CTVDIGDUAL_V2_2)...
usb 2-1: dvb_usb_v2: 'Digital Dual TV Receiver CTVDIGDUAL_V2' successfully initialized and connected
RC part not tested

Signed-off-by: Alessandro Miceli <angelofsky1980@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: sign of CRL_FREQ doesn't depend on inversion
Reinhard Nißl [Sun, 2 Jun 2013 18:03:13 +0000 (15:03 -0300)]
[media] stb0899: sign of CRL_FREQ doesn't depend on inversion

Contrary to CFR (derotator frequency), which changes signedness
depending on inversion, CRL_FREQ does not.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: use autodetected inversion instead of configured inversion
Reinhard Nißl [Sun, 2 Jun 2013 18:02:05 +0000 (15:02 -0300)]
[media] stb0899: use autodetected inversion instead of configured inversion

For consistency, it is necessary to use the autodetected inversion
instead of the configured one.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: store autodetected inversion while tuning in non S2 mode
Reinhard Nißl [Sun, 2 Jun 2013 18:01:18 +0000 (15:01 -0300)]
[media] stb0899: store autodetected inversion while tuning in non S2 mode

In non S2 mode, the device is able to autodetect inversion. So
let's store it for tuning to S2 transponders.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: store successful inversion for next run
Reinhard Nißl [Sun, 2 Jun 2013 17:59:00 +0000 (14:59 -0300)]
[media] stb0899: store successful inversion for next run

Usually, inversion doesn't change in a system. Storing the last
successful inversion value speeds up tuning of DVB-S2 transponders.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: allow minimum symbol rate of 2000000
Zoran Turalija [Sun, 2 Jun 2013 17:56:33 +0000 (14:56 -0300)]
[media] stb0899: allow minimum symbol rate of 2000000

Looks like product datasheets for tuners containing STB0899 are
suggesting specification for min. symbol rate of 2MS/s.
Some specs found here, all suggesting 2MS/s for min. symbol rate:
    Comtech DVBS2-6899
      http://comtech.sg1002.myweb.hinet.net/pdf/dvbs2-6899.pdf
    TechniSat SkyStar HD2
      http://www.scaistar.com/skystar2/skystarhd2.htm
    Azurewave AD-SP400
      http://www.pulsat.com/products/AzureWave-AD%252dSP400-High-Definition-PC-Card.html
New patch:
This makes minimum symbol rate driver capabilities on par with some
accessible datasheet specifications*, and allows tuning on linux to
transponders that have symbol rate between 2000000-5000000, too.
Patch was tested successfully on Eutelsat 16A transponders that
became reachable with it (2000000 < symbol rate < 5000000):
      * DVB/S  12507050 V  2532000 3/4
      * DVB/S2 12574000 V  4355000 3/4 8PSK
      * DVB/S  12593000 V  2500000 2/3
      * DVB/S  12596940 V  2848000 2/3
      * DVB/S  12600750 V  2500000 1/2
      * DVB/S  12675590 H  4248000 3/4
(*) Datasheet: http://comtech.sg1002.myweb.hinet.net/pdf/dvbs2-6899.pdf
        Maximum Symbol Rate
        QPSK/LDPC/PCH: 20-30Mbps
        8PSK/LDPC/BCH: 10-30Mbps
        DVB: 2-45Mbps
             ^--------- min. symbol rate

Signed-off-by: Zoran Turalija <zoran.turalija@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: fix inversion enum values to match usage with CFR
Reinhard Nißl [Sun, 2 Jun 2013 17:52:43 +0000 (14:52 -0300)]
[media] stb0899: fix inversion enum values to match usage with CFR

Throughout the zig-zag-implementations, inversion is taken into
account when reading and writing the CFR register, which contains
the derotator frequency. As swapping IQ signals changes the sign
of that register for example, the idea is to compensate that sign
change by multiplying the register value with the inversion enum
value.
The current enum values 0 and 1 for IQ_SWAP_OFF and IQ_SWAP_ON
don't work in the case IQ_SWAP_OFF, due to the multiplication by
zero (I've only found a single device which actually uses
IQ_SWAP_OFF in it's config).
I've changed the enum values to +1 and -1 to accommodate to the
intended usage.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: enable auto inversion handling unconditionally
Reinhard Nißl [Sun, 2 Jun 2013 17:52:02 +0000 (14:52 -0300)]
[media] stb0899: enable auto inversion handling unconditionally

It seems that current inversion handling addresses only the signal
routing on the PCB, i. e. IQ signals are either swapped or not.
But when the device is operated in a Satellite Channel Router (SCR)
environment, an additional inversion is required due to the way how
the SCR works. Therefore it makes sense to me to always enable auto
inversion handling and drop the enum value IQ_SWAP_AUTO.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: allow minimum symbol rate of 1000000
Zoran Turalija [Sun, 2 Jun 2013 17:40:51 +0000 (14:40 -0300)]
[media] stb0899: allow minimum symbol rate of 1000000

This makes minimum symbol rate driver capabilities on par with
windows driver, and allows tuning on linux to transponders that
have symbol rate below 5000000, too.
Patch was tested successfully on Eutelsat 16A transponders that
became reachable with it (1000000 < symbol rate < 5000000):
      * DVB/S  12507050 V  2532000 3/4
      * DVB/S2 12574000 V  4355000 3/4 8PSK
      * DVB/S  12593000 V  2500000 2/3
      * DVB/S  12596940 V  2848000 2/3
      * DVB/S  12600750 V  2500000 1/2
      * DVB/S  12675590 H  4248000 3/4

Signed-off-by: Zoran Turalija <zoran.turalija@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stb0899: sign extend raw CRL_FREQ value
Reinhard Nißl [Sun, 2 Jun 2013 17:37:06 +0000 (14:37 -0300)]
[media] stb0899: sign extend raw CRL_FREQ value

Contrary to the chip's specs, the register's value is signed, so we
need to sign extend the value before using it in calculations like
when determining the offset frequency.

Signed-off-by: Reinhard Nißl <rnissl@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>