Commit Graph

33751 Commits (8ca4083b50752d588f8b8b1e5e5776fb17d00304)

Author SHA1 Message Date
Mike Isely 787f5abb95 V4L/DVB (6768): pvrusb2: Mark Gotview hardware as having a cx2584x part
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:25 -02:00
Hans Verkuil 2a2bfbff3d V4L/DVB (6766): ivtv: remove i2c legacy support from drivers that no longer need it
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:24 -02:00
Hans Verkuil d900920120 V4L/DVB (6765): ivtv: convert to bus-based i2c API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:24 -02:00
Hans Verkuil 9d1a16a4fc V4L/DVB (6764): ivtv: select VIDEO_IR in Kconfig
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:24 -02:00
Hans Verkuil e08323f099 V4L/DVB (6763): ivtv: add AVerMedia EZMaker PCI Deluxe support
Add support for the AVerMedia EZMaker PCI Deluxe and update the ivtv cardlist.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:23 -02:00
Hans Verkuil 0170a48274 V4L/DVB (6762): ivtv: update version number to 1.2
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:22 -02:00
Mauro Carvalho Chehab e2c77314c9 V4L/DVB (6759): CodingStyle fixes
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:22 -02:00
Mauro Carvalho Chehab 543323bcf4 V4L/DVB (6758): Miscelaneous cleanups
Manually fixed all pertinent checkpatch.pl errors inside the source code.

Also removed some unused code at the driver and a few minor cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:22 -02:00
Mauro Carvalho Chehab 025341d4f0 V4L/DVB (6755): Avoid troubles when using multiple devices
mv_count is a counter used to move the vertical bars. Before this patch, it
where a static var. This works fine for just one device. However, when using
multiple devices, every device would increment it.

This patch moves it to its correct place: struct vivi_dev. So, now, each device
has its own data.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:22 -02:00
Mauro Carvalho Chehab 55712ff7e0 V4L/DVB (6754): Allow vivi to open multiple video devices
Now, it is possible to open multiple vivi devices, by using n_devs parameter.
This makes vivi driver closer to a real one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:21 -02:00
Mauro Carvalho Chehab f905c442e5 V4L/DVB (6753): Fix vivi to support non-zero minor node
There were a trouble at vivi driver when using non-zero inodes. This where due
to not properly preserving the minor inode after calling video_register. Since
this driver is a reference for newer drivers, and it is possible to have more
than one video device inside the machine, this patch makes vivi to dynamically
allocate video_device struct.

Thanks to Gregor Jasny <jasny@vidsoft.de> for pointing the issue.

Also, this patch removes a very anoying (but useless) message of not having a
proper release call.

CC: Gregor Jasny <jasny@vidsoft.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:21 -02:00
Albert Graham d2761f2271 V4L/DVB (6752): saa7134: Enable remote control support for Avermedia M102
This patch enabled the IR remote control for the Avermedia M102 (card=110),
which appears to be the same IR as the already supported device on the
Avermedia AVerTV GO 007 FM (card=57) model, the code is two one liners which
enable the IR for this device (subsystem: 1461:f31e)

Signed-off-by: Albert Graham <agraham@g-b.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:21 -02:00
Andrew Morton d172b8bdab V4L/DVB (6749): v4l-nopage-fix
dont just copy-and-paste stuff.
(compile-tested this time)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:20 -02:00
Nick Piggin 105354a0f0 V4L/DVB (6748): Subject: v4l: nopage
Convert v4l from nopage to fault.
Remove redundant vma range checks.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:18 -02:00
Michael Krufky 14e3c152a1 V4L/DVB (6745): tda18271: remove tuning offset for atsc/qam
The tuning request coming in from userspace is already center adjusted,
so we should not adjust to center (+1.75mhz) within the driver.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:18 -02:00
Hans Verkuil 4a56eb3f53 V4L/DVB (6743): cx25840: fix endianness inconsistency
cx25840_read4 reads a little-endian 32-bit value whereas cx25840_write4 writes
the 32-bit value as big-endian. Convert write4 to use little-endian as well
(that's the correct endianness).

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:17 -02:00
Hans Verkuil 6b1e56763b V4L/DVB (6742): ivtv: fix incorrect debug message
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:17 -02:00
Hans Verkuil 737bd410e7 V4L/DVB (6741): cx2341x: codingstyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:17 -02:00
Hans Verkuil 574dec611f V4L/DVB (6740): tlv320aic23b: codingstyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:17 -02:00
Hans Verkuil 4c05de9c97 V4L/DVB (6739): cs53l32a: codingstyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:16 -02:00
Hans Verkuil 099b8e7361 V4L/DVB (6738): wm8739: codingstyle cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:16 -02:00
Hans Verkuil 842441d42d V4L/DVB (6737): wm8775: codingstyle cleanup
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:16 -02:00
Mauro Carvalho Chehab 8c85454a59 V4L/DVB (6736): Fix some errors at the video_ioctl2 conversion
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:15 -02:00
Mauro Carvalho Chehab 90bdc14533 V4L/DVB (6735): Reorder functions to make easier to compare with the previous code
After this patch, the order of the functions will be the same as before the
patch converting the driver to user video_ioctl2. This makes easier to diff
between the previous version and the newer one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:15 -02:00
Douglas Schilling Landgraf 8f61ae2f4f V4L/DVB (6734): Converted saa7134-video to use video_ioctl2
Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:15 -02:00
Oliver Neukum 863c86dd7e V4L/DVB (6732): dsbr100 violates DMA coherency rules
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:14 -02:00
Richard Knutsson e1ba33df0c V4L/DVB (6731): ivtv: Remove a invalid shadow-variable
Remove the shadowing 'struct v4l2_chip_ident *chip', since it already exists
and makes the if-statement useless.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:14 -02:00
Michael Krufky 5d2bf930a2 V4L/DVB (6728): tda18271: fix register dump format
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:14 -02:00
Michael Krufky b5f3e1e153 V4L/DVB (6727): tda18271: convert table lookup loops to functions
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:13 -02:00
Michael Krufky aaeccba68a V4L/DVB (6726): tda18271: set image rejection validity
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:13 -02:00
Michael Krufky 293da0ec46 V4L/DVB (6725): tda18271: improve debug flexibility
converted debug module option to an or-able setting.

1 = info
2 = table map values
4 = register dumps

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:12 -02:00
Michael Krufky 1457263e9d V4L/DVB (6724): tda18271: remove duplicated code
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:12 -02:00
Michael Krufky efce841093 V4L/DVB (6723): tda18271: only force init once during attach
Once the image rejection calibration procedure has been successful,
we should not initialize the tuner registers again.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:12 -02:00
Ian Armstrong 2b057e8dc6 V4L/DVB (6719): ivtv: ivtv-yuv clean-up + source cropping bug-fix
ivtv-yuv code clean up & reformat. Includes minor changes to some debug lines.

Also fixes a bug found during the reformatting, which would cause the
incorrect amount of yuv data to be sent to the card if source cropping
coordinates were used.

Apart from the bug-fix, there should be no functional difference to the
previous version.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:11 -02:00
Ian Armstrong 368f080b68 V4L/DVB (6718): ivtv: ivtv yuv format description correction
The driver was incorrectly reporting that it supported YUV 4:2:2 output, when
it is actually YUV 4:2:0. Though I believe the hardware can be pushed to
4:2:2, we don't currently support that.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:11 -02:00
Ian Armstrong 77aded6ba5 V4L/DVB (6717): ivtv: Initial merge of video48 yuv handling into the IVTV_IOC_DMA_FRAME framework
Previously, all yuv data written to /dev/video48 had only basic support with
no double buffering to avoid display tearing.

With this patch, yuv frames written to video48 are now handled by the existing
IVTV_IOC_DMA_FRAME framework. As such, the frames are hardware buffered to
avoid tearing, and honour scaling mode & field order options. Unlike the
proprietary IVTV_IOC_DMA_FRAME ioctl, all parameters are controlled by the
V4L2 API.

Due to mpeg & yuv output restrictions being different, their V4L2 output
controls have been separated. To control the yuv output, the V4L2 calls must
be done via video48.

If the ivtvfb module is loaded, there will be one side effect to this merge.
The yuv output window will be constrained to the visible framebuffer area. In
the event that a virtual framebuffer size is being used, the limit to the
output size will be the virtual dimensions, but only the portion that falls
within the currently visible area of the framebuffer will be shown.

Like the IVTV_IOC_DMA_FRAME ioctl, the supplied frames must be padded to 720
pixels wide. However the height must only be padded up the nearest multiple
of 32. This would mean an image of 102 lines must be padded to 128. As long
as the true source image size is given, the padding will not be visible in
the final output.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:11 -02:00
Ian Armstrong 3b5c1c8e71 V4L/DVB (6716): ivtv: yuv interlace mode change
Interlace mode selection code moved into the frame setup phase, so it's now
run before the frame is loaded into a hardware buffer. Given that it can
affect how a new frame is displayed, it was a bit stupid running it after the
frame was already visible.

A few stray interlace related variables which were linked to individual frames
have now been moved into the yuv_frame_info struct. This means that all
variables linked to a specific frame are in the same place & not scattered.

Minor code reformatting in areas touched by the above changes.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:10 -02:00
Ian Armstrong 406c8b0ff0 V4L/DVB (6715): ivtv: Remove unnecessary register update
To reduce the number of display register accesses, the yuv code keeps track of
the current video settings. Should there be a change in any single parameter,
it will update the associated display registers to ensure everything is
displayed correctly.

The existing check also looks at the field order for the video. This is not
required, since field reversal does not require any display register changes.

This patch removes the field order from the check.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:10 -02:00
Ian Armstrong 166983cdfb V4L/DVB (6714): ivtv: yuv frame parameter fix
Inadvertently missed a line when converting code to new hardware buffering
method. In some circumstances, this would lead to a frame being displayed
using parameters belonging to another frame.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:10 -02:00
Ian Armstrong a3e5f5e2df V4L/DVB (6713): ivtv: ivtv_yuv_prep_frame breakup and yuv hardware buffer changes
ivtv_yuv_prep_frame is split in smaller code blocks.

Modified yuv buffer handling on the PVR350 itself. We now cycle through all 8
hardware buffers.

With this patch in place, driver behaviour should remain unchanged from the
existing release.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:10 -02:00
Ian Armstrong c240ad00af V4L/DVB (6712): ivtv: ivtv yuv stream handling change
Currently the yuv output stream buffer is divided into blocks whose size
depend on the broadcast standard selected during the driver init phase.
However, the standard can be changed after the init phase. This effectively
breaks the yuv output stream handler, since it relies on the different yuv
planes being block aligned.

This patch changes the setup, so that the block size is always the same. The
decoder dma function has been modified to cope with the fact that the second
yuv plane may no longer be block aligned. The start of the yuv frame must
still be at the beginning of a block, so the stream write function has also
been modified to ensure this is always true.

Also, the stream write function will now initiate a yuv dma transfer as soon
as a full frame is ready. It will not wait until the current write request
has completed, or the stream buffer becomes full.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:09 -02:00
Mike Isely 9de982d311 V4L/DVB (6710): pvrusb2: Recognize ATSC video standard bit values
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:09 -02:00
Mike Isely 3d290bdb28 V4L/DVB (6709): pvrusb2: minor rework for default video standard handling
pvrusb2: When a per-device-type default video standard is declared,
handle it in such a way that it can be correctly and unambiguously
reported in the system log.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:08 -02:00
Mike Isely 4ca7f70928 V4L/DVB (6708): pvrusb2: Expand comment in device attributes description
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:07 -02:00
Mike Isely e802c14b91 V4L/DVB (6707): pvrusb2: Remove use of volatile in pipeline control state machine
pvrusb2: Eliminate use of volatile in pipeline control state
variables.  These were all cases of paranoia; upon further review the
overall mechanism employed here should not require use of volatile.
This had originally been done out of paranoia, and I have since been
convinced that the paranoia is not required.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:07 -02:00
Mike Isely 26e33048aa V4L/DVB (6706): pvrusb2: Remove use of volatile in command sequencer
pvrusb2: Remove use of volatile for command sequencer; these variables
are set by interrupt-context code and we check their state in such a
manner that there should be no race conditions.  This had originally
been done out of paranoia, and I have since been convinced that the
paranoia is not required.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:07 -02:00
Mike Isely 6a54025496 V4L/DVB (6705): pvrusb2: Implement default standard selection based on device type
This adds a default video standard setting to the pvr2_device_desc
structure for describing device types.  With this change it is
possible to set a reasonable default standard based on device type.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:06 -02:00
Roel Kluin ea2562d94f V4L/DVB (6703): pvrusb2: Change division to bit-or for tveeprom standards
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:06 -02:00
Michael Krufky 482cb9a75b V4L/DVB (6702): pvrusb2: fix typo in comments
Firmware file name(s) for 24xxx devices

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:06 -02:00
Mike Isely 9e2e3aeb2d V4L/DVB (6701): pvrusb2: Enable support for "GOTVIEW USB2.0 DVD2" hardware
This changeset allows the pvrusb2 driver to operate a new device type
("GOTVIEW USB2.0 DVD2").  Changes amount to defining a new routing
scheme for the device and adding appropriate table entries into
pvrusb2-devattr.c.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:06 -02:00
Mike Isely 65bd80fe18 V4L/DVB (6700): pvrusb2: Soften the crashed encoder warning message
The pvrusb2 driver has been successfully recovering from a crashed
encoder now for over 2 years.  I think it's time to reduce the
perceived severity of the warning message.  While I'd still very much
like to stop these crashes, the recovery logic is solid enough that
the problem is effectively benign.  No point in panicing the users
over it.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:05 -02:00
Mike Isely 056d1a8992 V4L/DVB (6699): pvrusb2: Use of virtual IR chip is a device-specific attribute
For Hauppauge 24xxx devices, the IR receiver is a custom piece of
logic that is very specific to the device.  The pvrusb2 driver can
virtualize this to make it look like a more normal IR receiver found
in other Hauppauge devices.  The decision of whether or not to enable
this virtualization however is a device-specific attribute, thus this
changeset.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:05 -02:00
Mike Isely f5174af201 V4L/DVB (6698): pvrusb2: Implement signal routing schemes
The exact routing of video and audio signals within a device is a
device-specific attribute.  Hauppauge devices do it one way; other
types of device may route things differently.  Unfortunately it is
rather impractical to define chip-specific routing at the device
attribute level, so instead what happens here is that "schemes" are
defined.  Each chip level interface implements its part of a given
scheme and the scheme as a whole is made into a device specific
attribute controlled via a table entry in pvrusb2-devattr.c.  The only
scheme defined here is for Hauppauge devices, but clearly this opens
the door for other possibilities to follow.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:05 -02:00
Mike Isely aaf7884db3 V4L/DVB (6697): pvrusb2: Existence of Hauppauge ROM is a device-specific attribute
Arrange so that the pvrusb2 driver can optionally work without a
Hauppauge ROM being present - which is fairly important for devices
that happen to not come from Hauppauge.  The expected existence of a
Hauppauge ROM is now a device attribute.  The tuner type is now also a
device attribute, which is consulted if there is no ROM.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:03 -02:00
Mike Isely 56dcbfa0d5 V4L/DVB (6696): pvrusb2: Miscellaneous tweaks for controlling tuner type and video standard
Correctly mark when a tuner type is set.  Report more faithfully
information about known supported device video standards.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:03 -02:00
Mike Isely 78a47101ac V4L/DVB (6695): pvrusb2: Implement functions to pass descriptive hardware info
Implement additional pvrusb2 device info table entries for a device
identifier and a device description.  Export this information via the
driver's internal API.  Make this information available via the sysfs
driver interface.  Also propagate this information into the v4l2
capability structure.  An app can now retrieve and report a
descriptive string about the particular type of hardware device it is
operating.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:02 -02:00
Mike Isely f66fbd71f2 V4L/DVB (6694): pvrusb2: Remove obsolete global hardware type enumeration
Device-specific driver behavior is now defined by generic device
characteristics rather than by specific device model information.
With this change, the hardware type field can go away, thus this
change.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:02 -02:00
Mike Isely f8bcec6d18 V4L/DVB (6693): pvrusb2: Add pvrusb2-devattr.o to driver build
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:02 -02:00
Mike Isely 989eb154ea V4L/DVB (6692): pvrusb2: Centralize device specific attributes into a single place
The pvrusb2 driver currently supports two variants of the Hauppauge
PVR USB2.  However there are other hardware types potentially
supportable, but the driver at the moment is not structured to make it
easy to describe these minor variations.  This changeset is the first
set of changes to make such additional device support possible.
Device attributes are held in several tables all contained within
pvrusb2-devattr.c; all other device-specific driver behavior now
derives from these tables.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:02 -02:00
Mike Isely 681c739944 V4L/DVB (6691): pvrusb2: Rework pipeline state control
This is a new implementation for video pipeline control within the
pvrusb2 driver.  Actual start/stop of the pipeline is moved to the
driver's kernel thread.  Pipeline stages are controlled autonomously
based on surrounding pipeline or application control state.  Kernel
thread management is also cleaned up and moved into the internal
control structure of the driver, solving a set up / tear down race
along the way.  Better failure recovery is implemented with this new
control strategy.  Also with this change comes better control of the
cx23416 encoder, building on additional information learned about the
peculiarities of controlling this part (this information was the
original trigger for this rework).  With this change, overall encoder
stability should be considerably improved.  Yes, this is a large
change for this driver, but due to the nature of the feature being
worked on, the changes are fairly pervasive and would be difficult to
break into smaller pieces with any semblence of step-wise stability.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:01 -02:00
Brandon Philips 493977f016 V4L/DVB (6688): V4L: fix copy and paste error in dprintk for videobuf-vmalloc.c
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:01 -02:00
Hermann Pitton cc76466b31 V4L/DVB (6687): saa7134: add mute support for radio/analog-in on MD9717 and MD7134
Currently the saa7134 chips only have mute support for the TV input.

Cards with mute from external audio muxes are already fine on the
other inputs and some recent tuners mute at least the radio on exit.
But these mostly hybrid tuners are not fully backward compatible, since
they must power down and mute regardless.

For some included above, the MD7134 knows several, to switch on mute/automute
to the TV input is functional and backward compatible for the applications,
except that the tuners with tda9887 always mute on exit.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:01 -02:00
Michel Lespinasse 102df6a785 V4L/DVB (6685): ir-keymaps.c: extra keys on winfast Y04G0033 remote
This change adds support for 4 extra keys on the remote currently being
shipped by leadtek with their "WinFast TV2000 XP/Expert" and
"WinFast PVR2000" cards. The remote P/N seems to be Y04G0033 and
you can see a picture of it here: http://lespinasse.org/y04g0033.jpg

The extra keys are at the bottom and are labeled MCE +VOL, -VOL, +CH, -CH.
I chose to map them to the F21-F24 keycodes, following the precedent of
ir_codes_gotview7135[], so as to differentiate these 'MCE' keys from the
other +VOL, -VOL, +CH, -CH 'arrow' keys higher up on the remote.

Signed-off-by: Michel Lespinasse <walken@zoy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:00 -02:00
Mauro Carvalho Chehab 5c15648a42 V4L/DVB (6683): Fix DVB compatibility
DVB-S is not supported. Also, there are some QAM6 firmwares for xc3028, but it
is reported that this doesn't work fine.

Thanks to Manu Abraham, Michael Krufky and Patrick Boettcher for their
insights.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:00 -02:00
Michael Krufky 54465b082c V4L/DVB (6681): tda18271: rename 'debug' to 'tda18271_debug'
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:00 -02:00
Michael Krufky 6ca04de36b V4L/DVB (6680): tda18271: move tda18271_map tables to a separate source file
Move tda18271_map tables to a separate source file,
to improve code readability and ease maintenance.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:59 -02:00
Michael Krufky 63c254805e V4L/DVB (6679): tda8290: force tuner init after attach
Force tuner init after attach, then sleep until use.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:59 -02:00
Michael Krufky 22ee1250bd V4L/DVB (6678): tda18271: define init callback
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:59 -02:00
Mauro Carvalho Chehab 63806eeb61 V4L/DVB (6677): Fix xc2028 driver for non OFDM
A previous patch implemented support for non-OFDM digital TV. However, the
previous bandwidth ofdm parameter were left at the code by mistake.

Thanks to Michael Krufky and Patrick Boettcher for noticing this mistake.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:58 -02:00
Mauro Carvalho Chehab 66c2d53db2 V4L/DVB (6676): Improve s-code support
s-code tables are related to IF frequency used for video demodulation.

The s-codes for analog are automatically loaded, according with video standard.
However, for digital, they will depend on the IF of the demoduler chip. IF of
the demoduler.

Before this patch, only a few IF's where possible to use. This patch allows
selecting any IF defined at firmware file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:58 -02:00
Mauro Carvalho Chehab b542dfdc9f V4L/DVB (6675): Allow selecting the proper SCode table for DTV
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:57 -02:00
Mauro Carvalho Chehab d04aa54a27 V4L/DVB (6674): Add support for other DTV types
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:56 -02:00
Mauro Carvalho Chehab d74cb25e42 V4L/DVB (6672): Add support for radio
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:54 -02:00
Mauro Carvalho Chehab 00deff1a07 V4L/DVB (6671): Avoids checking digital/analog at check_firmware
Since check_firmware is called via analog or digital set freq routines, move
type selection to those routines. This avoids having several if's at the code,
and simplifies the source code.

A sideback effect is that implementing radio and other dvb types will become
simpler.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:51 -02:00
Maxim Levitsky f36224d399 V4L/DVB (6670): V4L: saa7134: tvaudio cleanups
move some tv-audio initialization code out of tvaudio thread,
and call it on resume too.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:46 -02:00
Maxim Levitsky 5c01203fd2 V4L/DVB (6669): Add few missing bits of code to saa7134_resume
First the saa7134_initdev waits between saa7134_hwinit1
and saa7134_hwinit2 , thus it is probably wise to do the same in saa7134_resume
some hardware probably needs this.

Call saa7134_irq_video_signalchange in .resume like in saa7134_resume to make
saa7134_resume mirror perfectly the saa7134_initdev although
this call isn't strictly necessary in the saa7134_initdev,
but it won't harm anyway.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:45 -02:00
Maxim Levitsky 3203cb86d2 V4L/DVB (6668): Fix theoretical races between IRQ handler and .suspend/resume
*dev->insuspend = 1 should be set before synchronize_irq
 *ACK interrupts after synchronize_irq, to make sure there aren't
 pending interrupts.
 *Add barrier before we restart interrupts so the handler will 100%
 see the dev->insuspend

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:44 -02:00
Maxim Levitsky 0d65cd4f2b V4L/DVB (6667): Fix access to configuration space while in D3
pci_save_state should be called before pci_set_power_state
and pci_restore_state after pci_set_power_state

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:43 -02:00
Adrian Bunk 4c5efc1778 V4L/DVB (6665a): finish the VID_HARDWARE_* removal
This patch removes a few remainders of the VID_HARDWARE_* removal.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
643d01fb38b6f376cced035549f4e193018776e7
2008-01-25 19:02:42 -02:00
Mauro Carvalho Chehab c23f5949c0 V4L/DVB (6665): Fix CodingStyle
thanks to checkpatch.pl

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:41 -02:00
Mauro Carvalho Chehab cca8379811 V4L/DVB (6662): Fix standard selection for PAL
Not all 8MHz firmware are marked with F8MHz.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:40 -02:00
Mauro Carvalho Chehab 2800ae9cd6 V4L/DVB (6661): Remove firmware reload hack for analog
On some cases, xc2028/xc3028 wents into "turn off" mode. It seems that this
happens when very weak signals are tuned. To solve this, specific standard
reaload were done previously. Christopher patches changed this behavior to a
complete firmware reload.

This patch removes the hack. A much cleaner solution for this trouble is just
to sent a xc2028/3028 software reset.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:40 -02:00
Mauro Carvalho Chehab 71a2ee37e8 V4L/DVB (6660): Allow fully configuring xc3028 during xc2028_attach
xc3028 can be used on some DTV only designs (for example, DVB-S boards). Before
this patch, a DTV only board would need to call set_tuner_config callback.

This patch allows to optionally pass a xc3028_ctrl parameter, via xc3028_config
struct, fully initializing the driver for DTV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:39 -02:00
Mauro Carvalho Chehab 5add9a6f3c V4L/DVB (6659): Convert MTS to bitfield
Xc2028.3028 has two type of firmwares: audio-standard specific ones and
baseband MTS firmwares. MTS firmwares provide stereo decoding for 6 MHz
BTSC/EIAJ and for monoaural audio decoding on 8 MHz firmwares.

It seems that the option to use MTS or a standard-specific audio decoding
depends on the way xc2028/3028 is connected.

Instead of wasting 32 (or 64 bits) to signalize if the driver needs to use MTS
firmware, this patch converts it to a bitfield that can be shared with other
proprieties of xc2028/3028.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:39 -02:00
Mauro Carvalho Chehab a5e9fe149a V4L/DVB (6658): Sets a default std, if not specified
Some drivers call set_frequency before selecting the video standard. Before
this patch, an invalid standard ID could be assumed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:38 -02:00
Mauro Carvalho Chehab c71d4bc512 V4L/DVB (6657): Fix standard selection for PAL/M, PAL/N, PAL/Nc and NTSC
Those standards use 6 MHz firmware.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:37 -02:00
Chris Pascoe a1dcd9de64 V4L/DVB (6656): zl10353: store frequencies in 0.1kHz to eliminate rounding errors
Whilst reanalysing my formulas I realised it was no longer possible to get the
right values for a 36.1667MHz IF due to rounding problems.

Storing frequencies in units of 0.1kHz makes it possible to calculate these
again correctly.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:37 -02:00
Chris Pascoe 702a67624e V4L/DVB (6655): Add support for MT352-based DViCO FusionHDTV DVB-T NANO devices
There are at least three variants of the DViCO FusionHDTV DVB-T NANO that
share the same USB device ID.  The first (ZL10353 w/ firmware in ROM) is
already supported; the latter two both require firmware and have either
an MT352 or ZL10353 demodulator, and have a different IR receiver from the
first.

This introduces a new identify_state that can tell the difference between a
"warm" device which is running the embedded firmware, and a "cold" device
that needs us to upload firmware to it before it will work.  We patch the
uploaded device ID (like we do for other bluebird devices) to make it easy
to identify the particular device variant when it reattaches.

NB: These devices use a different firmware file from previous bluebird
    devices.  You need a new firmware file to make this work.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:37 -02:00
Chris Pascoe c6e62a3a39 V4L/DVB (6654): mt352: support oversampled IF input
Rework the input frequency calculation so that it produces the right values
when the ADC oversamples the IF input.

This means MT352 devices can now process a near-zero IF (according to the,
specs 4.57MHz is supported with the default crystal).

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:36 -02:00
Chris Pascoe 5ccaf90501 V4L/DVB (6653): Add support for the DViCO FusionHDTV NANO2 w/ZL10353 and firmware
Add support for the DViCO FusionHDTV DVB-T NANO with zl10353 demodulator and
firmware in ROM on the device.

Again, this is based on the great work of Mike Krufky with my modifications
to use the in-tree XC2028 driver.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:36 -02:00
Chris Pascoe 1ad0b796a3 V4L/DVB (6652): xc2028: try non-8MHZ init1 firmware
When loading init1 firmware, there may not be an 8MHz specific version.
Load the non-8MHz version if it exists.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:35 -02:00
Chris Pascoe 11a9eff9b6 V4L/DVB (6651): xc2028: mask off type correctly when searching for standard-specific types
When searching for standard-specific analog firmware, only certain
type bits are valid, much like for DTV.  Mask them off when finding
the firmware to load.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:32 -02:00
Chris Pascoe 47bd5bc648 V4L/DVB (6650): xc2028: base firmwares should have std0
When loading BASE firmware, we must use std = 0.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:32 -02:00
Chris Pascoe aeb012bbf4 V4L/DVB (6649): Add support for the DViCO FusionHDTV Dual Digital 4
Add support for DViCO's Dual Digital 4 with xc3028 tuner, zl10353 DVB-T
demodulator and a new-style I2C IR remote control receiver.

This would not have been possible without the work of and advice from
Mike Krufky, who originally got the Dual Digital 4 and second-gen DVB-T
NANO devices working with the out-of-tree XC3028 driver.

I converted it to use the in-tree XC3028 driver (after making it suitable
for our use), and added the IR remote control support based on his advice.

NB: a firmware package is required to use this device.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:32 -02:00
Chris Pascoe 45819c381f V4L/DVB (6648): xc2028: add sleep hook
Add sleep method to enable putting the tuner into standby mode.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:31 -02:00
Chris Pascoe 8bf799a621 V4L/DVB (6647): xc2028: retry firmware load if tuner does not respond
In practice, the tuner occasionally fails to respond correctly after a
firmware load.  Retry the firmware load if the firmware/hardware version
we read back from the tuner after programming does not match what we
expect.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:31 -02:00
Chris Pascoe e0f0b37a3e V4L/DVB (6646): xc2028: rework firmware (re)loading process
Define a list of valid "firmware types" for each combination of BASE,
DTV and SCODEs.  By masking the appropriate firmware bits off we can
just use one "type" for the firmware searching and also flag when we
are looking for a BASE, DTV or SCODE type firmware.  This makes it
much easier to track if we need to change device modes or flash an
individual firmware part.

Add a structure to remember what firmware properties we have.  This
contains the currently loaded/wanted  base firmware (type), video std
(id), video std requested (std_req), scode file and number in use.

Incorporate said structure into the tuner private data.

When checking whether the current firmware needs to be reloaded, first
figure out exactly what "type" of firmware we want (base, std and
scode), and then proceed to load the appropriate matching base,
std-specific and scode records iff there are any changes required.
This removes guesswork from the process because we no longer need to
individually code a check for every tuning parameter's interactions.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:30 -02:00
Chris Pascoe 59a636e50f V4L/DVB (6645): xc2028: allow selection of D2633 firmware
Add a bit to select D2633 DTV firmware to struct xc2028_ctrl, so that it can
be enabled via .set_config.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:30 -02:00
Chris Pascoe d7b22c5cfe V4L/DVB (6644): xc2028: use correct offset into scode firmware
When validating and loading SCODE firmware we need to take into account the
two-byte size header before each entry.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:29 -02:00
Chris Pascoe b1535293dc V4L/DVB (6643): xc2028: use best match instead of first partial match during firmware selection
Rather than picking the first video standard firmware that supports any of
the standards that the user has requested, try to select one that supports
as many of them as possible.  This improves the likelihood that the firmware
we select will support the user's desired TV standard.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:28 -02:00