Commit Graph

364 Commits (28e0d06655ddc6598155e2f71945f1abb00b398a)

Author SHA1 Message Date
Hans Verkuil 2ba588942c V4L/DVB (10544): v4l2-common: add comments warning that about the sort order
Control arrays as are used with v4l2_ctrl_next must be sorted from
low to high. Add a comment at the top of all such arrays to warn
about this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:46 -03:00
Igor M. Liplianin c9b8b04b26 V4L/DVB (10269): Add support for DVBWorld DVBS2 PCI-e 2005.
DVBWorld DVBS2 PCI-e 2005 card contains cx23885 PCI-e bridge
and cx24116 demodulator.
http://www.linuxtv.org/wiki/index.php/DVBWorld_DVB-S2_2005_PCI-Express_Card
The card tested by me (Igor).

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:24 -03:00
Igor M. Liplianin 579943f548 V4L/DVB (10267): Add support for TeVii S470 DVB-S2 PCI-e card.
TeVii S470 DVB-S2 PCI-e card contains cx23885 PCI-e bridge
and cx24116 demodulator.
http://www.linuxtv.org/wiki/index.php/TeVii_S470
The card tested by me (Igor).

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:23 -03:00
Igor M. Liplianin 96318d0cca V4L/DVB (10266): Add support for TurboSight TBS6920 DVB-S2 PCI-e card.
TurboSight TBS6920 DVB-S2 PCI-e card contains cx23885 PCI-e bridge
and cx24116 demodulator.
http://www.linuxtv.org/wiki/index.php/TBS_6920
The card tested by me (Igor).

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:23 -03:00
Andy Walls cd8f894eac V4L/DVB (10218): cx23885: Fix Oops for mixed install of analog and digital only cards
Analog support for HVR-1250 has not been completed, but does exist for
the HVR-1800.

Since both cards use the same driver, it tries to create the analog
dev for both devices, which is not possible.

This causes a NULL error to show up in video_open and mpeg_open.

-Mark

Iterations through the cx23885_devlist must check for NULL
pointers as some supported devices only have DVB support at the moment.
Mark Jenks encoutered an Oops in a system with both an HVR-1250 and HVR-1800
installed.

-Andy

Reported-by: Mark Jenks <mjenks1968@gmail.com>
Tested-by: Mark Jenks <mjenks1968@gmail.com>
Signed-off-by: Mark Jenks <mjenks1968@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-29 08:35:38 -02:00
roel kluin f347535a60 V4L/DVB (10148): cx23885: unsigned cx23417_mailbox cannot be negative
Unsigned cx23417_mailbox cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:12:18 -02:00
Hans Verkuil aecde8b53b V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID.
Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.

Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.

Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:52 -02:00
Hans Verkuil bec43661b1 V4L/DVB (10135): v4l2: introduce v4l2_file_operations.
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.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-02 17:11:12 -02:00
Igor M. Liplianin 9bb1b7e879 V4L/DVB (9795): Add Compro VideoMate E650F (DVB-T part only).
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-12-30 09:38:25 -02:00
Jelle Foks f8de18d430 V4L/DVB (9654): new email address
Please accept this patch to refer to my new email address

Signed-off-by: Jelle Foks <jelle@foks.us>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:35 -02:00
Mauro Carvalho Chehab 8b21c1e90e V4L/DVB (9885): drivers/media Kconfig's: fix bugzilla #12204
When the tuner modules were moved to common/tuners, a separate customize
option were added for tuners. However, the automatic selection of the
tuners were still using the older option.

This causes that the automatic selection to fail, if DVB_FE_CUSTOMISE is
selected. Also, since those tuners are now under MEDIA_TUNER_CUSTOMIZE
menu, if you unset MEDIA_TUNER_CUSTOMIZE, you can't manually select the
tuners.

This patch fixes this error by replacing DVB_FE_CUSTOMISE by
MEDIA_TUNER_CUSTOMIZE on all places were a tuner is selected.

The patch were generated by this small script:

for i in `find drivers/media -name Kconfig`; do
  cat $i|perl -ne 's/(MEDIA_TUNER.*)DVB_FE_CUSTOMISE/\1MEDIA_TUNER_CUSTOMIZE/; print $_' >a
  mv a $i
done

Also, manually reordered the tuner entries.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16 16:43:59 -02:00
Hans Verkuil c6330fb86f V4L/DVB (9327): v4l: use video_device.num instead of minor in video%d
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.

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
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:37 -02:00
Darron Broad 96b7a1a838 V4L/DVB (9271): videobuf: data storage optimisation (2)
To optimise data storage even further one other redundant
var has been removed.

This also removes a redundant assignment.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:29:59 -03:00
Darron Broad 7bdf84fc47 V4L/DVB (9265): videobuf: data storage optimisation
To optimise data storage redundant vars are removed.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:28:31 -03:00
Steven Toth 9c8ced511e V4L/DVB (9251): cx23885: Checkpatch compliance
cx23885: Checkpatch compliance

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:23 -03:00
Steven Toth eb0c58bb13 V4L/DVB (9232): cx23885: Move the MFE frontend allocation into the correct place
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.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:24:43 -03:00
Steven Toth a739a7e4c6 V4L/DVB (9231): cx23885: Define num_frontends as a function of the port
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.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:24:38 -03:00
Steven Toth d782ffa24f V4L/DVB (9230): cx23885: MFE related OOPS fix
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.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:24:32 -03:00
Darron Broad 59b1842da1 V4L/DVB (9227): MFE: Add multi-frontend mutual exclusion
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.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:24:15 -03:00
Darron Broad f972e0bd93 V4L/DVB (9224): MFE: bugfix: add missing frontend allocation
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.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:23:21 -03:00
Darron Broad 92abe9ee37 V4L/DVB (9223): MFE: Fix a number of bugs and some tidying up
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.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:23:15 -03:00
Steven Toth 363c35fc44 V4L/DVB (9222): S2API: Add Multiple-frontend on a single adapter support.
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.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:23:10 -03:00
Huang Weiyi fa405d7094 V4L/DVB: v4l2-dev: remove duplicated #include
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-10-13 09:57:20 -02:00
Mauro Carvalho Chehab 0975fc6871 V4L/DVB (9055): tuner-xc2028: Do a better job selecting firmware type
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:09 -02:00
Michael Krufky d7cba043d7 V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:09 -02:00
Michael Krufky ef80bfeb30 V4L/DVB (8968): replace xc3028 firmware filenames with defined default firmware names
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:02 -02:00
Michael Krufky 3065096190 V4L/DVB (8951): xc5000: dont pass devptr in xc5000_attach()
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.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:01 -02:00
Hans Verkuil d45b9b8ab4 V4L/DVB (8906): v4l-dvb: fix assorted sparse warnings
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.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Alexander Beregalov 26d2e854bc V4L/DVB (8559): replace __FUNCTION__ with __func__
v4l: replace __FUNCTION__ with __func__

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:56 -02:00
Steven Toth 4c56b04af6 V4L/DVB (8807): Add DVB support for the Leadtek Winfast PxDVR3200 H
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.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Stephen Backway <stev391@email.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:55 -02:00
Steven Toth 89ce2216e3 V4L/DVB (8646): cx23885: Convert framework to use a single tuner callback function.
Code reduction. Tuner callback now assumes that tsport is passed as the void arg.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:49 -02:00
Steven Toth 12886871ae V4L/DVB (8645): Support IR remote on FusionHDTV DVB-T Dual Express
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:49 -02:00
Steven Toth aef2d186e3 V4L/DVB (8644): Add support for DViCO FusionHDTV DVB-T Dual Express
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:49 -02:00
Steven Toth 90a71b1c1a V4L/DVB (8643): Switch Hauppauge HVR1400 and HVR1500 to common cx23885 tuner callback
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:49 -02:00
Steven Toth 0fbbff33fc V4L/DVB (8642): cx23885: Factor out common cx23885 tuner callback
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:48 -02:00
Hans Verkuil d56dc61265 V4L/DVB (8613): v4l: move BKL down to the driver level.
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:47 -02:00
Steven Toth 6d8976164d V4L/DVB (8805): Steven Toth email address change
I need this so I can better isolate my linux email from my
corporate email.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:21 -03:00
Adrian Bunk 445c2714cf V4L/DVB (8534): remove select's of FW_LOADER
After commit d9b19199e4
(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-27 12:24:37 -03:00
Hans Verkuil 0ea6bc8d43 V4L/DVB (8523): v4l2-dev: remove unused type and type2 field from video_device
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-27 11:07:10 -03:00
Hans Verkuil a399810ca6 V4L/DVB (8482): videodev: move all ioctl callbacks to a new v4l2_ioctl_ops struct
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:58 -03:00
Steven Toth 7e994302ed V4L/DVB (8472): cx23885: SRAM changes for the 885 and 887 silicon parts.
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: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:33 -03:00
Steven Toth d8d12b4367 V4L/DVB (8471): cx23885: Reallocated the sram to avoid concurrent VIDB/C issues.
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: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:31 -03:00
Steven Toth 6df516905b V4L/DVB (8470): cx23885: Add DViCO HDTV7 Dual Express tuner callback support.
Ensure the correct tuner gets reset on demand.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:30 -03:00
Steven Toth 1ecc5aed1e V4L/DVB (8469): cx23885: FusionHDTV7 Dual Express toggle reset.
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: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:28 -03:00
Steven Toth aaadeac88a V4L/DVB (8468): cx23885: Ensure the second transport port is enabled for streaming.
It was previously disabled pending a bugfix, which has since been
resolved.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:27 -03:00
Steven Toth 7b9139086a V4L/DVB (8467): cx23885: Minor cleanup to the debuging output for a specific register.
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: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:25 -03:00
Steven Toth 52ce27bfc4 V4L/DVB (8466): cx23885: Bugfix - DVB Transport cards using DVB port VIDB/TS1 did not stream.
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: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:24 -03:00
Steven Toth ecda5966c9 V4L/DVB (8465): cx23885: Ensure PAD_CTRL is always reset to a sensible default
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: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:22 -03:00
Steven Toth 28901ab621 V4L/DVB (8464): cx23885: Bugfix for concurrent use of /dev/video0 and /dev/video1
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: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-26 12:54:21 -03:00
Hans Verkuil 35ea11ff84 V4L/DVB (8430): videodev: move some functions from v4l2-dev.h to v4l2-common.h or v4l2-ioctl.h
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23 19:00:17 -03:00
Hans Verkuil 5e85e732f0 V4L/DVB (8428): videodev: rename 'dev' to 'parent'
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23 16:42:49 -03:00
Mauro Carvalho Chehab 432aa3b64d V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF
VIDEOBUF_DVB depends on VIDEOBUF_CORE, not on VIDEOBUF_DMA_SG

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:54 -03:00
Michael Krufky 52b5045078 V4L/DVB (8236): cx23885: add support for new revision of FusionHDTV7 Dual Express
The new revision of this board uses the same pci subsystem id as the first
revision, but uses a S5H1411 demodulator instead of the S5H1409.

In the case of the FusionHDTV7 Dual Express,
if s5h1409_attach fails, try s5h1411_attach.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:18:25 -03:00
Al Viro 86ecc02755 V4L/DVB (8133): cx23885 endianness fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:13:35 -03:00
Douglas Schilling Landgraf 305519c924 V4L/DVB (8120): cx23885-417: Replace cx23885_do_ioctl to use video_ioctl2
Convert cx23885-417 to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:43 -03:00
Hans Verkuil e0e31cdb91 V4L/DVB (8105): cx2341x: add TS capability
The cx18 can support transport streams with newer firmwares. Add a TS
capability to the generic cx2341x module.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:55 -03:00
Michael Krufky 335377b73d V4L/DVB (7986): cx23885: add initial support for DViCO FusionHDTV7 Dual Express
Only one frontend is enabled right now. The second frontend can lock,
but transport doesn't work yet.  The device will be supported as a
single tuner device until the second frontend is working.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:08:09 -03:00
Hans Verkuil 78b526a435 V4L/DVB (7949): videodev: renamed the vidioc_*_fmt_* callbacks
The naming for the callbacks that handle the VIDIOC_ENUM_FMT and
VIDIOC_S/G/TRY_FMT ioctls was very confusing. Renamed it to match
the v4l2_buf_type name.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:07:32 -03:00
Al Viro d8eaa58b06 V4L/DVB (7965): annotate bcx_riscmem
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-05 06:35:51 -03:00
Michael Krufky 48723543af V4L/DVB (7893): xc5000: bug-fix: allow multiple devices in a single system
The current code passes a context pointer in the xc5000_config struct.
This context pointer is used in the tuner_callback function, used to
reset the device after firmware download.

The xc5000_config struct is a static structure, whose .priv member was
being assigned before calling xc5000_attach().  If there are more than
one of the same device type installed on a single system, the last one
to assign xc5000_config.priv will "win", and all others will cease to
function properly.

This patch passes the context pointer in xc5000_attach() rather that
storing it within the static struct xc5000_config.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14 02:56:46 -03:00
Mauro Carvalho Chehab 755a18baad V4L/DVB (7851): Fix FW_LOADER depencency at v4l/dvb
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-14 02:54:08 -03:00
Mauro Carvalho Chehab fdbbfb092c V4L/DVB (7846): Re-creates VIDEO_TUNER
VIDEO_TUNER is responsible for compilation of tuners.ko module. This were the
previous behaviour before the creation of MEDIA_TUNER.

Before this patch, tuner.ko were created even for drivers that don't need a
tuner (like webcam drivers).

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14 02:54:07 -03:00
Michael Krufky fa146c6dce V4L/DVB (7829): cx23885: remove remaining references to dvb-pll
The cx23885 driver used to use dvb-pll for LG-TDVS-H064F support on the
FusionHDTV5 Express.  This has since been converted to use tuner-simple
instead, once digital tuning support was added to tuner-simple.

Since cx23885 no longer uses dvb-pll, remove the #include "dvb-pll.h",
and the DVB_PLL Kconfig selection.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14 02:54:02 -03:00
Michael Krufky 36396c8932 V4L/DVB (7828): cx23885: update model matrix for Hauppauge WinTV HVR-1200 & WinTV HVR-1700
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14 02:54:00 -03:00
Michael Krufky 3c3852cda6 V4L/DVB (7827): cx23885: add missing subsystem ID for Hauppauge HVR-1200 OEM
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14 02:54:00 -03:00
Michael Krufky b4edcc9083 V4L/DVB (7808): cx23885: fix kbuild dependencies
Thanks to Ingo Molnar for finding this.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14 02:53:59 -03:00
Mauro Carvalho Chehab 149ef72dee Rename common tuner Kconfig names to use the same
namespace for all of them.
2008-04-29 18:41:38 -03:00
Mauro Carvalho Chehab 7c91f0624a V4L/DVB(7767): Move tuners to common/tuners
There were several issues in the past, caused by the hybrid tuner design, since
now, the same tuner can be used by drivers/media/dvb and drivers/media/video.

Kconfig items were rearranged, to split V4L/DVB core from their drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-29 18:41:37 -03:00
Harvey Harrison b1721d0da2 v4l/dvb: add statics to avoid multiple definitions
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-25 19:06:59 -07:00
Steven Toth a589b66546 V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
cx23885: Enable cx23417 support on the HVR1800

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:50 -03:00
Steven Toth b1b81f1db7 V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
cx23885: Add generic cx23417 hardware encoder support.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:50 -03:00
Steven Toth 6676237398 V4L/DVB (7673): cx23885: Add support for the Hauppauge HVR1400
DVB-T mode is now supported using the DiBcom dib7000p demodulator
and the Xceive xc3028L silicon tuner. Analog mode is not supported.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:45 -03:00
Mauro Carvalho Chehab 33e5316113 V4L/DVB (7651): tuner-xc2028: Several fixes to SCODE
This patch fixes several issues on SCODE:

1) The extracting tool weren't generating the proper tags for SCODE. This
   has almost no effect, since those tags shouldn't be used;

2) DIBCOM52 were using a wrong IF. It should be 5200, instead of 5700;

3) seek_firmware were wanting an exact match for firmware type. This is
   wrong. As result, no SCODE firmware were loaded;

4) A few files were including the wrong file for seeking demod firmwares;

5) XC3028_FE_DEFAULT can be used, if user doesn't want to load a firmware.
   However, this weren't documentated. This feature require more testing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:44 -03:00
Steven Toth ce89cfb490 V4L/DVB (7648): cx23885: Load any module dependencies accordingly
For boards that require the avcore (cx25840) to be active, ensure
it gets loaded.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:44 -03:00
Steven Toth a780a31cee V4L/DVB (7647): Add support for the Hauppauge HVR-1700 digital mode
This adds support for DVB-T mode only, analog is not supported.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:44 -03:00
Steven Toth b3ea016689 V4L/DVB (7645): Add support for the Hauppauge HVR-1200
This adds support for DVB-T mode only, analog mode is not supported.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:44 -03:00
Janne Grunau 78e92006f4 V4L/DVB (7538): Adds selectable adapter numbers as per module option
The adapter_nr module options can be used to allocate static adapter
numbers on a driver level. It avoids problems with changing DVB apapter
numbers after warm/cold boot or device unplugging and repluging.

Each driver holds DVB_MAX_ADAPTER long array of the preferred order of
adapter numbers.

options dvb-usb-dib0700 adapter_nr=7,6,5,4,3,2,1,0 would result in a
reversed allocation of adapter numbers.

With adapter_nr=2,5 it tries first to get adapter number 2 and 5. If
both are already in use it will allocate the lowest free adapter number.

Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Acked-by: Hermann Pitton <hermann.pitton@arcor.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Harvey Harrison 22b4e64f0a V4L/DVB (7520): media/video/cx23885 replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:59 -03:00
Michael Krufky c0dc0c1122 V4L/DVB (7432): tda18271: allow device-specific configuration of rf agc top
allow device-specific configuration of rf agc rf top and if top

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky 14c74b23b6 V4L/DVB (7431): tda18271: allow device-specific configuration of IF level
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 827855d397 V4L/DVB (7412): use tuner-simple for LG TDVS-H06xF digital tuning support
Convert cx88-dvb, dvb-bt8xx, b2c2-flexcop, cxusb and cx23885 to use
tuner-simple instead of dvb-pll for LG TDVS-H06xF

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Mauro Carvalho Chehab b412ba781a V4L/DVB (7399): Removes video_dev from tuner-xc2028 config struct
The video_dev parameter, on tuner-xc2028 were used to pass i2c private data to
tuner_callback. Since the driver already have a pointer to i2c_adap->algo_data,
uses this instead.

This parameter were used also as a magic number to idenfity if two drivers are
trying to register the same xc3028 tuner. This occurs with boards with DVB
support, where both DVB and V4L drivers will share the same tuner.

Instead of using the algo_data as a private number, after this patch, the
driver will use i2c_adap->dev, with seems more consistent.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky 7f7203df3f V4L/DVB (7385): tda18271: store agc_mode configuration independently of std_bits
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:52 -03:00
Guennadi Liakhovetski a920e42f61 V4L/DVB (7374): Fix left-overs from the videobuf-dma-sg.c conversion to generic DMA
The dev element of the struct videobuf_queue is now of type struct device
implicitly. Fix left-over casts.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:51 -03:00
Guennadi Liakhovetski 0705135e59 V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic
DMA API, convert all affected drivers, relax Kconfig restriction, improve
compile-time type checking, fix some Coding Style violations while at it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Douglas Schilling Landgraf ff699e6bd0 V4L/DVB (7094): static memory
- Static memory is always initialized with 0.
- Replaced in some cases C99 comments for /* */

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:20 -03:00
Steven Toth 4b15b5ec36 V4L/DVB (7466): Avoid minor model number warning when an OEM HVR1250 board is detected
Avoid minor model number warning when an OEM HVR1250 board is detected.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:46 -03:00
Steven Toth c88133ecb3 V4L/DVB (7465): Fix eeprom parsing and errors on the HVR1800 products
On some models, the valid Hauppauge eeprom data begins at a different offset.
This patch avoid unfriendly 'corrupt' eeprom errors during driver load.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:45 -03:00
Steven Toth 31c8cc9742 V4L/DVB (7464): Convert driver to use a single SRAM memory map
This reduces the memory footprint and removes the need to
manually configure each map, which lead to a bug where
the Fusion EXP 5 board broke for a while.
This also fixes digital support again for
the DViCO FusionHDTV5Express.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:45 -03:00
Steven Toth 73c993a829 V4L/DVB (7045): xc5000: Small amount of cleanup and commenting
xc5000: Small amount of cleanup and commenting, just for clarification.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:07 -02:00
Steven Toth 8c70017f57 V4L/DVB (7044): XC5000: Fix support for HVR1500Q broken by patch 1
From Zhang: This patch fixes support for the HVR1500Q which was broken
when the xc5000 analog patch was added.

Patch committed as-is, cleanups to follows .... Steve

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:06 -02:00
Steven Toth dfc1c08aab V4L/DVB (7041): s5h1409: Bug fix for parallel support
Parallel support was not working with the s5h1409 and the Pinnacle HD800i.
This patch fixes the demodulator driver and ensures that all existing
s5h1409 based products configure the demodulator correctly.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:05 -02:00
Steven Toth 4513fc696e V4L/DVB (7014): cx23885: dprintk macro cleanup
Added missing do { } while (0)

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:51 -02:00
Steven Toth a19602f26a V4L/DVB (7011): cx23885: Cleanup of compiler defines and warnings
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:51 -02:00
Steven Toth 21a7809192 V4L/DVB (7010): cx23885: Small cleanup
cx23885: Small cleanup

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:50 -02:00
Steven Toth e47f30b140 V4L/DVB (7009): cx23885: Video and VBI related files
cx23885: Video and VBI related files.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:50 -02:00
Steven Toth 7b8880140f V4L/DVB (7007): cx23885: Add basic video support for the HVR1800
This enabled basic preview NTSC and PAL support for the HVR1800.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:49 -02:00
Steven Toth c771261330 V4L/DVB (7006): cx23885: Track the board clock frequency and allow overrides
The cx23885/6/8 all have different clock rates, this patch allows
the core to compensate, and developers to allow vendor specific
overrides. This patches will be used by future analog video
and encoder patches.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:49 -02:00
Steven Toth 69ad6e56ba V4L/DVB (7005): cx23885: SRAM reallocation prior to analog video implementation
We need to clear space large enough for the video and encoder fifos.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:48 -02:00
Steven Toth 5206d6ec36 V4L/DVB (7004): cx23885: Ensure HVR1800 TDA8295A is reset fully on module load
Failure to do this means that a full system reboot is required if the
part hangs.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:48 -02:00
Steven Toth 0ac5881aef V4L/DVB (7003): cx23885: Add support for device revision detection
Each version of the cx23885/7/8 silicon has different build revs.
We'll use this internal revision to work around bugs and known
issues in the video and encoder related patches.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:47 -02:00
Michael Krufky 2ba65d517b V4L/DVB (6963): tda18271: store IF frequency in a u16 instead of u32
Store IF Frequency in a u16 instead of a u32.  Multiply by 1000 before use.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:37 -02:00
Michael Krufky f21e0d7f05 V4L/DVB (6962): tda18271: allow device-specific configuration of IF frequency and std bits
Allow drivers to pass device-specific configuration parameters during attach.

If these parameters are omitted, default values will be used.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:36 -02:00
Michael Krufky 29a7b4cb44 V4L/DVB (6936): cx23885: update model matrix for Hauppauge HVR1500
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:29 -02:00
Michael Krufky b00fff0be5 V4L/DVB (6935): cx23885: add missing subsystem IDs for Hauppauge HVR1500 Retail
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:29 -02:00
Michael Krufky 68370cf94e V4L/DVB (6934): cx23885: update model matrix for Hauppauge HVR1250
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:28 -02:00
Michael Krufky 6a0a962cbc V4L/DVB (6933): cx23885: update model matrix for Hauppauge HVR1800
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:28 -02:00
Michael Krufky 6ccb8cfbb9 V4L/DVB (6932): cx23885: add missing subsystem ID for Hauppauge HVR1800 Retail
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:26 -02:00
Michael Krufky de7234bb05 V4L/DVB (6919): Kconfig: VIDEO_CX23885 must select DVB_TUNER_XC5000 if !DVB_FE_CUSTOMIZE
Everybody forgets to add the Kconfig stuff after they add new card support :-/

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:23 -02:00
Michael Krufky 4041f1a587 V4L/DVB (6909): cx23885: fix bad use count caused by tda18271 being probed by tda8290
Don't allow the tda8290 module to probe and attach the tuner module,
causing incorrect use counts when using dvb_attach.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:20 -02:00
Michael Krufky 478f42292d V4L/DVB (6901): Kconfig: VIDEO_CX23885 selects TUNER_TDA8290 and DVB_TDA18271
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:17 -02:00
Michael Krufky 3ba71d2194 V4L/DVB (6900): cx23885: enable EZ-QAM mode for Hauppauge WinTV HVR-1800
Add module option 'alt_tuner' disabled by default.

When set to one, the dvb_frontend of HVR1800 will consist of:
s5h1409 demod + tda18271 tuner

When set zero (default), the dvb_frontend of HVR1800 will consist of:
s5h1409 demod + mt2131 tuner

If the tda18271 is used in digital mode, you will not be able to
tune an analog channel at the same time.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:16 -02:00
Michael Krufky 4cd8a7bd65 V4L/DVB (6899): Kconfig: VIDEO_CX23885 must select TUNER_XC2028 if !DVB_FE_CUSTOMIZE
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:16 -02:00
Michael Krufky 07b4a835d4 V4L/DVB (6898): cx23885: add support for Hauppauge WinTV HVR-1500
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:16 -02:00
Steven Toth 6df9366857 V4L/DVB (6887): Avoid 'unknown model' message for the HVR1500-Q
Avoid 'unknown model' message for the HVR1500-Q

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:13 -02:00
Steven Toth e12671cf0c V4L/DVB (6886): xc5000: Cleanups of types, result codes etc
This translates much of the xceive coding style, adds
some result codes and generally cleans up whitespace
and function arguments.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:12 -02:00
Steven Toth d1987d55a1 V4L/DVB (6885): Add support for the Hauppauge HVR1500Q
The express card ATSC/QAM tuner.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:12 -02:00
Chris Pascoe 5e3c5967da V4L/DVB (6857): cx23885: correctly join I2C writes and reads from same address
When an I2C message specifies a write then a read from the same I2C address,
we need to tell the chip to not release the bus between the message parts.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:03 -02:00
Michael Krufky 2b03238a79 V4L/DVB (6821): s5h1409: fix IF frequency configuration
On the s5h1409 demod, the IF frequency for VSB is limited to 44 / 5.38 MHz.

Hardcode VSB IF frequency within the driver to 44 / 5.38 MHz.
QAM IF frequency remains configurable via attach-time configuration.

Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:44 -02:00
Brandon Philips 0fc0686e64 V4L/DVB (6600): V4L: videobuf: don't chew up namespace STATE_.*, convert to VIDEOBUF_
s/STATE_NEEDS_INIT/VIDEOBUF_NEEDS_INIT/g
s/STATE_PREPARED/VIDEOBUF_PREPARED/g
s/STATE_QUEUED/VIDEOBUF_QUEUED/g
s/STATE_ACTIVE/VIDEOBUF_ACTIVE/g
s/STATE_DONE/VIDEOBUF_DONE/g
s/STATE_ERROR/VIDEOBUF_ERROR/g
s/STATE_IDLE/VIDEOBUF_IDLE/g

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:11 -02:00
Adrian Bunk 39e75cfedf V4L/DVB (6575): cx23885/: cleanups
This patch contains the following cleanups:
- make the following needlessly global code static:
  - cx23885-core.c: struct cx23885_sram_channels[]
  - cx23885-core.c: struct cx23887_sram_channels[]
  - cx23885-core.c: cx23885_wakeup()
  - cx23885-core.c: cx23885_sram_channel_setup()
  - cx23885-core.c: cx23885_sram_channel_dump()
  - cx23885-core.c: cx23885_risc_disasm()
  - cx23885-core.c: cx23885_shutdown()
  - cx23885-core.c: cx23885_reset()
  - cx23885-core.c: cx23885_dev_unregister()
  - cx23885-core.c: cx23885_risc_databuffer()
  - cx23885-core.c: cx23885_risc_stopper()
- #if 0 the following unused functions:
  - cx23885-core.c: cx23885_risc_buffer()
  - cx23885-core.c: cx23885_cancel_buffers()
- remove the following unused EXPORT_SYMBOL's:
  - cx23885-cards.c: cx23885_boards
  - cx23885-i2c.c: cx23885_call_i2c_clients

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:05 -02:00
Steven Toth e92adc2c39 V4L/DVB (6404): cx23885: i2c 16bit reg/val read/write fix
Fix i2c reads and writes of 16bit register address / values

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:00:56 -02:00
Michael Krufky 867fee9b25 V4L/DVB (6871): Kconfig: VIDEO_CX23885 must select DVB_LGDT330X
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-24 08:07:36 -02:00
Randy Dunlap cb20630cef V4L/DVB (6479): use input functions, should depend on INPUT
All of these drivers select VIDEO_IR, which uses the input subsystem,
so they should also depend on INPUT.

Problem examples:

drivers/built-in.o: In function `ir_input_key_event':
ir-functions.c:(.text+0x10849a): undefined reference to `input_event'
ir-functions.c:(.text+0x1084ac): undefined reference to `input_event'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11cc0a): undefined reference to `get_key_pinnacle_color'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11cc4f): undefined reference to `get_key_pinnacle_grey'
drivers/built-in.o: In function `saa7134_input_fini':
(.text+0x11cd8b): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d1fa): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d317): undefined reference to `input_register_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d6ca): undefined reference to `input_free_device'

drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c3f3): undefined reference to `ir_codes_hauppauge_new'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c450): undefined reference to `ir_codes_pinnacle_color'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c480): undefined reference to `ir_codes_purpletv'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c495): undefined reference to `ir_codes_pinnacle_grey'
drivers/built-in.o: In function `saa7134_ir_start':
(.text+0x11c622): undefined reference to `ir_rc5_timer_end'
drivers/built-in.o: In function `saa7134_ir_start':
(.text+0x11c637): undefined reference to `ir_rc5_timer_keyup'
drivers/built-in.o: In function `build_key':
saa7134-input.c:(.text+0x11c769): undefined reference to `ir_extract_bits'
saa7134-input.c:(.text+0x11c7ad): undefined reference to `ir_input_keydown'
saa7134-input.c:(.text+0x11c7f0): undefined reference to `ir_input_keydown'
saa7134-input.c:(.text+0x11c7f9): undefined reference to `ir_input_nokey'
saa7134-input.c:(.text+0x11c806): undefined reference to `ir_input_nokey'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ca07): undefined reference to `ir_codes_encore_enltv'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11caf6): undefined reference to `ir_input_init'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cbf2): undefined reference to `ir_codes_avermedia'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc24): undefined reference to `ir_codes_pctv_sedna'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc53): undefined reference to `ir_codes_flydvb'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc85): undefined reference to `ir_codes_videomate_tv_pvr'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ccb7): undefined reference to `ir_codes_pixelview'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cce9): undefined reference to `ir_codes_eztv'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cd1b): undefined reference to `ir_codes_manli'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cda8): undefined reference to `ir_codes_cinergy'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cdd7): undefined reference to `ir_codes_flyvideo'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ce06): undefined reference to `ir_codes_asus_pc39'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ce7d): undefined reference to `ir_codes_gotview7135'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cee1): undefined reference to `ir_codes_proteus_2309'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:23 -02:00
Florin Malita fcf94c89af V4L/DVB (6325): Double-free in cx23885_initdev
Both cx23885_initdev and cx23885_dev_setup free the device in their
error path so a failure in the latter causes a double-free. Since
cx23885_dev_setup is only called from cx23885_initdev, it should be safe
to remove its deallocation and leave the cleanup up to the allocating
function.

Coverity CID 1922.

Signed-off-by: Florin Malita <fmalita@gmail.com>
CC: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-22 12:01:36 -02:00
Jean Delvare cdeec3cc79 cx23885: Drop empty i2c algorithm control callback
i2c_algorithm.algo_control is about to be removed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-13 23:56:32 +02:00
Trent Piepho a991f44b79 V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry
The rest of V4L files.

There is one list_for_each+list_entry in cpia_pp.c that
wasn't changed because it expects the loop iterator to remain NULL if
the list is empty.

A bug in vivi is fixed; the 'safe' version needs to be used because the loop
deletes the list entries.

Simplify a second loop in vivi and get rid if an un-used variable in that loop.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 13:35:29 -03:00
Michael Krufky 21a7ad4a7e V4L/DVB (6297): cx23885: remove wrong Kconfig selection of VIDEOBUF
fix bad Kconfig dependency of cx23885 module.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:15 -03:00
Mauro Carvalho Chehab aecfde539e V4L/DVB (6287): Fix DMA Scatter/Gather constructor
cx23885 driver were converted to use the newer videobuf support. Unfortunately,
the constructor weren't changed. This causes an oops, since the abstract methods
(implemented as callbacks) aren't defined.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
2007-10-10 00:03:09 -03:00
Trent Piepho 409d84f85a V4L/DVB (6284): cx23885: Update to new videobuf code
cx23885 was still uses the old video-buf includes and code, which would only
`work' if one happened to be compiling against a kernel that had the old
headers.  Even then, it wouldn't actually work, it would just compile without
errors.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:09 -03:00
Trent Piepho 5a3ebe8755 V4L/DVB (6283): videobuf: Remove references to old Kconfig option name
CONFIG_VIDEO_BUF_DVB became CONFIG_VIDEOBUF_DVB.

But in these cases, it makes more sense to use CONFIG_VIDEO_SAA7134_DVB
or CONFIG_VIDEO_CX88_DVB_MODULE depending on the driver.

The reference in cx23885.h should just be removed, as the code there needs to
be included if DVB is on or off.  I do not think you can even compile the
cx23885 driver without DVB.  It's clearly just leftover from when the file was
obvious copied from the cx88 driver (which is not mentioned in the copyright
BTW).

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:03:08 -03:00
Mauro Carvalho Chehab 28318c72ad V4L/DVB (6260): Fix Kconfig dependency
Thanks to Michael Krufky for pointing this to me.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-10 00:02:49 -03:00
Michael Krufky 0e789d7ffa V4L/DVB (6224): VIDEO_CX23885 depends on DVB_CORE
Fix the following dependency issue:

ERROR: "dvb_dmx_init" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_unregister_adapter" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_register_frontend" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_unregister_frontend" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_net_release" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_frontend_detach" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_dmxdev_release" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_dmx_swfilter" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_net_init" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_dmx_release" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_register_adapter" [drivers/media/video/video-buf-dvb.ko] undefined!
ERROR: "dvb_dmxdev_init" [drivers/media/video/video-buf-dvb.ko] undefined!

