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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>