Commit Graph

13912 Commits

Author SHA1 Message Date
Hans Verkuil 6ba4c432dc [media] cx88: fix firmware load on big-endian systems
Tested with a HVR-1300.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 18:14:08 -03:00
Hans Verkuil 42d0c3ad28 [media] cx18: support big-endian systems
base_addr has type resource_size_t, which may be 64 bits.

Also fix a few endian issues related to mailboxes and firmware loading.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 18:13:57 -03:00
Hans Verkuil 1c36dfc5c5 [media] ivtv: fix support for big-endian systems
base_addr has type resource_size_t, which may be 64 bits on a 32-bit ppc.

Tested on my ppc board.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 18:13:27 -03:00
Hans Verkuil c44ff8fa02 [media] tuner-core: return the frequency range of the correct tuner
The frequency range of the current tuner (radio or TV) was returned
instead of the frequency range of the requested tuner (which depends
on the device node).

This bug caused the frequency range of the radio tuner to be returned
when G_TUNER was called on a video node.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 18:12:56 -03:00
Hans Verkuil a5ee6e41b2 [media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
The field current_norm does not have to be set for g_parm to be a valid
ioctl. Remove that check, but add a check whether this is a video node
instead as g_parm only makes sense for those nodes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 18:11:40 -03:00
Hans Verkuil 0c142c8699 [media] v4l2-ioctl: set readbuffers to 2 in g_parm
If g_parm is handled automatically, then set readbuffers to 2, which is the
minimum number of buffers videobuf uses.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 18:09:33 -03:00
Michael Krufky 3e1141e2ce [media] smsusb: add autodetection support for USB ID 2040:f5a0
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:12:35 -03:00
Hans Verkuil f9ac50c244 [media] vino: fix compiler warnings
v4l-dvb-git/drivers/media/video/vino.c: In function 'vino_acquire_input':
v4l-dvb-git/drivers/media/video/vino.c:2602:18: warning: 'data_norm' may be used uninitialized in this function [-Wuninitialized]
v4l-dvb-git/drivers/media/video/vino.c: In function 'vino_set_input':
v4l-dvb-git/drivers/media/video/vino.c:2690:19: warning: 'data_norm' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:09:31 -03:00
Hans Verkuil 91e0cd499f [media] cx24110: fix compiler warning
v4l-dvb-git/drivers/media/dvb/frontends/cx24110.c: In function ‘cx24110_read_ucblocks’:
v4l-dvb-git/drivers/media/dvb/frontends/cx24110.c:520:40: warning: value computed is not used [-Wunused-value]

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:09:04 -03:00
Hans Verkuil 5cd0b50fdd [media] saa7146_fops: remove unused variable
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:08:21 -03:00
Jean-Francois Moine f9798ef634 [media] gspca - sonixj: Fix bad values of webcam 0458:7025
The webcam 0458:7025 (Eye911Q) has:
- an inverted power pin,
- a sensor mi0360b which cannot be probed.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:07:04 -03:00
Jean-Francois Moine f19ed98111 [media] gspca - ov534/ov534_9: Fix sccd_read/write errors
The ov534 bridge is too slow to handle the sensor accesses
requested by fast hosts giving 'sccb_reg_write failed'.
A small delay fixes the problem.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:06:50 -03:00
Hans de Goede af05ef01e9 [media] gspca-core: Fix buffers staying in queued state after a stream_off
This fixes a regression introduced by commit f7059ea and should be
backported to all supported stable kernels which have this commit.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Antonio Ospite <ospite@studenti.unina.it>
CC: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:06:35 -03:00
Antonio Ospite cf3c1c3195 [media] gspca_ov534: make AGC and AWB controls independent
Even if the best results are indeed achieved with both AGC and AWB
enabled, the webcam is capable of setting these independently, and the
user can see the difference of any of the 4 combinations of these two
boolean controls.

Removing the dependency from one another simplifies the code and gives
more control to the user.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:06:15 -03:00
Hans de Goede bc378feeda [media] gscpa_sn9c20x: Move clustering of controls to after error checking
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:05:59 -03:00
Hans de Goede b6fc2eb965 [media] gspca_pac7311: Correct number of controls
This avoids the need for a re-alloc during init.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:05:43 -03:00
Hans de Goede 7025e521b1 [media] bttv: The Hauppauge 61334 needs the msp3410 to do radio demodulation
The (radio) audio out from the tuner (which can also demod FM radio) does not
seem to be hooked up to the msp3410 on this board in any way, so the only way
to get sound from the radio part is to make the msp3410 do the FM radio demod.

The msp3410 can handle this fine, but it is a bit weird compared to how it
is handled on other boards.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:05:32 -03:00
Hans de Goede 792a21b0de [media] bttv: Remove unused needs_tvaudio card variable
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:05:05 -03:00
Hans de Goede 5c164646e2 [media] bttv: Use btv->has_radio rather then the card info when registering the tuner
bttv_init_card2() sets btv->has_audio to a *default* value from the tvcards
array and then may update it by reading a card specific eeprom or gpio
detection.

After bttv_init_card2(), bttv_init_tuner() gets called, and it should clearly
use the updated, dynamic has_radio value from btv->has_radio, rather then
the const value in the tvcards array.

This fixes the radio not working on my Hauppauge WinTV.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:04:49 -03:00
Hans de Goede 5daf53a6eb [media] snd_tea575x: Make the module using snd_tea575x the fops owner
Before this patch the owner field of the /dev/radio# device fops was set to
the snd-tea575x-tuner module itself. Meaning that the module which was using
it could be rmmod-ed while the device is open, and then BAD things happen.

I know, as I found out the hard way :)

