diff options
author | Igor M. Liplianin <liplianin@me.by> | 2009-08-13 20:42:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:18:57 -0400 |
commit | ecfcfec80493097967aa40e3433d65a8ff65c86b (patch) | |
tree | 8d9008465a1909e724a7bd496771cb128900ff55 | |
parent | d0a1ddad1c9723f4a61e9b216c4c34ac03344fdd (diff) |
V4L/DVB (12463): Add support for Compro VideoMate S350 DVB-S PCI card.
Add Compro VideoMate S350 DVB-S driver.
The card uses zl10313, zl10039, saa7130 integrated circuits.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/common/ir-keymaps.c | 48 | ||||
-rw-r--r-- | drivers/media/video/saa7134/Kconfig | 1 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 31 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 15 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 5 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 1 | ||||
-rw-r--r-- | include/media/ir-common.h | 1 |
7 files changed, 101 insertions, 1 deletions
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c index 58d3e54db5a5..c222b7f15184 100644 --- a/drivers/media/common/ir-keymaps.c +++ b/drivers/media/common/ir-keymaps.c | |||
@@ -2828,3 +2828,51 @@ IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE] = { | |||
2828 | [0x13] = KEY_CAMERA, | 2828 | [0x13] = KEY_CAMERA, |
2829 | }; | 2829 | }; |
2830 | EXPORT_SYMBOL_GPL(ir_codes_evga_indtube); | 2830 | EXPORT_SYMBOL_GPL(ir_codes_evga_indtube); |
2831 | |||
2832 | IR_KEYTAB_TYPE ir_codes_videomate_s350[IR_KEYTAB_SIZE] = { | ||
2833 | [0x00] = KEY_TV, | ||
2834 | [0x01] = KEY_DVD, | ||
2835 | [0x04] = KEY_RECORD, | ||
2836 | [0x05] = KEY_VIDEO, /* TV/Video */ | ||
2837 | [0x07] = KEY_STOP, | ||
2838 | [0x08] = KEY_PLAYPAUSE, | ||
2839 | [0x0a] = KEY_REWIND, | ||
2840 | [0x0f] = KEY_FASTFORWARD, | ||
2841 | [0x10] = KEY_CHANNELUP, | ||
2842 | [0x12] = KEY_VOLUMEUP, | ||
2843 | [0x13] = KEY_CHANNELDOWN, | ||
2844 | [0x14] = KEY_MUTE, | ||
2845 | [0x15] = KEY_VOLUMEDOWN, | ||
2846 | [0x16] = KEY_1, | ||
2847 | [0x17] = KEY_2, | ||
2848 | [0x18] = KEY_3, | ||
2849 | [0x19] = KEY_4, | ||
2850 | [0x1a] = KEY_5, | ||
2851 | [0x1b] = KEY_6, | ||
2852 | [0x1c] = KEY_7, | ||
2853 | [0x1d] = KEY_8, | ||
2854 | [0x1e] = KEY_9, | ||
2855 | [0x1f] = KEY_0, | ||
2856 | [0x21] = KEY_SLEEP, | ||
2857 | [0x24] = KEY_ZOOM, | ||
2858 | [0x25] = KEY_LAST, /* Recall */ | ||
2859 | [0x26] = KEY_SUBTITLE, /* CC */ | ||
2860 | [0x27] = KEY_LANGUAGE, /* MTS */ | ||
2861 | [0x29] = KEY_CHANNEL, /* SURF */ | ||
2862 | [0x2b] = KEY_A, | ||
2863 | [0x2c] = KEY_B, | ||
2864 | [0x2f] = KEY_SHUFFLE, /* Snapshot */ | ||
2865 | [0x23] = KEY_RADIO, | ||
2866 | [0x02] = KEY_PREVIOUSSONG, | ||
2867 | [0x06] = KEY_NEXTSONG, | ||
2868 | [0x03] = KEY_EPG, | ||
2869 | [0x09] = KEY_SETUP, | ||
2870 | [0x22] = KEY_BACKSPACE, | ||
2871 | [0x0c] = KEY_UP, | ||
2872 | [0x0e] = KEY_DOWN, | ||
2873 | [0x0b] = KEY_LEFT, | ||
2874 | [0x0d] = KEY_RIGHT, | ||
2875 | [0x11] = KEY_ENTER, | ||
2876 | [0x20] = KEY_TEXT, | ||
2877 | }; | ||
2878 | EXPORT_SYMBOL_GPL(ir_codes_videomate_s350); | ||
diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index 5bcce092e804..22bfd62c9551 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig | |||
@@ -47,6 +47,7 @@ config VIDEO_SAA7134_DVB | |||
47 | select DVB_TDA10048 if !DVB_FE_CUSTOMISE | 47 | select DVB_TDA10048 if !DVB_FE_CUSTOMISE |
48 | select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMISE | 48 | select MEDIA_TUNER_TDA18271 if !MEDIA_TUNER_CUSTOMISE |
49 | select MEDIA_TUNER_TDA8290 if !MEDIA_TUNER_CUSTOMISE | 49 | select MEDIA_TUNER_TDA8290 if !MEDIA_TUNER_CUSTOMISE |
50 | select DVB_ZL10039 if !DVB_FE_CUSTOMISE | ||
50 | ---help--- | 51 | ---help--- |
51 | This adds support for DVB cards based on the | 52 | This adds support for DVB cards based on the |
52 | Philips saa7134 chip. | 53 | Philips saa7134 chip. |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index e1d89b232392..b15d696dff47 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -5116,6 +5116,25 @@ struct saa7134_board saa7134_boards[] = { | |||
5116 | .gpio = 0x00, | 5116 | .gpio = 0x00, |
5117 | }, | 5117 | }, |
5118 | }, | 5118 | }, |
5119 | [SAA7134_BOARD_VIDEOMATE_S350] = { | ||
5120 | /* Jan D. Louw <jd.louw@mweb.co.za */ | ||
5121 | .name = "Compro VideoMate S350/S300", | ||
5122 | .audio_clock = 0x00187de7, | ||
5123 | .tuner_type = TUNER_ABSENT, | ||
5124 | .radio_type = UNSET, | ||
5125 | .tuner_addr = ADDR_UNSET, | ||
5126 | .radio_addr = ADDR_UNSET, | ||
5127 | .mpeg = SAA7134_MPEG_DVB, | ||
5128 | .inputs = { { | ||
5129 | .name = name_comp1, | ||
5130 | .vmux = 0, | ||
5131 | .amux = LINE1, | ||
5132 | }, { | ||
5133 | .name = name_svideo, | ||
5134 | .vmux = 8, /* Not tested */ | ||
5135 | .amux = LINE1 | ||
5136 | } }, | ||
5137 | }, | ||
5119 | }; | 5138 | }; |
5120 | 5139 | ||
5121 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); | 5140 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); |
@@ -6223,7 +6242,12 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
6223 | .subvendor = 0x1461, /* Avermedia Technologies Inc */ | 6242 | .subvendor = 0x1461, /* Avermedia Technologies Inc */ |
6224 | .subdevice = 0xf31d, | 6243 | .subdevice = 0xf31d, |
6225 | .driver_data = SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS, | 6244 | .driver_data = SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS, |
6226 | 6245 | }, { | |
6246 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
6247 | .device = PCI_DEVICE_ID_PHILIPS_SAA7130, | ||
6248 | .subvendor = 0x185b, | ||
6249 | .subdevice = 0xc900, | ||
6250 | .driver_data = SAA7134_BOARD_VIDEOMATE_S350, | ||
6227 | }, { | 6251 | }, { |
6228 | /* --- boards without eeprom + subsystem ID --- */ | 6252 | /* --- boards without eeprom + subsystem ID --- */ |
6229 | .vendor = PCI_VENDOR_ID_PHILIPS, | 6253 | .vendor = PCI_VENDOR_ID_PHILIPS, |
@@ -6673,6 +6697,11 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
6673 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100); | 6697 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100); |
6674 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100); | 6698 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100); |
6675 | break; | 6699 | break; |
6700 | case SAA7134_BOARD_VIDEOMATE_S350: | ||
6701 | dev->has_remote = SAA7134_REMOTE_GPIO; | ||
6702 | saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x00008000, 0x00008000); | ||
6703 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000); | ||
6704 | break; | ||
6676 | } | 6705 | } |
6677 | return 0; | 6706 | return 0; |
6678 | } | 6707 | } |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 2ac3f1f2f53e..ebde21dba7e3 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "zl10353.h" | 56 | #include "zl10353.h" |
57 | 57 | ||
58 | #include "zl10036.h" | 58 | #include "zl10036.h" |
59 | #include "zl10039.h" | ||
59 | #include "mt312.h" | 60 | #include "mt312.h" |
60 | 61 | ||
61 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); | 62 | MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]"); |
@@ -968,6 +969,10 @@ static struct zl10036_config avertv_a700_tuner = { | |||
968 | .tuner_address = 0x60, | 969 | .tuner_address = 0x60, |
969 | }; | 970 | }; |
970 | 971 | ||
972 | static struct mt312_config zl10313_compro_s350_config = { | ||
973 | .demod_address = 0x0e, | ||
974 | }; | ||
975 | |||
971 | static struct lgdt3305_config hcw_lgdt3305_config = { | 976 | static struct lgdt3305_config hcw_lgdt3305_config = { |
972 | .i2c_addr = 0x0e, | 977 | .i2c_addr = 0x0e, |
973 | .mpeg_mode = LGDT3305_MPEG_SERIAL, | 978 | .mpeg_mode = LGDT3305_MPEG_SERIAL, |
@@ -1473,6 +1478,16 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1473 | } | 1478 | } |
1474 | } | 1479 | } |
1475 | break; | 1480 | break; |
1481 | case SAA7134_BOARD_VIDEOMATE_S350: | ||
1482 | fe0->dvb.frontend = dvb_attach(mt312_attach, | ||
1483 | &zl10313_compro_s350_config, &dev->i2c_adap); | ||
1484 | if (fe0->dvb.frontend) | ||
1485 | if (dvb_attach(zl10039_attach, fe0->dvb.frontend, | ||
1486 | 0x60, &dev->i2c_adap) == NULL) | ||
1487 | wprintk("%s: No zl10039 found!\n", | ||
1488 | __func__); | ||
1489 | |||
1490 | break; | ||
1476 | default: | 1491 | default: |
1477 | wprintk("Huh? unknown DVB card?\n"); | 1492 | wprintk("Huh? unknown DVB card?\n"); |
1478 | break; | 1493 | break; |
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 6e219c2db841..059661fd1634 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -605,6 +605,11 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
605 | mask_keycode = 0x7f; | 605 | mask_keycode = 0x7f; |
606 | polling = 40; /* ms */ | 606 | polling = 40; /* ms */ |
607 | break; | 607 | break; |
608 | case SAA7134_BOARD_VIDEOMATE_S350: | ||
609 | ir_codes = ir_codes_videomate_s350; | ||
610 | mask_keycode = 0x003f00; | ||
611 | mask_keydown = 0x040000; | ||
612 | break; | ||
608 | } | 613 | } |
609 | if (NULL == ir_codes) { | 614 | if (NULL == ir_codes) { |
610 | printk("%s: Oops: IR config error [card=%d]\n", | 615 | printk("%s: Oops: IR config error [card=%d]\n", |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index ab28a691e09a..de9a7dd6508a 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -292,6 +292,7 @@ struct saa7134_format { | |||
292 | #define SAA7134_BOARD_BEHOLD_607RDS_MK5 166 | 292 | #define SAA7134_BOARD_BEHOLD_607RDS_MK5 166 |
293 | #define SAA7134_BOARD_BEHOLD_609RDS_MK3 167 | 293 | #define SAA7134_BOARD_BEHOLD_609RDS_MK3 167 |
294 | #define SAA7134_BOARD_BEHOLD_609RDS_MK5 168 | 294 | #define SAA7134_BOARD_BEHOLD_609RDS_MK5 168 |
295 | #define SAA7134_BOARD_VIDEOMATE_S350 169 | ||
295 | 296 | ||
296 | #define SAA7134_MAXBOARDS 32 | 297 | #define SAA7134_MAXBOARDS 32 |
297 | #define SAA7134_INPUT_MAX 8 | 298 | #define SAA7134_INPUT_MAX 8 |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 922bad37deec..8a607db492a5 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
@@ -164,6 +164,7 @@ extern IR_KEYTAB_TYPE ir_codes_kaiomy[IR_KEYTAB_SIZE]; | |||
164 | extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE]; | 164 | extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE]; |
165 | extern IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE]; | 165 | extern IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE]; |
166 | extern IR_KEYTAB_TYPE ir_codes_terratec_cinergy_xs[IR_KEYTAB_SIZE]; | 166 | extern IR_KEYTAB_TYPE ir_codes_terratec_cinergy_xs[IR_KEYTAB_SIZE]; |
167 | extern IR_KEYTAB_TYPE ir_codes_videomate_s350[IR_KEYTAB_SIZE]; | ||
167 | 168 | ||
168 | #endif | 169 | #endif |
169 | 170 | ||