David Wong [Mon, 18 May 2009 08:25:49 +0000 (05:25 -0300)]
V4L/DVB (11880): cx23885: support for card Mygica X8506 DMB-TH
This patch add cx23885 support for card "Mygica X8506 DMB-TH".
It should work on "Magic-Pro ProHDTV Extreme" as well, as they are
same hardware with different branding.
Sign-off-by: David T.L. Wong <davidtlwong@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Miroslav Sustek [Sun, 31 May 2009 19:47:28 +0000 (16:47 -0300)]
V4L/DVB (11879): Adds support for Leadtek WinFast DTV-1800H
Enables analog/digital tv, radio and remote control (gpio).
Tested-by: Marcin Wojcikowski <emtees.mts@gmail.com> Tested-by: Karel Juhanak <karel.juhanak@warnet.cz> Tested-by: Andrew Goff <goffa72@gmail.com> Tested-by: Jan Novak <novak-j@seznam.cz> Signed-off-by: Miroslav Sustek <sustmidown@centrum.cz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sun, 17 May 2009 01:43:43 +0000 (22:43 -0300)]
V4L/DVB (11865): cx18: Tweak color burst gate delay and initial color sub-carrier freq
Fix the burst gate delays to use a crystal value of 28636360 as assumed by
the rest of the driver. Also have the initial color sub-carrier freq paramter
use the src decimation ratio per the documentation, instead of the actual
crystal/pixel clock ratio. The tracking circuit will find the correct color
subcarrier in any case, as long as we're close. Also fix up some debug print
statements.
Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Michael Krufky [Wed, 20 May 2009 19:06:10 +0000 (16:06 -0300)]
V4L/DVB (11860): saa7134: fix quirk in saa7134_i2c_xfer for the saa7131 bridge
The i2c quirk in the saa7134_i2c_xfer function does a bogus write
to i2c address 0xfd, to work around a bug in the silicon that
affects read transactions.
Unfortunately, this hack is not working properly, since the bogus
write is to 0xfd, an invalid i2c address. Fix this quirk by using
an actual valid i2c address, 0xfe, which is still unlikely to be
used as an i2c address for any actual i2c client.
This is required in order to properly communicate with a TDA10048
DVB-T demod located at i2c address 0x10 on the primary i2c bus.
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
figo.zhang [Mon, 18 May 2009 02:31:55 +0000 (23:31 -0300)]
V4L/DVB (11853): minor have assigned value twice
The variable minor have assigned value twice, the first time is in the
initial "video_device" data struct in those drivers, pls see
saa7134-video.c,line 2503.
Jean Delvare [Wed, 13 May 2009 19:56:20 +0000 (16:56 -0300)]
V4L/DVB (11850): pvrusb2: Instantiate ir_video I2C device by default
Now that the ir-kbd-i2c driver has been converted to a new-style i2c
driver, we can instantiate the ir_video I2C device by default. The
pvr2_disable_ir_video is kept to disable the IR receiver, either
because the user doesn't use it, or for debugging purpose.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Wed, 13 May 2009 19:52:44 +0000 (16:52 -0300)]
V4L/DVB (11848): saa7134: Simplify handling of IR on AVerMedia Cardbus E506R
Now that we instantiate I2C IR devices explicitly, we can skip probing
altogether on boards where the I2C IR device address is known. The
AVerMedia Cardbus E506R is one of these boards.
Jean Delvare [Wed, 13 May 2009 19:51:46 +0000 (16:51 -0300)]
V4L/DVB (11847): saa7134: Simplify handling of IR on MSI TV@nywhere Plus
Now that we instantiate I2C IR devices explicitly, we can skip probing
altogether on boards where the I2C IR device address is known. The MSI
TV@nywhere Plus is one of these boards.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Wed, 13 May 2009 19:50:11 +0000 (16:50 -0300)]
V4L/DVB (11846): ir-kbd-i2c: Don't assume all IR receivers are supported
The code in ir_probe makes the dangerous assumption that all IR
receivers are supported by the driver. The new i2c model makes it
possible for bridge drivers to instantiate IR devices before they are
supported, therefore the ir-kbd-i2c drivers must be made more robust
to not spam the logs or even crash on unsupported IR devices. Simply,
the driver will not bind to the unsupported devices.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Wed, 13 May 2009 19:49:32 +0000 (16:49 -0300)]
V4L/DVB (11845): ir-kbd-i2c: Use initialization data
For specific boards, pass initialization data to ir-kbd-i2c instead
of modifying the settings after the device is initialized. This is
more efficient and easier to read.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Wed, 13 May 2009 19:48:50 +0000 (16:48 -0300)]
V4L/DVB (11844): ir-kbd-i2c: Switch to the new-style device binding model
Let card drivers probe for IR receiver devices and instantiate them if
found. Ultimately it would be better if we could stop probing
completely, but I suspect this won't be possible for all card types.
There's certainly room for cleanups. For example, some drivers are
sharing I2C adapter IDs, so they also had to share the list of I2C
addresses being probed for an IR receiver. Now that each driver
explicitly says which addresses should be probed, maybe some addresses
can be dropped from some drivers.
Also, the special cases in saa7134-i2c should probably be handled on a
per-board basis. This would be more efficient and less risky than always
probing extra addresses on all boards. I'll give it a try later.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Wed, 13 May 2009 19:48:07 +0000 (16:48 -0300)]
V4L/DVB (11843): ir-kbd-i2c: Don't use i2c_client.name for our own needs
In the standard device driver binding model, the name field of
struct i2c_client is used to match devices to their drivers, so we
must stop using it for internal purposes. Define a separate field
in struct IR_i2c as a replacement, and use it.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (11842): radio-mr800.c: missing mutex include
radio-mr800.c uses struct mutex, so while <linux/mutex.h> seems to be
pulled in indirectly by one of the headers it already includes, the right
thing is to include it directly.
Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Simon Arlott [Tue, 12 May 2009 20:39:28 +0000 (17:39 -0300)]
V4L/DVB (11841): core: fix potential mutex_unlock without mutex_lock in dvb_dvr_read
dvb_dvr_read may unlock the dmxdev mutex and return -ENODEV, except this
function is a file op and will never be called with the mutex held.
There's existing mutex_lock and mutex_unlock around the actual read but
it's commented out. These should probably be uncommented but the read
blocks and this could block another non-blocking reader on the mutex
instead.
This change comments out the extra mutex_unlock.
[akpm@linux-foundation.org: cleanups, simplification] Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cohen David.A [Mon, 11 May 2009 14:00:20 +0000 (11:00 -0300)]
V4L/DVB (11840): change kmalloc to vmalloc for sglist allocation in videobuf_dma_map/unmap
Change kmalloc()/kfree() to vmalloc()/vfree() for sglist allocation
during videobuf_dma_map() and videobuf_dma_unmap()
High resolution sensors might require too many contiguous pages
to be allocated for sglist by kmalloc() during videobuf_dma_map()
(i.e. 256Kib for 8MP sensor).
In such situations, kmalloc() could face some problem to find the
required free memory. vmalloc() is a safer solution instead, as the
allocated memory does not need to be contiguous.
Signed-off-by: David Cohen <david.cohen@nokia.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Tue, 19 May 2009 13:08:03 +0000 (10:08 -0300)]
V4L/DVB (11837): uvcvideo: Start status polling on device open
Most UVC camera include an interrupt endpoint to report control value changes,
video streaming errors and camera button events. The USB controller
continuously polls the interrupt endpoint to retrieve such events. This
prevents the device from being auto-suspended, and thus consumes power.
Reporting video streaming errors don't make sense when the V4L2 device is
closed. Control value changes are probably useless as well if nobody listens to
the events, although caching will probably have to be completely disabled then.
No polling is thus be required when /dev/videoX is not opened.
To enable auto-suspend and save power do not poll the interrupt endpoint until
the device is open. We lose the ability to detect button events if no
application is using the camera.
V4L/DVB (11835): uvcvideo: Parse frame descriptors with non-continuous indexes.
The UVC specification requires frame descriptors indexes to range from 1 to
the number of frame descriptors. At least some Hercules Dualpix Infinite
webcams erroneously use non-continuous index ranges. Make the driver support
them.
Alan Nisota [Wed, 20 May 2009 08:52:13 +0000 (05:52 -0300)]
V4L/DVB (11833): dvb-usb: Remove support for Genpix-CW3K (damages hardware)
I have been informed by the manufacturer that the patch currently in the v4l tree to support the Genpix-CW3K version of the hardware will actually
damage the firmware on recent units. As he seems to not want this hardware supported in Linux, and I do not know how to detect the difference between
affected and not-affected units, I am requesting the immediate removal of support for this device. This patch removes a portion of the changeset dce7e08ed2b1 applied 2007-08-18 relating to this specific device.
Adapted patch to not remove code, but to only to comment it out.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
matthieu castet [Wed, 20 May 2009 08:42:33 +0000 (05:42 -0300)]
V4L/DVB (11832): dibusb_mc: fix i2c to not corrupt eeprom in case of strange read pattern
dibusb_i2c_xfer seems to do things very dangerous :
it assumes that it get only write/read request or write request.
That means that read can be understood as write. For example a program
doing
file = open("/dev/i2c-x", O_RDWR);
ioctl(file, I2C_SLAVE, 0x50)
read(file, data, 10)
will corrupt the eeprom as it will be understood as a write.
tomas petr [Wed, 20 May 2009 08:28:05 +0000 (05:28 -0300)]
V4L/DVB (11830): dib0700: add support for Leadtek WinFast DTV Dongle H
"Leadtek WinFast DTV Dongle H" is a hybrid digital/analog USB-stick TV
receiver. The code below allows the digital part to work with dvb_usb
in linux.
Signed-off-by: tomas petr <tom-petr@seznam.cz> Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
V4L/DVB (11810): em28xx: properly set packet size based on the device's eeprom configuration.
The em28xx actually has a register that tells the driver what the maximum
packet size is (based on a value programmed into the eeprom). Make use of
that register instead of assuming a hardcoded value of 564 (since 564 is not
correct for devices that do QAM such as the KWorld 340u).
Note that for now the em2874 code isn't there, falling back to the 564 value,
however this is not a problem since there are not any em2874 based devices in
the current v4l-dvb tree).
Thanks to Jarod Wilson for detecting the initial problem and figuring out that
the isoc configuration was wrong for his device.
V4L/DVB (11808): au0828: get rid of debug printk that was causing compile failures
Remove a debug printk() line I added which is no longer needed, and happened
to be causing compile failures on some earlier kernels in Han's daily
compile report.
V4L/DVB (11807): cx88: remove xc5000 reset for Pinnacle 800i
According to the engineer at PCTV Systems, the xc5000 reset pin is supposed
to be on GPIO12. However, despite three nights of effort, pulling that GPIO
low didn't reset the xc5000. While pulling MO_SRST_IO low does reset the
xc5000, this also resets in the s5h1409 being reset as well. This causes
tuning to always fail since the internal state of the s5h1409 does not match
the driver's state.
Given that the only two conditions in which the driver performs a reset is
during firmware load and powering down the chip, I am taking out the reset.
We know that the chip is being reset when the cx88 comes online, and not being
able to do power management for this board is better than not having any
tuning at all.
Problem discovered when implementing proper power management for the xc5000,
which results in calls to the reset callback *after* s5h1409 is initialized.
V4L/DVB (11804): xc5000: poll at 5ms interval for register write command completion
Instead of polling at 100ms intervals for register writes, poll at 5ms
intervals. This is consistent with the xc5000 specification, and improves
tuning time by up to 500 ms on devices that such as the au0828 which do not
properly implement i2c clock stretching (since the five register writes that
occur for a tuning request often do not complete immediately but do complete
far before 100ms has gone by).
The net amount of time we wait before timing out is unchanged (500ms).
V4L/DVB (11802): xc5000: switch to new xc5000 firmware 1.6.114 with redistribution rights
Xceive has graciously allowed us to now freely redistribute the xc5000
firmware, which eliminates the need for users to manually extract the blob
from the Hauppauge driver.
Thanks to Brian Mathews <bmathews@xceive.com> for providing this code
V4L/DVB (11799): xc5000: don't load firmware until a tuning request is made
Defer loading of the xc5000 firmware until it is actually needed. This helps
on distros that have hald, which results in the device not being available
for use for around ten seconds in cases where the i2c bus is slow (such as
the HVR-950Q). Also, the firmware load isn't really useful since we
immediately put the device to sleep afterward, which means a firmware reload
will be required anyway.
Provide for the ability for a user to disable putting the tuner to sleep, in
case he doesn't want to incur the cost of reloading the firmware when starting
up his/her application. The module options are intentionally identical to
xc3028.
Make it a little more obvious in the dmesg output what is going on during
firmware upload. This is more important for boards like the HVR-950q that
take nearly seven seconds to do the upload.
V4L/DVB (11796): xc5000: start using the newer "finerfreq" tuning command
Starting in firmware version 1.1.44, Xceive recommends using the FINERFREQ for
all normal tuning (the doc indicates reg 0x03 should only be used for fast
scanning for channel lock)
V4L/DVB (11794): au0828: reduce reset time for xc5000 to 10ms
The xc5000 datasheet indicates that the reset pin only needs to be held low
for 10ms. Reduce the value accordingly, which speeds up the firmware load
time a bit.
V4L/DVB (11793): xc5000: Properly support power down for newer firmware
Xceive got rid of the XREG_POWER_DOWN register in later firmware revisions.
Their technical support informed me that the correct way to put the tuner
to sleep is to pull the reset pin (but don't reload the firmware).
V4L/DVB (11792): xc5000: switch to new version of Xceive firmware
This switches to a new version of the xc5000 firmware, extracted from the
latest Hauppauge driver. It includes the support for the XREG_BUSY register
(a lack of which was causing tuning to take 3200ms instead of around 300ms).
Bring back the code that puts the xc5000 to sleep. For the Pinnacle 801e
this results in power consumption at idle dropping from 325ma to 124ma.
If there are *actually* any devices that don't work in this configuration,
they should set dvb_frontend.ops.tuner_ops.sleep to NULL (per mkrufky's
suggestion)
Also, had to make sure we were making sure the firmware was loaded in the
digital version of set_params, or else we end up get i2c errors if the
device is asleep
Steven Toth [Sat, 2 May 2009 14:39:46 +0000 (11:39 -0300)]
V4L/DVB (11767): cx23885: Add preliminary support for the HVR1270
The patch means the board will be recognised, and the parts brought
out of reset correctly. This patches depends on the centralized GPIO
patch to be merged. What's missing before the HVR-1270 will function
for DTV? The model# needs to be added to avoid 'unknown model'
output and the LG3305/Tuner need to be attached in cx23885-dvb.c
Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Steven Toth [Sat, 2 May 2009 14:29:50 +0000 (11:29 -0300)]
V4L/DVB (11765): cx23885: Add generic functions for driving GPIO's
The GPIO's on the product can be in one of three places. To date we've
mainly used the GPIO's on the bridge itself, and once on the encoder.
Rather than having the complexity of multiple GPIO writes/reads from
isolated placed in the driver we'll route them through this function,
so we can make intelligent decisions about 1) Where the GPIO lives
and 2) Whether it conflicts (based on board) with some other function
to avoid bugs.
Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Steven Toth [Tue, 5 May 2009 22:30:27 +0000 (19:30 -0300)]
V4L/DVB (11700): tda10048: Added option to block i2c gate control from other drivers.
Currently, DVB-T is broken and this fixes it.
The PVRUSB2 has an odd I2C bus configuration where opening the i2c gate
on the digital and analog demod causes the tuner to fail. This needs
to be protected against for the PVRUSB2.
Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Sat, 9 May 2009 03:43:40 +0000 (00:43 -0300)]
V4L/DVB (11753): tveeprom: Point the TCL MNM05-4 tuner entry to an actual tuner definition
The TCL MNM05-04 is used on some HVR-1600 models. It appears to be
similar to the TCL MFMN05-4 but without FM radio. The
TUNER_PHILIPS_FM1236_MK3 tuner definition appears to be the proper existing
tuner definition to use for this tuner.
Reported-by: Matt Beadon <matt.beadon@gmail.com> Tested-by: Matt Beadon <matt.beadon@gmail.com> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean Delvare [Sat, 2 May 2009 03:22:27 +0000 (00:22 -0300)]
V4L/DVB (11748): pvrusb2: Don't use the internal i2c client list
The i2c core used to maintain a list of client for each adapter. This
is a duplication of what the driver core already does, so this list
will be removed as part of a future cleanup. Anyone using this list
must stop doing so.
For pvrusb2, I propose the following change, which should lead to an
equally informative output. The only difference is that i2c clients
which are not a v4l2 subdev won't show up, but I guess this case is
not supposed to happen anyway.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mike Isely [Sat, 2 May 2009 03:04:35 +0000 (00:04 -0300)]
V4L/DVB (11747): pvrusb2: Bump up version advertised through v4l interface
Kick up the pvrusb2 version number advertised through the v4l
interface. This value really has almost no meaning because I don't
make a serious attempt to version the driver in this manner (otherwise
this one line becomes a nasty hotspot of changes and merge
conflicts). The value that is here is really a historical thing.
However Hans Verkuil thought it might be a good idea to bump up the
number anyway right now since the driver's mechanism for communicating
with the v4l core has pretty much completely changed. Sending out a
Mike Isely [Sat, 2 May 2009 01:33:16 +0000 (22:33 -0300)]
V4L/DVB (11746): pvrusb2: Set ir_video autoloading to default disabled
This sets the disable_autoload_ir_video module option to being set,
which disables any attempt by the driver to autoload IR support. This
changes preserves previous behavior, for now. This change can be set
back concurrent with other changes that finally update i2c-kbd-i2c to
use the new i2c binding model.
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mike Isely [Sat, 2 May 2009 01:23:39 +0000 (22:23 -0300)]
V4L/DVB (11745): pvrusb2: Update to work with upcoming ir_video changes in v4l-dvb core
The ir-kbd-i2c module is about to be updated to match the new style
i2c binding model. These pvrusb2 changes maintain compatibility with
that change. Note that this does not actually break anything even
without the expected ir-kbd-i2c changes yet because previously the
pvrusb2 didn't autoload ir-kbd-i2c anyway.
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mike Isely [Mon, 6 Apr 2009 04:51:38 +0000 (01:51 -0300)]
V4L/DVB (11744): pvrusb2: Select, track, and report IR scheme in use with the device
This change defines all possible "IR schemes" related to the pvrusb2
driver, on a per-device basis. That information is then set according
to the hardware in use. The idea here is to make possible a more
intelligent future decision on which, if any, IR receiver driver might
be loaded during initialization.
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Chaithrika U S [Thu, 7 May 2009 12:30:01 +0000 (09:30 -0300)]
V4L/DVB (11743): Analog Devices ADV7343 video encoder driver
Add ADV7343 I2C based video encoder driver. This follows the
v4l2-subdev framework. This driver has been tested on TI DM646x EVM. It
has been tested for Composite and Component outputs.
Updates as per review by Mauro Chehab, added support for more standards
supported by the encoder. Also adding the missed out signed-offs.Tested
only NTSC and PAL standards.
[hverkuil@xs4all.nl: s_routing API changed, updated driver to use new API] Signed-off-by: Manjunath Hadli <mrh@ti.com> Signed-off-by: Brijesh Jadav <brijesh.j@ti.com> Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Chaithrika U S [Thu, 7 May 2009 12:29:25 +0000 (09:29 -0300)]
V4L/DVB (11742): TI THS7303 video amplifier driver code
This patch adds driver for TI THS7303 video amplifier. This driver is
implemented as a v4l2 sub device. Tested on TI DM646x EVM.
This version has updates based on review comments by Mauro Chehab.
Signed-off-by: Chaithrika U S <chaithrika@ti.com> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>