diff -Naur pvrinput-0.1.1_orig/ivtv.h pvrinput-0.1.1/ivtv.h
--- pvrinput-0.1.1_orig/ivtv.h	2006-04-30 17:35:56.000000000 +0200
+++ pvrinput-0.1.1/ivtv.h	2006-05-10 00:21:35.000000000 +0200
@@ -36,59 +36,9 @@
 #define IVTV_STREAM_DVD_S1	13
 #define IVTV_STREAM_DVD_S2	14
 
-#define IVTV_SLICED_TELETEXT_B 	(1 << 0)
-#define IVTV_SLICED_CAPTION_625	(1 << 1)
-#define IVTV_SLICED_CAPTION_525	(1 << 2)
-#define IVTV_SLICED_WSS_625	(1 << 3)
-#define IVTV_SLICED_VPS		(1 << 4)
-#define IVTV_SLICED_UNKNOWN	(~0)
-#define IVTV_SLICED_625         (IVTV_SLICED_TELETEXT_B| \
-                                 IVTV_SLICED_WSS_625|IVTV_SLICED_VPS)
-#define IVTV_SLICED_525         (IVTV_SLICED_CAPTION_525)
-
 #define IVTV_YUV_TYPE_HME12		0	/* Hauppauge macro block format */
 #define IVTV_YUV_TYPE_FOURCC_YV12	1
 
-struct ivtv_sliced_vbi_format {
-	uint32_t service_set;	/* one or more of the IVTV_SLICED_ defines */
-	uint32_t packet_size;	/* the size in bytes of the ivtv_sliced_data packet */
-	uint32_t io_size;	/* maximum number of bytes passed by one read() call */
-	uint32_t reserved;
-};
-
-/* This structure is the same as the proposed v4l2_sliced_data structure */
-/* id is one of the VBI_SLICED_ flags. */
-struct ivtv_sliced_data {
-	uint32_t id;
-	uint32_t line;
-	unsigned char data[0];
-};
-
-struct ivtv_sliced_fmt {
-	uint32_t service_set;	/* one or more of the IVTV_SLICED_ defines */
-        uint32_t service_lines[2][24];
-	uint32_t packet_size;	/* the size in bytes of the ivtv_sliced_data packet */
-	uint32_t io_size;	/* maximum number of bytes passed by one read() call */
-	uint32_t reserved;
-};
-
-/* The four bit VBI data type found in the embedded VBI data of an
-   MPEG stream has one of the following values: */
-#define VBI_TYPE_TELETEXT 	0x1	// Teletext (uses lines 6-22 for PAL, 10-21 for NTSC)
-#define VBI_TYPE_CC 		0x4	// Closed Captions (line 21 NTSC, line 22 PAL)
-#define VBI_TYPE_WSS 		0x5	// Wide Screen Signal (line 20 NTSC, line 23 PAL)
-#define VBI_TYPE_VPS 		0x7	// Video Programming System (PAL) (line 16)
-
-/* These data types are not (yet?) used but are already reserved
-   for future use. */
-#ifdef IVTV_INTERNAL
-#define VBI_TYPE_NABST 		0x2	// NABST (NTSC)
-#define VBI_TYPE_MOJI 		0x3	// MOJI (NTSC)
-#define VBI_TYPE_VITC 		0x6	// Vertical Interval Time Code
-#define VBI_TYPE_GEMSTAR2X 	0x7	// Gemstar TV Guide (NTSC)
-#define VBI_TYPE_GEMSTAR1X 	0x8	// Gemstar TV Guide (NTSC)
-#endif
-
 /* device ioctls should use the range 29-199 */
 #define IVTV_IOC_START_DECODE      _IOW ('@', 29, struct ivtv_cfg_start_decode)
 #define IVTV_IOC_STOP_DECODE       _IOW ('@', 30, struct ivtv_cfg_stop_decode)
@@ -96,12 +46,6 @@
 #define IVTV_IOC_S_SPEED           _IOW ('@', 32, struct ivtv_speed)
 #define IVTV_IOC_DEC_STEP          _IOW ('@', 33, int)
 #define IVTV_IOC_DEC_FLUSH         _IOW ('@', 34, int)
-#define IVTV_IOC_S_VBI_MODE    	   _IOWR('@', 35, struct ivtv_sliced_vbi_format)
-#define IVTV_IOC_G_VBI_MODE    	   _IOR ('@', 36, struct ivtv_sliced_vbi_format)
-#define IVTV_IOC_S_VBI_FMT    	   _IOWR('@', 75, struct ivtv_sliced_fmt)
-#define IVTV_IOC_G_VBI_FMT    	   _IOR ('@', 76, struct ivtv_sliced_fmt)
-#define IVTV_IOC_TRY_VBI_FMT   	   _IOWR('@', 77, struct ivtv_sliced_fmt)
-#define IVTV_IOC_G_VBI_CAP 	   _IOR ('@', 78, struct ivtv_sliced_fmt)
 #define IVTV_IOC_PLAY     	   _IO  ('@', 37)
 #define IVTV_IOC_PAUSE    	   _IO  ('@', 38)
 #define IVTV_IOC_FRAMESYNC	   _IOR ('@', 39, struct ivtv_ioctl_framesync)
@@ -123,6 +67,9 @@
 #define IVTV_IOC_DEC_SPLICE        _IOW ('@', 58, int)
 #define IVTV_IOC_DEC_FAST_STOP     _IOW ('@', 59, int)
 #define IVTV_IOC_PREP_FRAME_YUV    _IOW ('@', 60, struct ivtvyuv_ioctl_dma_host_to_ivtv_args)
+#define IVTV_IOC_G_YUV_INTERLACE   _IOR ('@', 61, struct ivtv_ioctl_yuv_interlace)
+#define IVTV_IOC_S_YUV_INTERLACE   _IOW ('@', 62, struct ivtv_ioctl_yuv_interlace)
+#define IVTV_IOC_G_PTS             _IOR ('@', 63, u64)
 
 // Note: You only append to this structure, you never reorder the members,
 // you never play tricks with its alignment, you never change the size of
@@ -134,13 +81,33 @@
 	// 7-0 = patchlevel
 	char comment[IVTV_DRIVER_INFO_MAX_COMMENT_LENGTH];
         uint32_t cardnr;        // the ivtv card number (0-based)
+        uint32_t hw_flags;      // hardware flags: which chips are used?
 } __attribute__((packed));
 
 #define IVTV_DRIVER_INFO_V1_SIZE 108
 #define IVTV_DRIVER_INFO_V2_SIZE 112
+#define IVTV_DRIVER_INFO_V3_SIZE 116
 
 #define IVTV_IOC_G_DRIVER_INFO _IOWR('@', 100, struct ivtv_driver_info *)
 
+#define IVTV_HW_CX25840   (1 << 0)
+#define IVTV_HW_SAA7115   (1 << 1)
+#define IVTV_HW_SAA7127   (1 << 2)
+#define IVTV_HW_MSP34XX   (1 << 3)
+#define IVTV_HW_TUNER     (1 << 4)
+#define IVTV_HW_WM8775    (1 << 5)
+#define IVTV_HW_CS53L32A  (1 << 6)
+#define IVTV_HW_TVEEPROM  (1 << 7)
+#define IVTV_HW_SAA7114   (1 << 8)
+#define IVTV_HW_TVAUDIO   (1 << 9)
+#define IVTV_HW_UPD64031A (1 << 10)
+#define IVTV_HW_UPD6408X  (1 << 11)
+#define IVTV_HW_SAA717X   (1 << 12)
+#define IVTV_HW_WM8739    (1 << 13)
+#define IVTV_HW_GPIO      (1 << 14)
+
+#define IVTV_HW_SAA711X   (IVTV_HW_SAA7115 | IVTV_HW_SAA7114)
+
 // Version info
 // Note: never use the _INTERNAL versions of these macros
 
@@ -183,7 +150,7 @@
 /* Custom v4l controls */
 #ifndef V4L2_CID_PRIVATE_BASE
 #define V4L2_CID_PRIVATE_BASE			0x08000000
-#endif
+#endif /* V4L2_CID_PRIVATE_BASE */
 
 #define V4L2_CID_IVTV_FREQ      	(V4L2_CID_PRIVATE_BASE)
 #define V4L2_CID_IVTV_ENC       	(V4L2_CID_PRIVATE_BASE + 1)
@@ -255,6 +222,13 @@
 	uint32_t pulldown;
 	uint32_t stream_type;
 };
+struct ivtv_ioctl_yuv_interlace{
+	int interlace_mode; /* Takes one of IVTV_YUV_MODE_xxxxxx values */
+	int threshold; /* If mode is auto then if src_height <= this value treat as progressive otherwise treat as interlaced */
+};
+#define IVTV_YUV_MODE_INTERLACED	0
+#define IVTV_YUV_MODE_PROGRESSIVE	1
+#define IVTV_YUV_MODE_AUTO		2
 
 /* Framebuffer external API */
 
@@ -330,6 +304,8 @@
 	int top;
 };
 
+
+
 /* Framebuffer ioctls should use the range 1 - 28 */
 #define IVTVFB_IOCTL_GET_STATE          _IOR('@', 1, struct ivtvfb_ioctl_state_info)
 #define IVTVFB_IOCTL_SET_STATE          _IOW('@', 2, struct ivtvfb_ioctl_state_info)
@@ -353,6 +329,13 @@
 /* Do not use these structures and ioctls in code that you want to release.
    Only to be used for testing and by the utilities ivtvctl, ivtvfbctl and fwapi. */
 
+/* These are the VBI types as they appear in the embedded VBI private packets.
+   It is very likely that this will disappear and be replaced by the DVB standard. */
+#define IVTV_SLICED_TYPE_TELETEXT_B     (1)
+#define IVTV_SLICED_TYPE_CAPTION_525    (4)
+#define IVTV_SLICED_TYPE_WSS_625        (5)
+#define IVTV_SLICED_TYPE_VPS            (7)
+
 #define IVTV_ENC_STREAM_TYPE_MPG 0
 #define IVTV_ENC_STREAM_TYPE_YUV 1
 #define IVTV_ENC_STREAM_TYPE_VBI 2
@@ -387,21 +370,12 @@
 	struct ivtv_ioctl_fwapi api;
 };
 
-struct ivtv_saa71xx_reg {
-	uint32_t reg;
+struct ivtv_ioctl_register {
+	uint32_t i2c_id; /* I2C ID of the I2C chip. 0 for the I2C adapter. */
+	unsigned long reg;
 	uint32_t val;
 };
 
-struct ivtv_itvc_reg {
-	uint32_t reg;
-	uint32_t val;
-};
-
-struct ivtv_cx25840_setting {
-	uint32_t index;
-	uint32_t value;
-};
-
 struct ivtv_msp_matrix {
 	int input;
 	int output;
@@ -416,6 +390,7 @@
 #define IVTV_DBGFLG_I2C   (1 << 5)
 #define IVTV_DBGFLG_IRQ   (1 << 6)
 #define IVTV_DBGFLG_DEC   (1 << 7)
+#define IVTV_DBGFLG_YUV   (1 << 8)
 
 /* BLT RasterOps */
 #define IVTV_BLT_RASTER_ZERO		0
@@ -448,18 +423,15 @@
 #define IVTV_IOC_ZCOUNT            _IO  ('@', 203)
 #define IVTV_IOC_FWAPI             _IOWR('@', 204, struct ivtv_ioctl_fwapi)
 #define IVTV_IOC_EVENT_SETUP       _IOWR('@', 205, struct ivtv_ioctl_event)
-#define IVTV_IOC_G_SAA7115_REG     _IOWR('@', 206, struct ivtv_saa71xx_reg)
-#define IVTV_IOC_S_SAA7115_REG     _IOW ('@', 207, struct ivtv_saa71xx_reg)
-#define IVTV_IOC_G_SAA7127_REG     _IOWR('@', 208, struct ivtv_saa71xx_reg)
-#define IVTV_IOC_S_SAA7127_REG     _IOW ('@', 209, struct ivtv_saa71xx_reg)
+#define IVTV_IOC_G_DECODER_REG     _IOWR('@', 206, struct ivtv_ioctl_register)
+#define IVTV_IOC_S_DECODER_REG     _IOW ('@', 207, struct ivtv_ioctl_register)
+#define IVTV_IOC_G_ENCODER_REG     _IOWR('@', 208, struct ivtv_ioctl_register)
+#define IVTV_IOC_S_ENCODER_REG     _IOW ('@', 209, struct ivtv_ioctl_register)
 #define IVTV_IOC_S_MSP_MATRIX      _IOW ('@', 210, struct ivtv_msp_matrix)
-#define IVTV_IOC_G_ITVC_REG        _IOWR('@', 211, struct ivtv_itvc_reg)
-#define IVTV_IOC_S_ITVC_REG        _IOW ('@', 212, struct ivtv_itvc_reg)
-#define IVTV_IOC_G_CX25840_SETTING _IOWR('@', 213, struct ivtv_cx25840_setting)
-#define IVTV_IOC_S_CX25840_SETTING _IOW ('@', 214, struct ivtv_cx25840_setting)
-#define IVTV_IOC_G_VIDEO_STATUS    _IOR ('@', 215, int *)
-#define IVTV_IOC_RESET_IR          _IO  ('@', 216)
+#define IVTV_IOC_G_ITVC_REG        _IOWR('@', 211, struct ivtv_ioctl_register)
+#define IVTV_IOC_S_ITVC_REG        _IOW ('@', 212, struct ivtv_ioctl_register)
+#define IVTV_IOC_RESET_IR          _IO  ('@', 213)
 
-#endif
+#endif /* IVTV_INTERNAL */
 
-#endif
+#endif /* _LINUX_IVTV_H */
