diff options
author | Hartmut Hackmann <hartmut.hackmann@t-online.de> | 2006-08-07 13:03:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 08:03:11 -0400 |
commit | 5eda227fc622799a543dd7606f1037e89cd9e21b (patch) | |
tree | 68d4996bfc682beffe331af58bc5d5f9293dd92f /drivers/media/video/saa7134 | |
parent | 19e22576d29cadaba88f08fb958f4fcf0de9b16c (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')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 36 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 54 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 1 |
3 files changed, 91 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 927413aded10..99f2e6421302 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2891,6 +2891,29 @@ struct saa7134_board saa7134_boards[] = { | |||
2891 | .gpio = 0x8000, | 2891 | .gpio = 0x8000, |
2892 | }, | 2892 | }, |
2893 | }, | 2893 | }, |
2894 | [SAA7134_BOARD_MEDION_MD8800_QUADRO] = { | ||
2895 | .name = "Medion Md8800 Quadro", | ||
2896 | .audio_clock = 0x00187de7, | ||
2897 | .tuner_type = TUNER_PHILIPS_TDA8290, | ||
2898 | .radio_type = UNSET, | ||
2899 | .tuner_addr = ADDR_UNSET, | ||
2900 | .radio_addr = ADDR_UNSET, | ||
2901 | .mpeg = SAA7134_MPEG_DVB, | ||
2902 | .inputs = {{ | ||
2903 | .name = name_tv, | ||
2904 | .vmux = 1, | ||
2905 | .amux = TV, | ||
2906 | .tv = 1, | ||
2907 | },{ | ||
2908 | .name = name_comp1, | ||
2909 | .vmux = 0, | ||
2910 | .amux = LINE2, | ||
2911 | },{ | ||
2912 | .name = name_svideo, | ||
2913 | .vmux = 8, | ||
2914 | .amux = LINE2, | ||
2915 | }}, | ||
2916 | }, | ||
2894 | }; | 2917 | }; |
2895 | 2918 | ||
2896 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); | 2919 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); |
@@ -3446,6 +3469,18 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
3446 | .subdevice = 0x3502, /* whats the difference to 0x3306 ?*/ | 3469 | .subdevice = 0x3502, /* whats the difference to 0x3306 ?*/ |
3447 | .driver_data = SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS, | 3470 | .driver_data = SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS, |
3448 | },{ | 3471 | },{ |
3472 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
3473 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
3474 | .subvendor = 0x16be, | ||
3475 | .subdevice = 0x0007, | ||
3476 | .driver_data = SAA7134_BOARD_MEDION_MD8800_QUADRO, | ||
3477 | },{ | ||
3478 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
3479 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
3480 | .subvendor = 0x16be, | ||
3481 | .subdevice = 0x0008, | ||
3482 | .driver_data = SAA7134_BOARD_MEDION_MD8800_QUADRO, | ||
3483 | },{ | ||
3449 | /* --- boards without eeprom + subsystem ID --- */ | 3484 | /* --- boards without eeprom + subsystem ID --- */ |
3450 | .vendor = PCI_VENDOR_ID_PHILIPS, | 3485 | .vendor = PCI_VENDOR_ID_PHILIPS, |
3451 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | 3486 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, |
@@ -3732,6 +3767,7 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
3732 | case SAA7134_BOARD_PHILIPS_TIGER: | 3767 | case SAA7134_BOARD_PHILIPS_TIGER: |
3733 | case SAA7134_BOARD_TEVION_DVBT_220RF: | 3768 | case SAA7134_BOARD_TEVION_DVBT_220RF: |
3734 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: | 3769 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: |
3770 | case SAA7134_BOARD_MEDION_MD8800_QUADRO: | ||
3735 | /* this is a hybrid board, initialize to analog mode | 3771 | /* this is a hybrid board, initialize to analog mode |
3736 | * and configure firmware eeprom address | 3772 | * and configure firmware eeprom address |
3737 | */ | 3773 | */ |
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 | |||
974 | static 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 | |||
985 | static 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 | |||
1007 | static 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: |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index c04ce6152fd5..e3739b893cad 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -223,6 +223,7 @@ struct saa7134_format { | |||
223 | #define SAA7134_BOARD_MD7134_BRIDGE_2 93 | 223 | #define SAA7134_BOARD_MD7134_BRIDGE_2 93 |
224 | #define SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS 94 | 224 | #define SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS 94 |
225 | #define SAA7134_BOARD_FLYVIDEO3000_NTSC 95 | 225 | #define SAA7134_BOARD_FLYVIDEO3000_NTSC 95 |
226 | #define SAA7134_BOARD_MEDION_MD8800_QUADRO 96 | ||
226 | 227 | ||
227 | #define SAA7134_MAXBOARDS 8 | 228 | #define SAA7134_MAXBOARDS 8 |
228 | #define SAA7134_INPUT_MAX 8 | 229 | #define SAA7134_INPUT_MAX 8 |