diff options
author | Michael Krufky <mkrufky@m1k.net> | 2005-11-09 00:35:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:03 -0500 |
commit | c0b11b914de27e0e82b5311cf9b498a1b008b591 (patch) | |
tree | 3eb9ff604ca727f5a86d3b592a01c528b99de454 /drivers/media/dvb/b2c2/flexcop-fe-tuner.c | |
parent | f7b67195ea571b8540ac79daf27f5932ec40c098 (diff) |
[PATCH] dvb: Add support for Air2PC/AirStar 2 ATSC 3rd generation (HD5000)
Added support for Air2PC/AirStar 2 ATSC 3rd generation (HD5000)
Signed-off-by: Taylor Jacob <rtjacob@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Cc: 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/b2c2/flexcop-fe-tuner.c')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-fe-tuner.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c index bf5651b98bbb..a35330315f65 100644 --- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c +++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include "bcm3510.h" | 13 | #include "bcm3510.h" |
14 | #include "stv0297.h" | 14 | #include "stv0297.h" |
15 | #include "mt312.h" | 15 | #include "mt312.h" |
16 | #include "lgdt330x.h" | ||
17 | #include "dvb-pll.h" | ||
16 | 18 | ||
17 | /* lnb control */ | 19 | /* lnb control */ |
18 | 20 | ||
@@ -295,6 +297,52 @@ static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct fir | |||
295 | return request_firmware(fw, name, fc->dev); | 297 | return request_firmware(fw, name, fc->dev); |
296 | } | 298 | } |
297 | 299 | ||
300 | static int lgdt3303_pll_set(struct dvb_frontend* fe, | ||
301 | struct dvb_frontend_parameters* params) | ||
302 | { | ||
303 | struct flexcop_device *fc = fe->dvb->priv; | ||
304 | u8 buf[4]; | ||
305 | struct i2c_msg msg = | ||
306 | { .addr = 0x61, .flags = 0, .buf = buf, .len = 4 }; | ||
307 | int err; | ||
308 | |||
309 | dvb_pll_configure(&dvb_pll_tdvs_tua6034,buf, params->frequency, 0); | ||
310 | dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", | ||
311 | __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); | ||
312 | if ((err = i2c_transfer(&fc->i2c_adap, &msg, 1)) != 1) { | ||
313 | printk(KERN_WARNING "lgdt3303: %s error " | ||
314 | "(addr %02x <- %02x, err = %i)\n", | ||
315 | __FUNCTION__, buf[0], buf[1], err); | ||
316 | if (err < 0) | ||
317 | return err; | ||
318 | else | ||
319 | return -EREMOTEIO; | ||
320 | } | ||
321 | |||
322 | buf[0] = 0x86 | 0x18; | ||
323 | buf[1] = 0x50; | ||
324 | msg.len = 2; | ||
325 | if ((err = i2c_transfer(&fc->i2c_adap, &msg, 1)) != 1) { | ||
326 | printk(KERN_WARNING "lgdt3303: %s error " | ||
327 | "(addr %02x <- %02x, err = %i)\n", | ||
328 | __FUNCTION__, buf[0], buf[1], err); | ||
329 | if (err < 0) | ||
330 | return err; | ||
331 | else | ||
332 | return -EREMOTEIO; | ||
333 | } | ||
334 | |||
335 | return 0; | ||
336 | } | ||
337 | |||
338 | static struct lgdt330x_config air2pc_atsc_hd5000_config = { | ||
339 | .demod_address = 0x59, | ||
340 | .demod_chip = LGDT3303, | ||
341 | .serial_mpeg = 0x04, | ||
342 | .pll_set = lgdt3303_pll_set, | ||
343 | .clock_polarity_flip = 1, | ||
344 | }; | ||
345 | |||
298 | static struct nxt2002_config samsung_tbmv_config = { | 346 | static struct nxt2002_config samsung_tbmv_config = { |
299 | .demod_address = 0x0a, | 347 | .demod_address = 0x0a, |
300 | .request_firmware = flexcop_fe_request_firmware, | 348 | .request_firmware = flexcop_fe_request_firmware, |
@@ -457,6 +505,11 @@ int flexcop_frontend_init(struct flexcop_device *fc) | |||
457 | fc->dev_type = FC_AIR_ATSC2; | 505 | fc->dev_type = FC_AIR_ATSC2; |
458 | info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address); | 506 | info("found the nxt2002 at i2c address: 0x%02x",samsung_tbmv_config.demod_address); |
459 | } else | 507 | } else |
508 | /* try the air atsc 3nd generation (lgdt3303) */ | ||
509 | if ((fc->fe = lgdt330x_attach(&air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) { | ||
510 | fc->dev_type = FC_AIR_ATSC3; | ||
511 | info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address); | ||
512 | } else | ||
460 | /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */ | 513 | /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */ |
461 | if ((fc->fe = bcm3510_attach(&air2pc_atsc_first_gen_config, &fc->i2c_adap)) != NULL) { | 514 | if ((fc->fe = bcm3510_attach(&air2pc_atsc_first_gen_config, &fc->i2c_adap)) != NULL) { |
462 | fc->dev_type = FC_AIR_ATSC1; | 515 | fc->dev_type = FC_AIR_ATSC1; |