aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-dvb.c
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2006-11-15 19:31:54 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-12-10 05:51:27 -0500
commit550a9a5e5f8086ae410832f134a5d80b9bd7fdb6 (patch)
treeb8475cb1eeed049dd6b6cafa1cdf5dfb9fcc1521 /drivers/media/video/saa7134/saa7134-dvb.c
parentab33668f8e1bd686ebc87d51be3a0cf99a267a9f (diff)
V4L/DVB (4835): Added support for the Terratec Cinergy HT PCMCIA module
This is a hybrid cardbus module. Besides the card support, i modified the definition names for AGC and GPIO of the tda10046. 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.c63
1 files changed, 54 insertions, 9 deletions
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index a51264f636fd..ce888f704956 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -677,7 +677,7 @@ static struct tda1004x_config tda827x_lifeview_config = {
677 .invert = 1, 677 .invert = 1,
678 .invert_oclk = 0, 678 .invert_oclk = 0,
679 .xtal_freq = TDA10046_XTAL_16M, 679 .xtal_freq = TDA10046_XTAL_16M,
680 .agc_config = TDA10046_AGC_TDA827X, 680 .agc_config = TDA10046_AGC_TDA827X_GP11,
681 .if_freq = TDA10046_FREQ_045, 681 .if_freq = TDA10046_FREQ_045,
682 .request_firmware = NULL, 682 .request_firmware = NULL,
683}; 683};
@@ -881,7 +881,40 @@ static struct tda1004x_config philips_tiger_config = {
881 .invert = 1, 881 .invert = 1,
882 .invert_oclk = 0, 882 .invert_oclk = 0,
883 .xtal_freq = TDA10046_XTAL_16M, 883 .xtal_freq = TDA10046_XTAL_16M,
884 .agc_config = TDA10046_AGC_TDA827X, 884 .agc_config = TDA10046_AGC_TDA827X_GP11,
885 .if_freq = TDA10046_FREQ_045,
886 .request_firmware = NULL,
887};
888/* ------------------------------------------------------------------ */
889
890static int cinergy_ht_tuner_init(struct dvb_frontend *fe)
891{
892 struct saa7134_dev *dev = fe->dvb->priv;
893 static u8 data[] = { 0x3c, 0x33, 0x62};
894 struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
895
896 if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1)
897 return -EIO;
898 return 0;
899}
900
901static int cinergy_ht_tuner_sleep(struct dvb_frontend *fe)
902{
903 struct saa7134_dev *dev = fe->dvb->priv;
904 static u8 data[] = { 0x3c, 0x33, 0x60};
905 struct i2c_msg msg = {.addr=0x08, .flags=0, .buf=data, .len = sizeof(data)};
906
907 i2c_transfer(&dev->i2c_adap, &msg, 1);
908 philips_tda827xa_tuner_sleep( 0x61, fe);
909 return 0;
910}
911
912static struct tda1004x_config cinergy_ht_config = {
913 .demod_address = 0x08,
914 .invert = 1,
915 .invert_oclk = 0,
916 .xtal_freq = TDA10046_XTAL_16M,
917 .agc_config = TDA10046_AGC_TDA827X_GP01,
885 .if_freq = TDA10046_FREQ_045, 918 .if_freq = TDA10046_FREQ_045,
886 .request_firmware = NULL, 919 .request_firmware = NULL,
887}; 920};
@@ -893,7 +926,7 @@ static struct tda1004x_config pinnacle_pctv_310i_config = {
893 .invert = 1, 926 .invert = 1,
894 .invert_oclk = 0, 927 .invert_oclk = 0,
895 .xtal_freq = TDA10046_XTAL_16M, 928 .xtal_freq = TDA10046_XTAL_16M,
896 .agc_config = TDA10046_AGC_TDA827X, 929 .agc_config = TDA10046_AGC_TDA827X_GP11,
897 .if_freq = TDA10046_FREQ_045, 930 .if_freq = TDA10046_FREQ_045,
898 .request_firmware = philips_tda1004x_request_firmware, 931 .request_firmware = philips_tda1004x_request_firmware,
899}; 932};
@@ -905,7 +938,7 @@ static struct tda1004x_config hauppauge_hvr_1110_config = {
905 .invert = 1, 938 .invert = 1,
906 .invert_oclk = 0, 939 .invert_oclk = 0,
907 .xtal_freq = TDA10046_XTAL_16M, 940 .xtal_freq = TDA10046_XTAL_16M,
908 .agc_config = TDA10046_AGC_TDA827X, 941 .agc_config = TDA10046_AGC_TDA827X_GP11,
909 .if_freq = TDA10046_FREQ_045, 942 .if_freq = TDA10046_FREQ_045,
910 .request_firmware = philips_tda1004x_request_firmware, 943 .request_firmware = philips_tda1004x_request_firmware,
911}; 944};
@@ -917,7 +950,7 @@ static struct tda1004x_config asus_p7131_dual_config = {
917 .invert = 1, 950 .invert = 1,
918 .invert_oclk = 0, 951 .invert_oclk = 0,
919 .xtal_freq = TDA10046_XTAL_16M, 952 .xtal_freq = TDA10046_XTAL_16M,
920 .agc_config = TDA10046_AGC_TDA827X, 953 .agc_config = TDA10046_AGC_TDA827X_GP11,
921 .if_freq = TDA10046_FREQ_045, 954 .if_freq = TDA10046_FREQ_045,
922 .request_firmware = philips_tda1004x_request_firmware, 955 .request_firmware = philips_tda1004x_request_firmware,
923}; 956};
@@ -969,7 +1002,7 @@ static struct tda1004x_config lifeview_trio_config = {
969 .invert = 1, 1002 .invert = 1,
970 .invert_oclk = 0, 1003 .invert_oclk = 0,
971 .xtal_freq = TDA10046_XTAL_16M, 1004 .xtal_freq = TDA10046_XTAL_16M,
972 .agc_config = TDA10046_AGC_TDA827X_GPL, 1005 .agc_config = TDA10046_AGC_TDA827X_GP00,
973 .if_freq = TDA10046_FREQ_045, 1006 .if_freq = TDA10046_FREQ_045,
974 .request_firmware = NULL, 1007 .request_firmware = NULL,
975}; 1008};
@@ -1006,7 +1039,7 @@ static struct tda1004x_config ads_tech_duo_config = {
1006 .invert = 1, 1039 .invert = 1,
1007 .invert_oclk = 0, 1040 .invert_oclk = 0,
1008 .xtal_freq = TDA10046_XTAL_16M, 1041 .xtal_freq = TDA10046_XTAL_16M,
1009 .agc_config = TDA10046_AGC_TDA827X_GPL, 1042 .agc_config = TDA10046_AGC_TDA827X_GP00,
1010 .if_freq = TDA10046_FREQ_045, 1043 .if_freq = TDA10046_FREQ_045,
1011 .request_firmware = NULL, 1044 .request_firmware = NULL,
1012}; 1045};
@@ -1031,7 +1064,7 @@ static struct tda1004x_config tevion_dvbt220rf_config = {
1031 .invert = 1, 1064 .invert = 1,
1032 .invert_oclk = 0, 1065 .invert_oclk = 0,
1033 .xtal_freq = TDA10046_XTAL_16M, 1066 .xtal_freq = TDA10046_XTAL_16M,
1034 .agc_config = TDA10046_AGC_TDA827X, 1067 .agc_config = TDA10046_AGC_TDA827X_GP11,
1035 .if_freq = TDA10046_FREQ_045, 1068 .if_freq = TDA10046_FREQ_045,
1036 .request_firmware = NULL, 1069 .request_firmware = NULL,
1037}; 1070};
@@ -1076,7 +1109,7 @@ static struct tda1004x_config md8800_dvbt_config = {
1076 .invert = 1, 1109 .invert = 1,
1077 .invert_oclk = 0, 1110 .invert_oclk = 0,
1078 .xtal_freq = TDA10046_XTAL_16M, 1111 .xtal_freq = TDA10046_XTAL_16M,
1079 .agc_config = TDA10046_AGC_TDA827X, 1112 .agc_config = TDA10046_AGC_TDA827X_GP11,
1080 .if_freq = TDA10046_FREQ_045, 1113 .if_freq = TDA10046_FREQ_045,
1081 .request_firmware = NULL, 1114 .request_firmware = NULL,
1082}; 1115};
@@ -1362,6 +1395,18 @@ static int dvb_init(struct saa7134_dev *dev)
1362 dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; 1395 dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params;
1363 } 1396 }
1364 break; 1397 break;
1398 case SAA7134_BOARD_CINERGY_HT_PCMCIA:
1399 dev->dvb.frontend = dvb_attach(tda10046_attach,
1400 &cinergy_ht_config,
1401 &dev->i2c_adap);
1402 if (dev->dvb.frontend) {
1403 dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
1404 dev->dvb.frontend->ops.tuner_ops.init = cinergy_ht_tuner_init;
1405 dev->dvb.frontend->ops.tuner_ops.sleep = cinergy_ht_tuner_sleep;
1406 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
1407
1408 }
1409 break;
1365 default: 1410 default:
1366 printk("%s: Huh? unknown DVB card?\n",dev->name); 1411 printk("%s: Huh? unknown DVB card?\n",dev->name);
1367 break; 1412 break;