summaryrefslogtreecommitdiff
path: root/drivers/media
AgeCommit message (Collapse)Author
2012-08-15[media] ov772x: Make to_ov772x convert from v4l2_subdev to ov772x_privLaurent Pinchart
Conversion from i2c_client to ov772x_priv is only needed in a single location, while conversion from v4l2_subdev to ov772x_priv is needed in several locations. Perform the former manually, and use to_ov772x for the later. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] ov772x: try_fmt must not default to the current formatLaurent Pinchart
If the requested format isn't supported, return a fixed default format instead of the current format. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] ov772x: Don't fail in s_fmt if the requested format isn't supportedLaurent Pinchart
Select a default format instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] ov772x: Select the default format at probe timeLaurent Pinchart
The format and window size are only initialized during the first g_fmt call. This leaves the device in an inconsistent state after initialization, which will cause problems when implementing pad operations. Move the format and window size initialization to probe time. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] ov772x: Fix memory leak in probe error pathLaurent Pinchart
The control handler isn't freed if its initialization fails. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] soc-camera: Push probe-time power management to driversLaurent Pinchart
Several client drivers access the hardware at probe time, for instance to read the probe chip ID. Such chips need to be powered up when being probed. soc-camera handles this by powering chips up in the soc-camera probe implementation. However, this will break with non soc-camera hosts that don't perform the same operations. Fix the problem by pushing the power up/down from the soc-camera core down to individual drivers on a needs basis. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] soc-camera: Add and use soc_camera_power_[on|off]() helper functionsLaurent Pinchart
Instead of forcing all soc-camera drivers to go through the mid-layer to handle power management, create soc_camera_power_[on|off]() functions that can be called from the subdev .s_power() operation to manage regulators and platform-specific power handling. This allows non soc-camera hosts to use soc-camera-aware clients. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [g.liakhovetski@gmx.de: fix compile breakage] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] soc-camera: Continue the power off sequence if one of the steps failsLaurent Pinchart
Powering off a device is a "best effort" task: failure to execute one of the steps should not prevent the next steps to be executed. For instance, an I2C communication error when putting the chip in stand-by mode should not prevent the more agressive next step of turning the chip's power supply off. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] soc_camera: Don't call .s_power() during probeLaurent Pinchart
The .s_power() call only covers the .g_mbus_fmt() operation call. Several clients required to be powered on to retrieve the current mbus format but have now been fixed. The .s_power() call is thus not needed anymore and can be removed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] rename drivers/media/video as .../platformMauro Carvalho Chehab
The remaining drivers are mostly platform drivers. Name the dir to reflect it. It makes sense to latter break it into a few other dirs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move soc_camera i2c drivers into its own dirMauro Carvalho Chehab
Move all soc_camera i2c drivers into drivers/media/i2c/soc_camera/. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move i2c files into drivers/media/i2cMauro Carvalho Chehab
Move ancillary I2C drivers into drivers/media/i2c, in order to better organize them. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] reorganize the API core itemsMauro Carvalho Chehab
Reorganize the API core changes for them to appear closer to the items that enable them, and not at the drivers part of the menu. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] mmc/Kconfig: Improve driver name for siano mmc/sdio driverMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move parallel port/isa video drivers to drivers/media/parport/Mauro Carvalho Chehab
We should keep just the I2C drivers under drivers/media/video, and then rename it to drivers/media/i2c. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move the remaining PCI devices to drivers/media/pciMauro Carvalho Chehab
Move meye and sta2x11_vip into the drivers/media/pci subdirs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move analog PCI saa7146 drivers to its own dirMauro Carvalho Chehab
Instead of having them under drivers/media/video, move them to their own directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] rename most media/video pci drivers to media/pciMauro Carvalho Chehab
Rename all PCI drivers with their own directory under drivers/media/video into drivers/media/pci and update the building system. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] bt8xx: move analog TV part to be together with DTV oneMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] move the remaining USB drivers to drivers/media/usbMauro Carvalho Chehab
Move the 3 remaining usb drivers to their proper space. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] rename most media/video usb drivers to media/usbMauro Carvalho Chehab
Rename all USB drivers with their own directory under drivers/media/video into drivers/media/usb and update the building system. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] b2c2: fix driver's build due to the lack of pci DMA codeMauro Carvalho Chehab
Fix a one-character typo at the makefile. drivers/built-in.o: In function `flexcop_pci_remove': flexcop-pci.c:(.text+0x20d1a28): undefined reference to `flexcop_dma_free' flexcop-pci.c:(.text+0x20d1a3e): undefined reference to `flexcop_dma_free' drivers/built-in.o: In function `flexcop_pci_stream_control': flexcop-pci.c:(.text+0x20d2396): undefined reference to `flexcop_dma_config' flexcop-pci.c:(.text+0x20d23b3): undefined reference to `flexcop_dma_config' flexcop-pci.c:(.text+0x20d23cf): undefined reference to `flexcop_dma_config_timer' flexcop-pci.c:(.text+0x20d23f5): undefined reference to `flexcop_dma_xfer_control' flexcop-pci.c:(.text+0x20d244c): undefined reference to `flexcop_dma_control_timer_irq' flexcop-pci.c:(.text+0x20d24b0): undefined reference to `flexcop_dma_control_timer_irq' flexcop-pci.c:(.text+0x20d2507): undefined reference to `flexcop_dma_xfer_control' drivers/built-in.o: In function `flexcop_pci_probe': flexcop-pci.c:(.text+0x20d28d2): undefined reference to `flexcop_dma_allocate' flexcop-pci.c:(.text+0x20d2907): undefined reference to `flexcop_dma_allocate' flexcop-pci.c:(.text+0x20d2923): undefined reference to `flexcop_dma_free' Reported-by: Fengguang Wu <wfg@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-14[media] media: davinci: fix section mismatch warningsLad, Prabhakar
This patch fixes section mismatch warnings for davinci video drivers. [mchehab@redhat.com: applied it as a fixup over the previous (and wrong) changeset c6afbf2] Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] b2c2: frontends/tuners are not needed at the bridge bindingMauro Carvalho Chehab
The frontends/tuners are used inside the common part of the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] siano: break it into common, mmc and usbMauro Carvalho Chehab
siano is, in fact, 2 drivers: one for MMC and one for USB, plus a common bus-independent code. Break it accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] saa7146: Move it to its own directoryMauro Carvalho Chehab
In order to better organize the directory tree, move the saa7146 common driver to its own directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] common: move media/common/tuners to media/tunersMauro Carvalho Chehab
Move the tuners one level up, as the "common" directory will be used by drivers that are shared between more than one driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] b2c2: break it into common/pci/usb directoriesMauro Carvalho Chehab
b2c2 is, in fact, 2 drivers: one for PCI and one for USB, plus a common bus-independent code. Break it accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] Rename media/dvb as media/pciMauro Carvalho Chehab
The remaining dvb drivers are pci, so rename them to match the bus. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb-usb: move it to drivers/media/usb/dvb-usbMauro Carvalho Chehab
As media/dvb will be removed, move it to a proper place. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] firewire: move it one level upMauro Carvalho Chehab
Move firewire to one level up, as the dvb subdirectory will be removed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] move the dvb/frontends to drivers/media/dvb-frontendsMauro Carvalho Chehab
Raise the DVB frontends one level up, as the intention is to remove the drivers/media/dvb directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb: move the dvb core one level upMauro Carvalho Chehab
just like the V4L2 core, move the DVB core to drivers/media, as the intention is to get rid of both "video" and "dvb" directories. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] v4l: move v4l2 core into a separate directoryMauro Carvalho Chehab
Currently, the v4l2 core is mixed together with other non-core drivers. Move them into a separate directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] rc/Kconfig: Fix a warningMauro Carvalho Chehab
drivers/media/rc/Kconfig:291:warning: multi-line strings not supported Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] it913x ver 1.32 driver moved to dvb-usb-v2Malcolm Priestley
Functional changes PID filter is default to off and controlled from dvb-usb-v2 Driver now supports suspend and resume changes in dvb-usb-v2 USB bus repeater functions have been removed. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] media: mx2_camera: Mark i.MX25 support as BROKENJavier Martin
i.MX25 support is known to have been broken for almost a year. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] s5k6aa: Use devm_kzalloc functionSachin Kamat
devm_kzalloc() eliminates the need to free explicitly thereby making the code a bit simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] saa7134-dvb: Fix kworld sbtvd I2C gate controlManoel Pinheiro
The correct place to put i2c_gate_ctrl is before calling tda18271_attach, because the driver tda18271 will use it to enable or disable the i2c-bus from the demodulator to the tuner. And thus eliminate the error message: "Unknown device (255) detected @ 1-00c0, device not supported" in the driver tda18271. In the device kworld_sbtvd (hybrid analog and digital TV) the control of the i2c-bus to tuner is done in the analog demodulator and not in the digital demodulator. Signed-off-by: Manoel Pinheiro <pinusdtv@hotmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] rc-core: move timeout and checks to lircDavid Härdeman
The lirc TX functionality expects the process which writes (TX) data to the lirc dev to sleep until the actual data has been transmitted by the hardware. Since the same timeout calculation is duplicated in more than one driver (and would have to be duplicated in even more drivers as they gain TX support), it makes sense to move this timeout calculation to the lirc layer instead. At the same time, centralize some of the sanity checks. Signed-off-by: David Härdeman <david@hardeman.nu> Cc: Jarod Wilson <jwilson@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] lmedm04: fix data usage past the end of the bufferMalcolm Priestley
On Mon, 2012-08-13 at 19:58 +0300, Dan Carpenter wrote: > Hello Mauro Carvalho Chehab, > > The patch db6651a9ebb3: "[media] lmedm04: fix build" from Aug 12, > 2012, leads to the following warning: > drivers/media/dvb/dvb-usb-v2/lmedm04.c:769 lme2510_download_firmware() > error: usb_control_msg() 'data' too small (128 vs 265) > > 737 data = kzalloc(128, GFP_KERNEL); > ^^^ > data is 128 bytes. Control isn't used, so remove it. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] DVB: improve handling of TS packets containing a raised TEI bitMichael Krufky
When the TEI bit is raised, we should not trust any of the contents of the packet in question, including but not limited to its PID number. Considering that we don't trust the PID number of this packet, we should not proceed to check the packet counter (if dvb_demux_tscheck is set). We should expect to see at least one discontinuity after a bad packet is received, so any time a TEI is detected, a following TS packet counter mismatch is to be expected. There is no real reason to ever allow bad packets to pass through the kernel demux, other than for purposes of attempting error correction via software or statistical information. However, since we have always passed these bad packets though the demux, we should not change this default behavior. Without altering module options, this patch merely prevents the TS packet counter check on packets containing a raised TEI. If module option dvb_demux_feed_err_pkts is set to 0, the kernel demux will drop these error packets entirely, preventing any possibility of corruption caused by userspace programs that are expecting valid data. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] cx88: Remove duplicate constEmil Goode
This patch fixes the following sparse warnings by removing use of duplicate const. drivers/media/video/cx88/cx88.h:152:40: warning: duplicate const drivers/media/video/cx88/cx88-core.c:256:33: warning: duplicate const drivers/media/video/cx88/cx88-alsa.c:769:41: warning: duplicate const As commented by Jonathan Nieder: These double "const" were introduced in v2.6.37-rc1~64^2~464 (V4L/DVB: drivers/media: Make static data tables and strings const, 2010-08-25). The address of an array is already immutable by definition, so for what it's worth, with or without a clarified commit message, [mchehab@redhat.com: Tested with "gcc -s" (version 4.7.0): the produced asm is indeed equal before and after this patch] Signed-off-by: Emil Goode <emilgoode@gmail.com> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] media: rc: Introduce RX51 IR transmitter driverTimo Kokkonen
This is the driver for the IR transmitter diode found on the Nokia N900 (also known as RX51) device. The driver is mostly the same as found in the original 2.6.28 based kernel that comes with the device. The following modifications have been made compared to the original driver version: - Adopt to the changes that has happen in the kernel during the past five years, such as the change in the include paths - The OMAP DM-timers require much more care nowadays. The timers need to be enabled and disabled or otherwise many actions fail. Timers must not be freed without first stopping them or otherwise the timer cannot be requested again. The code has been tested with sending IR codes with N900 device running Debian userland. The device receiving the codes was Anysee DVB-C USB receiver. Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi> Cc: Tony Lindgren <tony@atomide.com> Cc: linux-omap@vger.kernel.org Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb_usb_v2: use %*ph to dump usb xfer debugsAntti Palosaari
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb-usb: use %*ph to dump small buffersAndy Shevchenko
[crope@iki.fi: fix trivial merge conflict] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] saa7127: use %*ph to print small buffersAndy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] ati_remote: use %*ph to dump small buffersAndy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] dvb: use %*ph to hexdump small buffersAndy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] gspca: use %*ph to print small buffersAndy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>