summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx23885
AgeCommit message (Collapse)Author
2008-12-30v4l2: introduce v4l2_file_operations.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Introduce a struct v4l2_file_operations for v4l2 drivers. Remove the unnecessary inode argument. Move compat32 handling (and llseek) into the v4l2-dev core: this is now handled in the v4l2 core and no longer in the drivers themselves. Note that this changeset reverts an earlier patch that changed the return type of__video_ioctl2 from int to long. This change will be reinstated later in a much improved version. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-12-16Revert changeset 9886Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Changeset 9886 were applied by mistake, reverting changeset 9885, that got a wrong comment. Let's revert it. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-23Add Compro VideoMate E650F (DVB-T part only).Mauro Carvalho Chehab
From: Igor M. Liplianin <liplianin@me.by> Add Compro VideoMate E650F (DVB-T part only). The card based on cx23885 PCI-Express chip, xc3028 tuner and ce6353 demodulator. CC: Steven Toth <stoth@linuxtv.org> Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-25fix boards for kernels with algo_controlMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> changeset 4ecae6da8244 removed algo_control from i2c drivers. However, on older kernels, a dummy function to implement algo_control is required, otherwise, an OOPS is generated. This patch adds a backport for all i2c drivers that defines an i2c_algorithm, except for cafe_ccic, since OLPC hardware only works for kernels newer than 2.6.19. Some of the backported drivers would need also extra changes to work with older kernels, as specified on v4l/versions.txt. Yet, I decided to add the backport for those drivers also, since the lack of algo_control doesn't generate any compilation error, but it is enough to break the driver. So, better to all for all boards than to allow compiling a kernel backported that just generates OOPS. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-20new email addressMauro Carvalho Chehab
From: Jelle Foks <jelle-v4l@foks.us> Please accept this patch to refer to my new email address Priority: normal Signed-off-by: Jelle Foks <jelle@foks.us> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-19v4l: use video_device.num instead of minor in video%dHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The kernel number of a v4l2 node (e.g. videoX, radioX or vbiX) is now independent of the minor number. So instead of using the minor field of the video_device struct one has to use the num field: this always contains the kernel number of the device node. I forgot about this when I did the v4l2 core change, so this patch converts all drivers that use it in one go. Luckily the change is trivial. Priority: high Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: michael@mihu.de CC: mchehab@infradead.org CC: corbet@lwn.net CC: luca.risolia@studio.unibo.it CC: isely@pobox.com CC: pe1rxq@amsat.org CC: royale@zerezo.com CC: mkrufky@linuxtv.org CC: stoth@linuxtv.org
2008-10-16videobuf: data storage optimisation (2)darron@kewl.org
From: Darron Broad <darron@kewl.org> To optimise data storage even further one other redundant var has been removed. This also removes a redundant assignment. Priority: normal Signed-off-by: Darron Broad <darron@kewl.org> iSigned-off-by: Steven Toth <stoth@linuxtv.org>
2008-10-15videobuf: data storage optimisationdarron@kewl.org
From: Darron Broad <darron@kewl.org> To optimise data storage redundant vars are removed. Priority: normal Signed-off-by: Darron Broad <darron@kewl.org> Signed-off-by: Steven Toth <stoth@linuxtv.org>
2008-10-16cx23885: Checkpatch complianceSteven Toth
From: Steven Toth <stoth@linuxtv.org> cx23885: Checkpatch compliance Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org>
2008-10-11cx23885: Move the MFE frontend allocation into the correct placeSteven Toth
From: Steven Toth <stoth@linuxtv.org> cx23885 frontend allocation code needs to exist in the higher function, and it also needs to ensure videobug is also correctly initialised on a per frontend basis. This code uses the previous num_frontends patch to safely init each future MFE frontend on a single tsport as as safely as possible - given that we don't have any of those boards. Again, better to add all of this safety code now, while the MFE patch set is fresh in everyone mind, than to try and add it 12-24 months from now, when the subject is cold. Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org>
2008-10-11cx23885: Define num_frontends as a function of the portSteven Toth
From: Steven Toth <stoth@linuxtv.org> This allows some cardcoded functions to be more flexible, and paves the way for any future cards that may have MFE support. Better to add it now when the MFE patches is fresh in peoples mind, rather than 12 months from now when new cards appear. Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org>
2008-10-11cx23885: MFE related OOPS fixSteven Toth
From: Steven Toth <stoth@linuxtv.org> Bug: the tree generated an oops when the cx23885 was laoded. This avoids the oops by ensuring the mutex is correctly initialised before it's used. Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org>
2008-10-11MFE: Add multi-frontend mutual exclusiondarron@kewl.org
From: Darron Broad <darron@kewl.org> This add frontend R/W mutual exclusion. Prior to this point in time it was possible to open both frontends simultaneously which an MFE card cannot support. In order to stop this, a delayed open is performed which has the following function: Return EBUSY after a configurable amount of time if a frontend is unavailable due to the other being in use. Only allow opening of a frontend if the kernel thread of the other has stopped. This solution was chosen to allow switching between frontends to work as seamlessly as possible. When both frontends are actually opened simultaneously then one will only open, but if quick switching is performed between one of many then the new open will succeed in a clean fashion rather than interrupting a kernel thread. Priority: normal Signed-off-by: Darron Broad <darron@kewl.org>
2008-10-11MFE: bugfix: add missing frontend allocationdarron@kewl.org
From: Darron Broad <darron@kewl.org> When using MFE on a setup with both and HVR-3000 and ASUS P7131 card it was noticed that frontend allocation for saa7134 adapters was missing. This patch adds that allocation for both saa7134 and cx23885 adapters. Priority: normal Signed-off-by: Darron Broad <darron@kewl.org>
2008-10-11MFE: Fix a number of bugs and some tidying updarron@kewl.org
From: Darron Broad <darron@kewl.org> A number of reference to videobuf_dvb_get_frontend used an invalid index. This has been fixed. The section for the HVR3000 in advise_acquire was redundant as the same logic is used on the HVR4000. This has been removed and both cards now use the same function. A number of small errors and whitespace errors are also fixed. Priority: normal Signed-off-by: Darron Broad <darron@kewl.org>
2008-10-11S2API: Add Multiple-frontend on a single adapter support.darron@kewl.org
From: Steven Toth <stoth@linuxtv.org> A detailed description from the original patches 2 years ago: "The WinTV-HVR3000 has a single transport bus which is shared between a DVB-T and DVB-S modulator. These patches build on the bus acquisition cx88 work from a few weeks ago to add support for this. So to applications the HVR3000 looks like this: /dev/dvb/adapter0/fe0 (cx24123 DVB-S demod) /dev/dvb/adapter0/fe1 (cx22702 DVB-T demod) Additional boards continue as before, eg: /dev/dvb/adapter1/fe0 (lgdt3302 ATSC demod) The basic change is removing the single instance of the videobuf_dvb in cx8802_dev and saa7134_dev(?) and replacing it with a list and some supporting functions. *NOTE* This branch was taken before v4l-dvb was closed for 2.6.19 so two or three current cx88 patches appear to be reversed by this tree, this will be cleaned up in the near future. The patches missing change the mutex handing to core->lock, fix an enumeration problem." It should be recognised that a number of people have been maintaining this patchset. Significant levels of Kudos to everyone one involved, including but not limited to: Darron Broad Fabio M. Di Nitto Carlo Scarfoglio Hans Werner Without the work of these people, and countless others, my two year old patches would of died on the Mercurial linuxtv.org vine a long time ago. TODO: Revise these patches a little further so that the need for demux1 and dvr0 is optional, not mandatory on the HVR3000. HISTORY (darron): This is the last update to MFE prepared by Hans which is based upon the `scratchpad' diff created by Carlo. All MFE work prior to that point must be attributed to Fabio who ported and maintained Steve's original patch up to that time. Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Darron Broad <darron@kewl.org>
2008-10-12V4L/DVB: v4l2-dev: remove duplicated #includeMauro Carvalho Chehab
From: Huang Weiyi <weiyi.huang@gmail.com> Removed duplicated include "media/cx2341x.h" in drivers/media/video/cx23885/cx23885-417.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-28tuner-xc2028: Do a better job selecting firmware typeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@redhat.com> Firmware selection is very tricky on this device. This patch do a better selection of the proper firmware type, by using a code to hint if the firmware to be loaded should be D2620 or D2633. It also allows overriding the hint at the control structure. Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-12convert tuner drivers to use dvb_frontend->callbackMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Priority: normal Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-09-16replace xc3028 firmware filenames with defined default firmware namesMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Priority: normal Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-09-06xc5000: dont pass devptr in xc5000_attach()Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Dont pass devptr in xc5000_attach, dont store it in xc5000_priv. This pointer is passed into the tuner_callback function, which always expects a pointer to fe->dvb->priv or i2c_adapter->algo_data. This prevents future possible bugs in new drivers, such as using a "devptr" other that the standard fe->dvb->priv in a DVB driver. Priority: normal Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-09-04v4l-dvb: fix assorted sparse warningsHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Fix sparse warnings. None are serious, but cutting down on these helps find future serious sparse warnings/errors. Redid the av7710.c patch based on a suggestion by Oliver Endriss. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-08-29merge: http://www.linuxtv.org/hg/~stoth/cx23885-leadtekMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-08-28Steven Toth email address changeSteven Toth
From: Steven Toth <stoth@hauppauge.com> I need this so I can better isolate my linux email from my corporate email. Priority: normal Signed-off-by: Steven Toth <stoth@linuxtv.org>
2008-08-12Add DVB support for the Leadtek Winfast PxDVR3200 HSteven Toth
From: Steven Toth <stoth@hauppauge.com> This patch is on behalf of Stephen Backway <stev391@email.com>, and represents two patches I received (and some subsequent whitespace cleanup I had due to how I pulled the patches). From the original author: a) Add DVB support for the Leadtek Winfast PxDVR3200 H. b) The tuner callback previously checked the command 3 times: 1) To see if it was the XC2028_RESET_CLK 2) To see if it was not the XC2028_RESET_TUNER 3) To see if it was the XC2028_RESET_TUNER This patch removes the third check. Priority: normal Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Stephen Backway <stev391@email.com>
2008-08-04cx23885: Convert framework to use a single tuner callback function.Steven Toth
From: Steven Toth <stoth@hauppauge.com> Code reduction. Tuner callback now assumes that tsport is passed as the void arg. Signed-off-by: Steven Toth <stoth@hauppauge.com>
2008-08-04Support IR remote on FusionHDTV DVB-T Dual ExpressSteven Toth
From: Steven Toth <stoth@hauppauge.com> From Chris Pascoe <c.pascoe@itee.uq.edu.au> Support IR remote on FusionHDTV DVB-T Dual Express Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Anton Blanchard <anton@samba.org>
2008-08-04Add support for DViCO FusionHDTV DVB-T Dual ExpressSteven Toth
From: Steven Toth <stoth@hauppauge.com> Add support for the DViCO FusionHDTV DVB-T Dual Express card, based on work by Chris Pascoe and Stephen Backway. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Anton Blanchard <anton@samba.org>
2008-08-04Switch Hauppauge HVR1400 and HVR1500 to common cx23885 tuner callbackSteven Toth
From: Steven Toth <stoth@hauppauge.com> The Hauppauge HVR1400 and HVR1500 can now use the common cx23885 tuner callback. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Anton Blanchard <anton@samba.org>
2008-08-04cx23885: Factor out common cx23885 tuner callbackSteven Toth
From: Steven Toth <stoth@hauppauge.com> Tuners currently hook different things to the private pointer in their callback function. Longer term we should make that private pointer consistent, but for now separate out the guts of the cx23885 tuner callback so we can reuse it. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Anton Blanchard <anton@samba.org>
2008-07-30v4l: move BKL down to the driver level.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The BKL is now moved from the video_open function in v4l2-dev.c to the various drivers. It seems about a third of the drivers already has a lock of some sort protecting the open(), another third uses video_exclusive_open (yuck!) and the last third required adding the BKL in their open function. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-21replace __FUNCTION__ with __func__Mauro Carvalho Chehab
From: Alexander Beregalov <a.beregalov@gmail.com> v4l: replace __FUNCTION__ with __func__ Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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-26v4l2-dev: remove unused type and type2 field from video_deviceHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-21videodev: move all ioctl callbacks to a new v4l2_ioctl_ops structHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> All ioctl callbacks are now stored in a new v4l2_ioctl_ops struct. Drivers fill in a const struct v4l2_ioctl_ops and video_device just contains a const pointer to it. This ensures a clean separation between the const ops struct and the non-const video_device struct. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-26merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-audiochipMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23v4l: remove obsolete audiochip.hHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Converted the last users of audiochip.h to the v4l2-chip-ident.h header and remove the now unused audiochip.h header. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-20videodev: move some functions from v4l2-dev.h to v4l2-common.h or v4l2-ioctl.hHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The functions in a header should not belong to another module. The prio functions belong to v4l2-common.c, so move them to v4l2-common.h. The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header and move those functions to it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-20videodev: rename 'dev' to 'parent'Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The field 'dev' is not the video device, but the parent of the video device. Rename accordingly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-17media/video: Fix depencencies for VIDEOBUFMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> VIDEOBUF_DVB depends on VIDEOBUF_CORE, not on VIDEOBUF_DMA_SG Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-01cx23885: SRAM changes for the 885 and 887 silicon parts.Steven Toth
From: Steven Toth <stoth@hauppauge.com> In a previous patch I merged both memory maps into a single struct, believing that they could be combined. We've since found problems with streaming multiple channels on the 885. I'm restoring the multiple memory map structs - in line with the windows driver. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: <>
2008-07-01cx23885: Reallocated the sram to avoid concurrent VIDB/C issues.Steven Toth
From: Steven Toth <stoth@hauppauge.com> This may be cx23885 chip specific and may not work on the cx23887. Analog and mpeg encoder streaming are still to be tested. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: <>
2008-06-30cx23885: Add DViCO HDTV7 Dual Express tuner callback support.Steven Toth
From: Steven Toth <stoth@hauppauge.com> Ensure the correct tuner gets reset on demand. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: <>
2008-06-30cx23885: FusionHDTV7 Dual Express toggle reset.Steven Toth
From: Steven Toth <stoth@hauppauge.com> Ensure the tuners and demods are brought in and out of reset during driver startup. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: <>
2008-06-30cx23885: Ensure the second transport port is enabled for streaming.Steven Toth
From: Steven Toth <stoth@hauppauge.com> It was previously disabled pending a bugfix, which has since been resolved. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: <>
2008-06-30cx23885: Minor cleanup to the debuging output for a specific register.Steven Toth
From: Steven Toth <stoth@hauppauge.com> Don't display the register when it's not appropriate for the specific port. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: <>
2008-06-27cx23885: Bugfix - DVB Transport cards using DVB port VIDB/TS1 did not stream.Steven Toth
From: Steven Toth <stoth@hauppauge.com> Certain DVB cards that have demodulators on TS1/VIDB were not streaming packets. This ensure the pin directions on PAD_CTRL are set correctly, solving the issue. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: <>
2008-06-27cx23885: Ensure PAD_CTRL is always reset to a sensible defaultSteven Toth
From: Steven Toth <stoth@hauppauge.com> PAD_CTRL controls TS1 and TS2 input and output states, if the register became corrupt the driver was never able to recover. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: <>
2008-06-27cx23885: Bugfix for concurrent use of /dev/video0 and /dev/video1Steven Toth
From: Steven Toth <stoth@hauppauge.com> With the HVR1800, trying to use video0 and video1 simultaneously caused buffer corruption in the PCIe bridge. This fix reallocates video1 buffer locations to avoid the issue. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: <>
2008-07-09merge: http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-compatMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>