Commit Graph

77 Commits (f41b177157718abe9a93868bb76e47d4a6f3681d)

Author SHA1 Message Date
Trent Piepho d799ce5708 V4L/DVB (12290): dvb-pll: Add support for Alps TDEE4 DVB-C NIM
No datasheet, data take from code in flexcop driver.  That code rounded
down the divisor rather than rounding to nearest, which was probably not
intentional and the dvb-pll code will round to nearest.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:50 -03:00
Trent Piepho 9d5d75a9eb V4L/DVB (12289): dvb-pll: Add support for Samsung TBMU24112 DVB-S NIM
Tuner parameters determined from code in flexcop driver.  That code rounded
the divisor down instead of to the nearest value.  This was probably not
intentional and the dvb-pll version will round to nearest.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:49 -03:00
Trent Piepho f52c48535f V4L/DVB (12288): dvb-pll: Add support for Samsung TBDU18132 DVB-S NIM
Tuner parameters taken from flexcop driver.  This PLL has a 17 bit divisor
while the dvb-pll driver is designed for 15 bit divisors.  It's not a
problem as 15 bits is enough for the tuner's entire range.  But if a larger
range was wanted, it could be done by adding additional bands with the
extra divisor bits appearing as band switch bits.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:48 -03:00
Trent Piepho a104ed073b V4L/DVB (12287): dvb-pll: Add Samsung TDTC9251DH0 DVB-T NIM
No datasheet, tuner data comes from code in flexcop driver.  This tuner is
also used on the AVerTV 771 supported by the bttv driver, but that code
uses a different tuner configuration, which is surprising.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:17:48 -03:00
Manu Abraham b3332a983d V4L/DVB (9379): FIX: fix a bug in the charge pump setting
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Antti Palosaari 139dfeb261 V4L/DVB (7913): DVB-PLL: add Samsung DTOS403IH102A tuner
- add Samsung DTOS403IH102A tuner

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:06:12 -03:00
Michael Krufky 0c3ea9941c V4L/DVB (7427): dvb-pll: remove rf input module options
The ability to select RF input was a supported feature only available on
Philips TUV1236d and Philips FCV1236d.

This feature, along with support for the tuners that used it,
was moved into the tuner-simple module.

This can now be removed from dvb-pll.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 5e8556de79 V4L/DVB (7425): dvb-pll: remove dead code
remove #if 0'd support for:

Philips TUV1236D
Philips TD1316
Philips FMD1216ME
LG TDVS-H06xF
Philips FCV1236D
Thomson FE6600
Microtune 4042 FI5
Thomson dtt761x

Support for these tuners has been moved into the 'tuner-simple' module.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky b7f81b2058 V4L/DVB (7424): dvb-pll: remove support for Philips TUV1236D
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky ad561caafa V4L/DVB (7423): dvb-pll: remove support for Philips TD1316
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 92d1069f3c V4L/DVB (7422): dvb-pll: remove support for Philips FMD1216ME
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 75a791925d V4L/DVB (7421): dvb-pll: remove support for LG TDVS-H06xF
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 89418750f7 V4L/DVB (7420): dvb-pll: remove support for Philips FCV1236D
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 7b844d75dc V4L/DVB (7419): dvb-pll: remove support for Thomson FE6600
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 53f2dd3314 V4L/DVB (7418): dvb-pll: remove support for Microtune 4042 FI5
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 15b3feb735 V4L/DVB (7417): dvb-pll: remove support for Thomson dtt761x
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -03:00
Michael Krufky 24d3980c3a V4L/DVB (7416): dvb-pll: remove support for Thomson dtt7610
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:54 -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
Michael Krufky 4562fbeac6 V4L/DVB (6232): dvb-pll: report whether input rf will be autoselected or set via insmod option
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:49 -03:00
Michael Krufky 8528fa4147 V4L/DVB (6231): dvb-pll: always show pll name if forced via insmod option
The name of the pll will be shown if forced via insmod option,
or if debug is enabled.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:49 -03:00
Michael Krufky 704e39bf62 V4L/DVB (6230): dvb-pll: add module option to force dvb-pll desc id (for debug use only)
Add a module option to force the dvb-pll module to use an alternate dvb-pll
description without having to recompile the kernel.

