aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/video4linux/CARDLIST.saa71341
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c41
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c60
-rw-r--r--drivers/media/video/saa7134/saa7134.h1
4 files changed, 89 insertions, 14 deletions
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 53ce6a39083c..74536dfd1f17 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -99,3 +99,4 @@
99 98 -> Proteus Pro 2309 [0919:2003] 99 98 -> Proteus Pro 2309 [0919:2003]
100 99 -> AVerMedia TV Hybrid A16AR [1461:2c00] 100 99 -> AVerMedia TV Hybrid A16AR [1461:2c00]
101100 -> Asus Europa2 OEM [1043:4860] 101100 -> Asus Europa2 OEM [1043:4860]
102101 -> Pinnacle PCTV 310i [11bd:002f]
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 51f0cfdcb680..100cfc53dc98 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -3022,6 +3022,39 @@ struct saa7134_board saa7134_boards[] = {
3022 .amux = LINE1, 3022 .amux = LINE1,
3023 }, 3023 },
3024 }, 3024 },
3025 [SAA7134_BOARD_PINNACLE_PCTV_310i] = {
3026 .name = "Pinnacle PCTV 310i",
3027 .audio_clock = 0x00187de7,
3028 .tuner_type = TUNER_PHILIPS_TDA8290,
3029 .radio_type = UNSET,
3030 .tuner_addr = ADDR_UNSET,
3031 .radio_addr = ADDR_UNSET,
3032 .mpeg = SAA7134_MPEG_DVB,
3033 .gpiomask = 0x000200000,
3034 .inputs = {{
3035 .name = name_tv,
3036 .vmux = 4,
3037 .amux = TV,
3038 .tv = 1,
3039 },{
3040 .name = name_comp1,
3041 .vmux = 1,
3042 .amux = LINE2,
3043 },{
3044 .name = name_comp2,
3045 .vmux = 0,
3046 .amux = LINE2,
3047 },{
3048 .name = name_svideo,
3049 .vmux = 8,
3050 .amux = LINE2,
3051 }},
3052 .radio = {
3053 .name = name_radio,
3054 .amux = TV,
3055 .gpio = 0x0200000,
3056 },
3057 },
3025}; 3058};
3026 3059
3027const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); 3060const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3631,6 +3664,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
3631 .subdevice = 0x4860, 3664 .subdevice = 0x4860,
3632 .driver_data = SAA7134_BOARD_ASUS_EUROPA2_HYBRID, 3665 .driver_data = SAA7134_BOARD_ASUS_EUROPA2_HYBRID,
3633 },{ 3666 },{
3667 .vendor = PCI_VENDOR_ID_PHILIPS,
3668 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
3669 .subvendor = 0x11bd,
3670 .subdevice = 0x002f,
3671 .driver_data = SAA7134_BOARD_PINNACLE_PCTV_310i,
3672 },{
3634 /* --- boards without eeprom + subsystem ID --- */ 3673 /* --- boards without eeprom + subsystem ID --- */
3635 .vendor = PCI_VENDOR_ID_PHILIPS, 3674 .vendor = PCI_VENDOR_ID_PHILIPS,
3636 .device = PCI_DEVICE_ID_PHILIPS_SAA7134, 3675 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -3793,6 +3832,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
3793 break; 3832 break;
3794 /* i2c remotes */ 3833 /* i2c remotes */
3795 case SAA7134_BOARD_PINNACLE_PCTV_110i: 3834 case SAA7134_BOARD_PINNACLE_PCTV_110i:
3835 case SAA7134_BOARD_PINNACLE_PCTV_310i:
3796 case SAA7134_BOARD_UPMOST_PURPLE_TV: 3836 case SAA7134_BOARD_UPMOST_PURPLE_TV:
3797 dev->has_remote = SAA7134_REMOTE_I2C; 3837 dev->has_remote = SAA7134_REMOTE_I2C;
3798 break; 3838 break;
@@ -3924,6 +3964,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
3924 } 3964 }
3925 break; 3965 break;
3926 case SAA7134_BOARD_PHILIPS_TIGER: 3966 case SAA7134_BOARD_PHILIPS_TIGER:
3967 case SAA7134_BOARD_PINNACLE_PCTV_310i:
3927 case SAA7134_BOARD_TEVION_DVBT_220RF: 3968 case SAA7134_BOARD_TEVION_DVBT_220RF:
3928 case SAA7134_BOARD_ASUSTeK_P7131_DUAL: 3969 case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
3929 case SAA7134_BOARD_MEDION_MD8800_QUADRO: 3970 case SAA7134_BOARD_MEDION_MD8800_QUADRO:
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 6b61d9b2fcb5..88e4b0f16da9 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -293,7 +293,7 @@ static int philips_tu1216_tuner_60_set_params(struct dvb_frontend *fe, struct dv
293 return philips_tda6651_pll_set(0x60, fe, params); 293 return philips_tda6651_pll_set(0x60, fe, params);
294} 294}
295 295
296static int philips_tu1216_request_firmware(struct dvb_frontend *fe, 296static int philips_tda1004x_request_firmware(struct dvb_frontend *fe,
297 const struct firmware **fw, char *name) 297 const struct firmware **fw, char *name)
298{ 298{
299 struct saa7134_dev *dev = fe->dvb->priv; 299 struct saa7134_dev *dev = fe->dvb->priv;
@@ -308,7 +308,7 @@ static struct tda1004x_config philips_tu1216_60_config = {
308 .xtal_freq = TDA10046_XTAL_4M, 308 .xtal_freq = TDA10046_XTAL_4M,
309 .agc_config = TDA10046_AGC_DEFAULT, 309 .agc_config = TDA10046_AGC_DEFAULT,
310 .if_freq = TDA10046_FREQ_3617, 310 .if_freq = TDA10046_FREQ_3617,
311 .request_firmware = philips_tu1216_request_firmware, 311 .request_firmware = philips_tda1004x_request_firmware,
312}; 312};
313 313
314/* ------------------------------------------------------------------ */ 314/* ------------------------------------------------------------------ */
@@ -331,7 +331,7 @@ static struct tda1004x_config philips_tu1216_61_config = {
331 .xtal_freq = TDA10046_XTAL_4M, 331 .xtal_freq = TDA10046_XTAL_4M,
332 .agc_config = TDA10046_AGC_DEFAULT, 332 .agc_config = TDA10046_AGC_DEFAULT,
333 .if_freq = TDA10046_FREQ_3617, 333 .if_freq = TDA10046_FREQ_3617,
334 .request_firmware = philips_tu1216_request_firmware, 334 .request_firmware = philips_tda1004x_request_firmware,
335}; 335};
336 336
337/* ------------------------------------------------------------------ */ 337/* ------------------------------------------------------------------ */
@@ -812,32 +812,40 @@ static int philips_tda827xa_tuner_sleep(u8 addr, struct dvb_frontend *fe)
812 if (fe->ops.i2c_gate_ctrl) 812 if (fe->ops.i2c_gate_ctrl)
813 fe->ops.i2c_gate_ctrl(fe, 1); 813 fe->ops.i2c_gate_ctrl(fe, 1);
814 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); 814 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
815 if (fe->ops.i2c_gate_ctrl)
816 fe->ops.i2c_gate_ctrl(fe, 0);
815 return 0; 817 return 0;
816} 818}
817 819
818/* ------------------------------------------------------------------ */ 820/* ------------------------------------------------------------------ */
819 821
820static int philips_tiger_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) 822static int tda8290_i2c_gate_ctrl(struct dvb_frontend* fe, int enable)
821{ 823{
822 int ret;
823 struct saa7134_dev *dev = fe->dvb->priv; 824 struct saa7134_dev *dev = fe->dvb->priv;
824 static u8 tda8290_close[] = { 0x21, 0xc0}; 825 static u8 tda8290_close[] = { 0x21, 0xc0};
825 static u8 tda8290_open[] = { 0x21, 0x80}; 826 static u8 tda8290_open[] = { 0x21, 0x80};
826 struct i2c_msg tda8290_msg = {.addr = 0x4b,.flags = 0, .len = 2}; 827 struct i2c_msg tda8290_msg = {.addr = 0x4b,.flags = 0, .len = 2};
827 828 if (enable) {
828 /* close tda8290 i2c bridge */ 829 tda8290_msg.buf = tda8290_close;
829 tda8290_msg.buf = tda8290_close; 830 } else {
830 ret = i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1); 831 tda8290_msg.buf = tda8290_open;
831 if (ret != 1) 832 }
833 if (i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1) != 1)
832 return -EIO; 834 return -EIO;
833 msleep(20); 835 msleep(20);
836 return 0;
837}
838
839/* ------------------------------------------------------------------ */
840
841static int philips_tiger_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
842{
843 int ret;
844
834 ret = philips_tda827xa_pll_set(0x61, fe, params); 845 ret = philips_tda827xa_pll_set(0x61, fe, params);
835 if (ret != 0) 846 if (ret != 0)
836 return ret; 847 return ret;
837 /* open tda8290 i2c bridge */ 848 return 0;
838 tda8290_msg.buf = tda8290_open;
839 i2c_transfer(&dev->i2c_adap, &tda8290_msg, 1);
840 return ret;
841} 849}
842 850
843static int philips_tiger_tuner_init(struct dvb_frontend *fe) 851static int philips_tiger_tuner_init(struct dvb_frontend *fe)
@@ -874,6 +882,18 @@ static struct tda1004x_config philips_tiger_config = {
874 882
875/* ------------------------------------------------------------------ */ 883/* ------------------------------------------------------------------ */
876 884
885static struct tda1004x_config pinnacle_pctv_310i_config = {
886 .demod_address = 0x08,
887 .invert = 1,
888 .invert_oclk = 0,
889 .xtal_freq = TDA10046_XTAL_16M,
890 .agc_config = TDA10046_AGC_TDA827X,
891 .if_freq = TDA10046_FREQ_045,
892 .request_firmware = philips_tda1004x_request_firmware,
893};
894
895/* ------------------------------------------------------------------ */
896
877static int asus_p7131_dual_tuner_init(struct dvb_frontend *fe) 897static int asus_p7131_dual_tuner_init(struct dvb_frontend *fe)
878{ 898{
879 struct saa7134_dev *dev = fe->dvb->priv; 899 struct saa7134_dev *dev = fe->dvb->priv;
@@ -1168,6 +1188,18 @@ static int dvb_init(struct saa7134_dev *dev)
1168 &philips_tiger_config, 1188 &philips_tiger_config,
1169 &dev->i2c_adap); 1189 &dev->i2c_adap);
1170 if (dev->dvb.frontend) { 1190 if (dev->dvb.frontend) {
1191 dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
1192 dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
1193 dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
1194 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
1195 }
1196 break;
1197 case SAA7134_BOARD_PINNACLE_PCTV_310i:
1198 dev->dvb.frontend = dvb_attach(tda10046_attach,
1199 &pinnacle_pctv_310i_config,
1200 &dev->i2c_adap);
1201 if (dev->dvb.frontend) {
1202 dev->dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
1171 dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init; 1203 dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
1172 dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep; 1204 dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
1173 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params; 1205 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 7cf96b430250..2de92ceb4f68 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -227,6 +227,7 @@ struct saa7134_format {
227#define SAA7134_BOARD_PROTEUS_2309 98 227#define SAA7134_BOARD_PROTEUS_2309 98
228#define SAA7134_BOARD_AVERMEDIA_A16AR 99 228#define SAA7134_BOARD_AVERMEDIA_A16AR 99
229#define SAA7134_BOARD_ASUS_EUROPA2_HYBRID 100 229#define SAA7134_BOARD_ASUS_EUROPA2_HYBRID 100
230#define SAA7134_BOARD_PINNACLE_PCTV_310i 101
230 231
231#define SAA7134_MAXBOARDS 8 232#define SAA7134_MAXBOARDS 8
232#define SAA7134_INPUT_MAX 8 233#define SAA7134_INPUT_MAX 8