diff options
author | Nickolay V. Shmyrev <nshmyrev@yandex.ru> | 2005-11-09 00:36:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:56:10 -0500 |
commit | bb881f142465a7a70bc9a364786e39aa4aaba4d2 (patch) | |
tree | 20774accd9d33e072946ab0cb802dd02dda84c5e | |
parent | fd1c388125d713b403569d96d9845470142884a2 (diff) |
[PATCH] v4l: 663: add new rtd cards
- Add new RTD cards
Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | Documentation/video4linux/CARDLIST.saa7134 | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 91 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-reg.h | 1 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 9 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 2 |
5 files changed, 103 insertions, 2 deletions
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index b2643051339e..82b5f7c73c83 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -70,3 +70,5 @@ | |||
70 | 69 -> Philips EUROPA V3 reference design [1131:2004] | 70 | 69 -> Philips EUROPA V3 reference design [1131:2004] |
71 | 70 -> Compro Videomate DVB-T300 [185b:c900] | 71 | 70 -> Compro Videomate DVB-T300 [185b:c900] |
72 | 71 -> Compro Videomate DVB-T200 [185b:c901] | 72 | 71 -> Compro Videomate DVB-T200 [185b:c901] |
73 | 72 -> RTD Embedded Technologies VFG7350 [1435:7350] | ||
74 | 73 -> RTD Embedded Technologies VFG7330 [1435:7330] | ||
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 8291ed709736..8bb2faf2635a 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2251,6 +2251,74 @@ struct saa7134_board saa7134_boards[] = { | |||
2251 | .amux = LINE1, | 2251 | .amux = LINE1, |
2252 | }}, | 2252 | }}, |
2253 | }, | 2253 | }, |
2254 | [SAA7134_BOARD_RTD_VFG7350] = { | ||
2255 | .name = "RTD Embedded Technologies VFG7350", | ||
2256 | .audio_clock = 0x00200000, | ||
2257 | .tuner_type = TUNER_ABSENT, | ||
2258 | .radio_type = UNSET, | ||
2259 | .tuner_addr = ADDR_UNSET, | ||
2260 | .radio_addr = ADDR_UNSET, | ||
2261 | .inputs = {{ | ||
2262 | .name = "Composite 0", | ||
2263 | .vmux = 0, | ||
2264 | .amux = LINE1, | ||
2265 | },{ | ||
2266 | .name = "Composite 1", | ||
2267 | .vmux = 1, | ||
2268 | .amux = LINE2, | ||
2269 | },{ | ||
2270 | .name = "Composite 2", | ||
2271 | .vmux = 2, | ||
2272 | .amux = LINE1, | ||
2273 | },{ | ||
2274 | .name = "Composite 3", | ||
2275 | .vmux = 3, | ||
2276 | .amux = LINE2, | ||
2277 | },{ | ||
2278 | .name = "S-Video 0", | ||
2279 | .vmux = 8, | ||
2280 | .amux = LINE1, | ||
2281 | },{ | ||
2282 | .name = "S-Video 1", | ||
2283 | .vmux = 9, | ||
2284 | .amux = LINE2, | ||
2285 | }}, | ||
2286 | .mpeg = SAA7134_MPEG_EMPRESS, | ||
2287 | .video_out = CCIR656, | ||
2288 | }, | ||
2289 | [SAA7134_BOARD_RTD_VFG7330] = { | ||
2290 | .name = "RTD Embedded Technologies VFG7330", | ||
2291 | .audio_clock = 0x00200000, | ||
2292 | .tuner_type = TUNER_ABSENT, | ||
2293 | .radio_type = UNSET, | ||
2294 | .tuner_addr = ADDR_UNSET, | ||
2295 | .radio_addr = ADDR_UNSET, | ||
2296 | .inputs = {{ | ||
2297 | .name = "Composite 0", | ||
2298 | .vmux = 0, | ||
2299 | .amux = LINE1, | ||
2300 | },{ | ||
2301 | .name = "Composite 1", | ||
2302 | .vmux = 1, | ||
2303 | .amux = LINE2, | ||
2304 | },{ | ||
2305 | .name = "Composite 2", | ||
2306 | .vmux = 2, | ||
2307 | .amux = LINE1, | ||
2308 | },{ | ||
2309 | .name = "Composite 3", | ||
2310 | .vmux = 3, | ||
2311 | .amux = LINE2, | ||
2312 | },{ | ||
2313 | .name = "S-Video 0", | ||
2314 | .vmux = 8, | ||
2315 | .amux = LINE1, | ||
2316 | },{ | ||
2317 | .name = "S-Video 1", | ||
2318 | .vmux = 9, | ||
2319 | .amux = LINE2, | ||
2320 | }}, | ||
2321 | }, | ||
2254 | }; | 2322 | }; |
2255 | 2323 | ||
2256 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); | 2324 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); |
@@ -2639,6 +2707,18 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
2639 | .subdevice = 0xc901, | 2707 | .subdevice = 0xc901, |
2640 | .driver_data = SAA7134_BOARD_VIDEOMATE_DVBT_200, | 2708 | .driver_data = SAA7134_BOARD_VIDEOMATE_DVBT_200, |
2641 | },{ | 2709 | },{ |
2710 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
2711 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
2712 | .subvendor = 0x1435, | ||
2713 | .subdevice = 0x7350, | ||
2714 | .driver_data = SAA7134_BOARD_RTD_VFG7350, | ||
2715 | },{ | ||
2716 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
2717 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
2718 | .subvendor = 0x1435, | ||
2719 | .subdevice = 0x7330, | ||
2720 | .driver_data = SAA7134_BOARD_RTD_VFG7330, | ||
2721 | },{ | ||
2642 | /* --- boards without eeprom + subsystem ID --- */ | 2722 | /* --- boards without eeprom + subsystem ID --- */ |
2643 | .vendor = PCI_VENDOR_ID_PHILIPS, | 2723 | .vendor = PCI_VENDOR_ID_PHILIPS, |
2644 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | 2724 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, |
@@ -2758,6 +2838,17 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
2758 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff); | 2838 | saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff); |
2759 | msleep(1); | 2839 | msleep(1); |
2760 | break; | 2840 | break; |
2841 | case SAA7134_BOARD_RTD_VFG7350: | ||
2842 | |||
2843 | /* | ||
2844 | * Make sure Production Test Register at offset 0x1D1 is cleared | ||
2845 | * to take chip out of test mode. Clearing bit 4 (TST_EN_AOUT) | ||
2846 | * prevents pin 105 from remaining low; keeping pin 105 low | ||
2847 | * continually resets the SAA6752 chip. | ||
2848 | */ | ||
2849 | |||
2850 | saa_writeb (SAA7134_PRODUCTION_TEST_MODE, 0x00); | ||
2851 | break; | ||
2761 | } | 2852 | } |
2762 | return 0; | 2853 | return 0; |
2763 | } | 2854 | } |
diff --git a/drivers/media/video/saa7134/saa7134-reg.h b/drivers/media/video/saa7134/saa7134-reg.h index ae0c7a165390..fce4f185ef92 100644 --- a/drivers/media/video/saa7134/saa7134-reg.h +++ b/drivers/media/video/saa7134/saa7134-reg.h | |||
@@ -348,6 +348,7 @@ | |||
348 | 348 | ||
349 | /* test modes */ | 349 | /* test modes */ |
350 | #define SAA7134_SPECIAL_MODE 0x1d0 | 350 | #define SAA7134_SPECIAL_MODE 0x1d0 |
351 | #define SAA7134_PRODUCTION_TEST_MODE 0x1d1 | ||
351 | 352 | ||
352 | /* audio -- saa7133 + saa7135 only */ | 353 | /* audio -- saa7133 + saa7135 only */ |
353 | #define SAA7135_DSP_RWSTATE 0x580 | 354 | #define SAA7135_DSP_RWSTATE 0x580 |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 35e5e85f669a..d395403afe5a 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -1666,6 +1666,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1666 | case VIDIOC_QUERYCAP: | 1666 | case VIDIOC_QUERYCAP: |
1667 | { | 1667 | { |
1668 | struct v4l2_capability *cap = arg; | 1668 | struct v4l2_capability *cap = arg; |
1669 | unsigned int tuner_type = dev->tuner_type; | ||
1669 | 1670 | ||
1670 | memset(cap,0,sizeof(*cap)); | 1671 | memset(cap,0,sizeof(*cap)); |
1671 | strcpy(cap->driver, "saa7134"); | 1672 | strcpy(cap->driver, "saa7134"); |
@@ -1677,9 +1678,13 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1677 | V4L2_CAP_VIDEO_CAPTURE | | 1678 | V4L2_CAP_VIDEO_CAPTURE | |
1678 | V4L2_CAP_VIDEO_OVERLAY | | 1679 | V4L2_CAP_VIDEO_OVERLAY | |
1679 | V4L2_CAP_VBI_CAPTURE | | 1680 | V4L2_CAP_VBI_CAPTURE | |
1680 | V4L2_CAP_TUNER | | ||
1681 | V4L2_CAP_READWRITE | | 1681 | V4L2_CAP_READWRITE | |
1682 | V4L2_CAP_STREAMING; | 1682 | V4L2_CAP_STREAMING | |
1683 | V4L2_CAP_TUNER; | ||
1684 | |||
1685 | if ((tuner_type == TUNER_ABSENT) || (tuner_type == UNSET)) | ||
1686 | cap->capabilities &= ~V4L2_CAP_TUNER; | ||
1687 | |||
1683 | return 0; | 1688 | return 0; |
1684 | } | 1689 | } |
1685 | 1690 | ||
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index 69a2cebe8860..ad8e89d6bf50 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -192,6 +192,8 @@ struct saa7134_format { | |||
192 | #define SAA7134_BOARD_PHILIPS_EUROPA 69 | 192 | #define SAA7134_BOARD_PHILIPS_EUROPA 69 |
193 | #define SAA7134_BOARD_VIDEOMATE_DVBT_300 70 | 193 | #define SAA7134_BOARD_VIDEOMATE_DVBT_300 70 |
194 | #define SAA7134_BOARD_VIDEOMATE_DVBT_200 71 | 194 | #define SAA7134_BOARD_VIDEOMATE_DVBT_200 71 |
195 | #define SAA7134_BOARD_RTD_VFG7350 72 | ||
196 | #define SAA7134_BOARD_RTD_VFG7330 73 | ||
195 | 197 | ||
196 | #define SAA7134_MAXBOARDS 8 | 198 | #define SAA7134_MAXBOARDS 8 |
197 | #define SAA7134_INPUT_MAX 8 | 199 | #define SAA7134_INPUT_MAX 8 |