Having a module option like this is useful in some cases, where the vendor
may release an alternate revision of the hardware using a different tuner,
but without changing the pci subsystem / usb device ids.

This option is intended for debugging purposes _only_.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:48 -03:00
Michael Krufky ff3e7dd580 V4L/DVB (6229): dvb-pll: increase DVB_PLL_MAX to 64
Increased DVB_PLL_MAX from 16 to a figure that would never be reached in a
practical sense.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:46 -03:00
Michael Krufky 05a4611b5d V4L/DVB (6228): dvb-pll: add module option to specify rf input
Add a module option to dvb-pll, called "input" to specify which rf
input to use on devices with multiple rf inputs.  If the module option
is not specified, then the driver will autoselect the rf input, as per
previous behavior.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:46 -03:00
Michael Krufky a27e5e769e V4L/DVB (6227): dvb-pll: store instance ID in dvb_pll_priv structure
Store an instance ID in the dvb_pll_priv structure, so that module options
specific to a given pll may be used by the functions within the driver.

When debug is turned on, print a message indicating which pll was attached
and it's instance id.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:45 -03:00
Michael Krufky 5d7802b261 V4L/DVB (6226): dvb-pll: pass fe pointer into dvb_pll_configure() and set() functions
The pll-specific set() function will need access to the dvb_pll_priv
structure for new functionality.  This patch gives access to this
structure to the required functions.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:14:45 -03:00
Trent Piepho 0d84a62b38 V4L/DVB (5991): dvb-pll: Set minimum and maximum frequency properly
The tuner maximum frequency wasn't being set, while the minimum 
frequency was set to what the maximum should have been.

If a future patch were to enforce these limits, dvb-pll would be 
effectively broken.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-20 12:18:03 -03:00
Adrian Bunk 0a0f2c87cd V4L/DVB (5939): dvb-pll: make struct dvb_pll_fcv1236d static
The fcv1236d support patch was created before the "dvb: remove static
dependencies on dvb-pll" patch was applied, but the fcv1236d patch didn't
get merged until after the fact.

struct dvb_pll_fcv1236d can become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-30 16:26:37 -03:00
Adrian Bunk 4de7bb44cc V4L/DVB (5814): Unexport dvb_pll_configure
Now that it's static, it should no longer be exported to modules...

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:24:34 -03:00
Michael Krufky f1b24397e8 V4L/DVB (5798): Dvb-pll: add support for Philips fcv1236d
This patch adds support to the dvb-pll library for the
Philips fcv1236d tuner, based on the FCV1236D datasheet.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:24:24 -03:00
Michael Krufky 47a9991e80 V4L/DVB (5780): Dvb: Remove static dependencies on dvb-pll
This patch removes all static dependencies on the dvb-pll module.
All exported dvb_pll_desc's have been UNexported, and the caller
will reference the individual dvb_pll_desc by it's index in the
pll_list array.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:24:16 -03:00
Trent Piepho 4ce1567892 V4L/DVB (5777): Dvb-pll digitv dvb-usb: Eliminate last user of dvb_pll_configure
The last user of dvb_pll_configure was the dvb-usb function
dvb_usb_tuner_calc_regs(), which was nothing more than a wrapper around
dvb_pll_configure().  It's just a copy of the functionality provided by
the tuner_ops calc_regs method, and can be deleted.

There were two users of dvb_usb_tuner_calc_regs().
One was dvb_usb_tuner_set_params_i2c(), which is converted to use
fe->ops.tuner_ops.calc_regs().

