summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx25840
AgeCommit message (Collapse)Author
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>
2006-04-29From: Hans Verkuil <hverkuil@xs4all.nl>Hans Verkuil
Stop/start microcontroller when changing sampling frequency Stop/start microcontroller when changing sampling frequency to prevent tinny audio. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-04-23Remove broken 'fast firmware load' from cx25840.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The fast firmware load hack in cx25840 uses private data. In fact, it breaks pvrusb2 and doesn't work at all with ivtv. It is a unsafe implementation and so it is removed. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-04-22Add support for the cx25836/7 video decoder.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Scott Alfter <salfter@ssai.us> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-04-04kbuild: fix unneeded rebuilds in drivers/media/video after moving source treeMichael Krufky
From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Date: Mon, 3 Apr 2006 22:35:36 +0000 (+0200) Subject: kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree X-Git-Url: http://kernel.org/git/?p=linux/kernel/git/sam/kbuild-bugfix.git;a=commitdiff;h=8036dc6bdca0faa981be01377728678a6f6f3fde kbuild: fix unneeded rebuilds in drivers/media/video after moving source tree This fixes some uneeded rebuilds under drivers/media/video after moving the source tree. The makefiles used $(src) and $(srctree) for include paths, which is unnecessary. Changed to use relative paths. Compile tested, produces byte-identical code to the previous makefiles. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-03-29Reverted sliced VBI API changes made in videodev2.h.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The sliced VBI defines added in videodev2.h are removed. One define changed the meaning of a old define, thus breaking existing apps, another used more than 16 bits (the max size is u16), and many types were added that were untested and whose payload was undocumented. New types should be shown to exist 'in the wild' and the payload format must be documented in the V4L2 API spec. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-25Reduce FWSEND in cx25840 module due to certain I2C bus adapter limitsMike Isely
From: Mike Isely <isely@pobox.com> The FWSEND parameter controls the size of the firmware chunks sent down the I2C bus to the chip. Previously this had been set to 1024 but unfortunately some I2C implementations can't transfer data in such big gulps. Specifically, the pvrusb2 driver has a hard limit of around 60 bytes, due to the encapsulation there of I2C traffic into USB messages. So we have to significantly reduce this parameter. Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mike Isely <isely@pobox.com>
2006-03-25Added the new routing commands to cx25840.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Implement V4L2_TUNER_MODE_LANG1_LANG2 audio modeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add a new audio mode V4L2_TUNER_MODE_LANG1_LANG2 (used by VIDIOC_G/S_TUNER). This mode allows the user to select both languages of a bilingual transmission, one language on the left, one on the right audio channel. If there is no bilingual transmission, or it is not supported, then this mode should act like V4L2_TUNER_MODE_STEREO. This mode is introduced for PVR-like drivers where it is useful to be able to record both languages of a bilingual broadcast. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Merge from masterHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-19Cleanup audio input handlingHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Cleanup audio input handling in bttv and tvaudio: - inputs were specified that were never used - mute was handled as a special input which led to confusing code - confusing naming made it difficult to see if the setting was for i2c or gpio. The old audiochip.h input names moved to tvaudio.h. Currently this is used both by tvaudio and msp3400 until the msp3400 implements the new msp3400-specific inputs. Detect in bttv the tvaudio and msp3400 i2c clients and use these client pointers to set the inputs directly instead of broadcasting the command. Removed AUDC_SET_INPUT. Now replaced by VIDIOC_S_AUDIO. This will be replaced again later by the new ROUTING commands. Removed VIDIOC_G_AUDIO implementations in i2c drivers: this command is a user level command and not to be used internally. It wasn't called at all anyway. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-18Implement V4L2_TUNER_MODE_LANG1_LANG2 audio modeHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Add a new audio mode V4L2_TUNER_MODE_LANG1_LANG2 (used by VIDIOC_G/S_TUNER). This mode allows the user to select both languages of a bilingual transmission, one language on the left, one on the right audio channel. If there is no bilingual transmission, or it is not supported, then this mode should act like V4L2_TUNER_MODE_STEREO. This mode is introduced for PVR-like drivers where it is useful to be able to record both languages of a bilingual broadcast. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-17Fix saturation bug. Fix NTSC->PAL standard change. Detect NTSC-KR standard.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-03-13Kconfig: select VIDEO_CX25840 to build cx25840 a/v decoder moduleMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> The cx25840 module requires external firmware in order to function, so it must select FW_LOADER, but saa7115 and saa7129 do not require it. This patch creates VIDEO_CX25840, and alters VIDEO_DECODER to select it. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-02-16Fix maximum for the saturation and contrast controls.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-02-03Add V4L2_STD_NTSC_M_KR TV standard for South Korean NTSC-M using A2 audio.Hans Verkuil
From: Hans Verkuil South Korea uses NTSC-M but with A2 audio instead of BTSC. Several audio chips need this information in order to set the correct audio processing registers. Acked-by: Mauro Carvalho Chehab <mauro_chehab@yahoo.com.br> Signed-off-by: Hans Verkuil
2006-01-22audmode and rxsubchans fixes (VIDIOC_G/S_TUNER)Hans Verkuil
- audmode and rxsubchans fixes in msp3400, tuner, tvaudio and cx25840. - msp3400 cleanups Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-19Included new sliced VBI types to videodev2.h and tvp5150Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - Added other sliced VBI types to videodev2.h - tvp5150 now uses standard V4L2 API codes from videodev2.h - Implemented VIDIOC_G_SLICED_VBI_CAP for tvp5150. This is dynamically filled based on defined VDP C-RAM values filled by the driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-15From: Adrian Bunk <bunk@stusta.de>Mauro Carvalho Chehab
make some code static This patch makes some needlessly global code static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-12removed uneeded init on structs like static int foo=0Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - static vars are equal to zero by default. Removed unnecessary =0 from them, saving some data space; - Fixed compiling against kernels bellow 2.6.13. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-12debug renamed to cx25840_debugMauro Carvalho Chehab
From: Hans Verkuil <hverkuil@xs4all.nl> - debug var renamed to cx25840 to avoid conflicts with other var with the same name at kernel Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-11From: Panagiotis Issaris <takis@issaris.org>Mauro Carvalho Chehab
Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to k(z|c)alloc. kernel-sync Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-11Fixes some bad global variablesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@brturbo.com.br> - debug global var is already used inside kernel. - v4l_dbg now expects the debug var - global vars inside msp34xx renamed to msp_* Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-08i2c fixes and cleanupsMauro Carvalho Chehab
- Miscelaneous i2c cleanups and fixes to work with kernel >2.6.15 - linux/sound/pci/bt87x.c updated to kernel version. kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-07Some cleanups at I2C modulesMauro Carvalho Chehab
- Latest patch reverted, since __stringfy seems to be needed for kernel < 2.6.15 - Applied kernel I2C cleanups from Jean Delaware. - driver names simplified to allow usage of newer printk macros at v4l2-common.h Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-03Fix signed/unsigned bug in brightness handling of cx25840Hans Verkuil
Fix signed/unsigned bug in brightness handling (set to 0 and 128 was returned). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-01-03Fix signed/unsigned bug in hue handlingHans Verkuil
Fix signed/unsigned bug in hue handling (set to -127 and 129 was returned). Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>