Commit 4ac97914 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Linus Torvalds

[PATCH] v4l: 800: whitespace cleanups

- Whitespace Cleanups.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a8900fc2
......@@ -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.
......
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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 */
......@@ -116,7 +116,7 @@ IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = {
[ 46 ] = KEY_BLUE,
[ 24 ] = KEY_KPPLUS, /* fine tune + */
[ 25 ] = KEY_KPMINUS, /* fine tune - */
[ 33 ] = KEY_KPDOT,
[ 33 ] = KEY_KPDOT,
[ 19 ] = KEY_KPENTER,
[ 34 ] = KEY_BACK,
[ 35 ] = KEY_PLAYPAUSE,
......@@ -239,7 +239,7 @@ static void ir_input_key_event(struct input_dev *dev, struct ir_input_state *ir)
dprintk(1,"%s: key event code=%d down=%d\n",
dev->name,ir->keycode,ir->keypressed);
input_report_key(dev,ir->keycode,ir->keypressed);
input_sync(dev);
input_sync(dev);
}
/* -------------------------------------------------------------------------- */
......
......@@ -54,36 +54,36 @@ static struct i2c_driver driver;
static struct i2c_client client_template;
struct bt832 {
struct i2c_client client;
struct i2c_client client;
};
int bt832_hexdump(struct i2c_client *i2c_client_s, unsigned char *buf)
{
int i,rc;
buf[0]=0x80; // start at register 0 with auto-increment
if (1 != (rc = i2c_master_send(i2c_client_s,buf,1)))
printk("bt832: i2c i/o error: rc == %d (should be 1)\n",rc);
if (1 != (rc = i2c_master_send(i2c_client_s,buf,1)))
printk("bt832: i2c i/o error: rc == %d (should be 1)\n",rc);
for(i=0;i<65;i++)
buf[i]=0;
if (65 != (rc=i2c_master_recv(i2c_client_s,buf,65)))
printk("bt832: i2c i/o error: rc == %d (should be 65)\n",rc);
for(i=0;i<65;i++)
buf[i]=0;
if (65 != (rc=i2c_master_recv(i2c_client_s,buf,65)))
printk("bt832: i2c i/o error: rc == %d (should be 65)\n",rc);
// Note: On READ the first byte is the current index
// (e.g. 0x80, what we just wrote)
// Note: On READ the first byte is the current index
// (e.g. 0x80, what we just wrote)
if(1) {
int i;
printk("BT832 hexdump:\n");
for(i=1;i<65;i++) {
if(1) {
int i;
printk("BT832 hexdump:\n");
for(i=1;i<65;i++) {
if(i!=1) {
if(((i-1)%8)==0) printk(" ");
if(((i-1)%16)==0) printk("\n");
if(((i-1)%16)==0) printk("\n");
}
printk(" %02x",buf[i]);
}
printk("\n");
}
printk(" %02x",buf[i]);
}
printk("\n");
}
return 0;
}
......@@ -102,13 +102,13 @@ int bt832_init(struct i2c_client *i2c_client_s)
return 0;
}
printk("Write 0 tp VPSTATUS\n");
buf[0]=BT832_VP_STATUS; // Reg.52
buf[1]= 0x00;
if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
printk("Write 0 tp VPSTATUS\n");
buf[0]=BT832_VP_STATUS; // Reg.52
buf[1]= 0x00;
if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
bt832_hexdump(i2c_client_s,buf);
bt832_hexdump(i2c_client_s,buf);
// Leave low power mode:
......@@ -116,17 +116,17 @@ int bt832_init(struct i2c_client *i2c_client_s)
buf[0]=BT832_CAM_SETUP0; //0x39 57
buf[1]=0x08;
if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
printk("bt832: i2c i/o error LLPM: rc == %d (should be 2)\n",rc);
printk("bt832: i2c i/o error LLPM: rc == %d (should be 2)\n",rc);
bt832_hexdump(i2c_client_s,buf);
bt832_hexdump(i2c_client_s,buf);
printk("Write 0 tp VPSTATUS\n");
buf[0]=BT832_VP_STATUS; // Reg.52
buf[1]= 0x00;
if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
buf[0]=BT832_VP_STATUS; // Reg.52
buf[1]= 0x00;
if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
printk("bt832: i2c i/o error VPS: rc == %d (should be 2)\n",rc);
bt832_hexdump(i2c_client_s,buf);
bt832_hexdump(i2c_client_s,buf);
// Enable Output
......@@ -134,22 +134,22 @@ int bt832_init(struct i2c_client *i2c_client_s)
buf[0]=BT832_VP_CONTROL1; // Reg.40
buf[1]= 0x27 & (~0x01); // Default | !skip
if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
printk("bt832: i2c i/o error EO: rc == %d (should be 2)\n",rc);
printk("bt832: i2c i/o error EO: rc == %d (should be 2)\n",rc);
bt832_hexdump(i2c_client_s,buf);
bt832_hexdump(i2c_client_s,buf);
// for testing (even works when no camera attached)
printk("bt832: *** Generate NTSC M Bars *****\n");
buf[0]=BT832_VP_TESTCONTROL0; // Reg. 42
buf[1]=3; // Generate NTSC System M bars, Generate Frame timing internally
if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
printk("bt832: i2c i/o error MBAR: rc == %d (should be 2)\n",rc);
if (2 != (rc = i2c_master_send(i2c_client_s,buf,2)))
printk("bt832: i2c i/o error MBAR: rc == %d (should be 2)\n",rc);
printk("Bt832: Camera Present: %s\n",
(buf[1+BT832_CAM_STATUS] & BT832_56_CAMERA_PRESENT) ? "yes":"no");
bt832_hexdump(i2c_client_s,buf);
bt832_hexdump(i2c_client_s,buf);
kfree(buf);
return 1;
}
......@@ -162,17 +162,17 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, int kind)
printk("bt832_attach\n");
client_template.adapter = adap;
client_template.addr = addr;
client_template.adapter = adap;
client_template.addr = addr;
printk("bt832: chip found @ 0x%x\n", addr<<1);
printk("bt832: chip found @ 0x%x\n", addr<<1);
if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL)))
return -ENOMEM;
if (NULL == (t = kmalloc(sizeof(*t), GFP_KERNEL)))
return -ENOMEM;
memset(t,0,sizeof(*t));
t->client = client_template;
i2c_set_clientdata(&t->client, t);
i2c_attach_client(&t->client);
i2c_set_clientdata(&t->client, t);
i2c_attach_client(&t->client);
if(! bt832_init(&t->client)) {
bt832_detach(&t->client);
......@@ -211,7 +211,7 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
printk("bt832: command %x\n",cmd);
switch (cmd) {
switch (cmd) {
case BT832_HEXDUMP: {
unsigned char *buf;
buf=kmalloc(65,GFP_KERNEL);
......
......@@ -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
......
This diff is collapsed.
This diff is collapsed.
......@@ -7,7 +7,7 @@
Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
& Marcus Metzler (mocm@thp.uni-koeln.de)
& Marcus Metzler (mocm@thp.uni-koeln.de)
(c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
This program is free software; you can redistribute it and/or modify
......
......@@ -5,7 +5,7 @@
bttv - Bt848 frame grabber driver
Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
& Marcus Metzler (mocm@thp.uni-koeln.de)
& Marcus Metzler (mocm@thp.uni-koeln.de)
(c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
This program is free software; you can redistribute it and/or modify
......@@ -237,7 +237,7 @@ bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
err:
if (i2c_debug)
printk(" ERR: %d\n",retval);
return retval;
return retval;
}
static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num)
......@@ -290,7 +290,7 @@ static struct i2c_adapter bttv_i2c_adap_hw_template = {
static int attach_inform(struct i2c_client *client)
{
struct bttv *btv = i2c_get_adapdata(client->adapter);
struct bttv *btv = i2c_get_adapdata(client->adapter);
if (bttv_debug)
printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n",
......@@ -300,9 +300,9 @@ static int attach_inform(struct i2c_client *client)
return 0;
if (btv->tuner_type != UNSET) {
struct tuner_setup tun_setup;
struct tuner_setup tun_setup;
tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;
tun_setup.type = btv->tuner_type;
tun_setup.addr = ADDR_UNSET;
......@@ -312,7 +312,7 @@ static int attach_inform(struct i2c_client *client)
if (btv->pinnacle_id != UNSET)
client->driver->command(client,AUDC_CONFIG_PINNACLE,
&btv->pinnacle_id);
return 0;
return 0;
}
void bttv_call_i2c_clients(struct bttv *btv, unsigned int cmd, void *arg)
......@@ -330,43 +330,43 @@ static struct i2c_client bttv_i2c_client_template = {
/* read I2C */
int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
{
unsigned char buffer = 0;
unsigned char buffer = 0;
if (0 != btv->i2c_rc)
return -1;
if (bttv_verbose && NULL != probe_for)
printk(KERN_INFO "bttv%d: i2c: checking for %s @ 0x%02x... ",
btv->c.nr,probe_for,addr);
btv->i2c_client.addr = addr >> 1;
if (1 != i2c_master_recv(&btv->i2c_client, &buffer, 1)) {
btv->i2c_client.addr = addr >> 1;
if (1 != i2c_master_recv(&btv->i2c_client, &buffer, 1)) {
if (NULL != probe_for) {
if (bttv_verbose)
printk("not found\n");
} else
printk(KERN_WARNING "bttv%d: i2c read 0x%x: error\n",
btv->c.nr,addr);
return -1;
return -1;
}
if (bttv_verbose && NULL != probe_for)
printk("found\n");
return buffer;
return buffer;
}
/* write I2C */
int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
unsigned char b2, int both)
unsigned char b2, int both)
{
unsigned char buffer[2];
int bytes = both ? 2 : 1;
unsigned char buffer[2];
int bytes = both ? 2 : 1;
if (0 != btv->i2c_rc)
return -1;
btv->i2c_client.addr = addr >> 1;
buffer[0] = b1;
buffer[1] = b2;
if (bytes != i2c_master_send(&btv->i2c_client, buffer, bytes))
btv->i2c_client.addr = addr >> 1;
buffer[0] = b1;
buffer[1] = b2;
if (bytes != i2c_master_send(&btv->i2c_client, buffer, bytes))
return -1;
return 0;
return 0;
}
/* read EEPROM content */
......@@ -431,8 +431,8 @@ int __devinit init_bttv_i2c(struct bttv *btv)
"bt%d #%d [%s]", btv->id, btv->c.nr,
btv->use_i2c_hw ? "hw" : "sw");
i2c_set_adapdata(&btv->c.i2c_adap, btv);
btv->i2c_client.adapter = &btv->c.i2c_adap;
i2c_set_adapdata(&btv->c.i2c_adap, btv);
btv->i2c_client.adapter = &btv->c.i2c_adap;
#ifdef I2C_CLASS_TV_ANALOG
if (bttv_tvcards[btv->c.type].no_video)
......
/*
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
......
......@@ -74,27 +74,27 @@ bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
}
if (bpl <= sg_dma_len(sg)-offset) {
/* fits into current chunk */
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_SOL|
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_SOL|
BT848_RISC_EOL|bpl);
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
offset+=bpl;
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
offset+=bpl;
} else {
/* scanline needs to be splitted */
todo = bpl;
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_SOL|
todo = bpl;
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_SOL|
(sg_dma_len(sg)-offset));
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
todo -= (sg_dma_len(sg)-offset);
offset = 0;
sg++;
while (todo > sg_dma_len(sg)) {
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
todo -= (sg_dma_len(sg)-offset);
offset = 0;
sg++;
while (todo > sg_dma_len(sg)) {
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|
sg_dma_len(sg));
*(rp++)=cpu_to_le32(sg_dma_address(sg));
*(rp++)=cpu_to_le32(sg_dma_address(sg));
todo -= sg_dma_len(sg);
sg++;
}
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|
*(rp++)=cpu_to_le32(BT848_RISC_WRITE|BT848_RISC_EOL|
todo);
*(rp++)=cpu_to_le32(sg_dma_address(sg));
offset += todo;
......@@ -201,8 +201,8 @@ bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
ri |= BT848_RISC_EOL;
/* write risc instruction */
*(rp++)=cpu_to_le32(ri | ylen);
*(rp++)=cpu_to_le32(((ylen >> hshift) << 16) |
*(rp++)=cpu_to_le32(ri | ylen);
*(rp++)=cpu_to_le32(((ylen >> hshift) << 16) |
(ylen >> hshift));
*(rp++)=cpu_to_le32(sg_dma_address(ysg)+yoffset);
yoffset += ylen;
......@@ -319,7 +319,7 @@ bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
int width, int height, int interleaved, int norm)
{
const struct bttv_tvnorm *tvnorm = &bttv_tvnorms[norm];
u32 xsf, sr;
u32 xsf, sr;
int vdelay;
int swidth = tvnorm->swidth;
......@@ -334,52 +334,52 @@ bttv_calc_geo(struct bttv *btv, struct bttv_geometry *geo,
vdelay = tvnorm->vdelay;
xsf = (width*scaledtwidth)/swidth;
geo->hscale = ((totalwidth*4096UL)/xsf-4096);
geo->hdelay = tvnorm->hdelayx1;
geo->hdelay = (geo->hdelay*width)/swidth;
geo->hdelay &= 0x3fe;
sr = ((tvnorm->sheight >> (interleaved?0:1))*512)/height - 512;
geo->vscale = (0x10000UL-sr) & 0x1fff;
geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) |
((tvnorm->sheight>>4)&0x30) | ((vdelay>>2)&0xc0);
geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0;
geo->vdelay = vdelay;
geo->width = width;
geo->sheight = tvnorm->sheight;
xsf = (width*scaledtwidth)/swidth;
geo->hscale = ((totalwidth*4096UL)/xsf-4096);
geo->hdelay = tvnorm->hdelayx1;
geo->hdelay = (geo->hdelay*width)/swidth;
geo->hdelay &= 0x3fe;
sr = ((tvnorm->sheight >> (interleaved?0:1))*512)/height - 512;
geo->vscale = (0x10000UL-sr) & 0x1fff;
geo->crop = ((width>>8)&0x03) | ((geo->hdelay>>6)&0x0c) |
((tvnorm->sheight>>4)&0x30) | ((vdelay>>2)&0xc0);
geo->vscale |= interleaved ? (BT848_VSCALE_INT<<8) : 0;
geo->vdelay = vdelay;
geo->width = width;
geo->sheight = tvnorm->sheight;
geo->vtotal = tvnorm->vtotal;
if (btv->opt_combfilter) {
geo->vtc = (width < 193) ? 2 : ((width < 385) ? 1 : 0);
geo->comb = (width < 769) ? 1 : 0;
} else {
geo->vtc = 0;
geo->comb = 0;
}
if (btv->opt_combfilter) {
geo->vtc = (width < 193) ? 2 : ((width < 385) ? 1 : 0);
geo->comb = (width < 769) ? 1 : 0;
} else {
geo->vtc = 0;
geo->comb = 0;
}
}
static void
bttv_apply_geo(struct bttv *btv, struct bttv_geometry *geo, int odd)
{
int off = odd ? 0x80 : 0x00;
int off = odd ? 0x80 : 0x00;
if (geo->comb)
btor(BT848_VSCALE_COMB, BT848_E_VSCALE_HI+off);
else
btand(~BT848_VSCALE_COMB, BT848_E_VSCALE_HI+off);
btwrite(geo->vtc, BT848_E_VTC+off);
btwrite(geo->hscale >> 8, BT848_E_HSCALE_HI+off);
btwrite(geo->hscale & 0xff, BT848_E_HSCALE_LO+off);
btaor((geo->vscale>>8), 0xe0, BT848_E_VSCALE_HI+off);
btwrite(geo->vscale & 0xff, BT848_E_VSCALE_LO+off);
btwrite(geo->width & 0xff, BT848_E_HACTIVE_LO+off);
btwrite(geo->hdelay & 0xff, BT848_E_HDELAY_LO+off);
btwrite(geo->sheight & 0xff, BT848_E_VACTIVE_LO+off);
btwrite(geo->vdelay & 0xff, BT848_E_VDELAY_LO+off);
btwrite(geo->crop, BT848_E_CROP+off);
btwrite(geo->vtc, BT848_E_VTC+off);
btwrite(geo->hscale >> 8, BT848_E_HSCALE_HI+off);
btwrite(geo->hscale & 0xff, BT848_E_HSCALE_LO+off);
btaor((geo->vscale>>8), 0xe0, BT848_E_VSCALE_HI+off);
btwrite(geo->vscale & 0xff, BT848_E_VSCALE_LO+off);
btwrite(geo->width & 0xff, BT848_E_HACTIVE_LO+off);
btwrite(geo->hdelay & 0xff, BT848_E_HDELAY_LO+off);
btwrite(geo->sheight & 0xff, BT848_E_VACTIVE_LO+off);
btwrite(geo->vdelay & 0xff, BT848_E_VDELAY_LO+off);
btwrite(geo->crop, BT848_E_CROP+off);
btwrite(geo->vtotal>>8, BT848_VTOTAL_HI);
btwrite(geo->vtotal & 0xff, BT848_VTOTAL_LO);
btwrite(geo->vtotal & 0xff, BT848_VTOTAL_LO);
}
/* ---------------------------------------------------------- */
......@@ -420,7 +420,7 @@ bttv_set_dma(struct bttv *btv, int override)
} else {
del_timer(&btv->timeout);
}
btv->main.cpu[RISC_SLOT_LOOP] = cpu_to_le32(cmd);
btv->main.cpu[RISC_SLOT_LOOP] = cpu_to_le32(cmd);
btaor(capctl, ~0x0f, BT848_CAP_CTL);
if (capctl) {
......@@ -432,7 +432,7 @@ bttv_set_dma(struct bttv *btv, int override)
} else {
if (!btv->dma_on)
return;
btand(~3, BT848_GPIO_DMA_CTL);
btand(~3, BT848_GPIO_DMA_CTL);
btv->dma_on = 0;
}
return;
......@@ -460,19 +460,19 @@ bttv_risc_init_main(struct bttv *btv)
btv->main.cpu[6] = cpu_to_le32(BT848_RISC_JUMP);
btv->main.cpu[7] = cpu_to_le32(btv->main.dma + (8<<2));
btv->main.cpu[8] = cpu_to_le32(BT848_RISC_SYNC | BT848_RISC_RESYNC |
btv->main.cpu[8] = cpu_to_le32(BT848_RISC_SYNC | BT848_RISC_RESYNC |
BT848_FIFO_STATUS_VRO);
btv->main.cpu[9] = cpu_to_le32(0);
btv->main.cpu[9] = cpu_to_le32(0);
/* bottom field */
btv->main.cpu[10] = cpu_to_le32(BT848_RISC_JUMP);
btv->main.cpu[10] = cpu_to_le32(BT848_RISC_JUMP);
btv->main.cpu[11] = cpu_to_le32(btv->main.dma + (12<<2));
btv->main.cpu[12] = cpu_to_le32(BT848_RISC_JUMP);
btv->main.cpu[12] = cpu_to_le32(BT848_RISC_JUMP);
btv->main.cpu[13] = cpu_to_le32(btv->main.dma + (14<<2));
/* jump back to top field */
btv->main.cpu[14] = cpu_to_le32(BT848_RISC_JUMP);
btv->main.cpu[15] = cpu_to_le32(btv->main.dma + (0<<2));
btv->main.cpu[15] = cpu_to_le32(btv->main.dma + (0<<2));
return 0;
}
......
......@@ -202,7 +202,7 @@ struct bttv_core {
struct list_head subs; /* struct bttv_sub_device */
/* device config */
unsigned int nr; /* dev nr (for printk("bttv%d: ..."); */
unsigned int nr; /* dev nr (for printk("bttv%d: ..."); */
unsigned int type; /* card type (pointer into tvcards[]) */
char name[8]; /* dev name */
};
......@@ -211,16 +211,16 @@ struct bttv;
struct tvcard
{
char *name;
unsigned int video_inputs;
unsigned int audio_inputs;
unsigned int tuner;
unsigned int svhs;
char *name;
unsigned int video_inputs;
unsigned int audio_inputs;
unsigned int tuner;
unsigned int svhs;
unsigned int digital_mode; // DIGITAL_MODE_CAMERA or DIGITAL_MODE_VIDEO
u32 gpiomask;
u32 muxsel[16];
u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
u32 gpiomask2; /* GPIO MUX mask */
u32 gpiomask;
u32 muxsel[16];
u32 audiomux[6]; /* Tuner, Radio, external, internal, mute, stereo */
u32 gpiomask2; /* GPIO MUX mask */
/* i2c audio flags */
unsigned int no_msp34xx:1;
......
......@@ -77,14 +77,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;
};
......@@ -267,8 +267,8 @@ struct bttv {
/* card configuration info */
unsigned int cardid; /* pci subsystem id (bt878 based ones) */
unsigned int tuner_type; /* tuner chip type */
unsigned int pinnacle_id;
unsigned int tuner_type; /* tuner chip type */
unsigned int pinnacle_id;
unsigned int svhs;
struct bttv_pll_info pll;
int triton1;
......@@ -301,9 +301,9 @@ struct bttv {
/* locking */
spinlock_t s_lock;
struct semaphore lock;
struct semaphore lock;
int resources;
struct semaphore reslock;
struct semaphore reslock;
#ifdef VIDIOC_G_PRIORITY
struct v4l2_prio_state prio;
#endif
......
......@@ -436,7 +436,7 @@ static int memory_write(struct cx88_core *core, u32 address, u32 value)
static int memory_read(struct cx88_core *core, u32 address, u32 *value)
{
int retval;
int retval;
u32 val;
/* Warning: address is dword address (4 bytes) */
......@@ -605,11 +605,11 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
u32 *dataptr;
retval = register_write(dev->core, IVTV_REG_VPU, 0xFFFFFFED);
retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_REFRESH, 0x80000640);
retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_PRECHARGE, 0x1A);
retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_REFRESH, 0x80000640);
retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_PRECHARGE, 0x1A);
msleep(1);
retval |= register_write(dev->core, IVTV_REG_APU, 0);
retval |= register_write(dev->core, IVTV_REG_APU, 0);
if (retval < 0)
dprintk(0, "Error with register_write\n");
......@@ -657,13 +657,13 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
release_firmware(firmware);
dprintk(0, "Firmware upload successful.\n");
retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
retval |= register_read(dev->core, IVTV_REG_SPU, &value);
retval |= register_write(dev->core, IVTV_REG_SPU, value & 0xFFFFFFFE);
retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);
retval |= register_read(dev->core, IVTV_REG_SPU, &value);
retval |= register_write(dev->core, IVTV_REG_SPU, value & 0xFFFFFFFE);
msleep(1);
retval |= register_read(dev->core, IVTV_REG_VPU, &value);
retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8);
retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8);
if (retval < 0)
dprintk(0, "Error with register_write\n");
......@@ -876,7 +876,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
au_params |= 0;
}
else if( params->au_bitrate.target >=
mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
{
/* clamp the bitrate to the max supported by the standard */
params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate;
......@@ -942,7 +942,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
/* TODO: implement the stream ID stuff:
ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr,
ps_size, au_pesid, vi_pesid
*/
*/
}
#define CHECK_PARAM( name ) ( dev->params.name != params->name )
#define IF_PARAM( name ) if( CHECK_PARAM( name ) )
......@@ -1068,7 +1068,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
au_params |= 0;
}
else if( params->au_bitrate.target >=
mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate )
{
/* clamp the bitrate to the max supported by the standard */
params->au_bitrate.target = mpeg_audio_bitrates[BITRATES_SIZE-1].layer[layer].rate;
......@@ -1150,7 +1150,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
/* TODO: implement the stream ID stuff:
ts_pid_pmt, ts_pid_audio, ts_pid_video, ts_pid_pcr,
ps_size, au_pesid, vi_pesid
*/
*/
UPDATE_PARAM( ts_pid_pmt );
UPDATE_PARAM( ts_pid_audio );
UPDATE_PARAM( ts_pid_video );
......@@ -1712,7 +1712,7 @@ static int __devinit blackbird_probe(struct pci_dev *pci_dev,
static void __devexit blackbird_remove(struct pci_dev *pci_dev)
{
struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
/* blackbird */
blackbird_unregister_video(dev);
......@@ -1728,8 +1728,8 @@ static struct pci_device_id cx8802_pci_tbl[] = {
{
.vendor = 0x14f1,
.device = 0x8802,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},{
/* --- end of list --- */
}
......@@ -1737,10 +1737,10 @@ static struct pci_device_id cx8802_pci_tbl[] = {
MODULE_DEVICE_TABLE(pci, cx8802_pci_tbl);
static struct pci_driver blackbird_pci_driver = {
.name = "cx88-blackbird",
.id_table = cx8802_pci_tbl,
.probe = blackbird_probe,
.remove = __devexit_p(blackbird_remove),
.name = "cx88-blackbird",
.id_table = cx8802_pci_tbl,
.probe = blackbird_probe,
.remove = __devexit_p(blackbird_remove),
.suspend = cx8802_suspend_common,
.resume = cx8802_resume_common,
};
......
This diff is collapsed.
......@@ -153,26 +153,26 @@ static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist,
}
if (bpl <= sg_dma_len(sg)-offset) {
/* fits into current chunk */
*(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|RISC_EOL|bpl);
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
offset+=bpl;
*(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|RISC_EOL|bpl);
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
offset+=bpl;
} else {
/* scanline needs to be splitted */
todo = bpl;
*(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|
todo = bpl;
*(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|
(sg_dma_len(sg)-offset));
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
todo -= (sg_dma_len(sg)-offset);
offset = 0;
sg++;
while (todo > sg_dma_len(sg)) {
*(rp++)=cpu_to_le32(RISC_WRITE|
*(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
todo -= (sg_dma_len(sg)-offset);
offset = 0;
sg++;
while (todo > sg_dma_len(sg)) {
*(rp++)=cpu_to_le32(RISC_WRITE|
sg_dma_len(sg));
*(rp++)=cpu_to_le32(sg_dma_address(sg));
*(rp++)=cpu_to_le32(sg_dma_address(sg));
todo -= sg_dma_len(sg);
sg++;
}
*(rp++)=cpu_to_le32(RISC_WRITE|RISC_EOL|todo);
*(rp++)=cpu_to_le32(RISC_WRITE|RISC_EOL|todo);
*(rp++)=cpu_to_le32(sg_dma_address(sg));
offset += todo;
}
......@@ -309,7 +309,7 @@ struct sram_channel cx88_sram_channels[] = {
.name = "video y / packed",
.cmds_start = 0x180040,
.ctrl_start = 0x180400,
.cdt = 0x180400 + 64,
.cdt = 0x180400 + 64,
.fifo_start = 0x180c00,
.fifo_size = 0x002800,
.ptr1_reg = MO_DMA21_PTR1,
......@@ -321,7 +321,7 @@ struct sram_channel cx88_sram_channels[] = {
.name = "video u",
.cmds_start = 0x180080,
.ctrl_start = 0x1804a0,
.cdt = 0x1804a0 + 64,
.cdt = 0x1804a0 + 64,
.fifo_start = 0x183400,
.fifo_size = 0x000800,
.ptr1_reg = MO_DMA22_PTR1,
......@@ -333,7 +333,7 @@ struct sram_channel cx88_sram_channels[] = {
.name = "video v",
.cmds_start = 0x1800c0,
.ctrl_start = 0x180540,
.cdt = 0x180540 + 64,
.cdt = 0x180540 + 64,
.fifo_start = 0x183c00,
.fifo_size = 0x000800,
.ptr1_reg = MO_DMA23_PTR1,
......@@ -345,7 +345,7 @@ struct sram_channel cx88_sram_channels[] = {
.name = "vbi",
.cmds_start = 0x180100,
.ctrl_start = 0x1805e0,
.cdt = 0x1805e0 + 64,
.cdt = 0x1805e0 + 64,
.fifo_start = 0x184400,
.fifo_size = 0x001000,
.ptr1_reg = MO_DMA24_PTR1,
......@@ -357,7 +357,7 @@ struct sram_channel cx88_sram_channels[] = {
.name = "audio from",
.cmds_start = 0x180140,
.ctrl_start = 0x180680,
.cdt = 0x180680 + 64,
.cdt = 0x180680 + 64,
.fifo_start = 0x185400,
.fifo_size = 0x000200,
.ptr1_reg = MO_DMA25_PTR1,
......@@ -369,7 +369,7 @@ struct sram_channel cx88_sram_channels[] = {
.name = "audio to",
.cmds_start = 0x180180,
.ctrl_start = 0x180720,
.cdt = 0x180680 + 64, /* same as audio IN */
.cdt = 0x180680 + 64, /* same as audio IN */
.fifo_start = 0x185400, /* same as audio IN */
.fifo_size = 0x000200, /* same as audio IN */
.ptr1_reg = MO_DMA26_PTR1,
......@@ -1137,7 +1137,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
if (!core->radio_addr)
core->radio_addr = cx88_boards[core->board].radio_addr;
printk(KERN_INFO "TV tuner %d at 0x%02x, Radio tuner %d at 0x%02x\n",
printk(KERN_INFO "TV tuner %d at 0x%02x, Radio tuner %d at 0x%02x\n",
core->tuner_type, core->tuner_addr<<1,
core->radio_type, core->radio_addr<<1);
......
......@@ -128,7 +128,7 @@ static int dntv_live_dvbt_demod_init(struct dvb_frontend* fe)
static u8 reset [] = { 0x50, 0x80 };
static u8 adc_ctl_1_cfg [] = { 0x8E, 0x40 };
static u8 agc_cfg [] = { 0x67, 0x10, 0x23, 0x00, 0xFF, 0xFF,
0x00, 0xFF, 0x00, 0x40, 0x40 };
0x00, 0xFF, 0x00, 0x40, 0x40 };
static u8 dntv_extra[] = { 0xB5, 0x7A };
static u8 capt_range_cfg[] = { 0x75, 0x32 };
......@@ -464,7 +464,7 @@ static int __devinit dvb_probe(struct pci_dev *pci_dev,
static void __devexit dvb_remove(struct pci_dev *pci_dev)
{
struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
/* dvb */
videobuf_dvb_unregister(&dev->dvb);
......@@ -479,8 +479,8 @@ static struct pci_device_id cx8802_pci_tbl[] = {
{
.vendor = 0x14f1,
.device = 0x8802,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
.subvendor = PCI_ANY_ID,
.subdevice = PCI_ANY_ID,
},{
/* --- end of list --- */
}
......@@ -488,10 +488,10 @@ static struct pci_device_id cx8802_pci_tbl[] = {
MODULE_DEVICE_TABLE(pci, cx8802_pci_tbl);
static struct pci_driver dvb_pci_driver = {
.name = "cx88-dvb",
.id_table = cx8802_pci_tbl,
.probe = dvb_probe,
.remove = __devexit_p(dvb_remove),
.name = "cx88-dvb",
.id_table = cx8802_pci_tbl,
.probe = dvb_probe,
.remove = __devexit_p(dvb_remove),
.suspend = cx8802_suspend_common,
.resume = cx8802_resume_common,
};
......
......@@ -3,7 +3,7 @@
cx88-i2c.c -- all the i2c code is here
Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
& Marcus Metzler (mocm@thp.uni-koeln.de)
& Marcus Metzler (mocm@thp.uni-koeln.de)
(c) 2002 Yurij Sysoev <yurij@naturesoft.net>
(c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
......@@ -90,7 +90,7 @@ static int cx8800_bit_getsda(void *data)
static int attach_inform(struct i2c_client *client)
{
struct tuner_setup tun_setup;
struct tuner_setup tun_setup;
struct cx88_core *core = i2c_get_adapdata(client->adapter);
dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
......@@ -98,7 +98,7 @@ static int attach_inform(struct i2c_client *client)
if (!client->driver->command)
return 0;
if (core->radio_type != UNSET) {
if (core->radio_type != UNSET) {
if ((core->radio_addr==ADDR_UNSET)||(core->radio_addr==client->addr)) {
tun_setup.mode_mask = T_RADIO;
tun_setup.type = core->radio_type;
......@@ -106,8 +106,8 @@ static int attach_inform(struct i2c_client *client)
client->driver->command (client, TUNER_SET_TYPE_ADDR, &tun_setup);
}
}
if (core->tuner_type != UNSET) {
}
if (core->tuner_type != UNSET) {
if ((core->tuner_addr==ADDR_UNSET)||(core->tuner_addr==client->addr)) {
tun_setup.mode_mask = T_ANALOG_TV;
......@@ -116,7 +116,7 @@ static int attach_inform(struct i2c_client *client)
client->driver->command (client,TUNER_SET_TYPE_ADDR, &tun_setup);
}
}
}
if (core->tda9887_conf)
client->driver->command(client, TDA9887_SET_CONFIG, &core->tda9887_conf);
......@@ -159,7 +159,7 @@ static struct i2c_adapter cx8800_i2c_adap_template = {
};
static struct i2c_client cx8800_i2c_client_template = {
.name = "cx88xx internal",
.name = "cx88xx internal",
};
static char *i2c_devs[128] = {
......@@ -202,10 +202,10 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci)
core->i2c_adap.dev.parent = &pci->dev;
strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name));
core->i2c_algo.data = core;
i2c_set_adapdata(&core->i2c_adap,core);
core->i2c_adap.algo_data = &core->i2c_algo;
core->i2c_client.adapter = &core->i2c_adap;
core->i2c_algo.data = core;
i2c_set_adapdata(&core->i2c_adap,core);
core->i2c_adap.algo_data = &core->i2c_algo;
core->i2c_client.adapter = &core->i2c_adap;
cx8800_bit_setscl(core,1);
cx8800_bit_setsda(core,1);
......
......@@ -553,7 +553,7 @@ void cx88_ir_irq(struct cx88_core *core)
if ((ircode & 0xffff) != 0xeb04) { /* wrong address */
ir_dprintk("pulse distance decoded wrong address\n");
break;
break;
}
if (((~ircode >> 24) & 0xff) != ((ircode >> 16) & 0xff)) { /* wrong checksum */
......
......@@ -316,14 +316,14 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev)
spin_unlock(&dev->slock);
}
/* other general errors */
if (status & 0x1f0100) {
/* other general errors */
if (status & 0x1f0100) {
dprintk( 0, "general errors: 0x%08x\n", status & 0x1f0100 );
spin_lock(&dev->slock);
spin_lock(&dev->slock);
cx8802_stop_dma(dev);
cx8802_restart_queue(dev,&dev->mpegq);
spin_unlock(&dev->slock);
}
cx8802_restart_queue(dev,&dev->mpegq);
spin_unlock(&dev->slock);
}
}
#define MAX_IRQ_LOOP 10
......@@ -379,8 +379,8 @@ int cx8802_init_common(struct cx8802_dev *dev)
}
pci_read_config_byte(dev->pci, PCI_CLASS_REVISION, &dev->pci_rev);
pci_read_config_byte(dev->pci, PCI_LATENCY_TIMER, &dev->pci_lat);
printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, "
pci_read_config_byte(dev->pci, PCI_LATENCY_TIMER, &dev->pci_lat);
printk(KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, "
"latency: %d, mmio: 0x%lx\n", dev->core->name,
pci_name(dev->pci), dev->pci_rev, dev->pci->irq,
dev->pci_lat,pci_resource_start(dev->pci,0));
......@@ -430,7 +430,7 @@ void cx8802_fini_common(struct cx8802_dev *dev)
int cx8802_suspend_common(struct pci_dev *pci_dev, pm_message_t state)
{
struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
struct cx8802_dev *dev = pci_get_drvdata(pci_dev);
struct cx88_core *core = dev->core;
/* stop mpeg dma */
......
......@@ -3,9 +3,9 @@
cx88x-hw.h - CX2388x register offsets
Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
2001 Michael Eskin
2002 Yurij Sysoev <yurij@naturesoft.net>
2003 Gerd Knorr <kraxel@bytesex.org>
2001 Michael Eskin
2002 Yurij Sysoev <yurij@naturesoft.net>
2003 Gerd Knorr <kraxel@bytesex.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -728,13 +728,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
......
......@@ -100,7 +100,7 @@ static struct cx88_tvnorm tvnorms[] = {
.id = V4L2_STD_PAL_I,
.cxiformat = VideoFormatPAL,
.cxoformat = 0x181f0008,
},{
},{
.name = "PAL-M",
.id = V4L2_STD_PAL_M,
.cxiformat = VideoFormatPALM,
......@@ -470,7 +470,7 @@ static int restart_video_queue(struct cx8800_dev *dev,
struct list_head *item;
if (!list_empty(&q->active)) {
buf = list_entry(q->active.next, struct cx88_buffer, vb.queue);
buf = list_entry(q->active.next, struct cx88_buffer, vb.queue);
dprintk(2,"restart_queue [%p/%d]: restart dma\n",
buf, buf->vb.i);
start_video_dma(dev, q, buf);
......@@ -486,7 +486,7 @@ static int restart_video_queue(struct cx8800_dev *dev,
for (;;) {
if (list_empty(&q->queued))
return 0;
buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue);
buf = list_entry(q->queued.next, struct cx88_buffer, vb.queue);
if (NULL == prev) {
list_del(&buf->vb.queue);
list_add_tail(&buf->vb.queue,&q->active);
......@@ -783,7 +783,7 @@ static int video_open(struct inode *inode, struct file *file)
cx88_call_i2c_clients(core,AUDC_SET_RADIO,NULL);
}
return 0;
return 0;
}
static ssize_t
......@@ -922,7 +922,7 @@ static int set_control(struct cx88_core *core, struct v4l2_control *ctl)
{
/* struct cx88_core *core = dev->core; */
struct cx88_ctrl *c = NULL;
u32 v_sat_value;
u32 v_sat_value;
u32 value;
int i;
......@@ -1252,7 +1252,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
}
int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
struct cx88_core *core, unsigned int cmd, void *arg, v4l2_kioctl driver_ioctl)
struct cx88_core *core, unsigned int cmd, void *arg, v4l2_kioctl driver_ioctl)
{
int err;
......@@ -1399,7 +1399,7 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
cx88_get_stereo(core ,t);
reg = cx_read(MO_DEVICE_STATUS);
t->signal = (reg & (1<<5)) ? 0xffff : 0x0000;
t->signal = (reg & (1<<5)) ? 0xffff : 0x0000;
return 0;
}
case VIDIOC_S_TUNER:
......@@ -1486,7 +1486,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
struct v4l2_capability *cap = arg;
memset(cap,0,sizeof(*cap));
strcpy(cap->driver, "cx8800");
strcpy(cap->driver, "cx8800");
strlcpy(cap->card, cx88_boards[core->board].name,
sizeof(cap->card));
sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
......@@ -1827,8 +1827,8 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
/* print pci info */
pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev);
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat);
printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, "
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat);
printk(KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, "
"latency: %d, mmio: 0x%lx\n", core->name,
pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
dev->pci_lat,pci_resource_start(pci_dev,0));
......@@ -1944,7 +1944,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
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 */
......
......@@ -259,8 +259,8 @@ struct cx88_core {
/* pci stuff */
int pci_bus;
int pci_slot;
u32 __iomem *lmmio;
u8 __iomem *bmmio;
u32 __iomem *lmmio;
u8 __iomem *bmmio;
u32 shadow[SHADOW_MAX];
int pci_irqmask;
......
......@@ -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>
......
......@@ -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>
......@@ -33,32 +33,32 @@
/* #define ENABLE_DEBUG_ISOC_FRAMES */
unsigned int core_debug = 0;
unsigned int core_debug;
module_param(core_debug,int,0644);
MODULE_PARM_DESC(core_debug,"enable debug messages [core]");
#define em2820_coredbg(fmt, arg...) do {\
if (core_debug) \
printk(KERN_INFO "%s %s :"fmt, \
dev->name, __FUNCTION__ , ##arg); } while (0)
if (core_debug) \
printk(KERN_INFO "%s %s :"fmt, \
dev->name, __FUNCTION__ , ##arg); } while (0)
unsigned int reg_debug = 0;
unsigned int reg_debug;
module_param(reg_debug,int,0644);
MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]");
#define em2820_regdbg(fmt, arg...) do {\
if (reg_debug) \
printk(KERN_INFO "%s %s :"fmt, \
dev->name, __FUNCTION__ , ##arg); } while (0)
if (reg_debug) \
printk(KERN_INFO "%s %s :"fmt, \
dev->name, __FUNCTION__ , ##arg); } while (0)
unsigned int isoc_debug = 0;
unsigned int isoc_debug;
module_param(isoc_debug,int,0644);
MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]");
#define em2820_isocdbg(fmt, arg...) do {\
if (isoc_debug) \
printk(KERN_INFO "%s %s :"fmt, \
dev->name, __FUNCTION__ , ##arg); } while (0)
if (isoc_debug) \
printk(KERN_INFO "%s %s :"fmt, \
dev->name, __FUNCTION__ , ##arg); } while (0)
static int alt = EM2820_PINOUT;
module_param(alt, int, 0644);
......
......@@ -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>
......
......@@ -43,34 +43,34 @@ MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]");
/* ---------------------------------------------------------------------- */
static IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE] = {
[ 0x01 ] = KEY_CHANNEL,
[ 0x02 ] = KEY_SELECT,
[ 0x03 ] = KEY_MUTE,
[ 0x04 ] = KEY_POWER,
[ 0x05 ] = KEY_KP1,
[ 0x06 ] = KEY_KP2,
[ 0x07 ] = KEY_KP3,
[ 0x08 ] = KEY_CHANNELUP,
[ 0x09 ] = KEY_KP4,
[ 0x0a ] = KEY_KP5,
[ 0x0b ] = KEY_KP6,
[ 0x0c ] = KEY_CHANNELDOWN,
[ 0x0d ] = KEY_KP7,
[ 0x0e ] = KEY_KP8,
[ 0x0f ] = KEY_KP9,
[ 0x10 ] = KEY_VOLUMEUP,
[ 0x11 ] = KEY_KP0,
[ 0x12 ] = KEY_MENU,
[ 0x13 ] = KEY_PRINT,
[ 0x14 ] = KEY_VOLUMEDOWN,
[ 0x16 ] = KEY_PAUSE,
[ 0x18 ] = KEY_RECORD,
[ 0x19 ] = KEY_REWIND,
[ 0x1a ] = KEY_PLAY,
[ 0x01 ] = KEY_CHANNEL,
[ 0x02 ] = KEY_SELECT,
[ 0x03 ] = KEY_MUTE,
[ 0x04 ] = KEY_POWER,
[ 0x05 ] = KEY_KP1,
[ 0x06 ] = KEY_KP2,
[ 0x07 ] = KEY_KP3,
[ 0x08 ] = KEY_CHANNELUP,
[ 0x09 ] = KEY_KP4,
[ 0x0a ] = KEY_KP5,
[ 0x0b ] = KEY_KP6,
[ 0x0c ] = KEY_CHANNELDOWN,
[ 0x0d ] = KEY_KP7,
[ 0x0e ] = KEY_KP8,
[ 0x0f ] = KEY_KP9,
[ 0x10 ] = KEY_VOLUMEUP,
[ 0x11 ] = KEY_KP0,
[ 0x12 ] = KEY_MENU,
[ 0x13 ] = KEY_PRINT,
[ 0x14 ] = KEY_VOLUMEDOWN,
[ 0x16 ] = KEY_PAUSE,
[ 0x18 ] = KEY_RECORD,
[ 0x19 ] = KEY_REWIND,
[ 0x1a ] = KEY_PLAY,
[ 0x1b ] = KEY_FORWARD,
[ 0x1c ] = KEY_BACKSPACE,
[ 0x1e ] = KEY_STOP,
[ 0x40 ] = KEY_ZOOM,
[ 0x1e ] = KEY_STOP,
[ 0x40 ] = KEY_ZOOM,
};
/* ----------------------------------------------------------------------- */
......
......@@ -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);
......
......@@ -2,8 +2,8 @@
em2820-cards.c - driver for Empia EM2800/EM2820/2840 USB video capture devices
Copyright (C) 2005 Markus Rechberger <mrechberger@gmail.com>
Ludovico Cavedon <cavedon@sssup.it>
Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Ludovico Cavedon <cavedon@sssup.it>
Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Based on the em2800 driver from Sascha Sommer <saschasommer@freenet.de>
......@@ -390,17 +390,17 @@ extern const unsigned int em2820_bcount;
/* printk macros */
#define em2820_err(fmt, arg...) do {\
printk(KERN_ERR fmt , ##arg); } while (0)
printk(KERN_ERR fmt , ##arg); } while (0)
#define em2820_errdev(fmt, arg...) do {\
printk(KERN_ERR "%s: "fmt,\
printk(KERN_ERR "%s: "fmt,\
dev->name , ##arg); } while (0)
#define em2820_info(fmt, arg...) do {\
printk(KERN_INFO "%s: "fmt,\
printk(KERN_INFO "%s: "fmt,\
dev->name , ##arg); } while (0)
#define em2820_warn(fmt, arg...) do {\
printk(KERN_WARNING "%s: "fmt,\
printk(KERN_WARNING "%s: "fmt,\
dev->name , ##arg); } while (0)
inline static int em2820_audio_source(struct em2820 *dev, int input)
......
......@@ -369,14 +369,14 @@ static int ir_probe(struct device *dev)
ir->mask_keycode = 0x003e00;
ir->mask_keyup = 0x010000;
ir->polling = 50; // ms
break;
break;
case BTTV_BOARD_PV_BT878P_9B:
case BTTV_BOARD_PV_BT878P_PLUS:
ir_codes = ir_codes_pixelview;
ir->mask_keycode = 0x001f00;
ir->mask_keyup = 0x008000;
ir->polling = 50; // ms
break;
break;
case BTTV_BOARD_WINFAST2000:
ir_codes = ir_codes_winfast;
......
......@@ -163,7 +163,7 @@ static int get_key_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
static int get_key_pixelview(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
{
unsigned char b;
unsigned char b;
/* poll IR chip */
if (1 != i2c_master_recv(&ir->c,&b,1)) {
......@@ -177,7 +177,7 @@ static int get_key_pixelview(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
static int get_key_pv951(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
{
unsigned char b;
unsigned char b;
/* poll IR chip */
if (1 != i2c_master_recv(&ir->c,&b,1)) {
......@@ -225,7 +225,7 @@ static int get_key_knc1(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
static int get_key_purpletv(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
{
unsigned char b;
unsigned char b;
/* poll IR chip */
if (1 != i2c_master_recv(&ir->c,&b,1)) {
......@@ -287,17 +287,17 @@ static int ir_detach(struct i2c_client *client);
static int ir_probe(struct i2c_adapter *adap);
static struct i2c_driver driver = {
.name = "ir remote kbd driver",
.id = I2C_DRIVERID_EXP3, /* FIXME */
.flags = I2C_DF_NOTIFY,
.attach_adapter = ir_probe,
.detach_client = ir_detach,
.name = "ir remote kbd driver",
.id = I2C_DRIVERID_EXP3, /* FIXME */
.flags = I2C_DF_NOTIFY,
.attach_adapter = ir_probe,
.detach_client = ir_detach,
};
static struct i2c_client client_template =
{
.name = "unset",
.driver = &driver
.name = "unset",
.driver = &driver
};
static int ir_attach(struct i2c_adapter *adap, int addr,
......@@ -398,7 +398,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
static int ir_detach(struct i2c_client *client)
{
struct IR_i2c *ir = i2c_get_clientdata(client);
struct IR_i2c *ir = i2c_get_clientdata(client);
/* kill outstanding polls */
del_timer(&ir->timer);
......
......@@ -192,7 +192,7 @@ static int msp3400c_reset(struct i2c_client *client)
(2 != i2c_transfer(client->adapter,test,2)) ) {
printk(KERN_ERR "msp3400: chip reset failed\n");
return -1;
}
}
return 0;
}
......@@ -200,16 +200,16 @@ static int msp3400c_read(struct i2c_client *client, int dev, int addr)
{
int err,retval;
unsigned char write[3];
unsigned char read[2];
struct i2c_msg msgs[2] = {
{ client->addr, 0, 3, write },
{ client->addr, I2C_M_RD, 2, read }
};
unsigned char write[3];
unsigned char read[2];
struct i2c_msg msgs[2] = {
{ client->addr, 0, 3, write },
{ client->addr, I2C_M_RD, 2, read }
};
write[0] = dev+1;
write[1] = addr >> 8;
write[2] = addr & 0xff;
write[0] = dev+1;
write[1] = addr >> 8;
write[2] = addr & 0xff;
for (err = 0; err < 3;) {
if (2 == i2c_transfer(client->adapter,msgs,2))
......@@ -236,13 +236,13 @@ static int msp3400c_read(struct i2c_client *client, int dev, int addr)
static int msp3400c_write(struct i2c_client *client, int dev, int addr, int val)
{
int err;
unsigned char buffer[5];
unsigned char buffer[5];
buffer[0] = dev;
buffer[1] = addr >> 8;
buffer[2] = addr & 0xff;
buffer[3] = val >> 8;
buffer[4] = val & 0xff;
buffer[0] = dev;
buffer[1] = addr >> 8;
buffer[2] = addr & 0xff;
buffer[3] = val >> 8;
buffer[4] = val & 0xff;
dprintk_trace("trace: msp3400c_write(0x%x, 0x%x, 0x%x)\n", dev, addr,
val);
......@@ -812,7 +812,7 @@ static void watch_stereo(struct i2c_client *client)
else if (msp->stereo & VIDEO_SOUND_LANG1)
msp3400c_setstereo(client, V4L2_TUNER_MODE_LANG1);
else
msp3400c_setstereo(client, V4L2_TUNER_MODE_MONO);
msp3400c_setstereo(client, V4L2_TUNER_MODE_MONO);
}
if (once)
......@@ -1512,21 +1512,21 @@ static struct i2c_client client_template =
static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct msp3400c *msp;
struct i2c_client *c;
struct i2c_client *c;
int (*thread_func)(void *data) = NULL;
int i;
client_template.adapter = adap;
client_template.addr = addr;
client_template.adapter = adap;
client_template.addr = addr;
if (-1 == msp3400c_reset(&client_template)) {
dprintk("msp34xx: no chip found\n");
return -1;
}
if (-1 == msp3400c_reset(&client_template)) {
dprintk("msp34xx: no chip found\n");
return -1;
}
if (NULL == (c = kmalloc(sizeof(struct i2c_client),GFP_KERNEL)))
return -ENOMEM;
memcpy(c,&client_template,sizeof(struct i2c_client));
if (NULL == (c = kmalloc(sizeof(struct i2c_client),GFP_KERNEL)))
return -ENOMEM;
memcpy(c,&client_template,sizeof(struct i2c_client));
if (NULL == (msp = kmalloc(sizeof(struct msp3400c),GFP_KERNEL))) {
kfree(c);
return -ENOMEM;
......@@ -1618,7 +1618,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
}
/* done */
i2c_attach_client(c);
i2c_attach_client(c);
/* update our own array */
for (i = 0; i < MSP3400_MAX; i++) {
......@@ -1739,7 +1739,7 @@ static void msp_any_set_audmode(struct i2c_client *client, int audmode)
static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
{
struct msp3400c *msp = i2c_get_clientdata(client);
__u16 *sarg = arg;
__u16 *sarg = arg;
int scart = 0;
switch (cmd) {
......@@ -1969,7 +1969,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
}
msp_any_detect_stereo(client);
if (msp->audmode == V4L2_TUNER_MODE_STEREO) {
if (msp->audmode == V4L2_TUNER_MODE_STEREO) {
a->capability=V4L2_AUDCAP_STEREO;
}
......@@ -2005,7 +2005,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
msp3400c_set_scart(client,scart,0);
msp3400c_write(client,I2C_MSP3400C_DFP,0x000d,0x1900);
}
if (sarg->capability==V4L2_AUDCAP_STEREO) {
if (sarg->capability==V4L2_AUDCAP_STEREO) {
msp->audmode = V4L2_TUNER_MODE_STEREO;
} else {
msp->audmode &= ~V4L2_TUNER_MODE_STEREO;
......
......@@ -76,17 +76,17 @@ static int mt2032_compute_freq(struct i2c_client *c,
unsigned int xogc) //all in Hz
{
struct tuner *t = i2c_get_clientdata(c);
unsigned int fref,lo1,lo1n,lo1a,s,sel,lo1freq, desired_lo1,
unsigned int fref,lo1,lo1n,lo1a,s,sel,lo1freq, desired_lo1,
desired_lo2,lo2,lo2n,lo2a,lo2num,lo2freq;
fref= 5250 *1000; //5.25MHz
fref= 5250 *1000; //5.25MHz
desired_lo1=rfin+if1;
lo1=(2*(desired_lo1/1000)+(fref/1000)) / (2*fref/1000);
lo1n=lo1/8;
lo1a=lo1-(lo1n*8);
lo1n=lo1/8;
lo1a=lo1-(lo1n*8);
s=rfin/1000/1000+1090;
s=rfin/1000/1000+1090;
if(optimize_vco) {
if(s>1890) sel=0;
......@@ -96,34 +96,34 @@ static int mt2032_compute_freq(struct i2c_client *c,
else sel=4; // >1090
}
else {
if(s>1790) sel=0; // <1958
else if(s>1617) sel=1;
else if(s>1449) sel=2;
else if(s>1291) sel=3;
else sel=4; // >1090
if(s>1790) sel=0; // <1958
else if(s>1617) sel=1;
else if(s>1449) sel=2;
else if(s>1291) sel=3;
else sel=4; // >1090
}
*ret_sel=sel;
lo1freq=(lo1a+8*lo1n)*fref;
lo1freq=(lo1a+8*lo1n)*fref;
tuner_dbg("mt2032: rfin=%d lo1=%d lo1n=%d lo1a=%d sel=%d, lo1freq=%d\n",
rfin,lo1,lo1n,lo1a,sel,lo1freq);
desired_lo2=lo1freq-rfin-if2;
lo2=(desired_lo2)/fref;
lo2n=lo2/8;
lo2a=lo2-(lo2n*8);
lo2num=((desired_lo2/1000)%(fref/1000))* 3780/(fref/1000); //scale to fit in 32bit arith
lo2freq=(lo2a+8*lo2n)*fref + lo2num*(fref/1000)/3780*1000;
desired_lo2=lo1freq-rfin-if2;
lo2=(desired_lo2)/fref;
lo2n=lo2/8;
lo2a=lo2-(lo2n*8);
lo2num=((desired_lo2/1000)%(fref/1000))* 3780/(fref/1000); //scale to fit in 32bit arith
lo2freq=(lo2a+8*lo2n)*fref + lo2num*(fref/1000)/3780*1000;
tuner_dbg("mt2032: rfin=%d lo2=%d lo2n=%d lo2a=%d num=%d lo2freq=%d\n",
rfin,lo2,lo2n,lo2a,lo2num,lo2freq);
if(lo1a<0 || lo1a>7 || lo1n<17 ||lo1n>48 || lo2a<0 ||lo2a >7 ||lo2n<17 || lo2n>30) {
if(lo1a<0 || lo1a>7 || lo1n<17 ||lo1n>48 || lo2a<0 ||lo2a >7 ||lo2n<17 || lo2n>30) {
tuner_info("mt2032: frequency parameters out of range: %d %d %d %d\n",
lo1a, lo1n, lo2a,lo2n);
return(-1);
}
return(-1);
}
mt2032_spurcheck(c, lo1freq, desired_lo2, spectrum_from, spectrum_to);
// should recalculate lo1 (one step up/down)
......@@ -135,10 +135,10 @@ static int mt2032_compute_freq(struct i2c_client *c,
buf[3]=0x0f; //reserved
buf[4]=0x1f;
buf[5]=(lo2n-1) | (lo2a<<5);
if(rfin >400*1000*1000)
buf[6]=0xe4;
else
buf[6]=0xf4; // set PKEN per rev 1.2
if(rfin >400*1000*1000)
buf[6]=0xe4;
else
buf[6]=0xf4; // set PKEN per rev 1.2
buf[7]=8+xogc;
buf[8]=0xc3; //reserved
buf[9]=0x4e; //reserved
......@@ -168,7 +168,7 @@ static int mt2032_check_lo_lock(struct i2c_client *c)
tuner_dbg("mt2032: pll wait 1ms for lock (0x%2x)\n",buf[0]);
udelay(1000);
}
return lock;
return lock;
}
static int mt2032_optimize_vco(struct i2c_client *c,int sel,int lock)
......@@ -202,7 +202,7 @@ static int mt2032_optimize_vco(struct i2c_client *c,int sel,int lock)
buf[0]=0x0f;
buf[1]=sel;
i2c_master_send(c,buf,2);
i2c_master_send(c,buf,2);
lock=mt2032_check_lo_lock(c);
return lock;
}
......@@ -219,23 +219,23 @@ static void mt2032_set_if_freq(struct i2c_client *c, unsigned int rfin,
tuner_dbg("mt2032_set_if_freq rfin=%d if1=%d if2=%d from=%d to=%d\n",
rfin,if1,if2,from,to);
buf[0]=0;
ret=i2c_master_send(c,buf,1);
i2c_master_recv(c,buf,21);
buf[0]=0;
ret=i2c_master_send(c,buf,1);
i2c_master_recv(c,buf,21);
buf[0]=0;
ret=mt2032_compute_freq(c,rfin,if1,if2,from,to,&buf[1],&sel,t->xogc);
if (ret<0)
return;
// send only the relevant registers per Rev. 1.2
buf[0]=0;
ret=i2c_master_send(c,buf,4);
buf[5]=5;
ret=i2c_master_send(c,buf+5,4);
buf[11]=11;
ret=i2c_master_send(c,buf+11,3);
if(ret!=3)
// send only the relevant registers per Rev. 1.2
buf[0]=0;
ret=i2c_master_send(c,buf,4);
buf[5]=5;
ret=i2c_master_send(c,buf+5,4);
buf[11]=11;
ret=i2c_master_send(c,buf+11,3);
if(ret!=3)
tuner_warn("i2c i/o error: rc == %d (should be 3)\n",ret);
// wait for PLLs to lock (per manual), retry LINT if not.
......@@ -253,7 +253,7 @@ static void mt2032_set_if_freq(struct i2c_client *c, unsigned int rfin,
mdelay(10);
buf[1]=8+t->xogc;
i2c_master_send(c,buf,2);
}
}
if (lock!=6)
tuner_warn("MT2032 Fatal Error: PLLs didn't lock.\n");
......@@ -284,7 +284,7 @@ static void mt2032_set_tv_freq(struct i2c_client *c, unsigned int freq)
if2 = 38900*1000;
}
mt2032_set_if_freq(c, freq*62500 /* freq*1000*1000/16 */,
mt2032_set_if_freq(c, freq*62500 /* freq*1000*1000/16 */,
1090*1000*1000, if2, from, to);
}
......@@ -294,7 +294,7 @@ static void mt2032_set_radio_freq(struct i2c_client *c, unsigned int freq)
int if2 = t->radio_if2;
// per Manual for FM tuning: first if center freq. 1085 MHz
mt2032_set_if_freq(c, freq * 1000 / 16,
mt2032_set_if_freq(c, freq * 1000 / 16,
1085*1000*1000,if2,if2,if2);
}
......@@ -302,57 +302,57 @@ static void mt2032_set_radio_freq(struct i2c_client *c, unsigned int freq)
static int mt2032_init(struct i2c_client *c)
{
struct tuner *t = i2c_get_clientdata(c);
unsigned char buf[21];
int ret,xogc,xok=0;
unsigned char buf[21];
int ret,xogc,xok=0;
// Initialize Registers per spec.
buf[1]=2; // Index to register 2
buf[2]=0xff;
buf[3]=0x0f;
buf[4]=0x1f;
ret=i2c_master_send(c,buf+1,4);
buf[5]=6; // Index register 6
buf[6]=0xe4;
buf[7]=0x8f;
buf[8]=0xc3;
buf[9]=0x4e;
buf[10]=0xec;
ret=i2c_master_send(c,buf+5,6);
buf[12]=13; // Index register 13
buf[13]=0x32;
ret=i2c_master_send(c,buf+12,2);
// Adjust XOGC (register 7), wait for XOK
xogc=7;
do {
buf[1]=2; // Index to register 2
buf[2]=0xff;
buf[3]=0x0f;
buf[4]=0x1f;
ret=i2c_master_send(c,buf+1,4);
buf[5]=6; // Index register 6
buf[6]=0xe4;
buf[7]=0x8f;
buf[8]=0xc3;
buf[9]=0x4e;
buf[10]=0xec;
ret=i2c_master_send(c,buf+5,6);
buf[12]=13; // Index register 13
buf[13]=0x32;
ret=i2c_master_send(c,buf+12,2);
// Adjust XOGC (register 7), wait for XOK
xogc=7;
do {
tuner_dbg("mt2032: xogc = 0x%02x\n",xogc&0x07);
mdelay(10);
buf[0]=0x0e;
i2c_master_send(c,buf,1);
i2c_master_recv(c,buf,1);
xok=buf[0]&0x01;
tuner_dbg("mt2032: xok = 0x%02x\n",xok);
if (xok == 1) break;
xogc--;
tuner_dbg("mt2032: xogc = 0x%02x\n",xogc&0x07);
mdelay(10);
buf[0]=0x0e;
i2c_master_send(c,buf,1);
i2c_master_recv(c,buf,1);
xok=buf[0]&0x01;
tuner_dbg("mt2032: xok = 0x%02x\n",xok);
if (xok == 1) break;
xogc--;
tuner_dbg("mt2032: xogc = 0x%02x\n",xogc&0x07);
if (xogc == 3) {
xogc=4; // min. 4 per spec
break;
}
buf[0]=0x07;
buf[1]=0x88 + xogc;
ret=i2c_master_send(c,buf,2);
if (ret!=2)
if (xogc == 3) {
xogc=4; // min. 4 per spec
break;
}
buf[0]=0x07;
buf[1]=0x88 + xogc;
ret=i2c_master_send(c,buf,2);
if (ret!=2)
tuner_warn("i2c i/o error: rc == %d (should be 2)\n",ret);
} while (xok != 1 );
} while (xok != 1 );
t->xogc=xogc;
t->tv_freq = mt2032_set_tv_freq;
t->radio_freq = mt2032_set_radio_freq;
return(1);
return(1);
}
static void mt2050_set_antenna(struct i2c_client *c, unsigned char antenna)
......@@ -426,7 +426,7 @@ static void mt2050_set_if_freq(struct i2c_client *c,unsigned int freq, unsigned
}
ret=i2c_master_send(c,buf,6);
if (ret!=6)
if (ret!=6)
tuner_warn("i2c i/o error: rc == %d (should be 6)\n",ret);
}
......@@ -437,11 +437,11 @@ static void mt2050_set_tv_freq(struct i2c_client *c, unsigned int freq)
if (t->std & V4L2_STD_525_60) {
// NTSC
if2 = 45750*1000;
} else {
// PAL
if2 = 38900*1000;
}
if2 = 45750*1000;
} else {
// PAL
if2 = 38900*1000;
}
if (V4L2_TUNER_DIGITAL_TV == t->mode) {
// DVB (pinnacle 300i)
if2 = 36150*1000;
......@@ -487,7 +487,7 @@ int microtune_init(struct i2c_client *c)
{
struct tuner *t = i2c_get_clientdata(c);
char *name;
unsigned char buf[21];
unsigned char buf[21];
int company_code;
memset(buf,0,sizeof(buf));
......@@ -496,17 +496,17 @@ int microtune_init(struct i2c_client *c)
t->standby = NULL;
name = "unknown";
i2c_master_send(c,buf,1);
i2c_master_recv(c,buf,21);
if (tuner_debug) {
int i;
i2c_master_send(c,buf,1);
i2c_master_recv(c,buf,21);
if (tuner_debug) {
int i;
tuner_dbg("MT20xx hexdump:");
for(i=0;i<21;i++) {
printk(" %02x",buf[i]);
if(((i+1)%8)==0) printk(" ");
}
printk("\n");
}
for(i=0;i<21;i++) {
printk(" %02x",buf[i]);
if(((i+1)%8)==0) printk(" ");
}
printk("\n");
}
company_code = buf[0x11] << 8 | buf[0x12];
tuner_info("microtune: companycode=%04x part=%02x rev=%02x\n",
company_code,buf[0x13],buf[0x14]);
......@@ -525,8 +525,8 @@ int microtune_init(struct i2c_client *c)
default:
tuner_info("microtune %s found, not (yet?) supported, sorry :-/\n",
name);
return 0;
}
return 0;
}
strlcpy(c->name, name, sizeof(c->name));
tuner_info("microtune %s found, OK\n",name);
......
......@@ -464,8 +464,8 @@ saa7113_command (struct i2c_client *client,
/* standard i2c insmod options */
static unsigned short normal_i2c[] = {
I2C_SAA7113>>1, /* saa7113 */
I2C_CLIENT_END
I2C_SAA7113>>1, /* saa7113 */
I2C_CLIENT_END
};
I2C_CLIENT_INSMOD;
......
......@@ -169,31 +169,31 @@ static int saa6752hs_chip_command(struct i2c_client* client,
/* execute the command */
switch(command) {
case SAA6752HS_COMMAND_RESET:
buf[0] = 0x00;
case SAA6752HS_COMMAND_RESET:
buf[0] = 0x00;
break;
case SAA6752HS_COMMAND_STOP:
buf[0] = 0x03;
buf[0] = 0x03;
break;
case SAA6752HS_COMMAND_START:
buf[0] = 0x02;
buf[0] = 0x02;
break;
case SAA6752HS_COMMAND_PAUSE:
buf[0] = 0x04;
buf[0] = 0x04;
break;
case SAA6752HS_COMMAND_RECONFIGURE:
buf[0] = 0x05;
break;
case SAA6752HS_COMMAND_SLEEP:
buf[0] = 0x06;
case SAA6752HS_COMMAND_SLEEP:
buf[0] = 0x06;
break;
case SAA6752HS_COMMAND_RECONFIGURE_FORCE:
case SAA6752HS_COMMAND_RECONFIGURE_FORCE:
buf[0] = 0x07;
break;
......@@ -201,13 +201,13 @@ static int saa6752hs_chip_command(struct i2c_client* client,
return -EINVAL;
}
/* set it and wait for it to be so */
/* set it and wait for it to be so */
i2c_master_send(client, buf, 1);
timeout = jiffies + HZ * 3;
for (;;) {
/* get the current status */
buf[0] = 0x10;
i2c_master_send(client, buf, 1);
i2c_master_send(client, buf, 1);
i2c_master_recv(client, buf, 1);
if (!(buf[0] & 0x20))
......@@ -223,14 +223,14 @@ static int saa6752hs_chip_command(struct i2c_client* client,
/* delay a bit to let encoder settle */
msleep(50);
return status;
return status;
}
static int saa6752hs_set_bitrate(struct i2c_client* client,
struct v4l2_mpeg_compression* params)
{
u8 buf[3];
u8 buf[3];
/* set the bitrate mode */
buf[0] = 0x71;
......@@ -242,31 +242,31 @@ static int saa6752hs_set_bitrate(struct i2c_client* client,
/* set the target bitrate */
buf[0] = 0x80;
buf[1] = params->vi_bitrate.target >> 8;
buf[2] = params->vi_bitrate.target & 0xff;
buf[2] = params->vi_bitrate.target & 0xff;
i2c_master_send(client, buf, 3);
/* set the max bitrate */
buf[0] = 0x81;
buf[1] = params->vi_bitrate.max >> 8;
buf[2] = params->vi_bitrate.max & 0xff;
buf[2] = params->vi_bitrate.max & 0xff;
i2c_master_send(client, buf, 3);
} else {
/* set the target bitrate (no max bitrate for CBR) */
buf[0] = 0x81;
buf[0] = 0x81;
buf[1] = params->vi_bitrate.target >> 8;
buf[2] = params->vi_bitrate.target & 0xff;
buf[2] = params->vi_bitrate.target & 0xff;
i2c_master_send(client, buf, 3);
}
/* set the audio bitrate */
buf[0] = 0x94;
buf[0] = 0x94;
buf[1] = (256 == params->au_bitrate.target) ? 0 : 1;
i2c_master_send(client, buf, 2);
/* set the total bitrate */
buf[0] = 0xb1;
buf[1] = params->st_bitrate.target >> 8;
buf[2] = params->st_bitrate.target & 0xff;
buf[1] = params->st_bitrate.target >> 8;
buf[2] = params->st_bitrate.target & 0xff;
i2c_master_send(client, buf, 3);
return 0;
......@@ -386,8 +386,8 @@ static int saa6752hs_init(struct i2c_client* client)
buf[1] = 0x01;
i2c_master_send(client, buf, 2);
/* set bitrate */
saa6752hs_set_bitrate(client, &h->params);
/* set bitrate */
saa6752hs_set_bitrate(client, &h->params);
/* Set GOP structure {3, 13} */
buf[0] = 0x72;
......@@ -426,9 +426,9 @@ static int saa6752hs_init(struct i2c_client* client)
localPAT[sizeof(PAT) - 1] = crc & 0xFF;
/* compute PMT */
memcpy(localPMT, PMT, sizeof(PMT));
localPMT[3] = 0x40 | ((h->params.ts_pid_pmt >> 8) & 0x0f);
localPMT[4] = h->params.ts_pid_pmt & 0xff;
memcpy(localPMT, PMT, sizeof(PMT));
localPMT[3] = 0x40 | ((h->params.ts_pid_pmt >> 8) & 0x0f);
localPMT[4] = h->params.ts_pid_pmt & 0xff;
localPMT[15] = 0xE0 | ((h->params.ts_pid_pcr >> 8) & 0x0F);
localPMT[16] = h->params.ts_pid_pcr & 0xFF;
localPMT[20] = 0xE0 | ((h->params.ts_pid_video >> 8) & 0x0F);
......@@ -453,7 +453,7 @@ static int saa6752hs_init(struct i2c_client* client)
buf[2] = h->params.ts_pid_video & 0xFF;
i2c_master_send(client,buf,3);
/* Set PCR PID */
/* Set PCR PID */
buf[0] = 0xC4;
buf[1] = (h->params.ts_pid_pcr >> 8) & 0xFF;
buf[2] = h->params.ts_pid_pcr & 0xFF;
......@@ -467,7 +467,7 @@ static int saa6752hs_init(struct i2c_client* client)
buf[0] = 0xa4;
buf[1] = 1;
i2c_master_send(client, buf, 2);
buf[1] = 0;
buf[1] = 0;
i2c_master_send(client, buf, 2);
/* start it going */
......@@ -510,10 +510,10 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind)
{
struct saa6752hs_state *h;
printk("saa6752hs: chip found @ 0x%x\n", addr<<1);
printk("saa6752hs: chip found @ 0x%x\n", addr<<1);
if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL)))
return -ENOMEM;
if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL)))
return -ENOMEM;
memset(h,0,sizeof(*h));
h->client = client_template;
h->params = param_defaults;
......@@ -552,7 +552,7 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
struct v4l2_mpeg_compression *params = arg;
int err = 0;
switch (cmd) {
switch (cmd) {
case VIDIOC_S_MPEGCOMP:
if (NULL == params) {
/* apply settings and start encoder */
......@@ -566,7 +566,7 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
break;
case VIDIOC_G_FMT:
{
struct v4l2_format *f = arg;
struct v4l2_format *f = arg;
if (h->video_format == SAA6752HS_VF_UNKNOWN)
h->video_format = SAA6752HS_VF_D1;
......
This diff is collapsed.
This diff is collapsed.
......@@ -201,10 +201,10 @@ static int pending_call(struct notifier_block *self, unsigned long state,
if (module != THIS_MODULE || state != MODULE_STATE_LIVE)
return NOTIFY_DONE;
if (need_empress)
request_module("saa7134-empress");
if (need_dvb)
request_module("saa7134-dvb");
if (need_empress)
request_module("saa7134-empress");
if (need_dvb)
request_module("saa7134-dvb");
return NOTIFY_DONE;
}
......@@ -279,8 +279,8 @@ unsigned long saa7134_buffer_base(struct saa7134_buf *buf)
int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt)
{
__le32 *cpu;
dma_addr_t dma_addr;
__le32 *cpu;
dma_addr_t dma_addr;
cpu = pci_alloc_consistent(pci, SAA7134_PGTABLE_SIZE, &dma_addr);
if (NULL == cpu)
......@@ -440,7 +440,7 @@ int saa7134_set_dmabits(struct saa7134_dev *dev)
ctrl |= SAA7134_MAIN_CTRL_TE0;
irq |= SAA7134_IRQ1_INTE_RA0_1 |
SAA7134_IRQ1_INTE_RA0_0;
cap = dev->video_q.curr->vb.field;
cap = dev->video_q.curr->vb.field;
}
/* video capture -- dma 1+2 (planar modes) */
......@@ -646,7 +646,7 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
saa_writel(SAA7134_IRQ1, 0);
saa_writel(SAA7134_IRQ2, 0);
init_MUTEX(&dev->lock);
init_MUTEX(&dev->lock);
spin_lock_init(&dev->slock);
saa7134_track_gpio(dev,"pre-init");
......@@ -704,7 +704,7 @@ static int saa7134_hwinit2(struct saa7134_dev *dev)
saa7134_tvaudio_init2(dev);
/* enable IRQ's */
irq2_mask =
irq2_mask =
SAA7134_IRQ2_INTE_DEC3 |
SAA7134_IRQ2_INTE_DEC2 |
SAA7134_IRQ2_INTE_DEC1 |
......@@ -889,8 +889,8 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
/* print pci info */
pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &dev->pci_rev);
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat);
printk(KERN_INFO "%s: found at %s, rev: %d, irq: %d, "
pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &dev->pci_lat);
printk(KERN_INFO "%s: found at %s, rev: %d, irq: %d, "
"latency: %d, mmio: 0x%lx\n", dev->name,
pci_name(pci_dev), dev->pci_rev, pci_dev->irq,
dev->pci_lat,pci_resource_start(pci_dev,0));
......@@ -914,7 +914,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
dev->tda9887_conf = saa7134_boards[dev->board].tda9887_conf;
if (UNSET != tuner[dev->nr])
dev->tuner_type = tuner[dev->nr];
printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
printk(KERN_INFO "%s: subsystem: %04x:%04x, board: %s [card=%d,%s]\n",
dev->name,pci_dev->subsystem_vendor,
pci_dev->subsystem_device,saa7134_boards[dev->board].name,
dev->board, card[dev->nr] == dev->board ?
......@@ -964,12 +964,12 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
request_module("tuner");
if (dev->tda9887_conf)
request_module("tda9887");
if (card_is_empress(dev)) {
if (card_is_empress(dev)) {
request_module("saa6752hs");
request_module_depend("saa7134-empress",&need_empress);
}
if (card_is_dvb(dev))
if (card_is_dvb(dev))
request_module_depend("saa7134-dvb",&need_dvb);
v4l2_prio_init(&dev->prio);
......@@ -1078,7 +1078,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
static void __devexit saa7134_finidev(struct pci_dev *pci_dev)
{
struct saa7134_dev *dev = pci_get_drvdata(pci_dev);
struct saa7134_dev *dev = pci_get_drvdata(pci_dev);
struct list_head *item;
struct saa7134_mpeg_ops *mops;
......@@ -1173,10 +1173,10 @@ EXPORT_SYMBOL(saa7134_ts_unregister);
/* ----------------------------------------------------------- */
static struct pci_driver saa7134_pci_driver = {
.name = "saa7134",
.id_table = saa7134_pci_tbl,
.probe = saa7134_initdev,
.remove = __devexit_p(saa7134_finidev),
.name = "saa7134",
.id_table = saa7134_pci_tbl,
.probe = saa7134_initdev,
.remove = __devexit_p(saa7134_finidev),
};
static int saa7134_init(void)
......
......@@ -547,7 +547,7 @@ static int philips_tda827x_pll_set(struct dvb_frontend *fe, struct dvb_frontend_
u8 tuner_buf[14];
struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tuner_buf,
.len = sizeof(tuner_buf) };
.len = sizeof(tuner_buf) };
int i, tuner_freq, if_freq;
u32 N;
switch (params->u.ofdm.bandwidth) {
......@@ -606,7 +606,7 @@ static void philips_tda827x_pll_sleep(struct dvb_frontend *fe)
struct saa7134_dev *dev = fe->dvb->priv;
static u8 tda827x_sleep[] = { 0x30, 0xd0};
struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tda827x_sleep,
.len = sizeof(tda827x_sleep) };
.len = sizeof(tda827x_sleep) };
i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
}
......
......@@ -55,7 +55,7 @@ static void ts_reset_encoder(struct saa7134_dev* dev)
saa_writeb(SAA7134_SPECIAL_MODE, 0x00);
msleep(10);
saa_writeb(SAA7134_SPECIAL_MODE, 0x01);
saa_writeb(SAA7134_SPECIAL_MODE, 0x01);
msleep(100);
dev->empress_started = 0;
}
......@@ -65,7 +65,7 @@ static int ts_init_encoder(struct saa7134_dev* dev)
ts_reset_encoder(dev);
saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, NULL);
dev->empress_started = 1;
return 0;
return 0;
}
/* ------------------------------------------------------------------ */
......@@ -169,7 +169,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
struct v4l2_capability *cap = arg;
memset(cap,0,sizeof(*cap));
strcpy(cap->driver, "saa7134");
strcpy(cap->driver, "saa7134");
strlcpy(cap->card, saa7134_boards[dev->board].name,
sizeof(cap->card));
sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
......
......@@ -239,7 +239,7 @@ static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap,
unsigned char data;
int addr,rc,i,byte;
status = i2c_get_status(dev);
status = i2c_get_status(dev);
if (!i2c_is_idle(status))
if (!i2c_reset(dev))
return -EIO;
......@@ -296,7 +296,7 @@ static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap,
rc = -EIO;
if (!i2c_is_busy_wait(dev))
goto err;
status = i2c_get_status(dev);
status = i2c_get_status(dev);
if (i2c_is_error(status))
goto err;
/* ensure that the bus is idle for at least one bit slot */
......@@ -348,12 +348,12 @@ static int attach_inform(struct i2c_client *client)
client->driver->command(client, TUNER_SET_TYPE_ADDR, &tun_setup);
}
}
}
if (tuner != UNSET) {
tun_setup.type = tuner;
tun_setup.addr = saa7134_boards[dev->board].tuner_addr;
tun_setup.type = tuner;
tun_setup.addr = saa7134_boards[dev->board].tuner_addr;
if ((tun_setup.addr == ADDR_UNSET)||(tun_setup.addr == client->addr)) {
......@@ -361,11 +361,11 @@ static int attach_inform(struct i2c_client *client)
client->driver->command(client,TUNER_SET_TYPE_ADDR, &tun_setup);
}
}
}
client->driver->command(client, TDA9887_SET_CONFIG, &conf);
return 0;
return 0;
}
static struct i2c_algorithm saa7134_algo = {
......
......@@ -114,24 +114,24 @@ static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = {
/* Alfons Geser <a.geser@cox.net>
* updates from Job D. R. Borges <jobdrb@ig.com.br> */
static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = {
[ 18 ] = KEY_POWER,
[ 1 ] = KEY_TV, // DVR
[ 21 ] = KEY_DVD, // DVD
[ 23 ] = KEY_AUDIO, // music
// DVR mode / DVD mode / music mode
[ 27 ] = KEY_MUTE, // mute
[ 2 ] = KEY_LANGUAGE, // MTS/SAP / audio / autoseek
[ 30 ] = KEY_SUBTITLE, // closed captioning / subtitle / seek
[ 22 ] = KEY_ZOOM, // full screen
[ 28 ] = KEY_VIDEO, // video source / eject / delall
[ 29 ] = KEY_RESTART, // playback / angle / del
[ 47 ] = KEY_SEARCH, // scan / menu / playlist
[ 48 ] = KEY_CHANNEL, // CH surfing / bookmark / memo
[ 49 ] = KEY_HELP, // help
[ 50 ] = KEY_MODE, // num/memo
[ 51 ] = KEY_ESC, // cancel
[ 18 ] = KEY_POWER,
[ 1 ] = KEY_TV, // DVR
[ 21 ] = KEY_DVD, // DVD
[ 23 ] = KEY_AUDIO, // music
// DVR mode / DVD mode / music mode
[ 27 ] = KEY_MUTE, // mute
[ 2 ] = KEY_LANGUAGE, // MTS/SAP / audio / autoseek
[ 30 ] = KEY_SUBTITLE, // closed captioning / subtitle / seek
[ 22 ] = KEY_ZOOM, // full screen
[ 28 ] = KEY_VIDEO, // video source / eject / delall
[ 29 ] = KEY_RESTART, // playback / angle / del
[ 47 ] = KEY_SEARCH, // scan / menu / playlist
[ 48 ] = KEY_CHANNEL, // CH surfing / bookmark / memo
[ 49 ] = KEY_HELP, // help
[ 50 ] = KEY_MODE, // num/memo
[ 51 ] = KEY_ESC, // cancel
[ 12 ] = KEY_UP, // up
[ 16 ] = KEY_DOWN, // down
......@@ -148,24 +148,24 @@ static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = {
[ 45 ] = KEY_PLAY, // play
[ 46 ] = KEY_SHUFFLE, // snapshot / shuffle
[ 0 ] = KEY_KP0,
[ 5 ] = KEY_KP1,
[ 6 ] = KEY_KP2,
[ 7 ] = KEY_KP3,
[ 9 ] = KEY_KP4,
[ 10 ] = KEY_KP5,
[ 11 ] = KEY_KP6,
[ 13 ] = KEY_KP7,
[ 14 ] = KEY_KP8,
[ 15 ] = KEY_KP9,
[ 42 ] = KEY_VOLUMEUP,
[ 17 ] = KEY_VOLUMEDOWN,
[ 24 ] = KEY_CHANNELUP, // CH.tracking up
[ 25 ] = KEY_CHANNELDOWN, // CH.tracking down
[ 19 ] = KEY_KPENTER, // enter
[ 33 ] = KEY_KPDOT, // . (decimal dot)
[ 0 ] = KEY_KP0,
[ 5 ] = KEY_KP1,
[ 6 ] = KEY_KP2,
[ 7 ] = KEY_KP3,
[ 9 ] = KEY_KP4,
[ 10 ] = KEY_KP5,
[ 11 ] = KEY_KP6,
[ 13 ] = KEY_KP7,
[ 14 ] = KEY_KP8,
[ 15 ] = KEY_KP9,
[ 42 ] = KEY_VOLUMEUP,
[ 17 ] = KEY_VOLUMEDOWN,
[ 24 ] = KEY_CHANNELUP, // CH.tracking up
[ 25 ] = KEY_CHANNELDOWN, // CH.tracking down
[ 19 ] = KEY_KPENTER, // enter
[ 33 ] = KEY_KPDOT, // . (decimal dot)
};
static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = {
......@@ -455,13 +455,13 @@ static int build_key(struct saa7134_dev *dev)
saa_setb(SAA7134_GPIO_GPMODE3,SAA7134_GPIO_GPRESCAN);
gpio = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
if (ir->polling) {
if (ir->last_gpio == gpio)
return 0;
ir->last_gpio = gpio;
}
if (ir->polling) {
if (ir->last_gpio == gpio)
return 0;
ir->last_gpio = gpio;
}
data = ir_extract_bits(gpio, ir->mask_keycode);
data = ir_extract_bits(gpio, ir->mask_keycode);
dprintk("build_key gpio=0x%x mask=0x%x data=%d\n",
gpio, ir->mask_keycode, data);
......@@ -478,9 +478,9 @@ static int build_key(struct saa7134_dev *dev)
void saa7134_input_irq(struct saa7134_dev *dev)
{
struct saa7134_ir *ir = dev->remote;
struct saa7134_ir *ir = dev->remote;
if (!ir->polling)
if (!ir->polling)
build_key(dev);
}
......@@ -515,7 +515,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
switch (dev->board) {
case SAA7134_BOARD_FLYVIDEO2000:
case SAA7134_BOARD_FLYVIDEO3000:
case SAA7134_BOARD_FLYTVPLATINUM_FM:
case SAA7134_BOARD_FLYTVPLATINUM_FM:
case SAA7134_BOARD_FLYTVPLATINUM_MINI2:
ir_codes = flyvideo_codes;
mask_keycode = 0xEC00000;
......@@ -557,7 +557,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
saa_setb(SAA7134_GPIO_GPMODE0, 0x4);
saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
break;
case SAA7134_BOARD_KWORLD_TERMINATOR:
case SAA7134_BOARD_KWORLD_TERMINATOR:
ir_codes = avacssmart_codes;
mask_keycode = 0x00001f;
mask_keyup = 0x000060;
......@@ -571,7 +571,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
mask_keyup = 0x004000;
polling = 50; // ms
break;
case SAA7134_BOARD_GOTVIEW_7135:
case SAA7134_BOARD_GOTVIEW_7135:
ir_codes = gotview7135_codes;
mask_keycode = 0x0003EC;
mask_keyup = 0x008000;
......@@ -585,8 +585,8 @@ int saa7134_input_init1(struct saa7134_dev *dev)
mask_keyup = 0x400000;
polling = 50; // ms
break;
case SAA7134_BOARD_VIDEOMATE_DVBT_300:
case SAA7134_BOARD_VIDEOMATE_DVBT_200:
case SAA7134_BOARD_VIDEOMATE_DVBT_300:
case SAA7134_BOARD_VIDEOMATE_DVBT_200:
ir_codes = videomate_tv_pvr_codes;
mask_keycode = 0x003F00;
mask_keyup = 0x040000;
......@@ -610,7 +610,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
ir->mask_keycode = mask_keycode;
ir->mask_keydown = mask_keydown;
ir->mask_keyup = mask_keyup;
ir->polling = polling;
ir->polling = polling;
/* init input device */
snprintf(ir->name, sizeof(ir->name), "saa7134 IR (%s)",
......
This diff is collapsed.
......@@ -27,7 +27,7 @@
/* DMA channels, n = 0 ... 6 */
#define SAA7134_RS_BA1(n) ((0x200 >> 2) + 4*n)
#define SAA7134_RS_BA2(n) ((0x204 >> 2) + 4*n)
#define SAA7134_RS_BA2(n) ((0x204 >> 2) + 4*n)
#define SAA7134_RS_PITCH(n) ((0x208 >> 2) + 4*n)
#define SAA7134_RS_CONTROL(n) ((0x20c >> 2) + 4*n)
#define SAA7134_RS_CONTROL_WSWAP (0x01 << 25)
......@@ -53,14 +53,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)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment