Commit Graph

2718 Commits (22cc065bad19b0a19adecdc753ded7a7b0c752fa)

Author SHA1 Message Date
Hans Verkuil cd9fa02660 V4L/DVB (7340): ivtv: fix tunerhz bug: PAL-N(c) is 50 Hz, not 60
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil d00573bbe9 V4L/DVB (7339): ivtv: add support for Japanese variant of the Adaptec AVC-2410
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil c0038ce025 V4L/DVB (7338): ivtv: improve pal/secam module options, add tunerhz module option
Allow options like pal=bgh, improve description of those options.
Add tunerhz option: 50=card has 50Hz tuner, 60=card has 60Hz tuner.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Hans Verkuil 0358d7c580 V4L/DVB (7337): ivtv: fix polling bug
The q_io queue was never taken into account by the poll function. Thanks to
Andy Walls for finding this bug.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Guennadi Liakhovetski ad5f2e859d V4L/DVB (7336): soc-camera: streamline hardware parameter negotiation
Improve hardware parameter negotiation between the camera host driver and
camera drivers. Parameters like horizontal and vertical synchronisation,
pixel clock polarity shall be set depending on capabilities of the
parties.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Andrew Morton 1c659689fe V4L/DVB (7335): usb-video: checkpatch fixes
Please run checkpatch prior to sending patches

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Jean Delvare d6f34d7add V4L/DVB (7332): ir-kbd-i2c: Minor optimization in ir_probe
This saves an initialization and a comparison.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Sascha Sommer 2c4a07b2da V4L/DVB (7331): Fix em2800 altsetting selection
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:49 -03:00
Mauro Carvalho Chehab a9317abfba V4L/DVB (7327): cx88: Fix memset for tuner-xc3028 control
Fix a cut-and-paste error

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mauro Carvalho Chehab 000e27a639 V4L/DVB (7326): Fix bad whitespaces
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mauro Carvalho Chehab ddd5441df4 V4L/DVB (7325): cx88-dvb: fix an OOPS for xc3028 devices, when dvb_attach fails
If dvb_attach fails, dev->dvb.frontend is NULL. This will produce an OOPS, as
reported.

Thanks to Vanessa Ezekowitz <vanessaezekowitz@gmail.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Michael Krufky f0910c7443 V4L/DVB (7323): pvrusb2: set default video standard to NTSC for OnAir HDTV / Creator
The pvrusb2 driver normally picks up the default video standard from the
eeprom on Hauppauge devices, but the OnAir HDTV and OnAir Creator are not
Hauppauge devices, and do not store this information in any eeprom.

These devices support NTSC/ATSC, so we should use NTSC by default when in
analog mode.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Tobias Klauser ebff033039 V4L/DVB (7322): pvrusb2: Fix storage-class as per C99 spec
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely 794b16072e V4L/DVB (7321): pvrusb2: Rework context handling and initialization
This change significantly rearranges pvr2_context level initialization
and operation:

1. A new kernel thread is set up for management of the context.

2. Destruction of the pvr2_context instance is moved into the kernel
   thread.  No other context is able to remove the instance; doing
   this simplifies lock handling.

3. The callback into pvrusb2-main, which is used to trigger
   initialization of each interface, is now issued from this kernel
   thread.  Previously it had been indirectly issued out of the work
   queue thread in pvr2_hdw, which led to deadlock issues if the
   interface needed to change a control setting (which in turn
   requires dispatch of another work queue entry).

4. Callbacks into the interfaces (via the pvr2_channel structure) are
   now issued strictly from this thread.  The net result of this is
   that such callback functions can now also safely operate driver
   controls without deadlocking the work queue.  (At the moment this
   is not actually a problem, but I'm anticipating issues with this in
   the future).

5. There is no longer any need for anyone to enter / exit the
   pvr2_context structure.  Implementation of the kernel thread here
   allows this all to be internal now, simplifying other logic.

6. A very very longstanding issue involving a mutex deadlock between
   the pvrusb2 driver and v4l should now be solved.  The deadlock
   involved the pvr2_context mutex and a globals-protecting mutex in
   v4l.  During initialization the driver would take the pvr2_context
   mutex first then the v4l2 interface would register with v4l and
   implicitly take the v4l mutex.  Later when v4l would call back into
   the driver, the two mutexes could possibly be taken in the opposite
   order, a situation that can lead to deadlock.  In practice this
   really wasn't an issue unless a v4l app tried to start VERY early
   after the driver appeared.  However it still needed to be solved,
   and with the use of the kernel thread relieving need for
   pvr2_context mutex, the problem should be finally solved.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely 8f59100a42 V4L/DVB (7320): pvrusb2: Eliminate timer race during tear-down
The pvrusb2 tear-down logic was clearing two timers before stopping
its internal work queue.  That left a tiny window open where the work
queue might run after the timers are stopped, possibly starting them
again.  This could lead to dangling pointers and an oops.  Solution:
Kill the work queue first, then delete the timers.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely c4a8828ddb V4L/DVB (7319): pvrusb2: Close potential race condition during initialization
There is a callback that is issued to into pvr2_context from pvr2_hdw
after initialization is done.  There was a probability that this
callback could get missed.  Fixed.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely ee9ca4b24f V4L/DVB (7318): pvrusb2: Remove dead code
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely a00199fb3f V4L/DVB (7317): pvrusb2: Increase buffer size for printing video standard strings
Buffer size for printing pvrusb2 video standard strings was too small
before.  This is cosmetic; the printing logic is not able to overrun a
too-short buffer.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely ef7c370092 V4L/DVB (7316): pvrusb2: Handle ATSC video standard bits
The pvrusb2 driver dynamically generates an enumeration of support
video standard combinations based on which video standard bits are
set.  ATSC modes don't fall into this since they are by nature not
analog.  The pvrusb2 driver has been warning about an inability to
classify ATSC standards.  This change causes the classification
algorithm to ignore any ATSC standards (such things are better handled
elsewhere anyway).

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely fd1da78979 V4L/DVB (7315): pvrusb2: Add Gotview USB 2.0 DVD Deluxe to supported devices
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely 5fd782af71 V4L/DVB (7314): pvrusb2: Make device attribute structure more compact
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely 40381cb02f V4L/DVB (7313): pvrusb2: Make LED control into a device-specific attribute
The pvrusb2 driver has used hardcoded logic to control the LED on the
device.  However this is really Hauppauge-specific behavior.  This
change defines a new device attribute for LED control and sets things
up appropriately for Hauppauge devices.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:48 -03:00
Mike Isely c55a97d753 V4L/DVB (7312): pvrusb2: Indicate streaming status via LED
Most of this originates from Michael Krufky <mkrufky@linuxtv.org>;
these changes move LED control into separate functions.  This is the
first step in new work to make LED control a device-specific attribute.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely 1b9c18c54d V4L/DVB (7311): pvrusb2: Allow digital streaming without encoder firmware
The encoder is not a part of the pipeline when in digital mode, so
streaming is OK in this case even when the encoder's firmware is not
loaded.  Modify the driver core handling of this scenario to permit
streaming.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely e9db1ff235 V4L/DVB (7310): pvrusb2: trace print cosmetic cleanup / improvements
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely 62433e3120 V4L/DVB (7309): pvrusb2: Enhance core logic to also control digital streaming
This is a major pvrusb2 change.  The driver core has an algorithm that
is used to cleanly sequence the changes needed to enable / disable
video streaming.  The algorithm had originally been written for analog
streaming, but when in digital mode the pipeline is considerably

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely e8f5bacfcf V4L/DVB (7308): pvrusb2: Define digital control scheme device attributes
Unlike analog control, control of the digital side is not nearly as
uniform among different devices.  So we have to specify the correct
digital control scheme as a new device attribute.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely 84147f3dd9 V4L/DVB (7307): pvrusb2: New functions for additional FX2 digital-related commands
This code is actually part of a larger set from Mike Krufky
<mkrufky@linuxtv.org>, to support ATSC streaming from within the
pvrusb2 driver.  More to come...

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely 99a6acf9a7 V4L/DVB (7306): pvrusb2: Fix oops possible when claiming a NULL stream
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely 7f421fe475 V4L/DVB (7305): pvrusb2: whitespace fixup
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Michael Krufky e1edb19a00 V4L/DVB (7304): pvrusb2: add function pvr2_hdw_cmd_powerdown
Call pvr2_hdw_cmd_powerdown to power down the device

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely dbc40a0e58 V4L/DVB (7303): pvrusb2: Ensure that default input selection is actually valid
Previously the pvrusb2 driver just started with the default input to
be "television".  But if the device doesn't support an analog tuner
then this default must be different.  New logic here selects a
reasonable default based on the actual valid set of available inputs.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely fdf256f337 V4L/DVB (7302): pvrusb2: Improve control validation for enumerations
When an enumeration control is changed, the pvrusb2 driver assumed
that the enumeration values were continuous.  That is no longer true;
this change allows for properly input validation even when not all
enumeration values are legal (which can happen with input selection
based on what the hardware supports).

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely bedbbf8be2 V4L/DVB (7301): pvrusb2: Implement addition sysfs tracing
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely beb0ecd7f0 V4L/DVB (7300): pvrusb2: v4l2 implementation fixes for input selection
Now that the pvrusb2 driver can dynamically choose which inputs to
make available depending on the hardware, the enumeration of input
choices is no longer a contiguous range of integers.  Unfortunately
this causes a problem in the v4l2 implementation since the input
enumeration requires continuity in the API.  This change implements a
mapping in order to preserve the v4l2 interface requirement.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely 7fb20fa38c V4L/DVB (7299): pvrusb2: Improve logic which handles input choice availability
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:47 -03:00
Mike Isely 895c3e8bfe V4L/DVB (7298): pvrusb2: Account for dtv choice (a bit) in v4l2 implementation
The v4l2 implementation in pvru2b2 must produce a sane answer when
asked, when the input choice is set to dtv.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Mike Isely 29bf5b1d75 V4L/DVB (7297): pvrusb2: Dynamically control range of input selections
This follows from defining the available inputs as device attributes.
This change causes the driver to adjust its list of inputs based on
those attributes.  Now, for example, the FM radio will appear as a
choice only if the hardware supports an FM radio.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Mike Isely 1aaac60fec V4L/DVB (7296): pvrusb2: Define device attributes for all input modes
Different devices support different input types.  Up until now we've
really been assuming that everyone has an analog tuner, an FM radio,
composite, and s-video inputs.  But as we add other devices, these
assumptions are no longer true.  The way to deal with this is to
define the available inputs as additional device attributes, so that
the driver can adjust its internal behavior accordingly.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Mike Isely d068c6eec9 V4L/DVB (7295): pvrusb2: add device attributes for fm radio and digital tuner
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Wojciech Migda 27dea3eb66 V4L/DVB (7294): : tuner and radio addresses are missing for the PixelView PlayTV card
The PixelView PlayTV card definition structure was missing initialization of
the tuner_addr and radio_addr fields. As a result it was impossible to have the
tuner initialized using parameters specified while loading the bttv.ko module.

This regression became visible after the v4l rearrangements introduced
somewhere around 2.6.15 kernel version.

The root cause for the tuner initialization failure is located in the
attach_inform function in the bttv-i2c.c file.

There at the very beginning the addr variable holding the tuner device address
is initialized with the value taken from the bttv_tvcards array.

For the PixelView PlayTV card the tuner address field (and the radio address as
well) was uninitialized, and thus equal 0. Later in that function execution of
the TUNER_SET_TYPE_ADDR tuner command is guarded with check for the tuner
address either equal ADDR_UNSET, or client->addr.

Since both are non-zero (the latter in case of the card owned by me at the
runtime is equal 0x61) the TUNER_SET_TYPE_ADDR command is not executed, and
consequently in the tuner_attach function in the tuner-core.c file call to
i2c_attach_client does not result in assigning the tuner type variable with the
requested value.

Providing initialization of the tuner_addr and radio_addr with ADDR_UNSET
values as it is already done for other tv cards defined in bttv-cards.c ensures
that the tuner initialization is done correctly, just as it used to be in the
2.6.14 kernel.

Signed-off-by: Wojciech Migda <wojtek.golf@interia.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Michael Krufky 3c66e4e18b V4L/DVB (7289): cx88: enable IR receiver and real time clock on FusionHDTV7 Gold
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Michael Krufky 76464d412a V4L/DVB (7288): cx88: fix GPIO for FusionHDTV 7 Gold input selection
Fix GPIO for FusionHDTV 7 Gold tv / s-video / composite input selection.
Fix card textual name to match other FusionHDTV device names.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Steven Toth 1117d6ba13 V4L/DVB (7287): cx88: add analog support for DVICO FusionHDTV7 Gold
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Marcin Slusarz a58858556d V4L/DVB (7286): limit stack usage of ir-kbd-i2c.c
ir_probe allocated struct i2c_client on stack;
it's pretty big structure, so allocate it with kzalloc

make checkstack output without this patch:
x059d ir_probe [ir-kbd-i2c]:                           1000

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Douglas Schilling Landgraf 1c3bf598cf V4L/DVB (7283): videobuf-dma-sg: Remove unused variable
Removed warning message:

 - videobuf-dma-sg.c: In function 'videobuf_dma_unmap':
 - videobuf-dma-sg.c:281: warning: unused variable 'dev'

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Brandon Philips e43d76b40d V4L/DVB (7281): v4l: Deadlock in videobuf-core for DQBUF waiting on QBUF
Avoid a deadlock where DQBUF is holding the vb_lock while waiting on a QBUF
which also needs the vb_lock.  Reported by Hans Verkuil <hverkuil@xs4all.nl>.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Guennadi Liakhovetski 9dc4e48fbe V4L/DVB (7276): soc-camera: deactivate cameras when not used
Only attach cameras to the host interface for probing, then detach until
open. This allows platforms with several cameras on an interface,
physically supporting only one camera, to handle multiple cameras and
activate them selectively after initial probing. The first attach during
probe is needed to activate the host interface to be able to physically
communicate with cameras.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Harvey Harrison 6f2896756c V4L/DVB (7274): dabusb: fix shadowed variable warning in dabusb.c
drivers/media/video/dabusb.c:208:6: warning: symbol 'buffers' shadows an earlier one
drivers/media/video/dabusb.c:63:12: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:46 -03:00
Mauro Carvalho Chehab b573ea0a93 V4L/DVB (7271): cx88-cards: Fix powerangel gpio1
With this gpio, audio works properly.

Thanks to Daniel Fraga <fragabr@gmail.com> for helping on fixing the code for
Powerangel Real board.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab c4a3ce1cd0 V4L/DVB (7270): cx88-dvb: Renames pci_nano callback
This callback is specific to pci_nano, since supports only dvb. Renames it
to avoid future mistakes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab 8cd7bf3336 V4L/DVB (7269): cx88: Powercolor Angel works only with firmware version 2.5
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab 23fb348d00 V4L/DVB (7266): cx88-dvb: convert attach_xc3028 into a function
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab 64016330b6 V4L/DVB (7265): cx88: prints an info when xc2028 is set or is attached
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab 0f19e65bc5 V4L/DVB (7264): cx88-cards: always use a level on printk messages
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab c450e50e8d V4L/DVB (7263): Some cleanups at cx88 callback methods
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab bc36a686a6 V4L/DVB (7262): Add support for xc3028-based boards
This patch adds support for the following saa7134 xc3028 based boards:
132 -> AVerMedia Cardbus TV/Radio (E506R)       [1461:f436]
133 -> AVerMedia Hybrid TV/Radio (A16D)         [1461:f936]
134 -> Avermedia M115                           [1461:a836]
135 -> Compro VideoMate T750                    [185b:c900]

This is based on a original patch thanks to Markus Rechberger that added xc3028
gpio init code for the above boards.

This patch moves saa7134_tuner_callback to saa7134-cards, originally used only
by tda8290 DVB-S boards. The callback was made more generic to support other
tuners.

Currently, it supports both tda8290 and xc2028/xc3028 tuners. Added also the
basis for xc5000 tuner callback.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab 446018d807 V4L/DVB (7261): Use the same callback argument as xc3028 and xc5000
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab 1fe8736955 V4L/DVB (7260): tuner-xc3028: Don't check return code for clock reset
Only tm6000 needs to be aware when a frequency is being changed. This seems
to improve channel change detection. Other bridges don't need this.
So, better to discard any errors if this fails, and proceed changing the
channels.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Chris Pascoe 8765561fc8 V4L/DVB (7259): FusionHDTV DVB-T Pro tuning problem fixes
It seems that on this board, the demodulator provides the pullup on the I2C
bus, which means that calling i2c_gate_ctrl crashes the bus.  Turn this off
and the xc3028 can talk OK.  Also fix some GPIO related settings that
became more clear through working on this.

Some changes made by Mauro Chehab to allow merging it with some
other xc3028 patches.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Chris Pascoe b3fb91d20c V4L/DVB (7258): Support DVB-T tuning on the DViCO FusionHDTV DVB-T Pro
Add support for tuning DVB-T channels on DViCO's FusionHDTV DVB-T Pro board.

The IR remote and analog tuner are not supported at this time.

Some changes made by Mauro Chehab to allow merging it with some other xc3028
patches.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab 9507901ef3 V4L/DVB (7257): cx88: Add xc2028/3028 boards
This patch ports a patch from Markus Rechberger to work with tuner-xc2028.
It adds entries for several cx88 boards with xc2038/3028 tuners.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Mauro Carvalho Chehab c2cb8fcc00 V4L/DVB (7256): cx88: Add support for tuner-xc3028
Callback gpio's based on Markus Rechberger, Christopher Pascoe and Steven Toth
patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Michael Krufky 8efd2e2826 V4L/DVB (7254): cx88: fix FusionHDTV 5 PCI nano name and enable IR support
load ir-kbd-i2c for IR remote control support on DViCO FusionHDTV 5 PCI nano

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Steven Toth 5c00fac0ba V4L/DVB (7252): cx88: Add support for the Dvico PCI Nano
ATSC is known to work.
SVideo / Composite should work (I have no cable to test).
Analog tuner support does not work.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Guennadi Liakhovetski 7102b773d5 V4L/DVB (7250): Clean up pxa-camera driver, remove non-functional and never tested pm-support
This patch addresses most issues pointed out by Russell and Erik, moves
recently introduced into pxa-regs.h camera-specific defines into
pxa_camera.c, removes dummy power-management functions, improves
function-naming, etc.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Guennadi Liakhovetski bb55de3b0e V4L/DVB (7249): Fix advertised pixel formats in mt9m001 and mt9v022
Only advertise pixel formats, that we actually can support in the
present configuration.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
maximilian attems b1daf7e123 V4L/DVB (7248): dabfirmware.h add missing license
Received written ack from the dabusb author
that the firmware is BSD licensed.
As bonus clarify copyright holder.

Signed-off-by: maximilian attems <max@stro.at>
Acked-by: Deti Fliegl <deti@fliegl.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Hans Verkuil 9b2e5c6bea V4L/DVB (7245): ivtv: start timer for each DMA transfer
The DMA timeout timer was started once for each set of DMA transfers,
but it should be started for each single DMA transfer.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Hans Verkuil c9aec06f4a V4L/DVB (7244): ivtv: CROP is not supported for video capture
CROPCAP suggests that video capture supports cropping, but this is not the
case.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Ian Armstrong 88ab075aee V4L/DVB (7243): ivtv: yuv framebuffer tracking
The existing yuv code limits output to the display area occupied by the
framebuffer. This patch allows the yuv output to be 'detached' via
V4L2_FBUF_FLAG_OVERLAY.

By default, the yuv output window will be restricted to the framebuffer
dimensions and the output position is relative to the top left corner of the
framebuffer. This matches the behaviour of previous versions.

If V4L2_FBUF_FLAG_OVERLAY is cleared, the yuv output will no longer be linked
to the framebuffer. The maximum dimensions are either 720x576 or 720x480
depending on the current broadcast standard, with the output position
relative to the top left corner of the display. The framebuffer itself can be
resized, moved and panned without affecting the yuv output.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Tyler Trafford 520ebe5f72 V4L/DVB (7241): cx25840: code cleanup
- Use min()
- Eliminate extraneous variables

Signed-off-by: Tyler Trafford <ttrafford@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Hans Verkuil 491215d810 V4L/DVB (7240): tveeprom: remove obsolete i2c driver code
The i2c driver code was once added for the out-of-tree ivtv driver,
but the ivtv driver hasn't used that for a long time so this code can
now be removed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Adrian Bunk 4d34dccd5e V4L/DVB (7238): make stk_camera_{suspend,resume}() static
This patch makes the needlessly global stk_camera_{suspend,resume}()
static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Guennadi Liakhovetski 0705135e59 V4L/DVB (7237): Convert videobuf-dma-sg to generic DMA API
videobuf-dma-sg does not need to depend on PCI. Switch it to using generic
DMA API, convert all affected drivers, relax Kconfig restriction, improve
compile-time type checking, fix some Coding Style violations while at it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Mauro Carvalho Chehab f13613acfb V4L/DVB (7235): tuner-simple: fix a buffer overflow
simple_set_tv() creates a buffer with 4 elements, and calls
simple_std_setup(), passing &buffer[1]. This makes the 5th element of buffer to
be initialized to 0, overriding some area outside the buffer.

Also, simple_std_setup() receives a buffer as parameter, but the buffer is
just overriden after the call, so, it doesn't make much sense to pass it as a
parameter.

This patch removes buffer[] from the function call, creating, instead, a local
var to be used internally.

Thanks to Axel Rometsch <axel.rometsch@freenet.de> for pointing the issue.

Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Russell Kliese 6a6179b6db V4L/DVB (7230): saa7134: add support for the MSI TV@nywhere A/D v1.1 card
Signed-off-by: Russell Kliese <russell@kliese.wattle.id.au>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Hermann Pitton 7b5b3f1765 V4L/DVB (7229): saa7134: add support for the Creatix CTX953_V.1.4.3 Hybrid
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Hartmut Hackmann 1b1cee35de V4L/DVB (7227): saa7134: fixed DVB-S support for Medion/Creatix CTX948
The I2C bus interface of the LNB supply sits behind the i2c gate of the
tda10086, so wrappers were necessary for the set_voltage functions.

For the time being, the board will show up as MD8800

Many thanks to Hermann Pitton for his help

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:44 -03:00
Hartmut Hackmann 6ab465a821 V4L/DVB (7226): saa7134: add support for the NXP Snake DVB-S reference design
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:43 -03:00
Hartmut Hackmann 4b1431ca1c V4L/DVB (7224): Initial DVB-S support for MD8800 /CTX948
Support is not complete yet and untested.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:43 -03:00
Roel Kluin 05b207924d V4L/DVB (7220): drivers/media/video/sn9c102/sn9c102_core.c Fix Unlikely(x) == y
Fix Unlikely(x) == y

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Reviewed-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:43 -03:00
Guennadi Liakhovetski ef6ad5c35e V4L/DVB (7218): Fix breakage in mt9m001 and mt9v022 driver if "CONFIG_GENERIC_GPIO is not set"
Both camera drivers can function without GPIO support, in which case they
will only support the 10 bit data width mode. But the two respective switch
have to depend on CONFIG_GENERIC_GPIO. Additionally remove redundant
gpio_is_valid tests - they are repeated in bus_switch_request() functions.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:43 -03:00
Guennadi Liakhovetski b4333a3bae V4L/DVB (7217): Replace NO_GPIO with gpio_is_valid()
Upon suggestion by David Brownell use a gpio_is_valid() predicate
instead of an explicit NO_GPIO macro. The respective patch to
include/asm-generic/gpio.h has been accepted upstream.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:43 -03:00
Brandon Philips e723ee0089 V4L/DVB (7204): remove V4L2_CID_SHARPNESS from meye.h and report private control as DISABLED
- Continue to support the V4L2_CID_PRIVATE_BASE + 1 control in the ABI
 - Report the same control as V4L2_CID_SHARPNESS
 - Report the private control disabled via QUERYCTRL

Signed-off-by: Brandon Philips <bphilips@suse.de>
Acked-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:43 -03:00
Michael Krufky ab6c46e24a V4L/DVB (7184): make hybrid_tuner_request_state tolerant of devices without i2c adapters
Some dvb demodulators access the tuner directly without using i2c.
In these cases, i2c_adap may be NULL.  This patch fixes
hybrid_tuner_request_state to allow for NULL i2c_adapters.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:43 -03:00
Guennadi Liakhovetski 7397bfbe10 V4L/DVB (7174): Add support for the MT9V022 camera
This driver supports Micron MT9V022 colour camera.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:43 -03:00
Guennadi Liakhovetski f523dd0da9 V4L/DVB (7173): Add support for the MT9M001 camera
This driver supports Micron MT9M001 monochrome and colour cameras.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:42 -03:00
Guennadi Liakhovetski 3bc43840c3 V4L/DVB (7578a): V4L: V4L2 soc_camera driver for PXA270
This patch adds a driver for the Quick Capture Interface on the PXA270.
It is based on the original driver from Intel, but has been re-worked
multiple times since then, now it also supports the V4L2 API. This patch 
depends on a complementary patch, submitted to the ARM tree, providing 
PXA270 camera platform bindings.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:42 -03:00
Guennadi Liakhovetski e55222ef27 V4L/DVB (7170): soc_camera V4L2 driver for directly-connected SoC-based cameras
This driver provides an interface between platform-specific camera
busses and camera devices. It should be used if the camera is connected
not over a "proper" bus like PCI or USB, but over a special bus, like,
for example, the Quick Capture interface on PXA270 SoCs. Later it should
also be used for i.MX31 SoCs from Freescale.  It can handle multiple
cameras and / or multiple busses, which can be used, e.g., in
stereo-vision applications.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:42 -03:00
Michael Krufky c1b4d92789 V4L/DVB (7137): tuner: return number of instances remaining after hybrid_tuner_release_state
Assign the number of instances remaining as the return value of
hybrid_tuner_release_state, in case there is any extra cleanup that
the tuner driver needs to do after an instance has been destroyed.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:27 -03:00
Michael Krufky 2756665c28 V4L/DVB (7135): remove PREFIX from users of tuner_foo printk macros
Store a pointer to the device name in the name field of
struct tuner_i2c_props, so that we can remove the
printk macros defined in tuner-i2c.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:26 -03:00
Michael Krufky 3c2a0865d0 V4L/DVB (7134): tuner: create a macro for sharing state between hybrid tuner instances
Create a macro implementing a standard method to share state amongst
multiple instances of a hybrid tuner object.

Also, prepare tuner_foo printk macros for the removal of PREFIX

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:26 -03:00
Michael Krufky 2e43c953bf V4L/DVB (7130): tuner: remove emacs c-basic-offset override block
I'd prefer to leave this here, but official CodingStyle
doesn't care what I think :-/

Remove the emacs format override block to comply with Kernel CodingStyle.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:25 -03:00
Michael Krufky c7a9f3aa1e V4L/DVB (7129): tuner-simple: move device-specific code into three separate functions
Move the switch..case blocks with device-specific code from functions
simple_set_tv_freq and simple_set_radio_freq

...into three new functions:
simple_std_setup, simple_post_tune and simple_radio_bandswitch

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:25 -03:00
Michael Krufky b65aa26056 V4L/DVB (7128): tuner: properly handle failed calls to simple_tuner_attach
If simple_tuner_attach fails, set t->type to TUNER_ABSENT,
set t->mode_mask to T_UNINITIALIZED, and exit the set_type function.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:25 -03:00
Michael Krufky 060a5bd764 V4L/DVB (7127): tuner: remove dependency of tuner-core on tuner-types
This patch fully removes the dependency of tuner-core on
tuner-types.

There is no longer any need to pass struct tunertype in attach-time
config structure - instead pass the tuner type ID.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:24 -03:00
Michael Krufky 65e8d29f7a V4L/DVB (7126): tuner: move tuner type ID check to simple_tuner_attach
Move tuner type ID check from tuner-core::set_type to simple_tuner_attach.

Since tuner-core forwards all attach requests to tuner-simple as the
default case, unless a specific attach function is specified in
set_type, this change is an appropriate cleanup.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:23 -03:00
Michael Krufky 82b3083d26 V4L/DVB (7125): tuner: build tuner-types independently of tuner-core
tuner-types is needed for tuner-simple, and does not need to be bound
to tuner-core.  Any caller of tuner-simple, including tuner-core, needs
to pass a structure from tuner-types into tuner-simple at attach-time.

Export the two needed symbols from tuner-types for now, so that card-level
drivers can attach tuner-simple for hybrid dvb_frontend devices.  We will
remove this dependency altogether as tuner refactoring phase 3 progresses.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:22 -03:00
Michael Krufky 7f8447d13d V4L/DVB (7124): tuner-simple: display frequency in MHz
fix debug in simple_config_lookup to display frequency in MHz

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:21 -03:00
Michael Krufky be71f7dc73 V4L/DVB (7123): tuner-simple: create separate t_params and ranges lookup functions
Move some reuseable code out of simple_set_tv_freq into separate functions.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:21 -03:00
Douglas Schilling Landgraf ff699e6bd0 V4L/DVB (7094): static memory
- Static memory is always initialized with 0.
- Replaced in some cases C99 comments for /* */

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:20 -03:00
Adrian Bunk 29bec0bff5 V4L/DVB (7114): tuner-xc2028.c: make a function static
dump_firm_type_and_int_freq() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:19 -03:00
Adrian Bunk 5eedc46675 V4L/DVB (7105): ivtv-yuv.c: make 3 functions static
This patch makes the following needlessly global functions static:
- ivtv_yuv_next_free()
- ivtv_yuv_setup_frame()
- ivtv_yuv_udma_frame()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:15 -03:00
Michael Krufky 9ba0a3c0e8 V4L/DVB (7087): tuner-simple: whitespace / comments / codingstyle cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:14 -03:00
Linus Torvalds e9b62693ae Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/juhl/trivial: (24 commits)
  DOC:  A couple corrections and clarifications in USB doc.
  Generate a slightly more informative error msg for bad HZ
  fix typo "is" -> "if" in Makefile
  ext*: spelling fix prefered -> preferred
  DOCUMENTATION:  Use newer DEFINE_SPINLOCK macro in docs.
  KEYS:  Fix the comment to match the file name in rxrpc-type.h.
  RAID: remove trailing space from printk line
  DMA engine: typo fixes
  Remove unused MAX_NODES_SHIFT
  MAINTAINERS: Clarify access to OCFS2 development mailing list.
  V4L: Storage class should be before const qualifier (sn9c102)
  V4L: Storage class should be before const qualifier
  sonypi: Storage class should be before const qualifier
  intel_menlow: Storage class should be before const qualifier
  DVB: Storage class should be before const qualifier
  arm: Storage class should be before const qualifier
  ALSA: Storage class should be before const qualifier
  acpi: Storage class should be before const qualifier
  firmware_sample_driver.c: fix coding style
  MAINTAINERS: Add ati_remote2 driver
  ...

Fixed up trivial conflicts in firmware_sample_driver.c
2008-04-21 16:36:46 -07:00
Tobias Klauser 22d56fce95 V4L: Storage class should be before const qualifier (sn9c102)
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
2008-04-21 22:32:16 +00:00
Tobias Klauser c81010bf41 V4L: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the
beginning of the declaration specifiers in a declaration is an
obsolescent feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
2008-04-21 22:30:21 +00:00
Matthew Wilcox d3135846f6 drivers: Remove unnecessary inclusions of asm/semaphore.h
None of these files use any of the functionality promised by
asm/semaphore.h.  It's possible that they rely on it dragging in some
unrelated header file, but I can't build all these files, so we'll have
fix any build failures as they come up.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-18 22:16:32 -04:00
Michael Krufky 4c3b01f711 pvrusb2: fix broken build due to patch order dependency
Fix broken build due to patch order dependency.  A future patch requires
the lines that break the current build.  Disable those lines for now.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-07 19:14:34 -07:00
Linus Torvalds 4a72ef9f7a Merge branch 'pci_id_updates' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'pci_id_updates' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (7497): pvrusb2: add new usb pid for 73xxx models
  V4L/DVB (7496): pvrusb2: add new usb pid for 75xxx models
2008-04-06 16:12:24 -07:00
Michael Krufky 92c9d07507 V4L/DVB (7497): pvrusb2: add new usb pid for 73xxx models
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-06 18:28:02 -03:00
Michael Krufky dd6e9467e0 V4L/DVB (7496): pvrusb2: add new usb pid for 75xxx models
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-06 18:27:58 -03:00
Cyrill Gorcunov 4a8f3a5727 V4L/DVB (7460): bttv: Bt832 - fix possible NULL pointer deref
This patch does fix potential NULL pointer dereference

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-06 17:13:18 -03:00
Adrian Bunk 19ac111c03 V4L/DVB (7485): v4l2-int-device.c: add MODULE_LICENSE
Now that it's in an own module it needs a MODULE_LICENSE.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:47 -03:00
Steven Toth 4b15b5ec36 V4L/DVB (7466): Avoid minor model number warning when an OEM HVR1250 board is detected
Avoid minor model number warning when an OEM HVR1250 board is detected.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:46 -03:00
Steven Toth c88133ecb3 V4L/DVB (7465): Fix eeprom parsing and errors on the HVR1800 products
On some models, the valid Hauppauge eeprom data begins at a different offset.
This patch avoid unfriendly 'corrupt' eeprom errors during driver load.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:45 -03:00
Steven Toth 31c8cc9742 V4L/DVB (7464): Convert driver to use a single SRAM memory map
This reduces the memory footprint and removes the need to
manually configure each map, which lead to a bug where
the Fusion EXP 5 board broke for a while.
This also fixes digital support again for
the DViCO FusionHDTV5Express.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:45 -03:00
Cyrill Gorcunov 1a002ebf60 V4L/DVB (7461): bttv: fix missed index check
We should check for proper index first

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:45 -03:00
Robert Fitzsimons c137918978 V4L/DVB (7400): bttv: Add a radio compat_ioctl file operation
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:45 -03:00
Robert Fitzsimons 1b0690134e V4L/DVB (7278): bttv: Re-enable radio tuner support for VIDIOCGFREQ/VIDIOCSFREQ ioctls
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:44 -03:00
Robert Fitzsimons 5cd3955cb8 V4L/DVB (7277): bttv: Re-enabling radio support requires the use of struct bttv_fh
A number of the radio tuner ioctl functions are shared with the TV
tuner, these functions require a struct bttv_fh data structure to be
allocated and initialized.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-01 19:35:44 -03:00
Al Viro 97cf010aeb zr364xx __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-30 14:20:24 -07:00
Al Viro 5fa1247a2b NULL noise: drivers/media
Acked-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-30 14:18:41 -07:00
Mauro Carvalho Chehab eee4470f19 V4L/DVB (7367): bug #10211: Fix depencencies for cx2341x
Fix for build #408

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:39:02 -03:00
Roel Kluin 7d5b7b98ae V4L/DVB (7362): tvp5150.c: logical-bitwise and confusion
logical-bitwise & confusion

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:39:02 -03:00
Pascal Terjan 974a911d2a V4L/DVB (7334): usb video: add a device link to usbvideo devices, else hal will ignore them
Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:39:01 -03:00
Cyrill Gorcunov c77990e754 V4L/DVB (7330): V4L1 - fix v4l_compat_translate_ioctl possible NULL deref
There are possible NULL pointer derefs in case of kzalloc fails so fix them.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:39:01 -03:00
Andrew Morton 46cb57e628 V4L/DVB (7291): em28xx: correct use of and fix
be less silly while we're there.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:39:00 -03:00
Julia Lawall 8281db3b52 V4L/DVB (7285): em28xx: Correct use of ! and &
In commit e6bafba5b4, a bug was fixed that
involved converting !x & y to !(x & y).  The code below shows the same
pattern, and thus should perhaps be fixed in the same way.

This is not tested and clearly changes the semantics, so it is only
something to consider.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ expression E1,E2; @@
(
  !E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:39:00 -03:00
Ian Armstrong 165e1213e1 V4L/DVB (7279): ivtv: Add missing sg_init_table()
If a dma transfer is attempted for either yuv or framebuffer output, a missing
sg_init_table() call causes a kernel BUG in scatterlist.h if CONFIG_DEBUG_SG
is set.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:38:59 -03:00
Mauro Carvalho Chehab c030f5e697 V4L/DVB (7268): saa7134: fix: tuner should be loaded before calling saa7134_board_init2()
There are several parts of saa7134_board_init2() that calls tuner modules. We
should first load tuner, otherwise, the commands will fail.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:38:58 -03:00
Mauro Carvalho Chehab 189bf5f050 V4L/DVB (7267): cx88: Fix: Loads tuner module before sending commands to it
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:38:57 -03:00
Adrian Bunk 2db2da913f V4L/DVB (7251): VIDEO_VIVI must depend on VIDEO_DEV
This patch fixes the following compile error with
VIDEO_VIVI=y, VIDEO_DEV=m reported by Toralf Förster:

<--  snip  -->

...
  LD      .tmp_vmlinux1
drivers/built-in.o: In function `vivi_release':
vivi.c:(.text+0x322f5): undefined reference to `video_unregister_device'
vivi.c:(.text+0x32337): undefined reference to `video_device_release'
drivers/built-in.o: In function `vivi_open':
vivi.c:(.text+0x32845): undefined reference to `v4l2_type_names'
drivers/built-in.o: In function `vivi_init':
vivi.c:(.init.text+0x1d20): undefined reference to `video_device_alloc'
vivi.c:(.init.text+0x1d48): undefined reference to `video_register_device'
drivers/built-in.o:(.rodata+0x1b40): undefined reference to
`video_ioctl2'drivers/built-in.o:(.data+0x140c): undefined reference to
`video_device_release'

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:38:57 -03:00
Ian Armstrong a54d1dea00 V4L/DVB (7242): ivtv: fix for yuv filter table check
As the result of a previous change that delayed the loading of the firmware,
the driver can sometimes report a bogus error regarding the yuv output filter
table not being found in the firmware. This patch moves the filter table
check to ensure it's only done after the firmware has been loaded.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:38:57 -03:00
Harvey Harrison e8d35932e9 V4L/DVB (7236): bttv: struct member initialized twice
fixes sparse warning:
drivers/media/video/bt8xx/bttv-driver.c:3391:3: warning: Initializer entry defined twice
drivers/media/video/bt8xx/bttv-driver.c:3392:3:   also defined here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:38:57 -03:00
Yuri Funduryan eec25fa7f9 V4L/DVB (7228): saa7134: fix FM radio support for the Pinnacle PCTV 110i
This also has some coding style fixes.

Signed-off-by: Yuri Funduryan <yurifun@mail.ru>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Reviewed-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:38:56 -03:00
Mauro Carvalho Chehab 6165894fb6 V4L/DVB (7219): zoran: Fix namespace conflicts with Zoran 'GPIO_MAX' enum
Thanks to Martin Michlmayr <tbm@cyrius.com> for reporting this issue:

The zoran driver fails to compile on the ARM Orion platform with:

In file included from drivers/media/video/zoran_procfs.c:50:
drivers/media/video/zoran.h:232: error: expected identifier before numeric
constant

The reason is that drivers/media/video/zoran.h defines an enum with
GPIO_MAX in it, but Orion contains a #define GPIO_MAX 32 in
include/asm-arm/arch-orion/orion.h

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 12:18:28 -03:00
Ricardo Cerqueira baff6cdd33 V4L/DVB (7201): cx88-mpeg: Fix race condition in variable access
There was a possible race condition in the increment/decrement of
the active device references counter.
Thanks to Trent Piepho (xyzzy@speakeasy.org) for bringing it up.

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 12:18:08 -03:00
Mauro Carvalho Chehab 40ae91a758 V4L/DVB (7200): Fix FM firmware loading
There's no need to load SCode table for FM.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 12:18:06 -03:00
Robert Fitzsimons 7c018804c0 V4L/DVB (7197): bttv: Fix overlay divide error
The initial work to convert the bttv driver to V4L2 "Partial conversion
from V4L1 to V4L2" (e84619b174), missed
the line which set the appropriate overlay crop structure in the newly
allocated bttv_buffer.  This then causes a divide error in the
bttv_calc_geo function.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 12:18:03 -03:00
Roland Stoll 27d0fe1894 V4L/DVB (7194): cx88-mpeg: Allow concurrent access to cx88-mpeg devices
It currently isn't possible to open the frontend device of cx88-mpeg devices
(DVB or Blackbird) multiple times concurrently. (for instance, to attach a
signal monitoring tool while reading a stream, or to send a frequency change
ioctl) This patch fixes that condition.

Signed-off-by: Roland Stoll <roland@xindex.de>
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:19 -03:00
Ricardo Cerqueira 968fb08912 V4L/DVB (7193): tveeprom: Add proper tuner mapping for hauppauge eeprom id 133
Do away with the need to set tuner=63 on cx88xx with recent HVR-1300 boards

Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:19 -03:00
Adrian Pardini f0ba356c85 V4L/DVB (7192): Adds support for Genius TVGo A11MCE
Signed-off-by: Adrian Pardini <pardo.bsso@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:19 -03:00
Hartmut Hackmann ea75baf4b0 V4L/DVB (7186): tda10086: make the 22kHz tone for DISEQC a config option
Some cards need the diseqc signal modulated, while some just need
the envelope to control the LNB supply.

This fixes Bug 9887


Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:18 -03:00
Mauro Carvalho Chehab 61b080d214 V4L/DVB (7180): em28xx: add URB_NO_TRANSFER_DMA_MAP, since urb->transfer_dma is set
Thanks to Alan Stern <stern@rowland.harvard.edu> for pointing this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:17 -03:00
Mauro Carvalho Chehab 3687e1e67e V4L/DVB (7179): Allow more than one em28xx board
em28xx driver is capable of handling more than one usb device. However, isoc
transfers require a large amount of data to be transfered.

Before this patch, just one em28xx board were enough to allocate more than 50%
URBs:

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
B:  Alloc=480/800 us (60%), #Int=  0, #Iso=  2
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

So, only one board could use an USB host at the same time. After the patch, it
is possible to use more than one em28xx at the same time, on the same usb host,
if the image size is slower or equal to 345600, since those images will
require about 30% of the URBs:

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 8
B:  Alloc=232/800 us (29%), #Int=  0, #Iso=  2
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1

So, in thesis, after the patch, it would be possible to use up to 3 boards by
each usb host, if the devices are generating small images.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:17 -03:00
Mauro Carvalho Chehab 92ea42f442 V4L/DVB (7164): em28xx-alsa: Add a missing mutex
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:16 -03:00
Mauro Carvalho Chehab 00b8730f5d V4L/DVB (7163): em28xx: makes audio settings more stable
Improves audio configurations on em28xx:
        - mutes audio before changing amux;
        - adds a delay after setting audio src;
        - waits up to 50ms for ac97 busy.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:16 -03:00
Mauro Carvalho Chehab 0df8130fe8 V4L/DVB (7162): em28xx: Fix endian and returns the correct values
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:15 -03:00