diff options
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-dvb.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 706450c27a57..098d8a6a0813 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -336,7 +336,7 @@ static struct tda1004x_config philips_tu1216_61_config = { | |||
336 | 336 | ||
337 | /* ------------------------------------------------------------------ */ | 337 | /* ------------------------------------------------------------------ */ |
338 | 338 | ||
339 | static int philips_europa_tuner_init(struct dvb_frontend *fe) | 339 | static int philips_td1316_tuner_init(struct dvb_frontend *fe) |
340 | { | 340 | { |
341 | struct saa7134_dev *dev = fe->dvb->priv; | 341 | struct saa7134_dev *dev = fe->dvb->priv; |
342 | static u8 msg[] = { 0x0b, 0xf5, 0x86, 0xab }; | 342 | static u8 msg[] = { 0x0b, 0xf5, 0x86, 0xab }; |
@@ -347,18 +347,8 @@ static int philips_europa_tuner_init(struct dvb_frontend *fe) | |||
347 | fe->ops.i2c_gate_ctrl(fe, 1); | 347 | fe->ops.i2c_gate_ctrl(fe, 1); |
348 | if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) | 348 | if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) |
349 | return -EIO; | 349 | return -EIO; |
350 | msleep(1); | ||
351 | |||
352 | /* switch the board to dvb mode */ | ||
353 | init_msg.addr = 0x43; | ||
354 | init_msg.len = 0x02; | ||
355 | msg[0] = 0x00; | ||
356 | msg[1] = 0x40; | ||
357 | if (fe->ops.i2c_gate_ctrl) | 350 | if (fe->ops.i2c_gate_ctrl) |
358 | fe->ops.i2c_gate_ctrl(fe, 1); | 351 | fe->ops.i2c_gate_ctrl(fe, 0); |
359 | if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) | ||
360 | return -EIO; | ||
361 | |||
362 | return 0; | 352 | return 0; |
363 | } | 353 | } |
364 | 354 | ||
@@ -367,6 +357,22 @@ static int philips_td1316_tuner_set_params(struct dvb_frontend *fe, struct dvb_f | |||
367 | return philips_tda6651_pll_set(0x61, fe, params); | 357 | return philips_tda6651_pll_set(0x61, fe, params); |
368 | } | 358 | } |
369 | 359 | ||
360 | static int philips_europa_tuner_init(struct dvb_frontend *fe) | ||
361 | { | ||
362 | struct saa7134_dev *dev = fe->dvb->priv; | ||
363 | static u8 msg[] = { 0x00, 0x40}; | ||
364 | struct i2c_msg init_msg = {.addr = 0x43,.flags = 0,.buf = msg,.len = sizeof(msg) }; | ||
365 | |||
366 | |||
367 | if (philips_td1316_tuner_init(fe)) | ||
368 | return -EIO; | ||
369 | msleep(1); | ||
370 | if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) | ||
371 | return -EIO; | ||
372 | |||
373 | return 0; | ||
374 | } | ||
375 | |||
370 | static int philips_europa_tuner_sleep(struct dvb_frontend *fe) | 376 | static int philips_europa_tuner_sleep(struct dvb_frontend *fe) |
371 | { | 377 | { |
372 | struct saa7134_dev *dev = fe->dvb->priv; | 378 | struct saa7134_dev *dev = fe->dvb->priv; |
@@ -1324,7 +1330,15 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1324 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params; | 1330 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params; |
1325 | } | 1331 | } |
1326 | break; | 1332 | break; |
1327 | 1333 | case SAA7134_BOARD_VIDEOMATE_DVBT_200A: | |
1334 | dev->dvb.frontend = dvb_attach(tda10046_attach, | ||
1335 | &philips_europa_config, | ||
1336 | &dev->i2c_adap); | ||
1337 | if (dev->dvb.frontend) { | ||
1338 | dev->dvb.frontend->ops.tuner_ops.init = philips_td1316_tuner_init; | ||
1339 | dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; | ||
1340 | } | ||
1341 | break; | ||
1328 | default: | 1342 | default: |
1329 | printk("%s: Huh? unknown DVB card?\n",dev->name); | 1343 | printk("%s: Huh? unknown DVB card?\n",dev->name); |
1330 | break; | 1344 | break; |