Commit Graph

1313 Commits (838f8a748562265f8a5ad5c0c0ef8f454fcc28cf)

Author SHA1 Message Date
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
Hartmut Hackmann 26ec394e7c V4L/DVB (7223): Add support for the ISL6405 dual LNB supply chip
The chip can control 2 LNBs independently.
The driver distinguishes them by evaluating the MSB of the override_set
parameter of the isl6405_attach function.

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
Michael Krufky 12afe37818 V4L/DVB (7214): tda18271: move init functions to directly above tda18271_tune
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
Michael Krufky d1c53424f3 V4L/DVB (7213): tda18271: consolidate tune functions
combine tda18271c1_tune and tda18271c2_tune into a single function

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
Michael Krufky 4d2d42bcd8 V4L/DVB (7212): tda18271: move rf calibration code from tda18271c1_tune into a new function
move rf calibration code from tda18271c1_tune into a new function,
tda18271c1_rf_tracking_filter_calibration

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
Michael Krufky a60b866567 V4L/DVB (7211): tda18271: remove duplicated channel configuration code from tda18271c1_tune
remove duplicated channel configuration code from tda18271c1_tune, instead
call function tda18271_channel_configuration

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
Jan Engelhardt 27a643b1a9 V4L/DVB (7140): constify function pointer tables
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:15 -03:00
Michael Krufky f9e315a16a V4L/DVB (7136): tda18271: use hybrid_tuner_request_state to manage tuner instances
Convert tda18271 to use the new hybrid_tuner_request_state and
hybrid_tuner_release_state macros to manage state sharing between
hybrid tuner instances.

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
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 763896c4b4 V4L/DVB (7107): frontends/xc5000.c: make a struct static
struct XC5000_Standard[] can become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Reviewed-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:18 -03:00
Tobias Klauser cbfa6f2a68 DVB: 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:27:50 +00:00
Michael Krufky 8e08af3c30 V4L/DVB (7495): s5h1409: fix blown-away bit in function s5h1409_set_gpio
Preserve all other bits when setting gpio.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-06 17:13:19 -03: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
Adrian Bunk 77596058e1 V4L/DVB (7328): usb/opera1.c: fix a memory leak
This patch fixes a memory leak in the "testval == 0x67" case spotted by
the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-20 12:39:01 -03:00
Tony Breeds c9fe1d6ba6 V4L/DVB (7195): xc5000: fix build error when built as module
drivers/built-in.o: In function `set_type':
tuner-core.c:(.text+0x8879d): undefined reference to `xc5000_attach'

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 12:18:02 -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
Oliver Endriss 0ed4a6ea9d V4L/DVB (7118): dvb-ttpci: Improved display of still pictures
Improved display of still pictures (VIDEO_STILLPICTURE ioctl).
Ensure that both fields are displayed for progressive frames.

Thanks to Reinhard Nissl and Klaus Schmidinger for finding out
that the FREEZE command does this.

Thanks-to: Reinhard Nissl <rnissl@gmx.de>
Thanks-to: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:11 -03:00
Kim Sandberg 251130bf26 V4L/DVB (7117): budget-av: Add support for Satelco EasyWatch PCI DVB-T
Add support for Satelco EasyWatch PCI DVB-T, sub-id 0x1894:0x003a.

Signed-off-by: Kim Sandberg <ksan@saunalahti.fi>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:10 -03:00
Oliver Endriss 03aa73c587 V4L/DVB (7116): budget-av: Add support for KNC TV Station Plus X4
Add support for KNC TV Station Plus X4, sub-system id 0x1894:0x0015.
Based on a patch submitted by Johannes Deisenhofer.

Thanks-to: Johannes Deisenhofer <jo.deisenhofer@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:15:10 -03:00
Adrian Bunk 805d92dfa6 V4L/DVB (7100): frontends/tda18271-common.c: fix off-by-one
This patch fixes an off-by-one error spotted by the Coverity checker.

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-02-18 11:15:02 -03:00
Akinobu Mita 46c9fc861f V4L/DVB (7076): bt878: include KERN_ facility level
printk should use KERN_* levels.

CC: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:53 -03:00
Joe Perches c84e6036ba drivers/media/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:18:59 +02:00
Akinobu Mita 3869007812 V4L/DVB (7077): bt878: remove handcrafted PCI subsystem ID check
This patch moves the subsystem ID and subsystem vendor ID check from probing
function to the PCI generic function by describing subsystem IDs in
pci_device_id table. This enables to add new PCI IDs to a device driver pci_ids
table at runtime by new_id file in sysfs pci driver tree.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:22 -02:00
Patrick Boettcher 4a2b108379 V4L/DVB (7075): Make a local function static
Make a local function static

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:20 -02:00
Patrick Boettcher 904a82e3e2 V4L/DVB (7074): DiB7000P: correct tuning problem for 7MHz channel
Tuning problem for 7Mhz channels fixes

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:20 -02:00
Patrick Boettcher 3cb2c39ded V4L/DVB (7073): DiB7070: Reception quality improved
Removing two bugs to improve sensitivity for DiB7070 and Dib7000P with MT2266.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:19 -02:00
Olivier DANET c52344fdc4 V4L/DVB (7072): sets the MT2060 IF1 frequency according to EEPROM
Here is a patch for Hauppage Nova-T-Stick and Nova-T-500 users.  It
sets the MT2060 IF1 frequency according to the calibration values
stored in the EEPROM.

