summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dvb-pll.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] dvb_pll: DVB-S incorrect tune settings for dw2102/dm1105/cx88/opera1Malcolm Priestley2011-03-211-11/+68
| | | | | | | | | | | | | | | This tuner PLL has missing initialisation settings resulting in haphazard tuning. The PLL LPF was set to just 22000 symbol rate. Basically, the module is a Sharp BS2F7HZ0194 (STV0299+IX2410) I have had problems implementing the PLL in a new driver and did not want to break the IX2410 out of the PLL. This applies to DW2102, DM1105, CX88 and OPERA1 drivers. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* V4L/DVB (12290): dvb-pll: Add support for Alps TDEE4 DVB-C NIMTrent Piepho2009-09-121-0/+24
| | | | | | | | | 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>
* V4L/DVB (12289): dvb-pll: Add support for Samsung TBMU24112 DVB-S NIMTrent Piepho2009-09-121-0/+14
| | | | | | | | | 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>
* V4L/DVB (12288): dvb-pll: Add support for Samsung TBDU18132 DVB-S NIMTrent Piepho2009-09-121-0/+22
| | | | | | | | | | | 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>
* V4L/DVB (12287): dvb-pll: Add Samsung TDTC9251DH0 DVB-T NIMTrent Piepho2009-09-121-0/+15
| | | | | | | | | 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>
* V4L/DVB (9379): FIX: fix a bug in the charge pump settingManu Abraham2008-12-291-1/+1
| | | | | Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB (7913): DVB-PLL: add Samsung DTOS403IH102A tunerAntti Palosaari2008-07-201-0/+47
| | | | | | | - add Samsung DTOS403IH102A tuner Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7427): dvb-pll: remove rf input module optionsMichael Krufky2008-04-241-18/+0
| | | | | | | | | | | | | 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>
* V4L/DVB (7425): dvb-pll: remove dead codeMichael Krufky2008-04-241-8/+0
| | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (7424): dvb-pll: remove support for Philips TUV1236DMichael Krufky2008-04-241-49/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7423): dvb-pll: remove support for Philips TD1316Michael Krufky2008-04-241-43/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7422): dvb-pll: remove support for Philips FMD1216MEMichael Krufky2008-04-241-38/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7421): dvb-pll: remove support for LG TDVS-H06xFMichael Krufky2008-04-241-27/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7420): dvb-pll: remove support for Philips FCV1236DMichael Krufky2008-04-241-18/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7419): dvb-pll: remove support for Thomson FE6600Michael Krufky2008-04-241-15/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7418): dvb-pll: remove support for Microtune 4042 FI5Michael Krufky2008-04-241-14/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7417): dvb-pll: remove support for Thomson dtt761xMichael Krufky2008-04-241-15/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7416): dvb-pll: remove support for Thomson dtt7610Michael Krufky2008-04-241-13/+0
| | | | | Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (7094): static memoryDouglas Schilling Landgraf2008-04-241-1/+1
| | | | | | | | - 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>
* V4L/DVB (6232): dvb-pll: report whether input rf will be autoselected or set ↵Michael Krufky2007-10-091-1/+14
| | | | | | | via insmod option Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
* V4L/DVB (6231): dvb-pll: always show pll name if forced via insmod optionMichael Krufky2007-10-091-1/+1
| | | | | | | | 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>
* V4L/DVB (6230): dvb-pll: add module option to force dvb-pll desc id (for ↵Michael Krufky2007-10-091-1/+13
| | | | | | | | | | | | | | | | 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>
* V4L/DVB (6229): dvb-pll: increase DVB_PLL_MAX to 64Michael Krufky2007-10-091-1/+1
| | | | | | | | 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>
* V4L/DVB (6228): dvb-pll: add module option to specify rf inputMichael Krufky2007-10-091-29/+53
| | | | | | | | | | 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>
* V4L/DVB (6227): dvb-pll: store instance ID in dvb_pll_priv structureMichael Krufky2007-10-091-0/+14
| | | | | | | | | | | 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>
* V4L/DVB (6226): dvb-pll: pass fe pointer into dvb_pll_configure() and set() ↵Michael Krufky2007-10-091-13/+23
| | | | | | | | | | | 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>
* V4L/DVB (5991): dvb-pll: Set minimum and maximum frequency properlyTrent Piepho2007-08-201-1/+1
| | | | | | | | | | | 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>
* V4L/DVB (5939): dvb-pll: make struct dvb_pll_fcv1236d staticAdrian Bunk2007-07-301-1/+1
| | | | | | | | | | | | 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>
* V4L/DVB (5814): Unexport dvb_pll_configureAdrian Bunk2007-07-181-1/+0
| | | | | | | | 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>
* V4L/DVB (5798): Dvb-pll: add support for Philips fcv1236dMichael Krufky2007-07-181-0/+19
| | | | | | | | 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>
* V4L/DVB (5780): Dvb: Remove static dependencies on dvb-pllMichael Krufky2007-07-181-43/+74
| | | | | | | | | | | | | | 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>
* V4L/DVB (5777): Dvb-pll digitv dvb-usb: Eliminate last user of dvb_pll_configureTrent Piepho2007-07-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (5636): Integrate all users of the fmd1216 tuner with dvb-pllTrent Piepho2007-07-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (5651): Dibusb-mb: convert pll handling to properly use dvb-pllMichael Krufky2007-07-181-0/+1
| | | | | | | | 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>
* V4L/DVB (5633): Tuv1236d: move rf input switching code into dvb-pllMichael Krufky2007-07-181-0/+14
| | | | | | | | | | | | 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>
* V4L/DVB (5632): Dvb-pll: pass dvb_frontend_parameters to generic set() functionMichael Krufky2007-07-181-51/+43
| | | | | | | | | | | | | 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>
* V4L/DVB (5532): Add support for Opera S1- DVB-USBMarco Gittler2007-04-271-0/+25
| | | | | | | 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>
* V4L/DVB (5457): Dvb-pll: Replace sleep function with a more capable oneTrent Piepho2007-04-271-30/+25
| | | | | | | | | | | | | | 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>
* V4L/DVB (5456): Dvb-pll: Move IF frequency from per-band data to per-tuner dataTrent Piepho2007-04-271-104/+123
| | | | | | | | | | 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>
* V4L/DVB (5455): Dvb-pll: Adjust rounding to be consistentTrent Piepho2007-04-271-73/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (5363): Dvb: Remove lgh06xf driverTrent Piepho2007-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (5362): Dvb-pll: add code for doing tuner initializationTrent Piepho2007-04-271-0/+39
| | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (5360): Dvb-pll: Use sizeof() to get name lengthTrent Piepho2007-04-271-1/+2
| | | | | | | | 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>
* V4L/DVB (4868): Dvb-pll: return frequency set by dvb_pll_configure()Michael Krufky2006-12-101-30/+14
| | | | | | | | | | | | | 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>
* V4L/DVB (4867): Whitespace cleanupMichael Krufky2006-12-101-13/+29
| | | | | | | | - 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>
* V4L/DVB (4847): Drivers/media/dvb/frontends: kfree() cleanupsMichael Krufky2006-12-101-2/+1
| | | | | | | | 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>
* V4L/DVB (4436): Dvb-pll support for MT352/ZL10353 based tuners.Chris Pascoe2006-09-261-0/+3
| | | | | | | | | | | | | | | | | | 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>
* V4L/DVB (4386): Convert DVB devices to use dvb_attach()Andrew de Quincey2006-09-261-4/+4
| | | | | | | | | | 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>
* V4L/DVB (4322): Fix dvb-pll autoprobingAndrew de Quincey2006-07-291-4/+3
| | | | | | | | | 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>
OpenPOWER on IntegriCloud