aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2005-08-08 12:22:43 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-08 14:49:57 -0400
commit1963c907b21e140082d081b1c8f8c2154593c7d7 (patch)
tree71410cd2ad9f4bdab2f2466a6621ba2930f16b5f /drivers/media/video/cx88
parent66aea23ff84ca81bfaeaf7d63e248b873f5c2616 (diff)
[PATCH] dvb: lgdt330x frontend: some bug fixes & add lgdt3303 support
- Structural changes within lgdt330x driver, framework now supports both chips... tested OK on lgdt3302 and lgdt3303. - Add LG/TUA6034 dvb_pll_desc for ATSC with LG TDVS-H062F & DViCO FusionHDTV5. - Fixed LGDT330X signal strength: For now, always set it to 0. - Corrected LGDT330X boundary condition error in read_snr: dB calculation. Signed-off-by: Mac Michaels <wmichaels1@earthlink.net> Signed-off-by: Michael Krufky <mkrufky@m1k.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index ef0e9a85c359..78d223257a68 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: cx88-dvb.c,v 1.54 2005/07/25 05:13:50 mkrufky Exp $ 2 * $Id: cx88-dvb.c,v 1.58 2005/08/07 09:24:08 mkrufky Exp $
3 * 3 *
4 * device driver for Conexant 2388x based TV cards 4 * device driver for Conexant 2388x based TV cards
5 * MPEG Transport Stream (DVB) routines 5 * MPEG Transport Stream (DVB) routines
@@ -208,14 +208,26 @@ static struct or51132_config pchdtv_hd3000 = {
208 208
209#ifdef HAVE_LGDT330X 209#ifdef HAVE_LGDT330X
210static int lgdt330x_pll_set(struct dvb_frontend* fe, 210static int lgdt330x_pll_set(struct dvb_frontend* fe,
211 struct dvb_frontend_parameters* params, 211 struct dvb_frontend_parameters* params)
212 u8* pllbuf)
213{ 212{
214 struct cx8802_dev *dev= fe->dvb->priv; 213 struct cx8802_dev *dev= fe->dvb->priv;
214 u8 buf[4];
215 struct i2c_msg msg =
216 { .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 };
217 int err;
215 218
216 pllbuf[0] = dev->core->pll_addr; 219 dvb_pll_configure(dev->core->pll_desc, buf, params->frequency, 0);
217 dvb_pll_configure(dev->core->pll_desc, &pllbuf[1], 220 dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
218 params->frequency, 0); 221 __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
222 if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) {
223 printk(KERN_WARNING "cx88-dvb: %s error "
224 "(addr %02x <- %02x, err = %i)\n",
225 __FUNCTION__, buf[0], buf[1], err);
226 if (err < 0)
227 return err;
228 else
229 return -EREMOTEIO;
230 }
219 return 0; 231 return 0;
220} 232}
221 233
@@ -244,6 +256,8 @@ static int lgdt330x_set_ts_param(struct dvb_frontend* fe, int is_punctured)
244 256
245static struct lgdt330x_config fusionhdtv_3_gold = { 257static struct lgdt330x_config fusionhdtv_3_gold = {
246 .demod_address = 0x0e, 258 .demod_address = 0x0e,
259 .demod_chip = LGDT3302,
260 .serial_mpeg = 0x04, /* TPSERIAL for 3302 in TOP_CONTROL */
247 .pll_set = lgdt330x_pll_set, 261 .pll_set = lgdt330x_pll_set,
248 .set_ts_params = lgdt330x_set_ts_param, 262 .set_ts_params = lgdt330x_set_ts_param,
249}; 263};