Commit 1963c907 authored by Michael Krufky's avatar Michael Krufky Committed by Linus Torvalds

[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: default avatarMac Michaels <wmichaels1@earthlink.net>
Signed-off-by: default avatarMichael Krufky <mkrufky@m1k.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 66aea23f
......@@ -225,6 +225,22 @@ struct dvb_pll_desc dvb_pll_tua6034 = {
};
EXPORT_SYMBOL(dvb_pll_tua6034);
/* Infineon TUA6034
* used in LG Innotek TDVS-H062F
*/
struct dvb_pll_desc dvb_pll_tdvs_tua6034 = {
.name = "LG/Infineon TUA6034",
.min = 54000000,
.max = 863000000,
.count = 3,
.entries = {
{ 160000000, 44000000, 62500, 0xce, 0x01 },
{ 455000000, 44000000, 62500, 0xce, 0x02 },
{ 999999999, 44000000, 62500, 0xce, 0x04 },
},
};
EXPORT_SYMBOL(dvb_pll_tdvs_tua6034);
/* Philips FMD1216ME
* used in Medion Hybrid PCMCIA card and USB Box
*/
......
......@@ -31,6 +31,7 @@ extern struct dvb_pll_desc dvb_pll_unknown_1;
extern struct dvb_pll_desc dvb_pll_tua6010xs;
extern struct dvb_pll_desc dvb_pll_env57h1xd5;
extern struct dvb_pll_desc dvb_pll_tua6034;
extern struct dvb_pll_desc dvb_pll_tdvs_tua6034;
extern struct dvb_pll_desc dvb_pll_tda665x;
extern struct dvb_pll_desc dvb_pll_fmd1216me;
extern struct dvb_pll_desc dvb_pll_tded4;
......
This diff is collapsed.
/*
* Support for LGDT3302 & LGDT3303 (DViCO FustionHDTV Gold) - VSB/QAM
* Support for LGDT3302 and LGDT3303 - VSB/QAM
*
* Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net>
*
......@@ -24,14 +24,26 @@
#include <linux/dvb/frontend.h>
typedef enum lg_chip_t {
UNDEFINED,
LGDT3302,
LGDT3303
}lg_chip_type;
struct lgdt330x_config
{
/* The demodulator's i2c address */
u8 demod_address;
/* LG demodulator chip LGDT3302 or LGDT3303 */
lg_chip_type demod_chip;
/* MPEG hardware interface - 0:parallel 1:serial */
int serial_mpeg;
/* PLL interface */
int (*pll_rf_set) (struct dvb_frontend* fe, int index);
int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pll_address);
int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params);
/* Need to set device param for start_dma */
int (*set_ts_params)(struct dvb_frontend* fe, int is_punctured);
......
/*
* Support for LGDT3302 & LGDT3303 (DViCO FustionHDTV Gold) - VSB/QAM
* Support for LGDT3302 and LGDT3303 - VSB/QAM
*
* Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net>
*
......@@ -57,8 +57,10 @@ enum I2C_REG {
PH_ERR1= 0x4a,
PH_ERR2= 0x4b,
DEMUX_CONTROL= 0x66,
PACKET_ERR_COUNTER1= 0x6a,
PACKET_ERR_COUNTER2= 0x6b,
LGDT3302_PACKET_ERR_COUNTER1= 0x6a,
LGDT3302_PACKET_ERR_COUNTER2= 0x6b,
LGDT3303_PACKET_ERR_COUNTER1= 0x8b,
LGDT3303_PACKET_ERR_COUNTER2= 0x8c,
};
#endif /* _LGDT330X_PRIV_ */
......
/*
* $Id: cx88-dvb.c,v 1.54 2005/07/25 05:13:50 mkrufky Exp $
* $Id: cx88-dvb.c,v 1.58 2005/08/07 09:24:08 mkrufky Exp $
*
* device driver for Conexant 2388x based TV cards
* MPEG Transport Stream (DVB) routines
......@@ -208,14 +208,26 @@ static struct or51132_config pchdtv_hd3000 = {
#ifdef HAVE_LGDT330X
static int lgdt330x_pll_set(struct dvb_frontend* fe,
struct dvb_frontend_parameters* params,
u8* pllbuf)
struct dvb_frontend_parameters* params)
{
struct cx8802_dev *dev= fe->dvb->priv;
u8 buf[4];
struct i2c_msg msg =
{ .addr = dev->core->pll_addr, .flags = 0, .buf = buf, .len = 4 };
int err;
pllbuf[0] = dev->core->pll_addr;
dvb_pll_configure(dev->core->pll_desc, &pllbuf[1],
params->frequency, 0);
dvb_pll_configure(dev->core->pll_desc, buf, params->frequency, 0);
dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
__FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) {
printk(KERN_WARNING "cx88-dvb: %s error "
"(addr %02x <- %02x, err = %i)\n",
__FUNCTION__, buf[0], buf[1], err);
if (err < 0)
return err;
else
return -EREMOTEIO;
}
return 0;
}
......@@ -244,6 +256,8 @@ static int lgdt330x_set_ts_param(struct dvb_frontend* fe, int is_punctured)
static struct lgdt330x_config fusionhdtv_3_gold = {
.demod_address = 0x0e,
.demod_chip = LGDT3302,
.serial_mpeg = 0x04, /* TPSERIAL for 3302 in TOP_CONTROL */
.pll_set = lgdt330x_pll_set,
.set_ts_params = lgdt330x_set_ts_param,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment