Adrian Bunk [Wed, 21 Nov 2007 22:55:52 +0000 (19:55 -0300)]
V4L/DVB (6623): remove saa7134-oss
The saa7134-oss is deprecated for quite some time, it's the only remaining OSS
user outside of sound/oss/, and considering how few and what kind of
soundcards are left supported by OSS I hardly see any use cases left.
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Aidan Thornton [Tue, 20 Nov 2007 18:25:08 +0000 (15:25 -0300)]
V4L/DVB (6619): Use MTS firmware for the HVR-900
The HVR-900 requires the MTS version of the xc3028 firmware in order
to get any sound. The below patch selects this firmware variant on
HVR-900 cards, as well as splitting the HVR-950 into its own entry
(since I don't know if it uses the MTS variant and it will have to be
split off eventually anyway).
Michael Krufky [Thu, 15 Nov 2007 13:34:33 +0000 (10:34 -0300)]
V4L/DVB (6607): saa7134: add support for reading Hauppauge eeprom
Increased size of dev->eedata from 128 to 256, since the Hauppauge data begins
at byte 128. This has been tested on boards with smaller eeproms, and caused
no problems.
Added comments to distinguish between the various versions of the HVR1110.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (6605): Add a modprobe option to manually select audio standard
While there's no public API to define audio standard, adds a hack option for
select them. This is needed only for NICAM and A2 firmwares, since AM, BTSC and
EAIJ are already properly handled, on firmware version 2.7.
Make the driver less verbose by default. It adds a debug parameter to make the
driver more verbose.
Also, error messages were using KERN_ERR level, instead of KERN_INFO.
A few printk messages were reviewed to make them more clear.
Some tuners, like xc3028, need to print error messages. Instead of declaring
local macros, create a tuner global macro for printing tuner errors.
To preserve CodingStyle on all tuner_macros, a few CodingStyle violations were
fixed at the other macros:
- lines with more than 80 columns
- two statements at the same line
The patch also removes the CodingStyle violation of having emacs declarations
inside de source code (CodingStyle chapter 18).
Xceive 2028/3028 has a concept of scode/dcode.
Scode is a table of 16 values (each with 12 bytes i2c sequence).
Dcode is the entry of Scode table that should be used, given a certain
frequency.
The idea is that, depending on what frequency is selected, and according with a
country-based (or standard-based?) table, the Xceive should be "hacked" to
fine-tune that specific frequency.
By default, Scode=0 is used, for undefined frequencies. Also, Scode=0 seems to
be the most used value.
This patch adds the capability of selecting a scode. However, extra work will
be needed to allow auto-selecting the proper scode, for a given set of
frequencies.
I'm not sure what would be the proper way for implementing the dcode selection.
Jaroslav Barton [Sat, 10 Nov 2007 22:17:45 +0000 (19:17 -0300)]
V4L/DVB (6588): Leadtek Winfast DTV Dongle remote control
Add remote controller support for Leadtek Winfast DTV Dongle based on
DiB7700P, MT2060 and using last drivers (6040:6a79c243aecc), firmware
dvb-usb-dib0700-03-pre1.fw
Signed-off-by: Jaroslav Barton <djaara@djaara.net> Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (6586): Remove some dead code and make drive fully V4L2 compatible
There were some vestiges of an old V4L1 I2C driver that were called by em28xx.
This patch removes this dead code, and replaces videodev.h to videodev2.h
Uses the newer ioctl handler at videodev. This patch also cleans up some
bad logic at the driver and do CodingStyle and other cleanups at the
resulting driver.
Also, since VIDIOCMBUF were not working, the V4L1 compat code were removed.
The compat code will eventually be re-inserted, if we find a clean way for
implementing compatibility with the old API.
Allows shared access support for em28xx. Just one userspace application is
allowed to get stream. The other(s) application(s) can change V4L2 controls,
set video standards, etc.
This patch were splited from Markus Rechberger's tree and backported to 2.6.17
by Pádraig Brady.
The original patch were ported to the latest em28xx version and had CodingStyle
corrected to solve the issues pointed by scripts/checkpatch.pl.
Thanks to Pádraig Brady <P@draigBrady.com> for pointing this.
Adrian Bunk [Mon, 5 Nov 2007 17:07:26 +0000 (14:07 -0300)]
V4L/DVB (6577): et61x251/: make 5 functions static
This patch makes the following needlessly global functions in
et61x251_core.c static:
- et61x251_read_reg()
- et61x251_i2c_try_read()
- et61x251_i2c_try_write()
- et61x251_i2c_read()
- et61x251_i2c_write()
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adrian Bunk [Mon, 5 Nov 2007 17:07:22 +0000 (14:07 -0300)]
V4L/DVB (6576): cx88-mpeg.c: make 4 functions static
This patch makes the following needlessly global functions static:
- cx8802_init_common()
- cx8802_fini_common()
- cx8802_suspend_common()
- cx8802_resume_common()
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adrian Bunk [Mon, 5 Nov 2007 17:06:31 +0000 (14:06 -0300)]
V4L/DVB (6569): bt8xx/dst.c: make code static
This patch makes the following needlessly global code static:
- dst_gpio_outb()
- dst_gpio_inb()
- rdc_8820_reset()
- dst_pio_enable()
- dst_command()
- struct tuner_list[]
Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
V4L/DVB (6561): Fix xc2028 get register functions and calls
The status registers require a dword for setting register. Fix it on all
occurrences, and at xc3028_get_reg. Also, improves the hardware/firmware
detection printk.
Hans Verkuil [Sun, 4 Nov 2007 13:42:42 +0000 (10:42 -0300)]
V4L/DVB (6553): tuner: replace default_mode_mask
The default_mode_mask global is replaced by a list of tuner structs. The
tuner driver now walks that list to see which radio and/or tv tuner
devices are registered to a given i2c adapter.
The default_mode_mask global had to go since this is no longer supported
with the new bus-based I2C API.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Michael Krufky [Sun, 4 Nov 2007 14:03:22 +0000 (11:03 -0300)]
V4L/DVB (6551): tda8290: rule out tda988x before detecting tda8290/tda8295
To ensure prevention of detecting a tda9885/6/7 as a tda8290 or tda8295, we
will rule out the tda988x before testing the tda8290 / tda8295 id registers.
We read 8 bytes from the chip. If they are all equal, then it is not a
tda829x, or some other error has occurred.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: 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
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'
Sascha Sommer [Sun, 4 Nov 2007 11:06:48 +0000 (08:06 -0300)]
V4L/DVB (6545): em28xx: autodetect Cinergy 200 USB and VGear PocketTV
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>
Sascha Sommer [Sat, 3 Nov 2007 18:05:07 +0000 (15:05 -0300)]
V4L/DVB (6539): em28xx: add support for vgear pockettv
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>
Sascha Sommer [Sun, 4 Nov 2007 00:22:38 +0000 (21:22 -0300)]
V4L/DVB (6538): em28xx: fix locking to allow accesses from 2 different threads at the same time
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>
Trent Piepho [Thu, 1 Nov 2007 04:16:05 +0000 (01:16 -0300)]
V4L/DVB (6508): ttpci: Rework Kconfig menus and Makefile
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.
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>
Randy Dunlap [Mon, 29 Oct 2007 18:19:45 +0000 (15:19 -0300)]
V4L/DVB (6480): bttv: uses input functions, should depend on INPUT
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>
V4L/DVB (6475): Fix some troubles at list handling
- 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.
Hans Verkuil [Fri, 14 Sep 2007 08:13:54 +0000 (05:13 -0300)]
V4L/DVB (6471): tuner: i2c_client cannot be part of the tuner struct
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>
Michael Krufky [Sat, 27 Oct 2007 05:00:57 +0000 (02:00 -0300)]
V4L/DVB (6468): tda8290: auto-detect tda8290 or tda8295
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>
Hans Verkuil [Sun, 16 Sep 2007 13:47:15 +0000 (10:47 -0300)]
V4L/DVB (6465): Use correct error codes when chip is not recognized
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>