Commit bb881f14 authored by Nickolay V. Shmyrev's avatar Nickolay V. Shmyrev Committed by Linus Torvalds

[PATCH] v4l: 663: add new rtd cards

- Add new RTD cards
Signed-off-by: default avatarNickolay V. Shmyrev <nshmyrev@yandex.ru>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fd1c3881
......@@ -70,3 +70,5 @@
69 -> Philips EUROPA V3 reference design [1131:2004]
70 -> Compro Videomate DVB-T300 [185b:c900]
71 -> Compro Videomate DVB-T200 [185b:c901]
72 -> RTD Embedded Technologies VFG7350 [1435:7350]
73 -> RTD Embedded Technologies VFG7330 [1435:7330]
......@@ -2251,6 +2251,74 @@ struct saa7134_board saa7134_boards[] = {
.amux = LINE1,
}},
},
[SAA7134_BOARD_RTD_VFG7350] = {
.name = "RTD Embedded Technologies VFG7350",
.audio_clock = 0x00200000,
.tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{
.name = "Composite 0",
.vmux = 0,
.amux = LINE1,
},{
.name = "Composite 1",
.vmux = 1,
.amux = LINE2,
},{
.name = "Composite 2",
.vmux = 2,
.amux = LINE1,
},{
.name = "Composite 3",
.vmux = 3,
.amux = LINE2,
},{
.name = "S-Video 0",
.vmux = 8,
.amux = LINE1,
},{
.name = "S-Video 1",
.vmux = 9,
.amux = LINE2,
}},
.mpeg = SAA7134_MPEG_EMPRESS,
.video_out = CCIR656,
},
[SAA7134_BOARD_RTD_VFG7330] = {
.name = "RTD Embedded Technologies VFG7330",
.audio_clock = 0x00200000,
.tuner_type = TUNER_ABSENT,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.inputs = {{
.name = "Composite 0",
.vmux = 0,
.amux = LINE1,
},{
.name = "Composite 1",
.vmux = 1,
.amux = LINE2,
},{
.name = "Composite 2",
.vmux = 2,
.amux = LINE1,
},{
.name = "Composite 3",
.vmux = 3,
.amux = LINE2,
},{
.name = "S-Video 0",
.vmux = 8,
.amux = LINE1,
},{
.name = "S-Video 1",
.vmux = 9,
.amux = LINE2,
}},
},
};
const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
......@@ -2639,6 +2707,18 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subdevice = 0xc901,
.driver_data = SAA7134_BOARD_VIDEOMATE_DVBT_200,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x1435,
.subdevice = 0x7350,
.driver_data = SAA7134_BOARD_RTD_VFG7350,
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x1435,
.subdevice = 0x7330,
.driver_data = SAA7134_BOARD_RTD_VFG7330,
},{
/* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7134,
......@@ -2758,6 +2838,17 @@ int saa7134_board_init1(struct saa7134_dev *dev)
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff);
msleep(1);
break;
case SAA7134_BOARD_RTD_VFG7350:
/*
* Make sure Production Test Register at offset 0x1D1 is cleared
* to take chip out of test mode. Clearing bit 4 (TST_EN_AOUT)
* prevents pin 105 from remaining low; keeping pin 105 low
* continually resets the SAA6752 chip.
*/
saa_writeb (SAA7134_PRODUCTION_TEST_MODE, 0x00);
break;
}
return 0;
}
......
......@@ -348,6 +348,7 @@
/* test modes */
#define SAA7134_SPECIAL_MODE 0x1d0
#define SAA7134_PRODUCTION_TEST_MODE 0x1d1
/* audio -- saa7133 + saa7135 only */
#define SAA7135_DSP_RWSTATE 0x580
......
......@@ -1666,6 +1666,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_QUERYCAP:
{
struct v4l2_capability *cap = arg;
unsigned int tuner_type = dev->tuner_type;
memset(cap,0,sizeof(*cap));
strcpy(cap->driver, "saa7134");
......@@ -1677,9 +1678,13 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_VIDEO_OVERLAY |
V4L2_CAP_VBI_CAPTURE |
V4L2_CAP_TUNER |
V4L2_CAP_READWRITE |
V4L2_CAP_STREAMING;
V4L2_CAP_STREAMING |
V4L2_CAP_TUNER;
if ((tuner_type == TUNER_ABSENT) || (tuner_type == UNSET))
cap->capabilities &= ~V4L2_CAP_TUNER;
return 0;
}
......
......@@ -192,6 +192,8 @@ struct saa7134_format {
#define SAA7134_BOARD_PHILIPS_EUROPA 69
#define SAA7134_BOARD_VIDEOMATE_DVBT_300 70
#define SAA7134_BOARD_VIDEOMATE_DVBT_200 71
#define SAA7134_BOARD_RTD_VFG7350 72
#define SAA7134_BOARD_RTD_VFG7330 73
#define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment