summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-10-16 12:13:58 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-10-16 12:13:58 +0000
commit70f32af39cc49a27e078cfc9b4e2c31c4ba8bd53 (patch)
tree6bfab0b1cf0335dbcaf968061eff63244559e6cb
parentb01d5877476cea7641b2a4b749ed0d47035d72b3 (diff)
downloadmediapointer-dvb-s2-70f32af39cc49a27e078cfc9b4e2c31c4ba8bd53.tar.gz
mediapointer-dvb-s2-70f32af39cc49a27e078cfc9b4e2c31c4ba8bd53.tar.bz2
- Whitespace Cleanups.
- Whitespace script improved. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
-rw-r--r--Makefile3
-rw-r--r--linux/Documentation/video4linux/README.cx886
-rw-r--r--linux/Documentation/video4linux/bttv/Cards18
-rw-r--r--linux/Documentation/video4linux/bttv/README6
-rw-r--r--linux/Documentation/video4linux/bttv/Sound-FAQ6
-rw-r--r--linux/Documentation/video4linux/lifeview.txt58
-rw-r--r--linux/drivers/media/common/ir-common.c8
-rw-r--r--linux/drivers/media/video/bt832.c96
-rw-r--r--linux/drivers/media/video/bt832.h4
-rw-r--r--linux/drivers/media/video/bttv-cards.c272
-rw-r--r--linux/drivers/media/video/bttv-driver.c420
-rw-r--r--linux/drivers/media/video/bttv-gpio.c4
-rw-r--r--linux/drivers/media/video/bttv-i2c.c44
-rw-r--r--linux/drivers/media/video/bttv-if.c6
-rw-r--r--linux/drivers/media/video/bttv-risc.c112
-rw-r--r--linux/drivers/media/video/bttv.h22
-rw-r--r--linux/drivers/media/video/bttvp.h16
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c18
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c42
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c342
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c42
-rw-r--r--linux/drivers/media/video/cx88/cx88-dvb.c18
-rw-r--r--linux/drivers/media/video/cx88/cx88-i2c.c24
-rw-r--r--linux/drivers/media/video/cx88/cx88-input.c4
-rw-r--r--linux/drivers/media/video/cx88/cx88-mpeg.c20
-rw-r--r--linux/drivers/media/video/cx88/cx88-reg.h14
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c58
-rw-r--r--linux/drivers/media/video/cx88/cx88.h6
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c4
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-core.c22
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-i2c.c4
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-input.c54
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c10
-rw-r--r--linux/drivers/media/video/em28xx/em28xx.h12
-rw-r--r--linux/drivers/media/video/ir-kbd-gpio.c6
-rw-r--r--linux/drivers/media/video/ir-kbd-i2c.c30
-rw-r--r--linux/drivers/media/video/msp3400-driver.c62
-rw-r--r--linux/drivers/media/video/msp3400.c62
-rw-r--r--linux/drivers/media/video/mt20xx.c206
-rw-r--r--linux/drivers/media/video/saa6752hs.c64
-rw-r--r--linux/drivers/media/video/saa7113.c4
-rw-r--r--linux/drivers/media/video/saa711x.c4
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c64
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-alsa.c508
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c316
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c40
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-dvb.c6
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c8
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-i2c.c16
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c102
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-oss.c70
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-reg.h20
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-ts.c6
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-tvaudio.c14
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c108
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h14
-rw-r--r--linux/drivers/media/video/tda7432.c16
-rw-r--r--linux/drivers/media/video/tda8290.c4
-rw-r--r--linux/drivers/media/video/tda9875.c56
-rw-r--r--linux/drivers/media/video/tda9887.c36
-rw-r--r--linux/drivers/media/video/tea5767.c10
-rw-r--r--linux/drivers/media/video/tuner-core.c32
-rw-r--r--linux/drivers/media/video/tuner-simple.c114
-rw-r--r--linux/drivers/media/video/tvaudio.c34
-rw-r--r--linux/drivers/media/video/tveeprom.c30
-rw-r--r--linux/drivers/media/video/tvmixer.c56
-rw-r--r--linux/drivers/media/video/v4l1-compat.c4
-rw-r--r--linux/drivers/media/video/video-buf.c20
-rw-r--r--linux/drivers/media/video/wm8775.c4
-rw-r--r--linux/drivers/usb/media/em2820-cards.c4
-rw-r--r--linux/drivers/usb/media/em2820-core.c22
-rw-r--r--linux/drivers/usb/media/em2820-i2c.c4
-rw-r--r--linux/drivers/usb/media/em2820-input.c54
-rw-r--r--linux/drivers/usb/media/em2820-video.c10
-rw-r--r--linux/drivers/usb/media/em2820.h12
-rw-r--r--linux/include/linux/videodev.h6
-rw-r--r--linux/include/linux/videodev2.h118
-rw-r--r--linux/include/media/audiochip.h16
-rw-r--r--linux/include/media/i2c-compat.h4
-rw-r--r--linux/include/media/saa6752hs.h2
-rw-r--r--linux/include/media/tuner.h10
-rw-r--r--linux/include/media/video-buf.h4
-rw-r--r--linux/sound/pci/bt87x.c6
-rw-r--r--v4l/ChangeLog149
-rw-r--r--v4l/i2c-compat.h4
-rw-r--r--v4l/scripts/strip-trailing-whitespaces.sh17
86 files changed, 2274 insertions, 2109 deletions
diff --git a/Makefile b/Makefile
index 64fef441d..5e1ffce2e 100644
--- a/Makefile
+++ b/Makefile
@@ -23,4 +23,5 @@ changelog:: whitespace
$(EDITOR) v4l/ChangeLog
whitespace:
- @v4l/scripts/strip-trailing-whitespaces.sh | patch -p0 \ No newline at end of file
+ @v4l/scripts/strip-trailing-whitespaces.sh | patch -p0
+
diff --git a/linux/Documentation/video4linux/README.cx88 b/linux/Documentation/video4linux/README.cx88
index 0b93455bb..06a33a4f5 100644
--- a/linux/Documentation/video4linux/README.cx88
+++ b/linux/Documentation/video4linux/README.cx88
@@ -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.
diff --git a/linux/Documentation/video4linux/bttv/Cards b/linux/Documentation/video4linux/bttv/Cards
index 8f1941ede..d3389655a 100644
--- a/linux/Documentation/video4linux/bttv/Cards
+++ b/linux/Documentation/video4linux/bttv/Cards
@@ -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)
diff --git a/linux/Documentation/video4linux/bttv/README b/linux/Documentation/video4linux/bttv/README
index a72f4c94f..7ca2154c2 100644
--- a/linux/Documentation/video4linux/bttv/README
+++ b/linux/Documentation/video4linux/bttv/README
@@ -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
diff --git a/linux/Documentation/video4linux/bttv/Sound-FAQ b/linux/Documentation/video4linux/bttv/Sound-FAQ
index 5c9822492..1e6328f91 100644
--- a/linux/Documentation/video4linux/bttv/Sound-FAQ
+++ b/linux/Documentation/video4linux/bttv/Sound-FAQ
@@ -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
diff --git a/linux/Documentation/video4linux/lifeview.txt b/linux/Documentation/video4linux/lifeview.txt
index b07ea79c2..f66320bd7 100644
--- a/linux/Documentation/video4linux/lifeview.txt
+++ b/linux/Documentation/video4linux/lifeview.txt
@@ -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 */
diff --git a/linux/drivers/media/common/ir-common.c b/linux/drivers/media/common/ir-common.c
index d1b17168b..c52d1bfc7 100644
--- a/linux/drivers/media/common/ir-common.c
+++ b/linux/drivers/media/common/ir-common.c
@@ -1,5 +1,5 @@
/*
- * $Id: ir-common.c,v 1.14 2005/08/10 15:16:31 mkrufky Exp $
+ * $Id: ir-common.c,v 1.15 2005/10/16 12:13:58 mchehab Exp $
*
* some common structs and functions to handle infrared remotes via
* input layer ...
@@ -162,7 +162,7 @@ IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = {
#if 0
// [ 42 ] = picture in picture
#endif
- [ 33 ] = KEY_KPDOT,
+ [ 33 ] = KEY_KPDOT,
[ 19 ] = KEY_KPENTER,
#if 0
// [ 17 ] = recall
@@ -294,7 +294,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);
}
/* -------------------------------------------------------------------------- */
@@ -308,7 +308,7 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
if (ir_codes)
memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes));
- init_input_dev(dev);
+ init_input_dev(dev);
dev->keycode = ir->ir_codes;
dev->keycodesize = sizeof(IR_KEYTAB_TYPE);
dev->keycodemax = IR_KEYTAB_SIZE;
diff --git a/linux/drivers/media/video/bt832.c b/linux/drivers/media/video/bt832.c
index a10e3136f..85f2e588a 100644
--- a/linux/drivers/media/video/bt832.c
+++ b/linux/drivers/media/video/bt832.c
@@ -60,36 +60,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;
}
@@ -108,13 +108,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:
@@ -122,17 +122,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
@@ -140,19 +140,19 @@ 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);
#if 0
// Full 30/25 Frame rate
printk("Full 30/25 Frame rate\n");
buf[0]=BT832_VP_CONTROL0; // Reg.39
- buf[1]= 0x00;
- if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
- printk("bt832: i2c i/o error FFR: rc == %d (should be 2)\n",rc);
+ buf[1]= 0x00;
+ if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
+ printk("bt832: i2c i/o error FFR: rc == %d (should be 2)\n",rc);
- bt832_hexdump(i2c_client_s,buf);
+ bt832_hexdump(i2c_client_s,buf);
#endif
#if 1
@@ -160,14 +160,14 @@ int bt832_init(struct i2c_client *i2c_client_s)
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);
#endif
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;
}
@@ -185,17 +185,17 @@ static int bt832_attach(struct i2c_adapter *adap, int addr,
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 LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
@@ -240,7 +240,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);
diff --git a/linux/drivers/media/video/bt832.h b/linux/drivers/media/video/bt832.h
index 9b6a8d2c9..1ce8fa71f 100644
--- a/linux/drivers/media/video/bt832.h
+++ b/linux/drivers/media/video/bt832.h
@@ -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
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c
index 5319bb32d..c19b531e1 100644
--- a/linux/drivers/media/video/bttv-cards.c
+++ b/linux/drivers/media/video/bttv-cards.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-cards.c,v 1.93 2005/10/16 06:12:08 nsh Exp $
+ $Id: bttv-cards.c,v 1.94 2005/10/16 12:13:58 mchehab Exp $
bttv-cards.c
@@ -7,7 +7,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
@@ -185,10 +185,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 ... */
@@ -299,7 +299,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" },
@@ -1368,17 +1368,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,
@@ -2917,7 +2917,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;
@@ -2951,7 +2951,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;
@@ -2967,7 +2967,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) */
/*
@@ -3004,7 +3004,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) {
@@ -3124,7 +3124,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]);
}
@@ -3192,10 +3192,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);
@@ -3223,7 +3223,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);
@@ -3256,7 +3256,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:
@@ -3289,7 +3289,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;
@@ -3308,7 +3308,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);
@@ -3329,7 +3329,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;
@@ -3340,26 +3340,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) */
@@ -3371,7 +3371,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);
@@ -3379,14 +3379,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);
}
@@ -3464,11 +3464,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]);
@@ -3533,7 +3533,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);
@@ -3569,7 +3569,7 @@ 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;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
@@ -3580,12 +3580,12 @@ static int __devinit pvr_boot(struct bttv *btv)
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;
}
@@ -3599,33 +3599,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 */
@@ -3641,7 +3641,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;
@@ -3697,35 +3697,35 @@ 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 };
#if 0
int tuner_0_fm_table[] = {
- PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL,
- PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL,
- PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL,
- PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM,
- PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL};
+ PHILIPS_FR1236_NTSC, PHILIPS_FR1216_PAL,
+ PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL,
+ PHILIPS_FR1216_PAL, PHILIPS_FR1216_PAL,
+ PHILIPS_FR1236_SECAM, PHILIPS_FR1236_SECAM,
+ PHILIPS_FR1236_SECAM, PHILIPS_FR1216_PAL};
#endif
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)
@@ -3761,8 +3761,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 */
@@ -3784,7 +3784,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)
@@ -3890,7 +3890,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
@@ -4343,30 +4343,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 */
@@ -4499,26 +4499,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;
+ }
}
/*
@@ -4761,10 +4761,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]);
}
@@ -4869,10 +4869,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*/
@@ -4902,14 +4902,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);
@@ -4922,7 +4922,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);
@@ -4978,7 +4978,7 @@ void __devinit bttv_check_chipset(void)
while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82441, dev))) {
#endif
- unsigned char b;
+ unsigned char b;
pci_read_config_byte(dev, 0x53, &b);
if (bttv_debug)
printk(KERN_INFO "bttv: Host bridge: 82441FX Natoma, "
@@ -4988,7 +4988,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;
@@ -5009,13 +5009,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;
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index 353eec005..dcdcd4ebf 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,10 +1,10 @@
/*
- $Id: bttv-driver.c,v 1.63 2005/10/16 03:23:33 mchehab Exp $
+ $Id: bttv-driver.c,v 1.64 2005/10/16 12:13:58 mchehab Exp $
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
@@ -204,8 +204,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",
@@ -741,71 +741,71 @@ void free_btres(struct bttv *btv, struct bttv_fh *fh, int bits)
static void set_pll_freq(struct bttv *btv, unsigned int fin, unsigned int fout)
{
- unsigned char fl, fh, fi;
+ unsigned char fl, fh, fi;
- /* prevent overflows */
- fin/=4;
- fout/=4;
+ /* prevent overflows */
+ fin/=4;
+ fout/=4;
- fout*=12;
- fi=fout/fin;
+ fout*=12;
+ fi=fout/fin;
- fout=(fout%fin)*256;
- fh=fout/fin;
+ fout=(fout%fin)*256;
+ fh=fout/fin;
- fout=(fout%fin)*256;
- fl=fout/fin;
+ fout=(fout%fin)*256;
+ fl=fout/fin;
- btwrite(fl, BT848_PLL_F_LO);
- btwrite(fh, BT848_PLL_F_HI);
- btwrite(fi|BT848_PLL_X, BT848_PLL_XCI);
+ btwrite(fl, BT848_PLL_F_LO);
+ btwrite(fh, BT848_PLL_F_HI);
+ btwrite(fi|BT848_PLL_X, BT848_PLL_XCI);
}
static void set_pll(struct bttv *btv)
{
- int i;
+ int i;
- if (!btv->pll.pll_crystal)
- return;
+ if (!btv->pll.pll_crystal)
+ return;
if (btv->pll.pll_ofreq == btv->pll.pll_current) {
dprintk("bttv%d: PLL: no change required\n",btv->c.nr);
- return;
- }
+ return;
+ }
- if (btv->pll.pll_ifreq == btv->pll.pll_ofreq) {
- /* no PLL needed */
- if (btv->pll.pll_current == 0)
- return;
+ if (btv->pll.pll_ifreq == btv->pll.pll_ofreq) {
+ /* no PLL needed */
+ if (btv->pll.pll_current == 0)
+ return;
verbose_printk(KERN_INFO "bttv%d: PLL can sleep, using XTAL (%d).\n",
btv->c.nr,btv->pll.pll_ifreq);
- btwrite(0x00,BT848_TGCTRL);
- btwrite(0x00,BT848_PLL_XCI);
- btv->pll.pll_current = 0;
- return;
- }
+ btwrite(0x00,BT848_TGCTRL);
+ btwrite(0x00,BT848_PLL_XCI);
+ btv->pll.pll_current = 0;
+ return;
+ }
verbose_printk(KERN_INFO "bttv%d: PLL: %d => %d ",btv->c.nr,
btv->pll.pll_ifreq, btv->pll.pll_ofreq);
set_pll_freq(btv, btv->pll.pll_ifreq, btv->pll.pll_ofreq);
- for (i=0; i<10; i++) {
+ for (i=0; i<10; i++) {
/* Let other people run while the PLL stabilizes */
verbose_printk(".");
msleep(10);
- if (btread(BT848_DSTATUS) & BT848_DSTATUS_PLOCK) {
+ if (btread(BT848_DSTATUS) & BT848_DSTATUS_PLOCK) {
btwrite(0,BT848_DSTATUS);
- } else {
- btwrite(0x08,BT848_TGCTRL);
- btv->pll.pll_current = btv->pll.pll_ofreq;
+ } else {
+ btwrite(0x08,BT848_TGCTRL);
+ btv->pll.pll_current = btv->pll.pll_ofreq;
verbose_printk(" ok\n");
- return;
- }
- }
- btv->pll.pll_current = -1;
+ return;
+ }
+ }
+ btv->pll.pll_current = -1;
verbose_printk("failed\n");
- return;
+ return;
}
/* used to switch between the bt848's analog/digital video capture modes */
@@ -820,9 +820,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++)
@@ -861,7 +861,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)
@@ -873,9 +873,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)
@@ -887,12 +887,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);
}
/* ----------------------------------------------------------------------- */
@@ -905,7 +905,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);
@@ -1079,22 +1079,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);
@@ -1113,7 +1113,7 @@ static void init_bt848(struct bttv *btv)
bt848_contrast(btv, btv->contrast);
bt848_sat(btv, btv->saturation);
- /* interrupt */
+ /* interrupt */
init_irqreg(btv);
}
@@ -1129,7 +1129,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);
}
@@ -1422,7 +1422,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)
{
@@ -1545,8 +1545,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:
@@ -1600,32 +1600,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)
@@ -1647,7 +1647,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;
@@ -1752,7 +1752,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);
@@ -2193,7 +2193,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);
@@ -2231,9 +2231,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:
@@ -2249,10 +2249,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;
@@ -2272,7 +2272,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:
@@ -2321,7 +2321,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:
@@ -2382,8 +2382,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);
@@ -2457,7 +2457,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;
}
@@ -2596,13 +2596,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);
@@ -2614,8 +2614,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 =
@@ -3123,7 +3123,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,
@@ -3169,7 +3169,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)
@@ -3192,34 +3192,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);
@@ -3725,7 +3725,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);
@@ -3739,13 +3739,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)
@@ -3772,7 +3772,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);
@@ -3856,7 +3856,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;
@@ -3868,18 +3868,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;
@@ -3900,11 +3900,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
}
@@ -3918,21 +3918,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);
@@ -3954,30 +3954,30 @@ static int __devinit bttv_probe(struct pci_dev *dev,
return -EIO;
}
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,7)
- if (pci_set_dma_mask(dev, 0xffffffff)) {
+ if (pci_set_dma_mask(dev, 0xffffffff)) {
#else
- if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
+ if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
#endif
- printk(KERN_WARNING "bttv%d: No suitable DMA available.\n",
+ 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();
@@ -3988,23 +3988,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;
@@ -4030,29 +4030,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);
@@ -4073,10 +4073,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)
@@ -4089,12 +4089,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);
@@ -4109,7 +4109,7 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev)
bttv_sub_del_devices(&btv->c);
#endif
- /* unregister i2c_bus + input */
+ /* unregister i2c_bus + input */
fini_bttv_i2c(btv);
/* unregister video4linux */
@@ -4119,18 +4119,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;
@@ -4173,7 +4173,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;
@@ -4222,24 +4222,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,
};
diff --git a/linux/drivers/media/video/bttv-gpio.c b/linux/drivers/media/video/bttv-gpio.c
index 77320cdf2..f13bdb000 100644
--- a/linux/drivers/media/video/bttv-gpio.c
+++ b/linux/drivers/media/video/bttv-gpio.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-gpio.c,v 1.7 2005/02/16 12:14:10 kraxel Exp $
+ $Id: bttv-gpio.c,v 1.8 2005/10/16 12:13:58 mchehab Exp $
bttv-gpio.c -- gpio sub drivers
@@ -8,7 +8,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
diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c
index 937f02e42..f251ab339 100644
--- a/linux/drivers/media/video/bttv-i2c.c
+++ b/linux/drivers/media/video/bttv-i2c.c
@@ -1,12 +1,12 @@
/*
- $Id: bttv-i2c.c,v 1.28 2005/10/09 18:07:06 mchehab Exp $
+ $Id: bttv-i2c.c,v 1.29 2005/10/16 12:13:58 mchehab Exp $
bttv-i2c.c -- all the i2c code is here
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
@@ -242,7 +242,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)
@@ -297,7 +297,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",
@@ -307,9 +307,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;
@@ -319,7 +319,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)
@@ -337,43 +337,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 */
@@ -440,8 +440,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)
diff --git a/linux/drivers/media/video/bttv-if.c b/linux/drivers/media/video/bttv-if.c
index a71afec52..d264e0e53 100644
--- a/linux/drivers/media/video/bttv-if.c
+++ b/linux/drivers/media/video/bttv-if.c
@@ -1,14 +1,14 @@
/*
- $Id: bttv-if.c,v 1.4 2004/11/17 18:47:47 kraxel Exp $
+ $Id: bttv-if.c,v 1.5 2005/10/16 12:13:58 mchehab Exp $
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
diff --git a/linux/drivers/media/video/bttv-risc.c b/linux/drivers/media/video/bttv-risc.c
index bdc5ce6c4..aa0178bae 100644
--- a/linux/drivers/media/video/bttv-risc.c
+++ b/linux/drivers/media/video/bttv-risc.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-risc.c,v 1.10 2004/11/19 18:07:12 kraxel Exp $
+ $Id: bttv-risc.c,v 1.11 2005/10/16 12:13:58 mchehab Exp $
bttv-risc.c -- interfaces to other kernel modules
@@ -75,27 +75,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;
@@ -202,8 +202,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;
@@ -320,7 +320,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;
@@ -339,52 +339,52 @@ bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
vdelay = btv->vbi.lines*2;
#endif
- 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);
}
/* ---------------------------------------------------------- */
@@ -425,7 +425,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) {
@@ -437,7 +437,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;
@@ -465,19 +465,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;
}
diff --git a/linux/drivers/media/video/bttv.h b/linux/drivers/media/video/bttv.h
index 616814cd3..537912ac2 100644
--- a/linux/drivers/media/video/bttv.h
+++ b/linux/drivers/media/video/bttv.h
@@ -1,5 +1,5 @@
/*
- * $Id: bttv.h,v 1.31 2005/10/15 12:14:22 nsh Exp $
+ * $Id: bttv.h,v 1.32 2005/10/16 12:13:58 mchehab Exp $
*
* bttv - Bt848 frame grabber driver
*
@@ -204,7 +204,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 */
};
@@ -213,16 +213,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;
diff --git a/linux/drivers/media/video/bttvp.h b/linux/drivers/media/video/bttvp.h
index d2057a58d..1b1502ff0 100644
--- a/linux/drivers/media/video/bttvp.h
+++ b/linux/drivers/media/video/bttvp.h
@@ -1,5 +1,5 @@
/*
- $Id: bttvp.h,v 1.23 2005/10/09 18:07:06 mchehab Exp $
+ $Id: bttvp.h,v 1.24 2005/10/16 12:13:58 mchehab Exp $
bttv - Bt848 frame grabber driver
@@ -86,14 +86,14 @@
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;
};
@@ -281,8 +281,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;
@@ -315,9 +315,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
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index d962856c6..39bbcacc5 100644
--- a/linux/drivers/media/video/cx88/cx88-alsa.c
+++ b/linux/drivers/media/video/cx88/cx88-alsa.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-alsa.c,v 1.8 2005/08/15 23:44:23 mchehab Exp $
+ * $Id: cx88-alsa.c,v 1.9 2005/10/16 12:13:58 mchehab Exp $
*
* Support for audio capture
* PCI function #1 of the cx2388x.
@@ -63,7 +63,7 @@ enum { DEVICE_DIGITAL, DEVICE_ANALOG };
struct cx88_audio_dev {
struct cx88_core *core;
- struct cx88_buffer *buf;
+ struct cx88_buffer *buf;
struct cx88_dmaqueue q;
/* pci i/o */
@@ -707,7 +707,7 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci,
*rchip = NULL;
- err = pci_enable_device(pci);
+ err = pci_enable_device(pci);
if (err < 0)
return err;
@@ -781,9 +781,9 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci,
/* print pci info */
pci_read_config_byte(pci, PCI_CLASS_REVISION, &chip->pci_rev);
- pci_read_config_byte(pci, PCI_LATENCY_TIMER, &chip->pci_lat);
+ pci_read_config_byte(pci, PCI_LATENCY_TIMER, &chip->pci_lat);
- dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, "
+ dprintk(1,"ALSA %s/%i: found at %s, rev: %d, irq: %d, "
"latency: %d, mmio: 0x%lx\n", core->name, devno,
pci_name(pci), chip->pci_rev, pci->irq,
chip->pci_lat,pci_resource_start(pci,0));
@@ -877,10 +877,10 @@ static void __devexit cx88_audio_finidev(struct pci_dev *pci)
*/
static struct pci_driver cx88_audio_pci_driver = {
- .name = "cx88_audio",
- .id_table = cx88_audio_pci_tbl,
- .probe = cx88_audio_initdev,
- .remove = cx88_audio_finidev,
+ .name = "cx88_audio",
+ .id_table = cx88_audio_pci_tbl,
+ .probe = cx88_audio_initdev,
+ .remove = cx88_audio_finidev,
SND_PCI_PM_CALLBACKS
};
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index 6f41172ef..5b915503a 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-blackbird.c,v 1.37 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: cx88-blackbird.c,v 1.38 2005/10/16 12:13:58 mchehab Exp $
*
* Support for a cx23416 mpeg encoder via cx2388x host port.
* "blackbird" reference design.
@@ -442,7 +442,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) */
@@ -611,11 +611,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");
@@ -670,13 +670,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");
@@ -889,7 +889,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;
@@ -955,7 +955,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 ) )
@@ -1081,7 +1081,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;
@@ -1163,7 +1163,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 );
@@ -1767,7 +1767,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);
@@ -1783,8 +1783,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 --- */
}
@@ -1792,10 +1792,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,
};
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index 662cf9f79..b490bff61 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-cards.c,v 1.100 2005/10/15 13:13:41 nsh Exp $
+ * $Id: cx88-cards.c,v 1.101 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for Conexant 2388x based TV cards
* card-specific stuff.
@@ -128,27 +128,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,
@@ -167,15 +167,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,
@@ -216,32 +216,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,
@@ -262,14 +262,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",
@@ -298,25 +298,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,
@@ -350,15 +350,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] = {
@@ -374,34 +374,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] = {
@@ -427,27 +427,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",
@@ -491,28 +491,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] = {
@@ -545,12 +545,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,
@@ -707,44 +707,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] = {
@@ -764,18 +764,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] = {
@@ -807,23 +807,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",
@@ -897,26 +897,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,
@@ -925,13 +925,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,
@@ -948,15 +948,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,
@@ -965,9 +965,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 */
@@ -992,23 +992,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,
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index 525876cb1..cfe681807 100644
--- a/linux/drivers/media/video/cx88/cx88-core.c
+++ b/linux/drivers/media/video/cx88/cx88-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-core.c,v 1.44 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: cx88-core.c,v 1.45 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for Conexant 2388x based TV cards
* driver core
@@ -166,26 +166,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;
}
@@ -322,7 +322,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,
@@ -334,7 +334,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,
@@ -346,7 +346,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,
@@ -358,7 +358,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,
@@ -370,7 +370,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,
@@ -382,7 +382,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,
@@ -1178,7 +1178,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);
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c
index 226008beb..9923fccce 100644
--- a/linux/drivers/media/video/cx88/cx88-dvb.c
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-dvb.c,v 1.68 2005/10/11 05:20:47 mkrufky Exp $
+ * $Id: cx88-dvb.c,v 1.69 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for Conexant 2388x based TV cards
* MPEG Transport Stream (DVB) routines
@@ -130,7 +130,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 };
@@ -467,7 +467,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);
@@ -482,8 +482,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 --- */
}
@@ -491,10 +491,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,
};
diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c
index 41cb1012f..19d362050 100644
--- a/linux/drivers/media/video/cx88/cx88-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-i2c.c
@@ -1,10 +1,10 @@
/*
- $Id: cx88-i2c.c,v 1.32 2005/10/09 18:07:06 mchehab Exp $
+ $Id: cx88-i2c.c,v 1.33 2005/10/16 12:13:58 mchehab Exp $
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>
@@ -95,7 +95,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",
@@ -103,7 +103,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;
@@ -111,8 +111,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;
@@ -121,7 +121,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);
@@ -166,7 +166,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] = {
@@ -215,10 +215,10 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci)
core->i2c_adap.dev.parent = &pci->dev;
#endif
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);
diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c
index 522ba3f45..f026d83c3 100644
--- a/linux/drivers/media/video/cx88/cx88-input.c
+++ b/linux/drivers/media/video/cx88/cx88-input.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-input.c,v 1.21 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: cx88-input.c,v 1.22 2005/10/16 12:13:58 mchehab Exp $
*
* Device driver for GPIO attached remote control interfaces
* on Conexant 2388x based TV/DVB cards.
@@ -549,7 +549,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 */
diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c
index 1edca28f4..6a9bd8969 100644
--- a/linux/drivers/media/video/cx88/cx88-mpeg.c
+++ b/linux/drivers/media/video/cx88/cx88-mpeg.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-mpeg.c,v 1.39 2005/09/06 21:58:43 catalin Exp $
+ * $Id: cx88-mpeg.c,v 1.40 2005/10/16 12:13:58 mchehab Exp $
*
* Support for the mpeg transport stream transfers
* PCI function #2 of the cx2388x.
@@ -336,14 +336,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
@@ -399,8 +399,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));
@@ -454,7 +454,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 */
diff --git a/linux/drivers/media/video/cx88/cx88-reg.h b/linux/drivers/media/video/cx88/cx88-reg.h
index f02dff37b..10eff3e6d 100644
--- a/linux/drivers/media/video/cx88/cx88-reg.h
+++ b/linux/drivers/media/video/cx88/cx88-reg.h
@@ -1,12 +1,12 @@
/*
- $Id: cx88-reg.h,v 1.9 2005/08/17 09:56:30 mchehab Exp $
+ $Id: cx88-reg.h,v 1.10 2005/10/16 12:13:58 mchehab Exp $
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
@@ -736,13 +736,13 @@
#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
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 2e4840e56..23ac5967e 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.96 2005/10/10 22:07:19 mchehab Exp $
+ * $Id: cx88-video.c,v 1.97 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -122,7 +122,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,
@@ -492,7 +492,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);
@@ -508,7 +508,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,8 +783,8 @@ static int ov_risc_frame(struct cx8800_dev *dev, struct cx8800_fh *fh,
if (V4L2_FIELD_HAS_BOTTOM(fh->win.field))
fields++;
- /* estimate risc mem: worst case is (clip+1) * lines instructions
- + syncs + jump (all 2 dwords) */
+ /* estimate risc mem: worst case is (clip+1) * lines instructions
+ + syncs + jump (all 2 dwords) */
instructions = (fh->nclips+1) * fh->win.w.height;
instructions += 3 + 4;
if ((rc = btcx_riscmem_alloc(dev->pci,&buf->risc,instructions*8)) < 0) {
@@ -832,20 +832,20 @@ static int verify_window(struct cx8800_dev *dev, struct v4l2_window *win)
maxh = norm_maxh(core->tvnorm);
if (V4L2_FIELD_ANY == field) {
- field = (win->w.height > maxh/2)
- ? V4L2_FIELD_INTERLACED
- : V4L2_FIELD_TOP;
- }
- switch (field) {
- case V4L2_FIELD_TOP:
- case V4L2_FIELD_BOTTOM:
- maxh = maxh / 2;
- break;
- case V4L2_FIELD_INTERLACED:
- break;
- default:
- return -EINVAL;
- }
+ field = (win->w.height > maxh/2)
+ ? V4L2_FIELD_INTERLACED
+ : V4L2_FIELD_TOP;
+ }
+ switch (field) {
+ case V4L2_FIELD_TOP:
+ case V4L2_FIELD_BOTTOM:
+ maxh = maxh / 2;
+ break;
+ case V4L2_FIELD_INTERLACED:
+ break;
+ default:
+ return -EINVAL;
+ }
win->field = field;
if (win->w.width > maxw)
@@ -1030,7 +1030,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
@@ -1169,7 +1169,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;
@@ -1509,7 +1509,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;
@@ -1686,7 +1686,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:
@@ -1773,7 +1773,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));
@@ -2114,8 +2114,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));
@@ -2225,7 +2225,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
#else
/*FIXME: Not sure if this will work */
if (core->tuner_type != TUNER_ABSENT)
- kernel_thread (cx88_audio_thread, core, 0);
+ kernel_thread (cx88_audio_thread, core, 0);
core->kthread = NULL;
#endif
@@ -2243,7 +2243,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 */
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index 034c97419..649c8b117 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -1,5 +1,5 @@
/*
- * $Id: cx88.h,v 1.86 2005/10/11 20:11:34 mkrufky Exp $
+ * $Id: cx88.h,v 1.87 2005/10/16 12:13:58 mchehab Exp $
*
* v4l2 device driver for cx2388x based TV cards
*
@@ -269,8 +269,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;
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index 1d733a980..c079c418f 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -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>
diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c
index eb75151a8..986c6babf 100644
--- a/linux/drivers/media/video/em28xx/em28xx-core.c
+++ b/linux/drivers/media/video/em28xx/em28xx-core.c
@@ -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>
@@ -38,27 +38,27 @@ 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;
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;
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);
diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c
index f43053c45..cdf18ec47 100644
--- a/linux/drivers/media/video/em28xx/em28xx-i2c.c
+++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c
@@ -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>
diff --git a/linux/drivers/media/video/em28xx/em28xx-input.c b/linux/drivers/media/video/em28xx/em28xx-input.c
index e809a0028..4d3669f79 100644
--- a/linux/drivers/media/video/em28xx/em28xx-input.c
+++ b/linux/drivers/media/video/em28xx/em28xx-input.c
@@ -1,5 +1,5 @@
/*
- * $Id: em28xx-input.c,v 1.4 2005/10/15 09:20:35 nsh Exp $
+ * $Id: em28xx-input.c,v 1.5 2005/10/16 12:13:58 mchehab Exp $
*
* handle saa7134 IR remotes via linux kernel input layer.
*
@@ -45,34 +45,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,
};
/* ----------------------------------------------------------------------- */
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index 6e745d99b..4323e6b26 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -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);
diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h
index 9e2ac13fe..d666d37ec 100644
--- a/linux/drivers/media/video/em28xx/em28xx.h
+++ b/linux/drivers/media/video/em28xx/em28xx.h
@@ -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>
@@ -391,17 +391,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)
diff --git a/linux/drivers/media/video/ir-kbd-gpio.c b/linux/drivers/media/video/ir-kbd-gpio.c
index f136d9df8..fe002ca68 100644
--- a/linux/drivers/media/video/ir-kbd-gpio.c
+++ b/linux/drivers/media/video/ir-kbd-gpio.c
@@ -1,5 +1,5 @@
/*
- * $Id: ir-kbd-gpio.c,v 1.20 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: ir-kbd-gpio.c,v 1.21 2005/10/16 12:13:58 mchehab Exp $
*
* Copyright (c) 2003 Gerd Knorr
* Copyright (c) 2003 Pavel Machek
@@ -365,14 +365,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;
diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c
index f29525597..d8d5c0688 100644
--- a/linux/drivers/media/video/ir-kbd-i2c.c
+++ b/linux/drivers/media/video/ir-kbd-i2c.c
@@ -1,5 +1,5 @@
/*
- * $Id: ir-kbd-i2c.c,v 1.21 2005/10/14 21:29:04 mrechberger Exp $
+ * $Id: ir-kbd-i2c.c,v 1.22 2005/10/16 12:13:58 mchehab Exp $
*
* keyboard input driver for i2c IR remote controls
*
@@ -175,7 +175,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)) {
@@ -189,7 +189,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)) {
@@ -237,7 +237,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)) {
@@ -299,17 +299,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,
@@ -318,10 +318,10 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
IR_KEYTAB_TYPE *ir_codes = NULL;
char *name;
int ir_type;
- struct IR_i2c *ir;
+ struct IR_i2c *ir;
- if (NULL == (ir = kmalloc(sizeof(struct IR_i2c),GFP_KERNEL)))
- return -ENOMEM;
+ if (NULL == (ir = kmalloc(sizeof(struct IR_i2c),GFP_KERNEL)))
+ return -ENOMEM;
memset(ir,0,sizeof(*ir));
ir->c = client_template;
@@ -407,7 +407,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);
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 7081a88e8..1f9ba22eb 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -205,7 +205,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;
}
@@ -213,16 +213,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))
@@ -249,13 +249,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);
@@ -839,7 +839,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)
@@ -1564,21 +1564,21 @@ static int msp_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
#endif
{
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;
@@ -1681,7 +1681,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
}
/* done */
- i2c_attach_client(c);
+ i2c_attach_client(c);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
@@ -1812,7 +1812,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) {
@@ -2044,7 +2044,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;
}
@@ -2080,7 +2080,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;
diff --git a/linux/drivers/media/video/msp3400.c b/linux/drivers/media/video/msp3400.c
index 7081a88e8..1f9ba22eb 100644
--- a/linux/drivers/media/video/msp3400.c
+++ b/linux/drivers/media/video/msp3400.c
@@ -205,7 +205,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;
}
@@ -213,16 +213,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))
@@ -249,13 +249,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);
@@ -839,7 +839,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)
@@ -1564,21 +1564,21 @@ static int msp_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
#endif
{
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;
@@ -1681,7 +1681,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, unsigned short flags,
}
/* done */
- i2c_attach_client(c);
+ i2c_attach_client(c);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
@@ -1812,7 +1812,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) {
@@ -2044,7 +2044,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;
}
@@ -2080,7 +2080,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;
diff --git a/linux/drivers/media/video/mt20xx.c b/linux/drivers/media/video/mt20xx.c
index 51387cb4f..1b00ad329 100644
--- a/linux/drivers/media/video/mt20xx.c
+++ b/linux/drivers/media/video/mt20xx.c
@@ -1,5 +1,5 @@
/*
- * $Id: mt20xx.c,v 1.7 2005/08/17 19:42:11 nsh Exp $
+ * $Id: mt20xx.c,v 1.8 2005/10/16 12:13:58 mchehab Exp $
*
* i2c tv tuner chip device driver
* controls microtune tuners, mt2032 + mt2050 at the moment.
@@ -78,17 +78,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;
@@ -98,34 +98,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)
@@ -137,10 +137,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
@@ -170,7 +170,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)
@@ -204,7 +204,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;
}
@@ -221,23 +221,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.
@@ -255,7 +255,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");
@@ -286,7 +286,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);
}
@@ -296,7 +296,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);
}
@@ -304,57 +304,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);
- 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)
+ 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)
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)
@@ -428,7 +428,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);
}
@@ -439,11 +439,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;
@@ -489,7 +489,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));
@@ -498,17 +498,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]);
@@ -543,8 +543,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);
diff --git a/linux/drivers/media/video/saa6752hs.c b/linux/drivers/media/video/saa6752hs.c
index 819721c75..31a9ab494 100644
--- a/linux/drivers/media/video/saa6752hs.c
+++ b/linux/drivers/media/video/saa6752hs.c
@@ -180,31 +180,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;
@@ -212,13 +212,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))
@@ -234,14 +234,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;
@@ -253,31 +253,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;
@@ -397,8 +397,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;
@@ -437,9 +437,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);
@@ -464,7 +464,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;
@@ -478,7 +478,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 */
@@ -525,10 +525,10 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short f
{
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;
@@ -539,7 +539,7 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short f
h->standard = 0;
i2c_set_clientdata(&h->client, h);
- i2c_attach_client(&h->client);
+ i2c_attach_client(&h->client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
@@ -575,7 +575,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 */
@@ -589,7 +589,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;
diff --git a/linux/drivers/media/video/saa7113.c b/linux/drivers/media/video/saa7113.c
index b7f9ab4a5..5045af7e6 100644
--- a/linux/drivers/media/video/saa7113.c
+++ b/linux/drivers/media/video/saa7113.c
@@ -465,8 +465,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
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
diff --git a/linux/drivers/media/video/saa711x.c b/linux/drivers/media/video/saa711x.c
index b7f9ab4a5..5045af7e6 100644
--- a/linux/drivers/media/video/saa711x.c
+++ b/linux/drivers/media/video/saa711x.c
@@ -465,8 +465,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
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index 819721c75..31a9ab494 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -180,31 +180,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;
@@ -212,13 +212,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))
@@ -234,14 +234,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;
@@ -253,31 +253,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;
@@ -397,8 +397,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;
@@ -437,9 +437,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);
@@ -464,7 +464,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;
@@ -478,7 +478,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 */
@@ -525,10 +525,10 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short f
{
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;
@@ -539,7 +539,7 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short f
h->standard = 0;
i2c_set_clientdata(&h->client, h);
- i2c_attach_client(&h->client);
+ i2c_attach_client(&h->client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
@@ -575,7 +575,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 */
@@ -589,7 +589,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;
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c
index bb7eccc72..2c86cb686 100644
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c
@@ -2,7 +2,7 @@
* SAA713x ALSA support for V4L
* Ricardo Cerqueira <v4l@cerqueira.org>
*
- * $Id: saa7134-alsa.c,v 1.6 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: saa7134-alsa.c,v 1.7 2005/10/16 12:13:58 mchehab Exp $
*
* Caveats:
* - Volume doesn't work (it's always at max)
@@ -74,7 +74,7 @@ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 0};
#define dprintk(fmt, arg...) if (alsa_debug) \
- printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg)
+ printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg)
/*
@@ -86,11 +86,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;
@@ -100,7 +100,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 */
@@ -124,9 +124,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);
}
/*
@@ -141,9 +141,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);
}
/*
@@ -190,13 +190,13 @@ 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);
#if 0
/* Show the registers */
@@ -211,19 +211,19 @@ void saa7134_irq_alsa_done(struct saa7134_dev *dev, unsigned long status)
}
#endif
- /* 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);
}
@@ -257,23 +257,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;
}
/*
@@ -289,16 +289,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;
}
/*
@@ -316,18 +316,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;
@@ -342,123 +342,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;
}
@@ -483,10 +483,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);
@@ -498,9 +498,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,
@@ -568,16 +568,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;
}
/*
@@ -592,21 +592,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;
}
/*
@@ -623,18 +623,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)
@@ -648,8 +648,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;
}
@@ -741,7 +741,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);
@@ -782,7 +782,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;
@@ -793,7 +793,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;
@@ -801,57 +801,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;
}
@@ -896,8 +896,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);
}
/*
@@ -914,12 +914,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;
@@ -936,24 +936,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;
@@ -961,15 +961,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;
@@ -984,9 +984,9 @@ __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]);
}
}
#endif /* LINUX_VERSION_CODE */
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index 7422c493d..0631da415 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-cards.c,v 1.102 2005/10/15 14:16:10 nsh Exp $
+ * $Id: saa7134-cards.c,v 1.103 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
@@ -2116,16 +2116,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,
@@ -2133,60 +2133,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,
@@ -2253,78 +2253,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,
@@ -2762,55 +2762,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,
@@ -3090,7 +3090,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};
@@ -3102,7 +3102,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;
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 80350ccc8..b61799153 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-core.c,v 1.45 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: saa7134-core.c,v 1.46 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* driver core
@@ -267,10 +267,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;
}
@@ -345,8 +345,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)
@@ -506,7 +506,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) */
@@ -716,7 +716,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");
@@ -774,7 +774,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 |
@@ -961,8 +961,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));
@@ -986,7 +986,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 ?
@@ -1036,12 +1036,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);
@@ -1150,7 +1150,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;
@@ -1248,10 +1248,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)
diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c
index 076225b44..6ca9214ba 100644
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-dvb.c,v 1.28 2005/09/21 00:56:30 mkrufky Exp $
+ * $Id: saa7134-dvb.c,v 1.29 2005/10/16 12:13:58 mchehab Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -549,7 +549,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) {
@@ -608,7 +608,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);
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c
index aa5936b5a..69da5181a 100644
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-empress.c,v 1.13 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: saa7134-empress.c,v 1.14 2005/10/16 12:13:58 mchehab Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -65,7 +65,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;
}
@@ -75,7 +75,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;
}
/* ------------------------------------------------------------------ */
@@ -179,7 +179,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));
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c
index dd4c3b60e..0c5407f35 100644
--- a/linux/drivers/media/video/saa7134/saa7134-i2c.c
+++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-i2c.c,v 1.25 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: saa7134-i2c.c,v 1.26 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* i2c interface support
@@ -246,7 +246,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;
@@ -303,7 +303,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 */
@@ -355,12 +355,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)) {
@@ -368,11 +368,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 = {
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index 4878e9c75..ef4574226 100644
--- a/linux/drivers/media/video/saa7134/saa7134-input.c
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-input.c,v 1.33 2005/10/04 14:52:08 nsh Exp $
+ * $Id: saa7134-input.c,v 1.34 2005/10/16 12:13:58 mchehab Exp $
*
* handle saa7134 IR remotes via linux kernel input layer.
*
@@ -118,24 +118,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
@@ -152,24 +152,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] = {
@@ -459,13 +459,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);
@@ -482,9 +482,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);
}
@@ -518,7 +518,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;
@@ -560,7 +560,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;
@@ -574,7 +574,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;
@@ -588,8 +588,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)",
diff --git a/linux/drivers/media/video/saa7134/saa7134-oss.c b/linux/drivers/media/video/saa7134/saa7134-oss.c
index e70cc6828..3bf5b7107 100644
--- a/linux/drivers/media/video/saa7134/saa7134-oss.c
+++ b/linux/drivers/media/video/saa7134/saa7134-oss.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-oss.c,v 1.19 2005/10/06 21:37:02 nsh Exp $
+ * $Id: saa7134-oss.c,v 1.20 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* oss dsp interface
@@ -66,7 +66,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;
}
@@ -373,20 +373,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);
@@ -398,7 +398,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)
@@ -411,15 +411,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) {
@@ -444,7 +444,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:
@@ -458,20 +458,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)
@@ -482,7 +482,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;
@@ -565,7 +565,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
@@ -669,28 +669,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):
@@ -773,7 +773,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) {
diff --git a/linux/drivers/media/video/saa7134/saa7134-reg.h b/linux/drivers/media/video/saa7134/saa7134-reg.h
index 6bf039812..c75936937 100644
--- a/linux/drivers/media/video/saa7134/saa7134-reg.h
+++ b/linux/drivers/media/video/saa7134/saa7134-reg.h
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-reg.h,v 1.4 2005/10/06 21:37:02 nsh Exp $
+ * $Id: saa7134-reg.h,v 1.5 2005/10/16 12:13:58 mchehab Exp $
*
* philips saa7134 registers
*/
@@ -28,7 +28,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)
@@ -54,14 +54,14 @@
/* 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)
diff --git a/linux/drivers/media/video/saa7134/saa7134-ts.c b/linux/drivers/media/video/saa7134/saa7134-ts.c
index 914c6294e..fdb2d9261 100644
--- a/linux/drivers/media/video/saa7134/saa7134-ts.c
+++ b/linux/drivers/media/video/saa7134/saa7134-ts.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-ts.c,v 1.18 2005/09/12 00:41:16 mkrufky Exp $
+ * $Id: saa7134-ts.c,v 1.19 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -113,8 +113,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));
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
index 87343a1ee..9d58c2be9 100644
--- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
+++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-tvaudio.c,v 1.34 2005/10/04 17:24:34 mkrufky Exp $
+ * $Id: saa7134-tvaudio.c,v 1.35 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* tv audio decoder (fm stereo, nicam, ...)
@@ -248,7 +248,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 :
SAA7134_MUTE_MASK);
@@ -811,17 +811,17 @@ static int mute_input_7133(struct saa7134_dev *dev)
/* switch gpio-connected external audio mux */
- if (0 != card(dev).gpiomask) {
- mask = card(dev).gpiomask;
+ if (0 != card(dev).gpiomask) {
+ mask = card(dev).gpiomask;
if (card(dev).mute.name && dev->ctl_mute)
in = &card(dev).mute;
else
in = dev->input;
- saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask);
- saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, in->gpio);
- saa7134_track_gpio(dev,in->name);
+ saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, mask, mask);
+ saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, mask, in->gpio);
+ saa7134_track_gpio(dev,in->name);
}
return 0;
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 6f42d735e..f01bd1d70 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-video.c,v 1.42 2005/10/06 18:12:51 nsh Exp $
+ * $Id: saa7134-video.c,v 1.43 2005/10/16 12:13:58 mchehab Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -312,12 +312,12 @@ static struct saa7134_tvnorm tvnorms[] = {
.h_start = 0,
.h_stop = 719,
- .video_v_start = 23,
- .video_v_stop = 262,
- .vbi_v_start_0 = 10,
- .vbi_v_stop_0 = 21,
- .vbi_v_start_1 = 273,
- .src_timing = 7,
+ .video_v_start = 23,
+ .video_v_stop = 262,
+ .vbi_v_start_0 = 10,
+ .vbi_v_stop_0 = 21,
+ .vbi_v_start_1 = 273,
+ .src_timing = 7,
.sync_control = 0x18,
.luma_control = 0x40,
@@ -661,7 +661,7 @@ static void set_size(struct saa7134_dev *dev, int task,
prescale = 1;
xscale = 1024 * dev->crop_current.width / prescale / width;
yscale = 512 * div * dev->crop_current.height / height;
- dprintk("prescale=%d xscale=%d yscale=%d\n",prescale,xscale,yscale);
+ dprintk("prescale=%d xscale=%d yscale=%d\n",prescale,xscale,yscale);
set_h_prescale(dev,task,prescale);
saa_writeb(SAA7134_H_SCALE_INC1(task), xscale & 0xff);
saa_writeb(SAA7134_H_SCALE_INC2(task), xscale >> 8);
@@ -791,20 +791,20 @@ static int verify_preview(struct saa7134_dev *dev, struct v4l2_window *win)
maxh = dev->crop_current.height;
if (V4L2_FIELD_ANY == field) {
- field = (win->w.height > maxh/2)
- ? V4L2_FIELD_INTERLACED
- : V4L2_FIELD_TOP;
- }
- switch (field) {
- case V4L2_FIELD_TOP:
- case V4L2_FIELD_BOTTOM:
- maxh = maxh / 2;
- break;
- case V4L2_FIELD_INTERLACED:
- break;
- default:
- return -EINVAL;
- }
+ field = (win->w.height > maxh/2)
+ ? V4L2_FIELD_INTERLACED
+ : V4L2_FIELD_TOP;
+ }
+ switch (field) {
+ case V4L2_FIELD_TOP:
+ case V4L2_FIELD_BOTTOM:
+ maxh = maxh / 2;
+ break;
+ case V4L2_FIELD_INTERLACED:
+ break;
+ default:
+ return -EINVAL;
+ }
win->field = field;
if (win->w.width > maxw)
@@ -1345,13 +1345,13 @@ video_poll(struct file *file, struct poll_table_struct *wait)
if (res_locked(fh->dev,RESOURCE_VIDEO)) {
up(&fh->cap.lock);
return POLLERR;
- }
- if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) {
- up(&fh->cap.lock);
- return POLLERR;
- }
- fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf);
- fh->cap.read_off = 0;
+ }
+ if (0 != fh->cap.ops->buf_prepare(&fh->cap,fh->cap.read_buf,fh->cap.field)) {
+ up(&fh->cap.lock);
+ return POLLERR;
+ }
+ fh->cap.ops->buf_queue(&fh->cap,fh->cap.read_buf);
+ fh->cap.read_off = 0;
}
up(&fh->cap.lock);
buf = fh->cap.read_buf;
@@ -1715,7 +1715,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
unsigned int tuner_type = dev->tuner_type;
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));
@@ -1943,26 +1943,26 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
}
case VIDIOC_S_AUDIO:
return 0;
- case VIDIOC_G_PARM:
- {
- struct v4l2_captureparm *parm = arg;
- memset(parm,0,sizeof(*parm));
- return 0;
- }
-
- case VIDIOC_G_PRIORITY:
- {
- enum v4l2_priority *p = arg;
-
- *p = v4l2_prio_max(&dev->prio);
- return 0;
- }
- case VIDIOC_S_PRIORITY:
- {
- enum v4l2_priority *prio = arg;
-
- return v4l2_prio_change(&dev->prio, &fh->prio, *prio);
- }
+ case VIDIOC_G_PARM:
+ {
+ struct v4l2_captureparm *parm = arg;
+ memset(parm,0,sizeof(*parm));
+ return 0;
+ }
+
+ case VIDIOC_G_PRIORITY:
+ {
+ enum v4l2_priority *p = arg;
+
+ *p = v4l2_prio_max(&dev->prio);
+ return 0;
+ }
+ case VIDIOC_S_PRIORITY:
+ {
+ enum v4l2_priority *prio = arg;
+
+ return v4l2_prio_change(&dev->prio, &fh->prio, *prio);
+ }
/* --- preview ioctls ---------------------------------------- */
case VIDIOC_ENUM_FMT:
@@ -2111,7 +2111,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
{
int res = saa7134_resource(fh);
- if (!res_get(dev,fh,res))
+ if (!res_get(dev,fh,res))
return -EBUSY;
return videobuf_streamon(saa7134_queue(fh));
}
@@ -2153,7 +2153,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, "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));
@@ -2284,7 +2284,7 @@ struct video_device saa7134_video_template =
{
.name = "saa7134-video",
.type = VID_TYPE_CAPTURE|VID_TYPE_TUNER|VID_TYPE_OVERLAY|
- VID_TYPE_CLIPPING|VID_TYPE_SCALES,
+ VID_TYPE_CLIPPING|VID_TYPE_SCALES,
.hardware = 0,
.fops = &video_fops,
.minor = -1,
@@ -2331,7 +2331,7 @@ int saa7134_video_init1(struct saa7134_dev *dev)
dev->tda9887_conf |= TDA9887_AUTOMUTE;
dev->automute = 0;
- INIT_LIST_HEAD(&dev->video_q.queue);
+ INIT_LIST_HEAD(&dev->video_q.queue);
init_timer(&dev->video_q.timeout);
dev->video_q.timeout.function = saa7134_buffer_timeout;
dev->video_q.timeout.data = (unsigned long)(&dev->video_q);
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index a38ef1a83..88f91a6a2 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134.h,v 1.66 2005/10/15 14:16:10 nsh Exp $
+ * $Id: saa7134.h,v 1.67 2005/10/16 12:13:58 mchehab Exp $
*
* v4l2 device driver for philips saa7134 based TV cards
*
@@ -353,7 +353,7 @@ struct saa7134_fh {
/* oss dsp status */
struct saa7134_oss {
- struct semaphore lock;
+ struct semaphore lock;
int minor_mixer;
int minor_dsp;
unsigned int users_dsp;
@@ -393,9 +393,9 @@ struct saa7134_ir {
u32 mask_keycode;
u32 mask_keydown;
u32 mask_keyup;
- int polling;
- u32 last_gpio;
- struct timer_list timer;
+ int polling;
+ u32 last_gpio;
+ struct timer_list timer;
};
/* ts/mpeg status */
@@ -418,8 +418,8 @@ struct saa7134_mpeg_ops {
/* global device status */
struct saa7134_dev {
struct list_head devlist;
- struct semaphore lock;
- spinlock_t slock;
+ struct semaphore lock;
+ spinlock_t slock;
#ifdef VIDIOC_G_PRIORITY
struct v4l2_prio_state prio;
#endif
diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c
index dfe0be80e..017ba629d 100644
--- a/linux/drivers/media/video/tda7432.c
+++ b/linux/drivers/media/video/tda7432.c
@@ -334,9 +334,9 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr,
memset(t,0,sizeof *t);
client = &t->c;
- memcpy(client,&client_template,sizeof(struct i2c_client));
- client->adapter = adap;
- client->addr = addr;
+ memcpy(client,&client_template,sizeof(struct i2c_client));
+ client->adapter = adap;
+ client->addr = addr;
i2c_set_clientdata(client, t);
do_tda7432_init(client);
@@ -502,7 +502,7 @@ static int tda7432_command(struct i2c_client *client,
}
}
- t->muted=(va->flags & VIDEO_AUDIO_MUTE);
+ t->muted=(va->flags & VIDEO_AUDIO_MUTE);
if (t->muted)
{
/* Mute & update balance*/
@@ -535,12 +535,12 @@ static struct i2c_driver driver = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
.owner = THIS_MODULE,
#endif
- .name = "i2c tda7432 driver",
+ .name = "i2c tda7432 driver",
.id = I2C_DRIVERID_TDA7432,
- .flags = I2C_DF_NOTIFY,
+ .flags = I2C_DF_NOTIFY,
.attach_adapter = tda7432_probe,
- .detach_client = tda7432_detach,
- .command = tda7432_command,
+ .detach_client = tda7432_detach,
+ .command = tda7432_command,
};
static struct i2c_client client_template =
diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c
index 5205b1f5e..dedc3fd2f 100644
--- a/linux/drivers/media/video/tda8290.c
+++ b/linux/drivers/media/video/tda8290.c
@@ -1,5 +1,5 @@
/*
- * $Id: tda8290.c,v 1.19 2005/09/29 18:20:25 nsh Exp $
+ * $Id: tda8290.c,v 1.20 2005/10/16 12:13:58 mchehab Exp $
*
* i2c tv tuner chip device driver
* controls the philips tda8290+75 tuner chip combo.
@@ -50,7 +50,7 @@ static struct freq_entry div_table[] = {
{ 0x1C34, 3 },
{ 0x0D34, 2 },
{ 0x067B, 1 },
- { 0x0000, 0 },
+ { 0x0000, 0 },
};
static struct freq_entry agc_table[] = {
diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c
index b2e3801b1..79a659451 100644
--- a/linux/drivers/media/video/tda9875.c
+++ b/linux/drivers/media/video/tda9875.c
@@ -145,20 +145,20 @@ static int tda9875_read(struct i2c_client *client)
static int i2c_read_register(struct i2c_adapter *adap, int addr, int reg)
{
- unsigned char write[1];
- unsigned char read[1];
- struct i2c_msg msgs[2] = {
- { addr, 0, 1, write },
- { addr, I2C_M_RD, 1, read }
- };
- write[0] = reg;
-
- if (2 != i2c_transfer(adap,msgs,2)) {
- printk(KERN_WARNING "tda9875: I/O error (read2)\n");
- return -1;
- }
- dprintk("tda9875: chip_read2: reg%d=0x%x\n",reg,read[0]);
- return read[0];
+ unsigned char write[1];
+ unsigned char read[1];
+ struct i2c_msg msgs[2] = {
+ { addr, 0, 1, write },
+ { addr, I2C_M_RD, 1, read }
+ };
+ write[0] = reg;
+
+ if (2 != i2c_transfer(adap,msgs,2)) {
+ printk(KERN_WARNING "tda9875: I/O error (read2)\n");
+ return -1;
+ }
+ dprintk("tda9875: chip_read2: reg%d=0x%x\n",reg,read[0]);
+ return read[0];
}
static void tda9875_set(struct i2c_client *client)
@@ -203,7 +203,7 @@ static void do_tda9875_init(struct i2c_client *client)
tda9875_write(client, TDA9875_DACOS, 0x02 ); /* sig DAC i/o(in:nicam)*/
tda9875_write(client, TDA9875_ADCIS, 0x6f ); /* sig ADC input(in:mono)*/
tda9875_write(client, TDA9875_LOSR, 0x00 ); /* line out (in:mono)*/
- tda9875_write(client, TDA9875_AER, 0x00 ); /*06 Effect (AVL+PSEUDO) */
+ tda9875_write(client, TDA9875_AER, 0x00 ); /*06 Effect (AVL+PSEUDO) */
tda9875_write(client, TDA9875_MCS, 0x44 ); /* Main ch select (DAC) */
tda9875_write(client, TDA9875_MVL, 0x03 ); /* Vol Main left 10dB */
tda9875_write(client, TDA9875_MVR, 0x03 ); /* Vol Main right 10dB*/
@@ -219,7 +219,7 @@ static void do_tda9875_init(struct i2c_client *client)
t->mode=AUDIO_UNMUTE;
t->lvol=t->rvol =0; /* 0dB */
- t->bass=0; /* 0dB */
+ t->bass=0; /* 0dB */
t->treble=0; /* 0dB */
tda9875_set(client);
@@ -263,9 +263,9 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr,
memset(t,0,sizeof *t);
client = &t->c;
- memcpy(client,&client_template,sizeof(struct i2c_client));
- client->adapter = adap;
- client->addr = addr;
+ memcpy(client,&client_template,sizeof(struct i2c_client));
+ client->adapter = adap;
+ client->addr = addr;
i2c_set_clientdata(client, t);
if(!tda9875_checkit(adap,addr)) {
@@ -317,7 +317,7 @@ static int tda9875_command(struct i2c_client *client,
dprintk("In tda9875_command...\n");
switch (cmd) {
- /* --- v4l ioctls --- */
+ /* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */
case VIDIOCGAUDIO:
@@ -385,7 +385,7 @@ static int tda9875_command(struct i2c_client *client,
//printk("tda9875 bal:%04x vol:%04x bass:%04x treble:%04x\n",va->balance,va->volume,va->bass,va->treble);
- tda9875_set(client);
+ tda9875_set(client);
break;
@@ -406,18 +406,18 @@ static struct i2c_driver driver = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
.owner = THIS_MODULE,
#endif
- .name = "i2c tda9875 driver",
- .id = I2C_DRIVERID_TDA9875,
- .flags = I2C_DF_NOTIFY,
+ .name = "i2c tda9875 driver",
+ .id = I2C_DRIVERID_TDA9875,
+ .flags = I2C_DF_NOTIFY,
.attach_adapter = tda9875_probe,
- .detach_client = tda9875_detach,
- .command = tda9875_command,
+ .detach_client = tda9875_detach,
+ .command = tda9875_command,
};
static struct i2c_client client_template =
{
- .name = "tda9875",
- .driver = &driver,
+ .name = "tda9875",
+ .driver = &driver,
};
static int __init tda9875_init(void)
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index 67dc0f8d8..a80cbff9f 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -54,11 +54,11 @@ MODULE_LICENSE("GPL");
#define UNSET (-1U)
#define tda9887_info(fmt, arg...) do {\
printk(KERN_INFO "%s %d-%04x: " fmt, t->client.name, \
- i2c_adapter_id(t->client.adapter), t->client.addr , ##arg); } while (0)
+ i2c_adapter_id(t->client.adapter), t->client.addr , ##arg); } while (0)
#define tda9887_dbg(fmt, arg...) do {\
if (debug) \
- printk(KERN_INFO "%s %d-%04x: " fmt, t->client.name, \
- i2c_adapter_id(t->client.adapter), t->client.addr , ##arg); } while (0)
+ printk(KERN_INFO "%s %d-%04x: " fmt, t->client.name, \
+ i2c_adapter_id(t->client.adapter), t->client.addr , ##arg); } while (0)
struct tda9887 {
struct i2c_client client;
@@ -492,11 +492,11 @@ static int tda9887_set_pinnacle(struct tda9887 *t, char *buf)
}
}
if (t->std & V4L2_STD_525_60) {
- if ((5 == t->pinnacle_id) || (6 == t->pinnacle_id)) {
+ if ((5 == t->pinnacle_id) || (6 == t->pinnacle_id)) {
bCarrierMode = cIntercarrier;
} else {
bCarrierMode = cQSS;
- }
+ }
}
if (bCarrierMode != UNSET) {
@@ -582,8 +582,8 @@ static int tda9887_status(struct tda9887 *t)
int rc;
memset(buf,0,sizeof(buf));
- if (1 != (rc = i2c_master_recv(&t->client,buf,1)))
- tda9887_info("i2c i/o error: rc == %d (should be 1)\n",rc);
+ if (1 != (rc = i2c_master_recv(&t->client,buf,1)))
+ tda9887_info("i2c i/o error: rc == %d (should be 1)\n",rc);
dump_read_message(t, buf);
return 0;
}
@@ -623,8 +623,8 @@ static int tda9887_configure(struct tda9887 *t)
if (debug > 1)
dump_write_message(t, t->data);
- if (4 != (rc = i2c_master_send(&t->client,t->data,4)))
- tda9887_info("i2c i/o error: rc == %d (should be 4)\n",rc);
+ if (4 != (rc = i2c_master_send(&t->client,t->data,4)))
+ tda9887_info("i2c i/o error: rc == %d (should be 4)\n",rc);
if (debug > 2) {
msleep_interruptible(1000);
@@ -644,11 +644,11 @@ static int tda9887_attach(struct i2c_adapter *adap, int addr,
{
struct tda9887 *t;
- client_template.adapter = adap;
- client_template.addr = addr;
+ client_template.adapter = adap;
+ client_template.addr = addr;
- 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;
@@ -656,7 +656,7 @@ static int tda9887_attach(struct i2c_adapter *adap, int addr,
t->pinnacle_id = UNSET;
t->radio_mode = V4L2_TUNER_MODE_STEREO;
- tda9887_info("chip found @ 0x%x (%s)\n", addr<<1, adap->name);
+ tda9887_info("chip found @ 0x%x (%s)\n", addr<<1, adap->name);
i2c_set_clientdata(&t->client, t);
i2c_attach_client(&t->client);
@@ -699,18 +699,18 @@ static int tda9887_detach(struct i2c_client *client)
}
#define SWITCH_V4L2 if (!t->using_v4l2 && debug) \
- tda9887_info("switching to v4l2\n"); \
- t->using_v4l2 = 1;
+ tda9887_info("switching to v4l2\n"); \
+ t->using_v4l2 = 1;
#define CHECK_V4L2 if (t->using_v4l2) { if (debug) \
tda9887_info("ignore v4l1 call\n"); \
- return 0; }
+ return 0; }
static int
tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
{
struct tda9887 *t = i2c_get_clientdata(client);
- switch (cmd) {
+ switch (cmd) {
/* --- configuration --- */
case AUDC_SET_RADIO:
diff --git a/linux/drivers/media/video/tea5767.c b/linux/drivers/media/video/tea5767.c
index a8c23b0a8..759b68d8c 100644
--- a/linux/drivers/media/video/tea5767.c
+++ b/linux/drivers/media/video/tea5767.c
@@ -2,7 +2,7 @@
* For Philips TEA5767 FM Chip used on some TV Cards like Prolink Pixelview
* I2C address is allways 0xC0.
*
- * $Id: tea5767.c,v 1.29 2005/08/17 19:42:11 nsh Exp $
+ * $Id: tea5767.c,v 1.30 2005/10/16 12:13:58 mchehab Exp $
*
* Copyright (c) 2005 Mauro Carvalho Chehab (mchehab@brturbo.com.br)
* This code is placed under the terms of the GNU General Public License
@@ -119,10 +119,10 @@
#define TEA5767_RESERVED_MASK 0xff
enum tea5767_xtal_freq {
- TEA5767_LOW_LO_32768 = 0,
- TEA5767_HIGH_LO_32768 = 1,
- TEA5767_LOW_LO_13MHz = 2,
- TEA5767_HIGH_LO_13MHz = 3,
+ TEA5767_LOW_LO_32768 = 0,
+ TEA5767_HIGH_LO_32768 = 1,
+ TEA5767_LOW_LO_13MHz = 2,
+ TEA5767_HIGH_LO_13MHz = 3,
};
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index 61c8a6ac0..292a5ba56 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.73 2005/09/13 20:11:39 mkrufky Exp $
+ * $Id: tuner-core.c,v 1.74 2005/10/16 12:13:58 mchehab Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -443,23 +443,23 @@ static int tuner_detach(struct i2c_client *client)
static inline int set_mode(struct i2c_client *client, struct tuner *t, int mode, char *cmd)
{
- if (mode == t->mode)
- return 0;
-
- t->mode = mode;
-
- if (check_mode(t, cmd) == EINVAL) {
- t->mode = T_STANDBY;
- if (t->standby)
- t->standby (client);
- return EINVAL;
- }
- return 0;
+ if (mode == t->mode)
+ return 0;
+
+ t->mode = mode;
+
+ if (check_mode(t, cmd) == EINVAL) {
+ t->mode = T_STANDBY;
+ if (t->standby)
+ t->standby (client);
+ return EINVAL;
+ }
+ return 0;
}
#define switch_v4l2() if (!t->using_v4l2) \
- tuner_dbg("switching to v4l2\n"); \
- t->using_v4l2 = 1;
+ tuner_dbg("switching to v4l2\n"); \
+ t->using_v4l2 = 1;
static inline int check_v4l2(struct tuner *t)
{
@@ -634,7 +634,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
switch_v4l2();
if (V4L2_TUNER_RADIO == f->type &&
V4L2_TUNER_RADIO != t->mode) {
- if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY")
+ if (set_mode (client, t, f->type, "VIDIOC_S_FREQUENCY")
== EINVAL)
return 0;
}
diff --git a/linux/drivers/media/video/tuner-simple.c b/linux/drivers/media/video/tuner-simple.c
index 9552b1a31..7219333f1 100644
--- a/linux/drivers/media/video/tuner-simple.c
+++ b/linux/drivers/media/video/tuner-simple.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-simple.c,v 1.53 2005/10/05 04:19:55 mkrufky Exp $
+ * $Id: tuner-simple.c,v 1.54 2005/10/16 12:13:58 mchehab Exp $
*
* i2c tv tuner chip device driver
* controls all those simple 4-control-bytes style tuners.
@@ -104,7 +104,7 @@ struct tunertype
*/
static struct tunertype tuners[] = {
/* 0-9 */
- { "Temic PAL (4002 FH5)", TEMIC, PAL,
+ { "Temic PAL (4002 FH5)", TEMIC, PAL,
16*140.25,16*463.25,0x02,0x04,0x01,0x8e,623},
{ "Philips PAL_I (FI1246 and compatibles)", Philips, PAL_I,
16*140.25,16*463.25,0xa0,0x90,0x30,0x8e,623},
@@ -120,41 +120,41 @@ static struct tunertype tuners[] = {
16*157.25,16*463.25,0x02,0x04,0x01,0x8e,732},
{ "Temic PAL_I (4062 FY5)", TEMIC, PAL_I,
16*170.00,16*450.00,0x02,0x04,0x01,0x8e,623},
- { "Temic NTSC (4036 FY5)", TEMIC, NTSC,
+ { "Temic NTSC (4036 FY5)", TEMIC, NTSC,
16*157.25,16*463.25,0xa0,0x90,0x30,0x8e,732},
- { "Alps HSBH1", TEMIC, NTSC,
+ { "Alps HSBH1", TEMIC, NTSC,
16*137.25,16*385.25,0x01,0x02,0x08,0x8e,732},
/* 10-19 */
- { "Alps TSBE1", TEMIC, PAL,
+ { "Alps TSBE1", TEMIC, PAL,
16*137.25,16*385.25,0x01,0x02,0x08,0x8e,732},
- { "Alps TSBB5", Alps, PAL_I, /* tested (UK UHF) with Modulartech MM205 */
+ { "Alps TSBB5", Alps, PAL_I, /* tested (UK UHF) with Modulartech MM205 */
16*133.25,16*351.25,0x01,0x02,0x08,0x8e,632},
- { "Alps TSBE5", Alps, PAL, /* untested - data sheet guess. Only IF differs. */
+ { "Alps TSBE5", Alps, PAL, /* untested - data sheet guess. Only IF differs. */
16*133.25,16*351.25,0x01,0x02,0x08,0x8e,622},
- { "Alps TSBC5", Alps, PAL, /* untested - data sheet guess. Only IF differs. */
+ { "Alps TSBC5", Alps, PAL, /* untested - data sheet guess. Only IF differs. */
16*133.25,16*351.25,0x01,0x02,0x08,0x8e,608},
{ "Temic PAL_BG (4006FH5)", TEMIC, PAL,
16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623},
- { "Alps TSCH6", Alps, NTSC,
- 16*137.25,16*385.25,0x14,0x12,0x11,0x8e,732},
- { "Temic PAL_DK (4016 FY5)", TEMIC, PAL,
- 16*168.25,16*456.25,0xa0,0x90,0x30,0x8e,623},
- { "Philips NTSC_M (MK2)", Philips, NTSC,
- 16*160.00,16*454.00,0xa0,0x90,0x30,0x8e,732},
- { "Temic PAL_I (4066 FY5)", TEMIC, PAL_I,
- 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623},
- { "Temic PAL* auto (4006 FN5)", TEMIC, PAL,
- 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623},
+ { "Alps TSCH6", Alps, NTSC,
+ 16*137.25,16*385.25,0x14,0x12,0x11,0x8e,732},
+ { "Temic PAL_DK (4016 FY5)", TEMIC, PAL,
+ 16*168.25,16*456.25,0xa0,0x90,0x30,0x8e,623},
+ { "Philips NTSC_M (MK2)", Philips, NTSC,
+ 16*160.00,16*454.00,0xa0,0x90,0x30,0x8e,732},
+ { "Temic PAL_I (4066 FY5)", TEMIC, PAL_I,
+ 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623},
+ { "Temic PAL* auto (4006 FN5)", TEMIC, PAL,
+ 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623},
/* 20-29 */
- { "Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5)", TEMIC, PAL,
- 16*141.00, 16*464.00, 0xa0,0x90,0x30,0x8e,623},
- { "Temic NTSC (4039 FR5)", TEMIC, NTSC,
- 16*158.00, 16*453.00, 0xa0,0x90,0x30,0x8e,732},
- { "Temic PAL/SECAM multi (4046 FM5)", TEMIC, PAL,
- 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623},
- { "Philips PAL_DK (FI1256 and compatibles)", Philips, PAL,
+ { "Temic PAL_BG (4009 FR5) or PAL_I (4069 FR5)", TEMIC, PAL,
+ 16*141.00, 16*464.00, 0xa0,0x90,0x30,0x8e,623},
+ { "Temic NTSC (4039 FR5)", TEMIC, NTSC,
+ 16*158.00, 16*453.00, 0xa0,0x90,0x30,0x8e,732},
+ { "Temic PAL/SECAM multi (4046 FM5)", TEMIC, PAL,
+ 16*169.00, 16*454.00, 0xa0,0x90,0x30,0x8e,623},
+ { "Philips PAL_DK (FI1256 and compatibles)", Philips, PAL,
16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623},
{ "Philips PAL/SECAM multi (FQ1216ME)", Philips, PAL,
16*170.00,16*450.00,0xa0,0x90,0x30,0x8e,623},
@@ -175,21 +175,21 @@ static struct tunertype tuners[] = {
{ "SHARP NTSC_JP (2U5JF5540)", SHARP, NTSC, /* 940=16*58.75 NTSC@Japan */
16*137.25,16*317.25,0x01,0x02,0x08,0x8e,940 },
{ "Samsung PAL TCPM9091PD27", Samsung, PAL, /* from sourceforge v3tv */
- 16*169,16*464,0xA0,0x90,0x30,0x8e,623},
+ 16*169,16*464,0xA0,0x90,0x30,0x8e,623},
{ "MT20xx universal", Microtune, PAL|NTSC,
/* see mt20xx.c for details */ },
{ "Temic PAL_BG (4106 FH5)", TEMIC, PAL,
- 16*141.00, 16*464.00, 0xa0,0x90,0x30,0x8e,623},
+ 16*141.00, 16*464.00, 0xa0,0x90,0x30,0x8e,623},
{ "Temic PAL_DK/SECAM_L (4012 FY5)", TEMIC, PAL,
- 16*140.25, 16*463.25, 0x02,0x04,0x01,0x8e,623},
+ 16*140.25, 16*463.25, 0x02,0x04,0x01,0x8e,623},
{ "Temic NTSC (4136 FY5)", TEMIC, NTSC,
- 16*158.00, 16*453.00, 0xa0,0x90,0x30,0x8e,732},
- { "LG PAL (newer TAPC series)", LGINNOTEK, PAL,
- 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,623},
+ 16*158.00, 16*453.00, 0xa0,0x90,0x30,0x8e,732},
+ { "LG PAL (newer TAPC series)", LGINNOTEK, PAL,
+ 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,623},
{ "Philips PAL/SECAM multi (FM1216ME MK3)", Philips, PAL,
16*158.00,16*442.00,0x01,0x02,0x04,0x8e,623 },
{ "LG NTSC (newer TAPC series)", LGINNOTEK, NTSC,
- 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,732},
+ 16*170.00, 16*450.00, 0x01,0x02,0x08,0x8e,732},
/* 40-49 */
{ "HITACHI V7-J180AT", HITACHI, NTSC,
@@ -198,24 +198,24 @@ static struct tunertype tuners[] = {
16*140.25,16*463.25,0x01,0xc2,0xcf,0x8e,623},
{ "Philips 1236D ATSC/NTSC daul in", Philips, ATSC,
16*157.25,16*454.00,0xa0,0x90,0x30,0x8e,732},
- { "Philips NTSC MK3 (FM1236MK3 or FM1236/F)", Philips, NTSC,
- 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732},
- { "Philips 4 in 1 (ATI TV Wonder Pro/Conexant)", Philips, NTSC,
- 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732},
+ { "Philips NTSC MK3 (FM1236MK3 or FM1236/F)", Philips, NTSC,
+ 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732},
+ { "Philips 4 in 1 (ATI TV Wonder Pro/Conexant)", Philips, NTSC,
+ 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732},
{ "Microtune 4049 FM5", Microtune, PAL,
16*141.00,16*464.00,0xa0,0x90,0x30,0x8e,623},
{ "Panasonic VP27s/ENGE4324D", Panasonic, NTSC,
16*160.00,16*454.00,0x01,0x02,0x08,0xce,940},
- { "LG NTSC (TAPE series)", LGINNOTEK, NTSC,
- 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 },
- { "Tenna TNF 8831 BGFF)", Philips, PAL,
- 16*161.25,16*463.25,0xa0,0x90,0x30,0x8e,623},
+ { "LG NTSC (TAPE series)", LGINNOTEK, NTSC,
+ 16*160.00,16*442.00,0x01,0x02,0x04,0x8e,732 },
+ { "Tenna TNF 8831 BGFF)", Philips, PAL,
+ 16*161.25,16*463.25,0xa0,0x90,0x30,0x8e,623},
{ "Microtune 4042 FI5 ATSC/NTSC dual in", Microtune, NTSC,
16*162.00,16*457.00,0xa2,0x94,0x31,0x8e,732},
/* 50-59 */
- { "TCL 2002N", TCL, NTSC,
- 16*172.00,16*448.00,0x01,0x02,0x08,0x8e,732},
+ { "TCL 2002N", TCL, NTSC,
+ 16*172.00,16*448.00,0x01,0x02,0x08,0x8e,732},
{ "Philips PAL/SECAM_D (FM 1256 I-H3)", Philips, PAL,
16*160.00,16*442.00,0x01,0x02,0x04,0x8e,623 },
{ "Thomson DDT 7610 (ATSC/NTSC)", THOMSON, ATSC,
@@ -225,7 +225,7 @@ static struct tunertype tuners[] = {
{ "tda8290+75", Philips, PAL|NTSC,
/* see tda8290.c for details */ },
{ "TCL 2002MB", TCL, PAL,
- 16*170.00, 16*450.00, 0x01,0x02,0x08,0xce,623},
+ 16*170.00, 16*450.00, 0x01,0x02,0x08,0xce,623},
{ "Philips PAL/SECAM multi (FQ1216AME MK4)", Philips, PAL,
16*160.00,16*442.00,0x01,0x02,0x04,0xce,623 },
{ "Philips FQ1236A MK4", Philips, NTSC,
@@ -239,16 +239,16 @@ static struct tunertype tuners[] = {
{ "Thomson DDT 7611 (ATSC/NTSC)", THOMSON, ATSC,
16*157.25,16*454.00,0x39,0x3a,0x3c,0x8e,732},
{ "Tena TNF9533-D/IF/TNF9533-B/DF", Philips, PAL,
- 16*160.25,16*464.25,0x01,0x02,0x04,0x8e,623},
+ 16*160.25,16*464.25,0x01,0x02,0x04,0x8e,623},
{ "Philips TEA5767HN FM Radio", Philips, RADIO,
- /* see tea5767.c for details */},
+ /* see tea5767.c for details */},
{ "Philips FMD1216ME MK3 Hybrid Tuner", Philips, PAL,
16*160.00,16*442.00,0x51,0x52,0x54,0x86,623 },
{ "LG TDVS-H062F/TUA6034", LGINNOTEK, ATSC,
16*160.00,16*455.00,0x01,0x02,0x04,0x8e,732},
{ "Ymec TVF66T5-B/DFF", Philips, PAL,
- 16*160.25,16*464.25,0x01,0x02,0x08,0x8e,623},
- { "LG NTSC (TALN mini series)", LGINNOTEK, NTSC,
+ 16*160.25,16*464.25,0x01,0x02,0x08,0x8e,623},
+ { "LG NTSC (TALN mini series)", LGINNOTEK, NTSC,
16*137.25,16*373.25,0x01,0x02,0x08,0x8e,732 },
{ "Philips TD1316 Hybrid Tuner", Philips, PAL,
16*160.00,16*442.00,0xa1,0xa2,0xa4,0xc8,623 },
@@ -283,7 +283,7 @@ static int tuner_stereo(struct i2c_client *c)
status = tuner_getstatus (c);
switch (t->type) {
- case TUNER_PHILIPS_FM1216ME_MK3:
+ case TUNER_PHILIPS_FM1216ME_MK3:
case TUNER_PHILIPS_FM1236_MK3:
case TUNER_PHILIPS_FM1256_IH3:
stereo = ((status & TUNER_SIGNAL) == TUNER_STEREO_MK3);
@@ -298,17 +298,17 @@ static int tuner_stereo(struct i2c_client *c)
#if 0 /* unused */
static int tuner_islocked (struct i2c_client *c)
{
- return (tuner_getstatus (c) & TUNER_FL);
+ return (tuner_getstatus (c) & TUNER_FL);
}
static int tuner_afcstatus (struct i2c_client *c)
{
- return (tuner_getstatus (c) & TUNER_AFC) - 2;
+ return (tuner_getstatus (c) & TUNER_AFC) - 2;
}
static int tuner_mode (struct i2c_client *c)
{
- return (tuner_getstatus (c) & TUNER_MODE) >> 3;
+ return (tuner_getstatus (c) & TUNER_MODE) >> 3;
}
#endif
@@ -320,7 +320,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
u8 config;
u16 div;
struct tunertype *tun;
- unsigned char buffer[4];
+ unsigned char buffer[4];
int rc;
tun = &tuners[t->type];
@@ -437,7 +437,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n",
buffer[0],buffer[1],buffer[2],buffer[3]);
- if (4 != (rc = i2c_master_send(c,buffer,4)))
+ if (4 != (rc = i2c_master_send(c,buffer,4)))
tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc);
if (t->type == TUNER_MICROTUNE_4042FI5) {
@@ -476,7 +476,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
{
struct tunertype *tun;
struct tuner *t = i2c_get_clientdata(c);
- unsigned char buffer[4];
+ unsigned char buffer[4];
unsigned div;
int rc;
@@ -509,13 +509,13 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
buffer[3] = 0xa4;
break;
}
- buffer[0] = (div>>8) & 0x7f;
- buffer[1] = div & 0xff;
+ buffer[0] = (div>>8) & 0x7f;
+ buffer[1] = div & 0xff;
tuner_dbg("radio 0x%02x 0x%02x 0x%02x 0x%02x\n",
buffer[0],buffer[1],buffer[2],buffer[3]);
- if (4 != (rc = i2c_master_send(c,buffer,4)))
+ if (4 != (rc = i2c_master_send(c,buffer,4)))
tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc);
}
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index ddf72da42..55adb7681 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -483,8 +483,8 @@ static void tda9840_setmode(struct CHIPSTATE *chip, int mode)
#define TDA9855_LOUD 1<<5 /* Loudness, 1==off */
#define TDA9855_SUR 1<<3 /* Surround / Subwoofer 1==.5(L-R) 0==.5(L+R) */
/* Bits 0 to 3 select various combinations
- * of line in and line out, only the
- * interesting ones are defined */
+ * of line in and line out, only the
+ * interesting ones are defined */
#define TDA9855_EXT 1<<2 /* Selects inputs LIR and LIL. Pins 41 & 12 */
#define TDA9855_INT 0 /* Selects inputs LOR and LOL. (internal) */
@@ -1058,7 +1058,7 @@ static int tda9874a_initialize(struct CHIPSTATE *chip)
#define TEA6300_TR 0x03 /* treble */
#define TEA6300_FA 0x04 /* fader control */
#define TEA6300_S 0x05 /* switch register */
- /* values for those registers: */
+ /* values for those registers: */
#define TEA6300_S_SA 0x01 /* stereo A input */
#define TEA6300_S_SB 0x02 /* stereo B */
#define TEA6300_S_SC 0x04 /* stereo C */
@@ -1072,7 +1072,7 @@ static int tda9874a_initialize(struct CHIPSTATE *chip)
#define TEA6320_BA 0x05 /* bass (0-4) */
#define TEA6320_TR 0x06 /* treble (0-4) */
#define TEA6320_S 0x07 /* switch register */
- /* values for those registers: */
+ /* values for those registers: */
#define TEA6320_S_SA 0x07 /* stereo A input */
#define TEA6320_S_SB 0x06 /* stereo B */
#define TEA6320_S_SC 0x05 /* stereo C */
@@ -1112,7 +1112,7 @@ static int tea6320_initialize(struct CHIPSTATE * chip)
#define TDA8425_BA 0x02 /* bass */
#define TDA8425_TR 0x03 /* treble */
#define TDA8425_S1 0x08 /* switch functions */
- /* values for those registers: */
+ /* values for those registers: */
#define TDA8425_S1_OFF 0xEE /* audio off (mute on) */
#define TDA8425_S1_CH1 0xCE /* audio channel 1 (mute off) - "linear stereo" mode */
#define TDA8425_S1_CH2 0xCF /* audio channel 2 (mute off) - "linear stereo" mode */
@@ -1178,7 +1178,7 @@ static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
/* bit definition of the RESET register, I2C data. */
#define PIC16C54_MISC_RESET_REMOTE_CTL 0x01 /* bit 0, Reset to receive the key */
- /* code of remote controller */
+ /* code of remote controller */
#define PIC16C54_MISC_MTS_MAIN 0x02 /* bit 1 */
#define PIC16C54_MISC_MTS_SAP 0x04 /* bit 2 */
#define PIC16C54_MISC_MTS_BOTH 0x08 /* bit 3 */
@@ -1311,7 +1311,7 @@ static struct CHIPDESC chiplist[] = {
.setmode = tda9840_setmode,
.checkmode = generic_checkmode,
- .init = { 2, { TDA9840_TEST, TDA9840_TEST_INT1SN
+ .init = { 2, { TDA9840_TEST, TDA9840_TEST_INT1SN
/* ,TDA9840_SW, TDA9840_MONO */} }
},
{
@@ -1497,7 +1497,7 @@ static struct CHIPDESC chiplist[] = {
.setmode = ta8874z_setmode,
.checkmode = generic_checkmode,
- .init = {2, { TA8874Z_MONO_SET, TA8874Z_SEPARATION_DEFAULT}},
+ .init = {2, { TA8874Z_MONO_SET, TA8874Z_SEPARATION_DEFAULT}},
},
{ .name = NULL } /* EOF */
};
@@ -1521,8 +1521,8 @@ static int chip_attach(struct i2c_adapter *adap, int addr,
return -ENOMEM;
memset(chip,0,sizeof(*chip));
memcpy(&chip->c,&client_template,sizeof(struct i2c_client));
- chip->c.adapter = adap;
- chip->c.addr = addr;
+ chip->c.adapter = adap;
+ chip->c.addr = addr;
i2c_set_clientdata(&chip->c, chip);
/* find description for the chip */
@@ -1542,18 +1542,18 @@ static int chip_attach(struct i2c_adapter *adap, int addr,
return -EIO;
}
tvaudio_info("%s found @ 0x%x (%s)\n", desc->name, addr<<1, adap->name);
- if (desc->flags) {
- tvaudio_dbg("matches:%s%s%s.\n",
- (desc->flags & CHIP_HAS_VOLUME) ? " volume" : "",
- (desc->flags & CHIP_HAS_BASSTREBLE) ? " bass/treble" : "",
- (desc->flags & CHIP_HAS_INPUTSEL) ? " audiomux" : "");
- }
+ if (desc->flags) {
+ tvaudio_dbg("matches:%s%s%s.\n",
+ (desc->flags & CHIP_HAS_VOLUME) ? " volume" : "",
+ (desc->flags & CHIP_HAS_BASSTREBLE) ? " bass/treble" : "",
+ (desc->flags & CHIP_HAS_INPUTSEL) ? " audiomux" : "");
+ }
/* fill required data structures */
strcpy(chip->c.name, desc->name);
chip->type = desc-chiplist;
chip->shadow.count = desc->registers+1;
- chip->prevmode = -1;
+ chip->prevmode = -1;
/* register */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c
index 581d40ce5..f2c6b244a 100644
--- a/linux/drivers/media/video/tveeprom.c
+++ b/linux/drivers/media/video/tveeprom.c
@@ -6,12 +6,12 @@
* which are:
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>
* Adjustments to fit a more general model and all bugs:
- Copyright (C) 2003 John Klar <linpvr at projectplasma.com>
+ Copyright (C) 2003 John Klar <linpvr at projectplasma.com>
* 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
@@ -57,25 +57,25 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#define tveeprom_info(fmt, arg...) do {\
printk(KERN_INFO "tveeprom %d-%04x: " fmt, \
- c->adapter->nr, c->addr , ##arg); } while (0)
+ c->adapter->nr, c->addr , ##arg); } while (0)
#define tveeprom_warn(fmt, arg...) do {\
printk(KERN_WARNING "tveeprom %d-%04x: " fmt, \
- c->adapter->nr, c->addr , ##arg); } while (0)
+ c->adapter->nr, c->addr , ##arg); } while (0)
#define tveeprom_dbg(fmt, arg...) do {\
if (debug) \
- printk(KERN_INFO "tveeprom %d-%04x: " fmt, \
- c->adapter->nr, c->addr , ##arg); } while (0)
+ printk(KERN_INFO "tveeprom %d-%04x: " fmt, \
+ c->adapter->nr, c->addr , ##arg); } while (0)
#else
#define tveeprom_info(fmt, arg...) do {\
printk(KERN_INFO "tveeprom %04x: " fmt, \
- c->addr , ##arg); } while (0)
+ c->addr , ##arg); } while (0)
#define tveeprom_warn(fmt, arg...) do {\
printk(KERN_WARNING "tveeprom %04x: " fmt, \
- c->addr , ##arg); } while (0)
+ c->addr , ##arg); } while (0)
#define tveeprom_dbg(fmt, arg...) do {\
if (debug) \
- printk(KERN_INFO "tveeprom %04x: " fmt, \
- c->addr , ##arg); } while (0)
+ printk(KERN_INFO "tveeprom %04x: " fmt, \
+ c->addr , ##arg); } while (0)
#endif
@@ -309,7 +309,7 @@ static const char *decoderIC[] = {
static int hasRadioTuner(int tunerType)
{
- switch (tunerType) {
+ switch (tunerType) {
case 18: //PNPEnv_TUNER_FR1236_MK2:
case 23: //PNPEnv_TUNER_FM1236:
case 38: //PNPEnv_TUNER_FMR1236:
@@ -341,12 +341,12 @@ static int hasRadioTuner(int tunerType)
case 89: //PNPEnv_TUNER_TCL_MFPE05_2:
case 92: //PNPEnv_TUNER_PHILIPS_FQ1236A_MK4:
return 1;
- }
- return 0;
+ }
+ return 0;
}
void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
- unsigned char *eeprom_data)
+ unsigned char *eeprom_data)
{
/* ----------------------------------------------
** The hauppauge eeprom format is tagged
@@ -741,7 +741,7 @@ tveeprom_detect_client(struct i2c_adapter *adapter,
client->driver = &i2c_driver_tveeprom;
client->flags = I2C_CLIENT_ALLOW_USE;
snprintf(client->name, sizeof(client->name), "tveeprom");
- i2c_attach_client(client);
+ i2c_attach_client(client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c
index bba440343..50df70b7e 100644
--- a/linux/drivers/media/video/tvmixer.c
+++ b/linux/drivers/media/video/tvmixer.c
@@ -1,5 +1,5 @@
/*
- * $Id: tvmixer.c,v 1.11 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: tvmixer.c,v 1.12 2005/10/16 12:13:58 mchehab Exp $
*/
#include <linux/module.h>
@@ -90,7 +90,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
{
struct video_audio va;
int left,right,ret,val = 0;
- struct TVMIXER *mix = file->private_data;
+ struct TVMIXER *mix = file->private_data;
struct i2c_client *client = mix->dev;
void __user *argp = (void __user *)arg;
int __user *p = argp;
@@ -98,25 +98,25 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
if (NULL == client)
return -ENODEV;
- if (cmd == SOUND_MIXER_INFO) {
- mixer_info info;
- strlcpy(info.id, "tv card", sizeof(info.id));
- strlcpy(info.name, client->name, sizeof(info.name));
- info.modify_counter = 42 /* FIXME */;
- if (copy_to_user(argp, &info, sizeof(info)))
- return -EFAULT;
- return 0;
- }
- if (cmd == SOUND_OLD_MIXER_INFO) {
- _old_mixer_info info;
- strlcpy(info.id, "tv card", sizeof(info.id));
- strlcpy(info.name, client->name, sizeof(info.name));
- if (copy_to_user(argp, &info, sizeof(info)))
- return -EFAULT;
- return 0;
- }
- if (cmd == OSS_GETVERSION)
- return put_user(SOUND_VERSION, p);
+ if (cmd == SOUND_MIXER_INFO) {
+ mixer_info info;
+ strlcpy(info.id, "tv card", sizeof(info.id));
+ strlcpy(info.name, client->name, sizeof(info.name));
+ info.modify_counter = 42 /* FIXME */;
+ if (copy_to_user(argp, &info, sizeof(info)))
+ return -EFAULT;
+ return 0;
+ }
+ if (cmd == SOUND_OLD_MIXER_INFO) {
+ _old_mixer_info info;
+ strlcpy(info.id, "tv card", sizeof(info.id));
+ strlcpy(info.name, client->name, sizeof(info.name));
+ if (copy_to_user(argp, &info, sizeof(info)))
+ return -EFAULT;
+ return 0;
+ }
+ if (cmd == OSS_GETVERSION)
+ return put_user(SOUND_VERSION, p);
if (_SIOC_DIR(cmd) & _SIOC_WRITE)
if (get_user(val, p))
@@ -192,8 +192,8 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
static int tvmixer_open(struct inode *inode, struct file *file)
{
- int i, minor = iminor(inode);
- struct TVMIXER *mix = NULL;
+ int i, minor = iminor(inode);
+ struct TVMIXER *mix = NULL;
struct i2c_client *client = NULL;
for (i = 0; i < DEV_MAX; i++) {
@@ -217,7 +217,7 @@ static int tvmixer_open(struct inode *inode, struct file *file)
if (client->adapter->owner)
try_module_get(client->adapter->owner);
#endif
- return 0;
+ return 0;
}
static int tvmixer_release(struct inode *inode, struct file *file)
@@ -246,15 +246,15 @@ static struct i2c_driver driver = {
.owner = THIS_MODULE,
#endif
.name = "tv card mixer driver",
- .id = I2C_DRIVERID_TVMIXER,
+ .id = I2C_DRIVERID_TVMIXER,
#ifdef I2C_DF_DUMMY
.flags = I2C_DF_DUMMY,
#else
.flags = I2C_DF_NOTIFY,
- .detach_adapter = tvmixer_adapters,
+ .detach_adapter = tvmixer_adapters,
#endif
- .attach_adapter = tvmixer_adapters,
- .detach_client = tvmixer_clients,
+ .attach_adapter = tvmixer_adapters,
+ .detach_client = tvmixer_clients,
};
static struct file_operations tvmixer_fops = {
diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c
index be0220f2b..d95342f46 100644
--- a/linux/drivers/media/video/v4l1-compat.c
+++ b/linux/drivers/media/video/v4l1-compat.c
@@ -1,5 +1,5 @@
/*
- * $Id: v4l1-compat.c,v 1.12 2005/10/08 17:14:25 mkrufky Exp $
+ * $Id: v4l1-compat.c,v 1.13 2005/10/16 12:13:58 mchehab Exp $
*
* Video for Linux Two
* Backward Compatibility Layer
@@ -988,7 +988,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
fmt->start[1] = fmt2->fmt.vbi.start[1];
fmt->count[1] = fmt2->fmt.vbi.count[1];
fmt->flags = fmt2->fmt.vbi.flags & 0x03;
- break;
+ break;
}
case VIDIOCSVBIFMT:
{
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 81a61e51b..f200b2aa4 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf.c,v 1.20 2005/10/09 18:07:06 mchehab Exp $
+ * $Id: video-buf.c,v 1.21 2005/10/16 12:13:58 mchehab Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -149,7 +149,7 @@ int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
data,size,dma->nr_pages);
down_read(&current->mm->mmap_sem);
- err = get_user_pages(current,current->mm,
+ err = get_user_pages(current,current->mm,
data & PAGE_MASK, dma->nr_pages,
rw == READ, 1, /* force */
dma->pages, NULL);
@@ -757,9 +757,9 @@ videobuf_read_zerocopy(struct videobuf_queue *q, char __user *data,
{
enum v4l2_field field;
unsigned long flags;
- int retval;
+ int retval;
- /* setup stuff */
+ /* setup stuff */
retval = -ENOMEM;
q->read_buf = videobuf_alloc(q->msize);
if (NULL == q->read_buf)
@@ -767,18 +767,18 @@ videobuf_read_zerocopy(struct videobuf_queue *q, char __user *data,
q->read_buf->memory = V4L2_MEMORY_USERPTR;
q->read_buf->baddr = (unsigned long)data;
- q->read_buf->bsize = count;
+ q->read_buf->bsize = count;
field = videobuf_next_field(q);
retval = q->ops->buf_prepare(q,q->read_buf,field);
if (0 != retval)
goto done;
- /* start capture & wait */
+ /* start capture & wait */
spin_lock_irqsave(q->irqlock,flags);
q->ops->buf_queue(q,q->read_buf);
spin_unlock_irqrestore(q->irqlock,flags);
- retval = videobuf_waiton(q->read_buf,0,0);
- if (0 == retval) {
+ retval = videobuf_waiton(q->read_buf,0,0);
+ if (0 == retval) {
videobuf_dma_pci_sync(q->pci,&q->read_buf->dma);
if (STATE_ERROR == q->read_buf->state)
retval = -EIO;
@@ -835,7 +835,7 @@ ssize_t videobuf_read_one(struct videobuf_queue *q,
}
/* wait until capture is done */
- retval = videobuf_waiton(q->read_buf, nonblocking, 1);
+ retval = videobuf_waiton(q->read_buf, nonblocking, 1);
if (0 != retval)
goto done;
videobuf_dma_pci_sync(q->pci,&q->read_buf->dma);
@@ -1108,7 +1108,7 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr,
dprintk(3,"nopage: fault @ %08lx [vma %08lx-%08lx]\n",
vaddr,vma->vm_start,vma->vm_end);
- if (vaddr > vma->vm_end)
+ if (vaddr > vma->vm_end)
return NOPAGE_SIGBUS;
page = alloc_page(GFP_USER);
if (!page)
diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c
index 204685dab..2a69d8e85 100644
--- a/linux/drivers/media/video/wm8775.c
+++ b/linux/drivers/media/video/wm8775.c
@@ -38,10 +38,10 @@ MODULE_LICENSE("GPL");
#define wm8775_err(fmt, arg...) do { \
printk(KERN_ERR "%s %d-%04x: " fmt, client->driver->name, \
- i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
+ i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
#define wm8775_info(fmt, arg...) do { \
printk(KERN_INFO "%s %d-%04x: " fmt, client->driver->name, \
- i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
+ i2c_adapter_id(client->adapter), client->addr , ## arg); } while (0)
static unsigned short normal_i2c[] = { 0x36 >> 1, I2C_CLIENT_END };
diff --git a/linux/drivers/usb/media/em2820-cards.c b/linux/drivers/usb/media/em2820-cards.c
index 1d733a980..c079c418f 100644
--- a/linux/drivers/usb/media/em2820-cards.c
+++ b/linux/drivers/usb/media/em2820-cards.c
@@ -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>
diff --git a/linux/drivers/usb/media/em2820-core.c b/linux/drivers/usb/media/em2820-core.c
index eb75151a8..986c6babf 100644
--- a/linux/drivers/usb/media/em2820-core.c
+++ b/linux/drivers/usb/media/em2820-core.c
@@ -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>
@@ -38,27 +38,27 @@ 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;
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;
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);
diff --git a/linux/drivers/usb/media/em2820-i2c.c b/linux/drivers/usb/media/em2820-i2c.c
index f43053c45..cdf18ec47 100644
--- a/linux/drivers/usb/media/em2820-i2c.c
+++ b/linux/drivers/usb/media/em2820-i2c.c
@@ -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>
diff --git a/linux/drivers/usb/media/em2820-input.c b/linux/drivers/usb/media/em2820-input.c
index 3edf43f4c..62477e6e4 100644
--- a/linux/drivers/usb/media/em2820-input.c
+++ b/linux/drivers/usb/media/em2820-input.c
@@ -1,5 +1,5 @@
/*
- * $Id: em2820-input.c,v 1.4 2005/10/15 09:20:35 nsh Exp $
+ * $Id: em2820-input.c,v 1.5 2005/10/16 12:13:58 mchehab Exp $
*
* handle saa7134 IR remotes via linux kernel input layer.
*
@@ -45,34 +45,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,
};
/* ----------------------------------------------------------------------- */
diff --git a/linux/drivers/usb/media/em2820-video.c b/linux/drivers/usb/media/em2820-video.c
index 6e745d99b..4323e6b26 100644
--- a/linux/drivers/usb/media/em2820-video.c
+++ b/linux/drivers/usb/media/em2820-video.c
@@ -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);
diff --git a/linux/drivers/usb/media/em2820.h b/linux/drivers/usb/media/em2820.h
index 9e2ac13fe..d666d37ec 100644
--- a/linux/drivers/usb/media/em2820.h
+++ b/linux/drivers/usb/media/em2820.h
@@ -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>
@@ -391,17 +391,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)
diff --git a/linux/include/linux/videodev.h b/linux/include/linux/videodev.h
index d2d8928ec..b060da77d 100644
--- a/linux/include/linux/videodev.h
+++ b/linux/include/linux/videodev.h
@@ -230,9 +230,9 @@ struct video_audio
#define VIDEO_SOUND_STEREO 2
#define VIDEO_SOUND_LANG1 4
#define VIDEO_SOUND_LANG2 8
- __u16 mode;
- __u16 balance; /* Stereo balance */
- __u16 step; /* Step actual volume uses */
+ __u16 mode;
+ __u16 balance; /* Stereo balance */
+ __u16 step; /* Step actual volume uses */
};
struct video_clip
diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
index 04c2b73a1..480bec196 100644
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -24,7 +24,7 @@
/* Four-character-code (FOURCC) */
#define v4l2_fourcc(a,b,c,d)\
- (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
+ (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24))
/*
* E N U M S
@@ -154,20 +154,20 @@ struct v4l2_capability
};
/* Values for 'capabilities' field */
-#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */
-#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */
-#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */
-#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */
-#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */
+#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */
+#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */
+#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */
+#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */
+#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */
#if 1 /*KEEP*/
#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */
#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */
#endif
-#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
+#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
-#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
-#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
-#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
+#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
+#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
+#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
@@ -179,13 +179,13 @@ struct v4l2_capability
struct v4l2_pix_format
{
- __u32 width;
- __u32 height;
- __u32 pixelformat;
+ __u32 width;
+ __u32 height;
+ __u32 pixelformat;
enum v4l2_field field;
__u32 bytesperline; /* for padding, zero if unused */
- __u32 sizeimage;
- enum v4l2_colorspace colorspace;
+ __u32 sizeimage;
+ enum v4l2_colorspace colorspace;
__u32 priv; /* private data, depends on pixelformat */
};
@@ -238,12 +238,12 @@ struct v4l2_pix_format
*/
struct v4l2_fmtdesc
{
- __u32 index; /* Format number */
+ __u32 index; /* Format number */
enum v4l2_buf_type type; /* buffer type */
__u32 flags;
- __u8 description[32]; /* Description string */
- __u32 pixelformat; /* Format fourcc */
- __u32 reserved[4];
+ __u8 description[32]; /* Description string */
+ __u32 pixelformat; /* Format fourcc */
+ __u32 reserved[4];
};
#define V4L2_FMT_FLAG_COMPRESSED 0x0001
@@ -395,7 +395,7 @@ struct v4l2_jpegcompression
#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */
#define V4L2_JPEG_MARKER_COM (1<<6) /* Comment segment */
#define V4L2_JPEG_MARKER_APP (1<<7) /* App segment, driver will
- * allways use APP0 */
+ * allways use APP0 */
};
@@ -404,10 +404,10 @@ struct v4l2_jpegcompression
*/
struct v4l2_requestbuffers
{
- __u32 count;
+ __u32 count;
enum v4l2_buf_type type;
enum v4l2_memory memory;
- __u32 reserved[2];
+ __u32 reserved[2];
};
struct v4l2_buffer
@@ -513,9 +513,9 @@ struct v4l2_outputparm
struct v4l2_cropcap {
enum v4l2_buf_type type;
- struct v4l2_rect bounds;
- struct v4l2_rect defrect;
- struct v4l2_fract pixelaspect;
+ struct v4l2_rect bounds;
+ struct v4l2_rect defrect;
+ struct v4l2_fract pixelaspect;
};
struct v4l2_crop {
@@ -589,7 +589,7 @@ typedef __u64 v4l2_std_id;
V4L2_STD_PAL_Nc |\
V4L2_STD_SECAM)
#define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\
- V4L2_STD_ATSC_16_VSB)
+ V4L2_STD_ATSC_16_VSB)
#define V4L2_STD_UNKNOWN 0
#define V4L2_STD_ALL (V4L2_STD_525_60 |\
@@ -597,7 +597,7 @@ typedef __u64 v4l2_std_id;
struct v4l2_standard
{
- __u32 index;
+ __u32 index;
v4l2_std_id id;
__u8 name[24];
struct v4l2_fract frameperiod; /* Frames, not fields */
@@ -612,9 +612,9 @@ struct v4l2_standard
struct v4l2_input
{
__u32 index; /* Which input */
- __u8 name[32]; /* Label */
+ __u8 name[32]; /* Label */
__u32 type; /* Type of input */
- __u32 audioset; /* Associated audios (bitfield) */
+ __u32 audioset; /* Associated audios (bitfield) */
__u32 tuner; /* Associated tuner */
v4l2_std_id std;
__u32 status;
@@ -649,9 +649,9 @@ struct v4l2_input
struct v4l2_output
{
__u32 index; /* Which output */
- __u8 name[32]; /* Label */
+ __u8 name[32]; /* Label */
__u32 type; /* Type of output */
- __u32 audioset; /* Associated audios (bitfield) */
+ __u32 audioset; /* Associated audios (bitfield) */
__u32 modulator; /* Associated modulator */
v4l2_std_id std;
__u32 reserved[4];
@@ -673,12 +673,12 @@ struct v4l2_control
/* Used in the VIDIOC_QUERYCTRL ioctl for querying controls */
struct v4l2_queryctrl
{
- __u32 id;
+ __u32 id;
enum v4l2_ctrl_type type;
__u8 name[32]; /* Whatever */
__s32 minimum; /* Note signedness */
__s32 maximum;
- __s32 step;
+ __s32 step;
__s32 default_value;
__u32 flags;
__u32 reserved[2];
@@ -781,10 +781,10 @@ struct v4l2_modulator
struct v4l2_frequency
{
- __u32 tuner;
+ __u32 tuner;
enum v4l2_tuner_type type;
- __u32 frequency;
- __u32 reserved[8];
+ __u32 frequency;
+ __u32 reserved[8];
};
/*
@@ -848,14 +848,14 @@ struct v4l2_vbi_format
struct v4l2_sliced_vbi_format
{
- __u16 service_set;
- /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
- service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
- (equals frame lines 313-336 for 625 line video
- standards, 263-286 for 525 line standards) */
- __u16 service_lines[2][24];
- __u32 io_size;
- __u32 reserved[2]; /* must be zero */
+ __u16 service_set;
+ /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
+ service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
+ (equals frame lines 313-336 for 625 line video
+ standards, 263-286 for 525 line standards) */
+ __u16 service_lines[2][24];
+ __u32 io_size;
+ __u32 reserved[2]; /* must be zero */
};
#define V4L2_SLICED_TELETEXT_B (0x0001)
@@ -868,22 +868,22 @@ struct v4l2_sliced_vbi_format
struct v4l2_sliced_vbi_cap
{
- __u16 service_set;
- /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
- service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
- (equals frame lines 313-336 for 625 line video
- standards, 263-286 for 525 line standards) */
- __u16 service_lines[2][24];
- __u32 reserved[4]; /* must be 0 */
+ __u16 service_set;
+ /* service_lines[0][...] specifies lines 0-23 (1-23 used) of the first field
+ service_lines[1][...] specifies lines 0-23 (1-23 used) of the second field
+ (equals frame lines 313-336 for 625 line video
+ standards, 263-286 for 525 line standards) */
+ __u16 service_lines[2][24];
+ __u32 reserved[4]; /* must be 0 */
};
struct v4l2_sliced_vbi_data
{
- __u32 id;
- __u32 field; /* 0: first field, 1: second field */
- __u32 line; /* 1-23 */
- __u32 reserved; /* must be 0 */
- __u8 data[48];
+ __u32 id;
+ __u32 field; /* 0: first field, 1: second field */
+ __u32 line; /* 1-23 */
+ __u32 reserved; /* must be 0 */
+ __u8 data[48];
};
#endif
@@ -898,9 +898,9 @@ struct v4l2_format
enum v4l2_buf_type type;
union
{
- struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE
- struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY
- struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE
+ struct v4l2_pix_format pix; // V4L2_BUF_TYPE_VIDEO_CAPTURE
+ struct v4l2_window win; // V4L2_BUF_TYPE_VIDEO_OVERLAY
+ struct v4l2_vbi_format vbi; // V4L2_BUF_TYPE_VBI_CAPTURE
#if 1 /*KEEP*/
struct v4l2_sliced_vbi_format sliced; // V4L2_BUF_TYPE_SLICED_VBI_CAPTURE
#endif
diff --git a/linux/include/media/audiochip.h b/linux/include/media/audiochip.h
index ed7a2e096..0807ea262 100644
--- a/linux/include/media/audiochip.h
+++ b/linux/include/media/audiochip.h
@@ -1,5 +1,5 @@
/*
- * $Id: audiochip.h,v 1.6 2005/10/02 11:42:43 mchehab Exp $
+ * $Id: audiochip.h,v 1.7 2005/10/16 12:13:58 mchehab Exp $
*/
#ifndef AUDIOCHIP_H
@@ -11,13 +11,13 @@ enum audiochip {
/* Provided by video chip */
AUDIO_CHIP_INTERNAL,
/* Provided by tvaudio.c */
- AUDIO_CHIP_TDA8425,
- AUDIO_CHIP_TEA6300,
- AUDIO_CHIP_TEA6420,
- AUDIO_CHIP_TDA9840,
- AUDIO_CHIP_TDA985X,
- AUDIO_CHIP_TDA9874,
- AUDIO_CHIP_PIC16C54,
+ AUDIO_CHIP_TDA8425,
+ AUDIO_CHIP_TEA6300,
+ AUDIO_CHIP_TEA6420,
+ AUDIO_CHIP_TDA9840,
+ AUDIO_CHIP_TDA985X,
+ AUDIO_CHIP_TDA9874,
+ AUDIO_CHIP_PIC16C54,
/* Provided by msp3400.c */
AUDIO_CHIP_MSP34XX
};
diff --git a/linux/include/media/i2c-compat.h b/linux/include/media/i2c-compat.h
index 4f8fbd022..39fa183fa 100644
--- a/linux/include/media/i2c-compat.h
+++ b/linux/include/media/i2c-compat.h
@@ -1,5 +1,5 @@
/*
- * $Id: i2c-compat.h,v 1.2 2005/06/12 04:19:19 mchehab Exp $
+ * $Id: i2c-compat.h,v 1.3 2005/10/16 12:13:58 mchehab Exp $
*
* some i2c layer compatibility stuff -- to avoid cluttering up the
* i2c modules with tons of #ifdefs
@@ -19,7 +19,7 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data)
static inline void *i2c_get_clientdata(struct i2c_client *dev)
{
- return dev->data;
+ return dev->data;
}
static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
diff --git a/linux/include/media/saa6752hs.h b/linux/include/media/saa6752hs.h
index 791bad2b8..3f81c0d9e 100644
--- a/linux/include/media/saa6752hs.h
+++ b/linux/include/media/saa6752hs.h
@@ -56,7 +56,7 @@ struct mpeg_params {
enum mpeg_audio_bitrate audio_bitrate;
unsigned int total_bitrate;
- unsigned int pmt_pid;
+ unsigned int pmt_pid;
unsigned int video_pid;
unsigned int audio_pid;
unsigned int pcr_pid;
diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h
index 9cc9cf396..4dadb1ea0 100644
--- a/linux/include/media/tuner.h
+++ b/linux/include/media/tuner.h
@@ -1,4 +1,4 @@
-/* $Id: tuner.h,v 1.56 2005/10/15 13:13:42 nsh Exp $
+/* $Id: tuner.h,v 1.57 2005/10/16 12:13:58 mchehab Exp $
*
tuner.h - definition for different tuners
@@ -216,14 +216,14 @@ extern int tea5767_autodetection(struct i2c_client *c);
#define tuner_warn(fmt, arg...) do {\
printk(KERN_WARNING "%s %d-%04x: " fmt, t->i2c.driver->name, \
- t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
+ t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
#define tuner_info(fmt, arg...) do {\
printk(KERN_INFO "%s %d-%04x: " fmt, t->i2c.driver->name, \
- t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
+ t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
#define tuner_dbg(fmt, arg...) do {\
if (tuner_debug) \
- printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \
- t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
+ printk(KERN_DEBUG "%s %d-%04x: " fmt, t->i2c.driver->name, \
+ t->i2c.adapter->nr, t->i2c.addr , ##arg); } while (0)
#endif /* __KERNEL__ */
diff --git a/linux/include/media/video-buf.h b/linux/include/media/video-buf.h
index ae6da6de9..d5297072d 100644
--- a/linux/include/media/video-buf.h
+++ b/linux/include/media/video-buf.h
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf.h,v 1.9 2004/11/07 13:17:15 kraxel Exp $
+ * $Id: video-buf.h,v 1.10 2005/10/16 12:13:58 mchehab Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -178,7 +178,7 @@ struct videobuf_queue_ops {
};
struct videobuf_queue {
- struct semaphore lock;
+ struct semaphore lock;
spinlock_t *irqlock;
struct pci_dev *pci;
diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c
index c5557eaf3..bc55fbf06 100644
--- a/linux/sound/pci/bt87x.c
+++ b/linux/sound/pci/bt87x.c
@@ -132,8 +132,8 @@ MODULE_PARM_DESC(load_all, "Allow to load the non-whitelisted cards");
/* RISC instruction bits */
#define RISC_BYTES_ENABLE (0xf << 12) /* byte enable bits */
#define RISC_RESYNC ( 1 << 15) /* disable FDSR errors */
-#define RISC_SET_STATUS_SHIFT 16 /* set status bits */
-#define RISC_RESET_STATUS_SHIFT 20 /* clear status bits */
+#define RISC_SET_STATUS_SHIFT 16 /* set status bits */
+#define RISC_RESET_STATUS_SHIFT 20 /* clear status bits */
#define RISC_IRQ ( 1 << 24) /* interrupt */
#define RISC_EOL ( 1 << 26) /* end of line */
#define RISC_SOL ( 1 << 27) /* start of line */
@@ -196,7 +196,7 @@ static inline void snd_bt87x_writel(bt87x_t *chip, u32 reg, u32 value)
}
static int snd_bt87x_create_risc(bt87x_t *chip, snd_pcm_substream_t *substream,
- unsigned int periods, unsigned int period_bytes)
+ unsigned int periods, unsigned int period_bytes)
{
struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
unsigned int i, offset;
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 41cec38e2..d35eb2656 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,152 @@
+2005-10-16 11:46 mchehab
+ * ../v4l/scripts/strip-trailing-whitespaces.sh:
+ - Improved to change initial spaces for tab
+
+ * ../linux/Documentation/video4linux/README.cx88:
+ * ../linux/Documentation/video4linux/bttv/Cards:
+ * ../linux/Documentation/video4linux/bttv/README:
+ * ../linux/Documentation/video4linux/bttv/Sound-FAQ:
+ * ../linux/Documentation/video4linux/lifeview.txt:
+ * ../linux/drivers/media/common/ir-common.c: (ir_input_key_event),
+ (ir_input_init):
+ * ../linux/drivers/media/video/bt832.c: (bt832_hexdump),
+ (bt832_init), (bt832_attach), (bt832_command):
+ * ../linux/drivers/media/video/bt832.h:
+ * ../linux/drivers/media/video/bttv-cards.c: (identify_by_eeprom),
+ (flyvideo_gpio), (miro_pinnacle_gpio), (gvc1100_muxsel),
+ (bttv_init_card1), (bttv_init_card2), (modtec_eeprom),
+ (pvr_altera_load), (pvr_boot), (osprey_eeprom), (avermedia_eeprom),
+ (bttv_tda9880_setnorm), (boot_msp34xx), (init_PXC200),
+ (lt9415_audio), (windvr_audio), (xguard_muxsel), (PXC200_muxsel):
+ * ../linux/drivers/media/video/bttv-driver.c: (set_pll_freq),
+ (set_pll), (bt848A_set_timing), (bt848_hue), (bt848_contrast),
+ (bt848_sat), (video_mux), (init_bt848), (bttv_reinit_bt848),
+ (bttv_prepare_buffer), (bttv_common_ioctls), (bttv_s_fmt),
+ (bttv_do_ioctl), (radio_open), (radio_do_ioctl), (bttv_irq),
+ (bttv_register_video), (pci_set_command):
+ * ../linux/drivers/media/video/bttv-gpio.c:
+ * ../linux/drivers/media/video/bttv-i2c.c: (bttv_i2c_readbytes),
+ (attach_inform), (bttv_I2CRead), (bttv_I2CWrite), (init_bttv_i2c):
+ * ../linux/drivers/media/video/bttv-if.c:
+ * ../linux/drivers/media/video/bttv-risc.c: (bttv_risc_packed),
+ (bttv_risc_planar), (bttv_calc_geo), (bttv_apply_geo),
+ (bttv_set_dma), (bttv_risc_init_main):
+ * ../linux/drivers/media/video/bttv.h:
+ * ../linux/drivers/media/video/bttvp.h:
+ * ../linux/drivers/media/video/cx88/cx88-alsa.c: (snd_cx88_create):
+ * ../linux/drivers/media/video/cx88/cx88-blackbird.c:
+ (memory_read), (blackbird_load_firmware),
+ (blackbird_set_default_params), (blackbird_set_params),
+ (blackbird_remove):
+ * ../linux/drivers/media/video/cx88/cx88-cards.c:
+ * ../linux/drivers/media/video/cx88/cx88-core.c: (cx88_risc_field),
+ (cx88_core_get):
+ * ../linux/drivers/media/video/cx88/cx88-dvb.c:
+ (dntv_live_dvbt_demod_init), (dvb_remove):
+ * ../linux/drivers/media/video/cx88/cx88-i2c.c: (attach_inform),
+ (cx88_i2c_init):
+ * ../linux/drivers/media/video/cx88/cx88-input.c: (cx88_ir_irq):
+ * ../linux/drivers/media/video/cx88/cx88-mpeg.c: (cx8802_mpeg_irq),
+ (cx8802_init_common), (cx8802_suspend_common):
+ * ../linux/drivers/media/video/cx88/cx88-reg.h:
+ * ../linux/drivers/media/video/cx88/cx88-video.c:
+ (restart_video_queue), (ov_risc_frame), (verify_window),
+ (video_open), (set_control), (cx88_do_ioctl), (radio_do_ioctl),
+ (cx8800_initdev), (cx8800_finidev):
+ * ../linux/drivers/media/video/cx88/cx88.h:
+ * ../linux/drivers/media/video/ir-kbd-gpio.c: (ir_probe):
+ * ../linux/drivers/media/video/ir-kbd-i2c.c: (get_key_pixelview),
+ (get_key_pv951), (get_key_purpletv), (ir_attach), (ir_detach):
+ * ../linux/drivers/media/video/msp3400.c: (msp3400c_reset),
+ (msp3400c_read), (msp3400c_write), (watch_stereo), (msp_attach),
+ (msp_command):
+ * ../linux/drivers/media/video/mt20xx.c: (mt2032_compute_freq),
+ (mt2032_check_lo_lock), (mt2032_optimize_vco),
+ (mt2032_set_if_freq), (mt2032_set_tv_freq),
+ (mt2032_set_radio_freq), (mt2032_init), (mt2050_set_if_freq),
+ (mt2050_set_tv_freq), (microtune_init):
+ * ../linux/drivers/media/video/saa6752hs.c:
+ (saa6752hs_chip_command), (saa6752hs_set_bitrate),
+ (saa6752hs_init), (saa6752hs_attach), (saa6752hs_command):
+ * ../linux/drivers/media/video/saa7113.c:
+ * ../linux/drivers/media/video/saa7134/saa7134-alsa.c:
+ (saa7134_dma_stop), (saa7134_dma_start), (saa7134_irq_alsa_done),
+ (dsp_buffer_conf), (dsp_buffer_init),
+ (snd_card_saa7134_capture_prepare),
+ (snd_card_saa7134_capture_pointer), (dsp_buffer_free),
+ (snd_card_saa7134_capture_close), (snd_card_saa7134_capture_open),
+ (snd_saa7134_volume_put), (snd_saa7134_capsrc_put),
+ (snd_saa7134_dev_free), (alsa_card_saa7134_create),
+ (alsa_card_saa7134_exit):
+ * ../linux/drivers/media/video/saa7134/saa7134-cards.c:
+ (saa7134_board_init2):
+ * ../linux/drivers/media/video/saa7134/saa7134-core.c:
+ (pending_call), (saa7134_pgtable_alloc), (saa7134_set_dmabits),
+ (saa7134_hwinit1), (saa7134_hwinit2), (saa7134_initdev),
+ (saa7134_finidev):
+ * ../linux/drivers/media/video/saa7134/saa7134-dvb.c:
+ (philips_tda827x_pll_set), (philips_tda827x_pll_sleep):
+ * ../linux/drivers/media/video/saa7134/saa7134-empress.c:
+ (ts_reset_encoder), (ts_init_encoder), (ts_do_ioctl):
+ * ../linux/drivers/media/video/saa7134/saa7134-i2c.c:
+ (saa7134_i2c_xfer), (attach_inform):
+ * ../linux/drivers/media/video/saa7134/saa7134-input.c:
+ (build_key), (saa7134_input_irq), (saa7134_input_init1):
+ * ../linux/drivers/media/video/saa7134/saa7134-oss.c:
+ (dsp_buffer_conf), (dsp_ioctl), (mixer_recsrc_7133), (mixer_ioctl),
+ (saa7134_oss_init1):
+ * ../linux/drivers/media/video/saa7134/saa7134-reg.h:
+ * ../linux/drivers/media/video/saa7134/saa7134-ts.c:
+ (buffer_prepare):
+ * ../linux/drivers/media/video/saa7134/saa7134-tvaudio.c:
+ (mute_input_7134), (mute_input_7133):
+ * ../linux/drivers/media/video/saa7134/saa7134-video.c: (set_size),
+ (verify_preview), (video_poll), (video_do_ioctl), (radio_do_ioctl),
+ (saa7134_video_init1):
+ * ../linux/drivers/media/video/saa7134/saa7134.h:
+ * ../linux/drivers/media/video/tda7432.c: (tda7432_attach),
+ (tda7432_command):
+ * ../linux/drivers/media/video/tda8290.c:
+ * ../linux/drivers/media/video/tda9875.c: (i2c_read_register),
+ (do_tda9875_init), (tda9875_attach), (tda9875_command):
+ * ../linux/drivers/media/video/tda9887.c: (tda9887_set_pinnacle),
+ (tda9887_status), (tda9887_configure), (tda9887_attach),
+ (tda9887_command):
+ * ../linux/drivers/media/video/tea5767.c:
+ * ../linux/drivers/media/video/tuner-core.c: (set_mode),
+ (tuner_command):
+ * ../linux/drivers/media/video/tuner-simple.c: (tuner_stereo),
+ (tuner_islocked), (tuner_afcstatus), (tuner_mode),
+ (default_set_tv_freq), (default_set_radio_freq):
+ * ../linux/drivers/media/video/tvaudio.c: (chip_attach):
+ * ../linux/drivers/media/video/tveeprom.c: (hasRadioTuner),
+ (tveeprom_hauppauge_analog), (tveeprom_detect_client):
+ * ../linux/drivers/media/video/tvmixer.c: (tvmixer_ioctl),
+ (tvmixer_open):
+ * ../linux/drivers/media/video/v4l1-compat.c:
+ (v4l_compat_translate_ioctl):
+ * ../linux/drivers/media/video/video-buf.c:
+ (videobuf_dma_init_user), (videobuf_read_zerocopy),
+ (videobuf_read_one), (videobuf_vm_nopage):
+ * ../linux/drivers/media/video/wm8775.c:
+ * ../linux/drivers/usb/media/em2820-cards.c:
+ * ../linux/drivers/usb/media/em2820-core.c:
+ * ../linux/drivers/usb/media/em2820-i2c.c:
+ * ../linux/drivers/usb/media/em2820-input.c:
+ * ../linux/drivers/usb/media/em2820-video.c:
+ * ../linux/drivers/usb/media/em2820.h:
+ * ../linux/include/linux/videodev.h:
+ * ../linux/include/linux/videodev2.h:
+ * ../linux/include/media/audiochip.h:
+ * ../linux/include/media/i2c-compat.h:
+ * ../linux/include/media/saa6752hs.h:
+ * ../linux/include/media/tuner.h:
+ * ../linux/include/media/video-buf.h:
+ * ../linux/sound/pci/bt87x.c: (snd_bt87x_create_risc):
+ - Whitespace cleanups
+
+ Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
+
2005-10-16 06:11 nshmyrev
* ../linux/drivers/media/video/bttv-cards.c:
diff --git a/v4l/i2c-compat.h b/v4l/i2c-compat.h
index 4f8fbd022..39fa183fa 100644
--- a/v4l/i2c-compat.h
+++ b/v4l/i2c-compat.h
@@ -1,5 +1,5 @@
/*
- * $Id: i2c-compat.h,v 1.2 2005/06/12 04:19:19 mchehab Exp $
+ * $Id: i2c-compat.h,v 1.3 2005/10/16 12:13:58 mchehab Exp $
*
* some i2c layer compatibility stuff -- to avoid cluttering up the
* i2c modules with tons of #ifdefs
@@ -19,7 +19,7 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data)
static inline void *i2c_get_clientdata(struct i2c_client *dev)
{
- return dev->data;
+ return dev->data;
}
static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh
index ea4f28752..ea3e4defa 100644
--- a/v4l/scripts/strip-trailing-whitespaces.sh
+++ b/v4l/scripts/strip-trailing-whitespaces.sh
@@ -10,7 +10,22 @@ for file in `find linux -type d | grep -v CVS | grep -v .cvsignore` ; do
done
for file in `find linux -type f | grep -v CVS | grep -v .cvsignore` ; do
tmpfile="$WORK/${file}.$$"
- perl -ne 's/[ \t]+$//; print' < "${file}" > "${tmpfile}"
+ perl -ne 's/[ \t]+$//;
+ s/^\ \ \ \ \ \ \ \ /\t/;
+ s/^\ \ \ \ \ \ \ \t/\t/;
+ s/^\ \ \ \ \ \ \t/\t/;
+ s/^\ \ \ \ \ \t/\t/;
+ s/^\ \ \ \t/\t/;
+ s/^\ \ \t/\t/;
+ s/^\ \t/\t/;
+ s/\t\ \ \ \ \ \ \ \ /\t\t/g;
+ s/\t\ \ \ \ \ \ \ \t/\t\t/g;
+ s/\t\ \ \ \ \ \ \t/\t\t/g;
+ s/\t\ \ \ \ \ \t/\t\t/g;
+ s/\t\ \ \ \t/\t\t/g;
+ s/\t\ \ \t/\t\t/g;
+ s/\t\ \t/\t\t/g;
+ print' < "${file}" > "${tmpfile}"
diff -u "${file}" "${tmpfile}" | sed \
-e "s|^--- ${file}|--- ${file}.orig|" \
-e "s|^+++ ${tmpfile}|+++ ${file}|"