Note that there is no need to also somehow increase the refcount of the
snd-tea575x-tuner module itself, since any drivers using it will have
symbolic references to it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
CC: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:02:54 -03:00
Hans de Goede 110301833d [media] radio/si470x: Add support for the Axentia ALERT FM USB Receiver
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 16:02:05 -03:00
Michael Krufky bffaecc75c [media] lg2160: fix off-by-one error in lg216x_write_regs
Fix an off-by-one error in lg216x_write_regs, causing the last element
of the lg216x init block to be ignored.  Spotted by Dan Carpenter.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 15:59:16 -03:00
Hans Verkuil 0b5dabedcc [media] Fix query/enum_dv_timings regression
Now query/enum_dv_timings finally work again.

The timings API patches and the core ioctl changes clearly sailed right past
each other without realizing that both needed to adapt to the other.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 15:48:22 -03:00
Hans Verkuil d9762df4a9 [media] Fix vivi regression
This patch fixes a regression introduced by commit
5126f2590bee412e3053de851cb07f531e4be36a:

[media] v4l2-dev: add flag to have the core lock all file operations

I forgot to add the locks to the vivi read operation.

Regards,

	Hans

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-06-11 15:16:29 -03:00
Linus Torvalds 2795343705 arm-soc: clock driver changes
The new clock subsystem was merged in linux-3.4 without any users, this
 now moves the first three platforms over to it: imx, mxs and spear.
 
 The series also contains the changes for the clock subsystem itself,
 since Mike preferred to have it together with the platforms that require
 these changes, in order to avoid interdependencies and conflicts.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPuexPAAoJEIwa5zzehBx3YBsP/0nFhXjb5t1PdLfFzGKtcZVB
 j4zXWXMHQ1fA7wIfEpZF3Nnco6MQkufF5wJPoPdn1+wmkzCn3D6IwNVWVtW4U5i9
 VGyShSbgusAAYXUe/9yYj8eN+bbRQSvdN4eWYWU6+rRXShGZ5dZZmp+IPNl54dnW
 6F8uCnHX0cnIMCpGqV+41zZgZ/4wL2k9gdqu0LO6pi07o4tGd0Z4gcySgUFAnn1R
 kofNHueYIP4UgOg8DREoBzVKlpRqMou3S2kSZUfMeb3Q9ryF7UIvaGqIILyi7PKL
 kWd3nptg0EPavfL21SwXHiGpnDpB/Gj/F70kcPLus5RYujB24C9bvBmc26z68NZx
 Sz9mbElkkIU5duZsl1nxBWJ8IZ/tSWdtmC2xQMznmV7gHyGgVwr4j47f4Uv5sBvM
 14JHDO7mqN6E6FnTFZu/oPAN5pDjgL+TVNK5BU6Wkq0zitrA6eyKDqCvBCqkO6Nn
 tNzOuyRDzMOwM7HzqXhxqtzJWXylO1Mldc4bM8X4Cocf4pnLna/X6uP6dgE6A+JY
 azVYx4I/0NdEPerDTzIcEhBDgZeBVROhUQr+kHxc4rf6WzUUbu/wEo1UKXWV66oW
 1jb1yAFFWqYjkQuQc2PD4JSx35sFJaoSaoneRtmzBzRDfzSr5KjKj1E0e1skyMFq
 7ZVLCqZD0cB9DhmMDkWP
 =rwFF
 -----END PGP SIGNATURE-----

Merge tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull arm-soc clock driver changes from Olof Johansson:
 "The new clock subsystem was merged in linux-3.4 without any users,
  this now moves the first three platforms over to it: imx, mxs and
  spear.

  The series also contains the changes for the clock subsystem itself,
  since Mike preferred to have it together with the platforms that
  require these changes, in order to avoid interdependencies and
  conflicts."

