aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dvb-pll.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2005-07-07 20:58:09 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:59 -0400
commit49dc82fdac3866e6ce9c978df80cedfb735d740c (patch)
tree9dd4c78e9b616577ff99a475a2f50af392f8b923 /drivers/media/dvb/frontends/dvb-pll.c
parent7f5fee57812c99c95edf6794a50413c75e99fd4d (diff)
[PATCH] dvb: frontend: add FMD1216ME PLL
o change dvb-pll desc to take the frequency as parameter for setbw-callback into consideration o added dvb-pll desc for Philips FMD1216ME (needed for cxusb) Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/dvb/frontends/dvb-pll.c')
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c
index f73b5f48e235..818526869804 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -55,7 +55,7 @@ struct dvb_pll_desc dvb_pll_thomson_dtt7610 = {
55}; 55};
56EXPORT_SYMBOL(dvb_pll_thomson_dtt7610); 56EXPORT_SYMBOL(dvb_pll_thomson_dtt7610);
57 57
58static void thomson_dtt759x_bw(u8 *buf, int bandwidth) 58static void thomson_dtt759x_bw(u8 *buf, u32 freq, int bandwidth)
59{ 59{
60 if (BANDWIDTH_7_MHZ == bandwidth) 60 if (BANDWIDTH_7_MHZ == bandwidth)
61 buf[3] |= 0x10; 61 buf[3] |= 0x10;
@@ -146,7 +146,7 @@ EXPORT_SYMBOL(dvb_pll_env57h1xd5);
146/* Philips TDA6650/TDA6651 146/* Philips TDA6650/TDA6651
147 * used in Panasonic ENV77H11D5 147 * used in Panasonic ENV77H11D5
148 */ 148 */
149static void tda665x_bw(u8 *buf, int bandwidth) 149static void tda665x_bw(u8 *buf, u32 freq, int bandwidth)
150{ 150{
151 if (bandwidth == BANDWIDTH_8_MHZ) 151 if (bandwidth == BANDWIDTH_8_MHZ)
152 buf[3] |= 0x08; 152 buf[3] |= 0x08;
@@ -178,7 +178,7 @@ EXPORT_SYMBOL(dvb_pll_tda665x);
178/* Infineon TUA6034 178/* Infineon TUA6034
179 * used in LG TDTP E102P 179 * used in LG TDTP E102P
180 */ 180 */
181static void tua6034_bw(u8 *buf, int bandwidth) 181static void tua6034_bw(u8 *buf, u32 freq, int bandwidth)
182{ 182{
183 if (BANDWIDTH_7_MHZ != bandwidth) 183 if (BANDWIDTH_7_MHZ != bandwidth)
184 buf[3] |= 0x08; 184 buf[3] |= 0x08;
@@ -198,6 +198,33 @@ struct dvb_pll_desc dvb_pll_tua6034 = {
198}; 198};
199EXPORT_SYMBOL(dvb_pll_tua6034); 199EXPORT_SYMBOL(dvb_pll_tua6034);
200 200
201/* Philips FMD1216ME
202 * used in Medion Hybrid PCMCIA card and USB Box
203 */
204static void fmd1216me_bw(u8 *buf, u32 freq, int bandwidth)
205{
206 if (bandwidth == BANDWIDTH_8_MHZ && freq >= 158870000)
207 buf[3] |= 0x08;
208}
209
210struct dvb_pll_desc dvb_pll_fmd1216me = {
211 .name = "placeholder",
212 .min = 50870000,
213 .max = 858000000,
214 .setbw = fmd1216me_bw,
215 .count = 7,
216 .entries = {
217 { 143870000, 36213333, 166667, 0xbc, 0x41 },
218 { 158870000, 36213333, 166667, 0xf4, 0x41 },
219 { 329870000, 36213333, 166667, 0xbc, 0x42 },
220 { 441870000, 36213333, 166667, 0xf4, 0x42 },
221 { 625870000, 36213333, 166667, 0xbc, 0x44 },
222 { 803870000, 36213333, 166667, 0xf4, 0x44 },
223 { 999999999, 36213333, 166667, 0xfc, 0x44 },
224 }
225};
226EXPORT_SYMBOL(dvb_pll_fmd1216me);
227
201/* ----------------------------------------------------------- */ 228/* ----------------------------------------------------------- */
202/* code */ 229/* code */
203 230
@@ -231,7 +258,7 @@ int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf,
231 buf[3] = desc->entries[i].cb2; 258 buf[3] = desc->entries[i].cb2;
232 259
233 if (desc->setbw) 260 if (desc->setbw)
234 desc->setbw(buf, bandwidth); 261 desc->setbw(buf, freq, bandwidth);
235 262
236 if (debug) 263 if (debug)
237 printk("pll: %s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n", 264 printk("pll: %s: div=%d | buf=0x%02x,0x%02x,0x%02x,0x%02x\n",