summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx25840
AgeCommit message (Collapse)Author
2008-07-27remove select's of FW_LOADERMauro Carvalho Chehab
From: Adrian Bunk <bunk@kernel.org> After commit d9b19199e4894089456aaad295023263b5225c1a (always enable FW_LOADER unless EMBEDDED=y) we can remove the FW_LOADER select's and corresponding dependencies on HOTPLUG. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-21make cx25840_debug staticMauro Carvalho Chehab
From: Adrian Bunk <bunk@kernel.org> cx25840_debug can now become static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20backport commit 9ad46a6ac5422882d9f9a7f0d77ca0766f56bb6eMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Author: David Woodhouse <dwmw2@infradead.org> Date: Fri May 23 23:58:24 2008 +0100 cx25840: treat firmware data as const kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-17ivtv/cx18: ensure the default control values are correctHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> For several MPEG controls and the volume control the default as returned by VIDIOC_QUERYCTRL was incorrect and did not match the actual initial value. This is now fixed for cx18 and ivtv. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-17cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setupHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> cx25840_vbi_setup has nothing to do with setting up VBI, but everything with setting up the standard. Move to cx25840-core.c and rename. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.13Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-08v4l-dvb: remove support for kernels < 2.6.0Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> First phase of the backwards compatibility cleanup: stop supporting kernels older than 2.6.0. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-06-07cx18/cx25840: the S-Video LUMA input can use all In1-In8 inputsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The S-Video LUMA input was restricted to the In1-In4 inputs, but it turns out that it can use the full range of In1-In8. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-06-05backport I2C changes on several filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Some I2C API change patches were committed at kernel. Backport those changes to V4L/DVB tree. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-06Fix FW_LOADER depencency at v4l/dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Since: 1) FW_LOADER is defined as: config FW_LOADER tristate "Userspace firmware loading support" depends on HOTPLUG 2) several V4L/DVB driver just selects it; 3) select is not smart enough to auto-select HOTPLUG, if select FW_LOADER. So, All drivers that select FW_LOADER should also depend on HOTPLUG. An easier solution (for the end-user perspective) would be to "select HOTPLUG". However, live is not simple. This would cause recursive dependency issues like this one: drivers/usb/Kconfig:62:error: found recursive dependency: USB -> USB_OHCI_HCD -> I2C -> MEDIA_TUNER -> MEDIA_TUNER_XC2028 -> HOTPLUG -> PCCARD -> PCMCIA -> USB_ARCH_HAS_HCD -> MOUSE_APPLETOUCH -> USB Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-02backport commit d2653e92732bd3911feff6bee5e23dbf959381dbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Author: Jean Delvare <khali@linux-fr.org> Date: Tue Apr 29 23:11:39 2008 +0200 i2c: Add support for device alias names Based on earlier work by Jon Smirl and Jochen Friedrich. This patch allows new-style i2c chip drivers to have alias names using the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this point, the old i2c driver binding scheme (driver_name/type) is still supported. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-18cx25840: Ensure GPIO2 is correctly set for cx23885/7/8 based products.Steven Toth
From: Steven Toth <stoth@hauppauge.com> cx25840: Ensure GPIO2 is correctly set for cx23885/7/8 based products. Signed-off-by: Steven Toth <stoth@hauppauge.com>
2008-03-09cx25840: better PAL-M and NTSC-KR handlingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-01-26cx25840: code cleanupHans Verkuil
From: Tyler Trafford <ttrafford@gmail.com> - Use min() - Eliminate extraneous variables Signed-off-by: Tyler Trafford <ttrafford@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-01-09cx25840: Add basic CX23885 AVCore supportSteven Toth
From: Steven Toth <stoth@hauppauge.com> The cx23885/7/8 PCIe bridge has an internal AVCore modelled on the cx2584x family. Many of the registers positions are identical but some moved. The register values are also different because the different bridges run at different clock rates. Signed-off-by: Steven Toth <stoth@hauppauge.com>
2007-12-02cx25840: fix endianness inconsistencyHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> cx25840_read4 reads a little-endian 32-bit value whereas cx25840_write4 writes the 32-bit value as big-endian. Convert write4 to use little-endian as well (that's the correct endianness). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-11-20drivers/media/video: Add missing "space"Mauro Carvalho Chehab
From: Joe Perches <joe@perches.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-09-16Use correct error codes when chip is not recognized.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> If the chip isn't recognized, then the correct errors should be returned. The v4l2_i2c_attach() utility function will return 0 for all errors except -ENOMEM to provide proper compatibility support for the old I2C probing function. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/cs53l32a.c | 2 +- linux/drivers/media/video/cx25840/cx25840-core.c | 6 +++++- linux/drivers/media/video/msp3400-driver.c | 4 ++-- linux/drivers/media/video/saa7115.c | 4 ++-- linux/drivers/media/video/saa7127.c | 6 +++--- linux/drivers/media/video/tlv320aic23b.c | 2 +- linux/drivers/media/video/upd64031a.c | 2 +- linux/drivers/media/video/upd64083.c | 2 +- linux/drivers/media/video/v4l2-common.c | 2 +- linux/drivers/media/video/vp27smpx.c | 2 +- linux/drivers/media/video/wm8739.c | 4 ++++ 11 files changed, 22 insertions(+), 14 deletions(-)
2007-09-13cx25840: convert to bus-based I2C API.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- linux/drivers/media/video/cx25840/cx25840-core.c | 495 +++++++++-------------- 1 file changed, 202 insertions(+), 293 deletions(-)
2007-09-01cx25840: fix build warningMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Fix the following build warning: CC [M] cx25840-core.o cx25840-core.c: In function 'init_dll1': cx25840-core.c:147: warning: implicit declaration of function 'udelay' WARNING: "udelay" [cx25840.ko] undefined! Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-08-28cx25840: add a few 10 microsecond delaysHans Verkuil
From: Tyler Trafford <ttrafford@gmail.com> There were a couple of places in the cx25840 initialization where the datasheet called for a 10 microsecond delay, which we ignored because of the 10 usec I2C delay. Put them in anyway now that the I2C delay was decreased to 5 usec. Signed-off-by: Tyler Trafford <ttrafford@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-26cx25840: use a workqueue to load the firmwareHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Loading the firmware using the i2c bit-banging code blocks the kernel. Move the firmware load code into a workqueue so that it plays well with other processes. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-07cx25840: make proper use of SOFT_RESET.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Whenever the 0x80b register is used the microcontroller should be reset. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-05cx25840: add radio support.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-05cx25840: fix audio mute handling and reportingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Audio muting for the tuner input was implemented by stopping the audio microcontroller and restarting it on unmute. However, it appears that this method can actually crash the audio firmware. It's rare and seems to happen with NTSC only. It has been reimplemented by setting to volume to 0. In addition, the reporting of the mute state has been improved as well: it used to be impossible to detect whether the audio was muted by the user or if it was muted due to the microcontroller trying to detect the audio standard. This is now clearly stated. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-08-04cx25840: resetting also requires reloading the firmwareHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Resetting without reloading the firmware is not enough. Sometimes the firmware is 'stuck' and needs to be reloaded. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-07-22ivtv, cx25840: postpone fw load until first use.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The firmware is now loaded when the driver is actually used for the first time. This allows the driver to be compiled in-kernel instead of as a module. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-04-29Improve / fix support for PAL-60 in cx25840Mike Isely
From: Servaas Vandenberghe <vdb128@picaros.org> This causes the cx25840 module to treat V4L2_STD_PAL_60 similar to other 60Hz timings, and it fixes a wrongly-named variable (timings are independant of color system). Signed-off-by: Mike Isely <isely@pobox.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-03-03cx25840-firmware include cleanupHans Verkuil
From: Jean Delvare <khali@linux-fr.org> There is no reason why cx25840-firmware.c would need to include <linux/i2c-algo-bit.h>. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-27Improve VIDIOC_G_CHIP_IDENT (better diagnostics)Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Simplify the VIDIOC_G_CHIP_IDENT implementation by adding a single common function. The ident can now also return NONE: not found, UNKNOWN: found, but we don't know what chip it is, and AMBIGUOUS: multiple chips were matched so the match values were too general. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-24Add support for VIDIOC_G_CHIP_IDENTHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> VIDIOC_G_CHIP_IDENT improves debugging of card problems: it can be used to detect which chips are on the board and based on that information selected register dumps can be made, making it easy to debug complicated media chips containing tens or hundreds of registers. This ioctl replaces the internal VIDIOC_INT_G_CHIP_IDENT ioctl. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Jonathan Corbet <corbet@lwn.net>
2007-02-24Improve chip matching in v4l2_register for VIDIOC_DBG_G/S_REGISTERHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The chip matching in struct v4l2_register was rather primitive. It could not be extended to other busses besides i2c and it lacked a way to differentiate between two i2c chips driven by the same driver on one board (e.g. a PVR500 with two tuner chips, one for analog TV and one for radio). It has now been improved making it much more powerful. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Mike Isely <isely@isely.net> CC: Trent Piepho <xyzzy@speakeasy.org>
2007-02-19compat: Add -include linux/version.h to cflagsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add -include linux/version.h to the cflags. Now code can have backward compatibility test without including compat.h first. Linux headers included from compat.h are removed, so that code will get the same headers when compiling in v4l-dvb as it does in the kernel. Many drivers have compat.h moved to the end of their include list, as this lets compat.h do things it can't do at the beginning. Such as test of something is defined to include compat code, or to put a wrapper around a function without changing the function's name. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-02-15Fix cx25840 firmware loading.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Due to changes in the i2c handling in 2.6.20 this cx25840 bug surfaced, causing the firmware load to fail for the ivtv driver. The correct sequence is to first attach the i2c client, then use the client's device to load the firmware. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Acked-by: Mike Isely <isely@pobox.com>
2007-02-07Reverting patch d1bfc4440540ee9f86bff20850ed205d0ddad1bfMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Patch broke pvrusb2 driver. Reverting it. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-05cx25840 request_firmware failed due to wrong device.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Due to changes in the /sys directory structure a bug in the cx25840 firmware load surfaced in 2.6.20: the device passed to request_firmware was wrong: instead of the i2c device the i2c adapter was passed. Because of this an attemp was made to create a kobject with the adapter name inside the adapter directory, but a kobject with that name already exists. Now pass the i2c device itself so that the correct /sys directory is used. This way the firmware can be loaded again. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-02-03Fix cx2584x revision reporting.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Revisions >= 23 were always reported as revision 23. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-01-30Add checks for CAP_SYS_ADMIN to VIDIOC_DBG_G_REGISTERTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Before, root privileges were only needed to set hardware registers, not to read them. On some hardware, reading from the wrong place at the wrong time can hang the machine. So, to be consistent, root privileges are required to read registers on all hardware. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-01-23Make VIDIOC_INT_[SG]_REGISTER ioctls no longer internal onlyTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The direct register access ioctls were defined as kernel internal only, but they are very useful for debugging hardware from userspace and are used as such. Officially export them. VIDIOC_INT_[SG]_REGISTER is renamed to VIDIOC_DBG_[SG]_REGISTER Definition of ioctl and struct v4l2_register is moved from v4l2-common.h to videodev2.h. Types used in struct v4l2_register are changed to the userspace exportable versions (u32 -> __u32, etc). Use of VIDIOC_DBG_S_REGISTER requires CAP_SYS_ADMIN permission, so move the check into the video_ioctl2() dispatcher so it doesn't need to be duplicated in each driver's call-back function. CAP_SYS_ADMIN check is added to pvrusb2 (which doesn't use video_ioctl2). Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-12-12Add PAL-60 support for cx2584x.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-10-07Fix VIDIOC_G_FMT for NTSC in cx25840.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> VIDIOC_G_FMT returned the sliced VBI types in the wrong lines for NTSC (three lines too low). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-08-23Fixes Helper module dependencies against V4L APIsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-01Add support for PAL-Nc in cx24850.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-08-01cx25840_read4 has wrong endianness.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> cx25840_read4 assembled the bytes in the wrong order. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-06-18Use control helpers for saa7115, cx25840, msp3400.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Replace hardcoded control description by the standard ones supplied by v4l2-common. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-06-08Fixes a warning about using pll without init.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-04Fixed cx25840 to work with PAL/MMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Sub-carrier frequency for PAL/M is slicely different than NTSC/M. Without this patch, colors don't work on PAL/M. Setting method also improved to allow other video standards to be included. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-24Add NTSC sliced VBI support to the cx25840 module.Hans Verkuil
From: Christopher Neufeld <television@cneufeld.ca> NTSC sliced VBI support by Christopher Neufeld <television@cneufeld.ca> with additional fixes by Hans Verkuil <hverkuil@xs4all.nl>. Signed-off-by: Christopher Neufeld <television@cneufeld.ca> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-04-29Audio soft reset improvementsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The soft reset (de)assert commands where not at the right place. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-04-29From: Hans Verkuil <hverkuil@xs4all.nl>Hans Verkuil
merge: from master Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>