aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2007-04-27 11:31:16 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:43:39 -0400
commitb8bc76d88fa7a1e4cd679fac3adfc5afeb2b3427 (patch)
tree33581554f60b7958b6528be76f8d19e849659176 /drivers/media/video/saa7134
parent1c4f76abb85918646eed5dee0b26744cc49fd1da (diff)
V4L/DVB (5322): Removed board naming code in saa7134-dvb
This is for better consistency with other drivers 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')
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c53
1 files changed, 13 insertions, 40 deletions
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 6f98ec40553c..659fd1b43c25 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -208,15 +208,6 @@ static int philips_tda1004x_request_firmware(struct dvb_frontend *fe,
208 return request_firmware(fw, name, &dev->pci->dev); 208 return request_firmware(fw, name, &dev->pci->dev);
209} 209}
210 210
211static void philips_tda1004x_set_board_name(struct dvb_frontend *fe, char *name)
212{
213 size_t len;
214
215 len = sizeof(fe->ops.info.name);
216 strncpy(fe->ops.info.name, name, len);
217 fe->ops.info.name[len - 1] = 0;
218}
219
220/* ------------------------------------------------------------------ 211/* ------------------------------------------------------------------
221 * these tuners are tu1216, td1316(a) 212 * these tuners are tu1216, td1316(a)
222 */ 213 */
@@ -695,8 +686,7 @@ static struct tda827x_config tda827x_cfg = {
695 .sleep = philips_tda827x_tuner_sleep 686 .sleep = philips_tda827x_tuner_sleep
696}; 687};
697 688
698static void configure_tda827x_fe(struct saa7134_dev *dev, struct tda1004x_config *tda_conf, 689static void configure_tda827x_fe(struct saa7134_dev *dev, struct tda1004x_config *tda_conf)
699 char *board_name)
700{ 690{
701 dev->dvb.frontend = dvb_attach(tda10046_attach, tda_conf, &dev->i2c_adap); 691 dev->dvb.frontend = dvb_attach(tda10046_attach, tda_conf, &dev->i2c_adap);
702 if (dev->dvb.frontend) { 692 if (dev->dvb.frontend) {
@@ -705,7 +695,6 @@ static void configure_tda827x_fe(struct saa7134_dev *dev, struct tda1004x_config
705 dvb_attach(tda827x_attach,dev->dvb.frontend, 695 dvb_attach(tda827x_attach,dev->dvb.frontend,
706 tda_conf->tuner_address,&dev->i2c_adap,&tda827x_cfg); 696 tda_conf->tuner_address,&dev->i2c_adap,&tda827x_cfg);
707 } 697 }
708 philips_tda1004x_set_board_name(dev->dvb.frontend, board_name);
709} 698}
710 699
711/* ------------------------------------------------------------------ */ 700/* ------------------------------------------------------------------ */
@@ -936,7 +925,6 @@ static struct nxt200x_config kworldatsc110 = {
936 925
937static int dvb_init(struct saa7134_dev *dev) 926static int dvb_init(struct saa7134_dev *dev)
938{ 927{
939 char *board_name;
940 int ret; 928 int ret;
941 /* init struct videobuf_dvb */ 929 /* init struct videobuf_dvb */
942 dev->ts.nr_bufs = 32; 930 dev->ts.nr_bufs = 32;
@@ -975,7 +963,6 @@ static int dvb_init(struct saa7134_dev *dev)
975 dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init; 963 dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init;
976 dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep; 964 dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep;
977 dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params; 965 dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params;
978 philips_tda1004x_set_board_name(dev->dvb.frontend, "DVB-T Medion MD7134");
979 } 966 }
980 break; 967 break;
981 case SAA7134_BOARD_PHILIPS_TOUGH: 968 case SAA7134_BOARD_PHILIPS_TOUGH:
@@ -985,12 +972,11 @@ static int dvb_init(struct saa7134_dev *dev)
985 if (dev->dvb.frontend) { 972 if (dev->dvb.frontend) {
986 dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_init; 973 dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_init;
987 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda6651_pll_set; 974 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda6651_pll_set;
988 philips_tda1004x_set_board_name(dev->dvb.frontend, "DVB-T Philips TOUGH");
989 } 975 }
990 break; 976 break;
991 case SAA7134_BOARD_FLYDVBTDUO: 977 case SAA7134_BOARD_FLYDVBTDUO:
992 case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: 978 case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS:
993 configure_tda827x_fe(dev, &tda827x_lifeview_config, "DVB-T Lifeview FlyDVB Duo"); 979 configure_tda827x_fe(dev, &tda827x_lifeview_config);
994 break; 980 break;
995 case SAA7134_BOARD_PHILIPS_EUROPA: 981 case SAA7134_BOARD_PHILIPS_EUROPA:
996 case SAA7134_BOARD_VIDEOMATE_DVBT_300: 982 case SAA7134_BOARD_VIDEOMATE_DVBT_300:
@@ -1003,11 +989,6 @@ static int dvb_init(struct saa7134_dev *dev)
1003 dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init; 989 dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init;
1004 dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep; 990 dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep;
1005 dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; 991 dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params;
1006 if (dev->board == SAA7134_BOARD_VIDEOMATE_DVBT_300)
1007 board_name = "DVB-T Compro VideoMate 300";
1008 else
1009 board_name = "DVB-T Philips Europa";
1010 philips_tda1004x_set_board_name(dev->dvb.frontend, board_name);
1011 } 992 }
1012 break; 993 break;
1013 case SAA7134_BOARD_VIDEOMATE_DVBT_200: 994 case SAA7134_BOARD_VIDEOMATE_DVBT_200:
@@ -1017,27 +998,26 @@ static int dvb_init(struct saa7134_dev *dev)
1017 if (dev->dvb.frontend) { 998 if (dev->dvb.frontend) {
1018 dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_init; 999 dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_init;
1019 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda6651_pll_set; 1000 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda6651_pll_set;
1020 philips_tda1004x_set_board_name(dev->dvb.frontend, "DVB-T Compro VideoMate 200");
1021 } 1001 }
1022 break; 1002 break;
1023 case SAA7134_BOARD_PHILIPS_TIGER: 1003 case SAA7134_BOARD_PHILIPS_TIGER:
1024 configure_tda827x_fe(dev, &philips_tiger_config, "DVB-T Philips Tiger"); 1004 configure_tda827x_fe(dev, &philips_tiger_config);
1025 break; 1005 break;
1026 case SAA7134_BOARD_PINNACLE_PCTV_310i: 1006 case SAA7134_BOARD_PINNACLE_PCTV_310i:
1027 configure_tda827x_fe(dev, &pinnacle_pctv_310i_config, "DVB-T Pinnacle PCTV 310i"); 1007 configure_tda827x_fe(dev, &pinnacle_pctv_310i_config);
1028 break; 1008 break;
1029 case SAA7134_BOARD_HAUPPAUGE_HVR1110: 1009 case SAA7134_BOARD_HAUPPAUGE_HVR1110:
1030 configure_tda827x_fe(dev, &hauppauge_hvr_1110_config, "DVB-T Hauppauge HVR 1110"); 1010 configure_tda827x_fe(dev, &hauppauge_hvr_1110_config);
1031 break; 1011 break;
1032 case SAA7134_BOARD_ASUSTeK_P7131_DUAL: 1012 case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
1033 configure_tda827x_fe(dev, &asus_p7131_dual_config, "DVB-T Asus P7131 Dual"); 1013 configure_tda827x_fe(dev, &asus_p7131_dual_config);
1034 break; 1014 break;
1035 case SAA7134_BOARD_FLYDVBT_LR301: 1015 case SAA7134_BOARD_FLYDVBT_LR301:
1036 configure_tda827x_fe(dev, &tda827x_lifeview_config, "DVB-T Lifeview FlyDVBT LR301"); 1016 configure_tda827x_fe(dev, &tda827x_lifeview_config);
1037 break; 1017 break;
1038 case SAA7134_BOARD_FLYDVB_TRIO: 1018 case SAA7134_BOARD_FLYDVB_TRIO:
1039 if(! use_frontend) { //terrestrial 1019 if(! use_frontend) { //terrestrial
1040 configure_tda827x_fe(dev, &lifeview_trio_config, NULL); 1020 configure_tda827x_fe(dev, &lifeview_trio_config);
1041 } else { //satellite 1021 } else { //satellite
1042 dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, &dev->i2c_adap); 1022 dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, &dev->i2c_adap);
1043 if (dev->dvb.frontend) { 1023 if (dev->dvb.frontend) {
@@ -1061,18 +1041,13 @@ static int dvb_init(struct saa7134_dev *dev)
1061 dvb_attach(tda827x_attach,dev->dvb.frontend, 1041 dvb_attach(tda827x_attach,dev->dvb.frontend,
1062 ads_tech_duo_config.tuner_address, 1042 ads_tech_duo_config.tuner_address,
1063 &dev->i2c_adap,&ads_duo_cfg); 1043 &dev->i2c_adap,&ads_duo_cfg);
1064 if (dev->board == SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331)
1065 board_name = "DVB-T ADS DUO Cardbus PTV331";
1066 else
1067 board_name = "DVB-T Lifeview FlyDVT Cardbus";
1068 philips_tda1004x_set_board_name(dev->dvb.frontend, board_name);
1069 } 1044 }
1070 break; 1045 break;
1071 case SAA7134_BOARD_TEVION_DVBT_220RF: 1046 case SAA7134_BOARD_TEVION_DVBT_220RF:
1072 configure_tda827x_fe(dev, &tevion_dvbt220rf_config, "DVB-T Tevion 220RF"); 1047 configure_tda827x_fe(dev, &tevion_dvbt220rf_config);
1073 break; 1048 break;
1074 case SAA7134_BOARD_MEDION_MD8800_QUADRO: 1049 case SAA7134_BOARD_MEDION_MD8800_QUADRO:
1075 configure_tda827x_fe(dev, &md8800_dvbt_config, "DVB-T Medion MD8800"); 1050 configure_tda827x_fe(dev, &md8800_dvbt_config);
1076 break; 1051 break;
1077 case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180: 1052 case SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180:
1078 dev->dvb.frontend = dvb_attach(nxt200x_attach, &avertvhda180, 1053 dev->dvb.frontend = dvb_attach(nxt200x_attach, &avertvhda180,
@@ -1113,7 +1088,6 @@ static int dvb_init(struct saa7134_dev *dev)
1113 dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init; 1088 dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init;
1114 dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep; 1089 dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep;
1115 dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params; 1090 dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params;
1116 philips_tda1004x_set_board_name(dev->dvb.frontend, "DVBT Asus Europa 2 Hybrid");
1117 } 1091 }
1118 break; 1092 break;
1119 case SAA7134_BOARD_VIDEOMATE_DVBT_200A: 1093 case SAA7134_BOARD_VIDEOMATE_DVBT_200A:
@@ -1123,17 +1097,16 @@ static int dvb_init(struct saa7134_dev *dev)
1123 if (dev->dvb.frontend) { 1097 if (dev->dvb.frontend) {
1124 dev->dvb.frontend->ops.tuner_ops.init = philips_td1316_tuner_init; 1098 dev->dvb.frontend->ops.tuner_ops.init = philips_td1316_tuner_init;
1125 dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params; 1099 dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params;
1126 philips_tda1004x_set_board_name(dev->dvb.frontend, "DVBT Compro Videomate 200a");
1127 } 1100 }
1128 break; 1101 break;
1129 case SAA7134_BOARD_CINERGY_HT_PCMCIA: 1102 case SAA7134_BOARD_CINERGY_HT_PCMCIA:
1130 configure_tda827x_fe(dev, &cinergy_ht_config, "DVB-T Terratec Cinergy HT Cardbus"); 1103 configure_tda827x_fe(dev, &cinergy_ht_config);
1131 break; 1104 break;
1132 case SAA7134_BOARD_CINERGY_HT_PCI: 1105 case SAA7134_BOARD_CINERGY_HT_PCI:
1133 configure_tda827x_fe(dev, &cinergy_ht_pci_config, "DVB-T Terratec Cinergy HT PCI"); 1106 configure_tda827x_fe(dev, &cinergy_ht_pci_config);
1134 break; 1107 break;
1135 case SAA7134_BOARD_PHILIPS_TIGER_S: 1108 case SAA7134_BOARD_PHILIPS_TIGER_S:
1136 configure_tda827x_fe(dev, &philips_tiger_s_config, "DVB-T Philips Tiger S"); 1109 configure_tda827x_fe(dev, &philips_tiger_s_config);
1137 break; 1110 break;
1138 default: 1111 default:
1139 printk("%s: Huh? unknown DVB card?\n",dev->name); 1112 printk("%s: Huh? unknown DVB card?\n",dev->name);