It is supposed to enhance the signal quality, but, hey, there is no
guarantee.  Feedbacks would be much appreciated, to know whether it
deserves being applied.

Signed-off-by: Olivier DANET <odanet at caramail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:19 -02:00
Patrick Boettcher a162abb06b V4L/DVB (7071): DiB0700: Start streaming the right way
There was a mistake in the way how to start the streaming in the dib0700. This patch fixes that.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:18 -02:00
Soeren Moch 853ea132c7 V4L/DVB (7070): Fix some tuning problems
The attached patch solves all my vdr tuning problems on a dib7000p
nova-t stick as far as I could check within the last weekend.

It disables streaming while tuning, like that the number of faulty TS
packets is reduced.

Signed-off-by: Soeren Moch <Soeren.Moch@stud.uni-hannover.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:17 -02:00
Darren Salt 13b83b5d51 V4L/DVB (7069): Support for myTV.t
Here's a roll-up which provides support for both this and the myTV.t.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:17 -02:00
Tim Taubert c7637b1a31 V4L/DVB (7068): Add support for WinTV Nova-T-CE driver
Add support for WinTV Nova-T-CE driver

Signed-off-by: Tim Taubert <ttmails@gmx.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:16 -02:00
Jose Alberto Reguero 3a0311c6c5 V4L/DVB (7067): fix autoserach in the Hauppauge NOVA-T 500
This patch fix autoserach in the Hauppauge NOVA-T 500.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:15 -02:00
Daniel Gimpelevich 132c318843 V4L/DVB (7066): ASUS My Cinema U3000 Mini DVBT Tuner
Adding support for ASUS My Cinema U3000 Mini DVBT Tuner

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:15 -02:00
Yousef Lamlum 7999a8161d V4L/DVB (7065): Artec T14BR patches
Added Artec T14BR support

Signed-off-by: Yousef Lamlum <yousef@youseflamlum.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:15 -02:00
Steven Toth 5ea60531c1 V4L/DVB (7063): xc5000: Fix OOPS caused by missing firmware
xc5000: Fix OOPS caused by missing firmware.

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:14 -02:00
Luca Olivetti 8cb9329309 V4L/DVB (7054): ansonic branded dvb-t usb stick support in the af9005 driver
Marcos Melero (marcosmelero at gmail.com) reported he could make
his dvb-t usb stick work with the af9005 driver by changing the device
ids (10b9:6000).

The stick is branded "Ansonic" (one of the brands of a spanish chain of
supermarkets) with no other identification of the model.
Since neither Marcos nor me know the OEM for the stick, in the attached
patch I used Ansonic for the ids/description.

Signed-off-by: Luca Olivetti <luca@ventoso.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:10 -02:00
Michael Krufky ed73683f06 V4L/DVB (7052): tda18271: when tuning digital, the analog demod must be tri-stated
Call analog_ops.standby during tda18271_set_params, to put the tda8295
in tri-state when tuning digital channels.  Otherwise the tda8295 will
interfere with the signal coming from the tda18271 into the digital
demodulator.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:09 -02:00
Mauro Carvalho Chehab 3473e342d7 V4L/DVB (7051): Cleans up error handling on or51xxx_attach
state is already NULL.

Reviewed-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:09 -02:00
Steven Toth 4917019d19 V4L/DVB (7046): Finalise support for the Pinnacle HD 8000i
Correctly set the atatch structures, enable IR, configure the
xc5000 tuner includes.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:08 -02:00
Steven Toth 73c993a829 V4L/DVB (7045): xc5000: Small amount of cleanup and commenting
xc5000: Small amount of cleanup and commenting, just for clarification.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:07 -02:00
Steven Toth 27c685a4b0 V4L/DVB (7042): xc5000: Tuner analog support
From Zhang: This an updated patch that adds analog support for
the xc5000 tuner driver. it was tested on a Pinnacle PCTV HD 800i
card (patches to follow).

Patch commited as-is, cleanup to follow ... Steve.

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:05 -02:00
Steven Toth dfc1c08aab V4L/DVB (7041): s5h1409: Bug fix for parallel support
Parallel support was not working with the s5h1409 and the Pinnacle HD800i.
This patch fixes the demodulator driver and ensures that all existing
s5h1409 based products configure the demodulator correctly.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:05 -02:00
Michael Krufky bc835d80d9 V4L/DVB (7032): tda18271: tda18271_cal_on_startup should be declared static
This module option variable is only handled within the file tda18271-fe.c -

Declare this variable as static.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:01 -02:00
Michael Krufky 0f96251e7b V4L/DVB (7029): tda18271: provide a choice whether to perform rf cal on init or on first tune
If module option "cal" is set to 1, the ~22 sec rf tracking filter calibration
sequence will be invoked on startup.  Otherwise, the calibration will take
place during the first tune.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:00 -02:00
Michael Krufky 839c6c96d0 V4L/DVB (7028): tda18271: test RF_CAL_OK to see if we need additional RF calibration
Test RF_CAL_OK to see if we need to perform the RF tracking filter
calibration after returning from standby.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:59 -02:00
Michael Krufky 518d87399b V4L/DVB (7027): tda18271: put the device in standby mode during sleep()
Add function, tda18271_set_standby_mode.

During sleep, enter standby mode with slave tuner output enabled,
loop through on and xtal oscillator on.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:58 -02:00
Michael Krufky 6bfa665724 V4L/DVB (7026): tda18271: report when the RF tracking filter calibration has completed
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:58 -02:00
Steven Toth a57ed8a1f7 V4L/DVB (7008): s5h1409: Ensure the silicon is initialized during attach
If not it impacts on analog tuner quality.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:50 -02:00
Michael Krufky cf04d29c48 V4L/DVB (6988): tda18271: give calibration debug a separate debug mask
We don't usually want to see the calibration debug messages, but sometimes
it is useful.  Assign it to a separate debug mask.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:44 -02:00
Michael Krufky c353f42f75 V4L/DVB (6987): tda18271: add support for fm radio
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:44 -02:00
Michael Krufky a4f263b587 V4L/DVB (6986): tda18271: share state between analog and digital tuner instances
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:43 -02:00
Michael Krufky 8d316bf54b V4L/DVB (6979): tda18271: use a mutex to protect state in critical sections
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:43 -02:00
Michael Krufky ccbac9bb17 V4L/DVB (6978): tda18271: store frequency and bandwidth after successful tune
Store last tuned frequency & bandwidth after successful tune.

Clean up tune functions -- remove pointer to tune function in
state structure, instead call tune function based on priv->id.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:42 -02:00
Michael Krufky 09f83c4fc0 V4L/DVB (6977): tda18271: clean up calibration initialization procedures
Always initialize registers during attach.

Perform IR Calibration during init if needed.
Perform RF Calibration during init if needed for C2, only.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:41 -02:00
Michael Krufky d2c932a1f7 V4L/DVB (6965): tda18271: fix analog tuning regression caused by earlier changeset
An earlier patch, "tda18271: fail table lookups if frequency is out of range"
broke analog support on certain hardware.  This patch fixes that problem, by
allowing the RF_CAL byte to be set to the maximum value, in cases of the
frequency being out of range.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:38 -02:00
Michael Krufky 0e1fab90a8 V4L/DVB (6964): tda18271: document debug level and configuration parameters
Document debug level module options and
tda18271_config attach-time parameters.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:38 -02:00
Michael Krufky 2ba65d517b V4L/DVB (6963): tda18271: store IF frequency in a u16 instead of u32
Store IF Frequency in a u16 instead of a u32.  Multiply by 1000 before use.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:37 -02:00
Michael Krufky f21e0d7f05 V4L/DVB (6962): tda18271: allow device-specific configuration of IF frequency and std bits
Allow drivers to pass device-specific configuration parameters during attach.

If these parameters are omitted, default values will be used.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:36 -02:00
Michael Krufky 59067f7ed4 V4L/DVB (6961): tda18271: move common code to tda18271-common.c
Move some common code to a new file to make this easier to look at.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:36 -02:00
Michael Krufky 255b5113b4 V4L/DVB (6960): tda18271: add support for NXP TDA18271HD/C2
Tested successfully with QAM256 digital cable.
Analog television is limping, needs more work.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:35 -02:00
Michael Krufky dec9ccceef V4L/DVB (6959): tda18271: add MODULE_VERSION
version 0.1

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:35 -02:00
Michael Krufky 95af8a26cb V4L/DVB (6958): tda18271: clean up function tda18271_set_analog_params
make set_analog_params function look consistent with set_params function

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:34 -02:00
Michael Krufky 33f25b4275 V4L/DVB (6957): tda18271: fail table lookups if frequency is out of range
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:34 -02:00
Steven Toth 71bc9bd96b V4L/DVB (6930): xc5000: Removed erroneous defines
Basic cleanup.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:26 -02:00
Michael Krufky b92bf0f6a9 V4L/DVB (6928): tda18271: break calculation functions out of tda18271_tune
Break out the following new functions from tda18271_tune:

