summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <devnull@localhost>2005-10-06 18:12:51 +0000
committerNickolay V. Shmyrev <devnull@localhost>2005-10-06 18:12:51 +0000
commit96412f4acdf97fa45b5058d4e05dca7eb4db18f1 (patch)
tree356da0736db69482128ef673b47eaf5c66eb0397
parent9c2f6317a3233e4cc06ff19f37beab6ccead5e23 (diff)
downloadmediapointer-dvb-s2-96412f4acdf97fa45b5058d4e05dca7eb4db18f1.tar.gz
mediapointer-dvb-s2-96412f4acdf97fa45b5058d4e05dca7eb4db18f1.tar.bz2
* saa7134-cards.c:
* saa7134-video.c: (saa7134_video_init1): * saa7134.h: - Implement some differences in video output port register initialization between existing boards and RTD Embedded Technologies VFG7300 boards. Signed-off-by: Robert W. Boone <rboone@rtd.com>
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c6
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c60
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h11
-rw-r--r--v4l/ChangeLog12
4 files changed, 83 insertions, 6 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index 082c357aa..15238cb2c 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-cards.c,v 1.99 2005/10/04 14:52:08 nsh Exp $
+ * $Id: saa7134-cards.c,v 1.100 2005/10/06 18:12:51 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
@@ -2287,6 +2287,10 @@ struct saa7134_board saa7134_boards[] = {
}},
.mpeg = SAA7134_MPEG_EMPRESS,
.video_out = CCIR656,
+ .vid_port_opts = ( SET_T_CODE_POLARITY_NON_INVERTED |
+ SET_CLOCK_NOT_DELAYED |
+ SET_CLOCK_INVERTED |
+ SET_VSYNC_OFF ),
},
[SAA7134_BOARD_RTD_VFG7330] = {
.name = "RTD Embedded Technologies VFG7330",
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 16f18cf4c..6f42d735e 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-video.c,v 1.41 2005/09/14 23:42:53 nsh Exp $
+ * $Id: saa7134-video.c,v 1.42 2005/10/06 18:12:51 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -50,6 +50,43 @@ MODULE_PARM_DESC(noninterlaced,"video input is noninterlaced");
printk(KERN_DEBUG "%s/video: " fmt, dev->name , ## arg)
/* ------------------------------------------------------------------ */
+/* Defines for Video Output Port Register at address 0x191 */
+
+/* Bit 0: VIP code T bit polarity */
+
+#define VP_T_CODE_P_NON_INVERTED 0x00
+#define VP_T_CODE_P_INVERTED 0x01
+
+/* ------------------------------------------------------------------ */
+/* Defines for Video Output Port Register at address 0x195 */
+
+/* Bit 2: Video output clock delay control */
+
+#define VP_CLK_CTRL2_NOT_DELAYED 0x00
+#define VP_CLK_CTRL2_DELAYED 0x04
+
+/* Bit 1: Video output clock invert control */
+
+#define VP_CLK_CTRL1_NON_INVERTED 0x00
+#define VP_CLK_CTRL1_INVERTED 0x02
+
+/* ------------------------------------------------------------------ */
+/* Defines for Video Output Port Register at address 0x196 */
+
+/* Bits 2 to 0: VSYNC pin video vertical sync type */
+
+#define VP_VS_TYPE_MASK 0x07
+
+#define VP_VS_TYPE_OFF 0x00
+#define VP_VS_TYPE_V123 0x01
+#define VP_VS_TYPE_V_ITU 0x02
+#define VP_VS_TYPE_VGATE_L 0x03
+#define VP_VS_TYPE_RESERVED1 0x04
+#define VP_VS_TYPE_RESERVED2 0x05
+#define VP_VS_TYPE_F_ITU 0x06
+#define VP_VS_TYPE_SC_FID 0x07
+
+/* ------------------------------------------------------------------ */
/* data structs for video */
static int video_out[][9] = {
@@ -2303,13 +2340,28 @@ int saa7134_video_init1(struct saa7134_dev *dev)
if (saa7134_boards[dev->board].video_out) {
/* enable video output */
int vo = saa7134_boards[dev->board].video_out;
+ int video_reg;
+ unsigned int vid_port_opts = saa7134_boards[dev->board].vid_port_opts;
saa_writeb(SAA7134_VIDEO_PORT_CTRL0, video_out[vo][0]);
- saa_writeb(SAA7134_VIDEO_PORT_CTRL1, video_out[vo][1]);
+ video_reg = video_out[vo][1];
+ if (vid_port_opts & SET_T_CODE_POLARITY_NON_INVERTED)
+ video_reg &= ~VP_T_CODE_P_INVERTED;
+ saa_writeb(SAA7134_VIDEO_PORT_CTRL1, video_reg);
saa_writeb(SAA7134_VIDEO_PORT_CTRL2, video_out[vo][2]);
saa_writeb(SAA7134_VIDEO_PORT_CTRL3, video_out[vo][3]);
saa_writeb(SAA7134_VIDEO_PORT_CTRL4, video_out[vo][4]);
- saa_writeb(SAA7134_VIDEO_PORT_CTRL5, video_out[vo][5]);
- saa_writeb(SAA7134_VIDEO_PORT_CTRL6, video_out[vo][6]);
+ video_reg = video_out[vo][5];
+ if (vid_port_opts & SET_CLOCK_NOT_DELAYED)
+ video_reg &= ~VP_CLK_CTRL2_DELAYED;
+ if (vid_port_opts & SET_CLOCK_INVERTED)
+ video_reg |= VP_CLK_CTRL1_INVERTED;
+ saa_writeb(SAA7134_VIDEO_PORT_CTRL5, video_reg);
+ video_reg = video_out[vo][6];
+ if (vid_port_opts & SET_VSYNC_OFF) {
+ video_reg &= ~VP_VS_TYPE_MASK;
+ video_reg |= VP_VS_TYPE_OFF;
+ }
+ saa_writeb(SAA7134_VIDEO_PORT_CTRL6, video_reg);
saa_writeb(SAA7134_VIDEO_PORT_CTRL7, video_out[vo][7]);
saa_writeb(SAA7134_VIDEO_PORT_CTRL8, video_out[vo][8]);
}
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 3006dc001..5fa4ea4be 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134.h,v 1.58 2005/09/29 14:34:58 mchehab Exp $
+ * $Id: saa7134.h,v 1.59 2005/10/06 18:12:51 nsh Exp $
*
* v4l2 device driver for philips saa7134 based TV cards
*
@@ -210,6 +210,14 @@ struct saa7134_format {
#define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8
+/* ----------------------------------------------------------- */
+/* Video Output Port Register Initialization Options */
+
+#define SET_T_CODE_POLARITY_NON_INVERTED (1 << 0)
+#define SET_CLOCK_NOT_DELAYED (1 << 1)
+#define SET_CLOCK_INVERTED (1 << 2)
+#define SET_VSYNC_OFF (1 << 3)
+
struct saa7134_input {
char *name;
unsigned int vmux;
@@ -245,6 +253,7 @@ struct saa7134_board {
/* peripheral I/O */
enum saa7134_video_out video_out;
enum saa7134_mpeg_type mpeg;
+ unsigned int vid_port_opts;
};
#define card_has_radio(dev) (NULL != saa7134_boards[dev->board].radio.name)
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 2d0a7de09..c490a1241 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,15 @@
+2005-10-06 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * saa7134-cards.c:
+ * saa7134-video.c: (saa7134_video_init1):
+ * saa7134.h:
+
+ - Implement some differences in video output port
+ register initialization between existing boards and RTD Embedded
+ Technologies VFG7300 boards.
+
+ Signed-off-by: Robert W. Boone <rboone@rtd.com>
+
2005-10-06 16:10 nshmyrev
* Makefile: