zoran-0.7 again...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi again,

I didn't clean the original dir on diff. Here again the clean patch.

Sorry for that....

Wolfgang
diff -u --new-file --recursive zoran-driver-0.7a/saa7110.c zoran-driver-0.7/saa7110.c
--- zoran-driver-0.7a/saa7110.c	Thu Nov 16 15:28:29 2000
+++ zoran-driver-0.7/saa7110.c	Mon Jan 15 18:47:38 2001
@@ -49,7 +49,7 @@
 
 #define	I2C_DELAY		10	/* 10 us or 100khz */
 
-#if LINUX_VERSION_CODE < 0x20400
+#if LINUX_VERSION_CODE < 0x20212
 typedef struct wait_queue *wait_queue_head_t;
 #define     init_waitqueue_head(x)   do { *(x) = NULL; } while (0)
 #endif
diff -u --new-file --recursive zoran-driver-0.7a/saa7111.c zoran-driver-0.7/saa7111.c
--- zoran-driver-0.7a/saa7111.c	Tue Nov 21 06:52:02 2000
+++ zoran-driver-0.7/saa7111.c	Mon Jan 15 18:46:22 2001
@@ -43,13 +43,8 @@
 #include <linux/version.h>
 #include <asm/uaccess.h>
 
-#if LINUX_VERSION_CODE < 0x20400
 #include <linux/i2c.h>
-#else
-#include <linux/i2c-old.h>
-#endif
-
-#include <linux/video_decoder.h>
+#include "linux/video_decoder.h"
 
 #define DEBUG(x)       /* Debug driver */   
 
@@ -148,12 +143,8 @@
       0x05, 0x00,      /* 05 - GAI2=256 */
 
       /* decoder */
-      // 0x06, 0xf6,      /* 06 - HSB at  13(50Hz) /  17(60Hz) pixels after end of last line */
-      //0x06, 0x10,      /* 06 - HSB at  13(50Hz) /  17(60Hz) pixels after end of last line */
-      0x06, 0xfa,      /* 06 - HSB at  13(50Hz) /  17(60Hz) pixels after end of last line */
-      // 0x07, 0xdd,      /* 07 - HSS at 113(50Hz) / 117(60Hz) pixels after end of last line */
-      // good for xawtv: 0x07, 0xe8,      /* 07 - HSS at 113(50Hz) / 117(60Hz) pixels after end of last line */
-      0x07, 0xf9,      /* 07 - HSS at 113(50Hz) / 117(60Hz) pixels after end of last line */
+      0x06, 0xf3,      /* 06 - HSB at  13(50Hz) /  17(60Hz) pixels after end of last line */
+      0x07, 0x13,      /* 07 - HSS at 113(50Hz) / 117(60Hz) pixels after end of last line */
       0x08, 0xc8,      /* 08 - AUFD=1, FSEL=1, EXFIL=0, VTRC=1, HPLL=0, VNOI=0 */
       0x09, 0x01,      /* 09 - BYPS=0, PREF=0, BPSS=0, VBLB=0, UPTCV=0, APER=1 */
       0x0a, 0x80,      /* 0a - BRIG=128 */
@@ -421,6 +412,7 @@
 {
    return i2c_register_driver(&i2c_driver_saa7111);
 }
+
 
 
 
diff -u --new-file --recursive zoran-driver-0.7a/saa7185.c zoran-driver-0.7/saa7185.c
--- zoran-driver-0.7a/saa7185.c	Tue Nov 21 06:52:31 2000
+++ zoran-driver-0.7/saa7185.c	Mon Jan 15 18:46:23 2001
@@ -49,7 +49,6 @@
 #include <linux/i2c-old.h>
 #endif
 
-
 #include <linux/video_encoder.h>
 
 #define DEBUG(x)   	   /* Debug driver */   
@@ -177,12 +176,14 @@
 
    0x6b, 0x91,   /* MODIN=2, PCREF=0, SCCLN=17 */
    //0x6c, 0x20,   /* SRCV1=0, TRCV2=1, ORCV1=0, PRCV1=0, CBLF=0, ORCV2=0, PRCV2=0 */
-   0x6c, 0x21,   /* SRCV1=0, TRCV2=1, ORCV1=0, PRCV1=0, CBLF=0, ORCV2=0, PRCV2=1 */
+   0x6c, 0x20,   /* SRCV1=0, TRCV2=1, ORCV1=0, PRCV1=0, CBLF=0, ORCV2=0, PRCV2=1 */
    0x6d, 0x00,   /* SRCM1=0, CCEN=0 */
 
    //0x6e, 0x0e,   /* HTRIG=0x00e, approx. centered, at least for PAL */
-   0x6e, 0x01,   /* HTRIG=0x00e, approx. centered, at least for PAL */
+   //0x6e, 0x1e,   /* HTRIG=0x005, approx. centered, at least for PAL */
+   0x6e, 0x0e,   /* HTRIG=0x005, approx. centered, at least for PAL */
    0x6f, 0x00,   /* HTRIG upper bits */
+   //0x70, 0x20,   /* PHRES=0, SBLN=1, VTRIG=0 */
    0x70, 0x20,   /* PHRES=0, SBLN=1, VTRIG=0 */
 
 /* The following should not be needed */
@@ -235,7 +236,6 @@
    if (encoder == NULL) {
       return -ENOMEM;
    }
-
    MOD_INC_USE_COUNT;
 
    memset(encoder, 0, sizeof(struct saa7185));
@@ -263,7 +263,7 @@
 {
    struct saa7185 * encoder = device->data;
    saa7185_write(encoder, 0x61, (encoder->reg[0x61]) | 0x40); /* SW: output off is active */
-   saa7185_write(encoder, 0x3a, (encoder->reg[0x3a]) | 0x80); /* SW: color bar */
+   //saa7185_write(encoder, 0x3a, (encoder->reg[0x3a]) | 0x80); /* SW: color bar */
    kfree(encoder);
    MOD_DEC_USE_COUNT;
    return 0;
diff -u --new-file --recursive zoran-driver-0.7a/zoran.c zoran-driver-0.7/zoran.c
--- zoran-driver-0.7a/zoran.c	Sat Nov 18 15:23:28 2000
+++ zoran-driver-0.7/zoran.c	Mon Jan 15 18:47:12 2001
@@ -70,7 +70,6 @@
 #include <asm/spinlock.h>
 #include <linux/i2c.h>
 #define     ZORAN_HARDWARE  VID_HARDWARE_BT848
-#define     init_waitqueue_head(x)   do { *(x) = NULL; } while (0)
 #else
 #include <linux/spinlock.h>
 #include <linux/vmalloc.h>
@@ -79,6 +78,10 @@
 #define     ZORAN_HARDWARE  VID_HARDWARE_ZR36067
 #endif
 
+#if LINUX_VERSION_CODE < 0x20212
+#define     init_waitqueue_head(x)   do { *(x) = NULL; } while (0)
+#endif
+
 #include <linux/videodev.h>
 
 #include <asm/uaccess.h>
@@ -827,14 +830,20 @@
 	hcrop1 = 2 * ((tvn->Wa - We) / 4);
 	hcrop2 = tvn->Wa - We - hcrop1;
 	HStart = tvn->HStart | 1;
-        if(zr->card == LML33) HStart += 62;
-        if(zr->card == BUZ) HStart += 67;
+        if (zr->card == LML33) HStart += 62;
+        if (zr->card == BUZ) {
+          if (zr->card==VIDEO_MODE_NTSC)
+            HStart += 58;
+          else
+            HStart += 44;
+        }
 	HEnd = HStart + tvn->Wa - 1;
 	HStart += hcrop1;
 	HEnd -= hcrop2;
 	reg = ((HStart & ZR36057_VFEHCR_Hmask) << ZR36057_VFEHCR_HStart)
 	    | ((HEnd & ZR36057_VFEHCR_Hmask) << ZR36057_VFEHCR_HEnd);
-	reg |= ZR36057_VFEHCR_HSPol;
+        if(zr->card != BUZ)
+	  reg |= ZR36057_VFEHCR_HSPol;
 	btwrite(reg, ZR36057_VFEHCR);
 
 	/* Vertical */
@@ -1582,6 +1591,7 @@
 {
 	struct tvnorm *tvn;
 	u32 reg;
+        unsigned HStart;
 
 	tvn = zr->timing;
 
@@ -1619,7 +1629,7 @@
                     | (0 << 4)   /* SImgPol=0 */
                     | (0 << 3)   /* BLPol=0 */
                     | (0 << 2)   /* FlPol=0 */
-                    | (0 << 1)   /* HSPol=0, sync on falling edge */
+                    | (1 << 1)   /* HSPol=0, sync on falling edge */
                     | (1 << 0);  /* VSPol=1 */
                 break;
         }
@@ -1686,7 +1696,16 @@
 	reg += zr->params.img_height;	/* Vend */
 	zr36060_write_16(zr, 0x044, reg);
 
-	reg = zr->params.img_x + tvn->HStart + 64;	/* Hstart */
+        HStart =  tvn->HStart;
+        if (zr->card == BUZ) {
+          if (zr->card==VIDEO_MODE_NTSC)
+            HStart += 58;
+          else
+            HStart += 44;
+        } else {
+            HStart += 64;
+        }
+	reg = zr->params.img_x + HStart;	/* Hstart */
 	zr36060_write_16(zr, 0x046, reg);
 
 	reg += zr->params.img_width;	/* Hend */
@@ -3060,8 +3079,11 @@
 	zr->params.decimation = 1;
 
 	zr->params.quality = 50;	/* default compression factor 8 */
-	zr->params.odd_even = 1;
-
+        if (zr->card == BUZ) {  /* I'm not shure if this is only needed for PAL with the Buz... (sw) */
+	    zr->params.odd_even = 0;
+        } else {
+	    zr->params.odd_even = 1;
+        }
 	zr->params.APPn = 0;
 	zr->params.APP_len = 0;	/* No APPn marker */
 	for (i = 0; i < 60; i++)
diff -u --new-file --recursive zoran-driver-0.7a/zoran.h zoran-driver-0.7/zoran.h
--- zoran-driver-0.7a/zoran.h	Thu Nov 16 15:28:29 2000
+++ zoran-driver-0.7/zoran.h	Mon Jan 15 18:47:26 2001
@@ -30,7 +30,7 @@
 #ifndef _BUZ_H_
 #define _BUZ_H_
 
-#if LINUX_VERSION_CODE < 0x20400
+#if LINUX_VERSION_CODE < 0x20212
 typedef struct wait_queue *wait_queue_head_t;
 #endif
 

[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux