Commit graph

76260 commits

Author SHA1 Message Date
Mauro Carvalho Chehab ef8c1888b3 V4L/DVB (6614): Fix driver for i386 architectures
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:15 -02:00
Mauro Carvalho Chehab 2d4c0ac60d V4L/DVB (6613): Fix: add a missing continue statement
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:14 -02:00
Michel Ludwig 5403bbae9b V4L/DVB (6612): Allow RESET_CLK callback and avoids unneeded loading
TM5600/TM6000 needs clock reset during firmware load. This patch adds the
capability of caling a callback method for this.

Also, avoids uneeded firmware loads.

Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:14 -02:00
Michel Ludwig a37b4c9bc8 V4L/DVB (6611): Change xc2028_attach method to make easier for DVB
Removes uneeded parameters and adds an structure for passing the parameters

This patch is co-authored by Mauro Carvalho Chehab.

Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:14 -02:00
Michel Ludwig 2fc580ffeb V4L/DVB (6610): Fix a wrong typecast
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:13 -02:00
Michael Krufky 993efa7133 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>
2008-01-25 19:02:13 -02:00
Michael Krufky ddf12227c3 V4L/DVB (6606): saa7134: add autodetection support for alternate subids of Hauppauge HVR1110
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:12 -02:00
Mauro Carvalho Chehab a82200fb59 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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:12 -02:00
Brandon Philips d6964aa8d4 V4L/DVB (6603): V4L: videobuf: convert streaming and reading to bitfields
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:11 -02:00
Brandon Philips 0fc0686e64 V4L/DVB (6600): V4L: videobuf: don't chew up namespace STATE_.*, convert to VIDEOBUF_
s/STATE_NEEDS_INIT/VIDEOBUF_NEEDS_INIT/g
s/STATE_PREPARED/VIDEOBUF_PREPARED/g
s/STATE_QUEUED/VIDEOBUF_QUEUED/g
s/STATE_ACTIVE/VIDEOBUF_ACTIVE/g
s/STATE_DONE/VIDEOBUF_DONE/g
s/STATE_ERROR/VIDEOBUF_ERROR/g
s/STATE_IDLE/VIDEOBUF_IDLE/g

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:11 -02:00
Mauro Carvalho Chehab 1414becf15 V4L/DVB (6598): Fix standard name
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:11 -02:00
Mauro Carvalho Chehab 83fb340b31 V4L/DVB (6595): Corrects printk lines
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:11 -02:00
Mauro Carvalho Chehab 98883cdcb5 V4L/DVB (6594): Add tuner_err macro
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).

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:10 -02:00
Mauro Carvalho Chehab f380e1d2c9 V4L/DVB (6593): Fix scode table loading
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:10 -02:00
Mauro Carvalho Chehab 43efe70253 V4L/DVB (6592): Add the capability to work with more complete firmwares
Firmware version 2.7 has other firmware types. This patch adds the capability
for the driver to work with those newer types.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:10 -02:00
Luca Risolia ddef2dcc4e V4L/DVB (6591): Adds support for MT9V111 on sn9c102
Adds a new image sensor to the sn9c102 driver.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:09 -02:00
Olivier DANET 542794be2c V4L/DVB (6590): Adding support for VHF with MT2266-devices
MT2266 :
- support for VHF
- Minor enhancements

Signed-off-by: Olivier DANET <odanet@caramail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:09 -02:00
dominik 67053a409a V4L/DVB (6589): Gigabyte u7000 usb dvb-t support
Signed-off-by: dominik <dominik95@free.fr>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:09 -02:00
Jaroslav Barton 48e6a01731 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>
2008-01-25 19:02:09 -02:00
Mauro Carvalho Chehab 7d497f8afa V4L/DVB (6587): Cleanup at tv norm selection
With the conversion to the vidio_ioctl2, tvnorms array is not required anymore.

Also, removed some code from V4L1 time (VIDEO_MODE_foo), specied at the
non-used video_decoder.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:08 -02:00
Mauro Carvalho Chehab cb77d01022 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

Now, this driver doesn't require V4L1 anymore.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:07 -02:00
Mauro Carvalho Chehab 195a4ef627 V4L/DVB (6585): Convert em28xx to video_ioctl2
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:07 -02:00
Mauro Carvalho Chehab 9e31ced888 V4L/DVB (6584): Fix read() method
Backport read() fixes from Markus Rechberger.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:07 -02:00
Mauro Carvalho Chehab a225452ef8 V4L/DVB (6583): Fix em28xx read stream locking
On some situations, closing an streaming application and re-opening were
returning -EBUSY.

Uses the same locking schema also present on cx88.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:06 -02:00
Mauro Carvalho Chehab a3a048cea3 V4L/DVB (6582): Fix em28xx to allow multiple open
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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:06 -02:00
Sakari Ailus 2c94a674e0 V4L/DVB (6580): Set slave's master before master's attach call.
V4L: Int if: Set slave's master before attach, remove master argument

The master also now gets its own pointer from slave's structure.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:06 -02:00
Adrian Bunk 53133afbee V4L/DVB (6578): dvb-usb: make some debug vars static
This patch makes some needlessly global debug variables static.

opera1.h became so small that I removed it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:06 -02:00
Adrian Bunk f760d618ab 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>
2008-01-25 19:02:05 -02:00
Adrian Bunk a2fbaa519b 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>
2008-01-25 19:02:05 -02:00
Adrian Bunk 39e75cfedf V4L/DVB (6575): cx23885/: cleanups
This patch contains the following cleanups:
- make the following needlessly global code static:
  - cx23885-core.c: struct cx23885_sram_channels[]
  - cx23885-core.c: struct cx23887_sram_channels[]
  - cx23885-core.c: cx23885_wakeup()
  - cx23885-core.c: cx23885_sram_channel_setup()
  - cx23885-core.c: cx23885_sram_channel_dump()
  - cx23885-core.c: cx23885_risc_disasm()
  - cx23885-core.c: cx23885_shutdown()
  - cx23885-core.c: cx23885_reset()
  - cx23885-core.c: cx23885_dev_unregister()
  - cx23885-core.c: cx23885_risc_databuffer()
  - cx23885-core.c: cx23885_risc_stopper()
- #if 0 the following unused functions:
  - cx23885-core.c: cx23885_risc_buffer()
  - cx23885-core.c: cx23885_cancel_buffers()
- remove the following unused EXPORT_SYMBOL's:
  - cx23885-cards.c: cx23885_boards
  - cx23885-i2c.c: cx23885_call_i2c_clients

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:05 -02:00
Adrian Bunk 9695a49839 V4L/DVB (6574): common/ir-functions.c: make a function static
ir_rc5_decode() can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:04 -02:00
Adrian Bunk 6fce7fcd6d V4L/DVB (6573): unexport flexcop_reset_block_300
This patch removes the unused EXPORT_SYMBOL(flexcop_reset_block_300).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:04 -02:00
Adrian Bunk 5e7361a143 V4L/DVB (6572): dvb-usb/vp702x.c: cleanups
This patch contains the following cleanups:
- make the needlessly global vp702x_usb_out_op() static
- #if 0 the unused vp702x_power_ctrl()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:04 -02:00
Adrian Bunk ad1ce84047 V4L/DVB (6571): dvb-usb/gp8psk.c: #if 0 gp8psk_bcm4500_reload()
This patch #if 0's the unused gp8psk_bcm4500_reload()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:03 -02:00
Adrian Bunk 67b24c7883 V4L/DVB (6570): core/dvb_ringbuffer.c: remove unused exports
This patch removes the following unused EXPORT_SYMBOL's:
- dvb_ringbuffer_flush
- dvb_ringbuffer_pkt_write
- dvb_ringbuffer_pkt_read
- dvb_ringbuffer_pkt_dispose
- dvb_ringbuffer_pkt_next

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:03 -02:00
Adrian Bunk b00ef4b8d8 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>
2008-01-25 19:02:03 -02:00
Roel Kluin c80296d755 V4L/DVB (6564): Move check before lock
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
CC: Antti Palosaari <crope@iki.fi>
CC: Carl Lundqvist <comabug@gmail.com>
CC: Aapo Tahkola <aet@rasterburn.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:02 -02:00
Michael Krufky bbe1e0ba52 V4L/DVB (6563): tda8290: optimize for loop in tda829x_probe function
Thanks to Trent Piepho for pointing this out.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:02 -02:00
Mauro Carvalho Chehab 98ae127cae V4L/DVB (6562): Make HVR900 to use also tveeprom
Hauppauge firmwares can be decoded using tveeprom. This patch adds HVR-900 as
a tveeprom client. It also adds xc3028 tuner entry to tveeprom.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:02 -02:00
Mauro Carvalho Chehab 80b522085a 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.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:01 -02:00
Mauro Carvalho Chehab f8b6030ccc V4L/DVB (6560): Fix a bug when setting tuner type
Tuner-type were correctly filled only by the hint function.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:01 -02:00
Mauro Carvalho Chehab b873e1a3cc V4L/DVB (6559): Fix a buffer overflow at xc2028_get_reg
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:01 -02:00
Hans Verkuil e7a2bc8a75 V4L/DVB (6557): tea5767: remove unnecessary warning
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:00 -02:00
Hans Verkuil 9dd659de9f V4L/DVB (6556): tuner: convert to bus-based I2C API
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:00 -02:00
Hans Verkuil 92de1f16d1 V4L/DVB (6555): tuner: reorder functions to prepare for i2c conversion
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:59 -02:00
Hans Verkuil 159ffe77cd 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>
2008-01-25 19:01:59 -02:00
Michael Krufky a818e1c8f7 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>
2008-01-25 19:01:58 -02:00
Michael Krufky 1f3a4e3285 V4L/DVB (6550): tda8290: return -ENODEV on probe failures
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:58 -02:00
Mauro Carvalho Chehab 232fcefb55 V4L/DVB(6548b) Fix compilation for em28xx
From: Mauro Carvalho Chehab <mchehab@infradead.org>

In file included from drivers/media/video/em28xx/em28xx-i2c.c:31:
drivers/media/video/tuner-xc2028.h:10:26: error: dvb_frontend.h: No such file or directory

In file included from drivers/media/video/em28xx/em28xx-i2c.c:31:
drivers/media/video/tuner-xc2028.h:32: warning: 'struct dvb_frontend' declared inside parameter list
drivers/media/video/tuner-xc2028.h:32: warning: its scope is only this definition or declaration, which is probably not what you want

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:58 -02:00
Mauro Carvalho Chehab e3e97fe61f V4L/DVB(6548a) Fix compilation for TDA8290
From: Mauro Carvalho Chehab <mchehab@infradead.org>

drivers/media/video/tda8290.c:27:21: error: tda827x.h: No such file or directory
drivers/media/video/tda8290.c:28:22: error: tda18271.h: No such file or directory
drivers/media/video/tda8290.c:52: error: field 'cfg' has incomplete type
drivers/media/video/tda8290.c: In function 'tda829x_find_tuner':
drivers/media/video/tda8290.c:590: error: implicit declaration of function 'tda18271_attach'
drivers/media/video/tda8290.c:598: error: implicit declaration of function 'tda827x_attach'

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:57 -02:00