From: Mauro Carvalho Chehab <mchehab@infradead.org>
In file included from drivers/media/video/em28xx/em28xx-i2c.c:31:
drivers/media/video/tuner-xc2028.h:10:26: error: dvb_frontend.h: No such file or directory
In file included from drivers/media/video/em28xx/em28xx-i2c.c:31:
drivers/media/video/tuner-xc2028.h:32: warning: 'struct dvb_frontend' declared inside parameter list
drivers/media/video/tuner-xc2028.h:32: warning: its scope is only this definition or declaration, which is probably not what you want
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
From: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/tda8290.c:27:21: error: tda827x.h: No such file or directory
drivers/media/video/tda8290.c:28:22: error: tda18271.h: No such file or directory
drivers/media/video/tda8290.c:52: error: field 'cfg' has incomplete type
drivers/media/video/tda8290.c: In function 'tda829x_find_tuner':
drivers/media/video/tda8290.c:590: error: implicit declaration of function 'tda18271_attach'
drivers/media/video/tda8290.c:598: error: implicit declaration of function 'tda827x_attach'
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adds autodetection support for the Cinergy200 USB and the VGear PocketTV.
Whenever a usb device with generic empia em2800 usb ids is detected the device
gets scanned for connected i2c devices. If the device list matches an em2800
device in the device list the model id gets changed accordingly.
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Prevent the tda8295 from falsely being detected as a tda9887
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
attached patch adds support for the vgear pockettv.
It seems to require a write to another register for audio to work.
I checked my old cinergydrv and we did the same register write there. I
therefore enabled it for all em2800 based devices.
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The attached patch modifies the em28xx driver so that there can be ioctls from
multiple different threads.
This is necessary for capture apps like MPlayer that use different threads for
capturing and channel tuning.
Now the locking is only done for the ioctls that change properties of the
device or access the i2c bus.
It also removes some locks that look unnecessary:
In em28xx_init_dev:
the videodevice is not registered yet so nothing can access the hardware
meanwhile, the device struct is not assigned to the interface yet so no race
with disconnect is possible
In em28xx_release_resources:
it gets only called when dev->lock is already held
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch adds a function to allow trying to detect boards that shares
the generic IDs.
The current detection method is based at eeprom checksum.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The ttpci Kconfig file has bugs that cause it to fail in certain Kconfig
situations. The basic problem is that it selects certain drivers, but does
not depend on the dependencies of those drivers.
See http://article.gmane.org/gmane.comp.video.video4linux/35072
Using the Kconfig file also has some annoyances. For instance one can't turn
off AV7110 support unless you go down several options and first turn off
budget-patch support. Normally user selectable drivers are not forced on like
this.
The "AV7110 cards with Budget Patch" option is disabled if "Budget cards"
isn't on. Normally a driver appears nested under a driver it depends on, but
since drivers that don't depend on "Budget cards" are between the two options,
the config programs can't display the tree correctly.
The Makefile has an issue too. Some modules, ttpci-eeprom and budget-core,
appear in the Makefile under several different config symbols. If more than
one of these symbols is on, they will get added the to list of objects
multiple times. The normal convention is to have a config symbol just the
common object(s) and have the users of the that object either depend on or
select that config symbol.
This patch fixes all these issues. ttpci-eepom is under a new config symbol,
and so is the budget-core module. The four different budget card types appear
as sub-drivers under a main "SAA7146 DVB cards" option. Turning on
budget-patch doesn't force AV7110. Drivers using SAA7146_VV have the
necessary VIDEO_DEV dependency, so that it isn't possible to select SAA7146_VV
without V4L being on.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Someone wasn't using the v4l-dvb commit scripts and so didn't run the
automatic whitespace cleaner on their code.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Alter the tuner_foo printk macros to indicate which module is
generating the message.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The tuner sub-module will usually log its type during its _attach() function,
then tuner-core reports which type was attached when control is returned.
In most cases, we expect to see the same message reported from both locations.
We only need to see this second message if debug is enabled.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
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>
Several media drivers use input_(*) functions so they need to depend on
the INPUT config symbol.
drivers/built-in.o: In function `bttv_input_fini':
linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:346: undefined reference to `input_unregister_device'
drivers/built-in.o: In function `bttv_input_init':
linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:204: undefined reference to `input_allocate_device'
linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:335: undefined reference to `input_free_device'
linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:321: undefined reference to `input_register_device'
linux-2.6.24-rc1-git4/drivers/media/video/bt8xx/bttv-input.c:335: undefined reference to `input_free_device'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Most of the driver were written by Mauro Carvalho Chehab.
DTV parts were added by Michel Ludwig.
Reviewed-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch adds USB ID for HVR-950. It also adds the callback for handling
firmware loading.
Thanks to Markus Reichberger for the reset commands.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
- priv->count were wrong. Should be incremented since the first usage;
- forgot to use list_del() to remove the driver;
- Release memory if an error occurs during _attach
Thanks to Aidan Thornton <makosoft@googlemail.com> for pointing this.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
I2C bus redesign changed i2c parameters. This patch re-adds tuner xc2028
attach function, replacing the parameters to the newer syntax.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The bus-based I2C subsystem allocates the i2c_client struct. So if in order to
be able to convert the tuner to the bus-based I2C API the embedded i2c_client
struct must be removed from the tuner struct and replaced with a pointer.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The next patchset series will change i2c structs inside tuner. This patch
avoids breaking bissect, by commenting the still unused tuner xc2028.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
Consolidate tda8290_attach() and tda8295_attach() into a single function,
tda829x_attach(), which will detect chip combinations tda8290 or tda8295 with
tda8275, tda8275a or tda18271.
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>
If the chip isn't recognized, then the correct errors should be returned.
The v4l2_i2c_attach() utility function will return 0 for all errors
except -ENOMEM to provide proper compatibility support for the old I2C
probing function.
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>