[PATCH] v4l: 800: whitespace cleanups
Mauro Carvalho Chehab [Wed, 9 Nov 2005 05:37:43 +0000 (21:37 -0800)]
- Whitespace Cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

69 files changed:
Documentation/video4linux/README.cx88
Documentation/video4linux/bttv/Cards
Documentation/video4linux/bttv/README
Documentation/video4linux/bttv/Sound-FAQ
Documentation/video4linux/lifeview.txt
drivers/media/common/ir-common.c
drivers/media/video/bt832.c
drivers/media/video/bt832.h
drivers/media/video/bttv-cards.c
drivers/media/video/bttv-driver.c
drivers/media/video/bttv-gpio.c
drivers/media/video/bttv-i2c.c
drivers/media/video/bttv-if.c
drivers/media/video/bttv-risc.c
drivers/media/video/bttv.h
drivers/media/video/bttvp.h
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-cards.c
drivers/media/video/cx88/cx88-core.c
drivers/media/video/cx88/cx88-dvb.c
drivers/media/video/cx88/cx88-i2c.c
drivers/media/video/cx88/cx88-input.c
drivers/media/video/cx88/cx88-mpeg.c
drivers/media/video/cx88/cx88-reg.h
drivers/media/video/cx88/cx88-video.c
drivers/media/video/cx88/cx88.h
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-core.c
drivers/media/video/em28xx/em28xx-i2c.c
drivers/media/video/em28xx/em28xx-input.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/em28xx/em28xx.h
drivers/media/video/ir-kbd-gpio.c
drivers/media/video/ir-kbd-i2c.c
drivers/media/video/msp3400.c
drivers/media/video/mt20xx.c
drivers/media/video/saa711x.c
drivers/media/video/saa7134/saa6752hs.c
drivers/media/video/saa7134/saa7134-alsa.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-dvb.c
drivers/media/video/saa7134/saa7134-empress.c
drivers/media/video/saa7134/saa7134-i2c.c
drivers/media/video/saa7134/saa7134-input.c
drivers/media/video/saa7134/saa7134-oss.c
drivers/media/video/saa7134/saa7134-reg.h
drivers/media/video/saa7134/saa7134-ts.c
drivers/media/video/saa7134/saa7134-tvaudio.c
drivers/media/video/saa7134/saa7134-video.c
drivers/media/video/saa7134/saa7134.h
drivers/media/video/tda7432.c
drivers/media/video/tda8290.c
drivers/media/video/tda9875.c
drivers/media/video/tda9887.c
drivers/media/video/tea5767.c
drivers/media/video/tuner-core.c
drivers/media/video/tuner-simple.c
drivers/media/video/tvaudio.c
drivers/media/video/tveeprom.c
drivers/media/video/tvmixer.c
drivers/media/video/v4l1-compat.c
drivers/media/video/video-buf.c
drivers/media/video/wm8775.c
include/linux/videodev.h
include/linux/videodev2.h
include/media/audiochip.h
include/media/tuner.h
include/media/video-buf.h

index 0b93455..06a33a4 100644 (file)
@@ -17,9 +17,9 @@ audio
        - The chip specs for the on-chip TV sound decoder are next
          to useless :-/
        - Neverless the builtin TV sound decoder starts working now,
-          at least for PAL-BG.  Other TV norms need other code ...
-          FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE
-          USING.
+         at least for PAL-BG.  Other TV norms need other code ...
+         FOR ANY REPORTS ON THIS PLEASE MENTION THE TV NORM YOU ARE
+         USING.
        - Most tuner chips do provide mono sound, which may or may not
          be useable depending on the board design.  With the Hauppauge
          cards it works, so there is mono sound available as fallback.
index 8f1941e..d338965 100644 (file)
@@ -149,11 +149,11 @@ Lifeview Flyvideo Series:
   2) There is a print on the PCB:
       LR25       = Flyvideo (Zoran ZR36120, SAA7110A)
       LR26 Rev.N = Flyvideo II (Bt848)
-           Rev.O = Flyvideo II (Bt878)
+          Rev.O = Flyvideo II (Bt878)
       LR37 Rev.C = Flyvideo EZ (Capture only, ZR36120 + SAA7110)
       LR38 Rev.A1= Flyvideo II EZ (Bt848 capture only)
       LR50 Rev.Q = Flyvideo 98 (w/eeprom and PCI subsystem ID)
-           Rev.W = Flyvideo 98 (no eeprom)
+          Rev.W = Flyvideo 98 (no eeprom)
       LR51 Rev.E = Flyvideo 98 EZ (capture only)
       LR90       = Flyvideo 2000 (Bt878)
                   Flyvideo 2000S (Bt878) w/Stereo TV (Package incl. LR91 daughterboard)
@@ -163,7 +163,7 @@ Lifeview Flyvideo Series:
       LR136     = Flyvideo 2100/3100 (Low profile, SAA7130/SAA7134)
       LR137      = Flyvideo DV2000/DV3000 (SAA7130/SAA7134 + IEEE1394)
       LR138 Rev.C= Flyvideo 2000 (SAA7130)
-               or Flyvideo 3000 (SAA7134) w/Stereo TV
+               or Flyvideo 3000 (SAA7134) w/Stereo TV
                   These exist in variations w/FM and w/Remote sometimes denoted
                   by suffixes "FM" and "R".
   3) You have a laptop (miniPCI card):
@@ -197,7 +197,7 @@ Typhoon TV card series:
   50680 "TV Tuner Pal BG" (blue package)= Pixelview PV-BT878P+ (Rev 9B)
   50681 "TV Tuner PCI Pal I" (variant of 50680)
   50682 "TView TV/FM Tuner Pal BG"       = Flyvideo 98FM (LR50 Rev.Q)
-         Note: The package has a picture of CPH05x (which would be a real TView)
+        Note: The package has a picture of CPH05x (which would be a real TView)
   50683 "TV Tuner PCI SECAM" (variant of 50680)
   50684 "TV Tuner Pal BG"                = Pixelview 878TV(Rev.3D)
   50686 "TV Tuner"                       = KNC1 TV Station
@@ -418,9 +418,9 @@ Lifetec/Medion/Tevion/Aldi
 --------------------------
    LT9306/MD9306 = CPH061
    LT9415/MD9415 = LR90 Rev.F or Rev.G
-          MD9592 = Avermedia TVphone98 (PCI_ID=1461:0003), PCB-Rev=M168II-B (w/TDA9873H)
-          MD9717 = KNC One (Rev D4, saa7134, FM1216 MK2 tuner)
-          MD5044 = KNC One (Rev D4, saa7134, FM1216ME MK3 tuner)
+         MD9592 = Avermedia TVphone98 (PCI_ID=1461:0003), PCB-Rev=M168II-B (w/TDA9873H)
+         MD9717 = KNC One (Rev D4, saa7134, FM1216 MK2 tuner)
+         MD5044 = KNC One (Rev D4, saa7134, FM1216ME MK3 tuner)
 
 Modular Technologies (www.modulartech.com) UK
 ---------------------------------------------
@@ -453,10 +453,10 @@ Technisat
    Discos ADR PC-Karte ISA (no TV!)
    Discos ADR PC-Karte PCI (probably no TV?)
    Techni-PC-Sat (Sat. analog)
-         Rev 1.2 (zr36120, vpx3220, stv0030, saa5246, BSJE3-494A)
+        Rev 1.2 (zr36120, vpx3220, stv0030, saa5246, BSJE3-494A)
    Mediafocus I (zr36120/zr36125, drp3510, Sat. analog + ADR Radio)
    Mediafocus II (saa7146, Sat. analog)
-         SatADR Rev 2.1 (saa7146a, saa7113h, stv0056a, msp3400c, drp3510a, BSKE3-307A)
+        SatADR Rev 2.1 (saa7146a, saa7113h, stv0056a, msp3400c, drp3510a, BSKE3-307A)
    SkyStar 1 DVB  (AV7110) = Technotrend Premium
    SkyStar 2 DVB  (B2C2) (=Sky2PC)
 
index a72f4c9..7ca2154 100644 (file)
@@ -42,9 +42,9 @@ bttv uses the PCI Subsystem ID to autodetect the card type.  lspci lists
 the Subsystem ID in the second line, looks like this:
 
 00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 (rev 02)
-        Subsystem: Hauppauge computer works Inc. WinTV/GO
-        Flags: bus master, medium devsel, latency 32, IRQ 5
-        Memory at e2000000 (32-bit, prefetchable) [size=4K]
+       Subsystem: Hauppauge computer works Inc. WinTV/GO
+       Flags: bus master, medium devsel, latency 32, IRQ 5
+       Memory at e2000000 (32-bit, prefetchable) [size=4K]
 
 only bt878-based cards can have a subsystem ID (which does not mean
 that every card really has one).  bt848 cards can't have a Subsystem
index 5c98224..1e6328f 100644 (file)
@@ -61,8 +61,8 @@ line for your board.  The important fields are these two:
 struct tvcard
 {
        [ ... ]
-        u32 gpiomask;
-        u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
+       u32 gpiomask;
+       u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
 };
 
 gpiomask specifies which pins are used to control the audio mux chip.
@@ -126,7 +126,7 @@ muxsel          - video mux, input->registervalue mapping
 pll             - same as pll= insmod option
 tuner_type      - same as tuner= insmod option
 *_modulename    - hint whenever some card needs this or that audio
-                  module loaded to work properly.
+                 module loaded to work properly.
 has_radio      - whenever this TV card has a radio tuner.
 no_msp34xx     - "1" disables loading of msp3400.o module
 no_tda9875     - "1" disables loading of tda9875.o module
index b07ea79..f66320b 100644 (file)
@@ -10,33 +10,33 @@ bt878:
 ------------------------------------------------------------------------------
 
 saa7134:
-                /* LifeView FlyTV Platinum FM (LR214WF) */
-                /* "Peter Missel <peter.missel@onlinehome.de> */
-                .name           = "LifeView FlyTV Platinum FM",
-                /*      GP27    MDT2005 PB4 pin 10 */
-                /*      GP26    MDT2005 PB3 pin 9 */
-                /*      GP25    MDT2005 PB2 pin 8 */
-                /*      GP23    MDT2005 PB1 pin 7 */
-                /*      GP22    MDT2005 PB0 pin 6 */
-                /*      GP21    MDT2005 PB5 pin 11 */
-                /*      GP20    MDT2005 PB6 pin 12 */
-                /*      GP19    MDT2005 PB7 pin 13 */
-                /*      nc      MDT2005 PA3 pin 2 */
-                /*      Remote  MDT2005 PA2 pin 1 */
-                /*      GP18    MDT2005 PA1 pin 18 */
-                /*      nc      MDT2005 PA0 pin 17 strap low */
+               /* LifeView FlyTV Platinum FM (LR214WF) */
+               /* "Peter Missel <peter.missel@onlinehome.de> */
+               .name           = "LifeView FlyTV Platinum FM",
+               /*      GP27    MDT2005 PB4 pin 10 */
+               /*      GP26    MDT2005 PB3 pin 9 */
+               /*      GP25    MDT2005 PB2 pin 8 */
+               /*      GP23    MDT2005 PB1 pin 7 */
+               /*      GP22    MDT2005 PB0 pin 6 */
+               /*      GP21    MDT2005 PB5 pin 11 */
+               /*      GP20    MDT2005 PB6 pin 12 */
+               /*      GP19    MDT2005 PB7 pin 13 */
+               /*      nc      MDT2005 PA3 pin 2 */
+               /*      Remote  MDT2005 PA2 pin 1 */
+               /*      GP18    MDT2005 PA1 pin 18 */
+               /*      nc      MDT2005 PA0 pin 17 strap low */
 
-                /*      GP17    Strap "GP7"=High */
-                /*      GP16    Strap "GP6"=High
-                                0=Radio 1=TV
-                                Drives SA630D ENCH1 and HEF4052 A1 pins
-                                to do FM radio through SIF input */
-                /*      GP15    nc */
-                /*      GP14    nc */
-                /*      GP13    nc */
-                /*      GP12    Strap "GP5" = High */
-                /*      GP11    Strap "GP4" = High */
-                /*      GP10    Strap "GP3" = High */
-                /*      GP09    Strap "GP2" = Low */
-                /*      GP08    Strap "GP1" = Low */
-                /*      GP07.00 nc */
+               /*      GP17    Strap "GP7"=High */
+               /*      GP16    Strap "GP6"=High
+                               0=Radio 1=TV
+                               Drives SA630D ENCH1 and HEF4052 A1 pins
+                               to do FM radio through SIF input */
+               /*      GP15    nc */
+               /*      GP14    nc */
+               /*      GP13    nc */
+               /*      GP12    Strap "GP5" = High */
+               /*      GP11    Strap "GP4" = High */
+               /*      GP10    Strap "GP3" = High */
+               /*      GP09    Strap "GP2" = Low */
+               /*      GP08    Strap "GP1" = Low */
+               /*      GP07.00 nc */
index 31fccb4..4b71fd6 100644 (file)
@@ -116,7 +116,7 @@ IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = {
        [ 46 ] = KEY_BLUE,
        [ 24 ] = KEY_KPPLUS,            /* fine tune + */
        [ 25 ] = KEY_KPMINUS,           /* fine tune - */
-        [ 33 ] = KEY_KPDOT,
+       [ 33 ] = KEY_KPDOT,
        [ 19 ] = KEY_KPENTER,
        [ 34 ] = KEY_BACK,
        [ 35 ] = KEY_PLAYPAUSE,
@@ -239,7 +239,7 @@ static void ir_input_key_event(struct input_dev *dev, struct ir_input_state *ir)
        dprintk(1,"%s: key event code=%d down=%d\n",
                dev->name,ir->keycode,ir->keypressed);
        input_report_key(dev,ir->keycode,ir->keypressed);
-        input_sync(dev);
+       input_sync(dev);
 }
 
 /* -------------------------------------------------------------------------- */
index 76c1b63..3e42493 100644 (file)
@@ -54,36 +54,36 @@ static struct i2c_driver driver;
 static struct i2c_client client_template;
 
 struct bt832 {
-        struct i2c_client client;
+       struct i2c_client client;
 };
 
 int bt832_hexdump(struct i2c_client *i2c_client_s, unsigned char *buf)
 {
        int i,rc;
        buf[0]=0x80; // start at register 0 with auto-increment
-        if (1 != (rc = i2c_master_send(i2c_client_s,buf,1)))
-                printk("bt832: i2c i/o error: rc == %d (should be 1)\n",rc);
+       if (1 != (rc = i2c_master_send(i2c_client_s,buf,1)))
+               printk("bt832: i2c i/o error: rc == %d (should be 1)\n",rc);
 
-        for(i=0;i<65;i++)
-                buf[i]=0;
-        if (65 != (rc=i2c_master_recv(i2c_client_s,buf,65)))
-                printk("bt832: i2c i/o error: rc == %d (should be 65)\n",rc);
+       for(i=0;i<65;i++)
+               buf[i]=0;
+       if (65 != (rc=i2c_master_recv(i2c_client_s,buf,65)))
+               printk("bt832: i2c i/o error: rc == %d (should be 65)\n",rc);
 
-        // Note: On READ the first byte is the current index
-        //  (e.g. 0x80, what we just wrote)
+       // Note: On READ the first byte is the current index
+       //  (e.g. 0x80, what we just wrote)
 
-        if(1) {
-                int i;
-                printk("BT832 hexdump:\n");
-                for(i=1;i<65;i++) {
+       if(1) {
+               int i;
+               printk("BT832 hexdump:\n");
+               for(i=1;i<65;i++) {
                        if(i!=1) {
                          if(((i-1)%8)==0) printk(" ");
-                          if(((i-1)%16)==0) printk("\n");
+                         if(((i-1)%16)==0) printk("\n");
                        }
-                        printk(" %02x",buf[i]);
-                }
-                printk("\n");
-        }
+                       printk(" %02x",buf[i]);
+               }
+               printk("\n");
+       }
        return 0;
 }
 
@@ -102,13 +102,13 @@ int bt832_init(struct i2c_client *i2c_client_s)
                return 0;
        }
 
-        printk("Write 0 tp VPSTATUS\n");
-        buf[0]=BT832_VP_STATUS; // Reg.52
-        buf[1]= 0x00;
-        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
-                printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
+       printk("Write 0 tp VPSTATUS\n");
+       buf[0]=BT832_VP_STATUS; // Reg.52
+       buf[1]= 0x00;
+       if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+               printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
 
-        bt832_hexdump(i2c_client_s,buf);
+       bt832_hexdump(i2c_client_s,buf);
 
 
        // Leave low power mode:
@@ -116,17 +116,17 @@ int bt832_init(struct i2c_client *i2c_client_s)
        buf[0]=BT832_CAM_SETUP0; //0x39 57
        buf[1]=0x08;
        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
-                printk("bt832: i2c i/o error LLPM: rc == %d (should be 2)\n",rc);
+               printk("bt832: i2c i/o error LLPM: rc == %d (should be 2)\n",rc);
 
-        bt832_hexdump(i2c_client_s,buf);
+       bt832_hexdump(i2c_client_s,buf);
 
        printk("Write 0 tp VPSTATUS\n");
-        buf[0]=BT832_VP_STATUS; // Reg.52
-        buf[1]= 0x00;
-        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
-                printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
+       buf[0]=BT832_VP_STATUS; // Reg.52
+       buf[1]= 0x00;
+       if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+               printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
 
-        bt832_hexdump(i2c_client_s,buf);
+       bt832_hexdump(i2c_client_s,buf);
 
 
        // Enable Output
@@ -134,22 +134,22 @@ int bt832_init(struct i2c_client *i2c_client_s)
        buf[0]=BT832_VP_CONTROL1; // Reg.40
        buf[1]= 0x27 & (~0x01); // Default | !skip
        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
-                printk("bt832: i2c i/o error EO: rc == %d (should be 2)\n",rc);
+               printk("bt832: i2c i/o error EO: rc == %d (should be 2)\n",rc);
 
-        bt832_hexdump(i2c_client_s,buf);
+       bt832_hexdump(i2c_client_s,buf);
 
 
        // for testing (even works when no camera attached)
        printk("bt832: *** Generate NTSC M Bars *****\n");
        buf[0]=BT832_VP_TESTCONTROL0; // Reg. 42
        buf[1]=3; // Generate NTSC System M bars, Generate Frame timing internally
-        if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
-                printk("bt832: i2c i/o error MBAR: rc == %d (should be 2)\n",rc);
+       if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+               printk("bt832: i2c i/o error MBAR: rc == %d (should be 2)\n",rc);
 
        printk("Bt832: Camera Present: %s\n",
                (buf[1+BT832_CAM_STATUS] & BT832_56_CAMERA_PRESENT) ? "yes":"no");
 
-        bt832_hexdump(i2c_client_s,buf);
+       bt832_hexdump(i2c_client_s,buf);
        kfree(buf);
        return 1;
 }
@@ -162,17 +162,17 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, int kind)
 
        printk("bt832_attach\n");
 
-        client_template.adapter = adap;
-        client_template.addr    = addr;
+       client_template.adapter = adap;
+       client_template.addr    = addr;
 
-        printk("bt832: chip found @ 0x%x\n", addr<<1);
+       printk("bt832: chip found @ 0x%x\n", addr<<1);
 
-        if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL)))
-                return -ENOMEM;
+       if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL)))
+               return -ENOMEM;
        memset(t,0,sizeof(*t));
        t->client = client_template;
-        i2c_set_clientdata(&t->client, t);
-        i2c_attach_client(&t->client);
+       i2c_set_clientdata(&t->client, t);
+       i2c_attach_client(&t->client);
 
        if(! bt832_init(&t->client)) {
                bt832_detach(&t->client);
@@ -211,7 +211,7 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
 
        printk("bt832: command %x\n",cmd);
 
-        switch (cmd) {
+       switch (cmd) {
                case BT832_HEXDUMP: {
                        unsigned char *buf;
                        buf=kmalloc(65,GFP_KERNEL);
index 9b6a8d2..1ce8fa7 100644 (file)
@@ -233,8 +233,8 @@ SetInterlaceMode( spec.interlace );
 /* from web:
  Video Sampling
 Digital video is a sampled form of analog video. The most common sampling schemes in use today are:
-                  Pixel Clock   Horiz    Horiz    Vert
-                   Rate         Total    Active
+                 Pixel Clock   Horiz    Horiz    Vert
+                  Rate         Total    Active
 NTSC square pixel  12.27 MHz    780      640      525
 NTSC CCIR-601      13.5  MHz    858      720      525
 NTSC 4FSc          14.32 MHz    910      768      525
index 3937da0..92bb515 100644 (file)
@@ -6,7 +6,7 @@
     like the big tvcards array for the most part
 
     Copyright (C) 1996,97,98 Ralph  Metzler (rjkm@thp.uni-koeln.de)
-                           & Marcus Metzler (mocm@thp.uni-koeln.de)
+                          & Marcus Metzler (mocm@thp.uni-koeln.de)
     (c) 1999-2001 Gerd Knorr <kraxel@goldbach.in-berlin.de>
 
     This program is free software; you can redistribute it and/or modify
@@ -163,10 +163,10 @@ static struct CARD {
        { 0x6609107d, BTTV_BOARD_WINFAST2000,   "Leadtek TV 2000 XP" },
        { 0x263610b4, BTTV_BOARD_STB2,          "STB TV PCI FM, Gateway P/N 6000704" },
        { 0x264510b4, BTTV_BOARD_STB2,          "STB TV PCI FM, Gateway P/N 6000704" },
-       { 0x402010fc, BTTV_BOARD_GVBCTV3PCI,    "I-O Data Co. GV-BCTV3/PCI" },
+       { 0x402010fc, BTTV_BOARD_GVBCTV3PCI,    "I-O Data Co. GV-BCTV3/PCI" },
        { 0x405010fc, BTTV_BOARD_GVBCTV4PCI,    "I-O Data Co. GV-BCTV4/PCI" },
        { 0x407010fc, BTTV_BOARD_GVBCTV5PCI,    "I-O Data Co. GV-BCTV5/PCI" },
-       { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI,    "I-O Data Co. GV-BCTV5/PCI" },
+       { 0xd01810fc, BTTV_BOARD_GVBCTV5PCI,    "I-O Data Co. GV-BCTV5/PCI" },
 
        { 0x001211bd, BTTV_BOARD_PINNACLE,      "Pinnacle PCTV" },
        /* some cards ship with byteswapped IDs ... */
@@ -277,7 +277,7 @@ static struct CARD {
        { 0x20007063, BTTV_BOARD_PC_HDTV,       "pcHDTV HD-2000 TV"},
        { 0x82b2aa6a, BTTV_BOARD_SIMUS_GVC1100, "SIMUS GVC1100" },
        { 0x146caa0c, BTTV_BOARD_PV951,         "ituner spectra8" },
-       { 0x200a1295, BTTV_BOARD_PXC200,        "ImageNation PXC200A" },
+       { 0x200a1295, BTTV_BOARD_PXC200,        "ImageNation PXC200A" },
 
        { 0x40111554, BTTV_BOARD_PV_BT878P_9B,  "Prolink Pixelview PV-BT" },
        { 0x17de0a01, BTTV_BOARD_KWORLD,        "Mecer TV/FM/Video Tuner" },
@@ -1346,17 +1346,17 @@ struct tvcard bttv_tvcards[] = {
        },
        [BTTV_BOARD_GMV1] = {
                /* Adrian Cox <adrian@humboldt.co.uk */
-               .name           = "AG Electronics GMV1",
+               .name           = "AG Electronics GMV1",
                .video_inputs   = 2,
                .audio_inputs   = 0,
-               .tuner          = -1,
-               .svhs           = 1,
+               .tuner          = -1,
+               .svhs           = 1,
                .gpiomask       = 0xF,
-               .muxsel         = { 2, 2},
+               .muxsel         = { 2, 2},
                .audiomux       = { },
                .no_msp34xx     = 1,
                .needs_tvaudio  = 0,
-               .pll            = PLL_28,
+               .pll            = PLL_28,
                .tuner_type     = -1,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
@@ -2895,7 +2895,7 @@ void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
        else if (0 == strncmp(eeprom_data+20,"Picolo",7))
                type = BTTV_BOARD_EURESYS_PICOLO;
        else if (eeprom_data[0] == 0x84 && eeprom_data[2]== 0)
-                type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
+               type = BTTV_BOARD_HAUPPAUGE; /* old bt848 */
 
        if (-1 != type) {
                btv->c.type = type;
@@ -2929,7 +2929,7 @@ static void flyvideo_gpio(struct bttv *btv)
        switch(ttype) {
        case 0x0: tuner=2; /* NTSC, e.g. TPI8NSR11P */
                break;
-        case 0x2: tuner=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
+       case 0x2: tuner=39;/* LG NTSC (newer TAPC series) TAPC-H701P */
                break;
        case 0x4: tuner=5; /* Philips PAL TPI8PSB02P, TPI8PSB12P, TPI8PSB12D or FI1216, FM1216 */
                break;
@@ -2945,7 +2945,7 @@ static void flyvideo_gpio(struct bttv *btv)
        has_radio           =   gpio & 0x400000;
        /*   unknown                   0x200000;
         *   unknown2                  0x100000; */
-        is_capture_only     = !(gpio & 0x008000); /* GPIO15 */
+       is_capture_only     = !(gpio & 0x008000); /* GPIO15 */
        has_tda9820_tda9821 = !(gpio & 0x004000);
        is_lr90             = !(gpio & 0x002000); /* else LR26/LR50 (LR38/LR51 f. capture only) */
        /*
@@ -2982,7 +2982,7 @@ static void miro_pinnacle_gpio(struct bttv *btv)
        char *info;
 
        gpio_inout(0xffffff, 0);
-        gpio = gpio_read();
+       gpio = gpio_read();
        id   = ((gpio>>10) & 63) -1;
        msp  = bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx");
        if (id < 32) {
@@ -3093,7 +3093,7 @@ static void eagle_muxsel(struct bttv *btv, unsigned int input)
 
 static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
 {
-        static const int masks[] = {0x30, 0x01, 0x12, 0x23};
+       static const int masks[] = {0x30, 0x01, 0x12, 0x23};
        gpio_write(masks[input%4]);
 }
 
@@ -3161,10 +3161,10 @@ void __devinit bttv_init_card1(struct bttv *btv)
        switch (btv->c.type) {
        case BTTV_BOARD_HAUPPAUGE:
        case BTTV_BOARD_HAUPPAUGE878:
-                boot_msp34xx(btv,5);
+               boot_msp34xx(btv,5);
                break;
        case BTTV_BOARD_VOODOOTV_FM:
-                boot_msp34xx(btv,20);
+               boot_msp34xx(btv,20);
                break;
        case BTTV_BOARD_AVERMEDIA98:
                boot_msp34xx(btv,11);
@@ -3192,7 +3192,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
        int tda9887;
        int addr=ADDR_UNSET, radio_addr=ADDR_UNSET;
 
-        btv->tuner_type = -1;
+       btv->tuner_type = -1;
 
        if (BTTV_BOARD_UNKNOWN == btv->c.type) {
                bttv_readee(btv,eeprom_data,0xa0);
@@ -3225,7 +3225,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
        case BTTV_BOARD_HAUPPAUGEPVR:
                /* pick up some config infos from the eeprom */
                bttv_readee(btv,eeprom_data,0xa0);
-                hauppauge_eeprom(btv);
+               hauppauge_eeprom(btv);
                break;
        case BTTV_BOARD_AVERMEDIA98:
        case BTTV_BOARD_AVPHONE98:
@@ -3258,7 +3258,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
                }
                break;
        case BTTV_BOARD_STB2:
-                if (btv->cardid == 0x3060121a) {
+               if (btv->cardid == 0x3060121a) {
                        /* Fix up entry for 3DFX VoodooTV 100,
                           which is an OEM STB card variant. */
                        btv->has_radio=0;
@@ -3277,7 +3277,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
        case BTTV_BOARD_OSPREY540:
        case BTTV_BOARD_OSPREY2000:
                bttv_readee(btv,eeprom_data,0xa0);
-                osprey_eeprom(btv);
+               osprey_eeprom(btv);
                break;
        case BTTV_BOARD_IDS_EAGLE:
                init_ids_eagle(btv);
@@ -3298,7 +3298,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
        }
 
        /* pll configuration */
-        if (!(btv->id==848 && btv->revision==0x11)) {
+       if (!(btv->id==848 && btv->revision==0x11)) {
                /* defaults from card list */
                if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
                        btv->pll.pll_ifreq=28636363;
@@ -3309,26 +3309,26 @@ void __devinit bttv_init_card2(struct bttv *btv)
                        btv->pll.pll_crystal=BT848_IFORM_XT1;
                }
                /* insmod options can override */
-                switch (pll[btv->c.nr]) {
-                case 0: /* none */
+               switch (pll[btv->c.nr]) {
+               case 0: /* none */
                        btv->pll.pll_crystal = 0;
                        btv->pll.pll_ifreq   = 0;
                        btv->pll.pll_ofreq   = 0;
-                        break;
-                case 1: /* 28 MHz */
+                       break;
+               case 1: /* 28 MHz */
                case 28:
-                        btv->pll.pll_ifreq   = 28636363;
+                       btv->pll.pll_ifreq   = 28636363;
                        btv->pll.pll_ofreq   = 0;
-                        btv->pll.pll_crystal = BT848_IFORM_XT0;
-                        break;
-                case 2: /* 35 MHz */
+                       btv->pll.pll_crystal = BT848_IFORM_XT0;
+                       break;
+               case 2: /* 35 MHz */
                case 35:
-                        btv->pll.pll_ifreq   = 35468950;
+                       btv->pll.pll_ifreq   = 35468950;
                        btv->pll.pll_ofreq   = 0;
-                        btv->pll.pll_crystal = BT848_IFORM_XT1;
-                        break;
-                }
-        }
+                       btv->pll.pll_crystal = BT848_IFORM_XT1;
+                       break;
+               }
+       }
        btv->pll.pll_current = -1;
 
        /* tuner configuration (from card list / autodetect / insmod option) */
@@ -3340,7 +3340,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
 
        if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
                if(UNSET == btv->tuner_type)
-                       btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
+                       btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
        if (UNSET != tuner[btv->c.nr])
                btv->tuner_type = tuner[btv->c.nr];
        printk("bttv%d: using tuner=%d\n",btv->c.nr,btv->tuner_type);
@@ -3348,14 +3348,14 @@ void __devinit bttv_init_card2(struct bttv *btv)
                bttv_call_i2c_clients(btv, AUDC_CONFIG_PINNACLE,
                                      &btv->pinnacle_id);
        if (btv->tuner_type != UNSET) {
-               struct tuner_setup tun_setup;
+               struct tuner_setup tun_setup;
 
-               tun_setup.mode_mask =  T_ANALOG_TV | T_DIGITAL_TV;
+               tun_setup.mode_mask =  T_ANALOG_TV | T_DIGITAL_TV;
                tun_setup.type = btv->tuner_type;
                tun_setup.addr = addr;
 
                if (addr == radio_addr)
-                       tun_setup.mode_mask =  T_RADIO;
+                       tun_setup.mode_mask =  T_RADIO;
 
                bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);
        }
@@ -3433,11 +3433,11 @@ static void modtec_eeprom(struct bttv *btv)
        } else if (strncmp(&(eeprom_data[0x1e]),"Alps TSBB5",10) ==0) {
                btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
                printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
-                       btv->c.nr,&eeprom_data[0x1e]);
-        } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
-                btv->tuner_type=TUNER_PHILIPS_NTSC;
-                printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
-                       btv->c.nr,&eeprom_data[0x1e]);
+                      btv->c.nr,&eeprom_data[0x1e]);
+       } else if (strncmp(&(eeprom_data[0x1e]),"Philips FM1246",14) ==0) {
+               btv->tuner_type=TUNER_PHILIPS_NTSC;
+               printk("bttv%d: Modtec: Tuner autodetected by eeprom: %s\n",
+                      btv->c.nr,&eeprom_data[0x1e]);
        } else {
                printk("bttv%d: Modtec: Unknown TunerString: %s\n",
                       btv->c.nr,&eeprom_data[0x1e]);
@@ -3502,7 +3502,7 @@ static int terratec_active_radio_upgrade(struct bttv *btv)
 static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
 {
        u32 n;
-       u8 bits;
+       u8 bits;
        int i;
 
        gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
@@ -3538,19 +3538,19 @@ static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
 
 static int __devinit pvr_boot(struct bttv *btv)
 {
-        const struct firmware *fw_entry;
+       const struct firmware *fw_entry;
        int rc;
 
        rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
        if (rc != 0) {
                printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n",
                       btv->c.nr);
-                return rc;
-        }
+               return rc;
+       }
        rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
        printk(KERN_INFO "bttv%d: altera firmware upload %s\n",
               btv->c.nr, (rc < 0) ? "failed" : "ok");
-        release_firmware(fw_entry);
+       release_firmware(fw_entry);
        return rc;
 }
 
@@ -3564,33 +3564,33 @@ static void __devinit osprey_eeprom(struct bttv *btv)
        unsigned long serial = 0;
 
        if (btv->c.type == 0) {
-               /* this might be an antique... check for MMAC label in eeprom */
-               if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) {
-                       unsigned char checksum = 0;
-                       for (i =0; i<21; i++)
+              /* this might be an antique... check for MMAC label in eeprom */
+              if ((ee[0]=='M') && (ee[1]=='M') && (ee[2]=='A') && (ee[3]=='C')) {
+                      unsigned char checksum = 0;
+                      for (i =0; i<21; i++)
                               checksum += ee[i];
-                       if (checksum != ee[21])
+                      if (checksum != ee[21])
                               return;
                       btv->c.type = BTTV_BOARD_OSPREY1x0_848;
                       for (i = 12; i < 21; i++)
                               serial *= 10, serial += ee[i] - '0';
-               }
+              }
        } else {
               unsigned short type;
-               int offset = 4*16;
-
-               for(; offset < 8*16; offset += 16) {
-                       unsigned short checksum = 0;
-                       /* verify the checksum */
-                       for(i = 0; i<14; i++) checksum += ee[i+offset];
-                               checksum = ~checksum;  /* no idea why */
-                               if ((((checksum>>8)&0x0FF) == ee[offset+14]) &&
-                                   ((checksum & 0x0FF) == ee[offset+15])) {
-                               break;
-                       }
-               }
-
-               if (offset >= 8*16)
+              int offset = 4*16;
+
+              for(; offset < 8*16; offset += 16) {
+                      unsigned short checksum = 0;
+                      /* verify the checksum */
+                      for(i = 0; i<14; i++) checksum += ee[i+offset];
+                              checksum = ~checksum;  /* no idea why */
+                              if ((((checksum>>8)&0x0FF) == ee[offset+14]) &&
+                                  ((checksum & 0x0FF) == ee[offset+15])) {
+                              break;
+                      }
+              }
+
+              if (offset >= 8*16)
                       return;
 
               /* found a valid descriptor */
@@ -3606,7 +3606,7 @@ static void __devinit osprey_eeprom(struct bttv *btv)
                       btv->c.type = BTTV_BOARD_OSPREY101_848;
                       break;
 
-               /* 878 based */
+              /* 878 based */
               case 0x0012:
               case 0x0013:
                       btv->c.type = BTTV_BOARD_OSPREY1x0;
@@ -3662,27 +3662,27 @@ static void __devinit osprey_eeprom(struct bttv *btv)
 /* AVermedia specific stuff, from  bktr_card.c                             */
 
 static int tuner_0_table[] = {
-        TUNER_PHILIPS_NTSC,  TUNER_PHILIPS_PAL /* PAL-BG*/,
-        TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL /* PAL-I*/,
-        TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL,
-        TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
-        TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
+       TUNER_PHILIPS_NTSC,  TUNER_PHILIPS_PAL /* PAL-BG*/,
+       TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL /* PAL-I*/,
+       TUNER_PHILIPS_PAL,   TUNER_PHILIPS_PAL,
+       TUNER_PHILIPS_SECAM, TUNER_PHILIPS_SECAM,
+       TUNER_PHILIPS_SECAM, TUNER_PHILIPS_PAL,
        TUNER_PHILIPS_FM1216ME_MK3 };
 
 static int tuner_1_table[] = {
-        TUNER_TEMIC_NTSC,  TUNER_TEMIC_PAL,
+       TUNER_TEMIC_NTSC,  TUNER_TEMIC_PAL,
        TUNER_TEMIC_PAL,   TUNER_TEMIC_PAL,
        TUNER_TEMIC_PAL,   TUNER_TEMIC_PAL,
-        TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
-        TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
+       TUNER_TEMIC_4012FY5, TUNER_TEMIC_4012FY5, /* TUNER_TEMIC_SECAM */
+       TUNER_TEMIC_4012FY5, TUNER_TEMIC_PAL};
 
 static void __devinit avermedia_eeprom(struct bttv *btv)
 {
-        int tuner_make,tuner_tv_fm,tuner_format,tuner=0;
+       int tuner_make,tuner_tv_fm,tuner_format,tuner=0;
 
        tuner_make      = (eeprom_data[0x41] & 0x7);
-        tuner_tv_fm     = (eeprom_data[0x41] & 0x18) >> 3;
-        tuner_format    = (eeprom_data[0x42] & 0xf0) >> 4;
+       tuner_tv_fm     = (eeprom_data[0x41] & 0x18) >> 3;
+       tuner_format    = (eeprom_data[0x42] & 0xf0) >> 4;
        btv->has_remote = (eeprom_data[0x42] & 0x01);
 
        if (tuner_make == 0 || tuner_make == 2)
@@ -3718,8 +3718,8 @@ void bttv_tda9880_setnorm(struct bttv *btv, int norm)
                dprintk("bttv_tda9880_setnorm to NTSC\n");
        }
        else {
-               bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].audiomux[0]=0x947fff;
-                bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].audiomux[4]=0x947fff;
+               bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].audiomux[0]=0x947fff;
+               bttv_tvcards[BTTV_BOARD_VOODOOTV_FM].audiomux[4]=0x947fff;
                dprintk("bttv_tda9880_setnorm to PAL\n");
        }
        /* set GPIO according */
@@ -3741,7 +3741,7 @@ static void __devinit boot_msp34xx(struct bttv *btv, int pin)
 
        gpio_inout(mask,mask);
        gpio_bits(mask,0);
-        udelay(2500);
+       udelay(2500);
        gpio_bits(mask,mask);
 
        if (bttv_gpio)
@@ -3817,7 +3817,7 @@ static void __devinit init_PXC200(struct bttv *btv)
        udelay(10);
        gpio_write(1<<2);
 
-               for (i = 0; i < ARRAY_SIZE(vals); i++) {
+       for (i = 0; i < ARRAY_SIZE(vals); i++) {
                tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
                if (tmp != -1) {
                        printk(KERN_INFO
@@ -4260,30 +4260,30 @@ avermedia_tv_stereo_audio(struct bttv *btv, struct video_audio *v, int set)
 static void
 lt9415_audio(struct bttv *btv, struct video_audio *v, int set)
 {
-        int val = 0;
+       int val = 0;
 
-        if (gpio_read() & 0x4000) {
+       if (gpio_read() & 0x4000) {
                v->mode = VIDEO_SOUND_MONO;
                return;
        }
 
-        if (set) {
-                if (v->mode & VIDEO_SOUND_LANG2)  /* A2 SAP */
-                        val = 0x0080;
+       if (set) {
+               if (v->mode & VIDEO_SOUND_LANG2)  /* A2 SAP */
+                       val = 0x0080;
                if (v->mode & VIDEO_SOUND_STEREO) /* A2 stereo */
-                        val = 0x0880;
-                if ((v->mode & VIDEO_SOUND_LANG1) ||
+                       val = 0x0880;
+               if ((v->mode & VIDEO_SOUND_LANG1) ||
                    (v->mode & VIDEO_SOUND_MONO))
                        val = 0;
                gpio_bits(0x0880, val);
-                if (bttv_gpio)
-                        bttv_gpio_tracking(btv,"lt9415");
-        } else {
+               if (bttv_gpio)
+                       bttv_gpio_tracking(btv,"lt9415");
+       } else {
                /* autodetect doesn't work with this card :-( */
-                v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
+               v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
                        VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
-                return;
-        }
+               return;
+       }
 }
 
 /* TDA9821 on TerraTV+ Bt848, Bt878 */
@@ -4406,26 +4406,26 @@ fv2000s_audio(struct bttv *btv, struct video_audio *v, int set)
 static void
 windvr_audio(struct bttv *btv, struct video_audio *v, int set)
 {
-        unsigned long val = 0;
-
-        if (set) {
-                if (v->mode & VIDEO_SOUND_MONO)
-                        val = 0x040000;
-                if (v->mode & VIDEO_SOUND_LANG1)
-                        val = 0;
-                if (v->mode & VIDEO_SOUND_LANG2)
-                        val = 0x100000;
-                if (v->mode & VIDEO_SOUND_STEREO)
-                        val = 0;
-                if (val) {
+       unsigned long val = 0;
+
+       if (set) {
+               if (v->mode & VIDEO_SOUND_MONO)
+                       val = 0x040000;
+               if (v->mode & VIDEO_SOUND_LANG1)
+                       val = 0;
+               if (v->mode & VIDEO_SOUND_LANG2)
+                       val = 0x100000;
+               if (v->mode & VIDEO_SOUND_STEREO)
+                       val = 0;
+               if (val) {
                        gpio_bits(0x140000, val);
-                        if (bttv_gpio)
-                                bttv_gpio_tracking(btv,"windvr");
-                }
-        } else {
-                v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
-                          VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
-        }
+                       if (bttv_gpio)
+                               bttv_gpio_tracking(btv,"windvr");
+               }
+       } else {
+               v->mode = VIDEO_SOUND_MONO | VIDEO_SOUND_STEREO |
+                         VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
+       }
 }
 
 /*
@@ -4668,10 +4668,10 @@ static void kodicom4400r_init(struct bttv *btv)
 static void xguard_muxsel(struct bttv *btv, unsigned int input)
 {
        static const int masks[] = {
-                ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
-                ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
-                ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
-                ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
+               ENB0, ENB0|IN00, ENB0|IN10, ENB0|IN00|IN10,
+               ENA0, ENA0|IN00, ENA0|IN10, ENA0|IN00|IN10,
+               ENB1, ENB1|IN01, ENB1|IN11, ENB1|IN01|IN11,
+               ENA1, ENA1|IN01, ENA1|IN11, ENA1|IN01|IN11,
        };
        gpio_write(masks[input%16]);
 }
@@ -4776,10 +4776,10 @@ static void ivc120_muxsel(struct bttv *btv, unsigned int input)
 
 static void PXC200_muxsel(struct bttv *btv, unsigned int input)
 {
-        int rc;
+       int rc;
        long mux;
        int bitmask;
-        unsigned char buf[2];
+       unsigned char buf[2];
 
        /* Read PIC config to determine if this is a PXC200F */
        /* PX_I2C_CMD_CFG*/
@@ -4809,14 +4809,14 @@ static void PXC200_muxsel(struct bttv *btv, unsigned int input)
        /* bitmask=0x30f; */
        bitmask=0x302;
        /* check whether we have a PXC200A */
-       if (btv->cardid == PX_PXC200A_CARDID)  {
+       if (btv->cardid == PX_PXC200A_CARDID)  {
           bitmask ^= 0x180; /* use 7 and 9, not 8 and 9 */
           bitmask |= 7<<4; /* the DAC */
        }
        btwrite(bitmask, BT848_GPIO_OUT_EN);
 
        bitmask = btread(BT848_GPIO_DATA);
-       if (btv->cardid == PX_PXC200A_CARDID)
+       if (btv->cardid == PX_PXC200A_CARDID)
          bitmask = (bitmask & ~0x280) | ((mux & 2) << 8) | ((mux & 1) << 7);
        else /* older device */
          bitmask = (bitmask & ~0x300) | ((mux & 3) << 8);
@@ -4829,7 +4829,7 @@ static void PXC200_muxsel(struct bttv *btv, unsigned int input)
         *
         * needed because bttv-driver sets mux before calling this function
         */
-       if (btv->cardid == PX_PXC200A_CARDID)
+       if (btv->cardid == PX_PXC200A_CARDID)
          btaor(2<<5, ~BT848_IFORM_MUXSEL, BT848_IFORM);
        else /* older device */
          btand(~BT848_IFORM_MUXSEL,BT848_IFORM);
@@ -4875,7 +4875,7 @@ void __devinit bttv_check_chipset(void)
                printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency);
        while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL,
                                      PCI_DEVICE_ID_INTEL_82441, dev))) {
-                unsigned char b;
+               unsigned char b;
                pci_read_config_byte(dev, 0x53, &b);
                if (bttv_debug)
                        printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
@@ -4885,7 +4885,7 @@ void __devinit bttv_check_chipset(void)
 
 int __devinit bttv_handle_chipset(struct bttv *btv)
 {
-       unsigned char command;
+       unsigned char command;
 
        if (!triton1 && !vsfx && UNSET == latency)
                return 0;
@@ -4906,13 +4906,13 @@ int __devinit bttv_handle_chipset(struct bttv *btv)
                        btv->triton1 = BT848_INT_ETBF;
        } else {
                /* bt878 has a bit in the pci config space for it */
-                pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
+               pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
                if (triton1)
                        command |= BT878_EN_TBFX;
                if (vsfx)
                        command |= BT878_EN_VSFX;
-                pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
-        }
+               pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
+       }
        if (UNSET != latency)
                pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
        return 0;
index f830740..0005741 100644 (file)
@@ -3,7 +3,7 @@
     bttv - Bt848 frame grabber driver
 
     Copyright (C) 1996,97,98 Ralph  Metzler <rjkm@thp.uni-koeln.de>
-                           & Marcus Metzler <mocm@thp.uni-koeln.de>
+                          & Marcus Metzler <mocm@thp.uni-koeln.de>
     (c) 1999-2002 Gerd Knorr <kraxel@bytesex.org>
 
     some v4l2 code lines are taken from Justin's bttv2 driver which is
@@ -192,8 +192,8 @@ static u8 SRAM_Table[][60] =
 
 const struct bttv_tvnorm bttv_tvnorms[] = {
        /* PAL-BDGHI */
-        /* max. active video is actually 922, but 924 is divisible by 4 and 3! */
-       /* actually, max active PAL with HSCALE=0 is 948, NTSC is 768 - nil */
+       /* max. active video is actually 922, but 924 is divisible by 4 and 3! */
+       /* actually, max active PAL with HSCALE=0 is 948, NTSC is 768 - nil */
        {
                .v4l2_id        = V4L2_STD_PAL,
                .name           = "PAL",
@@ -806,9 +806,9 @@ static void bt848A_set_timing(struct bttv *btv)
                        btv->c.nr,table_idx);
 
                /* timing change...reset timing generator address */
-                       btwrite(0x00, BT848_TGCTRL);
-                       btwrite(0x02, BT848_TGCTRL);
-                       btwrite(0x00, BT848_TGCTRL);
+               btwrite(0x00, BT848_TGCTRL);
+               btwrite(0x02, BT848_TGCTRL);
+               btwrite(0x00, BT848_TGCTRL);
 
                len=SRAM_Table[table_idx][0];
                for(i = 1; i <= len; i++)
@@ -847,7 +847,7 @@ static void bt848_hue(struct bttv *btv, int hue)
 
        /* -128 to 127 */
        value = (hue >> 8) - 128;
-        btwrite(value & 0xff, BT848_HUE);
+       btwrite(value & 0xff, BT848_HUE);
 }
 
 static void bt848_contrast(struct bttv *btv, int cont)
@@ -859,9 +859,9 @@ static void bt848_contrast(struct bttv *btv, int cont)
        /* 0-511 */
        value = (cont  >> 7);
        hibit = (value >> 6) & 4;
-        btwrite(value & 0xff, BT848_CONTRAST_LO);
-        btaor(hibit, ~4, BT848_E_CONTROL);
-        btaor(hibit, ~4, BT848_O_CONTROL);
+       btwrite(value & 0xff, BT848_CONTRAST_LO);
+       btaor(hibit, ~4, BT848_E_CONTROL);
+       btaor(hibit, ~4, BT848_O_CONTROL);
 }
 
 static void bt848_sat(struct bttv *btv, int color)
@@ -873,12 +873,12 @@ static void bt848_sat(struct bttv *btv, int color)
        /* 0-511 for the color */
        val_u   = ((color * btv->opt_uv_ratio) / 50) >> 7;
        val_v   = (((color * (100 - btv->opt_uv_ratio) / 50) >>7)*180L)/254;
-        hibits  = (val_u >> 7) & 2;
+       hibits  = (val_u >> 7) & 2;
        hibits |= (val_v >> 8) & 1;
-        btwrite(val_u & 0xff, BT848_SAT_U_LO);
-        btwrite(val_v & 0xff, BT848_SAT_V_LO);
-        btaor(hibits, ~3, BT848_E_CONTROL);
-        btaor(hibits, ~3, BT848_O_CONTROL);
+       btwrite(val_u & 0xff, BT848_SAT_U_LO);
+       btwrite(val_v & 0xff, BT848_SAT_V_LO);
+       btaor(hibits, ~3, BT848_E_CONTROL);
+       btaor(hibits, ~3, BT848_O_CONTROL);
 }
 
 /* ----------------------------------------------------------------------- */
@@ -891,7 +891,7 @@ video_mux(struct bttv *btv, unsigned int input)
        if (input >= bttv_tvcards[btv->c.type].video_inputs)
                return -EINVAL;
 
-        /* needed by RemoteVideo MX */
+       /* needed by RemoteVideo MX */
        mask2 = bttv_tvcards[btv->c.type].gpiomask2;
        if (mask2)
                gpio_inout(mask2,mask2);
@@ -1055,22 +1055,22 @@ static void init_bt848(struct bttv *btv)
        btwrite(BT848_COLOR_CTL_GAMMA, BT848_COLOR_CTL);
        btwrite(BT848_IFORM_XTAUTO | BT848_IFORM_AUTO, BT848_IFORM);
 
-        /* set planar and packed mode trigger points and         */
-        /* set rising edge of inverted GPINTR pin as irq trigger */
-        btwrite(BT848_GPIO_DMA_CTL_PKTP_32|
-                BT848_GPIO_DMA_CTL_PLTP1_16|
-                BT848_GPIO_DMA_CTL_PLTP23_16|
-                BT848_GPIO_DMA_CTL_GPINTC|
-                BT848_GPIO_DMA_CTL_GPINTI,
-                BT848_GPIO_DMA_CTL);
+       /* set planar and packed mode trigger points and         */
+       /* set rising edge of inverted GPINTR pin as irq trigger */
+       btwrite(BT848_GPIO_DMA_CTL_PKTP_32|
+               BT848_GPIO_DMA_CTL_PLTP1_16|
+               BT848_GPIO_DMA_CTL_PLTP23_16|
+               BT848_GPIO_DMA_CTL_GPINTC|
+               BT848_GPIO_DMA_CTL_GPINTI,
+               BT848_GPIO_DMA_CTL);
 
        val = btv->opt_chroma_agc ? BT848_SCLOOP_CAGC : 0;
-        btwrite(val, BT848_E_SCLOOP);
-        btwrite(val, BT848_O_SCLOOP);
+       btwrite(val, BT848_E_SCLOOP);
+       btwrite(val, BT848_O_SCLOOP);
 
-        btwrite(0x20, BT848_E_VSCALE_HI);
-        btwrite(0x20, BT848_O_VSCALE_HI);
-        btwrite(BT848_ADC_RESERVED | (btv->opt_adc_crush ? BT848_ADC_CRUSH : 0),
+       btwrite(0x20, BT848_E_VSCALE_HI);
+       btwrite(0x20, BT848_O_VSCALE_HI);
+       btwrite(BT848_ADC_RESERVED | (btv->opt_adc_crush ? BT848_ADC_CRUSH : 0),
                BT848_ADC);
 
        btwrite(whitecrush_upper, BT848_WC_UP);
@@ -1089,7 +1089,7 @@ static void init_bt848(struct bttv *btv)
        bt848_contrast(btv, btv->contrast);
        bt848_sat(btv,      btv->saturation);
 
-        /* interrupt */
+       /* interrupt */
        init_irqreg(btv);
 }
 
@@ -1105,7 +1105,7 @@ static void bttv_reinit_bt848(struct bttv *btv)
        spin_unlock_irqrestore(&btv->s_lock,flags);
 
        init_bt848(btv);
-        btv->pll.pll_current = -1;
+       btv->pll.pll_current = -1;
        set_input(btv,btv->input);
 }
 
@@ -1398,7 +1398,7 @@ bttv_switch_overlay(struct bttv *btv, struct bttv_fh *fh,
 /* video4linux (1) interface                                               */
 
 static int bttv_prepare_buffer(struct bttv *btv, struct bttv_buffer *buf,
-                              const struct bttv_format *fmt,
+                              const struct bttv_format *fmt,
                               unsigned int width, unsigned int height,
                               enum v4l2_field field)
 {
@@ -1521,8 +1521,8 @@ static const char *v4l1_ioctls[] = {
 static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
 {
        switch (cmd) {
-        case BTTV_VERSION:
-                return BTTV_VERSION_CODE;
+       case BTTV_VERSION:
+               return BTTV_VERSION_CODE;
 
        /* ***  v4l1  *** ************************************************ */
        case VIDIOCGFREQ:
@@ -1576,32 +1576,32 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
                return 0;
        }
 
-        case VIDIOCGCHAN:
-        {
-                struct video_channel *v = arg;
+       case VIDIOCGCHAN:
+       {
+               struct video_channel *v = arg;
                unsigned int channel = v->channel;
 
-                if (channel >= bttv_tvcards[btv->c.type].video_inputs)
-                        return -EINVAL;
-                v->tuners=0;
-                v->flags = VIDEO_VC_AUDIO;
-                v->type = VIDEO_TYPE_CAMERA;
-                v->norm = btv->tvnorm;
+               if (channel >= bttv_tvcards[btv->c.type].video_inputs)
+                       return -EINVAL;
+               v->tuners=0;
+               v->flags = VIDEO_VC_AUDIO;
+               v->type = VIDEO_TYPE_CAMERA;
+               v->norm = btv->tvnorm;
                if (channel == bttv_tvcards[btv->c.type].tuner)  {
-                        strcpy(v->name,"Television");
-                        v->flags|=VIDEO_VC_TUNER;
-                        v->type=VIDEO_TYPE_TV;
-                        v->tuners=1;
-                } else if (channel == btv->svhs) {
-                        strcpy(v->name,"S-Video");
-                } else {
-                        sprintf(v->name,"Composite%d",channel);
+                       strcpy(v->name,"Television");
+                       v->flags|=VIDEO_VC_TUNER;
+                       v->type=VIDEO_TYPE_TV;
+                       v->tuners=1;
+               } else if (channel == btv->svhs) {
+                       strcpy(v->name,"S-Video");
+               } else {
+                       sprintf(v->name,"Composite%d",channel);
                }
                return 0;
-        }
-        case VIDIOCSCHAN:
-        {
-                struct video_channel *v = arg;
+       }
+       case VIDIOCSCHAN:
+       {
+               struct video_channel *v = arg;
                unsigned int channel = v->channel;
 
                if (channel >= bttv_tvcards[btv->c.type].video_inputs)
@@ -1623,7 +1623,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
                return 0;
        }
 
-        case VIDIOCGAUDIO:
+       case VIDIOCGAUDIO:
        {
                struct video_audio *v = arg;
 
@@ -1728,7 +1728,7 @@ static int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
                } else if (i->index == btv->svhs) {
                        sprintf(i->name, "S-Video");
                } else {
-                        sprintf(i->name,"Composite%d",i->index);
+                       sprintf(i->name,"Composite%d",i->index);
                }
                if (i->index == btv->input) {
                        __u32 dstatus = btread(BT848_DSTATUS);
@@ -2168,7 +2168,7 @@ static int bttv_s_fmt(struct bttv_fh *fh, struct bttv *btv,
                if (0 != retval)
                        return retval;
                if (locked_btres(fh->btv, RESOURCE_VBI))
-                        return -EBUSY;
+                       return -EBUSY;
                bttv_vbi_try_fmt(fh,f);
                bttv_vbi_setlines(fh,btv,f->fmt.vbi.count[0]);
                bttv_vbi_get_fmt(fh,f);
@@ -2206,9 +2206,9 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
                bttv_reinit_bt848(btv);
 
        switch (cmd) {
-        case VIDIOCSFREQ:
-        case VIDIOCSTUNER:
-        case VIDIOCSCHAN:
+       case VIDIOCSFREQ:
+       case VIDIOCSTUNER:
+       case VIDIOCSCHAN:
        case VIDIOC_S_CTRL:
        case VIDIOC_S_STD:
        case VIDIOC_S_INPUT:
@@ -2224,10 +2224,10 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
        /* ***  v4l1  *** ************************************************ */
        case VIDIOCGCAP:
        {
-                struct video_capability *cap = arg;
+               struct video_capability *cap = arg;
 
                memset(cap,0,sizeof(*cap));
-                strcpy(cap->name,btv->video_dev->name);
+               strcpy(cap->name,btv->video_dev->name);
                if (V4L2_BUF_TYPE_VBI_CAPTURE == fh->type) {
                        /* vbi */
                        cap->type = VID_TYPE_TUNER|VID_TYPE_TELETEXT;
@@ -2247,7 +2247,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
                }
                cap->channels  = bttv_tvcards[btv->c.type].video_inputs;
                cap->audios    = bttv_tvcards[btv->c.type].audio_inputs;
-                return 0;
+               return 0;
        }
 
        case VIDIOCGPICT:
@@ -2296,7 +2296,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
                bt848_hue(btv,pic->hue);
                bt848_sat(btv,pic->colour);
                up(&fh->cap.lock);
-                return 0;
+               return 0;
        }
 
        case VIDIOCGWIN:
@@ -2357,8 +2357,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
                unsigned long end;
 
                if(!capable(CAP_SYS_ADMIN) &&
-                   !capable(CAP_SYS_RAWIO))
-                        return -EPERM;
+                  !capable(CAP_SYS_RAWIO))
+                       return -EPERM;
                end = (unsigned long)fbuf->base +
                        fbuf->height * fbuf->bytesperline;
                down(&fh->cap.lock);
@@ -2432,7 +2432,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
                }
 
                /* switch over */
-               retval = bttv_switch_overlay(btv,fh,new);
+               retval = bttv_switch_overlay(btv,fh,new);
                up(&fh->cap.lock);
                return retval;
        }
@@ -2571,13 +2571,13 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
                return 0;
        }
 
-        case BTTV_VERSION:
-        case VIDIOCGFREQ:
-        case VIDIOCSFREQ:
-        case VIDIOCGTUNER:
-        case VIDIOCSTUNER:
-        case VIDIOCGCHAN:
-        case VIDIOCSCHAN:
+       case BTTV_VERSION:
+       case VIDIOCGFREQ:
+       case VIDIOCSFREQ:
+       case VIDIOCGTUNER:
+       case VIDIOCSTUNER:
+       case VIDIOCGCHAN:
+       case VIDIOCSCHAN:
        case VIDIOCGAUDIO:
        case VIDIOCSAUDIO:
                return bttv_common_ioctls(btv,cmd,arg);
@@ -2589,8 +2589,8 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
 
                if (0 == v4l2)
                        return -EINVAL;
-                strcpy(cap->driver,"bttv");
-                strlcpy(cap->card,btv->video_dev->name,sizeof(cap->card));
+               strcpy(cap->driver,"bttv");
+               strlcpy(cap->card,btv->video_dev->name,sizeof(cap->card));
                sprintf(cap->bus_info,"PCI:%s",pci_name(btv->c.pci));
                cap->version = BTTV_VERSION_CODE;
                cap->capabilities =
@@ -3097,7 +3097,7 @@ static struct video_device bttv_video_template =
 {
        .name     = "UNSET",
        .type     = VID_TYPE_CAPTURE|VID_TYPE_TUNER|
-                   VID_TYPE_CLIPPING|VID_TYPE_SCALES,
+                   VID_TYPE_CLIPPING|VID_TYPE_SCALES,
        .hardware = VID_HARDWARE_BT848,
        .fops     = &bttv_fops,
        .minor    = -1,
@@ -3143,7 +3143,7 @@ static int radio_open(struct inode *inode, struct file *file)
        audio_mux(btv,AUDIO_RADIO);
 
        up(&btv->lock);
-        return 0;
+       return 0;
 }
 
 static int radio_release(struct inode *inode, struct file *file)
@@ -3166,34 +3166,34 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
        switch (cmd) {
        case VIDIOCGCAP:
        {
-                struct video_capability *cap = arg;
+               struct video_capability *cap = arg;
 
                memset(cap,0,sizeof(*cap));
-                strcpy(cap->name,btv->radio_dev->name);
-                cap->type = VID_TYPE_TUNER;
+               strcpy(cap->name,btv->radio_dev->name);
+               cap->type = VID_TYPE_TUNER;
                cap->channels = 1;
                cap->audios = 1;
-                return 0;
+               return 0;
        }
 
-        case VIDIOCGTUNER:
-        {
-                struct video_tuner *v = arg;
+       case VIDIOCGTUNER:
+       {
+               struct video_tuner *v = arg;
 
-                if(v->tuner)
-                        return -EINVAL;
+               if(v->tuner)
+                       return -EINVAL;
                memset(v,0,sizeof(*v));
-                strcpy(v->name, "Radio");
-                bttv_call_i2c_clients(btv,cmd,v);
-                return 0;
-        }
-        case VIDIOCSTUNER:
+               strcpy(v->name, "Radio");
+               bttv_call_i2c_clients(btv,cmd,v);
+               return 0;
+       }
+       case VIDIOCSTUNER:
                /* nothing to do */
                return 0;
 
        case BTTV_VERSION:
-        case VIDIOCGFREQ:
-        case VIDIOCSFREQ:
+       case VIDIOCGFREQ:
+       case VIDIOCSFREQ:
        case VIDIOCGAUDIO:
        case VIDIOCSAUDIO:
                return bttv_common_ioctls(btv,cmd,arg);
@@ -3699,7 +3699,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
                }
 
                if (astat&BT848_INT_VSYNC)
-                        btv->field_count++;
+                       btv->field_count++;
 
                if (astat & BT848_INT_GPINT) {
                        wake_up(&btv->gpioq);
@@ -3711,13 +3711,13 @@ static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
                        wake_up(&btv->i2c_queue);
                }
 
-                if ((astat & BT848_INT_RISCI)  &&  (stat & (4<<28)))
+               if ((astat & BT848_INT_RISCI)  &&  (stat & (4<<28)))
                        bttv_irq_switch_vbi(btv);
 
-                if ((astat & BT848_INT_RISCI)  &&  (stat & (2<<28)))
+               if ((astat & BT848_INT_RISCI)  &&  (stat & (2<<28)))
                        bttv_irq_wakeup_top(btv);
 
-                if ((astat & BT848_INT_RISCI)  &&  (stat & (1<<28)))
+               if ((astat & BT848_INT_RISCI)  &&  (stat & (1<<28)))
                        bttv_irq_switch_video(btv);
 
                if ((astat & BT848_INT_HLOCK)  &&  btv->opt_automute)
@@ -3744,7 +3744,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
                if (count > 4) {
 
                        if (count > 8 || !(astat & BT848_INT_GPINT)) {
-                               btwrite(0, BT848_INT_MASK);
+                               btwrite(0, BT848_INT_MASK);
 
                                printk(KERN_ERR
                                           "bttv%d: IRQ lockup, cleared int mask [", btv->c.nr);
@@ -3826,7 +3826,7 @@ static int __devinit bttv_register_video(struct bttv *btv)
 
        /* video */
        btv->video_dev = vdev_init(btv, &bttv_video_template, "video");
-        if (NULL == btv->video_dev)
+       if (NULL == btv->video_dev)
                goto err;
        if (video_register_device(btv->video_dev,VFL_TYPE_GRABBER,video_nr)<0)
                goto err;
@@ -3836,18 +3836,18 @@ static int __devinit bttv_register_video(struct bttv *btv)
 
        /* vbi */
        btv->vbi_dev = vdev_init(btv, &bttv_vbi_template, "vbi");
-        if (NULL == btv->vbi_dev)
+       if (NULL == btv->vbi_dev)
                goto err;
-        if (video_register_device(btv->vbi_dev,VFL_TYPE_VBI,vbi_nr)<0)
+       if (video_register_device(btv->vbi_dev,VFL_TYPE_VBI,vbi_nr)<0)
                goto err;
        printk(KERN_INFO "bttv%d: registered device vbi%d\n",
               btv->c.nr,btv->vbi_dev->minor & 0x1f);
 
-        if (!btv->has_radio)
+       if (!btv->has_radio)
                return 0;
        /* radio */
        btv->radio_dev = vdev_init(btv, &radio_template, "radio");
-        if (NULL == btv->radio_dev)
+       if (NULL == btv->radio_dev)
                goto err;
        if (video_register_device(btv->radio_dev, VFL_TYPE_RADIO,radio_nr)<0)
                goto err;
@@ -3868,11 +3868,11 @@ static int __devinit bttv_register_video(struct bttv *btv)
 static void pci_set_command(struct pci_dev *dev)
 {
 #if defined(__powerpc__)
-        unsigned int cmd;
+       unsigned int cmd;
 
-        pci_read_config_dword(dev, PCI_COMMAND, &cmd);
-        cmd = (cmd | PCI_COMMAND_MEMORY );
-        pci_write_config_dword(dev, PCI_COMMAND, cmd);
+       pci_read_config_dword(dev, PCI_COMMAND, &cmd);
+       cmd = (cmd | PCI_COMMAND_MEMORY );
+       pci_write_config_dword(dev, PCI_COMMAND, cmd);
 #endif
 }
 
@@ -3886,21 +3886,21 @@ static int __devinit bttv_probe(struct pci_dev *dev,
        if (bttv_num == BTTV_MAX)
                return -ENOMEM;
        printk(KERN_INFO "bttv: Bt8xx card found (%d).\n", bttv_num);
-        btv=&bttvs[bttv_num];
+       btv=&bttvs[bttv_num];
        memset(btv,0,sizeof(*btv));
        btv->c.nr  = bttv_num;
        sprintf(btv->c.name,"bttv%d",btv->c.nr);
 
        /* initialize structs / fill in defaults */
-        init_MUTEX(&btv->lock);
-        init_MUTEX(&btv->reslock);
-        spin_lock_init(&btv->s_lock);
-        spin_lock_init(&btv->gpio_lock);
-        init_waitqueue_head(&btv->gpioq);
-        init_waitqueue_head(&btv->i2c_queue);
-        INIT_LIST_HEAD(&btv->c.subs);
-        INIT_LIST_HEAD(&btv->capture);
-        INIT_LIST_HEAD(&btv->vcapture);
+       init_MUTEX(&btv->lock);
+       init_MUTEX(&btv->reslock);
+       spin_lock_init(&btv->s_lock);
+       spin_lock_init(&btv->gpio_lock);
+       init_waitqueue_head(&btv->gpioq);
+       init_waitqueue_head(&btv->i2c_queue);
+       INIT_LIST_HEAD(&btv->c.subs);
+       INIT_LIST_HEAD(&btv->capture);
+       INIT_LIST_HEAD(&btv->vcapture);
        v4l2_prio_init(&btv->prio);
 
        init_timer(&btv->timeout);
@@ -3921,27 +3921,27 @@ static int __devinit bttv_probe(struct pci_dev *dev,
                       btv->c.nr);
                return -EIO;
        }
-        if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
-                printk(KERN_WARNING "bttv%d: No suitable DMA available.\n",
+       if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
+               printk(KERN_WARNING "bttv%d: No suitable DMA available.\n",
                       btv->c.nr);
                return -EIO;
-        }
+       }
        if (!request_mem_region(pci_resource_start(dev,0),
                                pci_resource_len(dev,0),
                                btv->c.name)) {
-                printk(KERN_WARNING "bttv%d: can't request iomem (0x%lx).\n",
+               printk(KERN_WARNING "bttv%d: can't request iomem (0x%lx).\n",
                       btv->c.nr, pci_resource_start(dev,0));
                return -EBUSY;
        }
-        pci_set_master(dev);
+       pci_set_master(dev);
        pci_set_command(dev);
        pci_set_drvdata(dev,btv);
 
-        pci_read_config_byte(dev, PCI_CLASS_REVISION, &btv->revision);
-        pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
-        printk(KERN_INFO "bttv%d: Bt%d (rev %d) at %s, ",
-               bttv_num,btv->id, btv->revision, pci_name(dev));
-        printk("irq: %d, latency: %d, mmio: 0x%lx\n",
+       pci_read_config_byte(dev, PCI_CLASS_REVISION, &btv->revision);
+       pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
+       printk(KERN_INFO "bttv%d: Bt%d (rev %d) at %s, ",
+              bttv_num,btv->id, btv->revision, pci_name(dev));
+       printk("irq: %d, latency: %d, mmio: 0x%lx\n",
               btv->c.pci->irq, lat, pci_resource_start(dev,0));
        schedule();
 
@@ -3952,23 +3952,23 @@ static int __devinit bttv_probe(struct pci_dev *dev,
                goto fail1;
        }
 
-        /* identify card */
+       /* identify card */
        bttv_idcard(btv);
 
-        /* disable irqs, register irq handler */
+       /* disable irqs, register irq handler */
        btwrite(0, BT848_INT_MASK);
-        result = request_irq(btv->c.pci->irq, bttv_irq,
-                             SA_SHIRQ | SA_INTERRUPT,btv->c.name,(void *)btv);
-        if (result < 0) {
-                printk(KERN_ERR "bttv%d: can't get IRQ %d\n",
+       result = request_irq(btv->c.pci->irq, bttv_irq,
+                            SA_SHIRQ | SA_INTERRUPT,btv->c.name,(void *)btv);
+       if (result < 0) {
+               printk(KERN_ERR "bttv%d: can't get IRQ %d\n",
                       bttv_num,btv->c.pci->irq);
                goto fail1;
-        }
+       }
 
        if (0 != bttv_handle_chipset(btv)) {
                result = -EIO;
                goto fail2;
-        }
+       }
 
        /* init options from insmod args */
        btv->opt_combfilter = combfilter;
@@ -3994,29 +3994,29 @@ static int __devinit bttv_probe(struct pci_dev *dev,
        btv->input = 0;
 
        /* initialize hardware */
-        if (bttv_gpio)
-                bttv_gpio_tracking(btv,"pre-init");
+       if (bttv_gpio)
+               bttv_gpio_tracking(btv,"pre-init");
 
        bttv_risc_init_main(btv);
        init_bt848(btv);
 
        /* gpio */
-        btwrite(0x00, BT848_GPIO_REG_INP);
-        btwrite(0x00, BT848_GPIO_OUT_EN);
-        if (bttv_verbose)
-                bttv_gpio_tracking(btv,"init");
+       btwrite(0x00, BT848_GPIO_REG_INP);
+       btwrite(0x00, BT848_GPIO_OUT_EN);
+       if (bttv_verbose)
+               bttv_gpio_tracking(btv,"init");
 
-        /* needs to be done before i2c is registered */
-        bttv_init_card1(btv);
+       /* needs to be done before i2c is registered */
+       bttv_init_card1(btv);
 
-        /* register i2c + gpio */
-        init_bttv_i2c(btv);
+       /* register i2c + gpio */
+       init_bttv_i2c(btv);
 
-        /* some card-specific stuff (needs working i2c) */
-        bttv_init_card2(btv);
+       /* some card-specific stuff (needs working i2c) */
+       bttv_init_card2(btv);
        init_irqreg(btv);
 
-        /* register video4linux + input */
+       /* register video4linux + input */
        if (!bttv_tvcards[btv->c.type].no_video) {
                bttv_register_video(btv);
                bt848_bright(btv,32768);
@@ -4035,10 +4035,10 @@ static int __devinit bttv_probe(struct pci_dev *dev,
 
        /* everything is fine */
        bttv_num++;
-        return 0;
+       return 0;
 
  fail2:
-        free_irq(btv->c.pci->irq,btv);
+       free_irq(btv->c.pci->irq,btv);
 
  fail1:
        if (btv->bt848_mmio)
@@ -4051,12 +4051,12 @@ static int __devinit bttv_probe(struct pci_dev *dev,
 
 static void __devexit bttv_remove(struct pci_dev *pci_dev)
 {
-        struct bttv *btv = pci_get_drvdata(pci_dev);
+       struct bttv *btv = pci_get_drvdata(pci_dev);
 
        if (bttv_verbose)
                printk("bttv%d: unloading\n",btv->c.nr);
 
-        /* shutdown everything (DMA+IRQs) */
+       /* shutdown everything (DMA+IRQs) */
        btand(~15, BT848_GPIO_DMA_CTL);
        btwrite(0, BT848_INT_MASK);
        btwrite(~0x0, BT848_INT_STAT);
@@ -4069,7 +4069,7 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev)
        wake_up(&btv->gpioq);
        bttv_sub_del_devices(&btv->c);
 
-        /* unregister i2c_bus + input */
+       /* unregister i2c_bus + input */
        fini_bttv_i2c(btv);
 
        /* unregister video4linux */
@@ -4079,18 +4079,18 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev)
        btcx_riscmem_free(btv->c.pci,&btv->main);
 
        /* free ressources */
-        free_irq(btv->c.pci->irq,btv);
+       free_irq(btv->c.pci->irq,btv);
        iounmap(btv->bt848_mmio);
-        release_mem_region(pci_resource_start(btv->c.pci,0),
-                           pci_resource_len(btv->c.pci,0));
+       release_mem_region(pci_resource_start(btv->c.pci,0),
+                          pci_resource_len(btv->c.pci,0));
 
        pci_set_drvdata(pci_dev, NULL);
-        return;
+       return;
 }
 
 static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state)
 {
-        struct bttv *btv = pci_get_drvdata(pci_dev);
+       struct bttv *btv = pci_get_drvdata(pci_dev);
        struct bttv_buffer_set idle;
        unsigned long flags;
 
@@ -4125,7 +4125,7 @@ static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state)
 
 static int bttv_resume(struct pci_dev *pci_dev)
 {
-        struct bttv *btv = pci_get_drvdata(pci_dev);
+       struct bttv *btv = pci_get_drvdata(pci_dev);
        unsigned long flags;
        int err;
 
@@ -4170,24 +4170,24 @@ static int bttv_resume(struct pci_dev *pci_dev)
 }
 
 static struct pci_device_id bttv_pci_tbl[] = {
-        {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT848,
-         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT848,
+        PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT849,
-         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+        PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT878,
-         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+        PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
        {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BT879,
-         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
-        {0,}
+        PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {0,}
 };
 
 MODULE_DEVICE_TABLE(pci, bttv_pci_tbl);
 
 static struct pci_driver bttv_pci_driver = {
-        .name     = "bttv",
-        .id_table = bttv_pci_tbl,
-        .probe    = bttv_probe,
-        .remove   = __devexit_p(bttv_remove),
+       .name     = "bttv",
+       .id_table = bttv_pci_tbl,
+       .probe    = bttv_probe,
+       .remove   = __devexit_p(bttv_remove),
        .suspend  = bttv_suspend,
        .resume   = bttv_resume,
 };
index 6b280c0..575ce8b 100644 (file)
@@ -7,7 +7,7 @@
 
 
     Copyright (C) 1996,97,98 Ralph  Metzler (rjkm@thp.uni-koeln.de)
-                           & Marcus Metzler (mocm@thp.uni-koeln.de)
+                          & Marcus Metzler (mocm@thp.uni-koeln.de)
     (c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
 
     This program is free software; you can redistribute it and/or modify
index e684df3..06c5965 100644 (file)
@@ -5,7 +5,7 @@
     bttv - Bt848 frame grabber driver
 
     Copyright (C) 1996,97,98 Ralph  Metzler (rjkm@thp.uni-koeln.de)
-                           & Marcus Metzler (mocm@thp.uni-koeln.de)
+                          & Marcus Metzler (mocm@thp.uni-koeln.de)
     (c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
 
     This program is free software; you can redistribute it and/or modify
@@ -237,7 +237,7 @@ bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
  err:
        if (i2c_debug)
                printk(" ERR: %d\n",retval);
-               return retval;
+       return retval;
 }
 
 static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
@@ -290,7 +290,7 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = {
 
 static int attach_inform(struct i2c_client *client)
 {
-        struct bttv *btv = i2c_get_adapdata(client->adapter);
+       struct bttv *btv = i2c_get_adapdata(client->adapter);
 
        if (bttv_debug)
                printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n",
@@ -300,9 +300,9 @@ static int attach_inform(struct i2c_client *client)
                return 0;
 
        if (btv->tuner_type != UNSET) {
-               struct tuner_setup tun_setup;
+               struct tuner_setup tun_setup;
 
-               tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
+               tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
                tun_setup.type = btv->tuner_type;
                tun_setup.addr = ADDR_UNSET;
 
@@ -312,7 +312,7 @@ static int attach_inform(struct i2c_client *client)
        if (btv->pinnacle_id != UNSET)
                client->driver->command(client,AUDC_CONFIG_PINNACLE,
                                      &btv->pinnacle_id);
-        return 0;
+       return 0;
 }
 
 void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg)
@@ -330,43 +330,43 @@ static struct i2c_client bttv_i2c_client_template = {
 /* read I2C */
 int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
 {
-        unsigned char buffer = 0;
+       unsigned char buffer = 0;
 
        if (0 != btv->i2c_rc)
                return -1;
        if (bttv_verbose && NULL != probe_for)
                printk(KERN_INFO "bttv%d: i2c: checking for %s @ 0x%02x... ",
                       btv->c.nr,probe_for,addr);
-        btv->i2c_client.addr = addr >> 1;
-        if (1 != i2c_master_recv(&btv->i2c_client, &buffer, 1)) {
+       btv->i2c_client.addr = addr >> 1;
+       if (1 != i2c_master_recv(&btv->i2c_client, &buffer, 1)) {
                if (NULL != probe_for) {
                        if (bttv_verbose)
                                printk("not found\n");
                } else
                        printk(KERN_WARNING "bttv%d: i2c read 0x%x: error\n",
                               btv->c.nr,addr);
-                return -1;
+               return -1;
        }
        if (bttv_verbose && NULL != probe_for)
                printk("found\n");
-        return buffer;
+       return buffer;
 }
 
 /* write I2C */
 int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
-                    unsigned char b2, int both)
+                   unsigned char b2, int both)
 {
-        unsigned char buffer[2];
-        int bytes = both ? 2 : 1;
+       unsigned char buffer[2];
+       int bytes = both ? 2 : 1;
 
        if (0 != btv->i2c_rc)
                return -1;
-        btv->i2c_client.addr = addr >> 1;
-        buffer[0] = b1;
-        buffer[1] = b2;
-        if (bytes != i2c_master_send(&btv->i2c_client, buffer, bytes))
+       btv->i2c_client.addr = addr >> 1;
+       buffer[0] = b1;
+       buffer[1] = b2;
+       if (bytes != i2c_master_send(&btv->i2c_client, buffer, bytes))
                return -1;
-        return 0;
+       return 0;
 }
 
 /* read EEPROM content */
@@ -431,8 +431,8 @@ int __devinit init_bttv_i2c(struct bttv *btv)
                 "bt%d #%d [%s]", btv->id, btv->c.nr,
                 btv->use_i2c_hw ? "hw" : "sw");
 
-        i2c_set_adapdata(&btv->c.i2c_adap, btv);
-        btv->i2c_client.adapter = &btv->c.i2c_adap;
+       i2c_set_adapdata(&btv->c.i2c_adap, btv);
+       btv->i2c_client.adapter = &btv->c.i2c_adap;
 
 #ifdef I2C_CLASS_TV_ANALOG
        if (bttv_tvcards[btv->c.type].no_video)
index e8aada7..19b564a 100644 (file)
@@ -1,13 +1,13 @@
 /*
 
     bttv-if.c  --  old gpio interface to other kernel modules
-                   don't use in new code, will go away in 2.7
+                  don't use in new code, will go away in 2.7
                   have a look at bttv-gpio.c instead.
 
     bttv - Bt848 frame grabber driver
 
     Copyright (C) 1996,97,98 Ralph  Metzler (rjkm@thp.uni-koeln.de)
-                           & Marcus Metzler (mocm@thp.uni-koeln.de)
+                          & Marcus Metzler (mocm@thp.uni-koeln.de)
     (c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
 
     This program is free software; you can redistribute it and/or modify
index a5ed99b..3028862 100644 (file)
@@ -74,27 +74,27 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
                }
                if (bpl <= sg_dma_len(sg)-offset) {
                        /* fits into current chunk */
-                        *(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_SOL|
+                       *(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_SOL|
                                            BT848_RISC_EOL|bpl);
-                        *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
-                        offset+=bpl;
+                       *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
+                       offset+=bpl;
                } else {
                        /* scanline needs to be splitted */
-                        todo = bpl;
-                        *(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_SOL|
+                       todo = bpl;
+                       *(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_SOL|
                                            (sg_dma_len(sg)-offset));
-                        *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
-                        todo -= (sg_dma_len(sg)-offset);
-                        offset = 0;
-                        sg++;
-                        while (todo > sg_dma_len(sg)) {
-                                *(rp++)=cpu_to_le32(BT848_RISC_WRITE|
+                       *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
+                       todo -= (sg_dma_len(sg)-offset);
+                       offset = 0;
+                       sg++;
+                       while (todo > sg_dma_len(sg)) {
+                               *(rp++)=cpu_to_le32(BT848_RISC_WRITE|
                                                    sg_dma_len(sg));
-                                *(rp++)=cpu_to_le32(sg_dma_address(sg));
+                               *(rp++)=cpu_to_le32(sg_dma_address(sg));
                                todo -= sg_dma_len(sg);
                                sg++;
                        }
-                        *(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|
+                       *(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|
                                            todo);
                        *(rp++)=cpu_to_le32(sg_dma_address(sg));
                        offset += todo;
@@ -201,8 +201,8 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
                                ri |= BT848_RISC_EOL;
 
                        /* write risc instruction */
-                        *(rp++)=cpu_to_le32(ri | ylen);
-                        *(rp++)=cpu_to_le32(((ylen >> hshift) << 16) |
+                       *(rp++)=cpu_to_le32(ri | ylen);
+                       *(rp++)=cpu_to_le32(((ylen >> hshift) << 16) |
                                            (ylen >> hshift));
                        *(rp++)=cpu_to_le32(sg_dma_address(ysg)+yoffset);
                        yoffset += ylen;
@@ -319,7 +319,7 @@ bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
              int width, int height, int interleaved, int norm)
 {
        const struct bttv_tvnorm *tvnorm = &bttv_tvnorms[norm];
-        u32 xsf, sr;
+       u32 xsf, sr;
        int vdelay;
 
        int swidth       = tvnorm->swidth;
@@ -334,52 +334,52 @@ bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
 
        vdelay = tvnorm->vdelay;
 
-        xsf = (width*scaledtwidth)/swidth;
-        geo->hscale =  ((totalwidth*4096UL)/xsf-4096);
-        geo->hdelay =  tvnorm->hdelayx1;
-        geo->hdelay =  (geo->hdelay*width)/swidth;
-        geo->hdelay &= 0x3fe;
-        sr = ((tvnorm->sheight >> (interleaved?0:1))*512)/height - 512;
-        geo->vscale =  (0x10000UL-sr) & 0x1fff;
-        geo->crop   =  ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) |
-                ((tvnorm->sheight>>4)&0x30) | ((vdelay>>2)&0xc0);
-        geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0;
-        geo->vdelay  =  vdelay;
-        geo->width   =  width;
-        geo->sheight =  tvnorm->sheight;
+       xsf = (width*scaledtwidth)/swidth;
+       geo->hscale =  ((totalwidth*4096UL)/xsf-4096);
+       geo->hdelay =  tvnorm->hdelayx1;
+       geo->hdelay =  (geo->hdelay*width)/swidth;
+       geo->hdelay &= 0x3fe;
+       sr = ((tvnorm->sheight >> (interleaved?0:1))*512)/height - 512;
+       geo->vscale =  (0x10000UL-sr) & 0x1fff;
+       geo->crop   =  ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) |
+               ((tvnorm->sheight>>4)&0x30) | ((vdelay>>2)&0xc0);
+       geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0;
+       geo->vdelay  =  vdelay;
+       geo->width   =  width;
+       geo->sheight =  tvnorm->sheight;
        geo->vtotal  =  tvnorm->vtotal;
 
-        if (btv->opt_combfilter) {
-                geo->vtc  = (width < 193) ? 2 : ((width < 385) ? 1 : 0);
-                geo->comb = (width < 769) ? 1 : 0;
-        } else {
-                geo->vtc  = 0;
-                geo->comb = 0;
-        }
+       if (btv->opt_combfilter) {
+               geo->vtc  = (width < 193) ? 2 : ((width < 385) ? 1 : 0);
+               geo->comb = (width < 769) ? 1 : 0;
+       } else {
+               geo->vtc  = 0;
+               geo->comb = 0;
+       }
 }
 
 static void
 bttv_apply_geo(struct bttv *btv, struct bttv_geometry *geo, int odd)
 {
-        int off = odd ? 0x80 : 0x00;
+       int off = odd ? 0x80 : 0x00;
 
        if (geo->comb)
                btor(BT848_VSCALE_COMB, BT848_E_VSCALE_HI+off);
        else
                btand(~BT848_VSCALE_COMB, BT848_E_VSCALE_HI+off);
 
-        btwrite(geo->vtc,             BT848_E_VTC+off);
-        btwrite(geo->hscale >> 8,     BT848_E_HSCALE_HI+off);
-        btwrite(geo->hscale & 0xff,   BT848_E_HSCALE_LO+off);
-        btaor((geo->vscale>>8), 0xe0, BT848_E_VSCALE_HI+off);
-        btwrite(geo->vscale & 0xff,   BT848_E_VSCALE_LO+off);
-        btwrite(geo->width & 0xff,    BT848_E_HACTIVE_LO+off);
-        btwrite(geo->hdelay & 0xff,   BT848_E_HDELAY_LO+off);
-        btwrite(geo->sheight & 0xff,  BT848_E_VACTIVE_LO+off);
-        btwrite(geo->vdelay & 0xff,   BT848_E_VDELAY_LO+off);
-        btwrite(geo->crop,            BT848_E_CROP+off);
+       btwrite(geo->vtc,             BT848_E_VTC+off);
+       btwrite(geo->hscale >> 8,     BT848_E_HSCALE_HI+off);
+       btwrite(geo->hscale & 0xff,   BT848_E_HSCALE_LO+off);
+       btaor((geo->vscale>>8), 0xe0, BT848_E_VSCALE_HI+off);
+       btwrite(geo->vscale & 0xff,   BT848_E_VSCALE_LO+off);
+       btwrite(geo->width & 0xff,    BT848_E_HACTIVE_LO+off);
+       btwrite(geo->hdelay & 0xff,   BT848_E_HDELAY_LO+off);
+       btwrite(geo->sheight & 0xff,  BT848_E_VACTIVE_LO+off);
+       btwrite(geo->vdelay & 0xff,   BT848_E_VDELAY_LO+off);
+       btwrite(geo->crop,            BT848_E_CROP+off);
        btwrite(geo->vtotal>>8,       BT848_VTOTAL_HI);
-        btwrite(geo->vtotal & 0xff,   BT848_VTOTAL_LO);
+       btwrite(geo->vtotal & 0xff,   BT848_VTOTAL_LO);
 }
 
 /* ---------------------------------------------------------- */
@@ -420,7 +420,7 @@ bttv_set_dma(struct bttv *btv, int override)
        } else {
                del_timer(&btv->timeout);
        }
-        btv->main.cpu[RISC_SLOT_LOOP] = cpu_to_le32(cmd);
+       btv->main.cpu[RISC_SLOT_LOOP] = cpu_to_le32(cmd);
 
        btaor(capctl, ~0x0f, BT848_CAP_CTL);
        if (capctl) {
@@ -432,7 +432,7 @@ bttv_set_dma(struct bttv *btv, int override)
        } else {
                if (!btv->dma_on)
                        return;
-                btand(~3, BT848_GPIO_DMA_CTL);
+               btand(~3, BT848_GPIO_DMA_CTL);
                btv->dma_on = 0;
        }
        return;
@@ -460,19 +460,19 @@ bttv_risc_init_main(struct bttv *btv)
        btv->main.cpu[6] = cpu_to_le32(BT848_RISC_JUMP);
        btv->main.cpu[7] = cpu_to_le32(btv->main.dma + (8<<2));
 
-        btv->main.cpu[8] = cpu_to_le32(BT848_RISC_SYNC | BT848_RISC_RESYNC |
+       btv->main.cpu[8] = cpu_to_le32(BT848_RISC_SYNC | BT848_RISC_RESYNC |
                                       BT848_FIFO_STATUS_VRO);
-        btv->main.cpu[9] = cpu_to_le32(0);
+       btv->main.cpu[9] = cpu_to_le32(0);
 
        /* bottom field */
-        btv->main.cpu[10] = cpu_to_le32(BT848_RISC_JUMP);
+       btv->main.cpu[10] = cpu_to_le32(BT848_RISC_JUMP);
        btv->main.cpu[11] = cpu_to_le32(btv->main.dma + (12<<2));
-        btv->main.cpu[12] = cpu_to_le32(BT848_RISC_JUMP);
+       btv->main.cpu[12] = cpu_to_le32(BT848_RISC_JUMP);
        btv->main.cpu[13] = cpu_to_le32(btv->main.dma + (14<<2));
 
        /* jump back to top field */
        btv->main.cpu[14] = cpu_to_le32(BT848_RISC_JUMP);
-        btv->main.cpu[15] = cpu_to_le32(btv->main.dma + (0<<2));
+       btv->main.cpu[15] = cpu_to_le32(btv->main.dma + (0<<2));
 
        return 0;
 }
index 26cd117..124ea41 100644 (file)
@@ -202,7 +202,7 @@ struct bttv_core {
        struct list_head     subs;     /* struct bttv_sub_device */
 
        /* device config */
-        unsigned int         nr;       /* dev nr (for printk("bttv%d: ...");  */
+       unsigned int         nr;       /* dev nr (for printk("bttv%d: ...");  */
        unsigned int         type;     /* card type (pointer into tvcards[])  */
        char                 name[8];  /* dev name */
 };
@@ -211,16 +211,16 @@ struct bttv;
 
 struct tvcard
 {
-        char *name;
-        unsigned int video_inputs;
-        unsigned int audio_inputs;
-        unsigned int tuner;
-        unsigned int svhs;
+       char *name;
+       unsigned int video_inputs;
+       unsigned int audio_inputs;
+       unsigned int tuner;
+       unsigned int svhs;
        unsigned int digital_mode; // DIGITAL_MODE_CAMERA or DIGITAL_MODE_VIDEO
-        u32 gpiomask;
-        u32 muxsel[16];
-        u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
-        u32 gpiomask2;   /* GPIO MUX mask */
+       u32 gpiomask;
+       u32 muxsel[16];
+       u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
+       u32 gpiomask2;   /* GPIO MUX mask */
 
        /* i2c audio flags */
        unsigned int no_msp34xx:1;
index e0e7c7a..386f546 100644 (file)
 struct bttv_tvnorm {
        int   v4l2_id;
        char  *name;
-        u32   Fsc;
-        u16   swidth, sheight; /* scaled standard width, height */
+       u32   Fsc;
+       u16   swidth, sheight; /* scaled standard width, height */
        u16   totalwidth;
        u8    adelay, bdelay, iform;
        u32   scaledtwidth;
        u16   hdelayx1, hactivex1;
        u16   vdelay;
-        u8    vbipack;
+       u8    vbipack;
        u16   vtotal;
        int   sram;
 };
@@ -267,8 +267,8 @@ struct bttv {
 
        /* card configuration info */
        unsigned int cardid;   /* pci subsystem id (bt878 based ones) */
-        unsigned int tuner_type;  /* tuner chip type */
-        unsigned int pinnacle_id;
+       unsigned int tuner_type;  /* tuner chip type */
+       unsigned int pinnacle_id;
        unsigned int svhs;
        struct bttv_pll_info pll;
        int triton1;
@@ -301,9 +301,9 @@ struct bttv {
 
        /* locking */
        spinlock_t s_lock;
-        struct semaphore lock;
+       struct semaphore lock;
        int resources;
-        struct semaphore reslock;
+       struct semaphore reslock;
 #ifdef VIDIOC_G_PRIORITY
        struct v4l2_prio_state prio;
 #endif
index fac67d9..4ae3f78 100644 (file)
@@ -436,7 +436,7 @@ static int memory_write(struct cx88_core *core, u32 address, u32 value)
 
 static int memory_read(struct cx88_core *core, u32 address, u32 *value)
 {
-        int retval;
+       int retval;
        u32 val;
 
        /* Warning: address is dword address (4 bytes) */
@@ -605,11 +605,11 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
        u32 *dataptr;
 
        retval  = register_write(dev->core, IVTV_REG_VPU, 0xFFFFFFED);
-        retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
-        retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_REFRESH, 0x80000640);
-        retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_PRECHARGE, 0x1A);
+       retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
+       retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_REFRESH, 0x80000640);
+       retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_PRECHARGE, 0x1A);
        msleep(1);
-        retval |= register_write(dev->core, IVTV_REG_APU, 0);
+       retval |= register_write(dev->core, IVTV_REG_APU, 0);
 
        if (retval < 0)
                dprintk(0, "Error with register_write\n");
@@ -657,13 +657,13 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
        release_firmware(firmware);
        dprintk(0, "Firmware upload successful.\n");
 
-        retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
-        retval |= register_read(dev->core, IVTV_REG_SPU, &value);
-        retval |= register_write(dev->core, IVTV_REG_SPU, value & 0xFFFFFFFE);
+       retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
+       retval |= register_read(dev->core, IVTV_REG_SPU, &value);
+       retval |= register_write(dev->core, IVTV_REG_SPU, value & 0xFFFFFFFE);
        msleep(1);
 
        retval |= register_read(dev->core, IVTV_REG_VPU, &value);
-        retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8);
+       retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8);
 
        if (retval < 0)
                dprintk(0, "Error with register_write\n");
@@ -876,7 +876,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
                        au_params |= 0;
                }
                else if( params->au_bitrate.target >=
-                        mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
+                        mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
                {
                        /* clamp the bitrate to the max supported by the standard */
                        params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate;
@@ -942,7 +942,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
        /* TODO: implement the stream ID stuff:
                ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr,
                ps_size, au_pesid, vi_pesid
-       */
+       */
 }
 #define CHECK_PARAM( name ) ( dev->params.name != params->name )
 #define IF_PARAM( name ) if( CHECK_PARAM( name ) )
@@ -1068,7 +1068,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
                        au_params |= 0;
                }
                else if( params->au_bitrate.target >=
-                        mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
+                        mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
                {
                        /* clamp the bitrate to the max supported by the standard */
                        params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate;
@@ -1150,7 +1150,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
        /* TODO: implement the stream ID stuff:
                ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr,
                ps_size, au_pesid, vi_pesid
-       */
+       */
        UPDATE_PARAM( ts_pid_pmt );
        UPDATE_PARAM( ts_pid_audio );
        UPDATE_PARAM( ts_pid_video );
@@ -1712,7 +1712,7 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev,
 
 static void __devexit blackbird_remove(struct pci_dev *pci_dev)
 {
-        struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
+       struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
 
        /* blackbird */
        blackbird_unregister_video(dev);
@@ -1728,8 +1728,8 @@ static struct pci_device_id cx8802_pci_tbl[] = {
        {
                .vendor       = 0x14f1,
                .device       = 0x8802,
-                .subvendor    = PCI_ANY_ID,
-                .subdevice    = PCI_ANY_ID,
+               .subvendor    = PCI_ANY_ID,
+               .subdevice    = PCI_ANY_ID,
        },{
                /* --- end of list --- */
        }
@@ -1737,10 +1737,10 @@ static struct pci_device_id cx8802_pci_tbl[] = {
 MODULE_DEVICE_TABLE(pci, cx8802_pci_tbl);
 
 static struct pci_driver blackbird_pci_driver = {
-        .name     = "cx88-blackbird",
-        .id_table = cx8802_pci_tbl,
-        .probe    = blackbird_probe,
-        .remove   = __devexit_p(blackbird_remove),
+       .name     = "cx88-blackbird",
+       .id_table = cx8802_pci_tbl,
+       .probe    = blackbird_probe,
+       .remove   = __devexit_p(blackbird_remove),
        .suspend  = cx8802_suspend_common,
        .resume   = cx8802_resume_common,
 };
index cf17da8..5049177 100644 (file)
@@ -126,27 +126,27 @@ struct cx88_board cx88_boards[] = {
                .input          = {{
                        .type   = CX88_VMUX_TELEVISION,
                        .vmux   = 0,
-                        .gpio0  = 0x03ff,
+                       .gpio0  = 0x03ff,
                },{
                        .type   = CX88_VMUX_COMPOSITE1,
                        .vmux   = 1,
-                        .gpio0  = 0x03fe,
+                       .gpio0  = 0x03fe,
                },{
                        .type   = CX88_VMUX_SVIDEO,
                        .vmux   = 2,
-                        .gpio0  = 0x03fe,
+                       .gpio0  = 0x03fe,
                }},
        },
-        [CX88_BOARD_WINFAST2000XP_EXPERT] = {
-                .name           = "Leadtek Winfast 2000XP Expert",
-                .tuner_type     = TUNER_PHILIPS_4IN1,
+       [CX88_BOARD_WINFAST2000XP_EXPERT] = {
+               .name           = "Leadtek Winfast 2000XP Expert",
+               .tuner_type     = TUNER_PHILIPS_4IN1,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .tda9887_conf   = TDA9887_PRESENT,
-                .input          = {{
-                        .type   = CX88_VMUX_TELEVISION,
-                        .vmux   = 0,
+               .input          = {{
+                       .type   = CX88_VMUX_TELEVISION,
+                       .vmux   = 0,
                        .gpio0  = 0x00F5e700,
                        .gpio1  = 0x00003004,
                        .gpio2  = 0x00F5e700,
@@ -165,15 +165,15 @@ struct cx88_board cx88_boards[] = {
                        .gpio1  = 0x00003004,
                        .gpio2  = 0x00F5c700,
                        .gpio3  = 0x02000000,
-                }},
-                .radio = {
-                        .type   = CX88_RADIO,
+               }},
+               .radio = {
+                       .type   = CX88_RADIO,
                        .gpio0  = 0x00F5d700,
                        .gpio1  = 0x00003004,
                        .gpio2  = 0x00F5d700,
                        .gpio3  = 0x02000000,
-                },
-        },
+               },
+       },
        [CX88_BOARD_AVERTV_303] = {
                .name           = "AverTV Studio 303 (M126)",
                .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
@@ -214,32 +214,32 @@ struct cx88_board cx88_boards[] = {
                        .gpio1  = 0x000080c0,
                        .gpio2  = 0x0000ff40,
                },{
-                        .type   = CX88_VMUX_COMPOSITE1,
-                        .vmux   = 1,
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
                        .gpio0  = 0x000040bf,
                        .gpio1  = 0x000080c0,
                        .gpio2  = 0x0000ff40,
                },{
-                        .type   = CX88_VMUX_SVIDEO,
-                        .vmux   = 2,
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
                        .gpio0  = 0x000040bf,
                        .gpio1  = 0x000080c0,
                        .gpio2  = 0x0000ff40,
-                }},
-                .radio = {
+               }},
+               .radio = {
                         .type   = CX88_RADIO,
-                },
+               },
        },
        [CX88_BOARD_WINFAST_DV2000] = {
-                .name           = "Leadtek Winfast DV2000",
-                .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+               .name           = "Leadtek Winfast DV2000",
+               .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .tda9887_conf   = TDA9887_PRESENT,
-                .input          = {{
-                        .type   = CX88_VMUX_TELEVISION,
-                        .vmux   = 0,
+               .input          = {{
+                       .type   = CX88_VMUX_TELEVISION,
+                       .vmux   = 0,
                        .gpio0  = 0x0035e700,
                        .gpio1  = 0x00003004,
                        .gpio2  = 0x0035e700,
@@ -260,14 +260,14 @@ struct cx88_board cx88_boards[] = {
                        .gpio2  = 0x02000000,
                        .gpio3  = 0x02000000,
                }},
-                .radio = {
+               .radio = {
                        .type   = CX88_RADIO,
                        .gpio0  = 0x0035d700,
                        .gpio1  = 0x00007004,
                        .gpio2  = 0x0035d700,
                        .gpio3  = 0x02000000,
                 },
-        },
+       },
        [CX88_BOARD_LEADTEK_PVR2000] = {
                // gpio values for PAL version from regspy by DScaler
                .name           = "Leadtek PVR 2000",
@@ -296,25 +296,25 @@ struct cx88_board cx88_boards[] = {
                .blackbird = 1,
        },
        [CX88_BOARD_IODATA_GVVCP3PCI] = {
-               .name           = "IODATA GV-VCP3/PCI",
+               .name           = "IODATA GV-VCP3/PCI",
                .tuner_type     = TUNER_ABSENT,
-               .radio_type     = UNSET,
+               .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .input          = {{
-                       .type   = CX88_VMUX_COMPOSITE1,
-                       .vmux   = 0,
-               },{
-                       .type   = CX88_VMUX_COMPOSITE2,
-                       .vmux   = 1,
-               },{
-                       .type   = CX88_VMUX_SVIDEO,
-                       .vmux   = 2,
-               }},
-       },
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 0,
+               },{
+                       .type   = CX88_VMUX_COMPOSITE2,
+                       .vmux   = 1,
+               },{
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
+               }},
+       },
        [CX88_BOARD_PROLINK_PLAYTVPVR] = {
-                .name           = "Prolink PlayTV PVR",
-                .tuner_type     = TUNER_PHILIPS_FM1236_MK3,
+               .name           = "Prolink PlayTV PVR",
+               .tuner_type     = TUNER_PHILIPS_FM1236_MK3,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
@@ -348,15 +348,15 @@ struct cx88_board cx88_boards[] = {
                        .type   = CX88_VMUX_TELEVISION,
                        .vmux   = 0,
                        .gpio0  = 0x0000fde6,
-               },{
+               },{
                        .type   = CX88_VMUX_SVIDEO,
                        .vmux   = 2,
                        .gpio0  = 0x0000fde6, // 0x0000fda6 L,R RCA audio in?
                }},
-                .radio = {
-                        .type   = CX88_RADIO,
+               .radio = {
+                       .type   = CX88_RADIO,
                        .gpio0  = 0x0000fde2,
-                },
+               },
                .blackbird = 1,
        },
        [CX88_BOARD_MSI_TVANYWHERE] = {
@@ -372,34 +372,34 @@ struct cx88_board cx88_boards[] = {
                        .gpio0  = 0x00000fbf,
                        .gpio2  = 0x0000fc08,
                },{
-                       .type   = CX88_VMUX_COMPOSITE1,
-                       .vmux   = 1,
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
                        .gpio0  = 0x00000fbf,
                        .gpio2  = 0x0000fc68,
                },{
-                       .type   = CX88_VMUX_SVIDEO,
-                       .vmux   = 2,
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
                        .gpio0  = 0x00000fbf,
                        .gpio2  = 0x0000fc68,
-               }},
+               }},
        },
-        [CX88_BOARD_KWORLD_DVB_T] = {
-                .name           = "KWorld/VStream XPert DVB-T",
+       [CX88_BOARD_KWORLD_DVB_T] = {
+               .name           = "KWorld/VStream XPert DVB-T",
                .tuner_type     = TUNER_ABSENT,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
-                .input          = {{
-                        .type   = CX88_VMUX_COMPOSITE1,
-                        .vmux   = 1,
+               .input          = {{
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
                        .gpio0  = 0x0700,
                        .gpio2  = 0x0101,
-                },{
-                        .type   = CX88_VMUX_SVIDEO,
-                        .vmux   = 2,
+               },{
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
                        .gpio0  = 0x0700,
                        .gpio2  = 0x0101,
-                }},
+               }},
                .dvb            = 1,
        },
        [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
@@ -425,27 +425,27 @@ struct cx88_board cx88_boards[] = {
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
-                .input          = {{
-                        .type   = CX88_VMUX_TELEVISION,
-                        .vmux   = 0,
-                        .gpio0  = 0x07f8,
+               .input          = {{
+                       .type   = CX88_VMUX_TELEVISION,
+                       .vmux   = 0,
+                       .gpio0  = 0x07f8,
                },{
                        .type   = CX88_VMUX_DEBUG,
                        .vmux   = 0,
                        .gpio0  = 0x07f9,  // mono from tuner chip
-                },{
-                        .type   = CX88_VMUX_COMPOSITE1,
-                        .vmux   = 1,
-                        .gpio0  = 0x000007fa,
-                },{
-                        .type   = CX88_VMUX_SVIDEO,
-                        .vmux   = 2,
-                        .gpio0  = 0x000007fa,
-                }},
-                .radio = {
-                        .type   = CX88_RADIO,
-                        .gpio0  = 0x000007f8,
-                },
+               },{
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
+                       .gpio0  = 0x000007fa,
+               },{
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
+                       .gpio0  = 0x000007fa,
+               }},
+               .radio = {
+                       .type   = CX88_RADIO,
+                       .gpio0  = 0x000007f8,
+               },
        },
        [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q] = {
                .name           = "DViCO FusionHDTV 3 Gold-Q",
@@ -489,28 +489,28 @@ struct cx88_board cx88_boards[] = {
                }},
                .dvb            = 1,
        },
-        [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
+       [CX88_BOARD_HAUPPAUGE_DVB_T1] = {
                .name           = "Hauppauge Nova-T DVB-T",
                .tuner_type     = TUNER_ABSENT,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .input          = {{
-                        .type   = CX88_VMUX_DVB,
-                        .vmux   = 0,
-                }},
+                       .type   = CX88_VMUX_DVB,
+                       .vmux   = 0,
+               }},
                .dvb            = 1,
        },
-        [CX88_BOARD_CONEXANT_DVB_T1] = {
+       [CX88_BOARD_CONEXANT_DVB_T1] = {
                .name           = "Conexant DVB-T reference design",
                .tuner_type     = TUNER_ABSENT,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
-                .input          = {{
-                        .type   = CX88_VMUX_DVB,
-                        .vmux   = 0,
-                }},
+               .input          = {{
+                       .type   = CX88_VMUX_DVB,
+                       .vmux   = 0,
+               }},
                .dvb            = 1,
        },
        [CX88_BOARD_PROVIDEO_PV259] = {
@@ -543,12 +543,12 @@ struct cx88_board cx88_boards[] = {
                .dvb            = 1,
        },
        [CX88_BOARD_DNTV_LIVE_DVB_T] = {
-               .name           = "digitalnow DNTV Live! DVB-T",
+               .name           = "digitalnow DNTV Live! DVB-T",
                .tuner_type     = TUNER_ABSENT,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
-               .input          = {{
+               .input          = {{
                        .type   = CX88_VMUX_COMPOSITE1,
                        .vmux   = 1,
                        .gpio0  = 0x00000700,
@@ -705,44 +705,44 @@ struct cx88_board cx88_boards[] = {
                         .gpio0 = 0xbf60,
                 },
        },
-        [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
+       [CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_T] = {
                .name           = "DViCO FusionHDTV 3 Gold-T",
                .tuner_type     = TUNER_THOMSON_DTT7611,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .input          = {{
-                        .type   = CX88_VMUX_TELEVISION,
-                        .vmux   = 0,
-                        .gpio0  = 0x97ed,
-                },{
-                        .type   = CX88_VMUX_COMPOSITE1,
-                        .vmux   = 1,
-                        .gpio0  = 0x97e9,
-                },{
-                        .type   = CX88_VMUX_SVIDEO,
-                        .vmux   = 2,
-                        .gpio0  = 0x97e9,
-                }},
+                       .type   = CX88_VMUX_TELEVISION,
+                       .vmux   = 0,
+                       .gpio0  = 0x97ed,
+               },{
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
+                       .gpio0  = 0x97e9,
+               },{
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
+                       .gpio0  = 0x97e9,
+               }},
                .dvb            = 1,
-        },
-        [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
-                .name           = "ADS Tech Instant TV DVB-T PCI",
+       },
+       [CX88_BOARD_ADSTECH_DVB_T_PCI] = {
+               .name           = "ADS Tech Instant TV DVB-T PCI",
                .tuner_type     = TUNER_ABSENT,
                .radio_type     = UNSET,
                .tuner_addr     = ADDR_UNSET,
                .radio_addr     = ADDR_UNSET,
                .input          = {{
-                        .type   = CX88_VMUX_COMPOSITE1,
-                        .vmux   = 1,
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
                        .gpio0  = 0x0700,
                        .gpio2  = 0x0101,
-                },{
-                        .type   = CX88_VMUX_SVIDEO,
-                        .vmux   = 2,
+               },{
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
                        .gpio0  = 0x0700,
                        .gpio2  = 0x0101,
-                }},
+               }},
                .dvb            = 1,
        },
        [CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1] = {
@@ -762,18 +762,18 @@ struct cx88_board cx88_boards[] = {
                .radio_addr     = ADDR_UNSET,
                .tda9887_conf   = TDA9887_PRESENT,
                .input          = {{
-                        .type   = CX88_VMUX_TELEVISION,
-                        .vmux   = 0,
-                        .gpio0  = 0x87fd,
-                },{
-                        .type   = CX88_VMUX_COMPOSITE1,
-                        .vmux   = 1,
-                        .gpio0  = 0x87f9,
-                },{
-                        .type   = CX88_VMUX_SVIDEO,
-                        .vmux   = 2,
-                        .gpio0  = 0x87f9,
-                }},
+                       .type   = CX88_VMUX_TELEVISION,
+                       .vmux   = 0,
+                       .gpio0  = 0x87fd,
+               },{
+                       .type   = CX88_VMUX_COMPOSITE1,
+                       .vmux   = 1,
+                       .gpio0  = 0x87f9,
+               },{
+                       .type   = CX88_VMUX_SVIDEO,
+                       .vmux   = 2,
+                       .gpio0  = 0x87f9,
+               }},
                .dvb            = 1,
        },
        [CX88_BOARD_AVERMEDIA_ULTRATV_MC_550] = {
@@ -805,23 +805,23 @@ struct cx88_board cx88_boards[] = {
        },
        [CX88_BOARD_KWORLD_VSTREAM_EXPERT_DVD] = {
                 /* Alexander Wold <awold@bigfoot.com> */
-                .name           = "Kworld V-Stream Xpert DVD",
-                 .tuner_type     = UNSET,
-                 .input          = {{
-                         .type   = CX88_VMUX_COMPOSITE1,
-                         .vmux   = 1,
-                         .gpio0  = 0x03000000,
-                         .gpio1  = 0x01000000,
-                         .gpio2  = 0x02000000,
-                         .gpio3  = 0x00100000,
-                 },{
-                         .type   = CX88_VMUX_SVIDEO,
-                         .vmux   = 2,
-                         .gpio0  = 0x03000000,
+                .name           = "Kworld V-Stream Xpert DVD",
+                .tuner_type     = UNSET,
+                .input          = {{
+                        .type   = CX88_VMUX_COMPOSITE1,
+                        .vmux   = 1,
+                        .gpio0  = 0x03000000,
                         .gpio1  = 0x01000000,
                         .gpio2  = 0x02000000,
                         .gpio3  = 0x00100000,
-                 }},
+                },{
+                        .type   = CX88_VMUX_SVIDEO,
+                        .vmux   = 2,
+                        .gpio0  = 0x03000000,
+                        .gpio1  = 0x01000000,
+                        .gpio2  = 0x02000000,
+                        .gpio3  = 0x00100000,
+                }},
        },
        [CX88_BOARD_ATI_HDTVWONDER] = {
                .name           = "ATI HDTV Wonder",
@@ -892,26 +892,26 @@ struct cx88_subid cx88_subids[] = {
                .subdevice = 0x00f8,
                .card      = CX88_BOARD_ATI_WONDER_PRO,
        },{
-                .subvendor = 0x107d,
-                .subdevice = 0x6611,
-                .card      = CX88_BOARD_WINFAST2000XP_EXPERT,
+               .subvendor = 0x107d,
+               .subdevice = 0x6611,
+               .card      = CX88_BOARD_WINFAST2000XP_EXPERT,
+       },{
+               .subvendor = 0x107d,
+               .subdevice = 0x6613,    /* NTSC */
+               .card      = CX88_BOARD_WINFAST2000XP_EXPERT,
+       },{
+               .subvendor = 0x107d,
+               .subdevice = 0x6620,
+               .card      = CX88_BOARD_WINFAST_DV2000,
        },{
-                .subvendor = 0x107d,
-                .subdevice = 0x6613,   /* NTSC */
-                .card      = CX88_BOARD_WINFAST2000XP_EXPERT,
+               .subvendor = 0x107d,
+               .subdevice = 0x663b,
+               .card      = CX88_BOARD_LEADTEK_PVR2000,
        },{
                .subvendor = 0x107d,
-                .subdevice = 0x6620,
-                .card      = CX88_BOARD_WINFAST_DV2000,
-        },{
-                .subvendor = 0x107d,
-                .subdevice = 0x663b,
-                .card      = CX88_BOARD_LEADTEK_PVR2000,
-        },{
-                .subvendor = 0x107d,
-                .subdevice = 0x663C,
-                .card      = CX88_BOARD_LEADTEK_PVR2000,
-        },{
+               .subdevice = 0x663C,
+               .card      = CX88_BOARD_LEADTEK_PVR2000,
+       },{
                .subvendor = 0x1461,
                .subdevice = 0x000b,
                .card      = CX88_BOARD_AVERTV_303,
@@ -920,13 +920,13 @@ struct cx88_subid cx88_subids[] = {
                .subdevice = 0x8606,
                .card      = CX88_BOARD_MSI_TVANYWHERE_MASTER,
        },{
-               .subvendor = 0x10fc,
-               .subdevice = 0xd003,
-               .card      = CX88_BOARD_IODATA_GVVCP3PCI,
+               .subvendor = 0x10fc,
+               .subdevice = 0xd003,
+               .card      = CX88_BOARD_IODATA_GVVCP3PCI,
        },{
-               .subvendor = 0x1043,
-               .subdevice = 0x4823,  /* with mpeg encoder */
-               .card      = CX88_BOARD_ASUS_PVR_416,
+               .subvendor = 0x1043,
+               .subdevice = 0x4823,  /* with mpeg encoder */
+               .card      = CX88_BOARD_ASUS_PVR_416,
        },{
                .subvendor = 0x17de,
                .subdevice = 0x08a6,
@@ -943,15 +943,15 @@ struct cx88_subid cx88_subids[] = {
                .subvendor = 0x18ac,
                .subdevice = 0xdb00,
                .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1,
-       },{
+       },{
                .subvendor = 0x0070,
                .subdevice = 0x9002,
                .card      = CX88_BOARD_HAUPPAUGE_DVB_T1,
-       },{
+       },{
                .subvendor = 0x14f1,
                .subdevice = 0x0187,
                .card      = CX88_BOARD_CONEXANT_DVB_T1,
-       },{
+       },{
                .subvendor = 0x1540,
                .subdevice = 0x2580,
                .card      = CX88_BOARD_PROVIDEO_PV259,
@@ -960,9 +960,9 @@ struct cx88_subid cx88_subids[] = {
                .subdevice = 0xdb10,
                .card      = CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS,
        },{
-                .subvendor = 0x1554,
-                .subdevice = 0x4811,
-                .card      = CX88_BOARD_PIXELVIEW,
+               .subvendor = 0x1554,
+               .subdevice = 0x4811,
+               .card      = CX88_BOARD_PIXELVIEW,
        },{
                .subvendor = 0x7063,
                .subdevice = 0x3000, /* HD-3000 card */
@@ -987,23 +987,23 @@ struct cx88_subid cx88_subids[] = {
                .subvendor = 0x1421,
                .subdevice = 0x0334,
                .card      = CX88_BOARD_ADSTECH_DVB_T_PCI,
-       },{
+       },{
                .subvendor = 0x153b,
                .subdevice = 0x1166,
                .card      = CX88_BOARD_TERRATEC_CINERGY_1400_DVB_T1,
-       },{
+       },{
                .subvendor = 0x18ac,
                .subdevice = 0xd500,
                .card      = CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD,
-       },{
+       },{
                .subvendor = 0x1461,
                .subdevice = 0x8011,
                .card      = CX88_BOARD_AVERMEDIA_ULTRATV_MC_550,
-       },{
+       },{
                .subvendor = PCI_VENDOR_ID_ATI,
                .subdevice = 0xa101,
                .card      = CX88_BOARD_ATI_HDTVWONDER,
-        },{
+       },{
                .subvendor = 0x107d,
                .subdevice = 0x665f,
                .card      = CX88_BOARD_WINFAST_DTV1000,
index d4d39c1..f01a631 100644 (file)
@@ -153,26 +153,26 @@ static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist,
                }
                if (bpl <= sg_dma_len(sg)-offset) {
                        /* fits into current chunk */
-                        *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|RISC_EOL|bpl);
-                        *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
-                        offset+=bpl;
+                       *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|RISC_EOL|bpl);
+                       *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
+                       offset+=bpl;
                } else {
                        /* scanline needs to be splitted */
-                        todo = bpl;
-                        *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|
+                       todo = bpl;
+                       *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|
                                            (sg_dma_len(sg)-offset));
-                        *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
-                        todo -= (sg_dma_len(sg)-offset);
-                        offset = 0;
-                        sg++;
-                        while (todo > sg_dma_len(sg)) {
-                                *(rp++)=cpu_to_le32(RISC_WRITE|
+                       *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
+                       todo -= (sg_dma_len(sg)-offset);
+                       offset = 0;
+                       sg++;
+                       while (todo > sg_dma_len(sg)) {
+                               *(rp++)=cpu_to_le32(RISC_WRITE|
                                                    sg_dma_len(sg));
-                                *(rp++)=cpu_to_le32(sg_dma_address(sg));
+                               *(rp++)=cpu_to_le32(sg_dma_address(sg));
                                todo -= sg_dma_len(sg);
                                sg++;
                        }
-                        *(rp++)=cpu_to_le32(RISC_WRITE|RISC_EOL|todo);
+                       *(rp++)=cpu_to_le32(RISC_WRITE|RISC_EOL|todo);
                        *(rp++)=cpu_to_le32(sg_dma_address(sg));
                        offset += todo;
                }
@@ -309,7 +309,7 @@ struct sram_channel cx88_sram_channels[] = {
                .name       = "video y / packed",
                .cmds_start = 0x180040,
                .ctrl_start = 0x180400,
-               .cdt        = 0x180400 + 64,
+               .cdt        = 0x180400 + 64,
                .fifo_start = 0x180c00,
                .fifo_size  = 0x002800,
                .ptr1_reg   = MO_DMA21_PTR1,
@@ -321,7 +321,7 @@ struct sram_channel cx88_sram_channels[] = {
                .name       = "video u",
                .cmds_start = 0x180080,
                .ctrl_start = 0x1804a0,
-               .cdt        = 0x1804a0 + 64,
+               .cdt        = 0x1804a0 + 64,
                .fifo_start = 0x183400,
                .fifo_size  = 0x000800,
                .ptr1_reg   = MO_DMA22_PTR1,
@@ -333,7 +333,7 @@ struct sram_channel cx88_sram_channels[] = {
                .name       = "video v",
                .cmds_start = 0x1800c0,
                .ctrl_start = 0x180540,
-               .cdt        = 0x180540 + 64,
+               .cdt        = 0x180540 + 64,
                .fifo_start = 0x183c00,
                .fifo_size  = 0x000800,
                .ptr1_reg   = MO_DMA23_PTR1,
@@ -345,7 +345,7 @@ struct sram_channel cx88_sram_channels[] = {
                .name       = "vbi",
                .cmds_start = 0x180100,
                .ctrl_start = 0x1805e0,
-               .cdt        = 0x1805e0 + 64,
+               .cdt        = 0x1805e0 + 64,
                .fifo_start = 0x184400,
                .fifo_size  = 0x001000,
                .ptr1_reg   = MO_DMA24_PTR1,
@@ -357,7 +357,7 @@ struct sram_channel cx88_sram_channels[] = {
                .name       = "audio from",
                .cmds_start = 0x180140,
                .ctrl_start = 0x180680,
-               .cdt        = 0x180680 + 64,
+               .cdt        = 0x180680 + 64,
                .fifo_start = 0x185400,
                .fifo_size  = 0x000200,
                .ptr1_reg   = MO_DMA25_PTR1,
@@ -369,7 +369,7 @@ struct sram_channel cx88_sram_channels[] = {
                .name       = "audio to",
                .cmds_start = 0x180180,
                .ctrl_start = 0x180720,
-               .cdt        = 0x180680 + 64,  /* same as audio IN */
+               .cdt        = 0x180680 + 64,  /* same as audio IN */
                .fifo_start = 0x185400,       /* same as audio IN */
                .fifo_size  = 0x000200,       /* same as audio IN */
                .ptr1_reg   = MO_DMA26_PTR1,
@@ -1137,7 +1137,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
        if (!core->radio_addr)
                core->radio_addr = cx88_boards[core->board].radio_addr;
 
-        printk(KERN_INFO "TV tuner %d at 0x%02x, Radio tuner %d at 0x%02x\n",
+       printk(KERN_INFO "TV tuner %d at 0x%02x, Radio tuner %d at 0x%02x\n",
                core->tuner_type, core->tuner_addr<<1,
                core->radio_type, core->radio_addr<<1);
 
index 579de88..3be601c 100644 (file)
@@ -128,7 +128,7 @@ static int dntv_live_dvbt_demod_init(struct dvb_frontend* fe)
        static u8 reset []         = { 0x50, 0x80 };
        static u8 adc_ctl_1_cfg [] = { 0x8E, 0x40 };
        static u8 agc_cfg []       = { 0x67, 0x10, 0x23, 0x00, 0xFF, 0xFF,
-                                      0x00, 0xFF, 0x00, 0x40, 0x40 };
+                                      0x00, 0xFF, 0x00, 0x40, 0x40 };
        static u8 dntv_extra[]     = { 0xB5, 0x7A };
        static u8 capt_range_cfg[] = { 0x75, 0x32 };
 
@@ -464,7 +464,7 @@ static int __devinit dvb_probe(struct pci_dev *pci_dev,
 
 static void __devexit dvb_remove(struct pci_dev *pci_dev)
 {
-        struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
+       struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
 
        /* dvb */
        videobuf_dvb_unregister(&dev->dvb);
@@ -479,8 +479,8 @@ static struct pci_device_id cx8802_pci_tbl[] = {
        {
                .vendor       = 0x14f1,
                .device       = 0x8802,
-                .subvendor    = PCI_ANY_ID,
-                .subdevice    = PCI_ANY_ID,
+               .subvendor    = PCI_ANY_ID,
+               .subdevice    = PCI_ANY_ID,
        },{
                /* --- end of list --- */
        }
@@ -488,10 +488,10 @@ static struct pci_device_id cx8802_pci_tbl[] = {
 MODULE_DEVICE_TABLE(pci, cx8802_pci_tbl);
 
 static struct pci_driver dvb_pci_driver = {
-        .name     = "cx88-dvb",
-        .id_table = cx8802_pci_tbl,
-        .probe    = dvb_probe,
-        .remove   = __devexit_p(dvb_remove),
+       .name     = "cx88-dvb",
+       .id_table = cx8802_pci_tbl,
+       .probe    = dvb_probe,
+       .remove   = __devexit_p(dvb_remove),
        .suspend  = cx8802_suspend_common,
        .resume   = cx8802_resume_common,
 };
index 761cebd..9790d41 100644 (file)
@@ -3,7 +3,7 @@
     cx88-i2c.c  --  all the i2c code is here
 
     Copyright (C) 1996,97,98 Ralph  Metzler (rjkm@thp.uni-koeln.de)
-                           & Marcus Metzler (mocm@thp.uni-koeln.de)
+                          & Marcus Metzler (mocm@thp.uni-koeln.de)
     (c) 2002 Yurij Sysoev <yurij@naturesoft.net>
     (c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
 
@@ -90,7 +90,7 @@ static int cx8800_bit_getsda(void *data)
 
 static int attach_inform(struct i2c_client *client)
 {
-        struct tuner_setup tun_setup;
+       struct tuner_setup tun_setup;
        struct cx88_core *core = i2c_get_adapdata(client->adapter);
 
        dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
@@ -98,7 +98,7 @@ static int attach_inform(struct i2c_client *client)
        if (!client->driver->command)
                return 0;
 
-        if (core->radio_type != UNSET) {
+       if (core->radio_type != UNSET) {
                if ((core->radio_addr==ADDR_UNSET)||(core->radio_addr==client->addr)) {
                        tun_setup.mode_mask = T_RADIO;
                        tun_setup.type = core->radio_type;
@@ -106,8 +106,8 @@ static int attach_inform(struct i2c_client *client)
 
                        client->driver->command (client, TUNER_SET_TYPE_ADDR, &tun_setup);
                }
-        }
-        if (core->tuner_type != UNSET) {
+       }
+       if (core->tuner_type != UNSET) {
                if ((core->tuner_addr==ADDR_UNSET)||(core->tuner_addr==client->addr)) {
 
                        tun_setup.mode_mask = T_ANALOG_TV;
@@ -116,7 +116,7 @@ static int attach_inform(struct i2c_client *client)
 
                        client->driver->command (client,TUNER_SET_TYPE_ADDR, &tun_setup);
                }
-        }
+       }
 
        if (core->tda9887_conf)
                client->driver->command(client, TDA9887_SET_CONFIG, &core->tda9887_conf);
@@ -159,7 +159,7 @@ static struct i2c_adapter cx8800_i2c_adap_template = {
 };
 
 static struct i2c_client cx8800_i2c_client_template = {
-        .name  = "cx88xx internal",
+       .name   = "cx88xx internal",
 };
 
 static char *i2c_devs[128] = {
@@ -202,10 +202,10 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci)
 
        core->i2c_adap.dev.parent = &pci->dev;
        strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name));
-        core->i2c_algo.data = core;
-        i2c_set_adapdata(&core->i2c_adap,core);
-        core->i2c_adap.algo_data = &core->i2c_algo;
-        core->i2c_client.adapter = &core->i2c_adap;
+       core->i2c_algo.data = core;
+       i2c_set_adapdata(&core->i2c_adap,core);
+       core->i2c_adap.algo_data = &core->i2c_algo;
+       core->i2c_client.adapter = &core->i2c_adap;
 
        cx8800_bit_setscl(core,1);
        cx8800_bit_setsda(core,1);
index c27fe4c..38b12eb 100644 (file)
@@ -553,7 +553,7 @@ void cx88_ir_irq(struct cx88_core *core)
 
                if ((ircode & 0xffff) != 0xeb04) { /* wrong address */
                        ir_dprintk("pulse distance decoded wrong address\n");
-                       break;
+                       break;
                }
 
                if (((~ircode >> 24) & 0xff) != ((ircode >> 16) & 0xff)) { /* wrong checksum */
index 2c4fbe9..35e6d0c 100644 (file)
@@ -316,14 +316,14 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev)
                spin_unlock(&dev->slock);
        }
 
-        /* other general errors */
-        if (status & 0x1f0100) {
+       /* other general errors */
+       if (status & 0x1f0100) {
                dprintk( 0, "general errors: 0x%08x\n", status & 0x1f0100 );
-                spin_lock(&dev->slock);
+               spin_lock(&dev->slock);
                cx8802_stop_dma(dev);
-                cx8802_restart_queue(dev,&dev->mpegq);
-                spin_unlock(&dev->slock);
-        }
+               cx8802_restart_queue(dev,&dev->mpegq);
+               spin_unlock(&dev->slock);
+       }
 }
 
 #define MAX_IRQ_LOOP 10
@@ -379,8 +379,8 @@ int cx8802_init_common(struct cx8802_dev *dev)
        }
 
        pci_read_config_byte(dev->pci, PCI_CLASS_REVISION, &dev->pci_rev);
-        pci_read_config_byte(dev->pci, PCI_LATENCY_TIMER,  &dev->pci_lat);
-        printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, "
+       pci_read_config_byte(dev->pci, PCI_LATENCY_TIMER,  &dev->pci_lat);
+       printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, "
               "latency: %d, mmio: 0x%lx\n", dev->core->name,
               pci_name(dev->pci), dev->pci_rev, dev->pci->irq,
               dev->pci_lat,pci_resource_start(dev->pci,0));
@@ -430,7 +430,7 @@ void cx8802_fini_common(struct cx8802_dev *dev)
 
 int cx8802_suspend_common(struct pci_dev *pci_dev, pm_message_t state)
 {
-        struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
+       struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
        struct cx88_core *core = dev->core;
 
        /* stop mpeg dma */
index 0a3a62f..d3bf5b1 100644 (file)
@@ -3,9 +3,9 @@
     cx88x-hw.h - CX2388x register offsets
 
     Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
-                  2001 Michael Eskin
-                  2002 Yurij Sysoev <yurij@naturesoft.net>
-                  2003 Gerd Knorr <kraxel@bytesex.org>
+                 2001 Michael Eskin
+                 2002 Yurij Sysoev <yurij@naturesoft.net>
+                 2003 Gerd Knorr <kraxel@bytesex.org>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #define ColorFormatGamma         0x1000
 
 #define Interlaced              0x1
-#define NonInterlaced           0x0
+#define NonInterlaced           0x0
 
 #define FieldEven               0x1
 #define FieldOdd                0x0
 
-#define TGReadWriteMode                 0x0
-#define TGEnableMode            0x1
+#define TGReadWriteMode                 0x0
+#define TGEnableMode            0x1
 
 #define DV_CbAlign              0x0
 #define DV_Y0Align              0x1
index 4c99fc3..f22ccb6 100644 (file)
@@ -100,7 +100,7 @@ static struct cx88_tvnorm tvnorms[] = {
                .id        = V4L2_STD_PAL_I,
                .cxiformat = VideoFormatPAL,
                .cxoformat = 0x181f0008,
-        },{
+       },{
                .name      = "PAL-M",
                .id        = V4L2_STD_PAL_M,
                .cxiformat = VideoFormatPALM,
@@ -470,7 +470,7 @@ static int restart_video_queue(struct cx8800_dev    *dev,
        struct list_head *item;
 
        if (!list_empty(&q->active)) {
-               buf = list_entry(q->active.next, struct cx88_buffer, vb.queue);
+               buf = list_entry(q->active.next, struct cx88_buffer, vb.queue);
                dprintk(2,"restart_queue [%p/%d]: restart dma\n",
                        buf, buf->vb.i);
                start_video_dma(dev, q, buf);
@@ -486,7 +486,7 @@ static int restart_video_queue(struct cx8800_dev    *dev,
        for (;;) {
                if (list_empty(&q->queued))
                        return 0;
-               buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue);
+               buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue);
                if (NULL == prev) {
                        list_del(&buf->vb.queue);
                        list_add_tail(&buf->vb.queue,&q->active);
@@ -783,7 +783,7 @@ static int video_open(struct inode *inode, struct file *file)
                cx88_call_i2c_clients(core,AUDC_SET_RADIO,NULL);
        }
 
-        return 0;
+       return 0;
 }
 
 static ssize_t
@@ -922,7 +922,7 @@ static int set_control(struct cx88_core *core, struct v4l2_control *ctl)
 {
        /* struct cx88_core *core = dev->core; */
        struct cx88_ctrl *c = NULL;
-        u32 v_sat_value;
+       u32 v_sat_value;
        u32 value;
        int i;
 
@@ -1252,7 +1252,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
 }
 
 int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
-                  struct cx88_core *core, unsigned int cmd, void *arg, v4l2_kioctl driver_ioctl)
+                 struct cx88_core *core, unsigned int cmd, void *arg, v4l2_kioctl driver_ioctl)
 {
        int err;
 
@@ -1399,7 +1399,7 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
 
                cx88_get_stereo(core ,t);
                reg = cx_read(MO_DEVICE_STATUS);
-                t->signal = (reg & (1<<5)) ? 0xffff : 0x0000;
+               t->signal = (reg & (1<<5)) ? 0xffff : 0x0000;
                return 0;
        }
        case VIDIOC_S_TUNER:
@@ -1486,7 +1486,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
                struct v4l2_capability *cap = arg;
 
                memset(cap,0,sizeof(*cap));
-                strcpy(cap->driver, "cx8800");
+               strcpy(cap->driver, "cx8800");
                strlcpy(cap->card, cx88_boards[core->board].name,
                        sizeof(cap->card));
                sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
@@ -1827,8 +1827,8 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
 
        /* print pci info */
        pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev);
-        pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER,  &dev->pci_lat);
-        printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, "
+       pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER,  &dev->pci_lat);
+       printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, "
               "latency: %d, mmio: 0x%lx\n", core->name,
               pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
               dev->pci_lat,pci_resource_start(pci_dev,0));
@@ -1944,7 +1944,7 @@ fail_free:
 
 static void __devexit cx8800_finidev(struct pci_dev *pci_dev)
 {
-        struct cx8800_dev *dev = pci_get_drvdata(pci_dev);
+       struct cx8800_dev *dev = pci_get_drvdata(pci_dev);
        struct cx88_core *core = dev->core;
 
        /* stop thread */
index ea5c092..baeae1a 100644 (file)
@@ -259,8 +259,8 @@ struct cx88_core {
        /* pci stuff */
        int                        pci_bus;
        int                        pci_slot;
-        u32                        __iomem *lmmio;
-        u8                         __iomem *bmmio;
+       u32                        __iomem *lmmio;
+       u8                         __iomem *bmmio;
        u32                        shadow[SHADOW_MAX];
        int                        pci_irqmask;
 
index 59f8fa0..f086053 100644 (file)
@@ -2,8 +2,8 @@
    em2820-cards.c - driver for Empia EM2800/EM2820/2840 USB video capture devices
 
    Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com>
-                      Ludovico Cavedon <cavedon@sssup.it>
-                      Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+                     Ludovico Cavedon <cavedon@sssup.it>
+                     Mauro Carvalho Chehab <mchehab@brturbo.com.br>
 
    Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de>
 
index f7b8fb0..227a47d 100644 (file)
@@ -2,8 +2,8 @@
    em2820-core.c - driver for Empia EM2800/EM2820/2840 USB video capture devices
 
    Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com>
-                      Ludovico Cavedon <cavedon@sssup.it>
-                      Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+                     Ludovico Cavedon <cavedon@sssup.it>
+                     Mauro Carvalho Chehab <mchehab@brturbo.com.br>
 
    Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de>
 
 
 /* #define ENABLE_DEBUG_ISOC_FRAMES */
 
-unsigned int core_debug = 0;
+unsigned int core_debug;
 module_param(core_debug,int,0644);
 MODULE_PARM_DESC(core_debug,"enable debug messages [core]");
 
 #define em2820_coredbg(fmt, arg...) do {\
-        if (core_debug) \
-                printk(KERN_INFO "%s %s :"fmt, \
-                         dev->name, __FUNCTION__ , ##arg); } while (0)
+       if (core_debug) \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __FUNCTION__ , ##arg); } while (0)
 
-unsigned int reg_debug = 0;
+unsigned int reg_debug;
 module_param(reg_debug,int,0644);
 MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]");
 
 #define em2820_regdbg(fmt, arg...) do {\
-        if (reg_debug) \
-                printk(KERN_INFO "%s %s :"fmt, \
-                         dev->name, __FUNCTION__ , ##arg); } while (0)
+       if (reg_debug) \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __FUNCTION__ , ##arg); } while (0)
 
-unsigned int isoc_debug = 0;
+unsigned int isoc_debug;
 module_param(isoc_debug,int,0644);
 MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]");
 
 #define em2820_isocdbg(fmt, arg...) do {\
-        if (isoc_debug) \
-                printk(KERN_INFO "%s %s :"fmt, \
-                         dev->name, __FUNCTION__ , ##arg); } while (0)
+       if (isoc_debug) \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __FUNCTION__ , ##arg); } while (0)
 
 static int alt = EM2820_PINOUT;
 module_param(alt, int, 0644);
index f6bfc03..bfe0d87 100644 (file)
@@ -2,8 +2,8 @@
    em2820-i2c.c - driver for Empia EM2800/EM2820/2840 USB video capture devices
 
    Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com>
-                      Ludovico Cavedon <cavedon@sssup.it>
-                      Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+                     Ludovico Cavedon <cavedon@sssup.it>
+                     Mauro Carvalho Chehab <mchehab@brturbo.com.br>
 
    Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de>
 
index ba367a9..8681a79 100644 (file)
@@ -43,34 +43,34 @@ MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]");
 /* ---------------------------------------------------------------------- */
 
 static IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE] = {
-       [ 0x01 ] = KEY_CHANNEL,
-       [ 0x02 ] = KEY_SELECT,
-       [ 0x03 ] = KEY_MUTE,
-       [ 0x04 ] = KEY_POWER,
-       [ 0x05 ] = KEY_KP1,
-       [ 0x06 ] = KEY_KP2,
-       [ 0x07 ] = KEY_KP3,
-       [ 0x08 ] = KEY_CHANNELUP,
-       [ 0x09 ] = KEY_KP4,
-       [ 0x0a ] = KEY_KP5,
-       [ 0x0b ] = KEY_KP6,
-       [ 0x0c ] = KEY_CHANNELDOWN,
-       [ 0x0d ] = KEY_KP7,
-       [ 0x0e ] = KEY_KP8,
-       [ 0x0f ] = KEY_KP9,
-       [ 0x10 ] = KEY_VOLUMEUP,
-       [ 0x11 ] = KEY_KP0,
-       [ 0x12 ] = KEY_MENU,
-       [ 0x13 ] = KEY_PRINT,
-       [ 0x14 ] = KEY_VOLUMEDOWN,
-       [ 0x16 ] = KEY_PAUSE,
-       [ 0x18 ] = KEY_RECORD,
-       [ 0x19 ] = KEY_REWIND,
-       [ 0x1a ] = KEY_PLAY,
+       [ 0x01 ] = KEY_CHANNEL,
+       [ 0x02 ] = KEY_SELECT,
+       [ 0x03 ] = KEY_MUTE,
+       [ 0x04 ] = KEY_POWER,
+       [ 0x05 ] = KEY_KP1,
+       [ 0x06 ] = KEY_KP2,
+       [ 0x07 ] = KEY_KP3,
+       [ 0x08 ] = KEY_CHANNELUP,
+       [ 0x09 ] = KEY_KP4,
+       [ 0x0a ] = KEY_KP5,
+       [ 0x0b ] = KEY_KP6,
+       [ 0x0c ] = KEY_CHANNELDOWN,
+       [ 0x0d ] = KEY_KP7,
+       [ 0x0e ] = KEY_KP8,
+       [ 0x0f ] = KEY_KP9,
+       [ 0x10 ] = KEY_VOLUMEUP,
+       [ 0x11 ] = KEY_KP0,
+       [ 0x12 ] = KEY_MENU,
+       [ 0x13 ] = KEY_PRINT,
+       [ 0x14 ] = KEY_VOLUMEDOWN,
+       [ 0x16 ] = KEY_PAUSE,
+       [ 0x18 ] = KEY_RECORD,
+       [ 0x19 ] = KEY_REWIND,
+       [ 0x1a ] = KEY_PLAY,
        [ 0x1b ] = KEY_FORWARD,
        [ 0x1c ] = KEY_BACKSPACE,
-       [ 0x1e ] = KEY_STOP,
-       [ 0x40 ] = KEY_ZOOM,
+       [ 0x1e ] = KEY_STOP,
+       [ 0x40 ] = KEY_ZOOM,
 };
 
 /* ----------------------------------------------------------------------- */
index 048ad1d..e5066d0 100644 (file)
@@ -2,8 +2,8 @@
    em2820-video.c - driver for Empia EM2800/EM2820/2840 USB video capture devices
 
    Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com>
-                      Ludovico Cavedon <cavedon@sssup.it>
-                      Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+                     Ludovico Cavedon <cavedon@sssup.it>
+                     Mauro Carvalho Chehab <mchehab@brturbo.com.br>
 
    Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de>
 
@@ -42,9 +42,9 @@
 #define EM2820_VERSION_CODE  KERNEL_VERSION(0, 0, 1)
 
 #define em2820_videodbg(fmt, arg...) do {\
-        if (video_debug) \
-                printk(KERN_INFO "%s %s :"fmt, \
-                         dev->name, __FUNCTION__ , ##arg); } while (0)
+       if (video_debug) \
+               printk(KERN_INFO "%s %s :"fmt, \
+                        dev->name, __FUNCTION__ , ##arg); } while (0)
 
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
index a11df04..c483540 100644 (file)
@@ -2,8 +2,8 @@
    em2820-cards.c - driver for Empia EM2800/EM2820/2840 USB video capture devices
 
    Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com>
-                      Ludovico Cavedon <cavedon@sssup.it>
-                      Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+                     Ludovico Cavedon <cavedon@sssup.it>
+                     Mauro Carvalho Chehab <mchehab@brturbo.com.br>
 
    Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de>
 
@@ -390,17 +390,17 @@ extern const unsigned int em2820_bcount;
 /* printk macros */
 
 #define em2820_err(fmt, arg...) do {\
-        printk(KERN_ERR fmt , ##arg); } while (0)
+       printk(KERN_ERR fmt , ##arg); } while (0)
 
 #define em2820_errdev(fmt, arg...) do {\
-        printk(KERN_ERR "%s: "fmt,\
+       printk(KERN_ERR "%s: "fmt,\
                        dev->name , ##arg); } while (0)
 
 #define em2820_info(fmt, arg...) do {\
-        printk(KERN_INFO "%s: "fmt,\
+       printk(KERN_INFO "%s: "fmt,\
                        dev->name , ##arg); } while (0)
 #define em2820_warn(fmt, arg...) do {\
-        printk(KERN_WARNING "%s: "fmt,\
+       printk(KERN_WARNING "%s: "fmt,\
                        dev->name , ##arg); } while (0)
 
 inline static int em2820_audio_source(struct em2820 *dev, int input)
index cc59739..ed81934 100644 (file)
@@ -369,14 +369,14 @@ static int ir_probe(struct device *dev)
                ir->mask_keycode = 0x003e00;
                ir->mask_keyup   = 0x010000;
                ir->polling      = 50; // ms
-                break;
+               break;
        case BTTV_BOARD_PV_BT878P_9B:
        case BTTV_BOARD_PV_BT878P_PLUS:
                ir_codes         = ir_codes_pixelview;
                ir->mask_keycode = 0x001f00;
                ir->mask_keyup   = 0x008000;
                ir->polling      = 50; // ms
-                break;
+               break;
 
        case BTTV_BOARD_WINFAST2000:
                ir_codes         = ir_codes_winfast;
index b0facaa..12f1053 100644 (file)
@@ -163,7 +163,7 @@ static int get_key_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
 
 static int get_key_pixelview(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
 {
-        unsigned char b;
+       unsigned char b;
 
        /* poll IR chip */
        if (1 != i2c_master_recv(&ir->c,&b,1)) {
@@ -177,7 +177,7 @@ static int get_key_pixelview(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
 
 static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
 {
-        unsigned char b;
+       unsigned char b;
 
        /* poll IR chip */
        if (1 != i2c_master_recv(&ir->c,&b,1)) {
@@ -225,7 +225,7 @@ static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
 
 static int get_key_purpletv(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
 {
-        unsigned char b;
+       unsigned char b;
 
        /* poll IR chip */
        if (1 != i2c_master_recv(&ir->c,&b,1)) {
@@ -287,17 +287,17 @@ static int ir_detach(struct i2c_client *client);
 static int ir_probe(struct i2c_adapter *adap);
 
 static struct i2c_driver driver = {
-        .name           = "ir remote kbd driver",
-        .id             = I2C_DRIVERID_EXP3, /* FIXME */
-        .flags          = I2C_DF_NOTIFY,
-        .attach_adapter = ir_probe,
-        .detach_client  = ir_detach,
+       .name           = "ir remote kbd driver",
+       .id             = I2C_DRIVERID_EXP3, /* FIXME */
+       .flags          = I2C_DF_NOTIFY,
+       .attach_adapter = ir_probe,
+       .detach_client  = ir_detach,
 };
 
 static struct i2c_client client_template =
 {
-        .name = "unset",
-        .driver = &driver
+       .name = "unset",
+       .driver = &driver
 };
 
 static int ir_attach(struct i2c_adapter *adap, int addr,
@@ -398,7 +398,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
 
 static int ir_detach(struct i2c_client *client)
 {
-        struct IR_i2c *ir = i2c_get_clientdata(client);
+       struct IR_i2c *ir = i2c_get_clientdata(client);
 
        /* kill outstanding polls */
        del_timer(&ir->timer);
index 5573f68..699cea2 100644 (file)
@@ -192,7 +192,7 @@ static int msp3400c_reset(struct i2c_client *client)
             (2 != i2c_transfer(client->adapter,test,2)) ) {
                printk(KERN_ERR "msp3400: chip reset failed\n");
                return -1;
-        }
+       }
        return 0;
 }
 
@@ -200,16 +200,16 @@ static int msp3400c_read(struct i2c_client *client, int dev, int addr)
 {
        int err,retval;
 
-        unsigned char write[3];
-        unsigned char read[2];
-        struct i2c_msg msgs[2] = {
-                { client->addr, 0,        3, write },
-                { client->addr, I2C_M_RD, 2, read  }
-        };
+       unsigned char write[3];
+       unsigned char read[2];
+       struct i2c_msg msgs[2] = {
+               { client->addr, 0,        3, write },
+               { client->addr, I2C_M_RD, 2, read  }
+       };
 
-        write[0] = dev+1;
-        write[1] = addr >> 8;
-        write[2] = addr & 0xff;
+       write[0] = dev+1;
+       write[1] = addr >> 8;
+       write[2] = addr & 0xff;
 
        for (err = 0; err < 3;) {
                if (2 == i2c_transfer(client->adapter,msgs,2))
@@ -236,13 +236,13 @@ static int msp3400c_read(struct i2c_client *client, int dev, int addr)
 static int msp3400c_write(struct i2c_client *client, int dev, int addr, int val)
 {
        int err;
-        unsigned char buffer[5];
+       unsigned char buffer[5];
 
-        buffer[0] = dev;
-        buffer[1] = addr >> 8;
-        buffer[2] = addr &  0xff;
-        buffer[3] = val  >> 8;
-        buffer[4] = val  &  0xff;
+       buffer[0] = dev;
+       buffer[1] = addr >> 8;
+       buffer[2] = addr &  0xff;
+       buffer[3] = val  >> 8;
+       buffer[4] = val  &  0xff;
 
        dprintk_trace("trace: msp3400c_write(0x%x, 0x%x, 0x%x)\n", dev, addr,
                      val);
@@ -812,7 +812,7 @@ static void watch_stereo(struct i2c_client *client)
                else if (msp->stereo & VIDEO_SOUND_LANG1)
                        msp3400c_setstereo(client, V4L2_TUNER_MODE_LANG1);
                else
-                       msp3400c_setstereo(client, V4L2_TUNER_MODE_MONO);
+                       msp3400c_setstereo(client, V4L2_TUNER_MODE_MONO);
        }
 
        if (once)
@@ -1512,21 +1512,21 @@ static struct i2c_client client_template =
 static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
 {
        struct msp3400c *msp;
-        struct i2c_client *c;
+       struct i2c_client *c;
        int (*thread_func)(void *data) = NULL;
        int i;
 
-        client_template.adapter = adap;
-        client_template.addr = addr;
+       client_template.adapter = adap;
+       client_template.addr = addr;
 
-        if (-1 == msp3400c_reset(&client_template)) {
-                dprintk("msp34xx: no chip found\n");
-                return -1;
-        }
+       if (-1 == msp3400c_reset(&client_template)) {
+               dprintk("msp34xx: no chip found\n");
+               return -1;
+       }
 
-        if (NULL == (c = kmalloc(sizeof(struct i2c_client),GFP_KERNEL)))
-                return -ENOMEM;
-        memcpy(c,&client_template,sizeof(struct i2c_client));
+       if (NULL == (c = kmalloc(sizeof(struct i2c_client),GFP_KERNEL)))
+               return -ENOMEM;
+       memcpy(c,&client_template,sizeof(struct i2c_client));
        if (NULL == (msp = kmalloc(sizeof(struct msp3400c),GFP_KERNEL))) {
                kfree(c);
                return -ENOMEM;
@@ -1618,7 +1618,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
        }
 
        /* done */
-        i2c_attach_client(c);
+       i2c_attach_client(c);
 
        /* update our own array */
        for (i = 0; i < MSP3400_MAX; i++) {
@@ -1739,7 +1739,7 @@ static void msp_any_set_audmode(struct i2c_client *client, int audmode)
 static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
 {
        struct msp3400c *msp  = i2c_get_clientdata(client);
-        __u16           *sarg = arg;
+       __u16           *sarg = arg;
        int scart = 0;
 
        switch (cmd) {
@@ -1969,7 +1969,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
                }
 
                msp_any_detect_stereo(client);
-               if (msp->audmode == V4L2_TUNER_MODE_STEREO) {
+               if (msp->audmode == V4L2_TUNER_MODE_STEREO) {
                        a->capability=V4L2_AUDCAP_STEREO;
                }
 
@@ -2005,7 +2005,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
                        msp3400c_set_scart(client,scart,0);
                        msp3400c_write(client,I2C_MSP3400C_DFP,0x000d,0x1900);
                }
-               if (sarg->capability==V4L2_AUDCAP_STEREO) {
+               if (sarg->capability==V4L2_AUDCAP_STEREO) {
                        msp->audmode = V4L2_TUNER_MODE_STEREO;
                } else {
                        msp->audmode &= ~V4L2_TUNER_MODE_STEREO;
index 972aa5e..13b61c4 100644 (file)
@@ -76,17 +76,17 @@ static int mt2032_compute_freq(struct i2c_client *c,
                               unsigned int xogc) //all in Hz
 {
        struct tuner *t = i2c_get_clientdata(c);
-        unsigned int fref,lo1,lo1n,lo1a,s,sel,lo1freq, desired_lo1,
+       unsigned int fref,lo1,lo1n,lo1a,s,sel,lo1freq, desired_lo1,
                desired_lo2,lo2,lo2n,lo2a,lo2num,lo2freq;
 
-        fref= 5250 *1000; //5.25MHz
+       fref= 5250 *1000; //5.25MHz
        desired_lo1=rfin+if1;
 
        lo1=(2*(desired_lo1/1000)+(fref/1000)) / (2*fref/1000);
-        lo1n=lo1/8;
-        lo1a=lo1-(lo1n*8);
+       lo1n=lo1/8;
+       lo1a=lo1-(lo1n*8);
 
-        s=rfin/1000/1000+1090;
+       s=rfin/1000/1000+1090;
 
        if(optimize_vco) {
                if(s>1890) sel=0;
@@ -96,34 +96,34 @@ static int mt2032_compute_freq(struct i2c_client *c,
                else sel=4; // >1090
        }
        else {
-               if(s>1790) sel=0; // <1958
-               else if(s>1617) sel=1;
-               else if(s>1449) sel=2;
-               else if(s>1291) sel=3;
-               else sel=4; // >1090
+               if(s>1790) sel=0; // <1958
+               else if(s>1617) sel=1;
+               else if(s>1449) sel=2;
+               else if(s>1291) sel=3;
+               else sel=4; // >1090
        }
        *ret_sel=sel;
 
-        lo1freq=(lo1a+8*lo1n)*fref;
+       lo1freq=(lo1a+8*lo1n)*fref;
 
        tuner_dbg("mt2032: rfin=%d lo1=%d lo1n=%d lo1a=%d sel=%d, lo1freq=%d\n",
                  rfin,lo1,lo1n,lo1a,sel,lo1freq);
 
-        desired_lo2=lo1freq-rfin-if2;
-        lo2=(desired_lo2)/fref;
-        lo2n=lo2/8;
-        lo2a=lo2-(lo2n*8);
-        lo2num=((desired_lo2/1000)%(fref/1000))* 3780/(fref/1000); //scale to fit in 32bit arith
-        lo2freq=(lo2a+8*lo2n)*fref + lo2num*(fref/1000)/3780*1000;
+       desired_lo2=lo1freq-rfin-if2;
+       lo2=(desired_lo2)/fref;
+       lo2n=lo2/8;
+       lo2a=lo2-(lo2n*8);
+       lo2num=((desired_lo2/1000)%(fref/1000))* 3780/(fref/1000); //scale to fit in 32bit arith
+       lo2freq=(lo2a+8*lo2n)*fref + lo2num*(fref/1000)/3780*1000;
 
        tuner_dbg("mt2032: rfin=%d lo2=%d lo2n=%d lo2a=%d num=%d lo2freq=%d\n",
                  rfin,lo2,lo2n,lo2a,lo2num,lo2freq);
 
-        if(lo1a<0 || lo1a>7 || lo1n<17 ||lo1n>48 || lo2a<0 ||lo2a >7 ||lo2n<17 || lo2n>30) {
+       if(lo1a<0 || lo1a>7 || lo1n<17 ||lo1n>48 || lo2a<0 ||lo2a >7 ||lo2n<17 || lo2n>30) {
                tuner_info("mt2032: frequency parameters out of range: %d %d %d %d\n",
                           lo1a, lo1n, lo2a,lo2n);
-                return(-1);
-        }
+               return(-1);
+       }
 
        mt2032_spurcheck(c, lo1freq, desired_lo2,  spectrum_from, spectrum_to);
        // should recalculate lo1 (one step up/down)
@@ -135,10 +135,10 @@ static int mt2032_compute_freq(struct i2c_client *c,
        buf[3]=0x0f; //reserved
        buf[4]=0x1f;
        buf[5]=(lo2n-1) | (lo2a<<5);
-       if(rfin >400*1000*1000)
-                buf[6]=0xe4;
-        else
-                buf[6]=0xf4; // set PKEN per rev 1.2
+       if(rfin >400*1000*1000)
+               buf[6]=0xe4;
+       else
+               buf[6]=0xf4; // set PKEN per rev 1.2
        buf[7]=8+xogc;
        buf[8]=0xc3; //reserved
        buf[9]=0x4e; //reserved
@@ -168,7 +168,7 @@ static int mt2032_check_lo_lock(struct i2c_client *c)
                tuner_dbg("mt2032: pll wait 1ms for lock (0x%2x)\n",buf[0]);
                udelay(1000);
        }
-        return lock;
+       return lock;
 }
 
 static int mt2032_optimize_vco(struct i2c_client *c,int sel,int lock)
@@ -202,7 +202,7 @@ static int mt2032_optimize_vco(struct i2c_client *c,int sel,int lock)
 
        buf[0]=0x0f;
        buf[1]=sel;
-        i2c_master_send(c,buf,2);
+       i2c_master_send(c,buf,2);
        lock=mt2032_check_lo_lock(c);
        return lock;
 }
@@ -219,23 +219,23 @@ static void mt2032_set_if_freq(struct i2c_client *c, unsigned int rfin,
        tuner_dbg("mt2032_set_if_freq rfin=%d if1=%d if2=%d from=%d to=%d\n",
                  rfin,if1,if2,from,to);
 
-        buf[0]=0;
-        ret=i2c_master_send(c,buf,1);
-        i2c_master_recv(c,buf,21);
+       buf[0]=0;
+       ret=i2c_master_send(c,buf,1);
+       i2c_master_recv(c,buf,21);
 
        buf[0]=0;
        ret=mt2032_compute_freq(c,rfin,if1,if2,from,to,&buf[1],&sel,t->xogc);
        if (ret<0)
                return;
 
-        // send only the relevant registers per Rev. 1.2
-        buf[0]=0;
-        ret=i2c_master_send(c,buf,4);
-        buf[5]=5;
-        ret=i2c_master_send(c,buf+5,4);
-        buf[11]=11;
-        ret=i2c_master_send(c,buf+11,3);
-        if(ret!=3)
+       // send only the relevant registers per Rev. 1.2
+       buf[0]=0;
+       ret=i2c_master_send(c,buf,4);
+       buf[5]=5;
+       ret=i2c_master_send(c,buf+5,4);
+       buf[11]=11;
+       ret=i2c_master_send(c,buf+11,3);
+       if(ret!=3)
                tuner_warn("i2c i/o error: rc == %d (should be 3)\n",ret);
 
        // wait for PLLs to lock (per manual), retry LINT if not.
@@ -253,7 +253,7 @@ static void mt2032_set_if_freq(struct i2c_client *c, unsigned int rfin,
                mdelay(10);
                buf[1]=8+t->xogc;
                i2c_master_send(c,buf,2);
-        }
+       }
 
        if (lock!=6)
                tuner_warn("MT2032 Fatal Error: PLLs didn't lock.\n");
@@ -284,7 +284,7 @@ static void mt2032_set_tv_freq(struct i2c_client *c, unsigned int freq)
                if2  = 38900*1000;
        }
 
-        mt2032_set_if_freq(c, freq*62500 /* freq*1000*1000/16 */,
+       mt2032_set_if_freq(c, freq*62500 /* freq*1000*1000/16 */,
                           1090*1000*1000, if2, from, to);
 }
 
@@ -294,7 +294,7 @@ static void mt2032_set_radio_freq(struct i2c_client *c, unsigned int freq)
        int if2 = t->radio_if2;
 
        // per Manual for FM tuning: first if center freq. 1085 MHz
-        mt2032_set_if_freq(c, freq * 1000 / 16,
+       mt2032_set_if_freq(c, freq * 1000 / 16,
                              1085*1000*1000,if2,if2,if2);
 }
 
@@ -302,57 +302,57 @@ static void mt2032_set_radio_freq(struct i2c_client *c, unsigned int freq)
 static int mt2032_init(struct i2c_client *c)
 {
        struct tuner *t = i2c_get_clientdata(c);
-        unsigned char buf[21];
-        int ret,xogc,xok=0;
+       unsigned char buf[21];
+       int ret,xogc,xok=0;
 
        // Initialize Registers per spec.
-        buf[1]=2; // Index to register 2
-        buf[2]=0xff;
-        buf[3]=0x0f;
-        buf[4]=0x1f;
-        ret=i2c_master_send(c,buf+1,4);
-
-        buf[5]=6; // Index register 6
-        buf[6]=0xe4;
-        buf[7]=0x8f;
-        buf[8]=0xc3;
-        buf[9]=0x4e;
-        buf[10]=0xec;
-        ret=i2c_master_send(c,buf+5,6);
-
-        buf[12]=13;  // Index register 13
-        buf[13]=0x32;
-        ret=i2c_master_send(c,buf+12,2);
-
-        // Adjust XOGC (register 7), wait for XOK
-        xogc=7;
-        do {
+       buf[1]=2; // Index to register 2
+       buf[2]=0xff;
+       buf[3]=0x0f;
+       buf[4]=0x1f;
+       ret=i2c_master_send(c,buf+1,4);
+
+       buf[5]=6; // Index register 6
+       buf[6]=0xe4;
+       buf[7]=0x8f;
+       buf[8]=0xc3;
+       buf[9]=0x4e;
+       buf[10]=0xec;
+       ret=i2c_master_send(c,buf+5,6);
+
+       buf[12]=13;  // Index register 13
+       buf[13]=0x32;
+       ret=i2c_master_send(c,buf+12,2);
+
+       // Adjust XOGC (register 7), wait for XOK
+       xogc=7;
+       do {
+               tuner_dbg("mt2032: xogc = 0x%02x\n",xogc&0x07);
+               mdelay(10);
+               buf[0]=0x0e;
+               i2c_master_send(c,buf,1);
+               i2c_master_recv(c,buf,1);
+               xok=buf[0]&0x01;
+               tuner_dbg("mt2032: xok = 0x%02x\n",xok);
+               if (xok == 1) break;
+
+               xogc--;
                tuner_dbg("mt2032: xogc = 0x%02x\n",xogc&0x07);
-                mdelay(10);
-                buf[0]=0x0e;
-                i2c_master_send(c,buf,1);
-                i2c_master_recv(c,buf,1);
-                xok=buf[0]&0x01;
-                tuner_dbg("mt2032: xok = 0x%02x\n",xok);
-                if (xok == 1) break;
-
-                xogc--;
-                tuner_dbg("mt2032: xogc = 0x%02x\n",xogc&0x07);
-                if (xogc == 3) {
-                        xogc=4; // min. 4 per spec
-                        break;
-                }
-                buf[0]=0x07;
-                buf[1]=0x88 + xogc;
-                ret=i2c_master_send(c,buf,2);
-                if (ret!=2)
+               if (xogc == 3) {
+                       xogc=4; // min. 4 per spec
+                       break;
+               }
+               buf[0]=0x07;
+               buf[1]=0x88 + xogc;
+               ret=i2c_master_send(c,buf,2);
+               if (ret!=2)
                        tuner_warn("i2c i/o error: rc == %d (should be 2)\n",ret);
-        } while (xok != 1 );
+       } while (xok != 1 );
        t->xogc=xogc;
 
        t->tv_freq    = mt2032_set_tv_freq;
        t->radio_freq = mt2032_set_radio_freq;
-        return(1);
+       return(1);
 }
 
 static void mt2050_set_antenna(struct i2c_client *c, unsigned char antenna)
@@ -426,7 +426,7 @@ static void mt2050_set_if_freq(struct i2c_client *c,unsigned int freq, unsigned
        }
 
        ret=i2c_master_send(c,buf,6);
-        if (ret!=6)
+       if (ret!=6)
                tuner_warn("i2c i/o error: rc == %d (should be 6)\n",ret);
 }
 
@@ -437,11 +437,11 @@ static void mt2050_set_tv_freq(struct i2c_client *c, unsigned int freq)
 
        if (t->std & V4L2_STD_525_60) {
                // NTSC
-                if2 = 45750*1000;
-        } else {
-                // PAL
-                if2 = 38900*1000;
-        }
+               if2 = 45750*1000;
+       } else {
+               // PAL
+               if2 = 38900*1000;
+       }
        if (V4L2_TUNER_DIGITAL_TV == t->mode) {
                // DVB (pinnacle 300i)
                if2 = 36150*1000;
@@ -487,7 +487,7 @@ int microtune_init(struct i2c_client *c)
 {
        struct tuner *t = i2c_get_clientdata(c);
        char *name;
-        unsigned char buf[21];
+       unsigned char buf[21];
        int company_code;
 
        memset(buf,0,sizeof(buf));
@@ -496,17 +496,17 @@ int microtune_init(struct i2c_client *c)
        t->standby    = NULL;
        name = "unknown";
 
-        i2c_master_send(c,buf,1);
-        i2c_master_recv(c,buf,21);
-        if (tuner_debug) {
-                int i;
+       i2c_master_send(c,buf,1);
+       i2c_master_recv(c,buf,21);
+       if (tuner_debug) {
+               int i;
                tuner_dbg("MT20xx hexdump:");
-                for(i=0;i<21;i++) {
-                        printk(" %02x",buf[i]);
-                        if(((i+1)%8)==0) printk(" ");
-                }
-                printk("\n");
-        }
+               for(i=0;i<21;i++) {
+                       printk(" %02x",buf[i]);
+                       if(((i+1)%8)==0) printk(" ");
+               }
+               printk("\n");
+       }
        company_code = buf[0x11] << 8 | buf[0x12];
        tuner_info("microtune: companycode=%04x part=%02x rev=%02x\n",
                   company_code,buf[0x13],buf[0x14]);
@@ -525,8 +525,8 @@ int microtune_init(struct i2c_client *c)
        default:
                tuner_info("microtune %s found, not (yet?) supported, sorry :-/\n",
                           name);
-                return 0;
-        }
+               return 0;
+       }
 
        strlcpy(c->name, name, sizeof(c->name));
        tuner_info("microtune %s found, OK\n",name);
index 37653ee..ed16282 100644 (file)
@@ -464,8 +464,8 @@ saa7113_command (struct i2c_client *client,
 
 /* standard i2c insmod options */
 static unsigned short normal_i2c[] = {
-        I2C_SAA7113>>1,         /* saa7113 */
-        I2C_CLIENT_END
+       I2C_SAA7113>>1,         /* saa7113 */
+       I2C_CLIENT_END
 };
 
 I2C_CLIENT_INSMOD;
index dac720e..2bf5cf7 100644 (file)
@@ -169,31 +169,31 @@ static int saa6752hs_chip_command(struct i2c_client* client,
 
        /* execute the command */
        switch(command) {
-       case SAA6752HS_COMMAND_RESET:
-               buf[0] = 0x00;
+       case SAA6752HS_COMMAND_RESET:
+               buf[0] = 0x00;
                break;
 
        case SAA6752HS_COMMAND_STOP:
-               buf[0] = 0x03;
+               buf[0] = 0x03;
                break;
 
        case SAA6752HS_COMMAND_START:
-               buf[0] = 0x02;
+               buf[0] = 0x02;
                break;
 
        case SAA6752HS_COMMAND_PAUSE:
-               buf[0] = 0x04;
+               buf[0] = 0x04;
                break;
 
        case SAA6752HS_COMMAND_RECONFIGURE:
                buf[0] = 0x05;
                break;
 
-       case SAA6752HS_COMMAND_SLEEP:
-               buf[0] = 0x06;
+       case SAA6752HS_COMMAND_SLEEP:
+               buf[0] = 0x06;
                break;
 
-       case SAA6752HS_COMMAND_RECONFIGURE_FORCE:
+       case SAA6752HS_COMMAND_RECONFIGURE_FORCE:
                buf[0] = 0x07;
                break;
 
@@ -201,13 +201,13 @@ static int saa6752hs_chip_command(struct i2c_client* client,
                return -EINVAL;
        }
 
-       /* set it and wait for it to be so */
+       /* set it and wait for it to be so */
        i2c_master_send(client, buf, 1);
        timeout = jiffies + HZ * 3;
        for (;;) {
                /* get the current status */
                buf[0] = 0x10;
-               i2c_master_send(client, buf, 1);
+               i2c_master_send(client, buf, 1);
                i2c_master_recv(client, buf, 1);
 
                if (!(buf[0] & 0x20))
@@ -223,14 +223,14 @@ static int saa6752hs_chip_command(struct i2c_client* client,
        /* delay a bit to let encoder settle */
        msleep(50);
 
-       return status;
+       return status;
 }
 
 
 static int saa6752hs_set_bitrate(struct i2c_client* client,
                                 struct v4l2_mpeg_compression* params)
 {
-       u8 buf[3];
+       u8 buf[3];
 
        /* set the bitrate mode */
        buf[0] = 0x71;
@@ -242,31 +242,31 @@ static int saa6752hs_set_bitrate(struct i2c_client* client,
                /* set the target bitrate */
                buf[0] = 0x80;
                buf[1] = params->vi_bitrate.target >> 8;
-               buf[2] = params->vi_bitrate.target & 0xff;
+               buf[2] = params->vi_bitrate.target & 0xff;
                i2c_master_send(client, buf, 3);
 
                /* set the max bitrate */
                buf[0] = 0x81;
                buf[1] = params->vi_bitrate.max >> 8;
-               buf[2] = params->vi_bitrate.max & 0xff;
+               buf[2] = params->vi_bitrate.max & 0xff;
                i2c_master_send(client, buf, 3);
        } else {
                /* set the target bitrate (no max bitrate for CBR) */
-               buf[0] = 0x81;
+               buf[0] = 0x81;
                buf[1] = params->vi_bitrate.target >> 8;
-               buf[2] = params->vi_bitrate.target & 0xff;
+               buf[2] = params->vi_bitrate.target & 0xff;
                i2c_master_send(client, buf, 3);
        }
 
        /* set the audio bitrate */
-       buf[0] = 0x94;
+       buf[0] = 0x94;
        buf[1] = (256 == params->au_bitrate.target) ? 0 : 1;
        i2c_master_send(client, buf, 2);
 
        /* set the total bitrate */
        buf[0] = 0xb1;
-       buf[1] = params->st_bitrate.target >> 8;
-       buf[2] = params->st_bitrate.target & 0xff;
+       buf[1] = params->st_bitrate.target >> 8;
+       buf[2] = params->st_bitrate.target & 0xff;
        i2c_master_send(client, buf, 3);
 
        return 0;
@@ -386,8 +386,8 @@ static int saa6752hs_init(struct i2c_client* client)
                buf[1] = 0x01;
        i2c_master_send(client, buf, 2);
 
-        /* set bitrate */
-        saa6752hs_set_bitrate(client, &h->params);
+       /* set bitrate */
+       saa6752hs_set_bitrate(client, &h->params);
 
        /* Set GOP structure {3, 13} */
        buf[0] = 0x72;
@@ -426,9 +426,9 @@ static int saa6752hs_init(struct i2c_client* client)
        localPAT[sizeof(PAT) - 1] = crc & 0xFF;
 
        /* compute PMT */
-       memcpy(localPMT, PMT, sizeof(PMT));
-       localPMT[3] = 0x40 | ((h->params.ts_pid_pmt >> 8) & 0x0f);
-       localPMT[4] = h->params.ts_pid_pmt & 0xff;
+       memcpy(localPMT, PMT, sizeof(PMT));
+       localPMT[3] = 0x40 | ((h->params.ts_pid_pmt >> 8) & 0x0f);
+       localPMT[4] = h->params.ts_pid_pmt & 0xff;
        localPMT[15] = 0xE0 | ((h->params.ts_pid_pcr >> 8) & 0x0F);
        localPMT[16] = h->params.ts_pid_pcr & 0xFF;
        localPMT[20] = 0xE0 | ((h->params.ts_pid_video >> 8) & 0x0F);
@@ -453,7 +453,7 @@ static int saa6752hs_init(struct i2c_client* client)
        buf[2] = h->params.ts_pid_video & 0xFF;
        i2c_master_send(client,buf,3);
 
-       /* Set PCR PID */
+       /* Set PCR PID */
        buf[0] = 0xC4;
        buf[1] = (h->params.ts_pid_pcr >> 8) & 0xFF;
        buf[2] = h->params.ts_pid_pcr & 0xFF;
@@ -467,7 +467,7 @@ static int saa6752hs_init(struct i2c_client* client)
        buf[0] = 0xa4;
        buf[1] = 1;
        i2c_master_send(client, buf, 2);
-       buf[1] = 0;
+       buf[1] = 0;
        i2c_master_send(client, buf, 2);
 
        /* start it going */
@@ -510,10 +510,10 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind)
 {
        struct saa6752hs_state *h;
 
-        printk("saa6752hs: chip found @ 0x%x\n", addr<<1);
+       printk("saa6752hs: chip found @ 0x%x\n", addr<<1);
 
-        if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL)))
-                return -ENOMEM;
+       if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL)))
+               return -ENOMEM;
        memset(h,0,sizeof(*h));
        h->client = client_template;
        h->params = param_defaults;
@@ -552,7 +552,7 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
        struct v4l2_mpeg_compression *params = arg;
        int err = 0;
 
-        switch (cmd) {
+       switch (cmd) {
        case VIDIOC_S_MPEGCOMP:
                if (NULL == params) {
                        /* apply settings and start encoder */
@@ -566,7 +566,7 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
                break;
        case VIDIOC_G_FMT:
        {
-           struct v4l2_format *f = arg;
+          struct v4l2_format *f = arg;
 
           if (h->video_format == SAA6752HS_VF_UNKNOWN)
                   h->video_format = SAA6752HS_VF_D1;
index 465beac..e9ffe8f 100644 (file)
@@ -80,11 +80,11 @@ typedef struct snd_card_saa7134 {
        spinlock_t mixer_lock;
        int mixer_volume[MIXER_ADDR_LAST+1][2];
        int capture_source[MIXER_ADDR_LAST+1][2];
-        struct pci_dev *pci;
-        struct saa7134_dev *saadev;
+       struct pci_dev *pci;
+       struct saa7134_dev *saadev;
 
-        unsigned long iobase;
-        int irq;
+       unsigned long iobase;
+       int irq;
 
        spinlock_t lock;
 } snd_card_saa7134_t;
@@ -94,7 +94,7 @@ typedef struct snd_card_saa7134 {
  */
 
 typedef struct snd_card_saa7134_pcm {
-        struct saa7134_dev *saadev;
+       struct saa7134_dev *saadev;
 
        spinlock_t lock;
        unsigned int pcm_size;          /* buffer size */
@@ -118,9 +118,9 @@ static snd_card_t *snd_saa7134_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
 static void saa7134_dma_stop(struct saa7134_dev *dev)
 
 {
-        dev->oss.dma_blk     = -1;
-        dev->oss.dma_running = 0;
-        saa7134_set_dmabits(dev);
+       dev->oss.dma_blk     = -1;
+       dev->oss.dma_running = 0;
+       saa7134_set_dmabits(dev);
 }
 
 /*
@@ -135,9 +135,9 @@ static void saa7134_dma_stop(struct saa7134_dev *dev)
 
 static void saa7134_dma_start(struct saa7134_dev *dev)
 {
-        dev->oss.dma_blk     = 0;
-        dev->oss.dma_running = 1;
-        saa7134_set_dmabits(dev);
+       dev->oss.dma_blk     = 0;
+       dev->oss.dma_running = 1;
+       saa7134_set_dmabits(dev);
 }
 
 /*
@@ -184,28 +184,28 @@ void saa7134_irq_alsa_done(struct saa7134_dev *dev, unsigned long status)
                goto done;
        }
 
-        /* next block addr */
-        next_blk = (dev->oss.dma_blk + 2) % dev->oss.blocks;
-        saa_writel(reg,next_blk * dev->oss.blksize);
-        if (alsa_debug > 2)
-                dprintk("irq: ok, %s, next_blk=%d, addr=%x, blocks=%u, size=%u, read=%u\n",
-                        (status & 0x10000000) ? "even" : "odd ", next_blk,
-                        next_blk * dev->oss.blksize, dev->oss.blocks, dev->oss.blksize, dev->oss.read_count);
+       /* next block addr */
+       next_blk = (dev->oss.dma_blk + 2) % dev->oss.blocks;
+       saa_writel(reg,next_blk * dev->oss.blksize);
+       if (alsa_debug > 2)
+               dprintk("irq: ok, %s, next_blk=%d, addr=%x, blocks=%u, size=%u, read=%u\n",
+                       (status & 0x10000000) ? "even" : "odd ", next_blk,
+                       next_blk * dev->oss.blksize, dev->oss.blocks, dev->oss.blksize, dev->oss.read_count);
 
 
-        /* update status & wake waiting readers */
-        dev->oss.dma_blk = (dev->oss.dma_blk + 1) % dev->oss.blocks;
-        dev->oss.read_count += dev->oss.blksize;
+       /* update status & wake waiting readers */
+       dev->oss.dma_blk = (dev->oss.dma_blk + 1) % dev->oss.blocks;
+       dev->oss.read_count += dev->oss.blksize;
 
-        dev->oss.recording_on = reg;
+       dev->oss.recording_on = reg;
 
        if (dev->oss.read_count >= snd_pcm_lib_period_bytes(dev->oss.substream)) {
-                spin_unlock(&dev->slock);
-                snd_pcm_period_elapsed(dev->oss.substream);
-                spin_lock(&dev->slock);
+               spin_unlock(&dev->slock);
+               snd_pcm_period_elapsed(dev->oss.substream);
+               spin_lock(&dev->slock);
        }
  done:
-        spin_unlock(&dev->slock);
+       spin_unlock(&dev->slock);
 
 }
 
@@ -239,23 +239,23 @@ static int snd_card_saa7134_capture_trigger(snd_pcm_substream_t * substream,
 
 static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks)
 {
-        if (blksize < 0x100)
-                blksize = 0x100;
-        if (blksize > 0x10000)
-                blksize = 0x10000;
-
-        if (blocks < 2)
-                blocks = 2;
-        if ((blksize * blocks) > 1024*1024)
-                blocks = 1024*1024 / blksize;
-
-        dev->oss.blocks  = blocks;
-        dev->oss.blksize = blksize;
-        dev->oss.bufsize = blksize * blocks;
-
-        dprintk("buffer config: %d blocks / %d bytes, %d kB total\n",
-                blocks,blksize,blksize * blocks / 1024);
-        return 0;
+       if (blksize < 0x100)
+               blksize = 0x100;
+       if (blksize > 0x10000)
+               blksize = 0x10000;
+
+       if (blocks < 2)
+               blocks = 2;
+       if ((blksize * blocks) > 1024*1024)
+               blocks = 1024*1024 / blksize;
+
+       dev->oss.blocks  = blocks;
+       dev->oss.blksize = blksize;
+       dev->oss.bufsize = blksize * blocks;
+
+       dprintk("buffer config: %d blocks / %d bytes, %d kB total\n",
+               blocks,blksize,blksize * blocks / 1024);
+       return 0;
 }
 
 /*
@@ -271,16 +271,16 @@ static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks)
 
 static int dsp_buffer_init(struct saa7134_dev *dev)
 {
-        int err;
-
-        if (!dev->oss.bufsize)
-                BUG();
-        videobuf_dma_init(&dev->oss.dma);
-        err = videobuf_dma_init_kernel(&dev->oss.dma, PCI_DMA_FROMDEVICE,
-                                       (dev->oss.bufsize + PAGE_SIZE) >> PAGE_SHIFT);
-        if (0 != err)
-                return err;
-        return 0;
+       int err;
+
+       if (!dev->oss.bufsize)
+               BUG();
+       videobuf_dma_init(&dev->oss.dma);
+       err = videobuf_dma_init_kernel(&dev->oss.dma, PCI_DMA_FROMDEVICE,
+                                      (dev->oss.bufsize + PAGE_SIZE) >> PAGE_SHIFT);
+       if (0 != err)
+               return err;
+       return 0;
 }
 
 /*
@@ -298,18 +298,18 @@ static int dsp_buffer_init(struct saa7134_dev *dev)
 static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream)
 {
        snd_pcm_runtime_t *runtime = substream->runtime;
-        int err, bswap, sign;
-        u32 fmt, control;
-        unsigned long flags;
+       int err, bswap, sign;
+       u32 fmt, control;
+       unsigned long flags;
        snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
-        struct saa7134_dev *dev;
+       struct saa7134_dev *dev;
        snd_card_saa7134_pcm_t *saapcm = runtime->private_data;
        unsigned int bps;
-        unsigned long size;
-        unsigned count;
+       unsigned long size;
+       unsigned count;
 
-        size = snd_pcm_lib_buffer_bytes(substream);
-        count = snd_pcm_lib_period_bytes(substream);
+       size = snd_pcm_lib_buffer_bytes(substream);
+       count = snd_pcm_lib_period_bytes(substream);
 
        saapcm->saadev->oss.substream = substream;
        bps = runtime->rate * runtime->channels;
@@ -324,123 +324,123 @@ static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream)
 
        dev=saa7134->saadev;
 
-        dsp_buffer_conf(dev,saapcm->pcm_count,(saapcm->pcm_size/saapcm->pcm_count));
+       dsp_buffer_conf(dev,saapcm->pcm_count,(saapcm->pcm_size/saapcm->pcm_count));
 
-        err = dsp_buffer_init(dev);
-        if (0 != err)
-                goto fail2;
+       err = dsp_buffer_init(dev);
+       if (0 != err)
+               goto fail2;
 
-        /* prepare buffer */
-        if (0 != (err = videobuf_dma_pci_map(dev->pci,&dev->oss.dma)))
-                return err;
-        if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->oss.pt)))
-                goto fail1;
-        if (0 != (err = saa7134_pgtable_build(dev->pci,&dev->oss.pt,
-                                              dev->oss.dma.sglist,
-                                              dev->oss.dma.sglen,
-                                              0)))
-                goto fail2;
+       /* prepare buffer */
+       if (0 != (err = videobuf_dma_pci_map(dev->pci,&dev->oss.dma)))
+               return err;
+       if (0 != (err = saa7134_pgtable_alloc(dev->pci,&dev->oss.pt)))
+               goto fail1;
+       if (0 != (err = saa7134_pgtable_build(dev->pci,&dev->oss.pt,
+                                             dev->oss.dma.sglist,
+                                             dev->oss.dma.sglen,
+                                             0)))
+               goto fail2;
 
 
 
-        switch (runtime->format) {
-          case SNDRV_PCM_FORMAT_U8:
-          case SNDRV_PCM_FORMAT_S8:
+       switch (runtime->format) {
+         case SNDRV_PCM_FORMAT_U8:
+         case SNDRV_PCM_FORMAT_S8:
                fmt = 0x00;
                break;
-          case SNDRV_PCM_FORMAT_U16_LE:
-          case SNDRV_PCM_FORMAT_U16_BE:
-          case SNDRV_PCM_FORMAT_S16_LE:
-          case SNDRV_PCM_FORMAT_S16_BE:
+         case SNDRV_PCM_FORMAT_U16_LE:
+         case SNDRV_PCM_FORMAT_U16_BE:
+         case SNDRV_PCM_FORMAT_S16_LE:
+         case SNDRV_PCM_FORMAT_S16_BE:
                fmt = 0x01;
                break;
-          default:
-                err = -EINVAL;
-                return 1;
-        }
-
-        switch (runtime->format) {
-          case SNDRV_PCM_FORMAT_S8:
-          case SNDRV_PCM_FORMAT_S16_LE:
-          case SNDRV_PCM_FORMAT_S16_BE:
+         default:
+               err = -EINVAL;
+               return 1;
+       }
+
+       switch (runtime->format) {
+         case SNDRV_PCM_FORMAT_S8:
+         case SNDRV_PCM_FORMAT_S16_LE:
+         case SNDRV_PCM_FORMAT_S16_BE:
                sign = 1;
                break;
-          default:
+         default:
                sign = 0;
                break;
-        }
+       }
 
-        switch (runtime->format) {
-          case SNDRV_PCM_FORMAT_U16_BE:
-          case SNDRV_PCM_FORMAT_S16_BE:
+       switch (runtime->format) {
+         case SNDRV_PCM_FORMAT_U16_BE:
+         case SNDRV_PCM_FORMAT_S16_BE:
                bswap = 1; break;
-          default:
+         default:
                bswap = 0; break;
-        }
-
-        switch (dev->pci->device) {
-          case PCI_DEVICE_ID_PHILIPS_SAA7134:
-                if (1 == runtime->channels)
-                        fmt |= (1 << 3);
-                if (2 == runtime->channels)
-                        fmt |= (3 << 3);
-                if (sign)
-                        fmt |= 0x04;
-
-                fmt |= (MIXER_ADDR_TVTUNER == dev->oss.input) ? 0xc0 : 0x80;
-                saa_writeb(SAA7134_NUM_SAMPLES0, ((dev->oss.blksize - 1) & 0x0000ff));
-                saa_writeb(SAA7134_NUM_SAMPLES1, ((dev->oss.blksize - 1) & 0x00ff00) >>  8);
-                saa_writeb(SAA7134_NUM_SAMPLES2, ((dev->oss.blksize - 1) & 0xff0000) >> 16);
-                saa_writeb(SAA7134_AUDIO_FORMAT_CTRL, fmt);
-
-                break;
-          case PCI_DEVICE_ID_PHILIPS_SAA7133:
-          case PCI_DEVICE_ID_PHILIPS_SAA7135:
-                if (1 == runtime->channels)
-                        fmt |= (1 << 4);
-                if (2 == runtime->channels)
-                        fmt |= (2 << 4);
-                if (!sign)
-                        fmt |= 0x04;
-                saa_writel(SAA7133_NUM_SAMPLES, dev->oss.blksize -1);
-                saa_writel(SAA7133_AUDIO_CHANNEL, 0x543210 | (fmt << 24));
-                //saa_writel(SAA7133_AUDIO_CHANNEL, 0x543210);
-                break;
-        }
-
-        dprintk("rec_start: afmt=%d ch=%d  =>  fmt=0x%x swap=%c\n",
-                runtime->format, runtime->channels, fmt,
-                bswap ? 'b' : '-');
-        /* dma: setup channel 6 (= AUDIO) */
-        control = SAA7134_RS_CONTROL_BURST_16 |
-                SAA7134_RS_CONTROL_ME |
-                (dev->oss.pt.dma >> 12);
-        if (bswap)
-                control |= SAA7134_RS_CONTROL_BSWAP;
+       }
+
+       switch (dev->pci->device) {
+         case PCI_DEVICE_ID_PHILIPS_SAA7134:
+               if (1 == runtime->channels)
+                       fmt |= (1 << 3);
+               if (2 == runtime->channels)
+                       fmt |= (3 << 3);
+               if (sign)
+                       fmt |= 0x04;
+
+               fmt |= (MIXER_ADDR_TVTUNER == dev->oss.input) ? 0xc0 : 0x80;
+               saa_writeb(SAA7134_NUM_SAMPLES0, ((dev->oss.blksize - 1) & 0x0000ff));
+               saa_writeb(SAA7134_NUM_SAMPLES1, ((dev->oss.blksize - 1) & 0x00ff00) >>  8);
+               saa_writeb(SAA7134_NUM_SAMPLES2, ((dev->oss.blksize - 1) & 0xff0000) >> 16);
+               saa_writeb(SAA7134_AUDIO_FORMAT_CTRL, fmt);
+
+               break;
+         case PCI_DEVICE_ID_PHILIPS_SAA7133:
+         case PCI_DEVICE_ID_PHILIPS_SAA7135:
+               if (1 == runtime->channels)
+                       fmt |= (1 << 4);
+               if (2 == runtime->channels)
+                       fmt |= (2 << 4);
+               if (!sign)
+                       fmt |= 0x04;
+               saa_writel(SAA7133_NUM_SAMPLES, dev->oss.blksize -1);
+               saa_writel(SAA7133_AUDIO_CHANNEL, 0x543210 | (fmt << 24));
+               //saa_writel(SAA7133_AUDIO_CHANNEL, 0x543210);
+               break;
+       }
+
+       dprintk("rec_start: afmt=%d ch=%d  =>  fmt=0x%x swap=%c\n",
+               runtime->format, runtime->channels, fmt,
+               bswap ? 'b' : '-');
+       /* dma: setup channel 6 (= AUDIO) */
+       control = SAA7134_RS_CONTROL_BURST_16 |
+               SAA7134_RS_CONTROL_ME |
+               (dev->oss.pt.dma >> 12);
+       if (bswap)
+               control |= SAA7134_RS_CONTROL_BSWAP;
 
        /* I should be able to use runtime->dma_addr in the control
-           byte, but it doesn't work. So I allocate the DMA using the
-           V4L functions, and force ALSA to use that as the DMA area */
+          byte, but it doesn't work. So I allocate the DMA using the
+          V4L functions, and force ALSA to use that as the DMA area */
 
        runtime->dma_area = dev->oss.dma.vmalloc;
 
-        saa_writel(SAA7134_RS_BA1(6),0);
-        saa_writel(SAA7134_RS_BA2(6),dev->oss.blksize);
-        saa_writel(SAA7134_RS_PITCH(6),0);
-        saa_writel(SAA7134_RS_CONTROL(6),control);
+       saa_writel(SAA7134_RS_BA1(6),0);
+       saa_writel(SAA7134_RS_BA2(6),dev->oss.blksize);
+       saa_writel(SAA7134_RS_PITCH(6),0);
+       saa_writel(SAA7134_RS_CONTROL(6),control);
 
        dev->oss.rate = runtime->rate;
-        /* start dma */
-        spin_lock_irqsave(&dev->slock,flags);
-        saa7134_dma_start(dev);
-        spin_unlock_irqrestore(&dev->slock,flags);
+       /* start dma */
+       spin_lock_irqsave(&dev->slock,flags);
+       saa7134_dma_start(dev);
+       spin_unlock_irqrestore(&dev->slock,flags);
 
        return 0;
  fail2:
-        saa7134_pgtable_free(dev->pci,&dev->oss.pt);
+       saa7134_pgtable_free(dev->pci,&dev->oss.pt);
  fail1:
-        videobuf_dma_pci_unmap(dev->pci,&dev->oss.dma);
-        return err;
+       videobuf_dma_pci_unmap(dev->pci,&dev->oss.dma);
+       return err;
 
 
 }
@@ -465,10 +465,10 @@ static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t *
 
 
        if (dev->oss.read_count) {
-                dev->oss.read_count  -= snd_pcm_lib_period_bytes(substream);
-                dev->oss.read_offset += snd_pcm_lib_period_bytes(substream);
-                if (dev->oss.read_offset == dev->oss.bufsize)
-                        dev->oss.read_offset = 0;
+               dev->oss.read_count  -= snd_pcm_lib_period_bytes(substream);
+               dev->oss.read_offset += snd_pcm_lib_period_bytes(substream);
+               if (dev->oss.read_offset == dev->oss.bufsize)
+                       dev->oss.read_offset = 0;
        }
 
        return bytes_to_frames(runtime, dev->oss.read_offset);
@@ -480,9 +480,9 @@ static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t *
 
 static snd_pcm_hardware_t snd_card_saa7134_capture =
 {
-        .info =                 (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
-                                 SNDRV_PCM_INFO_BLOCK_TRANSFER |
-                                 SNDRV_PCM_INFO_MMAP_VALID),
+       .info =                 (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
+                                SNDRV_PCM_INFO_BLOCK_TRANSFER |
+                                SNDRV_PCM_INFO_MMAP_VALID),
        .formats =              USE_FORMATS,
        .rates =                USE_RATE,
        .rate_min =             USE_RATE_MIN,
@@ -550,16 +550,16 @@ static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream)
 
 static int dsp_buffer_free(struct saa7134_dev *dev)
 {
-        if (!dev->oss.blksize)
-                BUG();
+       if (!dev->oss.blksize)
+               BUG();
 
-        videobuf_dma_free(&dev->oss.dma);
+       videobuf_dma_free(&dev->oss.dma);
 
-        dev->oss.blocks  = 0;
-        dev->oss.blksize = 0;
-        dev->oss.bufsize = 0;
+       dev->oss.blocks  = 0;
+       dev->oss.blksize = 0;
+       dev->oss.bufsize = 0;
 
-        return 0;
+       return 0;
 }
 
 /*
@@ -574,21 +574,21 @@ static int dsp_buffer_free(struct saa7134_dev *dev)
 
 static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream)
 {
-        snd_card_saa7134_t *chip = snd_pcm_substream_chip(substream);
+       snd_card_saa7134_t *chip = snd_pcm_substream_chip(substream);
        struct saa7134_dev *dev = chip->saadev;
-        unsigned long flags;
+       unsigned long flags;
 
-        /* stop dma */
-        spin_lock_irqsave(&dev->slock,flags);
-        saa7134_dma_stop(dev);
-        spin_unlock_irqrestore(&dev->slock,flags);
+       /* stop dma */
+       spin_lock_irqsave(&dev->slock,flags);
+       saa7134_dma_stop(dev);
+       spin_unlock_irqrestore(&dev->slock,flags);
 
-        /* unlock buffer */
-        saa7134_pgtable_free(dev->pci,&dev->oss.pt);
-        videobuf_dma_pci_unmap(dev->pci,&dev->oss.dma);
+       /* unlock buffer */
+       saa7134_pgtable_free(dev->pci,&dev->oss.pt);
+       videobuf_dma_pci_unmap(dev->pci,&dev->oss.dma);
 
-        dsp_buffer_free(dev);
-        return 0;
+       dsp_buffer_free(dev);
+       return 0;
 }
 
 /*
@@ -605,18 +605,18 @@ static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream)
 {
        snd_pcm_runtime_t *runtime = substream->runtime;
        snd_card_saa7134_pcm_t *saapcm;
-        snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
-        struct saa7134_dev *dev = saa7134->saadev;
+       snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
+       struct saa7134_dev *dev = saa7134->saadev;
        int err;
 
        down(&dev->oss.lock);
 
-        dev->oss.afmt        = SNDRV_PCM_FORMAT_U8;
-        dev->oss.channels    = 2;
-        dev->oss.read_count  = 0;
-        dev->oss.read_offset = 0;
+       dev->oss.afmt        = SNDRV_PCM_FORMAT_U8;
+       dev->oss.channels    = 2;
+       dev->oss.read_count  = 0;
+       dev->oss.read_offset = 0;
 
-        up(&dev->oss.lock);
+       up(&dev->oss.lock);
 
        saapcm = kcalloc(1, sizeof(*saapcm), GFP_KERNEL);
        if (saapcm == NULL)
@@ -630,8 +630,8 @@ static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream)
        runtime->private_free = snd_card_saa7134_runtime_free;
        runtime->hw = snd_card_saa7134_capture;
 
-        if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
-                return err;
+       if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
+               return err;
 
        return 0;
 }
@@ -723,7 +723,7 @@ static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
                right = 20;
        spin_lock_irqsave(&chip->mixer_lock, flags);
        change = chip->mixer_volume[addr][0] != left ||
-                chip->mixer_volume[addr][1] != right;
+                chip->mixer_volume[addr][1] != right;
        chip->mixer_volume[addr][0] = left;
        chip->mixer_volume[addr][1] = right;
        spin_unlock_irqrestore(&chip->mixer_lock, flags);
@@ -764,7 +764,7 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
        unsigned long flags;
        int change, addr = kcontrol->private_value;
        int left, right;
-        u32 anabar, xbarin;
+       u32 anabar, xbarin;
        int analog_io, rate;
        struct saa7134_dev *dev;
 
@@ -775,7 +775,7 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
        spin_lock_irqsave(&chip->mixer_lock, flags);
 
        change = chip->capture_source[addr][0] != left ||
-                chip->capture_source[addr][1] != right;
+                chip->capture_source[addr][1] != right;
        chip->capture_source[addr][0] = left;
        chip->capture_source[addr][1] = right;
        dev->oss.input=addr;
@@ -783,57 +783,57 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_
 
 
        if (change) {
-          switch (dev->pci->device) {
+         switch (dev->pci->device) {
 
           case PCI_DEVICE_ID_PHILIPS_SAA7134:
-               switch (addr) {
-                       case MIXER_ADDR_TVTUNER:
-                               saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, 0xc0);
-                               saa_andorb(SAA7134_SIF_SAMPLE_FREQ,   0x03, 0x00);
-                               break;
-                       case MIXER_ADDR_LINE1:
-                       case MIXER_ADDR_LINE2:
-                               analog_io = (MIXER_ADDR_LINE1 == addr) ? 0x00 : 0x08;
-                               rate = (32000 == dev->oss.rate) ? 0x01 : 0x03;
-                               saa_andorb(SAA7134_ANALOG_IO_SELECT,  0x08, analog_io);
-                               saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, 0x80);
-                               saa_andorb(SAA7134_SIF_SAMPLE_FREQ,   0x03, rate);
-                               break;
-               }
-
-               break;
+               switch (addr) {
+                       case MIXER_ADDR_TVTUNER:
+                               saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, 0xc0);
+                               saa_andorb(SAA7134_SIF_SAMPLE_FREQ,   0x03, 0x00);
+                               break;
+                       case MIXER_ADDR_LINE1:
+                       case MIXER_ADDR_LINE2:
+                               analog_io = (MIXER_ADDR_LINE1 == addr) ? 0x00 : 0x08;
+                               rate = (32000 == dev->oss.rate) ? 0x01 : 0x03;
+                               saa_andorb(SAA7134_ANALOG_IO_SELECT,  0x08, analog_io);
+                               saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, 0x80);
+                               saa_andorb(SAA7134_SIF_SAMPLE_FREQ,   0x03, rate);
+                               break;
+               }
+
+               break;
           case PCI_DEVICE_ID_PHILIPS_SAA7133:
           case PCI_DEVICE_ID_PHILIPS_SAA7135:
-               xbarin = 0x03; // adc
+               xbarin = 0x03; // adc
                anabar = 0;
-               switch (addr) {
-                       case MIXER_ADDR_TVTUNER:
-                               xbarin = 0; // Demodulator
-                               anabar = 2; // DACs
-                               break;
-                       case MIXER_ADDR_LINE1:
-                               anabar = 0;  // aux1, aux1
-                               break;
-                       case MIXER_ADDR_LINE2:
-                               anabar = 9;  // aux2, aux2
-                               break;
-               }
+               switch (addr) {
+                       case MIXER_ADDR_TVTUNER:
+                               xbarin = 0; // Demodulator
+                               anabar = 2; // DACs
+                               break;
+                       case MIXER_ADDR_LINE1:
+                               anabar = 0;  // aux1, aux1
+                               break;
+                       case MIXER_ADDR_LINE2:
+                               anabar = 9;  // aux2, aux2
+                               break;
+               }
 
                /* output xbar always main channel */
-               saa_dsp_writel(dev, SAA7133_DIGITAL_OUTPUT_SEL1, 0xbbbb10);
+               saa_dsp_writel(dev, SAA7133_DIGITAL_OUTPUT_SEL1, 0xbbbb10);
 
                if (left || right) { // We've got data, turn the input on
-                 //saa_dsp_writel(dev, SAA7133_DIGITAL_OUTPUT_SEL2, 0x101010);
-                 saa_dsp_writel(dev, SAA7133_DIGITAL_INPUT_XBAR1, xbarin);
-                 saa_writel(SAA7133_ANALOG_IO_SELECT, anabar);
+                 //saa_dsp_writel(dev, SAA7133_DIGITAL_OUTPUT_SEL2, 0x101010);
+                 saa_dsp_writel(dev, SAA7133_DIGITAL_INPUT_XBAR1, xbarin);
+                 saa_writel(SAA7133_ANALOG_IO_SELECT, anabar);
                } else {
-                 //saa_dsp_writel(dev, SAA7133_DIGITAL_OUTPUT_SEL2, 0x101010);
-                 saa_dsp_writel(dev, SAA7133_DIGITAL_INPUT_XBAR1, 0);
-                 saa_writel(SAA7133_ANALOG_IO_SELECT, 0);
+                 //saa_dsp_writel(dev, SAA7133_DIGITAL_OUTPUT_SEL2, 0x101010);
+                 saa_dsp_writel(dev, SAA7133_DIGITAL_INPUT_XBAR1, 0);
+                 saa_writel(SAA7133_ANALOG_IO_SELECT, 0);
                }
                break;
          }
-       }
+       }
 
        return change;
 }
@@ -878,8 +878,8 @@ static int snd_saa7134_free(snd_card_saa7134_t *chip)
 
 static int snd_saa7134_dev_free(snd_device_t *device)
 {
-        snd_card_saa7134_t *chip = device->device_data;
-        return snd_saa7134_free(chip);
+       snd_card_saa7134_t *chip = device->device_data;
+       return snd_saa7134_free(chip);
 }
 
 /*
@@ -896,12 +896,12 @@ int alsa_card_saa7134_create(struct saa7134_dev *saadev, unsigned int devicenum)
        snd_card_t *card;
        snd_card_saa7134_t *chip;
        int err;
-        static snd_device_ops_t ops = {
-                .dev_free =     snd_saa7134_dev_free,
-        };
+       static snd_device_ops_t ops = {
+               .dev_free =     snd_saa7134_dev_free,
+       };
 
-        if (dev >= SNDRV_CARDS)
-                return -ENODEV;
+       if (dev >= SNDRV_CARDS)
+               return -ENODEV;
        if (!enable[dev])
                return -ENODEV;
 
@@ -918,24 +918,24 @@ int alsa_card_saa7134_create(struct saa7134_dev *saadev, unsigned int devicenum)
        /* Card "creation" */
 
        chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
-        if (chip == NULL) {
-                return -ENOMEM;
-        }
+       if (chip == NULL) {
+               return -ENOMEM;
+       }
 
-        spin_lock_init(&chip->lock);
+       spin_lock_init(&chip->lock);
 
-        chip->saadev = saadev;
+       chip->saadev = saadev;
 
-        chip->card = card;
+       chip->card = card;
 
-        chip->pci = saadev->pci;
-        chip->irq = saadev->pci->irq;
-        chip->iobase = pci_resource_start(saadev->pci, 0);
+       chip->pci = saadev->pci;
+       chip->irq = saadev->pci->irq;
+       chip->iobase = pci_resource_start(saadev->pci, 0);
 
-        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
-                snd_saa7134_free(chip);
-                return err;
-        }
+       if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
+               snd_saa7134_free(chip);
+               return err;
+       }
 
        if ((err = snd_card_saa7134_new_mixer(chip)) < 0)
                goto __nodev;
@@ -943,15 +943,15 @@ int alsa_card_saa7134_create(struct saa7134_dev *saadev, unsigned int devicenum)
        if ((err = snd_card_saa7134_pcm(chip, 0)) < 0)
                goto __nodev;
 
-        spin_lock_init(&chip->mixer_lock);
+       spin_lock_init(&chip->mixer_lock);
 
        snd_card_set_dev(card, &chip->pci->dev);
 
        /* End of "creation" */
 
        strcpy(card->shortname, "SAA7134");
-        sprintf(card->longname, "%s at 0x%lx irq %d",
-                chip->saadev->name, chip->iobase, chip->irq);
+       sprintf(card->longname, "%s at 0x%lx irq %d",
+               chip->saadev->name, chip->iobase, chip->irq);
 
        if ((err = snd_card_register(card)) == 0) {
                snd_saa7134_cards[dev] = card;
@@ -966,8 +966,8 @@ __nodev:
 
 void alsa_card_saa7134_exit(void)
 {
-        int idx;
-         for (idx = 0; idx < SNDRV_CARDS; idx++) {
-                snd_card_free(snd_saa7134_cards[idx]);
+       int idx;
+        for (idx = 0; idx < SNDRV_CARDS; idx++) {
+               snd_card_free(snd_saa7134_cards[idx]);
        }
 }
index 17b0549..a60d49a 100644 (file)
@@ -2114,16 +2114,16 @@ struct saa7134_board saa7134_boards[] = {
                },
        },
        [SAA7134_BOARD_BEHOLD_409FM] = {
-               /* <http://tuner.beholder.ru>, Sergey <skiv@orel.ru> */
-               .name           = "Beholder BeholdTV 409 FM",
-               .audio_clock    = 0x00187de7,
-               .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
-               .radio_type     = UNSET,
-               .tuner_addr     = ADDR_UNSET,
-                .radio_addr     = ADDR_UNSET,
-                .tda9887_conf   = TDA9887_PRESENT,
-               .inputs         = {{
-                         .name = name_tv,
+               /* <http://tuner.beholder.ru>, Sergey <skiv@orel.ru> */
+               .name           = "Beholder BeholdTV 409 FM",
+               .audio_clock    = 0x00187de7,
+               .tuner_type     = TUNER_PHILIPS_FM1216ME_MK3,
+               .radio_type     = UNSET,
+               .tuner_addr     = ADDR_UNSET,
+               .radio_addr     = ADDR_UNSET,
+               .tda9887_conf   = TDA9887_PRESENT,
+               .inputs         = {{
+                         .name = name_tv,
                          .vmux = 3,
                          .amux = TV,
                          .tv   = 1,
@@ -2131,60 +2131,60 @@ struct saa7134_board saa7134_boards[] = {
                          .name = name_comp1,
                          .vmux = 1,
                          .amux = LINE1,
-               },{
-                         .name = name_svideo,
+               },{
+                         .name = name_svideo,
                          .vmux = 8,
                          .amux = LINE1,
-                }},
-                .radio = {
-                         .name = name_radio,
+               }},
+               .radio = {
+                         .name = name_radio,
                          .amux = LINE2,
-               },
-        },
-        [SAA7134_BOARD_GOTVIEW_7135] = {
+               },
+       },
+       [SAA7134_BOARD_GOTVIEW_7135] = {
                /* Mike Baikov <mike@baikov.com> */
                /* Andrey Cvetcov <ays14@yandex.ru> */
-                .name            = "GoTView 7135 PCI",
-                .audio_clock     = 0x00187de7,
-                .tuner_type      = TUNER_PHILIPS_FM1216ME_MK3,
-                .radio_type      = UNSET,
-                .tuner_addr      = ADDR_UNSET,
-                .radio_addr      = ADDR_UNSET,
-                .tda9887_conf    = TDA9887_PRESENT,
-                .gpiomask        = 0x00200003,
-                .inputs          = {{
-                        .name = name_tv,
-                        .vmux = 1,
-                        .amux = TV,
-                        .tv   = 1,
-                        .gpio = 0x00200003,
-                },{
-                        .name = name_tv_mono,
-                        .vmux = 1,
-                        .amux = LINE2,
-                        .gpio = 0x00200003,
-                },{
-                        .name = name_comp1,
-                        .vmux = 3,
-                        .amux = LINE1,
-                        .gpio = 0x00200003,
-                },{
-                        .name = name_svideo,
-                        .vmux = 8,
-                        .amux = LINE1,
-                        .gpio = 0x00200003,
-                }},
-                .radio = {
-                        .name = name_radio,
-                        .amux = LINE2,
-                        .gpio = 0x00200003,
-                },
-                .mute = {
-                        .name = name_mute,
-                        .amux = TV,
-                        .gpio = 0x00200003,
-                },
-        },
+               .name            = "GoTView 7135 PCI",
+               .audio_clock     = 0x00187de7,
+               .tuner_type      = TUNER_PHILIPS_FM1216ME_MK3,
+               .radio_type      = UNSET,
+               .tuner_addr      = ADDR_UNSET,
+               .radio_addr      = ADDR_UNSET,
+               .tda9887_conf    = TDA9887_PRESENT,
+               .gpiomask        = 0x00200003,
+               .inputs          = {{
+                       .name = name_tv,
+                       .vmux = 1,
+                       .amux = TV,
+                       .tv   = 1,
+                       .gpio = 0x00200003,
+               },{
+                       .name = name_tv_mono,
+                       .vmux = 1,
+                       .amux = LINE2,
+                       .gpio = 0x00200003,
+               },{
+                       .name = name_comp1,
+                       .vmux = 3,
+                       .amux = LINE1,
+                       .gpio = 0x00200003,
+               },{
+                       .name = name_svideo,
+                       .vmux = 8,
+                       .amux = LINE1,
+                       .gpio = 0x00200003,
+               }},
+               .radio = {
+                       .name = name_radio,
+                       .amux = LINE2,
+                       .gpio = 0x00200003,
+               },
+               .mute = {
+                       .name = name_mute,
+                       .amux = TV,
+                       .gpio = 0x00200003,
+               },
+       },
        [SAA7134_BOARD_PHILIPS_EUROPA] = {
                .name           = "Philips EUROPA V3 reference design",
                .audio_clock    = 0x00187de7,
@@ -2251,78 +2251,78 @@ 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_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,
                .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",
-               .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,
-               }},
-       },
+       },
+       [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,
+               }},
+       },
        [SAA7134_BOARD_FLYTVPLATINUM_MINI2] = {
                .name           = "LifeView FlyTV Platinum Mini2",
                .audio_clock    = 0x00200000,
@@ -2760,55 +2760,55 @@ struct pci_device_id saa7134_pci_tbl[] = {
                .subvendor    = 0x0000, /* It shouldn't break anything, since subdevice id seems unique */
                .subdevice    = 0x4091,
                .driver_data  = SAA7134_BOARD_BEHOLD_409FM,
-        },{
-                .vendor       = PCI_VENDOR_ID_PHILIPS,
-                .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
-                .subvendor    = 0x5456, /* GoTView */
-                .subdevice    = 0x7135,
-                .driver_data  = SAA7134_BOARD_GOTVIEW_7135,
-        },{
+       },{
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+               .subvendor    = 0x5456, /* GoTView */
+               .subdevice    = 0x7135,
+               .driver_data  = SAA7134_BOARD_GOTVIEW_7135,
+       },{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = PCI_VENDOR_ID_PHILIPS,
                .subdevice    = 0x2004,
                .driver_data  = SAA7134_BOARD_PHILIPS_EUROPA,
-       },{
+       },{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
                .subvendor    = 0x185b,
                .subdevice    = 0xc900,
                .driver_data  = SAA7134_BOARD_VIDEOMATE_DVBT_300,
-       },{
+       },{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
                .subvendor    = 0x185b,
                .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,
-       },{
-               .vendor       = PCI_VENDOR_ID_PHILIPS,
-               .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
-               .subvendor    = 0x1461,
-               .subdevice    = 0x1044,
-               .driver_data  = SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180,
-       },{
+               .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,
+       },{
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+               .subvendor    = 0x1461,
+               .subdevice    = 0x1044,
+               .driver_data  = SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180,
+       },{
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
                .subvendor    = 0x1131,
                .subdevice    = 0x4ee9,
                .driver_data  = SAA7134_BOARD_MONSTERTV_MOBILE,
-       },{
+       },{
                /* --- boards without eeprom + subsystem ID --- */
                .vendor       = PCI_VENDOR_ID_PHILIPS,
                .device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -3051,7 +3051,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
        case SAA7134_BOARD_VIDEOMATE_DVBT_300:
                /* The Philips EUROPA based hybrid boards have the tuner connected through
                 * the channel decoder. We have to make it transparent to find it
-                */
+                */
                {
                struct tuner_setup tun_setup;
                u8 data[] = { 0x07, 0x02};
@@ -3063,7 +3063,7 @@ int saa7134_board_init2(struct saa7134_dev *dev)
                tun_setup.addr = dev->tuner_addr;
 
                saa7134_i2c_call_clients (dev, TUNER_SET_TYPE_ADDR,&tun_setup);
-               }
+               }
                break;
        }
        return 0;
index 907dbd4..afa0cfc 100644 (file)
@@ -201,10 +201,10 @@ static int pending_call(struct notifier_block *self, unsigned long state,
        if (module != THIS_MODULE || state != MODULE_STATE_LIVE)
                return NOTIFY_DONE;
 
-        if (need_empress)
-                request_module("saa7134-empress");
-        if (need_dvb)
-                request_module("saa7134-dvb");
+       if (need_empress)
+               request_module("saa7134-empress");
+       if (need_dvb)
+               request_module("saa7134-dvb");
        return NOTIFY_DONE;
 }
 
@@ -279,8 +279,8 @@ unsigned long saa7134_buffer_base(struct saa7134_buf *buf)
 
 int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt)
 {
-        __le32       *cpu;
-        dma_addr_t   dma_addr;
+       __le32       *cpu;
+       dma_addr_t   dma_addr;
 
        cpu = pci_alloc_consistent(pci, SAA7134_PGTABLE_SIZE, &dma_addr);
        if (NULL == cpu)
@@ -440,7 +440,7 @@ int saa7134_set_dmabits(struct saa7134_dev *dev)
                ctrl |= SAA7134_MAIN_CTRL_TE0;
                irq  |= SAA7134_IRQ1_INTE_RA0_1 |
                        SAA7134_IRQ1_INTE_RA0_0;
-               cap = dev->video_q.curr->vb.field;
+               cap = dev->video_q.curr->vb.field;
        }
 
        /* video capture -- dma 1+2 (planar modes) */
@@ -646,7 +646,7 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
 
        saa_writel(SAA7134_IRQ1, 0);
        saa_writel(SAA7134_IRQ2, 0);
-        init_MUTEX(&dev->lock);
+       init_MUTEX(&dev->lock);
        spin_lock_init(&dev->slock);
 
        saa7134_track_gpio(dev,"pre-init");
@@ -704,7 +704,7 @@ static int saa7134_hwinit2(struct saa7134_dev *dev)
        saa7134_tvaudio_init2(dev);
 
        /* enable IRQ's */
-       irq2_mask =
+       irq2_mask =
                SAA7134_IRQ2_INTE_DEC3    |
                SAA7134_IRQ2_INTE_DEC2    |
                SAA7134_IRQ2_INTE_DEC1    |
@@ -889,8 +889,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
 
        /* print pci info */
        pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev);
-        pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER,  &dev->pci_lat);
-        printk(KERN_INFO "%s: found at %s, rev: %d, irq: %d, "
+       pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER,  &dev->pci_lat);
+       printk(KERN_INFO "%s: found at %s, rev: %d, irq: %d, "
               "latency: %d, mmio: 0x%lx\n", dev->name,
               pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
               dev->pci_lat,pci_resource_start(pci_dev,0));
@@ -914,7 +914,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
        dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf;
        if (UNSET != tuner[dev->nr])
                dev->tuner_type = tuner[dev->nr];
-        printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
+       printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
               dev->name,pci_dev->subsystem_vendor,
               pci_dev->subsystem_device,saa7134_boards[dev->board].name,
               dev->board, card[dev->nr] == dev->board ?
@@ -964,12 +964,12 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
                request_module("tuner");
        if (dev->tda9887_conf)
                request_module("tda9887");
-       if (card_is_empress(dev)) {
+       if (card_is_empress(dev)) {
                request_module("saa6752hs");
                request_module_depend("saa7134-empress",&need_empress);
        }
 
-       if (card_is_dvb(dev))
+       if (card_is_dvb(dev))
                request_module_depend("saa7134-dvb",&need_dvb);
 
        v4l2_prio_init(&dev->prio);
@@ -1078,7 +1078,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
 
 static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
 {
-        struct saa7134_dev *dev = pci_get_drvdata(pci_dev);
+       struct saa7134_dev *dev = pci_get_drvdata(pci_dev);
        struct list_head *item;
        struct saa7134_mpeg_ops *mops;
 
@@ -1173,10 +1173,10 @@ EXPORT_SYMBOL(saa7134_ts_unregister);
 /* ----------------------------------------------------------- */
 
 static struct pci_driver saa7134_pci_driver = {
-        .name     = "saa7134",
-        .id_table = saa7134_pci_tbl,
-        .probe    = saa7134_initdev,
-        .remove   = __devexit_p(saa7134_finidev),
+       .name     = "saa7134",
+       .id_table = saa7134_pci_tbl,
+       .probe    = saa7134_initdev,
+       .remove   = __devexit_p(saa7134_finidev),
 };
 
 static int saa7134_init(void)
index 87641f7..5aadd44 100644 (file)
@@ -547,7 +547,7 @@ static int philips_tda827x_pll_set(struct dvb_frontend *fe, struct dvb_frontend_
        u8 tuner_buf[14];
 
        struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tuner_buf,
-                                       .len = sizeof(tuner_buf) };
+                                       .len = sizeof(tuner_buf) };
        int i, tuner_freq, if_freq;
        u32 N;
        switch (params->u.ofdm.bandwidth) {
@@ -606,7 +606,7 @@ static void philips_tda827x_pll_sleep(struct dvb_frontend *fe)
        struct saa7134_dev *dev = fe->dvb->priv;
        static u8 tda827x_sleep[] = { 0x30, 0xd0};
        struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tda827x_sleep,
-                                   .len = sizeof(tda827x_sleep) };
+                                   .len = sizeof(tda827x_sleep) };
        i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
 }
 
index 77b627e..e9ec69e 100644 (file)
@@ -55,7 +55,7 @@ static void ts_reset_encoder(struct saa7134_dev* dev)
 
        saa_writeb(SAA7134_SPECIAL_MODE, 0x00);
        msleep(10);
-       saa_writeb(SAA7134_SPECIAL_MODE, 0x01);
+       saa_writeb(SAA7134_SPECIAL_MODE, 0x01);
        msleep(100);
        dev->empress_started = 0;
 }
@@ -65,7 +65,7 @@ static int ts_init_encoder(struct saa7134_dev* dev)
        ts_reset_encoder(dev);
        saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, NULL);
        dev->empress_started = 1;
-       return 0;
+       return 0;
 }
 
 /* ------------------------------------------------------------------ */
@@ -169,7 +169,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
                struct v4l2_capability *cap = arg;
 
                memset(cap,0,sizeof(*cap));
-                strcpy(cap->driver, "saa7134");
+               strcpy(cap->driver, "saa7134");
                strlcpy(cap->card, saa7134_boards[dev->board].name,
                        sizeof(cap->card));
                sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
index 711aa8e..2577d03 100644 (file)
@@ -239,7 +239,7 @@ static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap,
        unsigned char data;
        int addr,rc,i,byte;
 
-       status = i2c_get_status(dev);
+       status = i2c_get_status(dev);
        if (!i2c_is_idle(status))
                if (!i2c_reset(dev))
                        return -EIO;
@@ -296,7 +296,7 @@ static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap,
        rc = -EIO;
        if (!i2c_is_busy_wait(dev))
                goto err;
-       status = i2c_get_status(dev);
+       status = i2c_get_status(dev);
        if (i2c_is_error(status))
                goto err;
        /* ensure that the bus is idle for at least one bit slot */
@@ -348,12 +348,12 @@ static int attach_inform(struct i2c_client *client)
 
                        client->driver->command(client, TUNER_SET_TYPE_ADDR, &tun_setup);
                }
-        }
+       }
 
        if (tuner != UNSET) {
 
-               tun_setup.type = tuner;
-               tun_setup.addr = saa7134_boards[dev->board].tuner_addr;
+               tun_setup.type = tuner;
+               tun_setup.addr = saa7134_boards[dev->board].tuner_addr;
 
                if ((tun_setup.addr == ADDR_UNSET)||(tun_setup.addr == client->addr)) {
 
@@ -361,11 +361,11 @@ static int attach_inform(struct i2c_client *client)
 
                        client->driver->command(client,TUNER_SET_TYPE_ADDR, &tun_setup);
                }
-        }
+       }
 
        client->driver->command(client, TDA9887_SET_CONFIG, &conf);
 
-        return 0;
+       return 0;
 }
 
 static struct i2c_algorithm saa7134_algo = {
index 9dc41c1..7ce0459 100644 (file)
@@ -114,24 +114,24 @@ static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = {
 /* Alfons Geser <a.geser@cox.net>
  * updates from Job D. R. Borges <jobdrb@ig.com.br> */
 static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = {
-        [ 18 ] = KEY_POWER,
-        [  1 ] = KEY_TV,             // DVR
-        [ 21 ] = KEY_DVD,            // DVD
-        [ 23 ] = KEY_AUDIO,          // music
-                                     // DVR mode / DVD mode / music mode
-
-        [ 27 ] = KEY_MUTE,           // mute
-        [  2 ] = KEY_LANGUAGE,       // MTS/SAP / audio / autoseek
-        [ 30 ] = KEY_SUBTITLE,       // closed captioning / subtitle / seek
-        [ 22 ] = KEY_ZOOM,           // full screen
-        [ 28 ] = KEY_VIDEO,          // video source / eject / delall
-        [ 29 ] = KEY_RESTART,        // playback / angle / del
-        [ 47 ] = KEY_SEARCH,         // scan / menu / playlist
-        [ 48 ] = KEY_CHANNEL,        // CH surfing / bookmark / memo
-
-        [ 49 ] = KEY_HELP,           // help
-        [ 50 ] = KEY_MODE,           // num/memo
-        [ 51 ] = KEY_ESC,            // cancel
+       [ 18 ] = KEY_POWER,
+       [  1 ] = KEY_TV,             // DVR
+       [ 21 ] = KEY_DVD,            // DVD
+       [ 23 ] = KEY_AUDIO,          // music
+                                    // DVR mode / DVD mode / music mode
+
+       [ 27 ] = KEY_MUTE,           // mute
+       [  2 ] = KEY_LANGUAGE,       // MTS/SAP / audio / autoseek
+       [ 30 ] = KEY_SUBTITLE,       // closed captioning / subtitle / seek
+       [ 22 ] = KEY_ZOOM,           // full screen
+       [ 28 ] = KEY_VIDEO,          // video source / eject / delall
+       [ 29 ] = KEY_RESTART,        // playback / angle / del
+       [ 47 ] = KEY_SEARCH,         // scan / menu / playlist
+       [ 48 ] = KEY_CHANNEL,        // CH surfing / bookmark / memo
+
+       [ 49 ] = KEY_HELP,           // help
+       [ 50 ] = KEY_MODE,           // num/memo
+       [ 51 ] = KEY_ESC,            // cancel
 
        [ 12 ] = KEY_UP,             // up
        [ 16 ] = KEY_DOWN,           // down
@@ -148,24 +148,24 @@ static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = {
        [ 45 ] = KEY_PLAY,           // play
        [ 46 ] = KEY_SHUFFLE,        // snapshot / shuffle
 
-        [  0 ] = KEY_KP0,
-        [  5 ] = KEY_KP1,
-        [  6 ] = KEY_KP2,
-        [  7 ] = KEY_KP3,
-        [  9 ] = KEY_KP4,
-        [ 10 ] = KEY_KP5,
-        [ 11 ] = KEY_KP6,
-        [ 13 ] = KEY_KP7,
-        [ 14 ] = KEY_KP8,
-        [ 15 ] = KEY_KP9,
-
-        [ 42 ] = KEY_VOLUMEUP,
-        [ 17 ] = KEY_VOLUMEDOWN,
-        [ 24 ] = KEY_CHANNELUP,      // CH.tracking up
-        [ 25 ] = KEY_CHANNELDOWN,    // CH.tracking down
-
-        [ 19 ] = KEY_KPENTER,        // enter
-        [ 33 ] = KEY_KPDOT,          // . (decimal dot)
+       [  0 ] = KEY_KP0,
+       [  5 ] = KEY_KP1,
+       [  6 ] = KEY_KP2,
+       [  7 ] = KEY_KP3,
+       [  9 ] = KEY_KP4,
+       [ 10 ] = KEY_KP5,
+       [ 11 ] = KEY_KP6,
+       [ 13 ] = KEY_KP7,
+       [ 14 ] = KEY_KP8,
+       [ 15 ] = KEY_KP9,
+
+       [ 42 ] = KEY_VOLUMEUP,
+       [ 17 ] = KEY_VOLUMEDOWN,
+       [ 24 ] = KEY_CHANNELUP,      // CH.tracking up
+       [ 25 ] = KEY_CHANNELDOWN,    // CH.tracking down
+
+       [ 19 ] = KEY_KPENTER,        // enter
+       [ 33 ] = KEY_KPDOT,          // . (decimal dot)
 };
 
 static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = {
@@ -455,13 +455,13 @@ static int build_key(struct saa7134_dev *dev)
        saa_setb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN);
 
        gpio = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
-        if (ir->polling) {
-                if (ir->last_gpio == gpio)
-                        return 0;
-                ir->last_gpio = gpio;
-        }
+       if (ir->polling) {
+               if (ir->last_gpio == gpio)
+                       return 0;
+               ir->last_gpio = gpio;
+       }
 
-       data = ir_extract_bits(gpio, ir->mask_keycode);
+       data = ir_extract_bits(gpio, ir->mask_keycode);
        dprintk("build_key gpio=0x%x mask=0x%x data=%d\n",
                gpio, ir->mask_keycode, data);
 
@@ -478,9 +478,9 @@ static int build_key(struct saa7134_dev *dev)
 
 void saa7134_input_irq(struct saa7134_dev *dev)
 {
-        struct saa7134_ir *ir = dev->remote;
+       struct saa7134_ir *ir = dev->remote;
 
-        if (!ir->polling)
+       if (!ir->polling)
                build_key(dev);
 }
 
@@ -515,7 +515,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
        switch (dev->board) {
        case SAA7134_BOARD_FLYVIDEO2000:
        case SAA7134_BOARD_FLYVIDEO3000:
-        case SAA7134_BOARD_FLYTVPLATINUM_FM:
+       case SAA7134_BOARD_FLYTVPLATINUM_FM:
        case SAA7134_BOARD_FLYTVPLATINUM_MINI2:
                ir_codes     = flyvideo_codes;
                mask_keycode = 0xEC00000;
@@ -557,7 +557,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
                saa_setb(SAA7134_GPIO_GPMODE0, 0x4);
                saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
                break;
-        case SAA7134_BOARD_KWORLD_TERMINATOR:
+       case SAA7134_BOARD_KWORLD_TERMINATOR:
                ir_codes     = avacssmart_codes;
                mask_keycode = 0x00001f;
                mask_keyup   = 0x000060;
@@ -571,7 +571,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
                mask_keyup   = 0x004000;
                polling      = 50; // ms
                break;
-        case SAA7134_BOARD_GOTVIEW_7135:
+       case SAA7134_BOARD_GOTVIEW_7135:
                ir_codes     = gotview7135_codes;
                mask_keycode = 0x0003EC;
                mask_keyup   = 0x008000;
@@ -585,8 +585,8 @@ int saa7134_input_init1(struct saa7134_dev *dev)
                mask_keyup   = 0x400000;
                polling      = 50; // ms
                break;
-        case SAA7134_BOARD_VIDEOMATE_DVBT_300:
-        case SAA7134_BOARD_VIDEOMATE_DVBT_200:
+       case SAA7134_BOARD_VIDEOMATE_DVBT_300:
+       case SAA7134_BOARD_VIDEOMATE_DVBT_200:
                ir_codes     = videomate_tv_pvr_codes;
                mask_keycode = 0x003F00;
                mask_keyup   = 0x040000;
@@ -610,7 +610,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
        ir->mask_keycode = mask_keycode;
        ir->mask_keydown = mask_keydown;
        ir->mask_keyup   = mask_keyup;
-        ir->polling      = polling;
+       ir->polling      = polling;
 
        /* init input device */
        snprintf(ir->name, sizeof(ir->name), "saa7134 IR (%s)",
index b1dcb4d..f1b0e0d 100644 (file)
@@ -64,7 +64,7 @@ static int dsp_buffer_conf(struct saa7134_dev *dev, int blksize, int blocks)
        dev->oss.bufsize = blksize * blocks;
 
        dprintk("buffer config: %d blocks / %d bytes, %d kB total\n",
-               blocks,blksize,blksize * blocks / 1024);
+               blocks,blksize,blksize * blocks / 1024);
        return 0;
 }
 
@@ -371,20 +371,20 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
 
        if (oss_debug > 1)
                saa7134_print_ioctl(dev->name,cmd);
-        switch (cmd) {
-        case OSS_GETVERSION:
-                return put_user(SOUND_VERSION, p);
-        case SNDCTL_DSP_GETCAPS:
+       switch (cmd) {
+       case OSS_GETVERSION:
+               return put_user(SOUND_VERSION, p);
+       case SNDCTL_DSP_GETCAPS:
                return 0;
 
-        case SNDCTL_DSP_SPEED:
+       case SNDCTL_DSP_SPEED:
                if (get_user(val, p))
                        return -EFAULT;
                /* fall through */
-        case SOUND_PCM_READ_RATE:
+       case SOUND_PCM_READ_RATE:
                return put_user(dev->oss.rate, p);
 
-        case SNDCTL_DSP_STEREO:
+       case SNDCTL_DSP_STEREO:
                if (get_user(val, p))
                        return -EFAULT;
                down(&dev->oss.lock);
@@ -396,7 +396,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
                up(&dev->oss.lock);
                return put_user(dev->oss.channels-1, p);
 
-        case SNDCTL_DSP_CHANNELS:
+       case SNDCTL_DSP_CHANNELS:
                if (get_user(val, p))
                        return -EFAULT;
                if (val != 1 && val != 2)
@@ -409,15 +409,15 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
                }
                up(&dev->oss.lock);
                /* fall through */
-        case SOUND_PCM_READ_CHANNELS:
+       case SOUND_PCM_READ_CHANNELS:
                return put_user(dev->oss.channels, p);
 
-        case SNDCTL_DSP_GETFMTS: /* Returns a mask */
+       case SNDCTL_DSP_GETFMTS: /* Returns a mask */
                return put_user(AFMT_U8     | AFMT_S8     |
                                AFMT_U16_LE | AFMT_U16_BE |
                                AFMT_S16_LE | AFMT_S16_BE, p);
 
-        case SNDCTL_DSP_SETFMT: /* Selects ONE fmt */
+       case SNDCTL_DSP_SETFMT: /* Selects ONE fmt */
                if (get_user(val, p))
                        return -EFAULT;
                switch (val) {
@@ -442,7 +442,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
                        return -EINVAL;
                }
 
-        case SOUND_PCM_READ_BITS:
+       case SOUND_PCM_READ_BITS:
                switch (dev->oss.afmt) {
                case AFMT_U8:
                case AFMT_S8:
@@ -456,20 +456,20 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
                        return -EINVAL;
                }
 
-        case SNDCTL_DSP_NONBLOCK:
-                file->f_flags |= O_NONBLOCK;
-                return 0;
+       case SNDCTL_DSP_NONBLOCK:
+               file->f_flags |= O_NONBLOCK;
+               return 0;
 
-        case SNDCTL_DSP_RESET:
+       case SNDCTL_DSP_RESET:
                down(&dev->oss.lock);
                if (dev->oss.recording_on)
                        dsp_rec_stop(dev);
                up(&dev->oss.lock);
                return 0;
-        case SNDCTL_DSP_GETBLKSIZE:
+       case SNDCTL_DSP_GETBLKSIZE:
                return put_user(dev->oss.blksize, p);
 
-        case SNDCTL_DSP_SETFRAGMENT:
+       case SNDCTL_DSP_SETFRAGMENT:
                if (get_user(val, p))
                        return -EFAULT;
                if (dev->oss.recording_on)
@@ -480,7 +480,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
                dsp_buffer_init(dev);
                return 0;
 
-        case SNDCTL_DSP_SYNC:
+       case SNDCTL_DSP_SYNC:
                /* NOP */
                return 0;
 
@@ -563,7 +563,7 @@ mixer_recsrc_7133(struct saa7134_dev *dev)
        switch (dev->oss.input) {
        case TV:
                xbarin = 0; // Demodulator
-        anabar = 2; // DACs
+       anabar = 2; // DACs
                break;
        case LINE1:
                anabar = 0;  // aux1, aux1
@@ -667,28 +667,28 @@ static int mixer_ioctl(struct inode *inode, struct file *file,
 
        if (oss_debug > 1)
                saa7134_print_ioctl(dev->name,cmd);
-        switch (cmd) {
-        case OSS_GETVERSION:
-                return put_user(SOUND_VERSION, p);
+       switch (cmd) {
+       case OSS_GETVERSION:
+               return put_user(SOUND_VERSION, p);
        case SOUND_MIXER_INFO:
        {
                mixer_info info;
                memset(&info,0,sizeof(info));
-                strlcpy(info.id,   "TV audio", sizeof(info.id));
-                strlcpy(info.name, dev->name,  sizeof(info.name));
-                info.modify_counter = dev->oss.count;
-                if (copy_to_user(argp, &info, sizeof(info)))
-                        return -EFAULT;
+               strlcpy(info.id,   "TV audio", sizeof(info.id));
+               strlcpy(info.name, dev->name,  sizeof(info.name));
+               info.modify_counter = dev->oss.count;
+               if (copy_to_user(argp, &info, sizeof(info)))
+                       return -EFAULT;
                return 0;
        }
        case SOUND_OLD_MIXER_INFO:
        {
                _old_mixer_info info;
                memset(&info,0,sizeof(info));
-                strlcpy(info.id,   "TV audio", sizeof(info.id));
-                strlcpy(info.name, dev->name,  sizeof(info.name));
-                if (copy_to_user(argp, &info, sizeof(info)))
-                        return -EFAULT;
+               strlcpy(info.id,   "TV audio", sizeof(info.id));
+               strlcpy(info.name, dev->name,  sizeof(info.name));
+               if (copy_to_user(argp, &info, sizeof(info)))
+                       return -EFAULT;
                return 0;
        }
        case MIXER_READ(SOUND_MIXER_CAPS):
@@ -771,7 +771,7 @@ struct file_operations saa7134_mixer_fops = {
 int saa7134_oss_init1(struct saa7134_dev *dev)
 {
        /* general */
-        init_MUTEX(&dev->oss.lock);
+       init_MUTEX(&dev->oss.lock);
        init_waitqueue_head(&dev->oss.wq);
 
        switch (dev->pci->device) {
index 58c521f..ac6431b 100644 (file)
@@ -27,7 +27,7 @@
 
 /* DMA channels, n = 0 ... 6 */
 #define SAA7134_RS_BA1(n)                      ((0x200 >> 2) + 4*n)
-#define SAA7134_RS_BA2(n)                      ((0x204 >> 2) + 4*n)
+#define SAA7134_RS_BA2(n)                      ((0x204 >> 2) + 4*n)
 #define SAA7134_RS_PITCH(n)                    ((0x208 >> 2) + 4*n)
 #define SAA7134_RS_CONTROL(n)                  ((0x20c >> 2) + 4*n)
 #define   SAA7134_RS_CONTROL_WSWAP             (0x01 << 25)
 
 /* main control */
 #define SAA7134_MAIN_CTRL                       (0x2a8 >> 2)
-#define   SAA7134_MAIN_CTRL_VPLLE              (1 << 15)
-#define   SAA7134_MAIN_CTRL_APLLE              (1 << 14)
-#define   SAA7134_MAIN_CTRL_EXOSC              (1 << 13)
-#define   SAA7134_MAIN_CTRL_EVFE1              (1 << 12)
-#define   SAA7134_MAIN_CTRL_EVFE2              (1 << 11)
-#define   SAA7134_MAIN_CTRL_ESFE               (1 << 10)
-#define   SAA7134_MAIN_CTRL_EBADC              (1 << 9)
-#define   SAA7134_MAIN_CTRL_EBDAC              (1 << 8)
+#define   SAA7134_MAIN_CTRL_VPLLE              (1 << 15)
+#define   SAA7134_MAIN_CTRL_APLLE              (1 << 14)
+#define   SAA7134_MAIN_CTRL_EXOSC              (1 << 13)
+#define   SAA7134_MAIN_CTRL_EVFE1              (1 << 12)
+#define   SAA7134_MAIN_CTRL_EVFE2              (1 << 11)
+#define   SAA7134_MAIN_CTRL_ESFE               (1 << 10)
+#define   SAA7134_MAIN_CTRL_EBADC              (1 << 9)
+#define   SAA7134_MAIN_CTRL_EBDAC              (1 << 8)
 #define   SAA7134_MAIN_CTRL_TE6                        (1 << 6)
 #define   SAA7134_MAIN_CTRL_TE5                        (1 << 5)
 #define   SAA7134_MAIN_CTRL_TE4                        (1 << 4)
index cdfd698..470903e 100644 (file)
@@ -111,8 +111,8 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
 
        /* dma: setup channel 5 (= TS) */
        control = SAA7134_RS_CONTROL_BURST_16 |
-                 SAA7134_RS_CONTROL_ME |
-                 (buf->pt->dma >> 12);
+                 SAA7134_RS_CONTROL_ME |
+                 (buf->pt->dma >> 12);
 
        saa_writeb(SAA7134_TS_DMA0, ((lines-1)&0xff));
        saa_writeb(SAA7134_TS_DMA1, (((lines-1)>>8)&0xff));
index fdca6c5..3daf1b5 100644 (file)
@@ -246,7 +246,7 @@ static void mute_input_7134(struct saa7134_dev *dev)
        if (PCI_DEVICE_ID_PHILIPS_SAA7134 == dev->pci->device)
                /* 7134 mute */
                saa_writeb(SAA7134_AUDIO_MUTE_CTRL, mute ?
-                                                   SAA7134_MUTE_MASK |
+                                                   SAA7134_MUTE_MASK |
                                                    SAA7134_MUTE_ANALOG |
                                                    SAA7134_MUTE_I2S :