The other was the digitv driver.  This driver can use one of two demods,
mt352 or nxt6000.  

For the mt352, the driver would set tuner_ops.calc_regs to 
dvb_usb_tuner_calc_regs().  

We can just attach dvb_pll and use the tuner_ops.calc_regs() provided by 
that module. For the nxt600, the driver would set tuner_ops.set_params 
to digitv_nxt6000_tuner_set_params.  

That function would in turn use dvb_usb_tuner_calc_regs().

We convert it to use tuner_ops.calc_regs() instead, and use 
dvb_pll_attach.

The digitv_tuner_attach() needs to know which frontend was attached by 
digitv_frontend_attach(), since the nxt6000 needs tuner_ops.set_params() 
to be overridden with digitv_nxt6000_tuner_set_params().

So, to do this a digitv_state that says which frontend was used is added 
to the dvb_usb_device private state field.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:24:15 -03:00
Trent Piepho b7754d74d2 V4L/DVB (5636): Integrate all users of the fmd1216 tuner with dvb-pll
Enhance the dvb-pll definition of the fmd1216 tuner by adding an init sequence
and a sleep sequence.

The init sequence sets the AGC control register to 0xa0, selecting the fast
time constant and 112 dBuV take-over point.  This the recommended value for
DVB-T operation.

The sleep sequence sets bit P4 (which is believed to turn the analog
demodulator on), turns off the tuning voltage, and sets the AGC control
register to 0x60 (external AGC voltage, the recommended value for analog
operation).

The existing dvb-pll users in the cx88 driver, listed below, will gain these
init and sleep sequences.

CX88_BOARD_HAUPPAUGE_HVR1100    Hauppauge WinTV-HVR1100 DVB-T/Hybrid
CX88_BOARD_HAUPPAUGE_HVR1100LP  Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profi
CX88_BOARD_WINFAST_DTV2000H     WinFast DTV2000 H
CX88_BOARD_HAUPPAUGE_HVR3000    Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DV
CX88_BOARD_HAUPPAUGE_HVR1300    Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encod

This non-dvb-pll user in the cx88 driver should only gain the sleep sequence,
as it already had an equivalent init sequence.  The non-dvb-pll code for this
user is removed.

X88_BOARD_DNTV_LIVE_DVB_T_PRO   digitalnow DNTV Live! DVB-T Pro

In these saa7134 driver, these non-dvb-pll users are converted to use dvb-pll:

SAA7134_BOARD_MD7134                    Medion 7134
SAA7134_BOARD_ASUS_EUROPA2_HYBRID       Asus Europa2 OEM

The saa7134 functions philips_fmd1216_tuner_init(),
philips_fmd1216_tuner_sleep(), and philips_fmd1216_tuner_set_params() are
deleted and the dvb-pll versions are used.

This should result in equivalent sleep, init, and tuning sequences being sent
to the tuner.

For the cxusb driver, only one board is effected:

USB_PID_MEDION_MD95700          	Medion MD95700

This board used dvb_usb_tuner_init_i2c() and dvb_usb_tuner_set_params_i2c()
for init and tuning, respectively.  These functions are effectively the same
as the dvb-pll versions.  They call a tuner pass control function defined at
the dvb-usb level, but this does not matter, as this card does not have a
tuner pass control function (only the dib3000mb does).  This board will gain
the sleep sequence, while init and tuning should be unchanged.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:23:29 -03:00
Michael Krufky fbfee8684f V4L/DVB (5651): Dibusb-mb: convert pll handling to properly use dvb-pll
moved tda665x pll_init into dvb_pll_desc dvb_pll_tda665x.initdata
convert handling of tda665x and tua6010xs to properly use dvb-pll

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:23:25 -03:00
Michael Krufky 4abe9f9d94 V4L/DVB (5633): Tuv1236d: move rf input switching code into dvb-pll
This patch removes duplicate code from cx88-dvb and saa7134-dvb that handles
rf input switching for the TUV1236d tuner.

The functionality is added to dvb-pll, where all the other code that 
handles the TUV1236d is kept.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:23:14 -03:00
Michael Krufky 77d6750470 V4L/DVB (5632): Dvb-pll: pass dvb_frontend_parameters to generic set() function
Rename dvb_pll_desc.setbw() to set(), and accept struct dvb_frontend_parameters
instead of passing both freq and bandwidth, so that this may be used as a
generic function.

In order to do this, dvb_pll_configure must also be altered in the same manner,
to take struct dvb_frontend_parameters instead of freq and bandwidth.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:23:12 -03:00
Marco Gittler 941491f3a5 V4L/DVB (5532): Add support for Opera S1- DVB-USB
This patch adds support for DVB-Opera S1 USB 2.0 BOX.

Signed-off-by: Marco Gittler <g.marco@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:45:42 -03:00
Trent Piepho d519dcf61e V4L/DVB (5457): Dvb-pll: Replace sleep function with a more capable one
The dvb-pll sleep function could only send a 2-byte sequence to the PLL.
This isn't enough in some cases, for example fmd1216me will need to send
a 4-byte command to set both BB and AB to the correct values.

Instead of using a fake band with a frequency of 0 to store the sleep
data (which has room for only two bytes), the new sleep function works
like the init function.  A new pointer is added to the pll description,
and when non-NULL points to a buffer with the length and data to send.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:44:57 -03:00
Trent Piepho df78cb0a18 V4L/DVB (5456): Dvb-pll: Move IF frequency from per-band data to per-tuner data
The IF frequency was specified for each band, but it's not something that
changes from band to band.  None of the tuner definitions had a different
IF frequency (called offset) from one band to another.
Acked-by: Michael Krufky <mkrufky@linuxtv.org>

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:44:56 -03:00
Trent Piepho 0fd17d6da8 V4L/DVB (5455): Dvb-pll: Adjust rounding to be consistent
Some PLLs had one half the step size added to the offset, so that the
divisor would be rounded to the nearest integer.  Some didn't and so
would always be rounded down.

This makes dvb-pll round to the nearest when calculating the divisor,
without the offset needing to be fudged.  PLLs that had a fudged offset
have the offset changed to be just the IF frequency.
The satellite PLL dvb_pll_philips_sd1878_tda8261 was rounding up for some
reason, and I've kept it that way.

In addition, frequencies that were rounded to the nearest kHz are
extended to full Hz resolution.  One sixth MHz step sizes that were
listed as 166,666 Hz are changed to 166,667 Hz, which is slightly closer.

PLLs that were already rounding:
dvb_pll_tda665x, offset was 36 1/6 (to nearest kHz) + step/2
dvb_pll_fmd1216me, offset was 36 1/8 (to two digits) + step/2
dvb_pll_thomson_fe6600, offset was 36 1/8 (to two digits) + step/2
dvb_pll_env57h1xd5, offset was 36 1/8 + step

Note that the last PLL, dvb_pll_env57h1xd5, appears to have had a bug in
the offset.  Rather than adding stepsize/2, it was adding a full
stepsize.  The PLL definition originally came from the dibusb driver,
which used 36 1/8 + step/2.  The change to 36 1/8 + step was probably a
mistake added when the tuner was converted to dvb-pll.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:44:56 -03:00
Trent Piepho 6bdcc6e6db V4L/DVB (5363): Dvb: Remove lgh06xf driver
The code of the dvb-pll driver and the lgh06xf driver is nearly
identical.  The main difference is that the lgh06xf driver would set the
AGC TOP value on every tune call.  The dvb-pll driver now has the ability
to set the AGC TOP when the front-end device is opened, which is a better
way to go about it.  By using this ability of dvb-pll, the lgh06xf driver
is made unnecessary.

