summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends/dvb-pll.c
AgeCommit message (Collapse)Author
2009-06-11dvb-pll: Add support for Alps TDEE4 DVB-C NIMTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-06-11dvb-pll: Add support for Samsung TBMU24112 DVB-S NIMTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-06-11dvb-pll: Add support for Samsung TBDU18132 DVB-S NIMTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2009-06-11dvb-pll: Add Samsung TDTC9251DH0 DVB-T NIMTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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. Priority: normal Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-07-03FIX: fix a bug in the charge pump settingManu Abraham
From: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Manu Abraham <manu@linuxtv.org>
2008-05-18DVB-PLL: add Samsung DTOS403IH102A tunerAntti Palosaari
From: Antti Palosaari <crope@iki.fi> - add Samsung DTOS403IH102A tuner Signed-off-by: Antti Palosaari <crope@iki.fi>
2008-03-24dvb-pll: remove rf input module optionsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2008-03-22dvb-pll: remove dead codeMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2008-02-17dvb-pll: remove support for Philips TUV1236DMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-17dvb-pll: remove support for Philips TD1316Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-17dvb-pll: remove support for Philips FMD1216MEMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-17dvb-pll: remove support for LG TDVS-H06xFMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-10dvb-pll: remove support for Philips FCV1236DMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-10dvb-pll: remove support for Thomson FE6600Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-10dvb-pll: remove support for Microtune 4042 FI5Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-10dvb-pll: remove support for Thomson dtt761xMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-02-10dvb-pll: remove support for Thomson dtt7610Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-01-27[PATCH] static memoryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2007-09-09dvb-pll: report whether input rf will be autoselected or set via insmod optionMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-09-09dvb-pll: always show pll name if forced via insmod optionMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-09-07dvb-pll: add module option to force dvb-pll desc id (for debug use only)Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-09-09dvb-pll: increase DVB_PLL_MAX to 64Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-09-07dvb-pll: add module option to specify rf inputMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-09-07dvb-pll: store instance ID in dvb_pll_priv structureMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-09-07dvb-pll: pass fe pointer into dvb_pll_configure() and set() functionsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-08-16compat: Add missing compat.hTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> dvb_ca_en50221.c and dvb-pll.c were missing compat.h, and they used kzalloc which is something that compat.h takes care of. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-08-11dvb-pll: Set minimum and maximum frequency properlyTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The tuner maximum frequency wasn't being set, while the minimum frequency was set to what the maximum should have been. The recent patch to enforce the limits effectively broken any tuner using dvb-pll. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-07-29dvb-pll: make struct dvb_pll_fcv1236d staticMichael Krufky
From: Adrian Bunk <bunk@stusta.de> 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>
2007-07-01unexport dvb_pll_configureMichael Krufky
From: Adrian Bunk <bunk@stusta.de> 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>
2006-10-13dvb-pll: add support for Philips fcv1236dMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-06-12dvb: Remove static dependencies on dvb-pllMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-06-02dvb-pll digitv dvb-usb: Eliminate last user of dvb_pll_configureTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-05-09dibusb-mb: convert pll handling to properly use dvb-pllMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-05-08Integrate all users of the fmd1216 tuner with dvb-pllTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-05-05tuv1236d: move rf input switching code into dvb-pllMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-05-05dvb-pll: pass dvb_frontend_parameters to generic set() functionMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2007-04-19Add support for Opera S1- DVB-USBMauro Carvalho Chehab
From: Marco Gittler <g.marco@freenet.de> 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-03-18dvb-pll: Replace sleep function with a more capable oneTrent Piepho
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>
2007-03-18dvb-pll: Move IF frequency from per-band data to per-tuner dataTrent Piepho
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. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Acked-by: Michael Krufky <mkrufky@linuxtv.org>
2007-03-18dvb-pll: Adjust rounding to be consistentTrent Piepho
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>
2007-02-27dvb: Remove lgh06xf driverTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-02-27dvb-pll: add code for doing tuner initializationTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2007-02-27dvb-pll: Use sizeof() to get name lengthTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> 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>
2006-11-20dvb-pll: return frequency set by dvb_pll_configure()Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> 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>
2006-11-20whitespace cleanupMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> - adhere to 80-column limit - replace some spaces with tabs Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-11-19drivers/media/dvb/frontends: kfree() cleanupsMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> We don't have to check for NULL before kfree() Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-08-06dvb-pll support for MT352/ZL10353 based tuners.Chris Pascoe
From: Chris Pascoe <c.pascoe@itee.uq.edu.au> 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. Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
2006-07-28Convert DVB devices to use dvb_attach()Andrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> 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>
2006-07-18Fix dvb-pll autoprobingAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> 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>
2006-07-16Fix possible dvb-pll oopsAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> 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>