ERROR: "mt2131_attach" [drivers/media/video/cx23885/cx23885.ko] undefined!
ERROR: "s5h1409_attach" [drivers/media/video/cx23885/cx23885.ko] undefined!

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:40 -03:00
Michael Krufky c8e2f07be0 V4L/DVB (6222): select DVB_PLL if !DVB_FE_CUSTOMISE for FusionHDTV5 Express
VIDEO_CX23885 must select DVB_PLL if !DVB_FE_CUSTOMISE for FusionHDTV5 Express

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:40 -03:00
Michael Krufky f139fa71c0 V4L/DVB (6200): cx23885: use a pointer to the required i2c bus in dvb_register function
Store a pointer to the required i2c_bus so that we do not put the wrong
analog demod into standby.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:29 -03:00
Steven Toth a6a3f14035 V4L/DVB (6199): cx23885: Changes to allow demodulators on each transport bus
cx23885: Changes to allow demodulators on each transport bus.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:29 -03:00
Michael Krufky 9bc37caadf V4L/DVB (6196): cx23885: add support for DViCO FusionHDTV 5 Express
This patch adds digital ATSC / QAM support for the DViCO FusionHDTV5 Express.
Remote control is supported by ir-kbd-i2c, RTC is supported by rtc-isl1208.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:29 -03:00
Steven Toth 579f1163cd V4L/DVB (6195): Changes to support MPEG TS on VIDB
Changes to support MPEG TS on VIDB

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Steven Toth 6f074abb62 V4L/DVB (6194): Changes to support interrupts on VIDB
Changes to support interrupts on VIDB

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Michael Krufky ccbe64c664 V4L/DVB (6193): cx23885: define Video B Interrupt Status register bit values
- define missing register bit values for VID_B
- corrected VID/VBI_B_GPCNT_CTL register addresses

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Steven Toth 661c7e44c5 V4L/DVB (6192): Ensure start_dma() is capable of starting dma on port VIDB
start_dma() would fail to start dma if a device used VIDB (portb).

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Steven Toth bfde287c2f V4L/DVB (6191): Removed a redundant switch()
The switch() statement is no longer required.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:28 -03:00
Steven Toth fc959befe0 V4L/DVB (6190): cx23885: GPIO fix for non HVR1800lp boards
The HVR1250 and HVR1800 boards need the s5h1409 demod GPIO enabled.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:27 -03:00
Steven Toth 2df9a4c2d8 V4L/DVB (6173): cx23885: Minor cleanup and important NMI comment placed in code
I wanted to document the NMI assert issue inside the code, even though
it's already documented in the patch history. If/when the next cx23887
revision appears, is may need to be enabled on that also.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:26 -03:00
Steven Toth 86184e06da V4L/DVB (6172): cx23885: Removing duplicate tuner and demod definitions
A number of Hauppauge boards share the same tuner and demod
configurations. This patch removes duplicate structures.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:25 -03:00
Steven Toth 31bae4a620 V4L/DVB (6171): cx23885: Cleaning up defines
Moving some defines into the correct header file.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:22 -03:00
Steven Toth 2e52f215be V4L/DVB (6170): cx23885: General cleanup of old code
Removed unused code.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:21 -03:00
Steven Toth a77743bc2d V4L/DVB (6168): cx23885: Added HVR1250 ATSC support
Adding support for the Hauppauge HVR1250 PCIe ATSC board.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:20 -03:00
Steven Toth 4823e9ee9f V4L/DVB (6167): cx23885: Changed PCI quirks to after bridge detech
Changed the pci_quirks function to detech the bridge type before setting
the NMI clear bit, rather than detecting based on unique board id.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:17 -03:00
Steven Toth 426d523664 V4L/DVB (6166): cx23885: Ensure pci_quirks is called after board identification
The pci_quirks function was being called too early during initialisation,
it needs to be called after the board has been identified.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:16 -03:00
Michael Krufky b86b580244 V4L/DVB (6165): cx23885: fix Kconfig dependencies
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:15 -03:00
Michael Krufky 3c5666aee3 V4L/DVB (6164): cx23885: turn off i2c_debug by default
Turn off i2c_debug by default, to make the driver less verbose.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:15 -03:00
Michael Krufky 60a41d3b61 V4L/DVB (6163): cx23885: remove old comments
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:12 -03:00
Michael Krufky 44a6481dcd V4L/DVB (6162): cx23885: whitespace cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:11 -03:00
Michael Krufky 70ebd70573 V4L/DVB (6161): cx23885-dvb.c doesnt need to include dvb-pll.h
The dvb-pll module is not being used by this driver.
Remove the unneeded #include.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:10 -03:00
Steven Toth 047646bfbb V4L/DVB (6159): General code cleanup
Removed if 0'd code, removed cx88 references.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:09 -03:00
Steven Toth fe475163ff V4L/DVB (6158): Fix MT2131 tuner lock status problem
The mt2131 tuner reports lock even when the hardware should not
lock. This patch allows the s5h1409 demodulator to be configured to query
either the tuner driver for status, or the demodulator status when the
application requests lock status. This avoids returning false CARRIER
and/or SIGNAL lock status.

S5H1409 and MT2131 drivers.  This is the remainder of the changeset, which
only touches cx23885-dvb.c

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:06 -03:00
Steven Toth e133be0f58 V4L/DVB (6157): Removed the need to manually define .bridge for each card
Moved the field from cx23885_board to cx23885_dev and added code to
iautomatically set the bridge type based on the pci device id.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:06 -03:00
Steven Toth 0fc0739ba9 V4L/DVB (6156): Added the I2C_FUNC_I2C support to the cx23885 i2c algo definition
This is required to support the cx258xx family of audio and video decoders.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:05 -03:00
Steven Toth 3328e4fbf1 V4L/DVB (6155): Cleanup/remove code to access the sram memory maps
The cx23885 and cx23887 family use two different memory maps which govern
how the internal SRAM is configured. This patch streamlines the access to those
structures.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:02 -03:00
Steven Toth 3bd4065961 V4L/DVB (6154): NMI hang and corrupt transport packet fixes
The sram allocations for the cx23887 differ slightly from the cx23885.
This patch modifies the cx23887 specific sram memory map to reflect this.
As a result, interrupts and DMA handling have also been enabled in
cx23885_start_dma() for 887 specific boards.

ATSC streaming is now available on cx23885 and cx23887 bridges.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:01 -03:00
Steven Toth a2129af5b6 V4L/DVB (6153): I2C bus 3 register was incorrect
I2C bus 3 was being initialised with the incorrect address register.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:00 -03:00
Michael Krufky 03121f05f9 V4L/DVB (6152): cx23885: forward compatibility fixes for recent kernels
- fix #include for <media/video-buf-dvb.h>
- fix cx23885_irq declaration for 2.6.19 and later

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:08:00 -03:00
Steven Toth d19770e517 V4L/DVB (6150): Add CX23885/CX23887 PCIe bridge driver
This is a new framework to support boards based on the CX23885/7 PCIe
bridge. The framework supports digital (no analog yet)

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:07:56 -03:00