Commit Graph

24 Commits (dfa9a5ae679ff2d23caa995d0f55a19abaf0596e)

Author SHA1 Message Date
Andy Walls dd073434b5 V4L/DVB (9805): cx18: Port fix for raw/sliced VBI mixup from ivtv and cx25840
This is a port of the fixes Hans Verkuil made for ivtv/cx25840:
The service_set field was used to determine whether raw or sliced VBI was
desired. This is incorrect since it is perfectly valid to select sliced VBI
with a service_set of 0.

Instead the driver should check on VIDIOC_S_FMT whether the type
field matches the raw or sliced VBI type.

Updated the cx18 driver accordingly, including an additional check in
cx18_start_v4l2_encode_stream() that didn't exist in ivtv.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:32 -02:00
Andy Walls 66c2a6b0bc V4L/DVB (9801): cx18: Allow more than 63 capture buffers in rotation per stream
cx18: Allow more than 63 capture buffers in rotation per stream.  Implement
q_busy to hold buffers the firmware has for use.  q_free holds truly unused
buffers in a pool.  New buffers are given to the firmware as soon as the
firmware returns one, if there are any to give to the firmware.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:29 -02:00
Andy Walls 1ed9dcc8ef V4L/DVB (9728): cx18: Copyright attribution update for files modified by awalls
Add copyright attribution for files modified by awalls in 2008

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:11 -02:00
Andy Walls 2bb49f1b9f V4L/DVB (9727): cx18: Adjust outgoing mailbox timeouts and remove statistics logging
cx18: Adjust outgoing mailbox timeouts and remove statistics logging.
This saves some wasted storage in struct cx18 for each card.  Cutting
the outgoing mailbox timeouts in half from the previous value appears to
be safe with MythTV.  Got rid of interrupted case code path after
a wait uninterruptable returns.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30 09:38:11 -02:00
Hans Verkuil 741e1f3b81 V4L/DVB (9157): cx18/ivtv: add 'PCI:' prefix to bus_info.
Suggested by Martin Dauskardt. This is conform what the other drivers do.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 09:07:42 -02:00
Andy Walls d267d85101 V4L/DVB (9110): cx18: Add default behavior of checking and retrying PCI MMIO accesses
cx18: Add default behavior of checking and retrying PCI MMIO accesses.
The concept of checking and retrying PCI MMIO accesses for better reliability
in older motherboards was suggested by Steve Toth <stoth@linuxtv.org>.  This
change implements MMIO retries and the retry_mmio module parameter that is
enabled by default.  Limited experiments have shown this is more reliable than
the mmio_ndelay parameter.  mmio_ndelay has insignificant effect with retries
enabled.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:14 -02:00
Hans Verkuil effc3466d3 V4L/DVB (8920): cx18/ivtv: fix check of window boundaries for VIDIOC_S_FMT
It was possible to set out-of-bounds windows sizes, this is now
fixed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:59 -02:00
Andy Walls b1526421ea V4L/DVB (8913): cx18: Create cx18_ specific wrappers for all pci mmio accessesors.
cx18: Create cx18_ specific wrappers for all pci mmio accessesors.  This is a
first step in instrumenting all CX23418 PCI bus IO, to debug problems with
accessing the CX23418's PCI memory mapped IO.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Andy Walls d3c5e70755 V4L/DVB (8773): cx18: Fix cx18_find_handle() and add error checking
cx18: Fix cx18_find_handle() and add error checking.  cx18_find_handle() did
not find a good task handle and would use the invalid task handle under common
conditions.  Added a define for the invalid task handle and added error checking
as well.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:53 -02:00
Andy Walls b04bce476c V4L/DVB (8772): cx18: Convert cx18_queue buffers member to atomic_t
cx18: Convert cx18_queue buffers member to atomic_t.  This allows safe
concurrent access to check if a queue has data without having to acquire the
queue spinlock.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:53 -02: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
Andy Walls 02fa272fcb V4L/DVB (8332): cx18: Suport external reset of the Z8F0811 IR controller on HVR-1600 for lirc
cx18: added in cx18_ir_reset_gpio function for lirc_pvr150 like module.  Also
added the ability to reset the IR chip via ioctl like ivtv.  This needs the
mutex to protect gpio_dir and gpio_val in struct cx18 as gpio changes can
come from a few different asynchronous sources now.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:03 -03:00
Andy Walls 8abdd00dcc V4L/DVB (8331): cx18: Add locking for struct cx18 GPIO state variables
cx18: Add locking for struct cx18 GPIO state variables in
anticpation of adding IR microcontroller reset support for
use by external IR modules.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:59 -03:00
Hans Verkuil adb65bc71c V4L/DVB (8113): ivtv/cx18: remove s/g_ctrl, now all controls are handled through s/g_ext_ctrl
videodev converts old-style controls to an extended control so the ivtv and
cx18 drivers no longer have to handle both.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:23 -03:00
Hans Verkuil 36ecd4955a V4L/DVB (8111): ivtv/cx18: fix compile error when CONFIG_VIDEO_ADV_DEBUG is not defined.
Thanks to Randy Dunlap for reporting this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:14 -03:00
Hans Verkuil 37f89f9542 V4L/DVB (8104): cx18/ivtv: ioctl debugging improvements
Completely rely on the video_ioctl2 debugging facilities rather than
doing it ourselves.

Fill in some missing fields in ivtv with VIDIOC_G_FBUF.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:51 -03:00
Hans Verkuil 3d66c40570 V4L/DVB (8091): cx18: show GPIO pins when VIDIOC_LOG_STATUS is called.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:23 -03:00
Hans Verkuil 0b5a30e90d V4L/DVB (8087): cx18: make sure all v4l2_format fields are filled in
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:05 -03:00
Hans Verkuil e27bf207db V4L/DVB (8086): ivtv/cx18: fix video_temporal_filter handling
If the capture is scaled, then the video_temporal_filter is set to 0
by the cx2341x.c module since otherwise you would get ghosting.

However, this was also done in the VIDIOC_S_FMT ioctl which meant that
the video_temporal_filter control was reset to 0 or 8 each time S_FMT
was called. This was old code that should have been removed a long time
ago.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:00 -03:00
Hans Verkuil 79afcb10df V4L/DVB (8084): ivtv/cx18: remove unnecessary memsets & KERNEL_VERSION tests
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:52 -03:00
Andy Walls 3b6fe58f0f V4L/DVB (8082): cx18: convert to video_ioctl2()
cx18: convert driver to use video_ioctl2().  Pushed down ioctl debug
messages and priority checks as well.  Still left serialization lock in
place for now.  #if 0'ed out sliced vbi ioctl code for now.

Patch heavily based on similar changes made to ivtv by Hans Verkuil.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:43 -03:00
Hans Verkuil 31554ae599 V4L/DVB (7931): cx18: allow for simultaneous digital and analog capture
The HVR-1600 can do both analog and digital capture at the same time.
Due to a driver bug -EBUSY would be returned when attempting to setup an
analog capture while a digital capture was already in progress.

Separate the two internally.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-05 06:35:45 -03:00
Mauro Carvalho Chehab aed6abd662 V4L-DVB(7789a): cx18: fix symbol conflict with ivtv driver
LD      drivers/media/video/built-in.o
drivers/media/video/cx18/built-in.o: In function `get_service_set':
/home/v4l/tokernel/git/drivers/media/video/cx18/cx18-ioctl.c:118: multiple definition of `get_service_set'
drivers/media/video/ivtv/built-in.o:/home/v4l/tokernel/git/drivers/media/video/ivtv/ivtv-ioctl.c:119: first defined here
drivers/media/video/cx18/built-in.o: In function `expand_service_set':
/home/v4l/tokernel/git/drivers/media/video/cx18/cx18-ioctl.c:92: multiple definition of `expand_service_set'
drivers/media/video/ivtv/built-in.o:/home/v4l/tokernel/git/drivers/media/video/ivtv/ivtv-ioctl.c:92: first defined here
drivers/media/video/cx18/built-in.o: In function `service2vbi':
/home/v4l/tokernel/git/drivers/media/video/cx18/cx18-ioctl.c:44: multiple definition of `service2vbi'
drivers/media/video/ivtv/built-in.o:/home/v4l/tokernel/git/drivers/media/video/ivtv/ivtv-ioctl.c:42: first defined here
make[2]: ** [drivers/media/video/built-in.o] Erro 1
make[1]: ** [drivers/media/video] Erro 2
make: ** [drivers/media/] Erro 2

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-29 18:41:42 -03:00
Hans Verkuil 1c1e45d17b V4L/DVB (7786): cx18: new driver for the Conexant CX23418 MPEG encoder chip
Many thanks to Steve Toth from Hauppauge and Nattu Dakshinamurthy from
Conexant for their support. I am in particular thankful to Hauppauge
since without their help this driver would not exist. It should also
be noted that Steve did the work to get the DVB part up and running.
Thank you!

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: G. Andrew Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-29 18:41:41 -03:00