From abd757d0632ef14ecb2ca1ed27e16f54e982bd91 Mon Sep 17 00:00:00 2001 From: Hartmut Hackmann Date: Tue, 31 Jan 2006 01:49:13 +0200 Subject: Updated Avermedia 777 DVB-T to use dvb-pll From: Jose Alberto Reguero linux/drivers/media/dvb/frontends/dvb-pll.c linux/drivers/media/dvb/frontends/dvb-pll.h - added td1316 tuner linux/drivers/media/video/saa7134/saa7134-dvb.c - changed tuning code for AverTV 777 to use dvb-pll Signed-off-by: Jose Alberto Reguero Signed-off-by: Hartmut Hackmann --- linux/drivers/media/dvb/frontends/dvb-pll.c | 42 +++++++++++++++++++++++++++++ linux/drivers/media/dvb/frontends/dvb-pll.h | 1 + 2 files changed, 43 insertions(+) (limited to 'linux/drivers/media/dvb') diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.c b/linux/drivers/media/dvb/frontends/dvb-pll.c index cd8f28275..2cab96e1c 100644 --- a/linux/drivers/media/dvb/frontends/dvb-pll.c +++ b/linux/drivers/media/dvb/frontends/dvb-pll.c @@ -362,6 +362,48 @@ struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = { }; EXPORT_SYMBOL(dvb_pll_philips_sd1878_tda8261); +/* + * Philips TD1316 Tuner. + */ +static void td1316_bw(u8 *buf, u32 freq, int bandwidth) +{ + u8 band; + + /* determine band */ + if (freq < 161000000) + band = 1; + else if (freq < 444000000) + band = 2; + else + band = 4; + + buf[3] |= band; + + /* setup PLL filter */ + if (bandwidth == BANDWIDTH_8_MHZ) + buf[3] |= 1 << 3; +} + +struct dvb_pll_desc dvb_pll_philips_td1316 = { + .name = "Philips TD1316", + .min = 87000000, + .max = 895000000, + .setbw = td1316_bw, + .count = 9, + .entries = { + { 130000000, 36166000, 166666, 0xca, 0x60}, + { 160000000, 36166000, 166666, 0xca, 0xa0}, + { 200000000, 36166000, 166666, 0xca, 0xc0}, + { 290000000, 36166000, 166666, 0xca, 0x60}, + { 420000000, 36166000, 166666, 0xca, 0xa0}, + { 480000000, 36166000, 166666, 0xca, 0xc0}, + { 620000000, 36166000, 166666, 0xca, 0x60}, + { 830000000, 36166000, 166666, 0xca, 0xa0}, + { 895000000, 36166000, 166666, 0xca, 0xe0}, + }, +}; +EXPORT_SYMBOL(dvb_pll_philips_td1316); + /* ----------------------------------------------------------- */ /* code */ diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.h b/linux/drivers/media/dvb/frontends/dvb-pll.h index 872e3b4c1..56c3cd76a 100644 --- a/linux/drivers/media/dvb/frontends/dvb-pll.h +++ b/linux/drivers/media/dvb/frontends/dvb-pll.h @@ -40,6 +40,7 @@ extern struct dvb_pll_desc dvb_pll_tuv1236d; extern struct dvb_pll_desc dvb_pll_tdhu2; extern struct dvb_pll_desc dvb_pll_samsung_tbmv; extern struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261; +extern struct dvb_pll_desc dvb_pll_philips_td1316; int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf, u32 freq, int bandwidth); -- cgit v1.2.3