aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-dvb.c
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2006-08-07 13:03:32 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 08:03:11 -0400
commit5eda227fc622799a543dd7606f1037e89cd9e21b (patch)
tree68d4996bfc682beffe331af58bc5d5f9293dd92f /drivers/media/video/saa7134/saa7134-dvb.c
parent19e22576d29cadaba88f08fb958f4fcf0de9b16c (diff)
V4L/DVB (4307): Added support for the md8800 quadro board
Analog TV, CVBS, S-video and DVB-T are working, DVB-S not yet Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-dvb.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 279828b8f299..2ffa5b5790ae 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -969,6 +969,51 @@ static struct tda1004x_config tevion_dvbt220rf_config = {
969 .request_firmware = NULL, 969 .request_firmware = NULL,
970}; 970};
971 971
972/* ------------------------------------------------------------------ */
973
974static int md8800_dvbt_analog_mode(struct dvb_frontend *fe)
975{
976 struct saa7134_dev *dev = fe->dvb->priv;
977 static u8 data[] = { 0x3c, 0x33, 0x68};
978 struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
979
980 i2c_transfer(&dev->i2c_adap, &msg, 1);
981 philips_tda827xa_tuner_sleep( 0x61, fe);
982 return 0;
983}
984
985static int md8800_dvbt_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
986{
987 int ret;
988 struct saa7134_dev *dev = fe->dvb->priv;
989 static u8 tda8290_close[] = { 0x21, 0xc0};
990 static u8 tda8290_open[] = { 0x21, 0x80};
991 struct i2c_msg tda8290_msg = {.addr = 0x4b,.flags = 0, .len = 2};
992 /* close tda8290 i2c bridge */
993 tda8290_msg.buf = tda8290_close;
994 ret = i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1);
995 if (ret != 1)
996 return -EIO;
997 msleep(20);
998 ret = philips_tda827xa_pll_set(0x60, fe, params);
999 if (ret != 0)
1000 return ret;
1001 /* open tda8290 i2c bridge */
1002 tda8290_msg.buf = tda8290_open;
1003 i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1);
1004 return ret;
1005}
1006
1007static struct tda1004x_config md8800_dvbt_config = {
1008 .demod_address = 0x08,
1009 .invert = 1,
1010 .invert_oclk = 0,
1011 .xtal_freq = TDA10046_XTAL_16M,
1012 .agc_config = TDA10046_AGC_TDA827X,
1013 .if_freq = TDA10046_FREQ_045,
1014 .request_firmware = NULL,
1015};
1016
972#endif 1017#endif
973 1018
974/* ------------------------------------------------------------------ */ 1019/* ------------------------------------------------------------------ */
@@ -1153,6 +1198,15 @@ static int dvb_init(struct saa7134_dev *dev)
1153 dev->dvb.frontend->ops.tuner_ops.set_params = ads_duo_tuner_set_params; 1198 dev->dvb.frontend->ops.tuner_ops.set_params = ads_duo_tuner_set_params;
1154 } 1199 }
1155 break; 1200 break;
1201 case SAA7134_BOARD_MEDION_MD8800_QUADRO:
1202 dev->dvb.frontend = tda10046_attach(&md8800_dvbt_config,
1203 &dev->i2c_adap);
1204 if (dev->dvb.frontend) {
1205 dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
1206 dev->dvb.frontend->ops.tuner_ops.sleep = md8800_dvbt_analog_mode;
1207 dev->dvb.frontend->ops.tuner_ops.set_params = md8800_dvbt_pll_set;
1208 }
1209 break;
1156#endif 1210#endif
1157#ifdef HAVE_NXT200X 1211#ifdef HAVE_NXT200X
1158 case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: 1212 case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: