fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / media / video / zoran_device.c
index 4e15afd..b075276 100644 (file)
@@ -4,7 +4,7 @@
  * Media Labs LML33/LML33R10.
  *
  * This part handles device access (PCI/I2C/codec/...)
- * 
+ *
  * Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx>
  *
  * Currently maintained by:
@@ -27,7 +27,6 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
@@ -430,7 +429,7 @@ zr36057_set_vfe (struct zoran              *zr,
        reg |= (HorDcm << ZR36057_VFESPFR_HorDcm);
        reg |= (VerDcm << ZR36057_VFESPFR_VerDcm);
        reg |= (DispMode << ZR36057_VFESPFR_DispMode);
-       if (format->palette != VIDEO_PALETTE_YUV422)
+       if (format->palette != VIDEO_PALETTE_YUV422 && format->palette != VIDEO_PALETTE_YUYV)
                reg |= ZR36057_VFESPFR_LittleEndian;
        /* RJ: I don't know, why the following has to be the opposite
         * of the corresponding ZR36060 setting, but only this way
@@ -442,6 +441,7 @@ zr36057_set_vfe (struct zoran              *zr,
        reg |= ZR36057_VFESPFR_TopField;
        switch (format->palette) {
 
+       case VIDEO_PALETTE_YUYV:
        case VIDEO_PALETTE_YUV422:
                reg |= ZR36057_VFESPFR_YUV422;
                break;
@@ -492,7 +492,7 @@ zr36057_set_vfe (struct zoran              *zr,
        /* (Ronald) don't write this if overlay_mask = NULL */
        if (zr->overlay_mask) {
                /* Write overlay clipping mask data, but don't enable overlay clipping */
-               /* RJ: since this makes only sense on the screen, we use 
+               /* RJ: since this makes only sense on the screen, we use
                 * zr->overlay_settings.width instead of video_width */
 
                mask_line_size = (BUZ_MAX_WIDTH + 31) / 32;
@@ -536,7 +536,7 @@ zr36057_overlay (struct zoran *zr,
                 * All error messages are internal driver checking only! */
 
                /* video display top and bottom registers */
-               reg = (u32) zr->buffer.base +
+               reg = (long) zr->buffer.base +
                    zr->overlay_settings.x *
                    ((zr->overlay_settings.format->depth + 7) / 8) +
                    zr->overlay_settings.y *
@@ -819,12 +819,12 @@ zr36057_set_jpg (struct zoran          *zr,
        if (zr->card.vfe_pol.hsync_pol)
                btor(ZR36057_VFEHCR_HSPol, ZR36057_VFEHCR);
        else
-               btand(~ZR36057_VFEHCR_HSPol, ZR36057_VFEHCR);           
+               btand(~ZR36057_VFEHCR_HSPol, ZR36057_VFEHCR);
        reg = ((tvn->HSyncStart) << ZR36057_HSP_HsyncStart) |
              (tvn->Wt << ZR36057_HSP_LineTot);
        btwrite(reg, ZR36057_HSP);
        reg = ((zr->jpg_settings.img_x +
-               tvn->HStart + 4) << ZR36057_FHAP_NAX) |
+               tvn->HStart + 4) << ZR36057_FHAP_NAX) |
              (zr->jpg_settings.img_width << ZR36057_FHAP_PAX);
        btwrite(reg, ZR36057_FHAP);
 
@@ -1272,15 +1272,15 @@ error_handler (struct zoran *zr,
        if (zr->JPEG_error != 1) {
                /*
                 * First entry: error just happened during normal operation
-                * 
+                *
                 * In BUZ_MODE_MOTION_COMPRESS:
-                * 
+                *
                 * Possible glitch in TV signal. In this case we should
                 * stop the codec and wait for good quality signal before
                 * restarting it to avoid further problems
-                * 
+                *
                 * In BUZ_MODE_MOTION_DECOMPRESS:
-                * 
+                *
                 * Bad JPEG frame: we have to mark it as processed (codec crashed
                 * and was not able to do it itself), and to remove it from queue.
                 */
@@ -1409,15 +1409,14 @@ error_handler (struct zoran *zr,
 
 irqreturn_t
 zoran_irq (int             irq,
-          void           *dev_id,
-          struct pt_regs *regs)
+          void           *dev_id)
 {
        u32 stat, astat;
        int count;
        struct zoran *zr;
        unsigned long flags;
 
-       zr = (struct zoran *) dev_id;
+       zr = dev_id;
        count = 0;
 
        if (zr->testing) {