tda18271_calc_bp_filter
tda18271_calc_km
tda18271_calc_rf_band
tda18271_calc_gain_taper
tda18271_calc_ir_measure
tda18271_calc_rf_cal

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:26 -02:00
Michael Krufky 182519f4c9 V4L/DVB (6927): tda18271: improve printk macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:25 -02:00
Michael Krufky 2f27dfc98c V4L/DVB (6926): tda18271: consolidate table lookup functions
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:25 -02:00
Michael Krufky d37142102a V4L/DVB (6925): tda18271: move state structures to tda18271-priv.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:25 -02:00
Michael Krufky 7686b574a1 V4L/DVB (6924): tda18271: fix whitespace in tda18271_ir_measure
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:24 -02:00
Michael Krufky 926bf3ca93 V4L/DVB (6923): tda18271: remove extraneous debug
We don't need to do a dbg_info during tda18271_attach anymore, since
the tda18271_get_id function will call dbg_info with the same information
and more.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:24 -02:00
Michael Krufky fe0bf6d783 V4L/DVB (6907): tda18271: create separate calc_pll functions
Consolidate duplicated code by creating functions:

tda18271_calc_main_pll
tda18271_calc_cal_pll

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:19 -02:00
Michael Krufky f0bd504fb9 V4L/DVB (6906): tda18271: rename tda18271_calc_* functions to tda18271_lookup_*
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:19 -02:00
Michael Krufky 49e7aaf0ff V4L/DVB (6905): tda18271: check ID register during attach
Identify the silicon during attach, return NULL if unsupported device.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:19 -02:00
Michael Krufky 7e946c8a42 V4L/DVB (6904): tda18271: divider byte 1, bit 7 is always 0
Bit 7 of both Main Divider byte 1 and Cal Divider byte 1 is always zero.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:18 -02:00
Matthias Schwarzott 994fc28b6c V4L/DVB (6903): mt312: CodingStyle fix
Fixes all occurences of assignment in if

checkpatch marks them as ERROR.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Reviewed-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:18 -02:00
Michael Krufky 3f51451b51 V4L/DVB (6894): xc5000: fix build warning
Fix the following build warning:

xc5000.c:560: warning: format '%d' expects type 'int',
	      but argument 2 has type 'size_t'

On many architectrues size_t is unsigned long, and may not be printed with %d.
Use %Zu instead.


Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:14 -02:00
Michael Krufky fb6d8e2c7f V4L/DVB (6892): xc5000: fix build when DVB_TUNER_XC5000 is disabled
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:14 -02:00
Michael Krufky 26501a703d V4L/DVB (6890): tda18271: fix typo in RF tracking filter calibration
We want to set bits 1 & 2 on easy programming byte 4, not extended byte 4.

Thanks to David Wong for pointing this out.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: David Wong <davidtlwong@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:13 -02:00
Steven Toth e12671cf0c V4L/DVB (6886): xc5000: Cleanups of types, result codes etc
This translates much of the xceive coding style, adds
some result codes and generally cleans up whitespace
and function arguments.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:12 -02:00
Steven Toth aacb9d31ee V4L/DVB (6884): Add support for the Xceive xc5000 silicon tuner
This is an all formats tuner, QAM, ATSC, DVB-T and others.
Only ATSC and QAM have been tested.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:11 -02:00
Michael Krufky 2426a27e4d V4L/DVB (6882): dvb_frontend: release analog demod in dvb_frontend_detach
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:11 -02:00
Michael Krufky bc3e5c7fc2 V4L/DVB (6881): include struct analog_demod_ops directly inside struct dvb_frontend
Rather than using a pointer, include struct analog_demod_ops directly
inside struct dvb_frontend.  This will allow us to use dvb_attach in
the future, along with removing the need to check the ops structure
before having to check the pointer to the method being called.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:11 -02:00
Michael Krufky 9ad89f0104 V4L/DVB (6880): kill tuner-driver.h
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:10 -02:00
Michael Krufky 807ffe8df2 V4L/DVB (6879): move struct analog_tuner_ops into dvb_frontend.h
struct analog_tuner_ops no longer has any dependencies specific
to v4l2, so we can move this into dvb_frontend.h with the rest
of the tuning structures.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:10 -02:00
Matthias Schwarzott 0b6a3342a6 V4L/DVB (6874): removes duplicated KERN_DEBUG flags from dprintk calls in mt312.c
do { \
                if (debug) printk(KERN_DEBUG "mt312: " args); \
        } while (0)

So no caller need to specify KERN_DEBUG.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:09 -02:00
Matthias Schwarzott 89f6475857 V4L/DVB (6873): Fixes issues listed by checkpatch
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:08 -02:00
Chris Pascoe bc51471088 V4L/DVB (6856): zl10353: improve tuning parameters and update register map
Some more I2C traces and a experimentation with register values on
both the ZL10353 and MT352 mean that I can now guess at what more
of the ZL10353 registers do.

Guess at the registers' names (based on the equivalent names in MT352)
and update set_parameters/get_parameters with the new knowledge.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:03 -02:00
Michael Krufky 6b7daa88f2 V4L/DVB (6822): s5h1409: use VSB IF frequency ( 44 / 5.38 MHz ) unless otherwise specified
use VSB IF frequency ( 44 / 5.38 MHz ) if qam_if is invalid or unspecified

Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:45 -02:00
Michael Krufky 2b03238a79 V4L/DVB (6821): s5h1409: fix IF frequency configuration
On the s5h1409 demod, the IF frequency for VSB is limited to 44 / 5.38 MHz.

Hardcode VSB IF frequency within the driver to 44 / 5.38 MHz.
QAM IF frequency remains configurable via attach-time configuration.

Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:44 -02:00
Andrew Morton 18ff605a18 V4L/DVB (6818): git-dvb: drivers/media/dvb/frontends/zl10353.c: avoid 64-bit divide
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:43 -02:00
Andrew Morton 39b43b1a61 V4L/DVB (6808): git-dvb: fix build in drivers/media/dvb/frontends/tda18271.h
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:34 -02:00
Michael Krufky e435f95ce6 V4L/DVB (6801): tda18271: pass i2c gate configuration into tda18271_attach()
If we pass TDA18271_GATE_DIGITAL into tda18271_attach(), it will always try to
use the digital demodulator's i2c gate.

If we pass TDA18271_GATE_ANALOG into tda18271_attach(), it will always try to
use the analog demodulator's i2c gate.

If we pass TDA18271_GATE_AUTO into tda18271_attach(), it will try to use the
analog demodulator's i2c gate when tuning in analog mode, and it will try to
use the digital demodulator's i2c gate when tuning in digital mode.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:32 -02:00
Michael Krufky 7206abbc2d V4L/DVB (6800): tda18271: use an enum rather than an integer to store analog / digital state
Use an enum rather than an integer #define to store analog / digital state.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:31 -02:00
Michael Krufky 14e3c152a1 V4L/DVB (6745): tda18271: remove tuning offset for atsc/qam
The tuning request coming in from userspace is already center adjusted,
so we should not adjust to center (+1.75mhz) within the driver.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:18 -02:00
Michael Krufky 5d2bf930a2 V4L/DVB (6728): tda18271: fix register dump format
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:14 -02:00
Michael Krufky b5f3e1e153 V4L/DVB (6727): tda18271: convert table lookup loops to functions
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:13 -02:00
Michael Krufky aaeccba68a V4L/DVB (6726): tda18271: set image rejection validity
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:13 -02:00
Michael Krufky 293da0ec46 V4L/DVB (6725): tda18271: improve debug flexibility
converted debug module option to an or-able setting.

1 = info
2 = table map values
4 = register dumps

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:12 -02:00
Michael Krufky 1457263e9d V4L/DVB (6724): tda18271: remove duplicated code
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:12 -02:00
Michael Krufky efce841093 V4L/DVB (6723): tda18271: only force init once during attach
Once the image rejection calibration procedure has been successful,
we should not initialize the tuner registers again.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:12 -02:00
Michael Krufky 54465b082c V4L/DVB (6681): tda18271: rename 'debug' to 'tda18271_debug'
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:03:00 -02:00
Michael Krufky 6ca04de36b V4L/DVB (6680): tda18271: move tda18271_map tables to a separate source file
Move tda18271_map tables to a separate source file,
to improve code readability and ease maintenance.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:59 -02:00
Michael Krufky 22ee1250bd V4L/DVB (6678): tda18271: define init callback
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:59 -02:00
Mauro Carvalho Chehab 5add9a6f3c V4L/DVB (6659): Convert MTS to bitfield
Xc2028.3028 has two type of firmwares: audio-standard specific ones and
baseband MTS firmwares. MTS firmwares provide stereo decoding for 6 MHz
BTSC/EIAJ and for monoaural audio decoding on 8 MHz firmwares.

It seems that the option to use MTS or a standard-specific audio decoding
depends on the way xc2028/3028 is connected.

Instead of wasting 32 (or 64 bits) to signalize if the driver needs to use MTS
firmware, this patch converts it to a bitfield that can be shared with other
proprieties of xc2028/3028.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:39 -02:00
Chris Pascoe a1dcd9de64 V4L/DVB (6656): zl10353: store frequencies in 0.1kHz to eliminate rounding errors
Whilst reanalysing my formulas I realised it was no longer possible to get the
right values for a 36.1667MHz IF due to rounding problems.

Storing frequencies in units of 0.1kHz makes it possible to calculate these
again correctly.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:37 -02:00
Chris Pascoe 702a67624e V4L/DVB (6655): Add support for MT352-based DViCO FusionHDTV DVB-T NANO devices
There are at least three variants of the DViCO FusionHDTV DVB-T NANO that
share the same USB device ID.  The first (ZL10353 w/ firmware in ROM) is
already supported; the latter two both require firmware and have either
an MT352 or ZL10353 demodulator, and have a different IR receiver from the
first.

This introduces a new identify_state that can tell the difference between a
"warm" device which is running the embedded firmware, and a "cold" device
that needs us to upload firmware to it before it will work.  We patch the
uploaded device ID (like we do for other bluebird devices) to make it easy
to identify the particular device variant when it reattaches.

NB: These devices use a different firmware file from previous bluebird
    devices.  You need a new firmware file to make this work.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:37 -02:00
Chris Pascoe c6e62a3a39 V4L/DVB (6654): mt352: support oversampled IF input
Rework the input frequency calculation so that it produces the right values
when the ADC oversamples the IF input.

This means MT352 devices can now process a near-zero IF (according to the,
specs 4.57MHz is supported with the default crystal).

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:36 -02:00
Chris Pascoe 5ccaf90501 V4L/DVB (6653): Add support for the DViCO FusionHDTV NANO2 w/ZL10353 and firmware
Add support for the DViCO FusionHDTV DVB-T NANO with zl10353 demodulator and
firmware in ROM on the device.

Again, this is based on the great work of Mike Krufky with my modifications
to use the in-tree XC2028 driver.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:36 -02:00
Chris Pascoe aeb012bbf4 V4L/DVB (6649): Add support for the DViCO FusionHDTV Dual Digital 4
Add support for DViCO's Dual Digital 4 with xc3028 tuner, zl10353 DVB-T
demodulator and a new-style I2C IR remote control receiver.

This would not have been possible without the work of and advice from
Mike Krufky, who originally got the Dual Digital 4 and second-gen DVB-T
NANO devices working with the out-of-tree XC3028 driver.

I converted it to use the in-tree XC3028 driver (after making it suitable
for our use), and added the IR remote control support based on his advice.

NB: a firmware package is required to use this device.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:32 -02:00
Chris Pascoe 794604c3ef V4L/DVB (6630): zl10353: calculate input frequency register instead of using hardcoded value
Now we know the zl10353's correct ADC clock, we can calculate the input
frequency registers correctly instead of just blindly setting them.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:21 -02:00
Chris Pascoe 58d834ea89 V4L/DVB (6628): zl10353: Improve support for boards without a tuner on secondary i2c
Issue FSM_GO instead of TUNER_GO if there is no tuner attached to the
secondary i2c bus.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:21 -02:00
Chris Pascoe a644e4a3e9 V4L/DVB (6627): CXUSB: handle write then read from different address
The path to perform a read immediately after a write was not checking that
the address being read from was the same as the one that was written.

Handling this case correctly should mean that we now can handle more than
two i2c messages at a time.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:20 -02:00
Chris Pascoe 272479d7ab V4L/DVB (6626): CXUSB: support only-read i2c requests
Any i2c read request that was not immediately preceded by a write request was
incorrectly taking the write path.  Add the capability to handle individual
read requests.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:20 -02:00
Chris Pascoe 13e001dfe3 V4L/DVB (6625): CXUSB: i2c transfer failure notification
The i2c master_xfer routine should return a negative result if not all
transfers completed successfully.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:20 -02:00
Chris Pascoe b17f109df1 V4L/DVB (6624): CXUSB: return control message transfer result to caller
Callers to cxusb_ctrl_msg currently do not receive any indication that their
transfer failed.  Return the true return code from dvb_usb_generic_{rw,write}.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:17 -02:00
Michael Krufky 255c1887cc V4L/DVB (6622): tda827x: prevent possible NULL pointer dereference in tda827xa_lna_gain
If tda827x_config hasn't been defined, exit the function.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:17 -02:00
Michael Krufky 3b0c453aa7 V4L/DVB (6621): tda827x: fix NULL pointer dereference during tda827x_probe_version
Fix the following oops:

[  750.807586] CPU:    1
[  750.807587] EIP:    0060:[<f9dde2a3>]    Tainted: P       VLI
[  750.807589] EFLAGS: 00010296   (2.6.22-14-generic #1)
[  750.807599] EIP is at tda827x_probe_version+0xc3/0x130 [tda827x]
[  750.807603] eax: 00000000   ebx: f5a45a00   ecx: 00000000   edx: 00000001
[  750.807607] esi: f9de05ac   edi: e9b897e0   ebp: ed8015ac   esp: ed735f58
[  750.807611] ds: 007b   es: 007b   fs: 00d8  gs: 0000  ss: 0068
[  750.807615] Process kdvb-fe-1 (pid: 10662, ti=ed734000 task=d3b76530 task.ti=ed734000)
[  750.807618] Stack: f9e23972 00000038 ed735fd0 00010060 41ae0001 ed735f73 88b89608 e9b89608
[  750.807629]        e9b89608 ed801400 f9dde338 e9b89608 f9b2a46b 000000ae 00000a18 d3b76640
[  750.807639]        fffffffc f9b2bad6 00000003 f4433e68 e962b8c0 f4433e64 00000292 ed735fd0
[  750.807649] Call Trace:
[  750.807653]  [<f9e23972>] tda10046_init+0x2d2/0x6c0 [tda1004x]
[  750.807700]  [<f9dde338>] tda827x_initial_init+0x8/0x20 [tda827x]
[  750.807713]  [<f9b2a46b>] dvb_frontend_init+0x2b/0x60 [dvb_core]
[  750.807745]  [<f9b2bad6>] dvb_frontend_thread+0x66/0x2f0 [dvb_core]
[  750.807780]  [complete+64/96] complete+0x40/0x60
[  750.807805]  [<f9b2ba70>] dvb_frontend_thread+0x0/0x2f0 [dvb_core]
[  750.807822]  [kthread+66/112] kthread+0x42/0x70
[  750.807828]  [kthread+0/112] kthread+0x0/0x70
[  750.807841]  [kernel_thread_helper+7/16] kernel_thread_helper+0x7/0x10
[  750.807869]  =======================
[  750.807872] Code: 8b 74 24 20 8b 7c 24 24 83 c4 28 c3 8b 0d 00 0c de f9 85 c9 75 42 be e0 04 de f9 81 c7 0c 01 00 00 b9 33 00 00 00 f3 a5 8b 43 08 <c7> 40 14 50 e3 dd f9 8b 5c 24 1c 31 c0 8b 74 24 20 8b 7c 24 24
[  750.807925] EIP: [<f9dde2a3>] tda827x_probe_version+0xc3/0x130 [tda827x] SS:ESP 0068:ed735f58

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:16 -02:00
Joe Perches 11645cc370 V4L/DVB (6618): drivers/media/dvb: Add missing "space"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:16 -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
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 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
Trent Piepho 8ae1fe2a09 V4L/DVB (6508): ttpci: Rework Kconfig menus and Makefile
The ttpci Kconfig file has bugs that cause it to fail in certain Kconfig
situations.  The basic problem is that it selects certain drivers, but does
not depend on the dependencies of those drivers.

See http://article.gmane.org/gmane.comp.video.video4linux/35072

Using the Kconfig file also has some annoyances.  For instance one can't turn
off AV7110 support unless you go down several options and first turn off
budget-patch support.  Normally user selectable drivers are not forced on like
this.

The "AV7110 cards with Budget Patch" option is disabled if "Budget cards"
isn't on.  Normally a driver appears nested under a driver it depends on, but
since drivers that don't depend on "Budget cards" are between the two options,
the config programs can't display the tree correctly.

The Makefile has an issue too.  Some modules, ttpci-eeprom and budget-core,
appear in the Makefile under several different config symbols.  If more than
one of these symbols is on, they will get added the to list of objects
multiple times.  The normal convention is to have a config symbol just the
common object(s) and have the users of the that object either depend on or
select that config symbol.

This patch fixes all these issues.  ttpci-eepom is under a new config symbol,
and so is the budget-core module.  The four different budget card types appear
as sub-drivers under a main "SAA7146 DVB cards" option.  Turning on
budget-patch doesn't force AV7110.  Drivers using SAA7146_VV have the
necessary VIDEO_DEV dependency, so that it isn't possible to select SAA7146_VV
without V4L being on.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:53 -02:00
Marco Schluessler 58a44040b4 V4L/DVB (6497): saa7146/budget*/dvb-ttpci: Remove V4L1 code
Remove V4L1 code.

Signed-off-by: Marco Schluessler <marco@lordzodiac.de>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:52 -02:00
Michael Krufky 7d11c53c5d V4L/DVB (6449): tda18271: clean up i2c_gate handling
Call analog_demod_ops->i2c_gate_ctrl when in analog tuning mode, and
frontend_ops.i2c_gate_ctrl when in digital tuning mode.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:14 -02:00
Michael Krufky 6f998742f0 V4L/DVB (6446): tda18271: clean up debug macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:11 -02:00
Michael Krufky 5c82f4497b V4L/DVB (6442): move std if setting from tda8290 to tda827x
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:10 -02:00
Michael Krufky 482b498d7a V4L/DVB (6439): dvb_frontend: codingstyle cleanups
thanks to checkpatch.pl

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:09 -02:00
Michael Krufky 16f291684c V4L/DVB (6438): tuner: move analog_demod_priv into struct dvb_frontend
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:08 -02:00
Michael Krufky 1dde7a4fa2 V4L/DVB (6436): tuner: move analog_tuner_ops into dvb_frontend_ops
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:07 -02:00
Michael Krufky 5bea1cd387 V4L/DVB (6435): tda8290: add support for NXP TDA18271 tuner and TDA8295 analog demod
Add basic support for NXP TDA8295 analog demod and TDA18271 tuner silicon.

TDA8295 + TDA8275a not yet tested.
TDA8290 + TDA18271 not yet supported.

Digital mode of TDA18271 not yet tested & needs more work.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:06 -02:00
Michael Krufky ce1f8bdb0c V4L/DVB (6434): tda827x: fix GPL export on attach function
EXPORT_SYMBOL should have been EXPORT_SYMBOL_GPL

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:06 -02:00
Michael Krufky 746d9732db V4L/DVB (6433): Move all tda8275/8275a tuning code from tda8290 module into tda827x module
Add analog tuning support to tda827x dvb_frontend tuner module.

Convert tda8290 module back to native tuner interface.

The tda8290 analog demodulator will be handled the same way as tda9887.
The tuner.ko module (tuner-core) will pass commands to tda8290 via the
tuner_operations interface.  tda8290 will communicate with tda827x via
the dvb_frontend interface, while passing a pointer to a private data
structure.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:01:05 -02:00
Mauro Carvalho Chehab 7f1711234e V4L/DVB (6384): Replace TDA9887_SET_CONFIG by TUNER_SET_CONFIG
Currently, the only tuner-specific device that allows special
configurations is tda9887. However, tea5767 also may require some
special configurations (for example, to specify a different Xtal freq).

This patch replaces TDA9887_SET_CONFIG by a more generic internal ioctl
(TUNER_SET_CONFIG). The newer one allows specifying what tuner is
appliable to a configuration set, and allows an arbitrary configuration
struct.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:00:54 -02:00
Randy Dunlap da517164f5 V4L/DVB (7001): av7110: fix section mismatch
Fix driver data name to match whitelist of acceptable names that contain
pointers init data so that section mismatch warning is placated.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-11 15:02:25 -02:00
Steven Toth 2300317f30 V4L/DVB (6820): s5h1409: QAM SNR related fixes
QAM SNR values were incorrect when the cable was disconnected. This
patch extends the lookup tables to ensure correct values are being
returned.

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>
2007-12-13 17:58:06 -02:00
Mauro Carvalho Chehab 4a56087f3b V4L/DVB (6794): Fix compilation when dib3000mc is compiled as a module
As reported by Andrew Morton:

> ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/dvb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
> ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/dvb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
> ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/dvb/dvb-usb/dvb-usb-dibusb-mc.ko] undefined!
> ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/dvb/dvb-usb/dvb-usb-dibusb-mc.ko] undefined!
> ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/dvb/dvb-usb/dvb-usb-a800.ko] undefined!
> ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/dvb/dvb-usb/dvb-usb-a800.ko] undefined

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11 18:13:28 -02:00
Jiri Kosina f6b5cf771a V4L/DVB (6733): DVB: Compile 3000MC-specific DIB code only for CONFIG_DVB_DIB3000MC
On Tue, 4 Dec 2007, Ingo Molnar wrote:

>  drivers/built-in.o: In function `dibusb_dib3000mc_tuner_attach':
>  : undefined reference to `dib3000mc_get_tuner_i2c_master'
>  drivers/built-in.o: In function `dibusb_dib3000mc_tuner_attach':
>  : undefined reference to `dib3000mc_set_config'

Seems like -common part contains also code that is not completely
common to all the modules.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11 18:13:17 -02:00
Mauro Carvalho Chehab 8733e29748 V4L/DVB (6750): Fix in-kernel compilation for cxusb
cxusb needs tuner-xc2028*.h files, but Makefile is not adding its patch

drivers/media/dvb/dvb-usb/cxusb.c:33:26: error: tuner-xc2028.h: File not found
drivers/media/dvb/dvb-usb/cxusb.c:34:32: error: tuner-xc2028-types.h: File not found

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11 18:08:24 -02:00
Chris Pascoe 78f3b0b672 V4L/DVB (6629): zl10353: fix default adc_clock and TRL nominal rate calculation
The default adc_clock for the zl10353 is different from what was originally
thought to be the case and the TRL nominal rate formula was incorrect as a
result.  Use a better (and hopefully now correct) formula.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11 18:08:13 -02:00
Hartmut Hackmann 33f7771411 V4L/DVB (6579): Fix bug #8824: Correct support for Diseqc on tda10086
This is a modified version of a patch previously posted by Thomas
Unverzagt.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-12-11 18:08:06 -02:00
Hartmut Birr 85085ad7b2 V4L/DVB (6501): stv0297: Signal strength fixes
Fixes the signal strength value (higher value = higher signal strength)
and scales the value to the range of 0..ffff. The characteristic itself
is wrong. To get proper values on a TT-C2300 in the range of 40..60%
real signal strength, the values from the patch should be divide by two.
The attached patch doesn't fix the characteristic.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:25 -02:00
Hartmut Birr 7cccccc33a V4L/DVB (6500): tda10021: Fix reported signal strength
Fix reported signal strength value (higher value = higher signal strength).

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:25 -02:00
Hartmut Birr 3de0e18b3a V4L/DVB (6499): tda10021: Bit error counting fixed
Bit error counting fixed for the tda10021.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:24 -02:00