From 27f67f86e77a354a9d98f7286b1b5fde173961b9 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Tue, 27 Feb 2007 14:43:43 -0800 Subject: dvb-pll: Fix Kconfig files and add support for making dvb-pll optional From: Trent Piepho A number of drivers selected DVB_PLL when they did not need it, and some that did need it did not select it. The DVB_PLL option is given a name and help text, so that it will show up in the config menu. DVB_PLL support can be turned on if an out-of-tree driver needs it. The standard dvb fe customization support is added to dvb-pll.h. Since all modules which select DVB_PLL do so unconditionally, it is not possible to turn dvb-pll off when an enabled module selects it, unlike most of the other frontend/tuner drivers. This is because the users of dvb-pll have static references to dvb-pll symbols other than the attach function. If these references are removed, then dvb-pll will be disablable as the other frontend/tuner drivers are. Signed-off-by: Trent Piepho --- linux/drivers/media/dvb/frontends/dvb-pll.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'linux/drivers/media/dvb/frontends/dvb-pll.h') diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.h b/linux/drivers/media/dvb/frontends/dvb-pll.h index 681186a5e..a5bd928d4 100644 --- a/linux/drivers/media/dvb/frontends/dvb-pll.h +++ b/linux/drivers/media/dvb/frontends/dvb-pll.h @@ -59,9 +59,20 @@ extern int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf, * @param desc dvb_pll_desc to use. * @return Frontend pointer on success, NULL on failure */ +#if defined(CONFIG_DVB_PLL) || (defined(CONFIG_DVB_PLL_MODULE) && defined(MODULE)) extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc); +#else +static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, + int pll_addr, + struct i2c_adapter *i2c, + struct dvb_pll_desc *desc) +{ + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); + return NULL; +} +#endif #endif -- cgit v1.2.3 From fc11e7a7cd8360f639c119c16f54be096136f7d7 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Tue, 27 Feb 2007 14:43:45 -0800 Subject: dvb-pll: add code for doing tuner initialization From: Trent Piepho 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 --- linux/drivers/media/dvb/frontends/dvb-pll.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/dvb/frontends/dvb-pll.h') diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.h b/linux/drivers/media/dvb/frontends/dvb-pll.h index a5bd928d4..bb79a7815 100644 --- a/linux/drivers/media/dvb/frontends/dvb-pll.h +++ b/linux/drivers/media/dvb/frontends/dvb-pll.h @@ -13,6 +13,7 @@ struct dvb_pll_desc { u32 min; u32 max; void (*setbw)(u8 *buf, u32 freq, int bandwidth); + u8 *initdata; int count; struct { u32 limit; -- cgit v1.2.3