Fix up trivial conflicts in arch/arm/mach-kirkwood/common.c (code
removed in one branch, added OF support in another) and
drivers/dma/imx-sdma.c (independent changes next to each other).

* tag 'clock' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits)
  clk: Fix CLK_SET_RATE_GATE flag validation in clk_set_rate().
  clk: Provide dummy clk_unregister()
  SPEAr: Update defconfigs
  SPEAr: Add SMI NOR partition info in dts files
  SPEAr: Switch to common clock framework
  SPEAr: Call clk_prepare() before calling clk_enable
  SPEAr: clk: Add General Purpose Timer Synthesizer clock
  SPEAr: clk: Add Fractional Synthesizer clock
  SPEAr: clk: Add Auxiliary Synthesizer clock
  SPEAr: clk: Add VCO-PLL Synthesizer clock
  SPEAr: Add DT bindings for SPEAr's timer
  ARM i.MX: remove now unused clock files
  ARM: i.MX6: implement clocks using common clock framework
  ARM i.MX35: implement clocks using common clock framework
  ARM i.MX5: implement clocks using common clock framework
  ARM: Kirkwood: Replace clock gating
  ARM: Orion: Audio: Add clk/clkdev support
  ARM: Orion: PCIE: Add support for clk
  ARM: Orion: XOR: Add support for clk
  ARM: Orion: CESA: Add support for clk
  ...
2012-05-26 12:42:29 -07:00
Linus Torvalds ab11ca34ee Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
 - some V4L2 API updates needed by embedded devices
 - DVB API extensions for ATSC-MH delivery system, used in US for mobile
   TV
 - new tuners for fc0011/0012/0013 and tua9001
 - a new dvb driver for af9033/9035
 - a new ATSC-MH frontend (lg2160)
 - new remote controller keymaps
 - Removal of a few legacy webcam driver that got replaced by gspca on
   several kernel versions ago
 - a new driver for Exynos 4/5 webcams(s5pp fimc-lite)
 - a new webcam sensor driver (smiapp)
 - a new video input driver for embedded (sta2x1xx)
 - several improvements, fixes, cleanups, etc inside the drivers.

Manually fix up conflicts due to err() -> dev_err() conversion in
drivers/staging/media/easycap/easycap_main.c

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (484 commits)
  [media] saa7134-cards: Remove a PCI entry added by mistake
  [media] radio-sf16fmi: add support for SF16-FMD
  [media] rc-loopback: remove duplicate line
  [media] patch for Asus My Cinema PS3-100 (1043:48cd)
  [media] au0828: Move the Kconfig knob under V4L_USB_DRIVERS
  [media] em28xx: simple comment fix
  [media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2
  [media] smiapp: Use v4l2_ctrl_new_int_menu() instead of v4l2_ctrl_new_custom()
  [media] smiapp: Add support for 8-bit uncompressed formats
  [media] smiapp: Allow generic quirk registers
  [media] smiapp: Use non-binning limits if the binning limit is zero
  [media] smiapp: Initialise rval in smiapp_read_nvm()
  [media] smiapp: Round minimum pre_pll up rather than down in ip_clk_freq check
  [media] smiapp: Use 8-bit reads only before identifying the sensor
  [media] smiapp: Quirk for sensors that only do 8-bit reads
  [media] smiapp: Pass struct sensor to register writing commands instead of i2c_client
  [media] smiapp: Allow using external clock from the clock framework
  [media] zl10353: change .read_snr() to report SNR as a 0.1 dB
  [media] media: add support to gspca/pac7302.c for 093a:2627 (Genius FaceCam 300)
  [media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try
  ...
2012-05-24 10:21:51 -07:00
Linus Torvalds a481991467 USB 3.5-rc1 pull request
Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window.
 
 It's touches a lot of different parts of the kernel, all USB drivers,
 due to some API cleanups (getting rid of the ancient err() macro) and
 some changes that are needed for USB 3.0 power management updates.
 
 There are also lots of new drivers, pimarily gadget, but others as well.
 We deleted a staging driver, which was nice, and finally dropped the
 obsolete usbfs code, which will make Al happy to never have to touch
 that again.
 
 There were some build errors in the tree that linux-next found a few
 days ago, but those were fixed by the most recent changes (all were due
 to us not building with CONFIG_PM disabled.)
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk+7qs0ACgkQMUfUDdst+ymjOgCfeoWqWk1bsKKt6SZULvQois5i
 3csAn1Uapcm8Uswwpnj2v1/2Zh4rBHLA
 =4jM1
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB 3.5-rc1 changes from Greg Kroah-Hartman:
 "Here is the big USB 3.5-rc1 pull request for the 3.5-rc1 merge window.

  It's touches a lot of different parts of the kernel, all USB drivers,
  due to some API cleanups (getting rid of the ancient err() macro) and
  some changes that are needed for USB 3.0 power management updates.

  There are also lots of new drivers, pimarily gadget, but others as
  well.  We deleted a staging driver, which was nice, and finally
  dropped the obsolete usbfs code, which will make Al happy to never
  have to touch that again.

  There were some build errors in the tree that linux-next found a few
  days ago, but those were fixed by the most recent changes (all were
  due to us not building with CONFIG_PM disabled.)

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'usb-3.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (477 commits)
  xhci: Fix DIV_ROUND_UP compile error.
  xhci: Fix compile with CONFIG_USB_SUSPEND=n
  USB: Fix core compile with CONFIG_USB_SUSPEND=n
  brcm80211: Fix compile error for .disable_hub_initiated_lpm.
  Revert "USB: EHCI: work around bug in the Philips ISP1562 controller"
  MAINTAINERS: Add myself as maintainer to the USB PHY Layer
  USB: EHCI: fix command register configuration lost problem
  USB: Remove races in devio.c
  USB: ehci-platform: remove update_device
  USB: Disable hub-initiated LPM for comms devices.
  xhci: Add Intel U1/U2 timeout policy.
  xhci: Add infrastructure for host-specific LPM policies.
  USB: Add macros for interrupt endpoint types.
  xhci: Reserve one command for USB3 LPM disable.
  xhci: Some Evaluate Context commands must succeed.
  USB: Disable USB 3.0 LPM in critical sections.
  USB: Add support to enable/disable USB3 link states.
  USB: Allow drivers to disable hub-initiated LPM.
  USB: Calculate USB 3.0 exit latencies for LPM.
  USB: Refactor code to set LPM support flag.
  ...

Conflicts:
	arch/arm/mach-exynos/mach-nuri.c
	arch/arm/mach-exynos/mach-universal_c210.c
	drivers/net/wireless/ath/ath6kl/usb.c
2012-05-22 15:50:46 -07:00
Mauro Carvalho Chehab 71006fb22b [media] saa7134-cards: Remove a PCI entry added by mistake
changeset 75c7dbcab added a wrong PCI ID address by mistake.
Remove it.

Reported-by: Remi Schwartz <remi.schwartz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-21 12:48:44 -03:00
Ondrej Zary abed623ca5 [media] radio-sf16fmi: add support for SF16-FMD
Add support for SF16-FMD card to radio-sf16fmi driver.
Only new PnP ID is added and texts changed.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 16:10:05 -03:00
Michel Machado e243c3c4f7 [media] rc-loopback: remove duplicate line
This patch just removes the second assignment "rc->priv = &loopdev;"
that happens a fews lines after the first one.

Signed-off-by: Michel Machado <michel@digirati.com.br>
CC: Mauro Carvalho Chehab <mchehab@infradead.org>
CC: "David Härdeman" <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 16:06:06 -03:00
remi schwartz 75c7dbcab4 [media] patch for Asus My Cinema PS3-100 (1043:48cd)
Signed-off-by: Remi Schwartz <remi.schwartz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 16:05:02 -03:00
Ismael Luceno 711e1bfb5b [media] au0828: Move the Kconfig knob under V4L_USB_DRIVERS
This driver is for USB devices, but was incorrectly listed under
V4L_PCI_DRIVERS.

Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 13:20:40 -03:00
Antti Palosaari 26c8a729d7 [media] em28xx: simple comment fix
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 13:18:11 -03:00
Ondrej Zary 3491a88ea0 [media] [resend] radio-sf16fmr2: add PnP support for SF16-FMD2
Add PnP support to radio-sf16fmr2 driver to support SF16-FMD2 card (SB16 +
TEA5757). The driver can now handle two cards (FMR2 is hardwired to 0x384,
FMD2 can be put at 0x384 or 0x284 by PnP).
Tested with both SF16-FMR2 and SF16-FMD2 (the can work at the same time by
using kernel parameter "pnp_reserve_io=0x384,2" so the FMD2 is put at 0x284).

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 13:16:00 -03:00
Sakari Ailus 06b491fb9a [media] smiapp: Use v4l2_ctrl_new_int_menu() instead of v4l2_ctrl_new_custom()
Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:47:54 -03:00
Sakari Ailus b8cc8d7a57 [media] smiapp: Add support for 8-bit uncompressed formats
Add support for uncompressed 8-bit raw bayer formats.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:47:38 -03:00
Sakari Ailus 27b2e76dbc [media] smiapp: Allow generic quirk registers
Implement more generic quirk registers than just limit and capability
registers. This comes with the expense of a little bit more access time so
these should be only used when really needed.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:47:25 -03:00
Sakari Ailus 3de886e0e4 [media] smiapp: Use non-binning limits if the binning limit is zero
Some sensors do use binning but do not have valid limits in binning
registers. Use non-binning limits in that case.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:46:43 -03:00
Sakari Ailus 0458294751 [media] smiapp: Initialise rval in smiapp_read_nvm()
rval was not properly initialised in smiapp_read_nvm(). Do that.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:46:27 -03:00
Sakari Ailus 6f36799398 [media] smiapp: Round minimum pre_pll up rather than down in ip_clk_freq check
The pre_pll divisor must be such that ext_clk / pre_pll divisor does not
result in a frequency that is greater than pll_ip_clk_freq. Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:46:17 -03:00
Sakari Ailus 98add8e807 [media] smiapp: Use 8-bit reads only before identifying the sensor
Some sensors only allow 8-bit access, so use safe 8-bit access before the
sensor has been identified.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:46:02 -03:00
Sakari Ailus ceb9e30e9f [media] smiapp: Quirk for sensors that only do 8-bit reads
Some sensors implement only 8-bit read functionality and fail on wider
reads. Add a quirk flag for such sensors.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:45:39 -03:00
Sakari Ailus 1e73eea781 [media] smiapp: Pass struct sensor to register writing commands instead of i2c_client
Pass struct sensor to register access commands. This allows taking quirks
into account in register access.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:45:01 -03:00
Sakari Ailus 2547428de0 [media] smiapp: Allow using external clock from the clock framework
Instead of providing a function in platform data, allow also providing the
name of the external clock and use it through the clock framework.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:44:24 -03:00
Antti Palosaari 13c6a9f706 [media] zl10353: change .read_snr() to report SNR as a 0.1 dB
Report SNR in 0.1 dB scale instead of raw hardware register values.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:19:36 -03:00
Jozsef Marton 5b84325a31 [media] media: add support to gspca/pac7302.c for 093a:2627 (Genius FaceCam 300)
gspca_pac7302 module supports the webcam with usb id: 093a:2627.
It is a Genius FaceCam 300.
The module does not need any changes but listing the usb id along with a vertical flip flag.
The included patch adds this to the module source.

Signed-off-by: Jozsef Marton <jmarton@users.sourceforge.net>
Acked-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:15:12 -03:00
Malcolm Priestley e58c11f234 [media] m88rs2000 - only flip bit 2 on reg 0x70 on 16th try
Continuous flip of bit2 reg 0x70 can cause device to become unresponsive.

Also correct reg read mistake.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:14:05 -03:00
Igor M. Liplianin 38431a98a1 [media] m88rs2000: LNB voltage control implemented
Trival patch to get it working with my cards stuff.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Acked-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:13:32 -03:00
Mauro Carvalho Chehab 6ae009a8ba [media] sta2x11_vip: Fix 60Hz video standard handling
This device supports V4L2_STD_ALL, but its check for 60Hz standards
is broken, as NTSC is not the only standard that uses 60Hz.

Cc: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:07:41 -03:00
Federico Vaga efeb98b4e2 [media] STA2X11 VIP: new V4L2 driver
V4L2 driver for the Video Input Port within STA2X11 board

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:05:46 -03:00
Federico Vaga a8f3c203e1 [media] videobuf-dma-contig: add cache support
Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 12:01:58 -03:00
Federico Vaga bca7ad1a33 [media] adv7180: add support to user controls
Video user controls such as brightness, contrast, saturation, and
hue are now handled.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Richard Röjfors <richard.rojfors.ext@mocean-labs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:59:22 -03:00
Ben Hutchings f27b853ea2 [media] rc: Fix invalid free_region and/or free_irq on probe failure
fintek-cir, ite-cir and nuvoton-cir may try to free an I/O region
and/or IRQ handler that was never allocated after a failure in their
respective probe functions.  Add and use separate labels on the
failure path so they will do the right cleanup after each possible
point of failure.

Compile-tested only.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:43:05 -03:00
Malcolm Priestley 81cda57742 [media] rc-it913x=v2 Incorrect assigned KEY_1
Correct incorrect scancode for KEY_1

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:41:45 -03:00
Anssi Hannula be1027cc0f [media] ati_remote: add regular up/down buttons to Medion Digitainer keymap
There are many different Medion X10 remotes that need slightly different
keymaps. We may not yet have all the needed keymaps, in which case a
wrong keymap may be used. This happened with Medion X10 OR2x remotes
before the keymap for them was added, causing the ati_remote driver to
select the Medion Digitainer keymap instead. Unfortunately, the Medion
Digitainer keymap doesn't have the standard X10 up/down scancodes
assigned to KEY_UP and KEY_DOWN keycodes, making wrongly assigned
remotes mostly unusable.

Add the regular KEY_UP and KEY_DOWN scancodes to the Medion X10
Digitainer keymap, making any Medion remote mostly usable even when
wrongly used with that keymap (standard buttons, such as
up/down/left/right, 0-9, play/stop/pause, have the same scancode in all
the X10 remotes).

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:40:37 -03:00
Anssi Hannula 5085c99eeb [media] ati_remote: add keymap for Medion X10 OR2x remotes
Add another Medion X10 remote keymap. This is for the Medion OR2x
remotes with the Windows MCE button.

The receiver shipped with this remote has the same USB ID as the other
Medion receivers, but the name is different and is therefore used to
detect this variant.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:40:06 -03:00
Igor M. Liplianin 7b134e85b1 [media] cx23885: TeVii s471 card support
The card is similar to TeVii s470, but has different LNB power control.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 11:09:26 -03:00
Laurent Pinchart 6b363f9f97 [media] uvcvideo: Fix V4L2 button controls that share the same UVC control
The Logitech pan/tilt reset UVC control contains two V4L2 button
controls to reset pan and tilt. As the UVC control is not marked as
auto-update, the button bits are set but never reset. A pan reset that
follows a tilt reset would thus reset both pan and tilt.

Fix this by not caching the control value of write-only controls. All
standard UVC controls are either readable or auto-update, so this will
not cause any regression and will not result in extra USB requests.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:41:18 -03:00
Ismael Luceno e2b710bfde [media] au0828: Add USB ID used by many dongles
Tested with Yfeng 680 ATV dongle.

Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:30:31 -03:00
Antti Palosaari ccb5cf9bfc [media] rtl28xxu: add small sleep for rtl2830 demod attach
Demod needs some time to wake up after power on.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:25:00 -03:00
Antti Palosaari c188637dc5 [media] rtl2830: prevent hw access when sleeping
to prevent I/O errors...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:24:53 -03:00
Antti Palosaari 631a2b6112 [media] rtl2830: implement .get_frontend()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:24:37 -03:00
Antti Palosaari 78e750754b [media] rtl2830: implement .read_signal_strength()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:24:12 -03:00
Antti Palosaari 525ffc19b9 [media] rtl2830: implement .read_ber()
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:24:01 -03:00
Antti Palosaari eba672a045 [media] rtl2830: implement .read_snr()
Reports value as a 0.1 dB.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:23:18 -03:00
Antti Palosaari f6f379df65 [media] em28xx: disable LNA - PCTV QuatroStick nano (520e)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:22:57 -03:00
Antti Palosaari 140534432e [media] drxk: fix GPIOs
UIO-2 and UIO-3 were broken.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:22:42 -03:00
Hans-Frieder Vogt b144c98ca0 [media] fc0013 ver. 0.2: introduction of get_rf_strength function
Changes compared to version 0.1 of driver (sent 6 May):
- Initial implementation of get_rf_strength function.
- Introduction of a warning message

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:22:17 -03:00
Hans-Frieder Vogt 4a14db7e61 [media] fc0012 ver. 0.6: introduction of get_rf_strength function
Changes compared to version 0.5 of driver (sent 6 May):
- Initial implementation of get_rf_strength function.

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:22:08 -03:00
Hans-Frieder Vogt e889adc911 [media] fc001x: tuner driver for FC0013
Support for tuner Fitipower FC0013

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:21:47 -03:00
Hans-Frieder Vogt ef89ec7ecd [media] fc001x: tuner driver for FC0012, version 0.5
Support for tuner Fitipower FC0012

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:19:46 -03:00
Hans-Frieder Vogt fee5fcf6b3 [media] fc001x: common header file for FC0012 and FC0013
Common defines for the FC0012 (v0.5) and FC0013 tuner drivers

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:19:02 -03:00
Mauro Carvalho Chehab 5444a1b76b [media] lg2160: Fix a few warnings
drivers/media/dvb/frontends/lg2160.c: In function ‘lg216x_read_ucblocks’:
drivers/media/dvb/frontends/lg2160.c:1336:1: warning: label ‘fail’ defined but not used [-Wunused-label]
drivers/media/dvb/frontends/lg2160.c:1325:6: warning: unused variable ‘ret’ [-Wunused-variable]
drivers/media/dvb/frontends/lg2160.c:1324:23: warning: unused variable ‘state’ [-Wunused-variable]
drivers/media/dvb/frontends/lg2160.c: In function ‘lg216x_set_ensemble’:
drivers/media/dvb/frontends/lg2160.c:420:23: warning: ‘reg’ may be used uninitialized in this function [-Wuninitialized]

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:13:23 -03:00
Michael Krufky 10d67371fc [media] DVB: remove "stats" property bits from ATSC-MH API property additions
Mauro is proposing a new API to handle statistics. This functionality will
be returned after the statistics API is ready. Just remove them for now.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:06:08 -03:00
Michael Krufky 3113621492 [media] mxl111sf: add ATSC-MH support
Add support for the ATSC-MH frontend on the WinTV Aero-m

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:05:51 -03:00
Michael Krufky 52660885e5 [media] dvb-usb: increase MAX_NO_OF_FE_PER_ADAP from 2 to 3
The following patch adds support for a third frontend to exist on a single
DVB adapter, in the mxl111sf driver. This patch allows that to be possible.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:03:08 -03:00
Michael Krufky 379aa4d0c0 [media] dvb-usb: add support for dvb-usb-adapters that deliver raw payload
Select this feature setting the dvb-usb-adapter caps field with
DVB_USB_ADAP_RECEIVES_RAW_PAYLOAD

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:03:07 -03:00
Michael Krufky 8e156702aa [media] dvb-demux: add functionality to send raw payload to the dvr device
If your driver needs to deliver the raw payload to userspace without
passing through the kernel demux, use function: dvb_dmx_swfilter_raw

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:03:06 -03:00
Mauro Carvalho Chehab adabb266ef [media] lg2160: Don't fill the legacy DVBv3 ops.type field
This field should not be used anymore inside the frontend drivers.
The DVB core won't rely on it.

Cc: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:03:01 -03:00
Michael Krufky e26f2ae452 [media] DVB: add support for the LG2160 ATSC-MH demodulator
This patch adds support for controlling the LG2160 and
LG2161 ATSC-MH demodulators.

[mchehab@redhat.com: fold with the next patch that was fixing the DVB ABI]
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 10:02:11 -03:00
Michael Krufky 4ef7077507 [media] mxl111sf-tuner: tune SYS_ATSCMH just like SYS_ATSC
The MxL111SF tuner is programmed the same way for ATSC-MH
as it is programmed for ATSC.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:47:28 -03:00
Michael Krufky ca689488ee [media] linux-dvb v5 API support for ATSC-MH
Add the following properties for controlling an ATSC-MH frontend:

DTV_ATSCMH_FIC_VER
DTV_ATSCMH_PARADE_ID
DTV_ATSCMH_NOG
DTV_ATSCMH_TNOG
DTV_ATSCMH_SGN
DTV_ATSCMH_PRC
DTV_ATSCMH_RS_FRAME_MODE
DTV_ATSCMH_RS_FRAME_ENSEMBLE
DTV_ATSCMH_RS_CODE_MODE_PRI
DTV_ATSCMH_RS_CODE_MODE_SEC
DTV_ATSCMH_SCCC_BLOCK_MODE
DTV_ATSCMH_SCCC_CODE_MODE_A
DTV_ATSCMH_SCCC_CODE_MODE_B
DTV_ATSCMH_SCCC_CODE_MODE_C
DTV_ATSCMH_SCCC_CODE_MODE_D
DTV_ATSCMH_FIC_ERR
DTV_ATSCMH_CRC_ERR
DTV_ATSCMH_RS_ERR

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:41:50 -03:00
Hans Verkuil 4ad34da030 [media] gspca: the field 'frozen' is under CONFIG_PM
The gspca_dev field 'frozen' is added only if CONFIG_PM is set. So add the
relevant #ifdef's to various subdrivers that use it.

The m32r daily build caught this mistake.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:35:42 -03:00
Sylwester Nawrocki fed07f8488 [media] s5p-fimc: Use selection API in place of crop operations
Replace deprecated crop operations with the selection API.
Original crop ioctls are supported through a compatibility
layer at the v4l2 core.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kuyngmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:29:12 -03:00
Sylwester Nawrocki 9448ab7dec [media] s5p-fimc: Add color effect control
Add support for V4L2_CID_COLORFX control at the mem-to-mem and capture
video nodes.

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>
2012-05-20 09:27:16 -03:00
Sylwester Nawrocki 0c9204d342 [media] s5p-fimc: Update copyright notices
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>
2012-05-20 09:26:49 -03:00
Sylwester Nawrocki 4af813108b [media] s5p-fimc: Add support for Exynos4x12 FIMC-LITE
This patch adds driver for FIMC-LITE camera host interface. This new IP
differs from the regular FIMC IP in that it doesn't have input DMA,
scaler and color space conversion support. So it just plain camera host
interface for MIPI-CSI2 and ITU-R interfaces. For the serial bus support
it interworks with MIPI-CSIS and the exisiting s5p-csis driver.
The FIMC-LITE and MIPI-CSIS drivers can also be reused in the Exynos5
SoC series.

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>
2012-05-20 09:26:24 -03:00
Sylwester Nawrocki 5af86c2691 [media] s5p-fimc: Make sure an interrupt is properly requested
Use dev_name() for requesting an interrupt so we don't get an interrupt
requested with same name for multiple device instances.

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>
2012-05-20 09:23:49 -03:00
Sylwester Nawrocki bb7c276ec4 [media] s5p-fimc: Minor cleanups
Tidy up the variant and driver data handling. Remove the 'samsung_'
prefix from some data structures since it doesn't really carry any
useful information and makes the names unnecessarily long.

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>
2012-05-20 09:23:35 -03:00
Sylwester Nawrocki 3d112d9ace [media] s5p-fimc: Prefix format enumerations with FIMC_FMT_
Prefix the pixel format enumerations with FIMC_FMT_ to make it more clear,
especially when used in new IP drivers, like fimc-lite, etc. Also add IO_
prefix in the input/output enumeration.

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>
2012-05-20 09:23:09 -03:00
Sylwester Nawrocki 0f735f5236 [media] s5p-fimc: Rework the video pipeline control functions
There is getting more entities to manage within single video pipeline
in newer SoCs. To simplify code put subdevs' pointer into an array
rather than adding new member in struct fimc_pipeline for each subdev.
This allows to easier handle subdev operations in proper order.

Additionally walk graph in one direction only in fimc_pipeline_prepare()
function to make sure we properly gather only media entities that below
to single data pipeline. This avoids wrong initialization in case where,
for example there are multiple active links from s5p-mipi-csis subdev
output pad.

struct fimc_pipeline declaration is moved to the driver's public header
to allow other drivers to reuse the fimc-lite driver 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>
2012-05-20 09:22:47 -03:00
Sylwester Nawrocki 2b511edb98 [media] s5p-fimc: Add FIMC-LITE register definitions
Add register definitions and register API for FIMC-LITE devices.

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>
2012-05-20 09:21:50 -03:00
Sylwester Nawrocki c83a1ff063 [media] s5p-fimc: Refactor the register interface functions
Simplify the register API and use FIMC_REG_ prefix for all register
definitions for consistency with FIMC-LITE. The unused image effect
defines are removed.

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>
2012-05-20 09:19:32 -03:00
Sylwester Nawrocki 693f5c4082 [media] s5p-fimc: Use v4l2_subdev internal ops to register video nodes
In order to be able to select only FIMC-LITE support, which is added
with subsequent patches, the regular FIMC support is now contained
only in fimc-core.c, fimc-m2m.c and fimc-capture.c files. The graph
and pipeline management is now solely handled in fimc-mdevice.[ch].
This means the FIMC driver can now be excluded with Kconfig option,
leaving only FIMC-LITE and allowing this driver to be reused in SoCs
that have only FIMC-LITE and no regular FIMC IP.

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>
2012-05-20 09:17:11 -03:00
Sylwester Nawrocki 97d9742265 [media] s5p-fimc: Move m2m node driver into separate file
Virtually no functional changes, just code reordering. This let us to
clearly separate all logical functions available in the driver: fimc
capture, mem-to-mem, and later fimc-lite capture, ISP features, etc.

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>
2012-05-20 09:15:10 -03:00
Sylwester Nawrocki 41df5bf088 [media] s5p-fimc: Avoid crash with null platform_data
In commit "s5p-fimc: Handle sub-device interdependencies using deferred.."
there was a check added for pdata->num_clients without first checking
pdata against NULL. This causes a crash when platform_data is not set,
which is a valid use case. Fix this regression by skipping the MIPI-CSIS
subdev registration also when pdata is null.

Reported-by: HeungJun Kim <riverful.kim@samsung.com>
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>
2012-05-20 09:14:11 -03:00
Sachin Kamat d310f478e2 [media] s5p-mfc: Use devm_* functions in s5p_mfc.c file
devm_* functions are device managed functions and make error handling
and cleanup simpler.

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>
2012-05-20 09:07:44 -03:00
Sachin Kamat 5b58b95405 [media] s5p-jpeg: Use devm_* functions in jpeg-core.c file
devm_* functions are used to replace kzalloc, request_mem_region, ioremap
and request_irq functions in probe call. With the usage of devm_* functions
explicit freeing and unmapping is not required.

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>
2012-05-20 09:05:44 -03:00
Sachin Kamat 32fced05ad [media] s5p-g2d: Use devm_* functions in g2d.c file
devm_* functions are device managed functions and make error handling
and cleanup simpler.

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>
2012-05-20 09:05:18 -03:00
Sachin Kamat 3e9095d54c [media] s5p-mfc: Add missing static storage class in s5p_mfc_enc.c file
Fixes the following sparse warnings:
drivers/media/video/s5p-mfc/s5p_mfc_enc.c:1439:5: warning: symbol 'vidioc_s_parm' was not declared. Should it be static?
drivers/media/video/s5p-mfc/s5p_mfc_enc.c:1455:5: warning: symbol 'vidioc_g_parm' was not declared. Should it be static?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-20 09:04:42 -03:00