This patch allows much of the I2C client address data to move from initdata
into text.
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
IR corrections for the Pinnacle 800i
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
From Zhang: This an updated patch that adds analog support for
the xc5000 tuner driver. it was tested on a Pinnacle PCTV HD 800i
card (patches to follow).
Patch commited as-is, cleanup to follow ... 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>
The cx23885/7/8 PCIe bridge has an internal AVCore modelled on
the cx2584x family. Many of the registers positions are identical
but some moved. The register values are also different because
the different bridges run at different clock rates.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
In order to videobuf_iolock to work, mmap_mapper should be called first.
Otherwise, an OOPS is generated.
On some cases, .mmap file handler used to took some time to be called. On those
situations, mmap_mmapper() were called after iolock.
This patch properly waits for mmap_mapper to be called, otherwise generating an
error.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch updates cardlist for Beholder TV tuners:
old models (with GPIO ir) 401, 403, 405, 407, 409, 505, 507
and add support for 607, 609, M6 cards with new i2c-ir.
Signed-off-by: Igor Kuznetsov <igk72@yandex.ru>
Signed-off-by: Andrey J. Melnikov <temnota@kmv.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix the following compiler error:
v4l2-i2c-drv.h:72: error: implicit declaration of function 'v4l2_i2c_attach'
Also, prevent multiple inclusions of v4l2-i2c-drv.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- remove dependency of tda8290 module on struct tuner
- move tuner_foo printk macros from tuner-driver.h into tuner-core.c
- clean up #includes of tuner-i2c.h / tuner-driver.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L: Int if: Set slave's master before attach, remove master argument
The master also now gets its own pointer from slave's structure.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This driver is used by the ASUS Falcon2 cx23416-based cards.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
TUNER_PHILIPS_TDA8290 will autodetect a TDA8290 or a TDA8295,
so we don't need this separate entry anymore.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The remove driver function expects that the client is still attached
to the driver, so do the detach after calling remove().
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Some devices do complicated tests whether the device can be probed or not.
Add a legacy_probe function pointer to support that.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Two new headers were added: one for I2C drivers that are only used
by V4L2 drivers converted to the new bus-based I2C API, and one that
can be used by both converted and unconverted drivers (at the expense of
some additional overhead).
To support the legacy I2C API a helper function was added to v4l2-common.c.
These headers take care of all the 'boilerplate' code that all V4L2 I2C drivers
have in common and will automatically support the bus-based I2C API introduced
in kernel 2.6.22.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add basic support for NXP TDA8295 analog demod and TDA18271 tuner silicon.
TDA8295 + TDA8275a not yet tested.
TDA8290 + TDA18271 not yet supported.
Digital mode of TDA18271 not yet tested & needs more work.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Also replaces all occurrences of TUNER_XCEIVE_XC3028 to TUNER_XC2028.
Some work is still may be required to make sure that non-tm6000 drivers will
be capable of using tuner-xc2028.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Currently, the only tuner-specific device that allows special
configurations is tda9887. However, tea5767 also may require some
special configurations (for example, to specify a different Xtal freq).
This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl
(TUNER_SET_CONFIG). The newer one allows specifying what tuner is
appliable to a configuration set, and allows an arbitrary configuration
struct.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- Add comments to functions that require that caller hold q->lock
- Add __videobuf_mmap_free that doesn't hold q->lock for use within videobuf
- Add locking to videobuf_mmap_free
- Fix linux/drivers/media/common/saa7146_video.c which was holding lock around
videobuf_read_stop
- Add locking to functions that operate on a queue
- Add videobuf_stop to take care of stopping in both the read and stream case
TODO: bttv still has an unsafe call to videobuf_queue_is_busy
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Commits
58b053e4ce ("Update arch/ to use sg helpers")
45711f1af6 ("[SG] Update drivers to use sg helpers")
fa05f1286b ("Update net/ to use sg helpers")
converted many files to use the scatter gather helpers without ensuring
that the necessary headerfile <linux/scatterlist> is included. This
happened to work for ia64, powerpc, sparc64 and x86 because they
happened to drag in that file via their <asm/dma-mapping.h>.
On most of the others this probably broke.
Instead of increasing the header file spider web I choose to include
<linux/scatterlist.h> directly into the affectes files.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove the obsolete VIDIOC_G_MPEGCOMP and VIDIOC_S_MPEGCOMP ioctls from
the V4L2 API as per the removal schedule (October 2007).
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
struct video_device used to define a .hardware field. While
initialized on severl drivers, this field is never used inside V4L.
However, drivers using it need to include the old V4L1 header.
This seems to cause compilation troubles with some random configs.
Better just to remove it from all drivers.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Breaks on any target that has copy_to_user() defined as a non-trivial
macro.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The currently used "struct class_device" will be removed from the
kernel. Here is a patch that converts all users in drivers/media/video/
to struct device.
Reviewed-by: Thierry Merle <thierry.merle@free.fr>
Reviewed-by: Mike Isely <isely@pobox.com>
Reviewed-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
In the past, videobuf_queue_init were used to initialize PCI DMA videobuffers.
This patch renames it, to avoid confusion with the previous kernel API, doing:
s/videobuf_queue_init/void videobuf_queue_core_init/
Also, the operations is now part of the function parameter. The function will
also add a test if this is defined, otherwise producing BUG.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Before the videobuf redesign, a procedure for re-using videobuf without PCI
scatter/gather where provided by changing the pci-dependent operations by
other operations.
With the newer approach, those methods are obsolete and can safelly be removed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adds a newer videobuf-vmalloc module. This module uses the same
videobuf controls, but implements memory allocation based on vmalloc
methods.
With this method, an USB driver can use video-buf, without needing to
request memory from the DMA-safe area.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo.
Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct.
So, to access it, a subroutine call is needed.
This patch renames all occurences of those function calls to be
consistent with the video-buf split.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
video-buf currently does two different tasks:
- Manages video buffers with a common code that allows
implementing all the V4L2 different modes of buffering;
- Controls memory allocations
While the first task is generic, the second were written to support PCI DMA
Scatter/Gather needs. The original approach can't even work for those
video capture hardware that don't support scatter/gather.
I did one approach to make it more generic. While the approach worked
fine for vivi driver, it were not generic enough to handle USB needs.
This patch creates two different modules, one containing the generic
video buffer handling (videobuf-core) and another with PCI DMA S/G.
After this patch, it would be simpler to write an USB video-buf and a
non-SG DMA module.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
Remove support for g_ext_clk and s_ext_clk. The same functionality is
now handled by g_ifparm.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
vidioc_int_g_ifparm can be used to obtain hardware-specific information
about the interface used by the slave.
Rearrange v4l2-int-device.h as well.
Also remove useless & characters.
Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- fixed missing buttons in keymap.
- make function names & descriptions more generic,
since this same ir receiver and remote is used in
many FusionHDTV products.
- miscellaneous cleanups.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch adds support for the built-in IR receiver of the DViCO
Fusion HDTV5 RT GOLD PCI card, using FusionHDTV MCE remote controller.
Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The convention for framebuffer devices is to call them xxxfb, not xxx-fb.
Conform to this. Also move the ivtvfb.h header to include/linux: it is a
public header. The FBIO_WAITFORVSYNC ioctl is now also defined in the
ivtvfb.h header, no more need to include matroxfb.h for just this ioctl.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The driver should now pass the 'busy' state of the device to the cx2341x
module whenever controls are set or tried. -EBUSY will be returned if
the device is busy and the user attempts to modify certain 'dangerous'
controls. It concerns controls that change the audio or video
compression mode and bitrates.
The cx88-blackbird and pvrusb2 drivers currently always pass '0' (not busy)
to the cx2341x, effectively keeping the old behavior for now.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add radio support for the Thomson DTT7612 tuner.
This tuner uses a different 1st intermediate frequency than the other radio
tuners supported (a lot of NTSC radio tuners probably need this change too).
Add a new tuner-simple parameter, radio_if. It selects the 1st IF used for
radio reception. The radio frequency setting code in tuner-simple now uses
this field, instead of a special case select() block for each tuner with radio
support.
The tuner parameters for tuners that used a 33.3 MHz RIF now set radio_if to 1
in tuner-types.c.
The Thomson DTT7612 gets radio_if = 2, also add has_tda9887 = 1 and
fm_gain_normal = 1.
Add some defines for tda9887 bits that control IF setting in radio mode.
Add a new tda9887 config option, TDA9887_RIF_41_3, that selects a 41.3 MHz
radio IF.
Fix the way tda9887 radio options work. The driver was modifying the default
radio mode config templates based on the TDA9887_XXXX flags. This means that
_all_ tuners would get the same settings. If you had a one tuner than used
TDA9887_GAIN_NORMAL and one that didn't, both would get the setting. Now the
tda9987 driver just checks if tuner mode is radio and then applies the config
settings directly to the data being sent, just like how all the TV mode
settings already work.
The PLL setting math is made a little more accurate.
And a grammar error in a printk is fixed.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Convert av7110_v4l.c to use i2c_transfer() instead of saa7146_i2c_transfer().
Make saa7146_i2c_transfer() static.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This device is internal to the Panasonic VP27S tuner and is used to set
the mono/stereo/bilingual setting of the tuner.
It is used by two Japanese cx23416-based cards.
Signed-off-by: Takahiro Adachi <tadachi@tadachi-net.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>