There is one other difference.  dvb-pll will probe for the presence of an
I2C pll chip by doing a one byte read, the lgh06xf driver did not do
this.  In some devices the PLL is not reachable over I2C at the timer the
tuner is attached.  Some more initialization, such as firmware loading,
must take place first.  None of the devices using a LG-H06xF should have
this problem.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:44:05 -03:00
Trent Piepho 26aed92289 V4L/DVB (5362): Dvb-pll: add code for doing tuner initialization
Some tuners need or benefit from initialization, to change certain
settings from their power on default values.

Typically, tuners with TUA603x PLLs can benefit from setting the AGC TOP
value to something else.  This patch includes code to set the AGC TOP to
103 dBuV for the Thomson DTT-761x tuners, which I have experimentally
verified gives the best SNR readings, increasing SNR by about 0.19 dB
over the default value.

Other tuners can make use of this as well.  For example, the separate LG
TDVS-H06xF driver's only difference from dvb-pll is this same setting of
AGC TOP value.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:44:04 -03:00
Trent Piepho 982dd1bdaa V4L/DVB (5360): Dvb-pll: Use sizeof() to get name length
Better to use sizeof() to get the size of the output buffer for the tuner
name, instead of just hard coding 128.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:44:00 -03:00
Michael Krufky 89faeefcf8 V4L/DVB (4868): Dvb-pll: return frequency set by dvb_pll_configure()
This patch removes some duplicated code by returning the frequency set by
dvb_pll_configure(), instead of recalculating it again in dvb_pll_set_params()
and dvb_pll_calc_regs().
If the return value of dvb_pll_configure is less than zero, it is an error
code.  Otherwise, the return value is the frequency actually set by the
function.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:05 -02:00
Michael Krufky 47ae9ae895 V4L/DVB (4867): Whitespace cleanup
- adhere to 80-column limit
- replace some spaces with tabs

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 09:05:04 -02:00
Michael Krufky 2213918a99 V4L/DVB (4847): Drivers/media/dvb/frontends: kfree() cleanups
We don't have to check for NULL before kfree()
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 08:51:33 -02:00
Chris Pascoe c162dff643 V4L/DVB (4436): Dvb-pll support for MT352/ZL10353 based tuners.
Typical wiring of MT352 and ZL10353 based tuners differs from dvb-pll's
expectation that the PLL is directly accessible.  On these boards, the
PLL is actually hidden behind the demodulator, and as such can only be
accessed via the demodulator's interface.  It was failing to communicate
with the PLL during an attach test and subsequently not connecting the
tuner ops.
By passing a NULL I2C bus handle to dvb_pll_attach, this accessibility
check can be bypassed.  Do this for the affected boards.  Also fix a
possible NULL dereference at sleep time, which would otherwise be
exposed by this change.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:38 -03:00
Andrew de Quincey 2bfe031df6 V4L/DVB (4386): Convert DVB devices to use dvb_attach()
Only devices using > 1 frontend were ported; ones which did not are left
using static binding.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:25 -03:00
Andrew de Quincey 95faba22d8 V4L/DVB (4322): Fix dvb-pll autoprobing
Trent Piepho pointed out that the pll test i2c transmission is slightly
wrong; it was transmitting a zero length message, and then reading from the
PLL. This was wrong; it should only be transmitting a single read i2c message.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-29 17:22:26 -03:00
Andrew de Quincey 55c05b6d22 V4L/DVB (4311): Fix possible dvb-pll oops
Supplying a NULL i2c adapter to dvb_pll_attach is allowed, for example with
mt352 demods. However, the pll i2c probe will segfault because it does not
check for this.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-29 17:22:25 -03:00
Andrew de Quincey 93e2b1ae97 V4L/DVB (4294): Fix broken tda665x PLL definition.
It was pointed out on the mailing list that this PLL definition is broken. I
went back to the original dibusb driver and confirmed it used to use these
settings, as well as consulting the datasheet.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-29 17:22:11 -03:00