summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/common/ir-common.c8
-rw-r--r--linux/drivers/media/video/bt832.c8
-rw-r--r--linux/drivers/media/video/bt832.h36
-rw-r--r--linux/drivers/media/video/bt848.h10
-rw-r--r--linux/drivers/media/video/btcx-risc.c6
-rw-r--r--linux/drivers/media/video/bttv-cards.c176
-rw-r--r--linux/drivers/media/video/bttv-driver.c144
-rw-r--r--linux/drivers/media/video/bttv-gpio.c4
-rw-r--r--linux/drivers/media/video/bttv-i2c.c14
-rw-r--r--linux/drivers/media/video/bttv-if.c14
-rw-r--r--linux/drivers/media/video/bttv-risc.c14
-rw-r--r--linux/drivers/media/video/bttv-vbi.c16
-rw-r--r--linux/drivers/media/video/bttv.h18
-rw-r--r--linux/drivers/media/video/bttvp.h8
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c6
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c60
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c32
-rw-r--r--linux/drivers/media/video/cx88/cx88-core.c52
-rw-r--r--linux/drivers/media/video/cx88/cx88-dvb.c12
-rw-r--r--linux/drivers/media/video/cx88/cx88-i2c.c8
-rw-r--r--linux/drivers/media/video/cx88/cx88-mpeg.c30
-rw-r--r--linux/drivers/media/video/cx88/cx88-reg.h66
-rw-r--r--linux/drivers/media/video/cx88/cx88-tvaudio.c216
-rw-r--r--linux/drivers/media/video/cx88/cx88-vbi.c12
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c64
-rw-r--r--linux/drivers/media/video/msp3400-driver.c98
-rw-r--r--linux/drivers/media/video/msp3400-old.c104
-rw-r--r--linux/drivers/media/video/msp3400.c98
-rw-r--r--linux/drivers/media/video/saa6752hs.c94
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c94
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c10
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c30
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-i2c.c16
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c24
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-oss.c22
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-ts.c50
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-tvaudio.c40
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-vbi.c10
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c82
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h12
-rw-r--r--linux/drivers/media/video/tda7432.c84
-rw-r--r--linux/drivers/media/video/tda9875.c36
-rw-r--r--linux/drivers/media/video/tda9887.c8
-rw-r--r--linux/drivers/media/video/tvaudio.c74
-rw-r--r--linux/drivers/media/video/tvmixer.c10
-rw-r--r--linux/drivers/media/video/v4l1-compat.c36
-rw-r--r--linux/drivers/media/video/v4l2-common.c12
-rw-r--r--linux/drivers/media/video/video-buf.c32
-rw-r--r--linux/include/linux/videodev.h16
-rw-r--r--linux/include/linux/videodev2.h20
-rw-r--r--linux/include/media/audiochip.h2
-rw-r--r--linux/include/media/saa6752hs.h6
-rw-r--r--linux/include/media/tuner.h4
-rw-r--r--linux/include/media/video-buf.h6
54 files changed, 1082 insertions, 1082 deletions
diff --git a/linux/drivers/media/common/ir-common.c b/linux/drivers/media/common/ir-common.c
index f3f75e1a6..d40c8f37b 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.3 2004/09/15 16:15:24 kraxel Exp $
+ * $Id: ir-common.c,v 1.4 2004/10/13 10:39:00 kraxel Exp $
*
* some common structs and functions to handle infrared remotes via
* input layer ...
@@ -107,7 +107,7 @@ IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE] = {
[ 0x2a ] = KEY_RESERVED, // timed page/channel clck
[ 0x2b ] = KEY_RESERVED, // increment (USA)
[ 0x2c ] = KEY_RESERVED, // decrement (USA)
- [ 0x2d ] = KEY_RESERVED, //
+ [ 0x2d ] = KEY_RESERVED, //
[ 0x2f ] = KEY_RESERVED, // PIP shift
[ 0x31 ] = KEY_RESERVED, // erase
[ 0x34 ] = KEY_RESERVED, // wind
@@ -150,7 +150,7 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
int ir_type, IR_KEYTAB_TYPE *ir_codes)
{
int i;
-
+
ir->ir_type = ir_type;
if (ir_codes)
memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes));
@@ -182,7 +182,7 @@ void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
u32 ir_key, u32 ir_raw)
{
u32 keycode = IR_KEYCODE(ir->ir_codes, ir_key);
-
+
if (ir->keypressed && ir->keycode != keycode) {
ir->keypressed = 0;
ir_input_key_event(dev,ir);
diff --git a/linux/drivers/media/video/bt832.c b/linux/drivers/media/video/bt832.c
index 59e5d2b10..4051c2312 100644
--- a/linux/drivers/media/video/bt832.c
+++ b/linux/drivers/media/video/bt832.c
@@ -6,7 +6,7 @@
It outputs an 8-bit 4:2:2 YUV or YCrCb video signal which can be directly
connected to bt848/bt878 GPIO pins on this purpose.
(see: VLSI Vision Ltd. www.vvl.co.uk for camera datasheets)
-
+
Supported Cards:
- Pixelview Rev.4E: 0x8a
GPIO 0x400000 toggles Bt832 RESET, and the chip changes to i2c 0x88 !
@@ -101,7 +101,7 @@ int bt832_init(struct i2c_client *i2c_client_s)
buf=kmalloc(65,GFP_KERNEL);
bt832_hexdump(i2c_client_s,buf);
-
+
if(buf[0x40] != 0x31) {
printk("bt832: this i2c chip is no bt832 (id=%02x). Detaching.\n",buf[0x40]);
kfree(buf);
@@ -141,7 +141,7 @@ int bt832_init(struct i2c_client *i2c_client_s)
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);
-
+
bt832_hexdump(i2c_client_s,buf);
#if 0
@@ -204,7 +204,7 @@ static int bt832_attach(struct i2c_adapter *adap, int addr,
bt832_detach(&t->client);
return -1;
}
-
+
return 0;
}
diff --git a/linux/drivers/media/video/bt832.h b/linux/drivers/media/video/bt832.h
index 7a98c06e0..9b6a8d2c9 100644
--- a/linux/drivers/media/video/bt832.h
+++ b/linux/drivers/media/video/bt832.h
@@ -1,6 +1,6 @@
/* Bt832 CMOS Camera Video Processor (VP)
- The Bt832 CMOS Camera Video Processor chip connects a Quartsight CMOS
+ The Bt832 CMOS Camera Video Processor chip connects a Quartsight CMOS
color digital camera directly to video capture devices via an 8-bit,
4:2:2 YUV or YCrCb video interface.
@@ -85,7 +85,7 @@
#define BT832_DEVICE_ID 63
# define BT832_DEVICE_ID__31 0x31 // Bt832 has ID 0x31
-/* STMicroelectronivcs VV5404 camera module
+/* STMicroelectronivcs VV5404 camera module
i2c: 0x20: sensor address
i2c: 0xa0: eeprom for ccd defect map
*/
@@ -256,26 +256,26 @@ For the CCIR-601 standards, the sampling is based on a static orthogonal samplin
//===========================================================================
// Timing generator SRAM table values for CCIR601 720x480 NTSC
//===========================================================================
-// For NTSC CCIR656
+// For NTSC CCIR656
BYTE BtCard::SRAMTable_NTSC[] =
{
// SRAM Timing Table for NTSC
- 0x0c, 0xc0, 0x00,
- 0x00, 0x90, 0xc2,
- 0x03, 0x10, 0x03,
- 0x06, 0x10, 0x34,
- 0x12, 0x12, 0x65,
- 0x02, 0x13, 0x24,
- 0x19, 0x00, 0x24,
- 0x39, 0x00, 0x96,
- 0x59, 0x08, 0x93,
+ 0x0c, 0xc0, 0x00,
+ 0x00, 0x90, 0xc2,
+ 0x03, 0x10, 0x03,
+ 0x06, 0x10, 0x34,
+ 0x12, 0x12, 0x65,
+ 0x02, 0x13, 0x24,
+ 0x19, 0x00, 0x24,
+ 0x39, 0x00, 0x96,
+ 0x59, 0x08, 0x93,
0x83, 0x08, 0x97,
- 0x03, 0x50, 0x30,
- 0xc0, 0x40, 0x30,
- 0x86, 0x01, 0x01,
- 0xa6, 0x0d, 0x62,
- 0x03, 0x11, 0x61,
- 0x05, 0x37, 0x30,
+ 0x03, 0x50, 0x30,
+ 0xc0, 0x40, 0x30,
+ 0x86, 0x01, 0x01,
+ 0xa6, 0x0d, 0x62,
+ 0x03, 0x11, 0x61,
+ 0x05, 0x37, 0x30,
0xac, 0x21, 0x50
};
diff --git a/linux/drivers/media/video/bt848.h b/linux/drivers/media/video/bt848.h
index a1a3a0dad..0bcd95303 100644
--- a/linux/drivers/media/video/bt848.h
+++ b/linux/drivers/media/video/bt848.h
@@ -1,4 +1,4 @@
-/*
+/*
bt848.h - Bt848 register offsets
Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
@@ -22,10 +22,10 @@
#define _BT848_H_
#ifndef PCI_VENDOR_ID_BROOKTREE
-#define PCI_VENDOR_ID_BROOKTREE 0x109e
+#define PCI_VENDOR_ID_BROOKTREE 0x109e
#endif
#ifndef PCI_DEVICE_ID_BT848
-#define PCI_DEVICE_ID_BT848 0x350
+#define PCI_DEVICE_ID_BT848 0x350
#endif
#ifndef PCI_DEVICE_ID_BT849
#define PCI_DEVICE_ID_BT849 0x351
@@ -50,7 +50,7 @@
#define BT848_DSTATUS_LOF (1<<1)
#define BT848_DSTATUS_COF (1<<0)
-#define BT848_IFORM 0x004
+#define BT848_IFORM 0x004
#define BT848_IFORM_HACTIVE (1<<7)
#define BT848_IFORM_MUXSEL (3<<5)
#define BT848_IFORM_MUX0 (2<<5)
@@ -71,7 +71,7 @@
#define BT848_IFORM_AUTO 0
#define BT848_IFORM_NORM 7
-#define BT848_TDEC 0x008
+#define BT848_TDEC 0x008
#define BT848_TDEC_DEC_FIELD (1<<7)
#define BT848_TDEC_FLDALIGN (1<<6)
#define BT848_TDEC_DEC_RAT (0x1f)
diff --git a/linux/drivers/media/video/btcx-risc.c b/linux/drivers/media/video/btcx-risc.c
index b7fe35ef6..4ecb36193 100644
--- a/linux/drivers/media/video/btcx-risc.c
+++ b/linux/drivers/media/video/btcx-risc.c
@@ -1,5 +1,5 @@
/*
- $Id: btcx-risc.c,v 1.2 2004/09/15 16:15:24 kraxel Exp $
+ $Id: btcx-risc.c,v 1.3 2004/10/13 10:39:00 kraxel Exp $
btcx-risc.c
@@ -190,7 +190,7 @@ btcx_calc_skips(int line, int width, unsigned int *maxy,
{
unsigned int clip,skip;
int end,maxline;
-
+
skip=0;
maxline = 9999;
for (clip = 0; clip < nclips; clip++) {
@@ -200,7 +200,7 @@ btcx_calc_skips(int line, int width, unsigned int *maxy,
continue;
if (clips[clip].c.left > (signed)width)
break;
-
+
/* vertical range */
if (line > clips[clip].c.top+clips[clip].c.height-1)
continue;
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c
index fe7220584..805cc389b 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.28 2004/10/06 13:45:14 kraxel Exp $
+ $Id: bttv-cards.c,v 1.29 2004/10/13 10:39:00 kraxel Exp $
bttv-cards.c
@@ -143,7 +143,7 @@ __setup("bttv.tuner=", p_tuner);
int __init bttv_parse(char *str, int max, int *vals)
{
int i,number,res = 2;
-
+
for (i = 0; res == 2 && i < max; i++) {
res = get_option(&str,&number);
if (res)
@@ -192,7 +192,7 @@ static struct CARD {
{ 0x3000121a, BTTV_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" },
{ 0x263710b4, BTTV_VOODOOTV_FM, "3Dfx VoodooTV FM/ VoodooTV 200" },
{ 0x3060121a, BTTV_STB2, "3Dfx VoodooTV 100/ STB OEM" },
-
+
{ 0x3000144f, BTTV_MAGICTVIEW063, "(Askey Magic/others) TView99 CPH06x" },
{ 0x3002144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH05x" },
{ 0x3005144f, BTTV_MAGICTVIEW061, "(Askey Magic/others) TView99 CPH061/06L (T1/LC)" },
@@ -210,7 +210,7 @@ static struct CARD {
{ 0x1118153b, BTTV_TERRATVALUE, "Terratec TValue (Temic PAL B/G)" },
{ 0x1119153b, BTTV_TERRATVALUE, "Terratec TValue (Philips PAL I)" },
{ 0x111a153b, BTTV_TERRATVALUE, "Terratec TValue (Temic PAL I)" },
-
+
{ 0x1123153b, BTTV_TERRATVRADIO, "Terratec TV Radio+" },
{ 0x1127153b, BTTV_TERRATV, "Terratec TV+ (V1.05)" },
// clashes with FlyVideo
@@ -246,7 +246,7 @@ static struct CARD {
{ 0xa1550000, BTTV_IVC200, "IVC-200" },
{ 0xa1550001, BTTV_IVC200, "IVC-200" },
{ 0xa1550002, BTTV_IVC200, "IVC-200" },
- { 0xa1550003, BTTV_IVC200, "IVC-200" },
+ { 0xa1550003, BTTV_IVC200, "IVC-200" },
{ 0xa1550100, BTTV_IVC200, "IVC-200G" },
{ 0xa1550101, BTTV_IVC200, "IVC-200G" },
{ 0xa1550102, BTTV_IVC200, "IVC-200G" },
@@ -267,10 +267,10 @@ static struct CARD {
{ 0xa182ff0d, BTTV_IVC120, "IVC-120G" },
{ 0xa182ff0e, BTTV_IVC120, "IVC-120G" },
{ 0xa182ff0f, BTTV_IVC120, "IVC-120G" },
-
+
{ 0x41424344, BTTV_GRANDTEC, "GrandTec Multi Capture" },
{ 0x01020304, BTTV_XGUARD, "Grandtec Grand X-Guard" },
-
+
{ 0x18501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
{ 0xa0501851, BTTV_CHRONOS_VS2, "FlyVideo 98 (LR50)/ Chronos Video Shuttle II" },
{ 0x18511851, BTTV_FLYVIDEO98EZ, "FlyVideo 98EZ (LR51)/ CyberMail AV" },
@@ -302,7 +302,7 @@ static struct CARD {
// likely broken, vendor id doesn't match the other magic views ...
//{ 0xa0fca04f, BTTV_MAGICTVIEW063, "Guillemot Maxi TV Video 3" },
-
+
// DVB cards (using pci function .1 for mpeg data xfer)
{ 0x01010071, BTTV_NEBULA_DIGITV, "Nebula Electronics DigiTV" },
{ 0x07611461, BTTV_AVDVBT_761, "AverMedia AverTV DVB-T" },
@@ -311,7 +311,7 @@ static struct CARD {
{ 0xfc00270f, BTTV_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" },
{ 0x07711461, BTTV_AVDVBT_771, "AVermedia DVB-T 771" },
{ 0xdb1018ac, BTTV_DVICO_DVBT_LITE, "DVICO FusionHDTV DVB-T Lite" },
-
+
{ 0, -1, NULL }
};
@@ -702,7 +702,7 @@ struct tvcard bttv_tvcards[] = {
10000 : ext. Video audio input
20000 : TV Mono
a0000 : TV Mono/2
- 1a0000 : TV Stereo
+ 1a0000 : TV Stereo
30000 : Radio
40000 : Mute
*/
@@ -1117,7 +1117,7 @@ struct tvcard bttv_tvcards[] = {
.pll = PLL_28,
.tuner_type = 5,
},{
- /* This is the ultimate cheapo capture card
+ /* This is the ultimate cheapo capture card
* just a BT848A on a small PCB!
* Steve Hosgood <steve@equiinet.com> */
.name = "GrandTec 'Grand Video Capture' (Bt848)",
@@ -1188,7 +1188,7 @@ struct tvcard bttv_tvcards[] = {
.tuner_type = -1,
},{
/* Miguel Angel Alvarez <maacruz@navegalia.com>
- new Easy TV BT878 version (model CPH061)
+ new Easy TV BT878 version (model CPH061)
special thanks to Informatica Mieres for providing the card */
.name = "Askey CPH061/ BESTBUY Easy TV (bt878)",
.video_inputs = 3,
@@ -1392,7 +1392,7 @@ struct tvcard bttv_tvcards[] = {
},{
.name = "Powercolor MTV878/ MTV878R/ MTV878F",
.video_inputs = 3,
- .audio_inputs = 2,
+ .audio_inputs = 2,
.tuner = 0,
.svhs = 2,
.gpiomask = 0x1C800F, // Bit0-2: Audio select, 8-12:remote control 14:remote valid 15:remote reset
@@ -1570,7 +1570,7 @@ struct tvcard bttv_tvcards[] = {
.no_tda9875 = 1,
.no_tda7432 = 1,
},{
-
+
/* ---- card 0x58 ---------------------------------- */
.name = "Osprey 200/250", /* 0x1(A|B)-00C4-C1 */
.video_inputs = 2,
@@ -1663,11 +1663,11 @@ struct tvcard bttv_tvcards[] = {
.tuner_type = -1,
.no_msp34xx = 1,
.no_tda9875 = 1,
- .no_tda7432 = 1,
+ .no_tda7432 = 1,
.gpiomask = 0x01,
.audiomux = { 0, 0, 0, 0, 1 },
.muxsel = { 3, 0, 1, 2},
- .needs_tvaudio = 0,
+ .needs_tvaudio = 0,
.pll = PLL_28,
.no_gpioirq = 1,
},{
@@ -1679,7 +1679,7 @@ struct tvcard bttv_tvcards[] = {
.gpiomask = 2,
// TV, Comp1, Composite over SVID con, SVID
.muxsel = { 2, 3, 1, 1},
- .audiomux = { 2, 2, 0, 0, 0 },
+ .audiomux = { 2, 2, 0, 0, 0 },
.pll = PLL_28,
.has_radio = 1,
.tuner_type = TUNER_PHILIPS_PAL,
@@ -1764,7 +1764,7 @@ struct tvcard bttv_tvcards[] = {
/* Notes:
- card lacks subsystem ID
- stereo variant w/ daughter board with tda9874a @0xb0
- - Audio Routing:
+ - Audio Routing:
always from tda9874 independent of GPIO (?)
external line in: unknown
- Other chips: em78p156elp @ 0x96 (probably IR remote control)
@@ -1848,7 +1848,7 @@ struct tvcard bttv_tvcards[] = {
.audio_inputs = 0,
.tuner = -1, /* card has no tuner */
.svhs = 3,
- .gpiomask = 0x00,
+ .gpiomask = 0x00,
.muxsel = { 2, 3, 1, 0},
.audiomux = { 0, 0, 0, 0, 0, 0 }, /* card has no audio */
.needs_tvaudio = 1,
@@ -1921,7 +1921,7 @@ struct tvcard bttv_tvcards[] = {
.no_tda9875 = 1,
.no_tda7432 = 1,
.gpiomask = 0x00,
- .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+ .muxsel = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10 },
.muxsel_hook = ivc120_muxsel,
.pll = PLL_28,
@@ -2206,7 +2206,7 @@ void __devinit bttv_idcard(struct bttv *btv)
for (type = -1, i = 0; cards[i].id != 0; i++)
if (cards[i].id == btv->cardid)
type = i;
-
+
if (type != -1) {
/* found it */
printk(KERN_INFO "bttv%d: detected: %s [card=%d], "
@@ -2223,12 +2223,12 @@ void __devinit bttv_idcard(struct bttv *btv)
printk(KERN_DEBUG "please mail id, board name and "
"the correct card= insmod option to kraxel@bytesex.org\n");
}
- }
+ }
/* let the user override the autodetected type */
if (card[btv->c.nr] < bttv_num_tvcards)
btv->c.type=card[btv->c.nr];
-
+
/* print which card config we are using */
printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
bttv_tvcards[btv->c.type].name, btv->c.type,
@@ -2268,7 +2268,7 @@ void __devinit bttv_idcard(struct bttv *btv)
void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
{
int type = -1;
-
+
if (0 == strncmp(eeprom_data,"GET MM20xPCTV",13))
type = BTTV_MODTEC_205;
else if (0 == strncmp(eeprom_data+20,"Picolo",7))
@@ -2284,7 +2284,7 @@ void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
}
static void flyvideo_gpio(struct bttv *btv)
-{
+{
int gpio,has_remote,has_radio,is_capture_only,is_lr90,has_tda9820_tda9821;
int tuner=-1,ttype;
@@ -2298,10 +2298,10 @@ static void flyvideo_gpio(struct bttv *btv)
// CP9=GPIO23 .. CP1=GPIO15; when OPEN, the corresponding GPIO reads 1.
// GPIO14-12: n.c.
// LR90: GP9=GPIO23 .. GP1=GPIO15 (right above the bt878)
-
+
// lowest 3 bytes are remote control codes (no handshake needed)
// xxxFFF: No remote control chip soldered
- // xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
+ // xxxF00(LR26/LR50), xxxFE0(LR90): Remote control chip (LVA001 or CF45) soldered
// Note: Some bits are Audio_Mask !
ttype=(gpio&0x0f0000)>>16;
@@ -2329,18 +2329,18 @@ static void flyvideo_gpio(struct bttv *btv)
is_lr90 = !(gpio & 0x002000); // else LR26/LR50 (LR38/LR51 f. capture only)
// gpio & 0x001000 // output bit for audio routing
- if(is_capture_only)
- tuner=4; // No tuner present
+ if(is_capture_only)
+ tuner=4; // No tuner present
- printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
- btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio);
+ printk(KERN_INFO "bttv%d: FlyVideo Radio=%s RemoteControl=%s Tuner=%d gpio=0x%06x\n",
+ btv->c.nr, has_radio? "yes":"no ", has_remote? "yes":"no ", tuner, gpio);
printk(KERN_INFO "bttv%d: FlyVideo LR90=%s tda9821/tda9820=%s capture_only=%s\n",
- btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ",
+ btv->c.nr, is_lr90?"yes":"no ", has_tda9820_tda9821?"yes":"no ",
is_capture_only?"yes":"no ");
if(tuner!= -1) // only set if known tuner autodetected, else let insmod option through
btv->tuner_type = tuner;
- btv->has_radio = has_radio;
+ btv->has_radio = has_radio;
// LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
// LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
@@ -2439,13 +2439,13 @@ static void init_ids_eagle(struct bttv *btv)
{
gpio_inout(0xffffff,0xFFFF37);
gpio_write(0x200020);
-
+
/* flash strobe inverter ?! */
gpio_write(0x200024);
-
+
/* switch sync drive off */
gpio_bits(LM1882_SYNC_DRIVE,LM1882_SYNC_DRIVE);
-
+
/* set BT848 muxel to 2 */
btaor((2)<<5, ~(2<<5), BT848_IFORM);
}
@@ -2534,7 +2534,7 @@ void bttv_reset_audio(struct bttv *btv)
*/
if (btv->id != 878)
return;
-
+
if (bttv_debug)
printk("bttv%d: BT878A ARESET\n",btv->c.nr);
btwrite((1<<7), 0x058);
@@ -2581,7 +2581,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
case BTTV_MIRO:
case BTTV_MIROPRO:
case BTTV_PINNACLE:
- case BTTV_PINNACLEPRO:
+ case BTTV_PINNACLEPRO:
/* miro/pinnacle */
miro_pinnacle_gpio(btv);
break;
@@ -2705,7 +2705,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
/* tuner configuration (from card list / autodetect / insmod option) */
if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
- if(UNSET == btv->tuner_type)
+ if(UNSET == btv->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];
@@ -2753,7 +2753,7 @@ void __devinit bttv_init_card2(struct bttv *btv)
bttv_I2CRead(btv, I2C_TDA9875, "TDA9875") >=0)
request_module("tda9875");
- if (!bttv_tvcards[btv->c.type].no_tda7432 &&
+ if (!bttv_tvcards[btv->c.type].no_tda7432 &&
bttv_I2CRead(btv, I2C_TDA7432, "TDA7432") >=0)
request_module("tda7432");
@@ -2777,12 +2777,12 @@ void __devinit bttv_init_card2(struct bttv *btv)
/* ----------------------------------------------------------------------- */
/* some hauppauge specific stuff */
-static struct HAUPPAUGE_TUNER
+static struct HAUPPAUGE_TUNER
{
int id;
char *name;
-}
-hauppauge_tuner[] __devinitdata =
+}
+hauppauge_tuner[] __devinitdata =
{
{ TUNER_ABSENT, "" },
{ TUNER_ABSENT, "External" },
@@ -2832,7 +2832,7 @@ hauppauge_tuner[] __devinitdata =
{ TUNER_ABSENT, "Philips TD1536D_FH_44"},
{ TUNER_LG_NTSC_FM, "LG TPI8NSR01F"},
{ TUNER_LG_PAL_FM, "LG TPI8PSB01D"},
- { TUNER_LG_PAL, "LG TPI8PSB11D"},
+ { TUNER_LG_PAL, "LG TPI8PSB11D"},
{ TUNER_LG_PAL_I_FM, "LG TAPC-I001D"},
{ TUNER_LG_PAL_I, "LG TAPC-I701D"}
};
@@ -2872,12 +2872,12 @@ static void __devinit hauppauge_eeprom(struct bttv *btv)
model = eeprom_data[12] << 8 | eeprom_data[11];
tuner = eeprom_data[9];
radio = eeprom_data[blk2-1] & 0x01;
-
+
if (tuner < ARRAY_SIZE(hauppauge_tuner))
btv->tuner_type = hauppauge_tuner[tuner].id;
if (radio)
btv->has_radio = 1;
-
+
if (bttv_verbose)
printk(KERN_INFO "bttv%d: Hauppauge eeprom: model=%d, "
"tuner=%s (%d), radio=%s\n",
@@ -2914,7 +2914,7 @@ static int terratec_active_radio_upgrade(struct bttv *btv)
btv->has_matchbox = 0;
}
return 0;
-}
+}
/* ----------------------------------------------------------------------- */
@@ -2941,7 +2941,7 @@ static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
gpio_inout(0xffffff,BTTV_ALT_DATA|BTTV_ALT_DCLK|BTTV_ALT_NCONFIG);
gpio_write(0);
udelay(PVR_GPIO_DELAY);
-
+
gpio_write(BTTV_ALT_NCONFIG);
udelay(PVR_GPIO_DELAY);
@@ -2951,7 +2951,7 @@ static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
gpio_bits(BTTV_ALT_DCLK,0);
if (bits & 0x01)
gpio_bits(BTTV_ALT_DATA,BTTV_ALT_DATA);
- else
+ else
gpio_bits(BTTV_ALT_DATA,0);
gpio_bits(BTTV_ALT_DCLK,BTTV_ALT_DCLK);
bits >>= 1;
@@ -2959,7 +2959,7 @@ static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
}
gpio_bits(BTTV_ALT_DCLK,0);
udelay(PVR_GPIO_DELAY);
-
+
/* begin Altera init loop (Not necessary,but doesn't hurt) */
for (i = 0 ; i < 30 ; i++) {
gpio_bits(BTTV_ALT_DCLK,0);
@@ -2971,7 +2971,7 @@ static int __devinit pvr_altera_load(struct bttv *btv, u8 *micro, u32 microlen)
#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE)
/* old 2.4.x way -- via soundcore's mod_firmware_load */
-
+
static char *firm_altera = "/usr/lib/video4linux/hcwamc.rbf";
MODULE_PARM(firm_altera,"s");
MODULE_PARM_DESC(firm_altera,"WinTV/PVR firmware "
@@ -2991,7 +2991,7 @@ int __devinit pvr_boot(struct bttv *btv)
btv->c.nr, firm_altera);
return -1;
}
-
+
printk(KERN_INFO "bttv%d: uploading altera firmware [%s] ...\n",
btv->c.nr, firm_altera);
result = pvr_altera_load(btv, micro, microlen);
@@ -3023,7 +3023,7 @@ int __devinit pvr_boot(struct bttv *btv)
btv->c.nr, (rc < 0) ? "failed" : "ok");
release_firmware(fw_entry);
return rc;
-}
+}
#endif
/* ----------------------------------------------------------------------- */
@@ -3034,7 +3034,7 @@ static void __devinit osprey_eeprom(struct bttv *btv)
int i = 0;
unsigned char *ee = eeprom_data;
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')) {
@@ -3050,7 +3050,7 @@ static void __devinit osprey_eeprom(struct bttv *btv)
} else {
unsigned short type;
int offset = 4*16;
-
+
for(; offset < 8*16; offset += 16) {
unsigned short checksum = 0;
/* verify the checksum */
@@ -3061,13 +3061,13 @@ static void __devinit osprey_eeprom(struct bttv *btv)
break;
}
}
-
+
if (offset >= 8*16)
return;
/* found a valid descriptor */
type = (ee[offset+4]<<8) | (ee[offset+5]);
-
+
switch(type) {
/* 848 based */
@@ -3077,7 +3077,7 @@ static void __devinit osprey_eeprom(struct bttv *btv)
case 0x0005:
btv->c.type = BTTV_OSPREY101_848;
break;
-
+
/* 878 based */
case 0x0012:
case 0x0013:
@@ -3125,10 +3125,10 @@ static void __devinit osprey_eeprom(struct bttv *btv)
| (ee[offset+8] << 8)
| (ee[offset+9]);
}
-
+
printk(KERN_INFO "bttv%d: osprey eeprom: card=%d name=%s serial=%ld\n",
btv->c.nr, btv->c.type, bttv_tvcards[btv->c.type].name,serial);
-}
+}
/* ----------------------------------------------------------------------- */
/* AVermedia specific stuff, from bktr_card.c */
@@ -3170,7 +3170,7 @@ static void __devinit avermedia_eeprom(struct bttv *btv)
if (tuner_make == 1)
if(tuner_format <=9)
tuner = tuner_1_table[tuner_format];
-
+
printk(KERN_INFO "bttv%d: Avermedia eeprom[0x%02x%02x]: tuner=",
btv->c.nr,eeprom_data[0x41],eeprom_data[0x42]);
if(tuner) {
@@ -3260,8 +3260,8 @@ static void __devinit boot_bt832(struct bttv *btv)
/* ----------------------------------------------------------------------- */
/* Imagenation L-Model PXC200 Framegrabber */
-/* This is basically the same procedure as
- * used by Alessandro Rubini in his pxc200
+/* This is basically the same procedure as
+ * used by Alessandro Rubini in his pxc200
* driver, but using BTTV functions */
static void __devinit init_PXC200(struct bttv *btv)
@@ -3272,13 +3272,13 @@ static void __devinit init_PXC200(struct bttv *btv)
unsigned int i;
int tmp;
u32 val;
-
+
/* Initialise GPIO-connevted stuff */
gpio_inout(0xffffff, (1<<13));
gpio_write(0);
udelay(3);
gpio_write(1<<13);
- /* GPIO inputs are pulled up, so no need to drive
+ /* GPIO inputs are pulled up, so no need to drive
* reset pin any longer */
gpio_bits(0xffffff, 0);
if (bttv_gpio)
@@ -3293,16 +3293,16 @@ static void __devinit init_PXC200(struct bttv *btv)
*/
btwrite(BT848_ADC_RESERVED|BT848_ADC_AGC_EN, BT848_ADC);
-
+
/* Initialise MAX517 DAC */
printk(KERN_INFO "Setting DAC reference voltage level ...\n");
bttv_I2CWrite(btv,0x5E,0,0x80,1);
-
+
/* Initialise 12C508 PIC */
- /* The I2CWrite and I2CRead commmands are actually to the
+ /* The I2CWrite and I2CRead commmands are actually to the
* same chips - but the R/W bit is included in the address
* argument so the numbers are different */
-
+
printk(KERN_INFO "Initialising 12C508 PIC chip ...\n");
@@ -3310,7 +3310,7 @@ static void __devinit init_PXC200(struct bttv *btv)
val = btread(BT848_GPIO_DMA_CTL);
val |= BT848_GPIO_DMA_CTL_GPCLKMODE;
btwrite(val, BT848_GPIO_DMA_CTL);
-
+
/* Then, push to 0 the reset pin long enough to reset the *
* device same as above for the reset line, but not the same
* value sent to the GPIO-connected stuff
@@ -3422,7 +3422,7 @@ static int tea5757_read(struct bttv *btv)
unsigned long timeout;
int value = 0;
int i;
-
+
/* better safe than sorry */
gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
@@ -3434,10 +3434,10 @@ static int tea5757_read(struct bttv *btv)
if (bttv_gpio)
bttv_gpio_tracking(btv,"tea5757 read");
-
+
bus_low(btv,btv->mbox_we);
bus_low(btv,btv->mbox_clk);
-
+
udelay(10);
timeout= jiffies + HZ;
@@ -3469,7 +3469,7 @@ static int tea5757_write(struct bttv *btv, int value)
{
int i;
int reg = value;
-
+
gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
if (btv->mbox_ior) {
@@ -3524,7 +3524,7 @@ void winview_audio(struct bttv *btv, struct video_audio *v, int set)
v->flags |= VIDEO_AUDIO_VOLUME;
return;
}
-
+
/* 32 levels logarithmic */
vol = 32 - ((v->volume>>11));
/* units */
@@ -3551,7 +3551,7 @@ void winview_audio(struct bttv *btv, struct video_audio *v, int set)
data |= WINVIEW_PT2254_STROBE;
data &= ~WINVIEW_PT2254_DATA;
gpio_write(data);
- udelay(10);
+ udelay(10);
data &= ~WINVIEW_PT2254_STROBE;
gpio_write(data);
}
@@ -3676,7 +3676,7 @@ static void
avermedia_tv_stereo_audio(struct bttv *btv, struct video_audio *v, int set)
{
int val = 0;
-
+
if (set) {
if (v->mode & VIDEO_SOUND_LANG2) /* SAP */
val = 0x01;
@@ -3811,7 +3811,7 @@ pvbt878p9b_audio(struct bttv *btv, struct video_audio *v, int set)
/*
* Dariusz Kowalewski <darekk@automex.pl>
- * sound control for FlyVideo 2000S (with tda9874 decoder)
+ * sound control for FlyVideo 2000S (with tda9874 decoder)
* based on pvbt878p9b_audio() - this is not tested, please fix!!!
*/
static void
@@ -3994,13 +3994,13 @@ static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
* ivc120_muxsel [Added by Alan Garfield <alan@fromorbit.com>]
*
* The IVC120G security card has 4 i2c controlled TDA8540 matrix
- * swichers to provide 16 channels to MUX0. The TDA8540's have
- * 4 indepedant outputs and as such the IVC120G also has the
- * optional "Monitor Out" bus. This allows the card to be looking
+ * swichers to provide 16 channels to MUX0. The TDA8540's have
+ * 4 indepedant outputs and as such the IVC120G also has the
+ * optional "Monitor Out" bus. This allows the card to be looking
* at one input while the monitor is looking at another.
*
* Since I've couldn't be bothered figuring out how to add an
- * independant muxsel for the monitor bus, I've just set it to
+ * independant muxsel for the monitor bus, I've just set it to
* whatever the card is looking at.
*
* OUT0 of the TDA8540's is connected to MUX0 (0x03)
@@ -4025,12 +4025,12 @@ static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
static void ivc120_muxsel(struct bttv *btv, unsigned int input)
{
// Simple maths
- int key = input % 4;
+ int key = input % 4;
int matrix = input / 4;
-
+
dprintk("bttv%d: ivc120_muxsel: Input - %02d | TDA - %02d | In - %02d\n",
btv->c.nr, input, matrix, key);
-
+
// Handles the input selection on the TDA8540's
bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
((matrix == 3) ? (key | key << 2) : 0x00), 1);
@@ -4040,17 +4040,17 @@ static void ivc120_muxsel(struct bttv *btv, unsigned int input)
((matrix == 1) ? (key | key << 2) : 0x00), 1);
bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
((matrix == 2) ? (key | key << 2) : 0x00), 1);
-
+
// Handles the output enables on the TDA8540's
bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
((matrix == 3) ? 0x03 : 0x00), 1); // 13 - 16
bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
((matrix == 0) ? 0x03 : 0x00), 1); // 1-4
bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
- ((matrix == 1) ? 0x03 : 0x00), 1); // 5-8
+ ((matrix == 1) ? 0x03 : 0x00), 1); // 5-8
bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
((matrix == 2) ? 0x03 : 0x00), 1); // 9-12
-
+
// Selects MUX0 for input on the 878
btaor((0)<<5, ~(3<<5), BT848_IFORM);
}
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index 7a030e60d..468d77813 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,26 +1,26 @@
/*
- $Id: bttv-driver.c,v 1.22 2004/10/12 07:33:22 kraxel Exp $
+ $Id: bttv-driver.c,v 1.23 2004/10/13 10:39:00 kraxel 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>
(c) 1999-2002 Gerd Knorr <kraxel@bytesex.org>
-
+
some v4l2 code lines are taken from Justin's bttv2 driver which is
(c) 2000 Justin Schoeman <justin@suntiger.ee.up.ac.za>
-
+
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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -197,7 +197,7 @@ const struct bttv_tvnorm bttv_tvnorms[] = {
.sheight = 576,
.totalwidth = 1135,
.adelay = 0x7f,
- .bdelay = 0x72,
+ .bdelay = 0x72,
.iform = (BT848_IFORM_PAL_BDGHI|BT848_IFORM_XT1),
.scaledtwidth = 1135,
.hdelayx1 = 186,
@@ -685,20 +685,20 @@ void free_btres(struct bttv *btv, struct bttv_fh *fh, int bits)
/* ----------------------------------------------------------------------- */
/* If Bt848a or Bt849, use PLL for PAL/SECAM and crystal for NTSC */
-/* Frequency = (F_input / PLL_X) * PLL_I.PLL_F/PLL_C
- PLL_X = Reference pre-divider (0=1, 1=2)
+/* Frequency = (F_input / PLL_X) * PLL_I.PLL_F/PLL_C
+ PLL_X = Reference pre-divider (0=1, 1=2)
PLL_C = Post divider (0=6, 1=4)
- PLL_I = Integer input
- PLL_F = Fractional input
-
- F_input = 28.636363 MHz:
+ PLL_I = Integer input
+ PLL_F = Fractional input
+
+ F_input = 28.636363 MHz:
PAL (CLKx2 = 35.46895 MHz): PLL_X = 1, PLL_I = 0x0E, PLL_F = 0xDCF9, PLL_C = 0
*/
static void set_pll_freq(struct bttv *btv, unsigned int fin, unsigned int fout)
{
unsigned char fl, fh, fi;
-
+
/* prevent overflows */
fin/=4;
fout/=4;
@@ -749,7 +749,7 @@ static void set_pll(struct bttv *btv)
/* Let other people run while the PLL stabilizes */
vprintk(".");
msleep(10);
-
+
if (btread(BT848_DSTATUS) & BT848_DSTATUS_PLOCK) {
btwrite(0,BT848_DSTATUS);
} else {
@@ -812,7 +812,7 @@ static void bt848_bright(struct bttv *btv, int bright)
static void bt848_hue(struct bttv *btv, int hue)
{
int value;
-
+
btv->hue = hue;
/* -128 to 127 */
@@ -823,9 +823,9 @@ static void bt848_hue(struct bttv *btv, int hue)
static void bt848_contrast(struct bttv *btv, int cont)
{
int value,hibit;
-
+
btv->contrast = cont;
-
+
/* 0-511 */
value = (cont >> 7);
hibit = (value >> 6) & 4;
@@ -837,7 +837,7 @@ static void bt848_contrast(struct bttv *btv, int cont)
static void bt848_sat(struct bttv *btv, int color)
{
int val_u,val_v,hibits;
-
+
btv->saturation = color;
/* 0-511 for the color */
@@ -979,7 +979,7 @@ static void
set_input(struct bttv *btv, unsigned int input)
{
unsigned long flags;
-
+
btv->input = input;
if (irq_iswitch) {
spin_lock_irqsave(&btv->s_lock,flags);
@@ -1024,7 +1024,7 @@ static void init_irqreg(struct bttv *btv)
static void init_bt848(struct bttv *btv)
{
int val;
-
+
if (bttv_tvcards[btv->c.type].no_video) {
/* very basic init only */
init_irqreg(btv);
@@ -1041,7 +1041,7 @@ static void init_bt848(struct bttv *btv)
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_GPINTI,
BT848_GPIO_DMA_CTL);
val = btv->opt_chroma_agc ? BT848_SCLOOP_CAGC : 0;
@@ -1068,7 +1068,7 @@ static void init_bt848(struct bttv *btv)
bt848_hue(btv, btv->hue);
bt848_contrast(btv, btv->contrast);
bt848_sat(btv, btv->saturation);
-
+
/* interrupt */
init_irqreg(btv);
}
@@ -1093,7 +1093,7 @@ static int get_control(struct bttv *btv, struct v4l2_control *c)
{
struct video_audio va;
int i;
-
+
for (i = 0; i < BTTV_CTLS; i++)
if (bttv_ctls[i].id == c->id)
break;
@@ -1363,7 +1363,7 @@ static int bttv_prepare_buffer(struct bttv *btv, struct bttv_buffer *buf,
{
int redo_dma_risc = 0;
int rc;
-
+
/* check settings */
if (NULL == fmt)
return -EINVAL;
@@ -1383,7 +1383,7 @@ static int bttv_prepare_buffer(struct bttv *btv, struct bttv_buffer *buf,
if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size)
return -EINVAL;
}
-
+
/* alloc + fill struct bttv_buffer (if changed) */
if (buf->vb.width != width || buf->vb.height != height ||
buf->vb.field != field ||
@@ -1419,7 +1419,7 @@ static int
buffer_setup(void *priv, unsigned int *count, unsigned int *size)
{
struct bttv_fh *fh = priv;
-
+
*size = fh->fmt->depth*fh->width*fh->height >> 3;
if (0 == *count)
*count = gbuffers;
@@ -1505,7 +1505,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
case VIDIOCGTUNER:
{
struct video_tuner *v = arg;
-
+
if (UNSET == bttv_tvcards[btv->c.type].tuner)
return -EINVAL;
if (v->tuner) /* Only tuner 0 */
@@ -1534,7 +1534,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
up(&btv->lock);
return 0;
}
-
+
case VIDIOCGCHAN:
{
struct video_channel *v = arg;
@@ -1616,7 +1616,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
/* card specific hooks */
if (btv->audio_hook)
btv->audio_hook(btv,v,1);
-
+
up(&btv->lock);
return 0;
}
@@ -1626,7 +1626,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
{
struct v4l2_standard *e = arg;
unsigned int index = e->index;
-
+
if (index >= BTTV_TVNORMS)
return -EINVAL;
v4l2_video_std_construct(e, bttv_tvnorms[e->index].v4l2_id,
@@ -1660,7 +1660,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
case VIDIOC_QUERYSTD:
{
v4l2_std_id *id = arg;
-
+
if (btread(BT848_DSTATUS) & BT848_DSTATUS_NUML)
*id = V4L2_STD_625_50;
else
@@ -1672,7 +1672,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
{
struct v4l2_input *i = arg;
unsigned int n;
-
+
n = i->index;
if (n >= bttv_tvcards[btv->c.type].video_inputs)
return -EINVAL;
@@ -1709,7 +1709,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
case VIDIOC_S_INPUT:
{
unsigned int *i = arg;
-
+
if (*i > bttv_tvcards[btv->c.type].video_inputs)
return -EINVAL;
down(&btv->lock);
@@ -1717,7 +1717,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
up(&btv->lock);
return 0;
}
-
+
case VIDIOC_G_TUNER:
{
struct v4l2_tuner *t = arg;
@@ -1813,7 +1813,7 @@ int bttv_common_ioctls(struct bttv *btv, unsigned int cmd, void *arg)
default:
return -ENOIOCTLCMD;
-
+
}
return 0;
}
@@ -1908,25 +1908,25 @@ static int setup_window(struct bttv_fh *fh, struct bttv *btv,
default:
BUG();
}
-
+
down(&fh->cap.lock);
if (fh->ov.clips)
kfree(fh->ov.clips);
fh->ov.clips = clips;
fh->ov.nclips = n;
-
+
fh->ov.w = win->w;
fh->ov.field = win->field;
fh->ov.setup_ok = 1;
btv->init.ov.w.width = win->w.width;
btv->init.ov.w.height = win->w.height;
btv->init.ov.field = win->field;
-
+
/* update overlay if needed */
retval = 0;
if (check_btres(fh, RESOURCE_OVERLAY)) {
struct bttv_buffer *new;
-
+
new = videobuf_alloc(sizeof(*new));
bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
retval = bttv_switch_overlay(btv,fh,new);
@@ -1940,7 +1940,7 @@ static int setup_window(struct bttv_fh *fh, struct bttv *btv,
static struct videobuf_queue* bttv_queue(struct bttv_fh *fh)
{
struct videobuf_queue* q = NULL;
-
+
switch (fh->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
q = &fh->cap;
@@ -1957,7 +1957,7 @@ static struct videobuf_queue* bttv_queue(struct bttv_fh *fh)
static int bttv_resource(struct bttv_fh *fh)
{
int res = 0;
-
+
switch (fh->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
res = RESOURCE_VIDEO;
@@ -2066,7 +2066,7 @@ static int bttv_try_fmt(struct bttv_fh *fh, struct bttv *btv,
(f->fmt.pix.width * fmt->depth) >> 3;
f->fmt.pix.sizeimage =
f->fmt.pix.height * f->fmt.pix.bytesperline;
-
+
return 0;
}
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
@@ -2084,7 +2084,7 @@ static int bttv_s_fmt(struct bttv_fh *fh, struct bttv *btv,
struct v4l2_format *f)
{
int retval;
-
+
switch (f->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
{
@@ -2097,7 +2097,7 @@ static int bttv_s_fmt(struct bttv_fh *fh, struct bttv *btv,
if (0 != retval)
return retval;
fmt = format_by_fourcc(f->fmt.pix.pixelformat);
-
+
/* update our state informations */
down(&fh->cap.lock);
fh->fmt = fmt;
@@ -2109,7 +2109,7 @@ static int bttv_s_fmt(struct bttv_fh *fh, struct bttv *btv,
btv->init.width = f->fmt.pix.width;
btv->init.height = f->fmt.pix.height;
up(&fh->cap.lock);
-
+
return 0;
}
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
@@ -2219,7 +2219,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
{
struct video_picture *pic = arg;
const struct bttv_format *fmt;
-
+
fmt = format_by_palette(pic->palette);
if (NULL == fmt)
return -EINVAL;
@@ -2366,7 +2366,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
if (!check_alloc_btres(btv,fh,RESOURCE_OVERLAY))
return -EBUSY;
-
+
down(&fh->cap.lock);
if (*on) {
fh->ov.tvnorm = btv->tvnorm;
@@ -2420,7 +2420,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
if (buf->vb.state == STATE_QUEUED ||
buf->vb.state == STATE_ACTIVE)
goto fh_unlock_and_return;
-
+
field = (vm->height > bttv_tvnorms[btv->tvnorm].sheight/2)
? V4L2_FIELD_INTERLACED
: V4L2_FIELD_BOTTOM;
@@ -2544,7 +2544,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
V4L2_CAP_VIDEO_OVERLAY |
V4L2_CAP_VBI_CAPTURE |
V4L2_CAP_TUNER |
- V4L2_CAP_READWRITE |
+ V4L2_CAP_READWRITE |
V4L2_CAP_STREAMING;
return 0;
}
@@ -2629,7 +2629,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
{
struct v4l2_framebuffer *fb = arg;
const struct bttv_format *fmt;
-
+
if(!capable(CAP_SYS_ADMIN) &&
!capable(CAP_SYS_RAWIO))
return -EPERM;
@@ -2658,7 +2658,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
btv->fbuf.fmt.bytesperline = fb->fmt.bytesperline;
else
btv->fbuf.fmt.bytesperline = btv->fbuf.fmt.width*fmt->depth/8;
-
+
retval = 0;
fh->ovfmt = fmt;
btv->init.ovfmt = fmt;
@@ -2676,7 +2676,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
if (check_btres(fh, RESOURCE_OVERLAY)) {
struct bttv_buffer *new;
-
+
new = videobuf_alloc(sizeof(*new));
bttv_overlay_risc(btv,&fh->ov,fh->ovfmt,new);
retval = bttv_switch_overlay(btv,fh,new);
@@ -2796,7 +2796,7 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
}
#endif
-
+
case VIDIOC_ENUMSTD:
case VIDIOC_G_STD:
case VIDIOC_S_STD:
@@ -2909,7 +2909,7 @@ static unsigned int bttv_poll(struct file *file, poll_table *wait)
up(&fh->cap.lock);
buf = (struct bttv_buffer*)fh->cap.read_buf;
}
-
+
poll_wait(file, &buf->vb.done, wait);
if (buf->vb.state == STATE_DONE ||
buf->vb.state == STATE_ERROR)
@@ -2986,7 +2986,7 @@ static int bttv_release(struct inode *inode, struct file *file)
/* turn off overlay */
if (check_btres(fh, RESOURCE_OVERLAY))
bttv_switch_overlay(btv,fh,NULL);
-
+
/* stop video capture */
if (check_btres(fh, RESOURCE_VIDEO)) {
videobuf_streamoff(file->private_data,&fh->cap);
@@ -3141,7 +3141,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
case VIDIOCSTUNER:
/* nothing to do */
return 0;
-
+
case BTTV_VERSION:
case VIDIOCGFREQ:
case VIDIOCSFREQ:
@@ -3207,7 +3207,7 @@ static char *irq_name[] = {
static void bttv_print_irqbits(u32 print, u32 mark)
{
unsigned int i;
-
+
printk("bits:");
for (i = 0; i < ARRAY_SIZE(irq_name); i++) {
if (print & (1 << i))
@@ -3374,7 +3374,7 @@ static void bttv_irq_timeout(unsigned long data)
struct bttv_buffer *ovbi;
struct bttv_buffer *item;
unsigned long flags;
-
+
if (bttv_verbose) {
printk(KERN_INFO "bttv%d: timeout: drop=%d irq=%d/%d, risc=%08x, ",
btv->c.nr, btv->framedrop, btv->irq_me, btv->irq_total,
@@ -3384,7 +3384,7 @@ static void bttv_irq_timeout(unsigned long data)
}
spin_lock_irqsave(&btv->s_lock,flags);
-
+
/* deactivate stuff */
memset(&new,0,sizeof(new));
old = btv->curr;
@@ -3413,7 +3413,7 @@ static void bttv_irq_timeout(unsigned long data)
item->vb.state = STATE_ERROR;
wake_up(&item->vb.done);
}
-
+
btv->errors++;
spin_unlock_irqrestore(&btv->s_lock,flags);
}
@@ -3467,7 +3467,7 @@ bttv_irq_switch_video(struct bttv *btv)
spin_unlock(&btv->s_lock);
return;
}
-
+
/* switch over */
old = btv->curr;
btv->curr = new;
@@ -3559,7 +3559,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
printk("\n");
}
- if (astat&BT848_INT_VSYNC)
+ if (astat&BT848_INT_VSYNC)
btv->field_count++;
if (astat & BT848_INT_GPINT) {
@@ -3606,7 +3606,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
count++;
if (count > 4) {
btwrite(0, BT848_INT_MASK);
- printk(KERN_ERR
+ printk(KERN_ERR
"bttv%d: IRQ lockup, cleared int mask [", btv->c.nr);
bttv_print_irqbits(stat,astat);
printk("]\n");
@@ -3718,9 +3718,9 @@ static void pci_set_command(struct pci_dev *dev)
{
#if defined(__powerpc__)
unsigned int cmd;
-
+
pci_read_config_dword(dev, PCI_COMMAND, &cmd);
- cmd = (cmd | PCI_COMMAND_MEMORY );
+ cmd = (cmd | PCI_COMMAND_MEMORY );
pci_write_config_dword(dev, PCI_COMMAND, cmd);
#endif
}
@@ -3757,14 +3757,14 @@ static int __devinit bttv_probe(struct pci_dev *dev,
init_timer(&btv->timeout);
btv->timeout.function = bttv_irq_timeout;
btv->timeout.data = (unsigned long)btv;
-
+
btv->i2c_rc = -1;
btv->tuner_type = UNSET;
btv->pinnacle_id = UNSET;
btv->new_input = UNSET;
btv->gpioirq = 1;
btv->has_radio=radio[btv->c.nr];
-
+
/* pci stuff (init, get irq/mmio, ... */
btv->c.pci = dev;
btv->id = dev->device;
@@ -3801,7 +3801,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
printk("irq: %d, latency: %d, mmio: 0x%lx\n",
btv->c.pci->irq, lat, pci_resource_start(dev,0));
schedule();
-
+
btv->bt848_mmio=ioremap(pci_resource_start(dev,0), 0x1000);
if (NULL == ioremap(pci_resource_start(dev,0), 0x1000)) {
printk("bttv%d: ioremap() failed\n", btv->c.nr);
@@ -3836,7 +3836,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
btv->opt_vcr_hack = vcr_hack;
btv->opt_whitecrush_upper = whitecrush_upper;
btv->opt_whitecrush_lower = whitecrush_lower;
-
+
/* fill struct bttv with some useful defaults */
btv->init.btv = btv;
btv->init.ov.w.width = 320;
@@ -3895,7 +3895,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
fail2:
free_irq(btv->c.pci->irq,btv);
-
+
fail1:
if (btv->bt848_mmio)
iounmap(btv->bt848_mmio);
@@ -3926,7 +3926,7 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
bttv_sub_del_devices(&btv->c);
#endif
-
+
/* unregister i2c_bus + input */
fini_bttv_i2c(btv);
diff --git a/linux/drivers/media/video/bttv-gpio.c b/linux/drivers/media/video/bttv-gpio.c
index fbcaa08d1..3f2566675 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.3 2004/09/15 16:15:24 kraxel Exp $
+ $Id: bttv-gpio.c,v 1.4 2004/10/13 10:39:00 kraxel Exp $
bttv-gpio.c -- gpio sub drivers
@@ -24,7 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
+
*/
#include <linux/module.h>
diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c
index 7b1d07ef3..7ef5f2539 100644
--- a/linux/drivers/media/video/bttv-i2c.c
+++ b/linux/drivers/media/video/bttv-i2c.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-i2c.c,v 1.10 2004/10/06 17:30:51 kraxel Exp $
+ $Id: bttv-i2c.c,v 1.11 2004/10/13 10:39:00 kraxel Exp $
bttv-i2c.c -- all the i2c code is here
@@ -22,7 +22,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
+
*/
#include <linux/module.h>
@@ -83,7 +83,7 @@ static int bttv_bit_getscl(void *data)
{
struct bttv *btv = (struct bttv*)data;
int state;
-
+
state = btread(BT848_I2C) & 0x02 ? 1 : 0;
return state;
}
@@ -126,7 +126,7 @@ static struct i2c_adapter bttv_i2c_adap_sw_template = {
/* ----------------------------------------------------------------------- */
/* I2C functions - hardware i2c */
-static int algo_control(struct i2c_adapter *adapter,
+static int algo_control(struct i2c_adapter *adapter,
unsigned int cmd, unsigned long arg)
{
return 0;
@@ -142,7 +142,7 @@ bttv_i2c_wait_done(struct bttv *btv)
{
DECLARE_WAITQUEUE(wait, current);
int rc = 0;
-
+
add_wait_queue(&btv->i2c_queue, &wait);
if (0 == btv->i2c_done)
msleep_interruptible(20);
@@ -371,7 +371,7 @@ static struct i2c_client bttv_i2c_client_template = {
/* read I2C */
-int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
+int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
{
unsigned char buffer = 0;
@@ -416,7 +416,7 @@ int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
{
int i;
-
+
if (bttv_I2CWrite(btv, addr, 0, -1, 0)<0) {
printk(KERN_WARNING "bttv: readee error\n");
return;
diff --git a/linux/drivers/media/video/bttv-if.c b/linux/drivers/media/video/bttv-if.c
index 1a716a483..f96c33ae0 100644
--- a/linux/drivers/media/video/bttv-if.c
+++ b/linux/drivers/media/video/bttv-if.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-if.c,v 1.2 2004/09/15 16:15:24 kraxel Exp $
+ $Id: bttv-if.c,v 1.3 2004/10/13 10:39:00 kraxel Exp $
bttv-if.c -- old gpio interface to other kernel modules
don't use in new code, will go away in 2.7
@@ -24,7 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
+
*/
#include <linux/module.h>
@@ -93,7 +93,7 @@ int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data)
if (card >= bttv_num) {
return -EINVAL;
}
-
+
btv = &bttvs[card];
gpio_inout(mask,data);
if (bttv_gpio)
@@ -104,7 +104,7 @@ int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data)
int bttv_read_gpio(unsigned int card, unsigned long *data)
{
struct bttv *btv;
-
+
if (card >= bttv_num) {
return -EINVAL;
}
@@ -115,7 +115,7 @@ int bttv_read_gpio(unsigned int card, unsigned long *data)
return -ENODEV;
}
-/* prior setting BT848_GPIO_REG_INP is (probably) not needed
+/* prior setting BT848_GPIO_REG_INP is (probably) not needed
because we set direct input on init */
*data = gpio_read();
return 0;
@@ -124,14 +124,14 @@ int bttv_read_gpio(unsigned int card, unsigned long *data)
int bttv_write_gpio(unsigned int card, unsigned long mask, unsigned long data)
{
struct bttv *btv;
-
+
if (card >= bttv_num) {
return -EINVAL;
}
btv = &bttvs[card];
-/* prior setting BT848_GPIO_REG_INP is (probably) not needed
+/* prior setting BT848_GPIO_REG_INP is (probably) not needed
because direct input is set on init */
gpio_bits(mask,data);
if (bttv_gpio)
diff --git a/linux/drivers/media/video/bttv-risc.c b/linux/drivers/media/video/bttv-risc.c
index a9206afcd..8ef610c34 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.8 2004/10/06 17:30:51 kraxel Exp $
+ $Id: bttv-risc.c,v 1.9 2004/10/13 10:39:00 kraxel Exp $
bttv-risc.c -- interfaces to other kernel modules
@@ -240,7 +240,7 @@ bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
/* skip list for window clipping */
if (NULL == (skips = kmalloc(sizeof(*skips) * ov->nclips,GFP_KERNEL)))
return -ENOMEM;
-
+
/* estimate risc mem: worst case is (clip+1) * lines instructions
+ sync + jump (all 2 dwords) */
instructions = (ov->nclips + 1) *
@@ -293,7 +293,7 @@ bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
ra = addr + (fmt->depth>>3)*start;
else
ra = 0;
-
+
if (0 == start)
ri |= BT848_RISC_SOL;
if (ov->w.width == end)
@@ -413,7 +413,7 @@ bttv_set_dma(struct bttv *btv, int override)
btv->curr.top ? (unsigned long long)btv->curr.top->top.dma : 0,
btv->cvbi ? (unsigned long long)btv->cvbi->bottom.dma : 0,
btv->curr.bottom ? (unsigned long long)btv->curr.bottom->bottom.dma : 0);
-
+
cmd = BT848_RISC_JUMP;
if (btv->loop_irq) {
cmd |= BT848_RISC_IRQ;
@@ -426,7 +426,7 @@ bttv_set_dma(struct bttv *btv, int override)
del_timer(&btv->timeout);
}
btv->main.cpu[RISC_SLOT_LOOP] = cpu_to_le32(cmd);
-
+
btaor(capctl, ~0x0f, BT848_CAP_CTL);
if (capctl) {
if (btv->dma_on)
@@ -447,7 +447,7 @@ int
bttv_risc_init_main(struct bttv *btv)
{
int rc;
-
+
if ((rc = btcx_riscmem_alloc(btv->c.pci,&btv->main,PAGE_SIZE)) < 0)
return rc;
dprintk(KERN_DEBUG "bttv%d: risc main @ %08Lx\n",
@@ -616,7 +616,7 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
bttv_calc_geo(btv,&buf->geo,buf->vb.width,buf->vb.height,
V4L2_FIELD_HAS_BOTH(buf->vb.field),buf->tvnorm);
-
+
switch (buf->vb.field) {
case V4L2_FIELD_TOP:
bttv_risc_packed(btv,&buf->top,buf->vb.dma.sglist,
diff --git a/linux/drivers/media/video/bttv-vbi.c b/linux/drivers/media/video/bttv-vbi.c
index 77365b45f..0e944f523 100644
--- a/linux/drivers/media/video/bttv-vbi.c
+++ b/linux/drivers/media/video/bttv-vbi.c
@@ -1,21 +1,21 @@
/*
- $Id: bttv-vbi.c,v 1.5 2004/10/06 17:30:51 kraxel Exp $
+ $Id: bttv-vbi.c,v 1.6 2004/10/13 10:39:00 kraxel Exp $
bttv - Bt848 frame grabber driver
vbi interface
-
+
(c) 2002 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
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -83,7 +83,7 @@ static int vbi_buffer_prepare(void *priv, struct videobuf_buffer *vb,
struct bttv *btv = fh->btv;
struct bttv_buffer *buf = (struct bttv_buffer*)vb;
int rc;
-
+
buf->vb.size = fh->lines * 2 * 2048;
if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size)
return -EINVAL;
@@ -112,7 +112,7 @@ vbi_buffer_queue(void *priv, struct videobuf_buffer *vb)
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
struct bttv_buffer *buf = (struct bttv_buffer*)vb;
-
+
dprintk("queue %p\n",vb);
buf->vb.state = STATE_QUEUED;
list_add_tail(&buf->vb.queue,&btv->vcapture);
@@ -127,7 +127,7 @@ static void vbi_buffer_release(void *priv, struct videobuf_buffer *vb)
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
struct bttv_buffer *buf = (struct bttv_buffer*)vb;
-
+
dprintk("free %p\n",vb);
bttv_dma_free(fh->btv,buf);
}
diff --git a/linux/drivers/media/video/bttv.h b/linux/drivers/media/video/bttv.h
index 80ab54284..243e3ca02 100644
--- a/linux/drivers/media/video/bttv.h
+++ b/linux/drivers/media/video/bttv.h
@@ -1,5 +1,5 @@
/*
- * $Id: bttv.h,v 1.9 2004/09/15 16:15:24 kraxel Exp $
+ * $Id: bttv.h,v 1.10 2004/10/13 10:39:00 kraxel Exp $
*
* bttv - Bt848 frame grabber driver
*
@@ -26,9 +26,9 @@
#define BTTV_HAUPPAUGE 0x02
#define BTTV_STB 0x03
#define BTTV_INTEL 0x04
-#define BTTV_DIAMOND 0x05
-#define BTTV_AVERMEDIA 0x06
-#define BTTV_MATRIX_VISION 0x07
+#define BTTV_DIAMOND 0x05
+#define BTTV_AVERMEDIA 0x06
+#define BTTV_MATRIX_VISION 0x07
#define BTTV_FLYVIDEO 0x08
#define BTTV_TURBOTV 0x09
#define BTTV_HAUPPAUGE878 0x0a
@@ -246,7 +246,7 @@ extern int bttv_handle_chipset(struct bttv *btv);
/* returns card type + card ID (for bt878-based ones)
for possible values see lines below beginning with #define BTTV_UNKNOWN
- returns negative value if error occurred
+ returns negative value if error occurred
*/
extern int bttv_get_cardinfo(unsigned int card, int *type,
unsigned int *cardid);
@@ -269,18 +269,18 @@ extern int bttv_read_gpio(unsigned int card, unsigned long *data);
/* sets GPDATA register to new value:
(data & mask) | (current_GPDATA_value & ~mask)
- returns negative value if error occurred
+ returns negative value if error occurred
*/
extern int bttv_write_gpio(unsigned int card,
unsigned long mask, unsigned long data);
-/* returns pointer to task queue which can be used as parameter to
+/* returns pointer to task queue which can be used as parameter to
interruptible_sleep_on
in interrupt handler if BT848_INT_GPINT bit is set - this queue is activated
- (wake_up_interruptible) and following call to the function bttv_read_gpio
+ (wake_up_interruptible) and following call to the function bttv_read_gpio
should return new value of GPDATA,
returns NULL value if error occurred or queue is not available
- WARNING: because there is no buffer for GPIO data, one MUST
+ WARNING: because there is no buffer for GPIO data, one MUST
process data ASAP
*/
extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card);
diff --git a/linux/drivers/media/video/bttvp.h b/linux/drivers/media/video/bttvp.h
index d7f6a26b7..5297b6749 100644
--- a/linux/drivers/media/video/bttvp.h
+++ b/linux/drivers/media/video/bttvp.h
@@ -1,5 +1,5 @@
/*
- $Id: bttvp.h,v 1.10 2004/10/06 17:30:51 kraxel Exp $
+ $Id: bttvp.h,v 1.11 2004/10/13 10:39:00 kraxel Exp $
bttv - Bt848 frame grabber driver
@@ -155,7 +155,7 @@ struct bttv_overlay {
struct bttv_fh {
struct bttv *btv;
int resources;
-#ifdef VIDIOC_G_PRIORITY
+#ifdef VIDIOC_G_PRIORITY
enum v4l2_priority prio;
#endif
enum v4l2_buf_type type;
@@ -347,10 +347,10 @@ struct bttv {
struct semaphore lock;
int resources;
struct semaphore reslock;
-#ifdef VIDIOC_G_PRIORITY
+#ifdef VIDIOC_G_PRIORITY
struct v4l2_prio_state prio;
#endif
-
+
/* video state */
unsigned int input;
unsigned int audio;
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index b8e85aadd..c161a358a 100644
--- a/linux/drivers/media/video/cx88/cx88-alsa.c
+++ b/linux/drivers/media/video/cx88/cx88-alsa.c
@@ -1,9 +1,9 @@
/*
- * $Id: cx88-alsa.c,v 1.2 2004/07/30 11:14:05 kraxel Exp $
+ * $Id: cx88-alsa.c,v 1.3 2004/10/13 10:39:00 kraxel Exp $
*
* Support for audio capture
* PCI function #1 of the cx2388x.
- *
+ *
* (c) 2004 Gerd Knorr <kraxel@bytesex.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -95,7 +95,7 @@ static void __devexit cx8801_finidev(struct pci_dev *pci_dev)
pci_disable_device(pci_dev);
- /* unregister stuff */
+ /* unregister stuff */
pci_set_drvdata(pci_dev, NULL);
/* free memory */
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index 4e754eace..3434952cf 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.14 2004/10/12 07:33:22 kraxel Exp $
+ * $Id: cx88-blackbird.c,v 1.15 2004/10/13 10:39:00 kraxel Exp $
*
* Support for a cx23416 mpeg encoder via cx2388x host port.
* "blackbird" reference design.
@@ -7,7 +7,7 @@
* (c) 2004 Jelle Foks <jelle@foks.8m.com>
* (c) 2004 Gerd Knorr <kraxel@bytesex.org>
*
- * Includes parts from the ivtv driver( http://ivtv.sourceforge.net/),
+ * Includes parts from the ivtv driver( http://ivtv.sourceforge.net/),
*
* 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
@@ -53,7 +53,7 @@ static LIST_HEAD(cx8802_devlist);
/* ------------------------------------------------------------------ */
-#define BLACKBIRD_FIRM_ENC_FILENAME "blackbird-fw-enc.bin"
+#define BLACKBIRD_FIRM_ENC_FILENAME "blackbird-fw-enc.bin"
#define BLACKBIRD_FIRM_IMAGE_SIZE 256*1024
/* defines below are from ivtv-driver.h */
@@ -104,12 +104,12 @@ static LIST_HEAD(cx8802_devlist);
static void host_setup(struct cx88_core *core)
{
- /* toggle reset of the host */
+ /* toggle reset of the host */
cx_write(MO_GPHST_SOFT_RST, 1);
udelay(100);
cx_write(MO_GPHST_SOFT_RST, 0);
udelay(100);
-
+
/* host port setup */
cx_write(MO_GPHST_WSC, 0x44444444U);
cx_write(MO_GPHST_XFR, 0);
@@ -178,9 +178,9 @@ static int memory_read(struct cx88_core *core, u32 address, u32 *value)
cx_writeb(P1_MADDR1, (unsigned int)(address >> 8));
cx_writeb(P1_MADDR0, (unsigned int)address);
cx_read(P1_MADDR0);
-
+
retval = wait_ready_gpio0_bit1(core,1);
-
+
cx_writeb(P1_MDATA3, 0);
val = (unsigned char)cx_read(P1_MDATA3) << 24;
cx_writeb(P1_MDATA2, 0);
@@ -245,7 +245,7 @@ static int blackbird_api_cmd(struct cx8802_dev *dev, u32 command,
int i;
va_list args;
va_start(args, outputcnt);
-
+
dprintk(1,"%s: 0x%X\n", __FUNCTION__, command);
/* this may not be 100% safe if we can't read any memory location
@@ -255,7 +255,7 @@ static int blackbird_api_cmd(struct cx8802_dev *dev, u32 command,
dprintk(0, "Firmware and/or mailbox pointer not initialized or corrupted\n");
return -1;
}
-
+
memory_read(dev->core, dev->mailbox, &flag);
if (flag) {
dprintk(0, "ERROR: Mailbox appears to be in use (%x)\n", flag);
@@ -264,7 +264,7 @@ static int blackbird_api_cmd(struct cx8802_dev *dev, u32 command,
flag |= 1; /* tell 'em we're working on it */
memory_write(dev->core, dev->mailbox, flag);
-
+
/* write command + args + fill remaining with zeros */
memory_write(dev->core, dev->mailbox + 1, command); /* command code */
memory_write(dev->core, dev->mailbox + 3, IVTV_API_STD_TIMEOUT); /* timeout */
@@ -299,7 +299,7 @@ static int blackbird_api_cmd(struct cx8802_dev *dev, u32 command,
dprintk(1, "API Output %d = %d\n", i, *vptr);
}
va_end(args);
-
+
memory_read(dev->core, dev->mailbox + 2, &retval);
dprintk(1, "API result = %d\n",retval);
@@ -330,7 +330,7 @@ static int blackbird_find_mailbox(struct cx8802_dev *dev)
dprintk(0, "Mailbox signature values not found!\n");
return -1;
}
-
+
static int blackbird_load_firmware(struct cx8802_dev *dev)
{
static const unsigned char magic[8] = {
@@ -341,17 +341,17 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
u32 value = 0;
u32 checksum = 0;
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);
msleep(1);
retval |= register_write(dev->core, IVTV_REG_APU, 0);
-
+
if (retval < 0)
dprintk(0, "Error with register_write\n");
-
+
retval = request_firmware(&firmware, BLACKBIRD_FIRM_ENC_FILENAME,
&dev->pci->dev);
if (retval != 0) {
@@ -361,7 +361,7 @@ static int blackbird_load_firmware(struct cx8802_dev *dev)
"not work without firmware loaded!\n");
return -1;
}
-
+
if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) {
dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n",
firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE);
@@ -394,15 +394,15 @@ 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);
msleep(1);
-
+
retval |= register_read(dev->core, IVTV_REG_VPU, &value);
retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8);
-
+
if (retval < 0)
dprintk(0, "Error with register_write\n");
return 0;
@@ -447,8 +447,8 @@ static void blackbird_codec_settings(struct cx8802_dev *dev)
blackbird_api_cmd(dev, IVTV_API_ASSIGN_3_2_PULLDOWN, 1, 0, 0);
/* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */
- blackbird_api_cmd(dev, IVTV_API_ASSIGN_AUDIO_PROPERTIES, 1, 0, (2<<2) | (8<<4));
-
+ blackbird_api_cmd(dev, IVTV_API_ASSIGN_AUDIO_PROPERTIES, 1, 0, (2<<2) | (8<<4));
+
/* assign gop closure */
blackbird_api_cmd(dev, IVTV_API_ASSIGN_GOP_CLOSURE, 1, 0, 0);
@@ -492,13 +492,13 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev)
dev->mailbox = blackbird_find_mailbox(dev);
if (dev->mailbox < 0)
return -1;
-
+
retval = blackbird_api_cmd(dev, IVTV_API_ENC_PING_FW, 0, 0); /* ping */
if (retval < 0) {
dprintk(0, "ERROR: Firmware ping failed!\n");
return -1;
}
-
+
retval = blackbird_api_cmd(dev, IVTV_API_ENC_GETVER, 0, 1, &version);
if (retval < 0) {
dprintk(0, "ERROR: Firmware get encoder version failed!\n");
@@ -507,7 +507,7 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev)
dprintk(0, "Firmware version is 0x%08x\n", version);
}
msleep(1);
-
+
cx_write(MO_PINMUX_IO, 0x88); /* 656-8bit IO and enable MPEG parallel IO */
cx_clear(MO_INPUT_FORMAT, 0x100); /* chroma subcarrier lock to normal? */
cx_write(MO_VBOS_CONTROL, 0x84A00); /* no 656 mode, 8-bit pixels, disable VBI */
@@ -525,14 +525,14 @@ static int blackbird_initialize_codec(struct cx8802_dev *dev)
blackbird_api_cmd(dev, IVTV_API_ASSIGN_PLACEHOLDER, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
blackbird_api_cmd(dev, IVTV_API_INITIALIZE_INPUT, 0, 0); /* initialize the video input */
-
+
msleep(1);
blackbird_api_cmd(dev, IVTV_API_MUTE_VIDEO, 1, 0, 0);
msleep(1);
blackbird_api_cmd(dev, IVTV_API_MUTE_AUDIO, 1, 0, 0);
msleep(1);
-
+
blackbird_api_cmd(dev, IVTV_API_BEGIN_CAPTURE, 2, 0, 0, 0x13); /* start capturing to the host interface */
//blackbird_api_cmd(dev, IVTV_API_BEGIN_CAPTURE, 2, 0, 0, 0); /* start capturing to the host interface */
msleep(1);
@@ -610,7 +610,7 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
index = f->index;
if (index != 0)
return -EINVAL;
-
+
memset(f,0,sizeof(*f));
f->index = index;
strlcpy(f->description, "MPEG TS", sizeof(f->description));
@@ -624,7 +624,7 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
{
/* FIXME -- quick'n'dirty for exactly one size ... */
struct v4l2_format *f = arg;
-
+
memset(f,0,sizeof(*f));
f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
f->fmt.pix.width = 720;
@@ -783,7 +783,7 @@ static void blackbird_unregister_video(struct cx8802_dev *dev)
static int blackbird_register_video(struct cx8802_dev *dev)
{
int err;
-
+
dev->mpeg_dev = cx88_vdev_init(dev->core,dev->pci,
&cx8802_mpeg_template,"mpeg");
err = video_register_device(dev->mpeg_dev,VFL_TYPE_GRABBER, -1);
@@ -850,7 +850,7 @@ static void __devexit blackbird_remove(struct pci_dev *pci_dev)
/* blackbird */
blackbird_unregister_video(dev);
list_del(&dev->devlist);
-
+
/* common */
cx8802_fini_common(dev);
}
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index 5df094b78..26646fff1 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.44 2004/10/12 07:33:22 kraxel Exp $
+ * $Id: cx88-cards.c,v 1.45 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* card-specific stuff.
@@ -289,7 +289,7 @@ struct cx88_board cx88_boards[] = {
},
.blackbird = 1,
},
- [CX88_BOARD_MSI_TVANYWHERE] = {
+ [CX88_BOARD_MSI_TVANYWHERE] = {
.name = "MSI TV-@nywhere",
.tuner_type = 33,
.tda9887_conf = TDA9887_PRESENT,
@@ -325,7 +325,7 @@ struct cx88_board cx88_boards[] = {
}},
.dvb = 1,
},
- [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
+ [CX88_BOARD_DVICO_FUSIONHDTV_DVB_T1] = {
.name = "DVICO FusionHDTV DVB-T1",
.tuner_type = TUNER_ABSENT, /* No analog tuner */
.input = {{
@@ -367,7 +367,7 @@ struct cx88_board cx88_boards[] = {
[CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD] = {
.name = "DViCO - FusionHDTV 3 Gold",
.tuner_type = TUNER_MICROTUNE_4042FI5,
- /*
+ /*
GPIO[0] resets DT3302 DTV receiver
0 - reset asserted
1 - normal operation
@@ -535,7 +535,7 @@ static void __devinit leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
*/
if (eeprom_data[4] != 0x7d ||
- eeprom_data[5] != 0x10 ||
+ eeprom_data[5] != 0x10 ||
eeprom_data[7] != 0x66) {
printk(KERN_WARNING "%s: Leadtek eeprom invalid.\n",
core->name);
@@ -544,7 +544,7 @@ static void __devinit leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)
core->has_radio = 1;
core->tuner_type = (eeprom_data[6] == 0x13) ? 43 : 38;
-
+
printk(KERN_INFO "%s: Leadtek Winfast 2000 XP config: "
"tuner=%d, eeprom[0]=0x%02x\n",
core->name, core->tuner_type, eeprom_data[0]);
@@ -606,7 +606,7 @@ static struct {
{ TUNER_ABSENT, "Philips TD1536D_FH_44"},
{ TUNER_LG_NTSC_FM, "LG TPI8NSR01F"},
{ TUNER_LG_PAL_FM, "LG TPI8PSB01D"},
- { TUNER_LG_PAL, "LG TPI8PSB11D"},
+ { TUNER_LG_PAL, "LG TPI8PSB11D"},
{ TUNER_LG_PAL_I_FM, "LG TAPC-I001D"},
{ TUNER_LG_PAL_I, "LG TAPC-I701D"}
};
@@ -628,12 +628,12 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
model = eeprom_data[12] << 8 | eeprom_data[11];
tuner = eeprom_data[9];
radio = eeprom_data[blk2-1] & 0x01;
-
+
if (tuner < ARRAY_SIZE(hauppauge_tuner))
core->tuner_type = hauppauge_tuner[tuner].id;
if (radio)
core->has_radio = 1;
-
+
printk(KERN_INFO "%s: hauppauge eeprom: model=%d, "
"tuner=%s (%d), radio=%s\n",
core->name, model, (tuner < ARRAY_SIZE(hauppauge_tuner)
@@ -654,7 +654,7 @@ static int hauppauge_eeprom_dvb(struct cx88_core *core, u8 *ee)
case 90500:
case 90501:
/* known */
- break;
+ break;
default:
printk("%s: warning: unknown hauppauge model #%d\n",
core->name, model);
@@ -667,19 +667,19 @@ static int hauppauge_eeprom_dvb(struct cx88_core *core, u8 *ee)
case 0x4B:
tname = "Thomson DTT 7595";
core->pll_type = PLLTYPE_DTT7595;
- break;
+ break;
case 0x4C:
tname = "Thomson DTT 7592";
core->pll_type = PLLTYPE_DTT7592;
- break;
+ break;
default:
printk("%s: error: unknown hauppauge tuner 0x%02x\n",
core->name, tuner);
- return -ENODEV;
+ return -ENODEV;
}
printk(KERN_INFO "%s: hauppauge eeprom: model=%d, tuner=%s (%d)\n",
core->name, model, tname, tuner);
-
+
core->pll_addr = 0x61;
core->demod_addr = 0x43;
}
@@ -704,7 +704,7 @@ static struct {
.name = "SECAM" },
[ 0x10 ] = { .id = TUNER_ABSENT,
- .fm = 1,
+ .fm = 1,
.name = "TEMIC_4049" },
[ 0x11 ] = { .id = TUNER_TEMIC_4136FY5,
.name = "TEMIC_4136" },
@@ -796,7 +796,7 @@ void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
void cx88_card_setup(struct cx88_core *core)
{
static u8 eeprom[128];
-
+
switch (core->board) {
case CX88_BOARD_HAUPPAUGE:
if (0 == core->i2c_rc)
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c
index 6321887f5..5673286c2 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.13 2004/10/12 07:33:22 kraxel Exp $
+ * $Id: cx88-core.c,v 1.14 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* driver core
@@ -137,7 +137,7 @@ static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist,
/* sync instruction */
if (sync_line != NO_SYNC_LINE)
*(rp++) = cpu_to_le32(RISC_RESYNC | sync_line);
-
+
/* scan lines */
sg = sglist;
for (line = 0; line < lines; line++) {
@@ -214,7 +214,7 @@ int cx88_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc,
}
int cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc,
- struct scatterlist *sglist, unsigned int bpl,
+ struct scatterlist *sglist, unsigned int bpl,
unsigned int lines)
{
u32 instructions;
@@ -291,7 +291,7 @@ cx88_free_buffer(struct pci_dev *pci, struct cx88_buffer *buf)
*
* Every channel has 160 bytes control data (64 bytes instruction
* queue and 6 CDT entries), which is close to 2k total.
- *
+ *
* Address layout:
* 0x0000 - 0x03ff CMDs / reserved
* 0x0400 - 0x0bff instruction queues + CDs
@@ -467,7 +467,7 @@ void cx88_risc_disasm(struct cx88_core *core,
struct btcx_riscmem *risc)
{
unsigned int i,j,n;
-
+
printk("%s: risc disasm: %p [dma=0x%08lx]\n",
core->name, risc->cpu, (unsigned long)risc->dma);
for (i = 0; i < (risc->size >> 2); i += n) {
@@ -537,13 +537,13 @@ void cx88_sram_channel_dump(struct cx88_core *core,
}
char *cx88_pci_irqs[32] = {
- "vid", "aud", "ts", "vip", "hst", "5", "6", "tm1",
+ "vid", "aud", "ts", "vip", "hst", "5", "6", "tm1",
"src_dma", "dst_dma", "risc_rd_err", "risc_wr_err",
"brdg_err", "src_dma_err", "dst_dma_err", "ipb_dma_err",
"i2c", "i2c_rack", "ir_smp", "gpio0", "gpio1"
};
char *cx88_vid_irqs[32] = {
- "y_risci1", "u_risci1", "v_risci1", "vbi_risc1",
+ "y_risci1", "u_risci1", "v_risci1", "vbi_risc1",
"y_risci2", "u_risci2", "v_risci2", "vbi_risc2",
"y_oflow", "u_oflow", "v_oflow", "vbi_oflow",
"y_sync", "u_sync", "v_sync", "vbi_sync",
@@ -602,7 +602,7 @@ void cx88_wakeup(struct cx88_core *core,
break;
#else
/* count comes from the hw and is is 16bit wide --
- * this trick handles wrap-arounds correctly for
+ * this trick handles wrap-arounds correctly for
* up to 32767 buffers in flight... */
if ((s16) (count - buf->count) < 0)
break;
@@ -651,7 +651,7 @@ int cx88_reset(struct cx88_core *core)
{
dprintk(1,"%s\n",__FUNCTION__);
cx88_shutdown(core);
-
+
/* clear irq status */
cx_write(MO_VID_INTSTAT, 0xFFFFFFFF); // Clear PIV int
cx_write(MO_PCI_INTSTAT, 0xFFFFFFFF); // Clear PCI int
@@ -659,7 +659,7 @@ int cx88_reset(struct cx88_core *core)
/* wait a bit */
msleep(100);
-
+
/* init sram */
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH21], 720*4, 0);
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH22], 128, 0);
@@ -668,7 +668,7 @@ int cx88_reset(struct cx88_core *core)
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], 128, 0);
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], 128, 0);
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH28], 188*4, 0);
-
+
/* misc init ... */
cx_write(MO_INPUT_FORMAT, ((1 << 13) | // agc enable
(1 << 12) | // agc gain
@@ -687,7 +687,7 @@ int cx88_reset(struct cx88_core *core)
/* fixes flashing of image */
cx_write(MO_AGC_SYNC_TIP1, 0x0380000F);
cx_write(MO_AGC_BACK_VBI, 0x00E00555);
-
+
cx_write(MO_VID_INTSTAT, 0xFFFFFFFF); // Clear PIV int
cx_write(MO_PCI_INTSTAT, 0xFFFFFFFF); // Clear PCI int
cx_write(MO_INT1_STAT, 0xFFFFFFFF); // Clear RISC int
@@ -696,7 +696,7 @@ int cx88_reset(struct cx88_core *core)
cx_write(MO_SRST_IO, 0);
msleep(10);
cx_write(MO_SRST_IO, 1);
-
+
return 0;
}
@@ -721,7 +721,7 @@ static unsigned int inline norm_fsc8(struct cx88_tvnorm *norm)
{
static const unsigned int ntsc = 28636360;
static const unsigned int pal = 35468950;
-
+
return (norm->id & V4L2_STD_625_50) ? pal : ntsc;
}
@@ -762,7 +762,7 @@ int cx88_set_scale(struct cx88_core *core, unsigned int width, unsigned int heig
cx_write(MO_HDELAY_EVEN, value);
cx_write(MO_HDELAY_ODD, value);
dprintk(1,"set_scale: hdelay 0x%04x\n", value);
-
+
value = (swidth * 4096 / width) - 4096;
cx_write(MO_HSCALE_EVEN, value);
cx_write(MO_HSCALE_ODD, value);
@@ -771,12 +771,12 @@ int cx88_set_scale(struct cx88_core *core, unsigned int width, unsigned int heig
cx_write(MO_HACTIVE_EVEN, width);
cx_write(MO_HACTIVE_ODD, width);
dprintk(1,"set_scale: hactive 0x%04x\n", width);
-
+
// recalc V scale Register (delay is constant)
cx_write(MO_VDELAY_EVEN, norm_vdelay(core->tvnorm));
cx_write(MO_VDELAY_ODD, norm_vdelay(core->tvnorm));
dprintk(1,"set_scale: vdelay 0x%04x\n", norm_vdelay(core->tvnorm));
-
+
value = (0x10000 - (sheight * 512 / height - 512)) & 0x1fff;
cx_write(MO_VSCALE_EVEN, value);
cx_write(MO_VSCALE_ODD, value);
@@ -801,11 +801,11 @@ int cx88_set_scale(struct cx88_core *core, unsigned int width, unsigned int heig
value |= (1 << 0); // 3-tap interpolation
if (width < 193)
value |= (1 << 1); // 5-tap interpolation
-
+
cx_write(MO_FILTER_EVEN, value);
cx_write(MO_FILTER_ODD, value);
dprintk(1,"set_scale: filter 0x%04x\n", value);
-
+
return 0;
}
@@ -830,7 +830,7 @@ static int set_pll(struct cx88_core *core, int prescale, u32 ofreq)
printk("%s/0: pll out of range\n",core->name);
return -1;
}
-
+
dprintk(1,"set_pll: MO_PLL_REG 0x%08x [old=0x%08x,freq=%d]\n",
reg, cx_read(MO_PLL_REG), ofreq);
cx_write(MO_PLL_REG, reg);
@@ -902,7 +902,7 @@ int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm)
u32 step_db,step_dr;
u64 tmp64;
u32 bdelay,agcdelay,htotal;
-
+
core->tvnorm = norm;
fsc8 = norm_fsc8(norm);
adc_clock = xtal;
@@ -918,7 +918,7 @@ int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm)
dprintk(1,"set_tvnorm: \"%s\" fsc8=%d adc=%d vdec=%d db/dr=%d/%d\n",
norm->name, fsc8, adc_clock, vdec_clock, step_db, step_dr);
set_pll(core,2,vdec_clock);
-
+
dprintk(1,"set_tvnorm: MO_INPUT_FORMAT 0x%08x [old=0x%08x]\n",
norm->cxiformat, cx_read(MO_INPUT_FORMAT) & 0x0f);
cx_andor(MO_INPUT_FORMAT, 0xf, norm->cxiformat);
@@ -969,7 +969,7 @@ int cx88_set_tvnorm(struct cx88_core *core, struct cx88_tvnorm *norm)
// vbi stuff
cx_write(MO_VBI_PACKET, ((1 << 11) | /* (norm_vdelay(norm) << 11) | */
norm_vbipack(norm)));
-
+
// audio
set_tvaudio(core);
@@ -1088,7 +1088,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
struct cx88_core *core;
struct list_head *item;
int i;
-
+
down(&devlist);
list_for_each(item,&cx88_devlist) {
core = list_entry(item, struct cx88_core, devlist);
@@ -1130,7 +1130,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
core->board = UNSET;
if (card[core->nr] < cx88_bcount)
core->board = card[core->nr];
- for (i = 0; UNSET == core->board && i < cx88_idcount; i++)
+ for (i = 0; UNSET == core->board && i < cx88_idcount; i++)
if (pci->subsystem_vendor == cx88_subids[i].subvendor &&
pci->subsystem_device == cx88_subids[i].subdevice)
core->board = cx88_subids[i].card;
@@ -1153,7 +1153,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
cx88_reset(core);
cx88_i2c_init(core,pci);
cx88_card_setup(core);
-
+
up(&devlist);
return core;
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c
index b4adbbaef..29a35e876 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.12 2004/10/12 07:33:22 kraxel Exp $
+ * $Id: cx88-dvb.c,v 1.13 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* MPEG Transport Stream (DVB) routines
@@ -91,10 +91,10 @@ static int dvb_thread(void *data)
struct videobuf_buffer *buf;
unsigned long flags;
int err;
-
+
dprintk(1,"dvb thread started\n");
videobuf_read_start(dev, &dev->dvbq);
-
+
for (;;) {
/* fetch next buffer */
buf = list_entry(dev->dvbq.stream.next,
@@ -115,13 +115,13 @@ static int dvb_thread(void *data)
if (buf->state == STATE_DONE)
dvb_dmx_swfilter(&dev->demux, buf->dma.vmalloc,
buf->size);
-
+
/* requeue buffer */
list_add_tail(&buf->stream,&dev->dvbq.stream);
spin_lock_irqsave(dev->dvbq.irqlock,flags);
dev->dvbq.ops->buf_queue(dev,buf);
spin_unlock_irqrestore(dev->dvbq.irqlock,flags);
-
+
/* log errors if any */
if (dev->error_count || dev->stopper_count) {
printk("%s: error=%d stopper=%d\n",
@@ -352,7 +352,7 @@ static int __devinit dvb_probe(struct pci_dev *pci_dev,
V4L2_FIELD_TOP,
sizeof(struct cx88_buffer));
init_MUTEX(&dev->dvbq.lock);
-
+
err = dvb_register(dev);
if (0 != err)
goto fail_free;
diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c
index 0f4660c05..866bf4463 100644
--- a/linux/drivers/media/video/cx88/cx88-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-i2c.c
@@ -1,6 +1,6 @@
/*
- $Id: cx88-i2c.c,v 1.17 2004/10/11 13:45:51 kraxel Exp $
-
+ $Id: cx88-i2c.c,v 1.18 2004/10/13 10:39:00 kraxel Exp $
+
cx88-i2c.c -- all the i2c code is here
Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
@@ -21,7 +21,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
+
*/
#include <linux/module.h>
@@ -72,7 +72,7 @@ static int cx8800_bit_getscl(void *data)
{
struct cx88_core *core = data;
u32 state;
-
+
state = cx_read(MO_I2C);
return state & 0x02 ? 1 : 0;
}
diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c
index ff1a27978..7df7bd412 100644
--- a/linux/drivers/media/video/cx88/cx88-mpeg.c
+++ b/linux/drivers/media/video/cx88/cx88-mpeg.c
@@ -1,9 +1,9 @@
/*
- * $Id: cx88-mpeg.c,v 1.11 2004/10/12 07:33:22 kraxel Exp $
+ * $Id: cx88-mpeg.c,v 1.12 2004/10/13 10:39:00 kraxel Exp $
*
* Support for the mpeg transport stream transfers
* PCI function #2 of the cx2388x.
- *
+ *
* (c) 2004 Jelle Foks <jelle@foks.8m.com>
* (c) 2004 Chris Pascoe <c.pascoe@itee.uq.edu.au>
* (c) 2004 Gerd Knorr <kraxel@bytesex.org>
@@ -53,9 +53,9 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
struct cx88_buffer *buf)
{
struct cx88_core *core = dev->core;
-
+
dprintk(1, "cx8802_start_mpegport_dma %d\n", buf->vb.width);
-
+
/* setup fifo + format */
cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH28],
dev->ts_packet_size, buf->risc.dma);
@@ -74,15 +74,15 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
if (cx88_boards[core->board].blackbird) {
cx_write(MO_PINMUX_IO, 0x88); /* enable MPEG parallel IO */
-
+
// cx_write(TS_F2_CMD_STAT_MM, 0x2900106); /* F2_CMD_STAT_MM defaults + master + memory space */
- cx_write(TS_GEN_CNTRL, 0x46); /* punctured clock TS & posedge driven & software reset */
+ cx_write(TS_GEN_CNTRL, 0x46); /* punctured clock TS & posedge driven & software reset */
udelay(100);
-
+
cx_write(TS_HW_SOP_CNTRL, 0x408); /* mpeg start byte */
//cx_write(TS_HW_SOP_CNTRL, 0x2F0BC0); /* mpeg start byte ts: 0x2F0BC0 ? */
cx_write(TS_VALERR_CNTRL, 0x2000);
-
+
cx_write(TS_GEN_CNTRL, 0x06); /* punctured clock TS & posedge driven */
udelay(100);
}
@@ -91,11 +91,11 @@ static int cx8802_start_dma(struct cx8802_dev *dev,
/* reset counter */
cx_write(MO_TS_GPCNTRL, GP_COUNT_CONTROL_RESET);
q->count = 1;
-
+
/* enable irqs */
cx_set(MO_PCI_INTMSK, 0x00fc04);
cx_write(MO_TS_INTMSK, 0x1f0011);
-
+
/* start dma */
cx_write(MO_DEV_CNTRL2, (1<<5)); /* FIXME: s/write/set/ ??? */
cx_write(MO_TS_DMACNTRL, 0x11);
@@ -159,7 +159,7 @@ int cx8802_buf_prepare(struct cx8802_dev *dev, struct cx88_buffer *buf)
if (0 != (rc = videobuf_iolock(dev->pci,&buf->vb,NULL)))
goto fail;
cx88_risc_databuffer(dev->pci, &buf->risc,
- buf->vb.dma.sglist,
+ buf->vb.dma.sglist,
buf->vb.width, buf->vb.height);
}
buf->vb.state = STATE_PREPARED;
@@ -252,7 +252,7 @@ static void cx8802_mpeg_irq(struct cx8802_dev *dev)
mask = cx_read(MO_TS_INTMSK);
if (0 == (status & mask))
return;
-
+
cx_write(MO_TS_INTSTAT, status);
if (debug || (status & mask & ~0xff))
cx88_print_irqbits(core->name, "irq mpeg ",
@@ -316,7 +316,7 @@ static irqreturn_t cx8802_irq(int irq, void *dev_id, struct pt_regs *regs)
core->name);
cx_write(MO_PCI_INTMSK,0);
}
-
+
out:
return IRQ_RETVAL(handled);
}
@@ -386,7 +386,7 @@ void cx8802_fini_common(struct cx8802_dev *dev)
cx8802_stop_dma(dev);
pci_disable_device(dev->pci);
- /* unregister stuff */
+ /* unregister stuff */
free_irq(dev->pci->irq, dev);
pci_set_drvdata(dev->pci, NULL);
@@ -414,7 +414,7 @@ int cx8802_suspend_common(struct pci_dev *pci_dev, u32 state)
/* FIXME -- shutdown device */
cx88_shutdown(dev->core);
#endif
-
+
pci_save_state(pci_dev, dev->state.pci_cfg);
if (0 != pci_set_power_state(pci_dev, state)) {
pci_disable_device(pci_dev);
diff --git a/linux/drivers/media/video/cx88/cx88-reg.h b/linux/drivers/media/video/cx88/cx88-reg.h
index 3db8b0d3b..8638ce57d 100644
--- a/linux/drivers/media/video/cx88/cx88-reg.h
+++ b/linux/drivers/media/video/cx88/cx88-reg.h
@@ -1,5 +1,5 @@
-/*
- $Id: cx88-reg.h,v 1.5 2004/09/15 16:15:24 kraxel Exp $
+/*
+ $Id: cx88-reg.h,v 1.6 2004/10/13 10:39:00 kraxel Exp $
cx88x-hw.h - CX2388x register offsets
@@ -559,11 +559,11 @@
/* ---------------------------------------------------------------------- */
/* various constants */
-#define SEL_BTSC 0x01
-#define SEL_EIAJ 0x02
-#define SEL_A2 0x04
+#define SEL_BTSC 0x01
+#define SEL_EIAJ 0x02
+#define SEL_A2 0x04
#define SEL_SAP 0x08
-#define SEL_NICAM 0x10
+#define SEL_NICAM 0x10
#define SEL_FMRADIO 0x20
// AUD_CTL
@@ -618,7 +618,7 @@
#define EN_DMTRX_BYPASS (1 << 11)
#endif
-// Video
+// Video
#define VID_CAPTURE_CONTROL 0x310180
#define CX23880_CAP_CTL_CAPTURE_VBI_ODD (1<<3)
@@ -630,10 +630,10 @@
#define VideoInputMux1 0x1
#define VideoInputMux2 0x2
#define VideoInputMux3 0x3
-#define VideoInputTuner 0x0
-#define VideoInputComposite 0x1
+#define VideoInputTuner 0x0
+#define VideoInputComposite 0x1
#define VideoInputSVideo 0x2
-#define VideoInputOther 0x3
+#define VideoInputOther 0x3
#define Xtal0 0x1
#define Xtal1 0x2
@@ -644,12 +644,12 @@
#define VideoFormatNTSCJapan 0x2
#define VideoFormatNTSC443 0x3
#define VideoFormatPAL 0x4
-#define VideoFormatPALB 0x4
-#define VideoFormatPALD 0x4
-#define VideoFormatPALG 0x4
-#define VideoFormatPALH 0x4
-#define VideoFormatPALI 0x4
-#define VideoFormatPALBDGHI 0x4
+#define VideoFormatPALB 0x4
+#define VideoFormatPALD 0x4
+#define VideoFormatPALG 0x4
+#define VideoFormatPALH 0x4
+#define VideoFormatPALI 0x4
+#define VideoFormatPALBDGHI 0x4
#define VideoFormatPALM 0x5
#define VideoFormatPALN 0x6
#define VideoFormatPALNC 0x7
@@ -661,12 +661,12 @@
#define VideoFormatNTSCJapan27MHz 0x12
#define VideoFormatNTSC44327MHz 0x13
#define VideoFormatPAL27MHz 0x14
-#define VideoFormatPALB27MHz 0x14
-#define VideoFormatPALD27MHz 0x14
-#define VideoFormatPALG27MHz 0x14
-#define VideoFormatPALH27MHz 0x14
-#define VideoFormatPALI27MHz 0x14
-#define VideoFormatPALBDGHI27MHz 0x14
+#define VideoFormatPALB27MHz 0x14
+#define VideoFormatPALD27MHz 0x14
+#define VideoFormatPALG27MHz 0x14
+#define VideoFormatPALH27MHz 0x14
+#define VideoFormatPALI27MHz 0x14
+#define VideoFormatPALBDGHI27MHz 0x14
#define VideoFormatPALM27MHz 0x15
#define VideoFormatPALN27MHz 0x16
#define VideoFormatPALNC27MHz 0x17
@@ -745,8 +745,8 @@
#define CHANNEL_VIP_UP 0xA
#define CHANNEL_HOST_DN 0xB
#define CHANNEL_HOST_UP 0xC
-#define CHANNEL_FIRST 0x1
-#define CHANNEL_LAST 0xC
+#define CHANNEL_FIRST 0x1
+#define CHANNEL_LAST 0xC
#define GP_COUNT_CONTROL_NONE 0x0
#define GP_COUNT_CONTROL_INC 0x1
@@ -773,15 +773,15 @@
#define DEFAULT_SAT_U_NTSC 0x7F
#define DEFAULT_SAT_V_NTSC 0x5A
-typedef enum
-{
- SOURCE_TUNER = 0,
- SOURCE_COMPOSITE,
- SOURCE_SVIDEO,
- SOURCE_OTHER1,
- SOURCE_OTHER2,
- SOURCE_COMPVIASVIDEO,
- SOURCE_CCIR656
+typedef enum
+{
+ SOURCE_TUNER = 0,
+ SOURCE_COMPOSITE,
+ SOURCE_SVIDEO,
+ SOURCE_OTHER1,
+ SOURCE_OTHER2,
+ SOURCE_COMPVIASVIDEO,
+ SOURCE_CCIR656
} VIDEOSOURCETYPE;
#endif /* _CX88_REG_H_ */
diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c
index 84018b589..b3e2827ef 100644
--- a/linux/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c
@@ -1,6 +1,6 @@
/*
- $Id: cx88-tvaudio.c,v 1.22 2004/10/11 13:45:51 kraxel Exp $
-
+ $Id: cx88-tvaudio.c,v 1.23 2004/10/13 10:39:00 kraxel Exp $
+
cx88x-audio.c - Conexant CX23880/23881 audio downstream driver driver
(c) 2001 Michael Eskin, Tom Zakrajsek [Windows version]
@@ -18,9 +18,9 @@
Some comes from the dscaler sources, one of the dscaler driver guy works
for Conexant ...
-
+
-----------------------------------------------------------------------
-
+
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
the Free Software Foundation; either version 2 of the License, or
@@ -246,7 +246,7 @@ static void set_audio_standard_BTSC(struct cx88_core *core, unsigned int sap)
{ AUD_POLYPH80SCALEFAC, 0x00000003 },
{ /* end of list */ },
};
-
+
// dscaler: exactly taken from driver,
// dscaler: don't know why to set EN_FMRADIO_EN_RDS
if (sap) {
@@ -280,7 +280,7 @@ static void set_audio_standard_NICAM(struct cx88_core *core)
{ AUD_DEEMPHNUMER2_R, 0x0003023e },
{ AUD_DEEMPHDENOM1_R, 0x0000f3d0 },
{ AUD_DEEMPHDENOM2_R, 0x00000000 },
-
+
#if 0
// Deemphasis 2: (other tv norm?)
{ AUD_DEEMPHGAIN_R, 0x0000c600 },
@@ -351,104 +351,104 @@ static void set_audio_standard_NICAM_L(struct cx88_core *core)
{ AUD_PHACC_FREQ_8LSB, 0x4a },
{ AUD_POLY0_DDS_CONSTANT, 0x000e4db2 },
- { AUD_IIR1_0_SEL, 0x00000000 },
- { AUD_IIR1_1_SEL, 0x00000002 },
- { AUD_IIR1_2_SEL, 0x00000023 },
- { AUD_IIR1_3_SEL, 0x00000004 },
- { AUD_IIR1_4_SEL, 0x00000005 },
- { AUD_IIR1_5_SEL, 0x00000007 },
- { AUD_IIR1_0_SHIFT, 0x00000007 },
- { AUD_IIR1_1_SHIFT, 0x00000000 },
- { AUD_IIR1_2_SHIFT, 0x00000000 },
- { AUD_IIR1_3_SHIFT, 0x00000007 },
- { AUD_IIR1_4_SHIFT, 0x00000007 },
- { AUD_IIR1_5_SHIFT, 0x00000007 },
- { AUD_IIR2_0_SEL, 0x00000002 },
+ { AUD_IIR1_0_SEL, 0x00000000 },
+ { AUD_IIR1_1_SEL, 0x00000002 },
+ { AUD_IIR1_2_SEL, 0x00000023 },
+ { AUD_IIR1_3_SEL, 0x00000004 },
+ { AUD_IIR1_4_SEL, 0x00000005 },
+ { AUD_IIR1_5_SEL, 0x00000007 },
+ { AUD_IIR1_0_SHIFT, 0x00000007 },
+ { AUD_IIR1_1_SHIFT, 0x00000000 },
+ { AUD_IIR1_2_SHIFT, 0x00000000 },
+ { AUD_IIR1_3_SHIFT, 0x00000007 },
+ { AUD_IIR1_4_SHIFT, 0x00000007 },
+ { AUD_IIR1_5_SHIFT, 0x00000007 },
+ { AUD_IIR2_0_SEL, 0x00000002 },
{ AUD_IIR2_1_SEL, 0x00000003 },
{ AUD_IIR2_2_SEL, 0x00000004 },
- { AUD_IIR2_3_SEL, 0x00000005 },
- { AUD_IIR3_0_SEL, 0x00000007 },
- { AUD_IIR3_1_SEL, 0x00000023 },
- { AUD_IIR3_2_SEL, 0x00000016 },
- { AUD_IIR4_0_SHIFT, 0x00000000 },
- { AUD_IIR4_1_SHIFT, 0x00000000 },
- { AUD_IIR3_2_SHIFT, 0x00000002 },
- { AUD_IIR4_0_SEL, 0x0000001d },
- { AUD_IIR4_1_SEL, 0x00000019 },
- { AUD_IIR4_2_SEL, 0x00000008 },
- { AUD_IIR4_0_SHIFT, 0x00000000 },
- { AUD_IIR4_1_SHIFT, 0x00000007 },
- { AUD_IIR4_2_SHIFT, 0x00000007 },
- { AUD_IIR4_0_CA0, 0x0003e57e },
- { AUD_IIR4_0_CA1, 0x00005e11 },
- { AUD_IIR4_0_CA2, 0x0003a7cf },
- { AUD_IIR4_0_CB0, 0x00002368 },
- { AUD_IIR4_0_CB1, 0x0003bf1b },
- { AUD_IIR4_1_CA0, 0x00006349 },
- { AUD_IIR4_1_CA1, 0x00006f27 },
- { AUD_IIR4_1_CA2, 0x0000e7a3 },
+ { AUD_IIR2_3_SEL, 0x00000005 },
+ { AUD_IIR3_0_SEL, 0x00000007 },
+ { AUD_IIR3_1_SEL, 0x00000023 },
+ { AUD_IIR3_2_SEL, 0x00000016 },
+ { AUD_IIR4_0_SHIFT, 0x00000000 },
+ { AUD_IIR4_1_SHIFT, 0x00000000 },
+ { AUD_IIR3_2_SHIFT, 0x00000002 },
+ { AUD_IIR4_0_SEL, 0x0000001d },
+ { AUD_IIR4_1_SEL, 0x00000019 },
+ { AUD_IIR4_2_SEL, 0x00000008 },
+ { AUD_IIR4_0_SHIFT, 0x00000000 },
+ { AUD_IIR4_1_SHIFT, 0x00000007 },
+ { AUD_IIR4_2_SHIFT, 0x00000007 },
+ { AUD_IIR4_0_CA0, 0x0003e57e },
+ { AUD_IIR4_0_CA1, 0x00005e11 },
+ { AUD_IIR4_0_CA2, 0x0003a7cf },
+ { AUD_IIR4_0_CB0, 0x00002368 },
+ { AUD_IIR4_0_CB1, 0x0003bf1b },
+ { AUD_IIR4_1_CA0, 0x00006349 },
+ { AUD_IIR4_1_CA1, 0x00006f27 },
+ { AUD_IIR4_1_CA2, 0x0000e7a3 },
{ AUD_IIR4_1_CB0, 0x00005653 },
- { AUD_IIR4_1_CB1, 0x0000cf97 },
- { AUD_IIR4_2_CA0, 0x00006349 },
- { AUD_IIR4_2_CA1, 0x00006f27 },
- { AUD_IIR4_2_CA2, 0x0000e7a3 },
- { AUD_IIR4_2_CB0, 0x00005653 },
- { AUD_IIR4_2_CB1, 0x0000cf97 },
- { AUD_HP_MD_IIR4_1, 0x00000001 },
- { AUD_HP_PROG_IIR4_1, 0x0000001a },
+ { AUD_IIR4_1_CB1, 0x0000cf97 },
+ { AUD_IIR4_2_CA0, 0x00006349 },
+ { AUD_IIR4_2_CA1, 0x00006f27 },
+ { AUD_IIR4_2_CA2, 0x0000e7a3 },
+ { AUD_IIR4_2_CB0, 0x00005653 },
+ { AUD_IIR4_2_CB1, 0x0000cf97 },
+ { AUD_HP_MD_IIR4_1, 0x00000001 },
+ { AUD_HP_PROG_IIR4_1, 0x0000001a },
{ AUD_DN0_FREQ, 0x00000000 },
- { AUD_DN1_FREQ, 0x00003318 },
- { AUD_DN1_SRC_SEL, 0x00000017 },
- { AUD_DN1_SHFT, 0x00000007 },
- { AUD_DN1_AFC, 0x00000000 },
- { AUD_DN1_FREQ_SHIFT, 0x00000000 },
- { AUD_DN2_FREQ, 0x00003551 },
- { AUD_DN2_SRC_SEL, 0x00000001 },
- { AUD_DN2_SHFT, 0x00000000 },
- { AUD_DN2_AFC, 0x00000002 },
- { AUD_DN2_FREQ_SHIFT, 0x00000000 },
- { AUD_PDET_SRC, 0x00000014 },
- { AUD_PDET_SHIFT, 0x00000000 },
- { AUD_DEEMPH0_SRC_SEL, 0x00000011 },
- { AUD_DEEMPH1_SRC_SEL, 0x00000011 },
- { AUD_DEEMPH0_SHIFT, 0x00000000 },
- { AUD_DEEMPH1_SHIFT, 0x00000000 },
- { AUD_DEEMPH0_G0, 0x00007000 },
- { AUD_DEEMPH0_A0, 0x00000000 },
- { AUD_DEEMPH0_B0, 0x00000000 },
- { AUD_DEEMPH0_A1, 0x00000000 },
- { AUD_DEEMPH0_B1, 0x00000000 },
- { AUD_DEEMPH1_G0, 0x00007000 },
- { AUD_DEEMPH1_A0, 0x00000000 },
- { AUD_DEEMPH1_B0, 0x00000000 },
- { AUD_DEEMPH1_A1, 0x00000000 },
- { AUD_DEEMPH1_B1, 0x00000000 },
- { AUD_DMD_RA_DDS, 0x00f5c285 },
- { AUD_RATE_ADJ1, 0x00000100 },
- { AUD_RATE_ADJ2, 0x00000200 },
- { AUD_RATE_ADJ3, 0x00000300 },
- { AUD_RATE_ADJ4, 0x00000400 },
- { AUD_RATE_ADJ5, 0x00000500 },
- { AUD_C2_UP_THR, 0x00005400 },
- { AUD_C2_LO_THR, 0x00003000 },
- { AUD_C1_UP_THR, 0x00007000 },
- { AUD_C2_LO_THR, 0x00005400 },
- { AUD_CTL, 0x0000100c },
- { AUD_DCOC_0_SRC, 0x00000021 },
- { AUD_DCOC_1_SRC, 0x00000003 },
- { AUD_DCOC1_SHIFT, 0x00000000 },
- { AUD_DCOC_1_SHIFT_IN0, 0x0000000a },
- { AUD_DCOC_1_SHIFT_IN1, 0x00000008 },
- { AUD_DCOC_PASS_IN, 0x00000000 },
- { AUD_DCOC_2_SRC, 0x0000001b },
- { AUD_IIR4_0_SEL, 0x0000001d },
- { AUD_POLY0_DDS_CONSTANT, 0x000e4db2 },
- { AUD_PHASE_FIX_CTL, 0x00000000 },
+ { AUD_DN1_FREQ, 0x00003318 },
+ { AUD_DN1_SRC_SEL, 0x00000017 },
+ { AUD_DN1_SHFT, 0x00000007 },
+ { AUD_DN1_AFC, 0x00000000 },
+ { AUD_DN1_FREQ_SHIFT, 0x00000000 },
+ { AUD_DN2_FREQ, 0x00003551 },
+ { AUD_DN2_SRC_SEL, 0x00000001 },
+ { AUD_DN2_SHFT, 0x00000000 },
+ { AUD_DN2_AFC, 0x00000002 },
+ { AUD_DN2_FREQ_SHIFT, 0x00000000 },
+ { AUD_PDET_SRC, 0x00000014 },
+ { AUD_PDET_SHIFT, 0x00000000 },
+ { AUD_DEEMPH0_SRC_SEL, 0x00000011 },
+ { AUD_DEEMPH1_SRC_SEL, 0x00000011 },
+ { AUD_DEEMPH0_SHIFT, 0x00000000 },
+ { AUD_DEEMPH1_SHIFT, 0x00000000 },
+ { AUD_DEEMPH0_G0, 0x00007000 },
+ { AUD_DEEMPH0_A0, 0x00000000 },
+ { AUD_DEEMPH0_B0, 0x00000000 },
+ { AUD_DEEMPH0_A1, 0x00000000 },
+ { AUD_DEEMPH0_B1, 0x00000000 },
+ { AUD_DEEMPH1_G0, 0x00007000 },
+ { AUD_DEEMPH1_A0, 0x00000000 },
+ { AUD_DEEMPH1_B0, 0x00000000 },
+ { AUD_DEEMPH1_A1, 0x00000000 },
+ { AUD_DEEMPH1_B1, 0x00000000 },
+ { AUD_DMD_RA_DDS, 0x00f5c285 },
+ { AUD_RATE_ADJ1, 0x00000100 },
+ { AUD_RATE_ADJ2, 0x00000200 },
+ { AUD_RATE_ADJ3, 0x00000300 },
+ { AUD_RATE_ADJ4, 0x00000400 },
+ { AUD_RATE_ADJ5, 0x00000500 },
+ { AUD_C2_UP_THR, 0x00005400 },
+ { AUD_C2_LO_THR, 0x00003000 },
+ { AUD_C1_UP_THR, 0x00007000 },
+ { AUD_C2_LO_THR, 0x00005400 },
+ { AUD_CTL, 0x0000100c },
+ { AUD_DCOC_0_SRC, 0x00000021 },
+ { AUD_DCOC_1_SRC, 0x00000003 },
+ { AUD_DCOC1_SHIFT, 0x00000000 },
+ { AUD_DCOC_1_SHIFT_IN0, 0x0000000a },
+ { AUD_DCOC_1_SHIFT_IN1, 0x00000008 },
+ { AUD_DCOC_PASS_IN, 0x00000000 },
+ { AUD_DCOC_2_SRC, 0x0000001b },
+ { AUD_IIR4_0_SEL, 0x0000001d },
+ { AUD_POLY0_DDS_CONSTANT, 0x000e4db2 },
+ { AUD_PHASE_FIX_CTL, 0x00000000 },
{ AUD_CORDIC_SHIFT_1, 0x00000007 },
- { AUD_PLL_EN, 0x00000000 },
+ { AUD_PLL_EN, 0x00000000 },
{ AUD_PLL_PRESCALE, 0x00000002 },
- { AUD_PLL_INT, 0x0000001e },
- { AUD_OUT1_SHIFT, 0x00000000 },
+ { AUD_PLL_INT, 0x0000001e },
+ { AUD_OUT1_SHIFT, 0x00000000 },
{ /* end of list */ },
};
@@ -470,7 +470,7 @@ static void set_audio_standard_A2(struct cx88_core *core)
{ AUD_QAM_MODE, 0x05 },
{ AUD_PHACC_FREQ_8MSB, 0x34 },
{ AUD_PHACC_FREQ_8LSB, 0x4c },
-
+
{ AUD_RATE_ADJ1, 0x00001000 },
{ AUD_RATE_ADJ2, 0x00002000 },
{ AUD_RATE_ADJ3, 0x00003000 },
@@ -515,7 +515,7 @@ static void set_audio_standard_A2(struct cx88_core *core)
{ /* end of list */ },
};
-
+
static const struct rlist a2_table1[] = {
// PAL-BG
{ AUD_DMD_RA_DDS, 0x002a73bd },
@@ -601,7 +601,7 @@ static void set_audio_standard_FM(struct cx88_core *core)
cx_write(AUD_DEEMPH1_B0, 0x1C29);
cx_write(AUD_DEEMPH1_A1, 0x3FC66);
cx_write(AUD_DEEMPH1_B1, 0x399A);
-
+
break;
case WW_FM_DEEMPH_75:
@@ -732,7 +732,7 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode)
switch (core->tvaudio) {
case WW_BTSC:
switch (mode) {
- case V4L2_TUNER_MODE_MONO:
+ case V4L2_TUNER_MODE_MONO:
ctl = EN_BTSC_FORCE_MONO;
mask = 0x3f;
break;
@@ -750,7 +750,7 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode)
case WW_A2_DK:
case WW_A2_M:
switch (mode) {
- case V4L2_TUNER_MODE_MONO:
+ case V4L2_TUNER_MODE_MONO:
case V4L2_TUNER_MODE_LANG1:
ctl = EN_A2_FORCE_MONO1;
mask = 0x3f;
@@ -767,7 +767,7 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode)
break;
case WW_NICAM_BGDKL:
switch (mode) {
- case V4L2_TUNER_MODE_MONO:
+ case V4L2_TUNER_MODE_MONO:
ctl = EN_NICAM_FORCE_MONO1;
mask = 0x3f;
break;
@@ -780,10 +780,10 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode)
mask = 0x93f;
break;
}
- break;
+ break;
case WW_FM:
switch (mode) {
- case V4L2_TUNER_MODE_MONO:
+ case V4L2_TUNER_MODE_MONO:
ctl = EN_FMRADIO_FORCE_MONO;
mask = 0x3f;
break;
@@ -792,7 +792,7 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode)
mask = 0x3f;
break;
}
- break;
+ break;
}
if (UNSET != ctl) {
@@ -811,7 +811,7 @@ int cx88_audio_thread(void *data)
{
struct cx88_core *core = data;
struct v4l2_tuner t;
-
+
dprintk("cx88: tvaudio thread started\n");
for (;;) {
if (kthread_should_stop())
diff --git a/linux/drivers/media/video/cx88/cx88-vbi.c b/linux/drivers/media/video/cx88/cx88-vbi.c
index acc93d2d8..133d7c2da 100644
--- a/linux/drivers/media/video/cx88/cx88-vbi.c
+++ b/linux/drivers/media/video/cx88/cx88-vbi.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-vbi.c,v 1.12 2004/10/11 13:45:51 kraxel Exp $
+ * $Id: cx88-vbi.c,v 1.13 2004/10/13 10:39:00 kraxel Exp $
*/
#include <linux/kernel.h>
#include <linux/module.h>
@@ -66,10 +66,10 @@ int cx8800_start_vbi_dma(struct cx8800_dev *dev,
/* enable irqs */
cx_set(MO_PCI_INTMSK, 0x00fc01);
cx_set(MO_VID_INTMSK, 0x0f0088);
-
+
/* enable capture */
cx_set(VID_CAPTURE_CONTROL,0x18);
-
+
/* start dma */
cx_set(MO_DEV_CNTRL2, (1<<5));
cx_set(MO_VID_DMACNTRL, 0x88);
@@ -98,7 +98,7 @@ int cx8800_restart_vbi_queue(struct cx8800_dev *dev,
{
struct cx88_buffer *buf;
struct list_head *item;
-
+
if (list_empty(&q->active))
return 0;
@@ -123,7 +123,7 @@ void cx8800_vbi_timeout(unsigned long data)
unsigned long flags;
cx88_sram_channel_dump(dev->core, &cx88_sram_channels[SRAM_CH24]);
-
+
cx_clear(MO_VID_DMACNTRL, 0x88);
cx_clear(VID_CAPTURE_CONTROL, 0x18);
@@ -180,7 +180,7 @@ vbi_prepare(void *priv, struct videobuf_buffer *vb,
cx88_risc_buffer(dev->pci, &buf->risc,
buf->vb.dma.sglist,
0, buf->vb.width * buf->vb.height,
- buf->vb.width, 0,
+ buf->vb.width, 0,
buf->vb.height);
}
buf->vb.state = STATE_PREPARED;
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 98161d357..8d3dc06ba 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.40 2004/10/12 07:33:22 kraxel Exp $
+ * $Id: cx88-video.c,v 1.41 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -210,7 +210,7 @@ static struct cx8800_fmt formats[] = {
static struct cx8800_fmt* format_by_fourcc(unsigned int fourcc)
{
unsigned int i;
-
+
for (i = 0; i < ARRAY_SIZE(formats); i++)
if (formats[i].fourcc == fourcc)
return formats+i;
@@ -273,7 +273,7 @@ static struct cx88_ctrl cx8800_ctls[] = {
*/
.v = {
.id = V4L2_CID_SATURATION,
- .name = "Saturation",
+ .name = "Saturation",
.minimum = 0,
.maximum = 0xff,
.step = 1,
@@ -433,10 +433,10 @@ static int start_video_dma(struct cx8800_dev *dev,
/* enable irqs */
cx_set(MO_PCI_INTMSK, 0x00fc01);
cx_set(MO_VID_INTMSK, 0x0f0011);
-
+
/* enable capture */
cx_set(VID_CAPTURE_CONTROL,0x06);
-
+
/* start dma */
cx_set(MO_DEV_CNTRL2, (1<<5));
cx_set(MO_VID_DMACNTRL, 0x11);
@@ -465,7 +465,7 @@ static int restart_video_queue(struct cx8800_dev *dev,
{
struct cx88_buffer *buf, *prev;
struct list_head *item;
-
+
if (!list_empty(&q->active)) {
buf = list_entry(q->active.next, struct cx88_buffer, vb.queue);
dprintk(2,"restart_queue [%p/%d]: restart dma\n",
@@ -517,7 +517,7 @@ static int
buffer_setup(void *priv, unsigned int *count, unsigned int *size)
{
struct cx8800_fh *fh = priv;
-
+
*size = fh->fmt->depth*fh->width*fh->height >> 3;
if (0 == *count)
*count = 32;
@@ -722,7 +722,7 @@ static u32* ov_risc_field(struct cx8800_dev *dev, struct cx8800_fh *fh,
ra = addr + (fh->fmt->depth>>3)*start;
else
ra = 0;
-
+
if (0 == start)
ri |= RISC_SOL;
if (fh->win.w.width == end)
@@ -745,11 +745,11 @@ static int ov_risc_frame(struct cx8800_dev *dev, struct cx8800_fh *fh,
u32 instructions,fields;
u32 *rp;
int rc;
-
+
/* skip list for window clipping */
if (NULL == (skips = kmalloc(sizeof(*skips) * fh->nclips,GFP_KERNEL)))
return -ENOMEM;
-
+
fields = 0;
if (V4L2_FIELD_HAS_TOP(fh->win.field))
fields++;
@@ -875,7 +875,7 @@ static int setup_window(struct cx8800_dev *dev, struct cx8800_fh *fh,
default:
BUG();
}
-
+
down(&fh->vidq.lock);
if (fh->clips)
kfree(fh->clips);
@@ -885,13 +885,13 @@ static int setup_window(struct cx8800_dev *dev, struct cx8800_fh *fh,
#if 0
fh->ov.setup_ok = 1;
#endif
-
+
/* update overlay if needed */
retval = 0;
#if 0
if (check_btres(fh, RESOURCE_OVERLAY)) {
struct bttv_buffer *new;
-
+
new = videobuf_alloc(sizeof(*new));
bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
retval = bttv_switch_overlay(btv,fh,new);
@@ -938,7 +938,7 @@ static int video_open(struct inode *inode, struct file *file)
struct list_head *list;
enum v4l2_buf_type type = 0;
int radio = 0;
-
+
list_for_each(list,&cx8800_devlist) {
h = list_entry(list, struct cx8800_dev, devlist);
if (h->video_dev->minor == minor) {
@@ -1095,7 +1095,7 @@ static int get_control(struct cx8800_dev *dev, struct v4l2_control *ctl)
struct cx88_ctrl *c = NULL;
u32 value;
int i;
-
+
for (i = 0; i < CX8800_CTLS; i++)
if (cx8800_ctls[i].v.id == ctl->id)
c = &cx8800_ctls[i];
@@ -1269,7 +1269,7 @@ static int cx8800_s_fmt(struct cx8800_dev *dev, struct cx8800_fh *fh,
struct v4l2_format *f)
{
int err;
-
+
switch (f->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
err = cx8800_try_fmt(dev,fh,f);
@@ -1311,7 +1311,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_QUERYCAP:
{
struct v4l2_capability *cap = arg;
-
+
memset(cap,0,sizeof(*cap));
strcpy(cap->driver, "cx8800");
strlcpy(cap->card, cx88_boards[core->board].name,
@@ -1416,7 +1416,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_S_INPUT:
{
unsigned int *i = arg;
-
+
if (*i >= 4)
return -EINVAL;
down(&dev->lock);
@@ -1520,13 +1520,13 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
return get_control(dev,arg);
case VIDIOC_S_CTRL:
return set_control(dev,arg);
-
+
/* --- tuner ioctls ------------------------------------------ */
case VIDIOC_G_TUNER:
{
struct v4l2_tuner *t = arg;
u32 reg;
-
+
if (UNSET == core->tuner_type)
return -EINVAL;
if (0 != t->index)
@@ -1639,7 +1639,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_STREAMOFF:
{
int res = get_ressource(fh);
-
+
err = videobuf_streamoff(file->private_data, get_queue(fh));
if (err < 0)
return err;
@@ -1668,7 +1668,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
struct cx8800_fh *fh = file->private_data;
struct cx8800_dev *dev = fh->dev;
struct cx88_core *core = dev->core;
-
+
if (video_debug > 1)
cx88_print_ioctl(core->name,cmd);
@@ -1676,7 +1676,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_QUERYCAP:
{
struct v4l2_capability *cap = arg;
-
+
memset(cap,0,sizeof(*cap));
strcpy(cap->driver, "cx8800");
strlcpy(cap->card, cx88_boards[core->board].name,
@@ -1697,7 +1697,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
strcpy(t->name, "Radio");
t->rangelow = (int)(65*16);
t->rangehigh = (int)(108*16);
-
+
#ifdef V4L2_I2C_CLIENTS
cx88_call_i2c_clients(dev->core,VIDIOC_G_TUNER,t);
#else
@@ -1713,7 +1713,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_ENUMINPUT:
{
struct v4l2_input *i = arg;
-
+
if (i->index != 0)
return -EINVAL;
strcpy(i->name,"Radio");
@@ -1770,7 +1770,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_FREQUENCY:
case VIDIOC_S_FREQUENCY:
return video_do_ioctl(inode,file,cmd,arg);
-
+
default:
return v4l_compat_translate_ioctl(inode,file,cmd,arg,
radio_do_ioctl);
@@ -1795,7 +1795,7 @@ static void cx8800_vid_timeout(unsigned long data)
unsigned long flags;
cx88_sram_channel_dump(dev->core, &cx88_sram_channels[SRAM_CH21]);
-
+
cx_clear(MO_VID_DMACNTRL, 0x11);
cx_clear(VID_CAPTURE_CONTROL, 0x06);
@@ -1833,7 +1833,7 @@ static void cx8800_vid_irq(struct cx8800_dev *dev)
cx_clear(VID_CAPTURE_CONTROL, 0x06);
cx88_sram_channel_dump(dev->core, &cx88_sram_channels[SRAM_CH21]);
}
-
+
/* risc1 y */
if (status & 0x01) {
spin_lock(&dev->slock);
@@ -1892,7 +1892,7 @@ static irqreturn_t cx8800_irq(int irq, void *dev_id, struct pt_regs *regs)
core->name);
cx_write(MO_PCI_INTMSK,0);
}
-
+
out:
return IRQ_RETVAL(handled);
}
@@ -2056,7 +2056,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
cx88_call_i2c_clients(dev->core,TUNER_SET_TYPE,&core->tuner_type);
if (core->tda9887_conf)
cx88_call_i2c_clients(dev->core,TDA9887_SET_CONFIG,&core->tda9887_conf);
-
+
/* register v4l devices */
dev->video_dev = cx88_vdev_init(core,dev->pci,
&cx8800_video_template,"video");
@@ -2134,7 +2134,7 @@ static void __devexit cx8800_finidev(struct pci_dev *pci_dev)
cx88_shutdown(dev->core); /* FIXME */
pci_disable_device(pci_dev);
- /* unregister stuff */
+ /* unregister stuff */
free_irq(pci_dev->irq, dev);
cx8800_unregister_video(dev);
@@ -2170,7 +2170,7 @@ static int cx8800_suspend(struct pci_dev *pci_dev, u32 state)
/* FIXME -- shutdown device */
cx88_shutdown(dev->core);
#endif
-
+
pci_save_state(pci_dev, dev->state.pci_cfg);
if (0 != pci_set_power_state(pci_dev, state)) {
pci_disable_device(pci_dev);
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 2527681bc..3e59e05e7 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -76,7 +76,7 @@ static int stereo_threshold = 0x190; /* a2 threshold for stereo/bilingual
struct msp3400c {
int rev1,rev2;
-
+
int opmode;
int mode;
int norm;
@@ -168,14 +168,14 @@ static int msp3400c_reset(struct i2c_client *client)
{ client->addr, 0, 3, write },
{ client->addr, I2C_M_RD, 2, read },
};
-
+
if ( (1 != i2c_transfer(client->adapter,&reset[0],1)) ||
(1 != i2c_transfer(client->adapter,&reset[1],1)) ||
(2 != i2c_transfer(client->adapter,test,2)) ) {
printk(KERN_ERR "msp3400: chip reset failed\n");
return -1;
}
- return 0;
+ return 0;
}
static int
@@ -311,15 +311,15 @@ struct CARRIER_DETECT {
static struct CARRIER_DETECT carrier_detect_main[] = {
/* main carrier */
- { MSP_CARRIER(4.5), "4.5 NTSC" },
- { MSP_CARRIER(5.5), "5.5 PAL B/G" },
+ { MSP_CARRIER(4.5), "4.5 NTSC" },
+ { MSP_CARRIER(5.5), "5.5 PAL B/G" },
{ MSP_CARRIER(6.0), "6.0 PAL I" },
{ MSP_CARRIER(6.5), "6.5 PAL D/K + SAT + SECAM" }
};
static struct CARRIER_DETECT carrier_detect_55[] = {
/* PAL B/G */
- { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" },
+ { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" },
{ MSP_CARRIER(5.85), "5.85 PAL B/G NICAM" }
};
@@ -390,7 +390,7 @@ static void msp3400c_setvolume(struct i2c_client *client,
muted ? "on" : "off", volume, balance, val>>8, bal);
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0000, val); /* loudspeaker */
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0006, val); /* headphones */
- msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007,
+ msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007,
muted ? 0x01 : (val | 0x01));
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0001, bal << 8);
}
@@ -415,7 +415,7 @@ static void msp3400c_setmode(struct i2c_client *client, int type)
{
struct msp3400c *msp = i2c_get_clientdata(client);
int i;
-
+
dprintk(KERN_DEBUG "msp3400: setmode: %d\n",type);
msp->mode = type;
msp->audmode = V4L2_TUNER_MODE_MONO;
@@ -423,24 +423,24 @@ static void msp3400c_setmode(struct i2c_client *client, int type)
msp3400c_write(client,I2C_MSP3400C_DEM, 0x00bb, /* ad_cv */
msp_init_data[type].ad_cv);
-
+
for (i = 5; i >= 0; i--) /* fir 1 */
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0001,
msp_init_data[type].fir1[i]);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0004); /* fir 2 */
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0040);
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0000);
for (i = 5; i >= 0; i--)
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005,
msp_init_data[type].fir2[i]);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0083, /* MODE_REG */
msp_init_data[type].mode_reg);
-
+
msp3400c_setcarrier(client, msp_init_data[type].cdo1,
msp_init_data[type].cdo2);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0056, 0); /*LOAD_REG_1/2*/
if (dolby) {
@@ -566,7 +566,7 @@ static void msp3400c_set_audmode(struct i2c_client *client, int audmode)
switch (audmode) {
case V4L2_TUNER_MODE_STEREO:
src = 0x0020 | nicam;
-#if 0
+#if 0
/* spatial effect */
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0005,0x4000);
#endif
@@ -741,7 +741,7 @@ autodetect_stereo(struct i2c_client *client)
static int msp34xx_sleep(struct msp3400c *msp, int timeout)
{
DECLARE_WAITQUEUE(wait, current);
-
+
add_wait_queue(&msp->wq, &wait);
if (!kthread_should_stop()) {
if (timeout < 0) {
@@ -780,7 +780,7 @@ static int msp3400c_thread(void *data)
struct msp3400c *msp = i2c_get_clientdata(client);
struct CARRIER_DETECT *cd;
int count, max1,max2,val1,val2, val,this;
-
+
printk("msp3400: kthread started\n");
for (;;) {
d2printk("msp3400: thread: sleep\n");
@@ -834,7 +834,7 @@ static int msp3400c_thread(void *data)
val1 = val, max1 = this;
dprintk("msp3400: carrier1 val: %5d / %s\n", val,cd[this].name);
}
-
+
/* carrier detect pass #2 -- second (stereo) carrier */
switch (max1) {
case 1: /* 5.5 */
@@ -851,7 +851,7 @@ static int msp3400c_thread(void *data)
cd = NULL; count = 0;
break;
}
-
+
if (amsound && (msp->norm == VIDEO_MODE_SECAM)) {
/* autodetect doesn't work well with AM ... */
cd = NULL; count = 0; max2 = 0;
@@ -988,7 +988,7 @@ static struct MODES {
{ -1, 0, 0, NULL }, /* EOF */
};
-static inline const char *msp34xx_standard_mode_name(int mode)
+static inline const char *msp34xx_standard_mode_name(int mode)
{
int i;
for (i = 0; modelist[i].name != NULL; i++)
@@ -1004,9 +1004,9 @@ static int msp34xx_modus(int norm)
return 0x1003;
case VIDEO_MODE_NTSC: /* BTSC */
return 0x2003;
- case VIDEO_MODE_SECAM:
+ case VIDEO_MODE_SECAM:
return 0x0003;
- case VIDEO_MODE_RADIO:
+ case VIDEO_MODE_RADIO:
return 0x0003;
case VIDEO_MODE_AUTO:
return 0x2003;
@@ -1022,7 +1022,7 @@ static int msp34xx_standard(int norm)
return 1;
case VIDEO_MODE_NTSC: /* BTSC */
return 0x0020;
- case VIDEO_MODE_SECAM:
+ case VIDEO_MODE_SECAM:
return 1;
case VIDEO_MODE_RADIO:
return 0x0040;
@@ -1030,13 +1030,13 @@ static int msp34xx_standard(int norm)
return 1;
}
}
-
+
static int msp3410d_thread(void *data)
{
struct i2c_client *client = data;
struct msp3400c *msp = i2c_get_clientdata(client);
int mode,val,i,std;
-
+
printk("msp3410: daemon started\n");
for (;;) {
d2printk(KERN_DEBUG "msp3410: thread: sleep\n");
@@ -1128,7 +1128,7 @@ static int msp3410d_thread(void *data)
msp->watch_stereo = 1;
msp3400c_set_audmode(client,V4L2_TUNER_MODE_STEREO);
break;
- case 0x0009:
+ case 0x0009:
msp->mode = MSP_MODE_AM_NICAM;
msp->rxsubchans = V4L2_TUNER_SUB_MONO;
msp->nicam_on = 1;
@@ -1205,7 +1205,7 @@ static int msp3410d_thread(void *data)
static void msp34xxg_set_source(struct i2c_client *client, int source);
-/* (re-)initialize the msp34xxg, according to the current norm in msp->norm
+/* (re-)initialize the msp34xxg, according to the current norm in msp->norm
* return 0 if it worked, -1 if it failed
*/
static int msp34xxg_init(struct i2c_client *client)
@@ -1227,9 +1227,9 @@ static int msp34xxg_init(struct i2c_client *client)
modus = msp34xx_modus(msp->norm);
modus &= ~0x03; /* STATUS_CHANGE=0 */
modus |= 0x01; /* AUTOMATIC_SOUND_DETECTION=1 */
- if (msp3400c_write(client,
- I2C_MSP3400C_DEM,
- 0x30/*MODUS*/,
+ if (msp3400c_write(client,
+ I2C_MSP3400C_DEM,
+ 0x30/*MODUS*/,
modus))
return -1;
@@ -1260,7 +1260,7 @@ static int msp34xxg_thread(void *data)
struct i2c_client *client = data;
struct msp3400c *msp = i2c_get_clientdata(client);
int val, std, i;
-
+
printk("msp34xxg: daemon started\n");
for (;;) {
d2printk(KERN_DEBUG "msp34xxg: thread: sleep\n");
@@ -1304,11 +1304,11 @@ static int msp34xxg_thread(void *data)
/* unmute: dispatch sound to scart output, set scart volume */
dprintk("msp34xxg: unmute\n");
-
+
msp3400c_setbass(client, msp->bass);
msp3400c_settreble(client, msp->treble);
msp3400c_setvolume(client, msp->muted, msp->volume, msp->balance);
-
+
/* restore ACB */
if (msp3400c_write(client,
I2C_MSP3400C_DFP,
@@ -1320,7 +1320,7 @@ static int msp34xxg_thread(void *data)
return 0;
}
-/* set the same 'source' for the loudspeaker, scart and quasi-peak detector
+/* set the same 'source' for the loudspeaker, scart and quasi-peak detector
* the value for source is the same as bit 15:8 of DFP registers 0x08,
* 0x0a and 0x0c: 0=mono, 1=stereo or A|B, 2=SCART, 3=stereo or A, 4=stereo or B
*
@@ -1331,25 +1331,25 @@ static void msp34xxg_set_source(struct i2c_client *client, int source)
struct msp3400c *msp = i2c_get_clientdata(client);
/* fix matrix mode to stereo and let the msp choose what
- * to output according to 'source', as recommended
+ * to output according to 'source', as recommended
*/
- int value = (source&0x07)<<8|(source==0 ? 0x00:0x20);
+ int value = (source&0x07)<<8|(source==0 ? 0x00:0x20);
dprintk("msp34xxg: set source to %d (0x%x)\n", source, value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x08, /* Loudspeaker Output */
value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x0a, /* SCART1 DA Output */
value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x0c, /* Quasi-peak detector */
value);
- /*
- * set identification threshold. Personally, I
- * I set it to a higher value that the default
+ /*
+ * set identification threshold. Personally, I
+ * I set it to a higher value that the default
* of 0x190 to ignore noisy stereo signals.
* this needs tuning. (recommended range 0x00a0-0x03c0)
* 0x7f0 = forced mono mode
@@ -1365,8 +1365,8 @@ static void msp34xxg_detect_stereo(struct i2c_client *client)
{
struct msp3400c *msp = i2c_get_clientdata(client);
- int status = msp3400c_read(client,
- I2C_MSP3400C_DEM,
+ int status = msp3400c_read(client,
+ I2C_MSP3400C_DEM,
0x0200 /* STATUS */);
int is_bilingual = status&0x100;
int is_stereo = status&0x40;
@@ -1385,7 +1385,7 @@ static void msp34xxg_detect_stereo(struct i2c_client *client)
* this is a problem, I'll handle SAP just like lang1/lang2.
*/
}
- dprintk("msp34xxg: status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n",
+ dprintk("msp34xxg: status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n",
status, is_stereo, is_bilingual, msp->rxsubchans);
}
@@ -1441,7 +1441,7 @@ static struct i2c_driver driver = {
},
};
-static struct i2c_client client_template =
+static struct i2c_client client_template =
{
I2C_DEVNAME("(unset)"),
.flags = I2C_CLIENT_ALLOW_USE,
@@ -1461,7 +1461,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
dprintk("msp3400: 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));
@@ -1469,7 +1469,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
kfree(c);
return -ENOMEM;
}
-
+
memset(msp,0,sizeof(struct msp3400c));
msp->volume = 58880; /* 0db gain */
msp->balance = 32768;
@@ -1487,7 +1487,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
dprintk("msp3400: no chip found\n");
return -1;
}
-
+
msp->rev1 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1e);
if (-1 != msp->rev1)
msp->rev2 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1f);
@@ -1771,7 +1771,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
case VIDIOCSCHAN:
{
struct video_channel *vc = arg;
-
+
dprintk(KERN_DEBUG "msp34xx: VIDIOCSCHAN (norm=%d)\n",vc->norm);
msp->norm = vc->norm;
msp_wake_thread(client);
diff --git a/linux/drivers/media/video/msp3400-old.c b/linux/drivers/media/video/msp3400-old.c
index c0f090a91..2703b2c3d 100644
--- a/linux/drivers/media/video/msp3400-old.c
+++ b/linux/drivers/media/video/msp3400-old.c
@@ -80,7 +80,7 @@ static int stereo_threshold = 0x190; /* a2 threshold for stereo/bilingual
struct msp3400c {
int rev1,rev2;
-
+
int opmode;
int mode;
int norm;
@@ -178,14 +178,14 @@ static int msp3400c_reset(struct i2c_client *client)
{ client->addr, 0, 3, write },
{ client->addr, I2C_M_RD, 2, read },
};
-
+
if ( (1 != i2c_transfer(client->adapter,&reset[0],1)) ||
(1 != i2c_transfer(client->adapter,&reset[1],1)) ||
(2 != i2c_transfer(client->adapter,test,2)) ) {
printk(KERN_ERR "msp3400: chip reset failed\n");
return -1;
}
- return 0;
+ return 0;
}
static int
@@ -321,15 +321,15 @@ struct CARRIER_DETECT {
static struct CARRIER_DETECT carrier_detect_main[] = {
/* main carrier */
- { MSP_CARRIER(4.5), "4.5 NTSC" },
- { MSP_CARRIER(5.5), "5.5 PAL B/G" },
+ { MSP_CARRIER(4.5), "4.5 NTSC" },
+ { MSP_CARRIER(5.5), "5.5 PAL B/G" },
{ MSP_CARRIER(6.0), "6.0 PAL I" },
{ MSP_CARRIER(6.5), "6.5 PAL D/K + SAT + SECAM" }
};
static struct CARRIER_DETECT carrier_detect_55[] = {
/* PAL B/G */
- { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" },
+ { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" },
{ MSP_CARRIER(5.85), "5.85 PAL B/G NICAM" }
};
@@ -400,7 +400,7 @@ static void msp3400c_setvolume(struct i2c_client *client,
muted ? "on" : "off", volume, balance, val>>8, bal);
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0000, val); /* loudspeaker */
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0006, val); /* headphones */
- msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007,
+ msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007,
muted ? 0x01 : (val | 0x01));
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0001, bal << 8);
}
@@ -425,7 +425,7 @@ static void msp3400c_setmode(struct i2c_client *client, int type)
{
struct msp3400c *msp = i2c_get_clientdata(client);
int i;
-
+
dprintk(KERN_DEBUG "msp3400: setmode: %d\n",type);
msp->mode = type;
msp->audmode = V4L2_TUNER_MODE_MONO;
@@ -433,24 +433,24 @@ static void msp3400c_setmode(struct i2c_client *client, int type)
msp3400c_write(client,I2C_MSP3400C_DEM, 0x00bb, /* ad_cv */
msp_init_data[type].ad_cv);
-
+
for (i = 5; i >= 0; i--) /* fir 1 */
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0001,
msp_init_data[type].fir1[i]);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0004); /* fir 2 */
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0040);
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0000);
for (i = 5; i >= 0; i--)
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005,
msp_init_data[type].fir2[i]);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0083, /* MODE_REG */
msp_init_data[type].mode_reg);
-
+
msp3400c_setcarrier(client, msp_init_data[type].cdo1,
msp_init_data[type].cdo2);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0056, 0); /*LOAD_REG_1/2*/
if (dolby) {
@@ -576,7 +576,7 @@ static void msp3400c_set_audmode(struct i2c_client *client, int audmode)
switch (audmode) {
case V4L2_TUNER_MODE_STEREO:
src = 0x0020 | nicam;
-#if 0
+#if 0
/* spatial effect */
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0005,0x4000);
#endif
@@ -751,7 +751,7 @@ autodetect_stereo(struct i2c_client *client)
static int msp34xx_sleep(struct msp3400c *msp, int timeout)
{
DECLARE_WAITQUEUE(wait, current);
-
+
add_wait_queue(&msp->wq, &wait);
if (!msp->rmmod) {
if (timeout < 0) {
@@ -788,10 +788,10 @@ static int msp3400c_thread(void *data)
{
struct i2c_client *client = data;
struct msp3400c *msp = i2c_get_clientdata(client);
-
+
struct CARRIER_DETECT *cd;
int count, max1,max2,val1,val2, val,this;
-
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61)
lock_kernel();
daemonize();
@@ -821,7 +821,7 @@ static int msp3400c_thread(void *data)
/* some time for the tuner to sync */
if (msp34xx_sleep(msp,200))
goto done;
-
+
restart:
if (VIDEO_MODE_RADIO == msp->norm ||
MSP_MODE_EXTERN == msp->mode) {
@@ -864,7 +864,7 @@ static int msp3400c_thread(void *data)
val1 = val, max1 = this;
dprintk("msp3400: carrier1 val: %5d / %s\n", val,cd[this].name);
}
-
+
/* carrier detect pass #2 -- second (stereo) carrier */
switch (max1) {
case 1: /* 5.5 */
@@ -881,7 +881,7 @@ static int msp3400c_thread(void *data)
cd = NULL; count = 0;
break;
}
-
+
if (amsound && (msp->norm == VIDEO_MODE_SECAM)) {
/* autodetect doesn't work well with AM ... */
cd = NULL; count = 0; max2 = 0;
@@ -983,7 +983,7 @@ static int msp3400c_thread(void *data)
if (debug)
msp3400c_print_mode(msp);
-
+
msp->active = 0;
}
@@ -1024,7 +1024,7 @@ static struct MODES {
{ -1, 0, 0, NULL }, /* EOF */
};
-static inline const char *msp34xx_standard_mode_name(int mode)
+static inline const char *msp34xx_standard_mode_name(int mode)
{
int i;
for (i = 0; modelist[i].name != NULL; i++)
@@ -1040,9 +1040,9 @@ static int msp34xx_modus(int norm)
return 0x1003;
case VIDEO_MODE_NTSC: /* BTSC */
return 0x2003;
- case VIDEO_MODE_SECAM:
+ case VIDEO_MODE_SECAM:
return 0x0003;
- case VIDEO_MODE_RADIO:
+ case VIDEO_MODE_RADIO:
return 0x0003;
case VIDEO_MODE_AUTO:
return 0x2003;
@@ -1058,7 +1058,7 @@ static int msp34xx_standard(int norm)
return 1;
case VIDEO_MODE_NTSC: /* BTSC */
return 0x0020;
- case VIDEO_MODE_SECAM:
+ case VIDEO_MODE_SECAM:
return 1;
case VIDEO_MODE_RADIO:
return 0x0040;
@@ -1066,13 +1066,13 @@ static int msp34xx_standard(int norm)
return 1;
}
}
-
+
static int msp3410d_thread(void *data)
{
struct i2c_client *client = data;
struct msp3400c *msp = i2c_get_clientdata(client);
int mode,val,i,std;
-
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61)
lock_kernel();
daemonize();
@@ -1098,7 +1098,7 @@ static int msp3410d_thread(void *data)
msp->active = 0;
continue;
}
-
+
/* some time for the tuner to sync */
if (msp34xx_sleep(msp,200))
goto done;
@@ -1183,7 +1183,7 @@ static int msp3410d_thread(void *data)
msp->watch_stereo = 1;
msp3400c_set_audmode(client,V4L2_TUNER_MODE_STEREO);
break;
- case 0x0009:
+ case 0x0009:
msp->mode = MSP_MODE_AM_NICAM;
msp->rxsubchans = V4L2_TUNER_SUB_MONO;
msp->nicam_on = 1;
@@ -1262,7 +1262,7 @@ done:
static void msp34xxg_set_source(struct i2c_client *client, int source);
-/* (re-)initialize the msp34xxg, according to the current norm in msp->norm
+/* (re-)initialize the msp34xxg, according to the current norm in msp->norm
* return 0 if it worked, -1 if it failed
*/
static int msp34xxg_reset(struct i2c_client *client)
@@ -1286,9 +1286,9 @@ static int msp34xxg_reset(struct i2c_client *client)
modus = msp34xx_modus(msp->norm);
modus &= ~0x03; /* STATUS_CHANGE=0 */
modus |= 0x01; /* AUTOMATIC_SOUND_DETECTION=1 */
- if (msp3400c_write(client,
- I2C_MSP3400C_DEM,
- 0x30/*MODUS*/,
+ if (msp3400c_write(client,
+ I2C_MSP3400C_DEM,
+ 0x30/*MODUS*/,
modus))
return -1;
@@ -1315,7 +1315,7 @@ static int msp34xxg_reset(struct i2c_client *client)
if (std == 0x01) {
- dprintk("msp34xxg: triggered autodetect, waiting for result\n");
+ dprintk("msp34xxg: triggered autodetect, waiting for result\n");
/* triggered autodetect */
for (i = 0; i < 10; i++) {
@@ -1337,7 +1337,7 @@ static int msp34xxg_reset(struct i2c_client *client)
dprintk("msp34xxg: detection still in progress after 10 tries. giving up.\n");
return -1;
}
- }
+ }
dprintk("msp34xxg: current mode: %s (0x%04x)\n",
msp34xx_standard_mode_name(std), std);
@@ -1358,7 +1358,7 @@ static int msp34xxg_reset(struct i2c_client *client)
return 0;
}
-/* set the same 'source' for the loudspeaker, scart and quasi-peak detector
+/* set the same 'source' for the loudspeaker, scart and quasi-peak detector
* the value for source is the same as bit 15:8 of DFP registers 0x08,
* 0x0a and 0x0c: 0=mono, 1=stereo or A|B, 2=SCART, 3=stereo or A, 4=stereo or B
*
@@ -1369,25 +1369,25 @@ static void msp34xxg_set_source(struct i2c_client *client, int source)
struct msp3400c *msp = i2c_get_clientdata(client);
/* fix matrix mode to stereo and let the msp choose what
- * to output according to 'source', as recommended
+ * to output according to 'source', as recommended
*/
- int value = (source&0x07)<<8|(source==0 ? 0x00:0x20);
+ int value = (source&0x07)<<8|(source==0 ? 0x00:0x20);
dprintk("msp34xxg: set source to %d (0x%x)\n", source, value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x08, /* Loudspeaker Output */
value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x0a, /* SCART1 DA Output */
value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x0c, /* Quasi-peak detector */
value);
- /*
- * set identification threshold. Personally, I
- * I set it to a higher value that the default
+ /*
+ * set identification threshold. Personally, I
+ * I set it to a higher value that the default
* of 0x190 to ignore noisy stereo signals.
* this needs tuning. (recommended range 0x00a0-0x03c0)
* 0x7f0 = forced mono mode
@@ -1403,8 +1403,8 @@ static void msp34xxg_detect_stereo(struct i2c_client *client)
{
struct msp3400c *msp = i2c_get_clientdata(client);
- int status = msp3400c_read(client,
- I2C_MSP3400C_DEM,
+ int status = msp3400c_read(client,
+ I2C_MSP3400C_DEM,
0x0200 /* STATUS */);
int is_bilingual = status&0x100;
int is_stereo = status&0x40;
@@ -1423,7 +1423,7 @@ static void msp34xxg_detect_stereo(struct i2c_client *client)
* this is a problem, I'll handle SAP just like lang1/lang2.
*/
}
- dprintk("msp34xxg: status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n",
+ dprintk("msp34xxg: status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n",
status, is_stereo, is_bilingual, msp->rxsubchans);
}
@@ -1479,7 +1479,7 @@ static struct i2c_driver driver = {
.command = msp_command,
};
-static struct i2c_client client_template =
+static struct i2c_client client_template =
{
I2C_DEVNAME("(unset)"),
.flags = I2C_CLIENT_ALLOW_USE,
@@ -1504,7 +1504,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr,
dprintk("msp3400: 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));
@@ -1512,7 +1512,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr,
kfree(c);
return -ENOMEM;
}
-
+
memset(msp,0,sizeof(struct msp3400c));
msp->volume = 58880; /* 0db gain */
msp->balance = 32768;
@@ -1530,7 +1530,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr,
dprintk("msp3400: no chip found\n");
return -1;
}
-
+
msp->rev1 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1e);
if (-1 != msp->rev1)
msp->rev2 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1f);
@@ -1863,7 +1863,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
case VIDIOCSCHAN:
{
struct video_channel *vc = arg;
-
+
dprintk(KERN_DEBUG "msp34xx: VIDIOCSCHAN (norm=%d)\n",vc->norm);
msp->norm = vc->norm;
msp_any_rescan(client);
diff --git a/linux/drivers/media/video/msp3400.c b/linux/drivers/media/video/msp3400.c
index 2527681bc..3e59e05e7 100644
--- a/linux/drivers/media/video/msp3400.c
+++ b/linux/drivers/media/video/msp3400.c
@@ -76,7 +76,7 @@ static int stereo_threshold = 0x190; /* a2 threshold for stereo/bilingual
struct msp3400c {
int rev1,rev2;
-
+
int opmode;
int mode;
int norm;
@@ -168,14 +168,14 @@ static int msp3400c_reset(struct i2c_client *client)
{ client->addr, 0, 3, write },
{ client->addr, I2C_M_RD, 2, read },
};
-
+
if ( (1 != i2c_transfer(client->adapter,&reset[0],1)) ||
(1 != i2c_transfer(client->adapter,&reset[1],1)) ||
(2 != i2c_transfer(client->adapter,test,2)) ) {
printk(KERN_ERR "msp3400: chip reset failed\n");
return -1;
}
- return 0;
+ return 0;
}
static int
@@ -311,15 +311,15 @@ struct CARRIER_DETECT {
static struct CARRIER_DETECT carrier_detect_main[] = {
/* main carrier */
- { MSP_CARRIER(4.5), "4.5 NTSC" },
- { MSP_CARRIER(5.5), "5.5 PAL B/G" },
+ { MSP_CARRIER(4.5), "4.5 NTSC" },
+ { MSP_CARRIER(5.5), "5.5 PAL B/G" },
{ MSP_CARRIER(6.0), "6.0 PAL I" },
{ MSP_CARRIER(6.5), "6.5 PAL D/K + SAT + SECAM" }
};
static struct CARRIER_DETECT carrier_detect_55[] = {
/* PAL B/G */
- { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" },
+ { MSP_CARRIER(5.7421875), "5.742 PAL B/G FM-stereo" },
{ MSP_CARRIER(5.85), "5.85 PAL B/G NICAM" }
};
@@ -390,7 +390,7 @@ static void msp3400c_setvolume(struct i2c_client *client,
muted ? "on" : "off", volume, balance, val>>8, bal);
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0000, val); /* loudspeaker */
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0006, val); /* headphones */
- msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007,
+ msp3400c_write(client,I2C_MSP3400C_DFP, 0x0007,
muted ? 0x01 : (val | 0x01));
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0001, bal << 8);
}
@@ -415,7 +415,7 @@ static void msp3400c_setmode(struct i2c_client *client, int type)
{
struct msp3400c *msp = i2c_get_clientdata(client);
int i;
-
+
dprintk(KERN_DEBUG "msp3400: setmode: %d\n",type);
msp->mode = type;
msp->audmode = V4L2_TUNER_MODE_MONO;
@@ -423,24 +423,24 @@ static void msp3400c_setmode(struct i2c_client *client, int type)
msp3400c_write(client,I2C_MSP3400C_DEM, 0x00bb, /* ad_cv */
msp_init_data[type].ad_cv);
-
+
for (i = 5; i >= 0; i--) /* fir 1 */
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0001,
msp_init_data[type].fir1[i]);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0004); /* fir 2 */
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0040);
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005, 0x0000);
for (i = 5; i >= 0; i--)
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0005,
msp_init_data[type].fir2[i]);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0083, /* MODE_REG */
msp_init_data[type].mode_reg);
-
+
msp3400c_setcarrier(client, msp_init_data[type].cdo1,
msp_init_data[type].cdo2);
-
+
msp3400c_write(client,I2C_MSP3400C_DEM, 0x0056, 0); /*LOAD_REG_1/2*/
if (dolby) {
@@ -566,7 +566,7 @@ static void msp3400c_set_audmode(struct i2c_client *client, int audmode)
switch (audmode) {
case V4L2_TUNER_MODE_STEREO:
src = 0x0020 | nicam;
-#if 0
+#if 0
/* spatial effect */
msp3400c_write(client,I2C_MSP3400C_DFP, 0x0005,0x4000);
#endif
@@ -741,7 +741,7 @@ autodetect_stereo(struct i2c_client *client)
static int msp34xx_sleep(struct msp3400c *msp, int timeout)
{
DECLARE_WAITQUEUE(wait, current);
-
+
add_wait_queue(&msp->wq, &wait);
if (!kthread_should_stop()) {
if (timeout < 0) {
@@ -780,7 +780,7 @@ static int msp3400c_thread(void *data)
struct msp3400c *msp = i2c_get_clientdata(client);
struct CARRIER_DETECT *cd;
int count, max1,max2,val1,val2, val,this;
-
+
printk("msp3400: kthread started\n");
for (;;) {
d2printk("msp3400: thread: sleep\n");
@@ -834,7 +834,7 @@ static int msp3400c_thread(void *data)
val1 = val, max1 = this;
dprintk("msp3400: carrier1 val: %5d / %s\n", val,cd[this].name);
}
-
+
/* carrier detect pass #2 -- second (stereo) carrier */
switch (max1) {
case 1: /* 5.5 */
@@ -851,7 +851,7 @@ static int msp3400c_thread(void *data)
cd = NULL; count = 0;
break;
}
-
+
if (amsound && (msp->norm == VIDEO_MODE_SECAM)) {
/* autodetect doesn't work well with AM ... */
cd = NULL; count = 0; max2 = 0;
@@ -988,7 +988,7 @@ static struct MODES {
{ -1, 0, 0, NULL }, /* EOF */
};
-static inline const char *msp34xx_standard_mode_name(int mode)
+static inline const char *msp34xx_standard_mode_name(int mode)
{
int i;
for (i = 0; modelist[i].name != NULL; i++)
@@ -1004,9 +1004,9 @@ static int msp34xx_modus(int norm)
return 0x1003;
case VIDEO_MODE_NTSC: /* BTSC */
return 0x2003;
- case VIDEO_MODE_SECAM:
+ case VIDEO_MODE_SECAM:
return 0x0003;
- case VIDEO_MODE_RADIO:
+ case VIDEO_MODE_RADIO:
return 0x0003;
case VIDEO_MODE_AUTO:
return 0x2003;
@@ -1022,7 +1022,7 @@ static int msp34xx_standard(int norm)
return 1;
case VIDEO_MODE_NTSC: /* BTSC */
return 0x0020;
- case VIDEO_MODE_SECAM:
+ case VIDEO_MODE_SECAM:
return 1;
case VIDEO_MODE_RADIO:
return 0x0040;
@@ -1030,13 +1030,13 @@ static int msp34xx_standard(int norm)
return 1;
}
}
-
+
static int msp3410d_thread(void *data)
{
struct i2c_client *client = data;
struct msp3400c *msp = i2c_get_clientdata(client);
int mode,val,i,std;
-
+
printk("msp3410: daemon started\n");
for (;;) {
d2printk(KERN_DEBUG "msp3410: thread: sleep\n");
@@ -1128,7 +1128,7 @@ static int msp3410d_thread(void *data)
msp->watch_stereo = 1;
msp3400c_set_audmode(client,V4L2_TUNER_MODE_STEREO);
break;
- case 0x0009:
+ case 0x0009:
msp->mode = MSP_MODE_AM_NICAM;
msp->rxsubchans = V4L2_TUNER_SUB_MONO;
msp->nicam_on = 1;
@@ -1205,7 +1205,7 @@ static int msp3410d_thread(void *data)
static void msp34xxg_set_source(struct i2c_client *client, int source);
-/* (re-)initialize the msp34xxg, according to the current norm in msp->norm
+/* (re-)initialize the msp34xxg, according to the current norm in msp->norm
* return 0 if it worked, -1 if it failed
*/
static int msp34xxg_init(struct i2c_client *client)
@@ -1227,9 +1227,9 @@ static int msp34xxg_init(struct i2c_client *client)
modus = msp34xx_modus(msp->norm);
modus &= ~0x03; /* STATUS_CHANGE=0 */
modus |= 0x01; /* AUTOMATIC_SOUND_DETECTION=1 */
- if (msp3400c_write(client,
- I2C_MSP3400C_DEM,
- 0x30/*MODUS*/,
+ if (msp3400c_write(client,
+ I2C_MSP3400C_DEM,
+ 0x30/*MODUS*/,
modus))
return -1;
@@ -1260,7 +1260,7 @@ static int msp34xxg_thread(void *data)
struct i2c_client *client = data;
struct msp3400c *msp = i2c_get_clientdata(client);
int val, std, i;
-
+
printk("msp34xxg: daemon started\n");
for (;;) {
d2printk(KERN_DEBUG "msp34xxg: thread: sleep\n");
@@ -1304,11 +1304,11 @@ static int msp34xxg_thread(void *data)
/* unmute: dispatch sound to scart output, set scart volume */
dprintk("msp34xxg: unmute\n");
-
+
msp3400c_setbass(client, msp->bass);
msp3400c_settreble(client, msp->treble);
msp3400c_setvolume(client, msp->muted, msp->volume, msp->balance);
-
+
/* restore ACB */
if (msp3400c_write(client,
I2C_MSP3400C_DFP,
@@ -1320,7 +1320,7 @@ static int msp34xxg_thread(void *data)
return 0;
}
-/* set the same 'source' for the loudspeaker, scart and quasi-peak detector
+/* set the same 'source' for the loudspeaker, scart and quasi-peak detector
* the value for source is the same as bit 15:8 of DFP registers 0x08,
* 0x0a and 0x0c: 0=mono, 1=stereo or A|B, 2=SCART, 3=stereo or A, 4=stereo or B
*
@@ -1331,25 +1331,25 @@ static void msp34xxg_set_source(struct i2c_client *client, int source)
struct msp3400c *msp = i2c_get_clientdata(client);
/* fix matrix mode to stereo and let the msp choose what
- * to output according to 'source', as recommended
+ * to output according to 'source', as recommended
*/
- int value = (source&0x07)<<8|(source==0 ? 0x00:0x20);
+ int value = (source&0x07)<<8|(source==0 ? 0x00:0x20);
dprintk("msp34xxg: set source to %d (0x%x)\n", source, value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x08, /* Loudspeaker Output */
value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x0a, /* SCART1 DA Output */
value);
- msp3400c_write(client,
+ msp3400c_write(client,
I2C_MSP3400C_DFP,
0x0c, /* Quasi-peak detector */
value);
- /*
- * set identification threshold. Personally, I
- * I set it to a higher value that the default
+ /*
+ * set identification threshold. Personally, I
+ * I set it to a higher value that the default
* of 0x190 to ignore noisy stereo signals.
* this needs tuning. (recommended range 0x00a0-0x03c0)
* 0x7f0 = forced mono mode
@@ -1365,8 +1365,8 @@ static void msp34xxg_detect_stereo(struct i2c_client *client)
{
struct msp3400c *msp = i2c_get_clientdata(client);
- int status = msp3400c_read(client,
- I2C_MSP3400C_DEM,
+ int status = msp3400c_read(client,
+ I2C_MSP3400C_DEM,
0x0200 /* STATUS */);
int is_bilingual = status&0x100;
int is_stereo = status&0x40;
@@ -1385,7 +1385,7 @@ static void msp34xxg_detect_stereo(struct i2c_client *client)
* this is a problem, I'll handle SAP just like lang1/lang2.
*/
}
- dprintk("msp34xxg: status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n",
+ dprintk("msp34xxg: status=0x%x, stereo=%d, bilingual=%d -> rxsubchans=%d\n",
status, is_stereo, is_bilingual, msp->rxsubchans);
}
@@ -1441,7 +1441,7 @@ static struct i2c_driver driver = {
},
};
-static struct i2c_client client_template =
+static struct i2c_client client_template =
{
I2C_DEVNAME("(unset)"),
.flags = I2C_CLIENT_ALLOW_USE,
@@ -1461,7 +1461,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
dprintk("msp3400: 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));
@@ -1469,7 +1469,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
kfree(c);
return -ENOMEM;
}
-
+
memset(msp,0,sizeof(struct msp3400c));
msp->volume = 58880; /* 0db gain */
msp->balance = 32768;
@@ -1487,7 +1487,7 @@ static int msp_attach(struct i2c_adapter *adap, int addr, int kind)
dprintk("msp3400: no chip found\n");
return -1;
}
-
+
msp->rev1 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1e);
if (-1 != msp->rev1)
msp->rev2 = msp3400c_read(c, I2C_MSP3400C_DFP, 0x1f);
@@ -1771,7 +1771,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg)
case VIDIOCSCHAN:
{
struct video_channel *vc = arg;
-
+
dprintk(KERN_DEBUG "msp34xx: VIDIOCSCHAN (norm=%d)\n",vc->norm);
msp->norm = vc->norm;
msp_wake_thread(client);
diff --git a/linux/drivers/media/video/saa6752hs.c b/linux/drivers/media/video/saa6752hs.c
index bfe47f293..915d418bd 100644
--- a/linux/drivers/media/video/saa6752hs.c
+++ b/linux/drivers/media/video/saa6752hs.c
@@ -43,7 +43,7 @@ enum saa6752hs_command {
SAA6752HS_COMMAND_RECONFIGURE = 4,
SAA6752HS_COMMAND_SLEEP = 5,
SAA6752HS_COMMAND_RECONFIGURE_FORCE = 6,
-
+
SAA6752HS_COMMAND_MAX
};
@@ -53,24 +53,24 @@ enum saa6752hs_command {
static u8 PAT[] = {
0xc2, // i2c register
0x00, // table number for encoder
-
+
0x47, // sync
0x40, 0x00, // transport_error_indicator(0), payload_unit_start(1), transport_priority(0), pid(0)
0x10, // transport_scrambling_control(00), adaptation_field_control(01), continuity_counter(0)
-
+
0x00, // PSI pointer to start of table
-
+
0x00, // tid(0)
0xb0, 0x0d, // section_syntax_indicator(1), section_length(13)
-
+
0x00, 0x01, // transport_stream_id(1)
-
+
0xc1, // version_number(0), current_next_indicator(1)
-
+
0x00, 0x00, // section_number(0), last_section_number(0)
0x00, 0x01, // program_number(1)
-
+
0xe0, 0x10, // PMT PID(0x10)
0x76, 0xf1, 0x44, 0xd1 // CRC32
@@ -79,29 +79,29 @@ static u8 PAT[] = {
static u8 PMT[] = {
0xc2, // i2c register
0x01, // table number for encoder
-
+
0x47, // sync
0x40, 0x10, // transport_error_indicator(0), payload_unit_start(1), transport_priority(0), pid(0x10)
0x10, // transport_scrambling_control(00), adaptation_field_control(01), continuity_counter(0)
-
+
0x00, // PSI pointer to start of table
-
+
0x02, // tid(2)
0xb0, 0x17, // section_syntax_indicator(1), section_length(23)
0x00, 0x01, // program_number(1)
-
+
0xc1, // version_number(0), current_next_indicator(1)
-
+
0x00, 0x00, // section_number(0), last_section_number(0)
-
+
0xe1, 0x04, // PCR_PID (0x104)
-
+
0xf0, 0x00, // program_info_length(0)
-
+
0x02, 0xe1, 0x00, 0xf0, 0x00, // video stream type(2), pid(0x100)
0x04, 0xe1, 0x03, 0xf0, 0x00, // audio stream type(4), pid(0x103)
-
+
0xa1, 0xca, 0x0f, 0x82 // CRC32
};
@@ -113,7 +113,7 @@ static struct mpeg_params mpeg_params_template =
.total_bitrate = 6000,
};
-
+
/* ---------------------------------------------------------------------- */
@@ -129,11 +129,11 @@ static int saa6752hs_chip_command(struct i2c_client* client,
case SAA6752HS_COMMAND_RESET:
buf[0] = 0x00;
break;
-
+
case SAA6752HS_COMMAND_STOP:
buf[0] = 0x03;
break;
-
+
case SAA6752HS_COMMAND_START:
buf[0] = 0x02;
break;
@@ -141,11 +141,11 @@ static int saa6752hs_chip_command(struct i2c_client* client,
case SAA6752HS_COMMAND_PAUSE:
buf[0] = 0x04;
break;
-
+
case SAA6752HS_COMMAND_RECONFIGURE:
buf[0] = 0x05;
break;
-
+
case SAA6752HS_COMMAND_SLEEP:
buf[0] = 0x06;
break;
@@ -153,11 +153,11 @@ static int saa6752hs_chip_command(struct i2c_client* client,
case SAA6752HS_COMMAND_RECONFIGURE_FORCE:
buf[0] = 0x07;
break;
-
+
default:
- return -EINVAL;
+ return -EINVAL;
}
-
+
// set it and wait for it to be so
i2c_master_send(client, buf, 1);
timeout = jiffies + HZ * 3;
@@ -173,14 +173,14 @@ static int saa6752hs_chip_command(struct i2c_client* client,
status = -ETIMEDOUT;
break;
}
-
+
// wait a bit
msleep(10);
}
// delay a bit to let encoder settle
msleep(50);
-
+
// done
return status;
}
@@ -190,12 +190,12 @@ static int saa6752hs_set_bitrate(struct i2c_client* client,
struct mpeg_params* params)
{
u8 buf[3];
-
+
// set the bitrate mode
buf[0] = 0x71;
buf[1] = params->bitrate_mode;
i2c_master_send(client, buf, 2);
-
+
// set the video bitrate
if (params->bitrate_mode == MPEG_BITRATE_MODE_VBR) {
// set the target bitrate
@@ -216,24 +216,24 @@ static int saa6752hs_set_bitrate(struct i2c_client* client,
buf[2] = params->video_target_bitrate & 0xff;
i2c_master_send(client, buf, 3);
}
-
+
// set the audio bitrate
buf[0] = 0x94;
buf[1] = params->audio_bitrate;
i2c_master_send(client, buf, 2);
-
+
// set the total bitrate
buf[0] = 0xb1;
buf[1] = params->total_bitrate >> 8;
buf[2] = params->total_bitrate & 0xff;
i2c_master_send(client, buf, 3);
-
+
return 0;
}
static int saa6752hs_init(struct i2c_client* client, struct mpeg_params* params)
-{
+{
unsigned char buf[3];
void *data;
@@ -251,41 +251,41 @@ static int saa6752hs_init(struct i2c_client* client, struct mpeg_params* params)
return -EINVAL;
if (params->bitrate_mode == MPEG_BITRATE_MODE_MAX &&
params->video_target_bitrate <= params->video_max_bitrate)
- return -EINVAL;
+ return -EINVAL;
}
-
+
// Set GOP structure {3, 13}
buf[0] = 0x72;
buf[1] = 0x03;
buf[2] = 0x0D;
i2c_master_send(client,buf,3);
-
+
// Set minimum Q-scale {4}
buf[0] = 0x82;
buf[1] = 0x04;
i2c_master_send(client,buf,2);
-
+
// Set maximum Q-scale {12}
buf[0] = 0x83;
buf[1] = 0x0C;
i2c_master_send(client,buf,2);
-
+
// Set Output Protocol
buf[0] = 0xD0;
buf[1] = 0x01;
i2c_master_send(client,buf,2);
-
+
// Set video output stream format {TS}
buf[0] = 0xB0;
buf[1] = 0x05;
i2c_master_send(client,buf,2);
-
+
// Set Audio PID {0x103}
buf[0] = 0xC1;
buf[1] = 0x01;
buf[2] = 0x03;
i2c_master_send(client,buf,3);
-
+
// setup bitrate settings
data = i2c_get_clientdata(client);
if (params) {
@@ -295,18 +295,18 @@ static int saa6752hs_init(struct i2c_client* client, struct mpeg_params* params)
// parameters were not supplied. use the previous set
saa6752hs_set_bitrate(client, (struct mpeg_params*) data);
}
-
+
// Send SI tables
i2c_master_send(client,PAT,sizeof(PAT));
i2c_master_send(client,PMT,sizeof(PMT));
-
+
// mute then unmute audio. This removes buzzing artefacts
buf[0] = 0xa4;
buf[1] = 1;
i2c_master_send(client, buf, 2);
buf[1] = 0;
i2c_master_send(client, buf, 2);
-
+
// start it going
saa6752hs_chip_command(client, SAA6752HS_COMMAND_START);
@@ -332,14 +332,14 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr,
return -ENOMEM;
memcpy(client,&client_template,sizeof(struct i2c_client));
strlcpy(client->name, "saa6752hs", sizeof(client->name));
-
+
if (NULL == (params = kmalloc(sizeof(struct mpeg_params), GFP_KERNEL)))
return -ENOMEM;
memcpy(params,&mpeg_params_template,sizeof(struct mpeg_params));
i2c_set_clientdata(client, params);
i2c_attach_client(client);
-
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
#endif
@@ -388,7 +388,7 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* nothing */
break;
}
-
+
return 0;
}
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index bfe47f293..915d418bd 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -43,7 +43,7 @@ enum saa6752hs_command {
SAA6752HS_COMMAND_RECONFIGURE = 4,
SAA6752HS_COMMAND_SLEEP = 5,
SAA6752HS_COMMAND_RECONFIGURE_FORCE = 6,
-
+
SAA6752HS_COMMAND_MAX
};
@@ -53,24 +53,24 @@ enum saa6752hs_command {
static u8 PAT[] = {
0xc2, // i2c register
0x00, // table number for encoder
-
+
0x47, // sync
0x40, 0x00, // transport_error_indicator(0), payload_unit_start(1), transport_priority(0), pid(0)
0x10, // transport_scrambling_control(00), adaptation_field_control(01), continuity_counter(0)
-
+
0x00, // PSI pointer to start of table
-
+
0x00, // tid(0)
0xb0, 0x0d, // section_syntax_indicator(1), section_length(13)
-
+
0x00, 0x01, // transport_stream_id(1)
-
+
0xc1, // version_number(0), current_next_indicator(1)
-
+
0x00, 0x00, // section_number(0), last_section_number(0)
0x00, 0x01, // program_number(1)
-
+
0xe0, 0x10, // PMT PID(0x10)
0x76, 0xf1, 0x44, 0xd1 // CRC32
@@ -79,29 +79,29 @@ static u8 PAT[] = {
static u8 PMT[] = {
0xc2, // i2c register
0x01, // table number for encoder
-
+
0x47, // sync
0x40, 0x10, // transport_error_indicator(0), payload_unit_start(1), transport_priority(0), pid(0x10)
0x10, // transport_scrambling_control(00), adaptation_field_control(01), continuity_counter(0)
-
+
0x00, // PSI pointer to start of table
-
+
0x02, // tid(2)
0xb0, 0x17, // section_syntax_indicator(1), section_length(23)
0x00, 0x01, // program_number(1)
-
+
0xc1, // version_number(0), current_next_indicator(1)
-
+
0x00, 0x00, // section_number(0), last_section_number(0)
-
+
0xe1, 0x04, // PCR_PID (0x104)
-
+
0xf0, 0x00, // program_info_length(0)
-
+
0x02, 0xe1, 0x00, 0xf0, 0x00, // video stream type(2), pid(0x100)
0x04, 0xe1, 0x03, 0xf0, 0x00, // audio stream type(4), pid(0x103)
-
+
0xa1, 0xca, 0x0f, 0x82 // CRC32
};
@@ -113,7 +113,7 @@ static struct mpeg_params mpeg_params_template =
.total_bitrate = 6000,
};
-
+
/* ---------------------------------------------------------------------- */
@@ -129,11 +129,11 @@ static int saa6752hs_chip_command(struct i2c_client* client,
case SAA6752HS_COMMAND_RESET:
buf[0] = 0x00;
break;
-
+
case SAA6752HS_COMMAND_STOP:
buf[0] = 0x03;
break;
-
+
case SAA6752HS_COMMAND_START:
buf[0] = 0x02;
break;
@@ -141,11 +141,11 @@ static int saa6752hs_chip_command(struct i2c_client* client,
case SAA6752HS_COMMAND_PAUSE:
buf[0] = 0x04;
break;
-
+
case SAA6752HS_COMMAND_RECONFIGURE:
buf[0] = 0x05;
break;
-
+
case SAA6752HS_COMMAND_SLEEP:
buf[0] = 0x06;
break;
@@ -153,11 +153,11 @@ static int saa6752hs_chip_command(struct i2c_client* client,
case SAA6752HS_COMMAND_RECONFIGURE_FORCE:
buf[0] = 0x07;
break;
-
+
default:
- return -EINVAL;
+ return -EINVAL;
}
-
+
// set it and wait for it to be so
i2c_master_send(client, buf, 1);
timeout = jiffies + HZ * 3;
@@ -173,14 +173,14 @@ static int saa6752hs_chip_command(struct i2c_client* client,
status = -ETIMEDOUT;
break;
}
-
+
// wait a bit
msleep(10);
}
// delay a bit to let encoder settle
msleep(50);
-
+
// done
return status;
}
@@ -190,12 +190,12 @@ static int saa6752hs_set_bitrate(struct i2c_client* client,
struct mpeg_params* params)
{
u8 buf[3];
-
+
// set the bitrate mode
buf[0] = 0x71;
buf[1] = params->bitrate_mode;
i2c_master_send(client, buf, 2);
-
+
// set the video bitrate
if (params->bitrate_mode == MPEG_BITRATE_MODE_VBR) {
// set the target bitrate
@@ -216,24 +216,24 @@ static int saa6752hs_set_bitrate(struct i2c_client* client,
buf[2] = params->video_target_bitrate & 0xff;
i2c_master_send(client, buf, 3);
}
-
+
// set the audio bitrate
buf[0] = 0x94;
buf[1] = params->audio_bitrate;
i2c_master_send(client, buf, 2);
-
+
// set the total bitrate
buf[0] = 0xb1;
buf[1] = params->total_bitrate >> 8;
buf[2] = params->total_bitrate & 0xff;
i2c_master_send(client, buf, 3);
-
+
return 0;
}
static int saa6752hs_init(struct i2c_client* client, struct mpeg_params* params)
-{
+{
unsigned char buf[3];
void *data;
@@ -251,41 +251,41 @@ static int saa6752hs_init(struct i2c_client* client, struct mpeg_params* params)
return -EINVAL;
if (params->bitrate_mode == MPEG_BITRATE_MODE_MAX &&
params->video_target_bitrate <= params->video_max_bitrate)
- return -EINVAL;
+ return -EINVAL;
}
-
+
// Set GOP structure {3, 13}
buf[0] = 0x72;
buf[1] = 0x03;
buf[2] = 0x0D;
i2c_master_send(client,buf,3);
-
+
// Set minimum Q-scale {4}
buf[0] = 0x82;
buf[1] = 0x04;
i2c_master_send(client,buf,2);
-
+
// Set maximum Q-scale {12}
buf[0] = 0x83;
buf[1] = 0x0C;
i2c_master_send(client,buf,2);
-
+
// Set Output Protocol
buf[0] = 0xD0;
buf[1] = 0x01;
i2c_master_send(client,buf,2);
-
+
// Set video output stream format {TS}
buf[0] = 0xB0;
buf[1] = 0x05;
i2c_master_send(client,buf,2);
-
+
// Set Audio PID {0x103}
buf[0] = 0xC1;
buf[1] = 0x01;
buf[2] = 0x03;
i2c_master_send(client,buf,3);
-
+
// setup bitrate settings
data = i2c_get_clientdata(client);
if (params) {
@@ -295,18 +295,18 @@ static int saa6752hs_init(struct i2c_client* client, struct mpeg_params* params)
// parameters were not supplied. use the previous set
saa6752hs_set_bitrate(client, (struct mpeg_params*) data);
}
-
+
// Send SI tables
i2c_master_send(client,PAT,sizeof(PAT));
i2c_master_send(client,PMT,sizeof(PMT));
-
+
// mute then unmute audio. This removes buzzing artefacts
buf[0] = 0xa4;
buf[1] = 1;
i2c_master_send(client, buf, 2);
buf[1] = 0;
i2c_master_send(client, buf, 2);
-
+
// start it going
saa6752hs_chip_command(client, SAA6752HS_COMMAND_START);
@@ -332,14 +332,14 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr,
return -ENOMEM;
memcpy(client,&client_template,sizeof(struct i2c_client));
strlcpy(client->name, "saa6752hs", sizeof(client->name));
-
+
if (NULL == (params = kmalloc(sizeof(struct mpeg_params), GFP_KERNEL)))
return -ENOMEM;
memcpy(params,&mpeg_params_template,sizeof(struct mpeg_params));
i2c_set_clientdata(client, params);
i2c_attach_client(client);
-
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
#endif
@@ -388,7 +388,7 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg)
/* nothing */
break;
}
-
+
return 0;
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index b68ef8236..bddf64d4a 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.28 2004/10/12 17:08:43 kraxel Exp $
+ * $Id: saa7134-cards.c,v 1.29 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
@@ -838,7 +838,7 @@ struct saa7134_board saa7134_boards[] = {
.name = name_svideo,
.vmux = 8,
.amux = LINE1,
- },{
+ },{
.name = name_comp1,
.vmux = 1,
.amux = LINE1,
@@ -1420,14 +1420,14 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x153B,
.subdevice = 0x1152,
.driver_data = SAA7134_BOARD_CINERGY200,
-
+
},{
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7130,
.subvendor = 0x185b,
.subdevice = 0xc100,
.driver_data = SAA7134_BOARD_VIDEOMATE_TV_PVR,
-
+
},{
/* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS,
@@ -1442,7 +1442,7 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subdevice = 0,
.driver_data = SAA7134_BOARD_NOAUTO,
},{
-
+
/* --- default catch --- */
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7130,
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 4aa0a441c..7f5b65776 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.11 2004/10/12 17:08:43 kraxel Exp $
+ * $Id: saa7134-core.c,v 1.12 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* driver core
@@ -246,7 +246,7 @@ int saa7134_buffer_pages(int size)
int saa7134_buffer_count(unsigned int size, unsigned int count)
{
unsigned int maxcount;
-
+
maxcount = 1024 / saa7134_buffer_pages(size);
if (count > maxcount)
count = maxcount;
@@ -273,7 +273,7 @@ int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt)
{
u32 *cpu;
dma_addr_t dma_addr;
-
+
cpu = pci_alloc_consistent(pci, SAA7134_PGTABLE_SIZE, &dma_addr);
if (NULL == cpu)
return -ENOMEM;
@@ -330,7 +330,7 @@ int saa7134_buffer_queue(struct saa7134_dev *dev,
#ifdef DEBUG_SPINLOCKS
BUG_ON(!spin_is_locked(&dev->slock));
#endif
-
+
dprintk("buffer_queue %p\n",buf);
if (NULL == q->curr) {
if (!q->need_two) {
@@ -360,7 +360,7 @@ void saa7134_buffer_finish(struct saa7134_dev *dev,
BUG_ON(!spin_is_locked(&dev->slock));
#endif
dprintk("buffer_finish %p\n",q->curr);
-
+
/* finish current buffer */
q->curr->vb.state = state;
do_gettimeofday(&q->curr->vb.ts);
@@ -483,7 +483,7 @@ int saa7134_set_dmabits(struct saa7134_dev *dev)
SAA7134_IRQ1_INTE_RA2_1 |
SAA7134_IRQ1_INTE_RA2_0;
}
-
+
/* set task conditions + field handling */
if (V4L2_FIELD_HAS_BOTH(cap) || V4L2_FIELD_HAS_BOTH(ov) || cap == ov) {
/* default config -- use full frames */
@@ -507,7 +507,7 @@ int saa7134_set_dmabits(struct saa7134_dev *dev)
saa_writeb(SAA7134_FIELD_HANDLING(TASK_B), 0x01);
split = 1;
}
-
+
/* irqs */
saa_writeb(SAA7134_REGION_ENABLE, task);
saa_writel(SAA7134_IRQ1, irq);
@@ -541,7 +541,7 @@ static void print_irqstatus(struct saa7134_dev *dev, int loop,
unsigned long report, unsigned long status)
{
unsigned int i;
-
+
printk(KERN_DEBUG "%s/irq[%d,%ld]: r=0x%lx s=0x%02lx",
dev->name,loop,jiffies,report,status);
for (i = 0; i < IRQBITS; i++) {
@@ -654,11 +654,11 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
saa7134_oss_init1(dev);
break;
}
-
+
/* RAM FIFO config */
saa_writel(SAA7134_FIFO_SIZE, 0x08070503);
saa_writel(SAA7134_THRESHOULD,0x02020202);
-
+
/* enable audio + video processing */
saa_writel(SAA7134_MAIN_CTRL,
SAA7134_MAIN_CTRL_VPLLE |
@@ -675,7 +675,7 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
/* set vertical line numbering start (vbi needs this) */
saa_writeb(SAA7134_SOURCE_TIMING2, 0x20);
-
+
return 0;
}
@@ -760,7 +760,7 @@ static struct video_device *vdev_init(struct saa7134_dev *dev,
char *type)
{
struct video_device *vfd;
-
+
vfd = video_device_alloc();
if (NULL == vfd)
return NULL;
@@ -917,7 +917,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
/* wait a bit, register i2c bus */
msleep(100);
saa7134_i2c_register(dev);
-
+
/* initialize hardware #2 */
saa7134_board_init2(dev);
saa7134_hwinit2(dev);
@@ -958,7 +958,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
printk(KERN_INFO "%s: registered device video%d [mpeg]\n",
dev->name,dev->ts_dev->minor & 0x1f);
}
-
+
dev->vbi_dev = vdev_init(dev,&saa7134_vbi_template,"vbi");
err = video_register_device(dev->vbi_dev,VFL_TYPE_VBI,
vbi_nr[saa7134_devcount]);
@@ -991,7 +991,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
}
printk(KERN_INFO "%s: registered device dsp%d\n",
dev->name,dev->oss.minor_dsp >> 4);
-
+
err = dev->oss.minor_mixer =
register_sound_mixer(&saa7134_mixer_fops,
mixer_nr[saa7134_devcount]);
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c
index 7a7ed31ee..bcba52ba0 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.5 2004/10/06 17:30:51 kraxel Exp $
+ * $Id: saa7134-i2c.c,v 1.6 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* i2c interface support
@@ -88,7 +88,7 @@ enum i2c_attr {
static inline enum i2c_status i2c_get_status(struct saa7134_dev *dev)
{
enum i2c_status status;
-
+
status = saa_readb(SAA7134_I2C_ATTR_STATUS) & 0x0f;
d2printk(KERN_DEBUG "%s: i2c stat <= %s\n",dev->name,
str_i2c_status[status]);
@@ -184,7 +184,7 @@ static int i2c_reset(struct saa7134_dev *dev)
if (!i2c_is_idle(status))
return FALSE;
-
+
i2c_set_attr(dev,NOP);
return TRUE;
}
@@ -210,7 +210,7 @@ static inline int i2c_send_byte(struct saa7134_dev *dev,
saa_writel(SAA7134_I2C_ATTR_STATUS >> 2, dword);
#endif
d2printk(KERN_DEBUG "%s: i2c data => 0x%x\n",dev->name,data);
-
+
if (!i2c_is_busy_wait(dev))
return -EIO;
status = i2c_get_status(dev);
@@ -223,7 +223,7 @@ static inline int i2c_recv_byte(struct saa7134_dev *dev)
{
enum i2c_status status;
unsigned char data;
-
+
i2c_set_attr(dev,CONTINUE);
if (!i2c_is_busy_wait(dev))
return -EIO;
@@ -302,7 +302,7 @@ static int saa7134_i2c_xfer(struct i2c_adapter *i2c_adap,
/* ----------------------------------------------------------- */
-static int algo_control(struct i2c_adapter *adapter,
+static int algo_control(struct i2c_adapter *adapter,
unsigned int cmd, unsigned long arg)
{
return 0;
@@ -433,10 +433,10 @@ int saa7134_i2c_register(struct saa7134_dev *dev)
strcpy(dev->i2c_adap.name,dev->name);
dev->i2c_adap.algo_data = dev;
i2c_add_adapter(&dev->i2c_adap);
-
+
dev->i2c_client = saa7134_client_template;
dev->i2c_client.adapter = &dev->i2c_adap;
-
+
saa7134_i2c_eeprom(dev,dev->eedata,sizeof(dev->eedata));
if (i2c_scan)
do_i2c_scan(dev->name,&dev->i2c_client);
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index 65068ae94..ff0582136 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.9 2004/09/15 16:15:24 kraxel Exp $
+ * $Id: saa7134-input.c,v 1.10 2004/10/13 10:39:00 kraxel Exp $
*
* handle saa7134 IR remotes via linux kernel input layer.
*
@@ -63,7 +63,7 @@ static IR_KEYTAB_TYPE flyvideo_codes[IR_KEYTAB_SIZE] = {
[ 20 ] = KEY_VOLUMEUP,
[ 23 ] = KEY_VOLUMEDOWN,
[ 18 ] = KEY_CHANNELUP, // Channel +
- [ 19 ] = KEY_CHANNELDOWN, // Channel -
+ [ 19 ] = KEY_CHANNELDOWN, // Channel -
[ 6 ] = KEY_AGAIN, // Recal
[ 16 ] = KEY_KPENTER, // Enter
@@ -160,7 +160,7 @@ static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = {
[ 13 ] = KEY_KP7,
[ 14 ] = KEY_KP8,
[ 15 ] = KEY_KP9,
-
+
[ 42 ] = KEY_VOLUMEUP,
[ 17 ] = KEY_VOLUMEDOWN,
[ 24 ] = KEY_CHANNELUP, // CH.tracking up
@@ -174,13 +174,13 @@ static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = {
[ 30 ] = KEY_POWER, // power
[ 28 ] = KEY_SEARCH, // scan
[ 7 ] = KEY_SELECT, // source
-
+
[ 22 ] = KEY_VOLUMEUP,
[ 20 ] = KEY_VOLUMEDOWN,
[ 31 ] = KEY_CHANNELUP,
[ 23 ] = KEY_CHANNELDOWN,
[ 24 ] = KEY_MUTE,
-
+
[ 2 ] = KEY_KP0,
[ 1 ] = KEY_KP1,
[ 11 ] = KEY_KP2,
@@ -192,21 +192,21 @@ static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = {
[ 10 ] = KEY_KP8,
[ 18 ] = KEY_KP9,
[ 16 ] = KEY_KPDOT,
-
+
[ 3 ] = KEY_TUNER, // tv/fm
[ 4 ] = KEY_REWIND, // fm tuning left or function left
[ 12 ] = KEY_FORWARD, // fm tuning right or function right
-
+
[ 0 ] = KEY_RECORD,
[ 8 ] = KEY_STOP,
[ 17 ] = KEY_PLAY,
-
+
[ 25 ] = KEY_ZOOM,
[ 14 ] = KEY_MENU, // function
[ 19 ] = KEY_AGAIN, // recall
[ 29 ] = KEY_RESTART, // reset
-
-// FIXME
+
+// FIXME
[ 13 ] = KEY_F21, // mts
[ 15 ] = KEY_F22, // min
[ 26 ] = KEY_F23, // freeze
@@ -378,7 +378,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
ir->mask_keydown = mask_keydown;
ir->mask_keyup = mask_keyup;
ir->polling = polling;
-
+
/* init input device */
snprintf(ir->name, sizeof(ir->name), "saa7134 IR (%s)",
saa7134_boards[dev->board].name);
@@ -419,7 +419,7 @@ void saa7134_input_fini(struct saa7134_dev *dev)
{
if (NULL == dev->remote)
return;
-
+
input_unregister_device(&dev->remote->dev);
if (dev->remote->polling)
del_timer_sync(&dev->remote->timer);
diff --git a/linux/drivers/media/video/saa7134/saa7134-oss.c b/linux/drivers/media/video/saa7134/saa7134-oss.c
index 608c5d21e..4612eb399 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.9 2004/09/15 16:15:24 kraxel Exp $
+ * $Id: saa7134-oss.c,v 1.10 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* oss dsp interface
@@ -140,7 +140,7 @@ static int dsp_rec_start(struct saa7134_dev *dev)
}
switch (dev->oss.afmt) {
- case AFMT_S8:
+ case AFMT_S8:
case AFMT_S16_LE:
case AFMT_S16_BE: sign = 1; break;
default: sign = 0; break;
@@ -161,7 +161,7 @@ static int dsp_rec_start(struct saa7134_dev *dev)
if (sign)
fmt |= 0x04;
fmt |= (TV == dev->oss.input) ? 0xc0 : 0x80;
-
+
saa_writeb(SAA7134_NUM_SAMPLES0, (dev->oss.blksize & 0x0000ff));
saa_writeb(SAA7134_NUM_SAMPLES1, (dev->oss.blksize & 0x00ff00) >> 8);
saa_writeb(SAA7134_NUM_SAMPLES2, (dev->oss.blksize & 0xff0000) >> 16);
@@ -193,7 +193,7 @@ static int dsp_rec_start(struct saa7134_dev *dev)
saa_writel(SAA7134_RS_BA2(6),dev->oss.blksize);
saa_writel(SAA7134_RS_PITCH(6),0);
saa_writel(SAA7134_RS_CONTROL(6),control);
-
+
/* start dma */
dev->oss.recording_on = 1;
spin_lock_irqsave(&dev->slock,flags);
@@ -369,7 +369,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
void __user *argp = (void __user *) arg;
int __user *p = argp;
int val = 0;
-
+
if (oss_debug > 1)
saa7134_print_ioctl(dev->name,cmd);
switch (cmd) {
@@ -412,7 +412,7 @@ static int dsp_ioctl(struct inode *inode, struct file *file,
/* fall through */
case SOUND_PCM_READ_CHANNELS:
return put_user(dev->oss.channels, p);
-
+
case SNDCTL_DSP_GETFMTS: /* Returns a mask */
return put_user(AFMT_U8 | AFMT_S8 |
AFMT_U16_LE | AFMT_U16_BE |
@@ -535,7 +535,7 @@ static int
mixer_recsrc_7134(struct saa7134_dev *dev)
{
int analog_io,rate;
-
+
switch (dev->oss.input) {
case TV:
saa_andorb(SAA7134_AUDIO_FORMAT_CTRL, 0xc0, 0xc0);
@@ -557,7 +557,7 @@ static int
mixer_recsrc_7133(struct saa7134_dev *dev)
{
u32 value = 0xbbbbbb;
-
+
switch (dev->oss.input) {
case TV:
value = 0xbbbb10; /* MAIN */
@@ -655,7 +655,7 @@ static int mixer_ioctl(struct inode *inode, struct file *file,
int val,ret;
void __user *argp = (void __user *) arg;
int __user *p = argp;
-
+
if (oss_debug > 1)
saa7134_print_ioctl(dev->name,cmd);
switch (cmd) {
@@ -786,7 +786,7 @@ int saa7134_oss_init1(struct saa7134_dev *dev)
mixer_level(dev,LINE1,dev->oss.line1);
mixer_level(dev,LINE2,dev->oss.line2);
mixer_recsrc(dev, (dev->oss.rate == 32000) ? TV : LINE2);
-
+
return 0;
}
@@ -840,7 +840,7 @@ void saa7134_irq_oss_done(struct saa7134_dev *dev, unsigned long status)
dev->oss.dma_blk = (dev->oss.dma_blk + 1) % dev->oss.blocks;
dev->oss.read_count += dev->oss.blksize;
wake_up(&dev->oss.wq);
-
+
done:
spin_unlock(&dev->slock);
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-ts.c b/linux/drivers/media/video/saa7134/saa7134-ts.c
index 3c36c3cc9..01e93a720 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.9 2004/10/11 14:53:13 kraxel Exp $
+ * $Id: saa7134-ts.c,v 1.10 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -63,11 +63,11 @@ static int buffer_activate(struct saa7134_dev *dev,
struct saa7134_buf *next)
{
u32 control;
-
+
dprintk("buffer_activate [%p]",buf);
buf->vb.state = STATE_ACTIVE;
buf->top_seen = 0;
-
+
/* dma: setup channel 5 (= TS) */
control = SAA7134_RS_CONTROL_BURST_16 |
SAA7134_RS_CONTROL_ME |
@@ -89,7 +89,7 @@ static int buffer_activate(struct saa7134_dev *dev,
/* start DMA */
saa7134_set_dmabits(dev);
-
+
mod_timer(&dev->ts_q.timeout, jiffies+BUFFER_TIMEOUT);
return 0;
}
@@ -101,12 +101,12 @@ static int buffer_prepare(void *priv, struct videobuf_buffer *vb,
struct saa7134_buf *buf = (struct saa7134_buf *)vb;
unsigned int lines, llength, size;
int err;
-
+
dprintk("buffer_prepare [%p,%s]\n",buf,v4l2_field_names[field]);
llength = TS_PACKET_SIZE;
lines = ts_nr_packets;
-
+
size = lines * llength;
if (0 != buf->vb.baddr && buf->vb.bsize < size)
return -EINVAL;
@@ -155,7 +155,7 @@ static void buffer_queue(void *priv, struct videobuf_buffer *vb)
{
struct saa7134_dev *dev = priv;
struct saa7134_buf *buf = (struct saa7134_buf *)vb;
-
+
saa7134_buffer_queue(dev,&dev->ts_q,buf);
}
@@ -163,7 +163,7 @@ static void buffer_release(void *priv, struct videobuf_buffer *vb)
{
struct saa7134_dev *dev = priv;
struct saa7134_buf *buf = (struct saa7134_buf *)vb;
-
+
saa7134_dma_free(dev,buf);
}
@@ -177,7 +177,7 @@ static struct videobuf_queue_ops ts_qops = {
/* ------------------------------------------------------------------ */
-static void ts_reset_encoder(struct saa7134_dev* dev)
+static void ts_reset_encoder(struct saa7134_dev* dev)
{
saa_writeb(SAA7134_SPECIAL_MODE, 0x00);
msleep(10);
@@ -185,7 +185,7 @@ static void ts_reset_encoder(struct saa7134_dev* dev)
msleep(100);
}
-static int ts_init_encoder(struct saa7134_dev* dev, void* arg)
+static int ts_init_encoder(struct saa7134_dev* dev, void* arg)
{
ts_reset_encoder(dev);
saa7134_i2c_call_clients(dev, MPEG_SETPARAMS, arg);
@@ -201,7 +201,7 @@ static int ts_open(struct inode *inode, struct file *file)
struct saa7134_dev *h,*dev = NULL;
struct list_head *list;
int err;
-
+
list_for_each(list,&saa7134_devlist) {
h = list_entry(list, struct saa7134_dev, devlist);
if (h->ts_dev && h->ts_dev->minor == minor)
@@ -240,7 +240,7 @@ static int ts_release(struct inode *inode, struct file *file)
/* stop the encoder */
if (dev->ts.started)
ts_reset_encoder(dev);
-
+
up(&dev->ts.ts.lock);
return 0;
}
@@ -254,7 +254,7 @@ ts_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
ts_init_encoder(dev, NULL);
dev->ts.started = 1;
}
-
+
return videobuf_read_stream(file->private_data,
&dev->ts.ts, data, count, ppos, 0,
file->f_flags & O_NONBLOCK);
@@ -312,7 +312,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_ENUMINPUT:
{
struct v4l2_input *i = arg;
-
+
if (i->index != 0)
return -EINVAL;
i->type = V4L2_INPUT_TYPE_CAMERA;
@@ -328,13 +328,13 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_S_INPUT:
{
int *i = arg;
-
+
if (*i != 0)
return -EINVAL;
return 0;
}
/* --- capture ioctls ---------------------------------------- */
-
+
case VIDIOC_ENUM_FMT:
{
struct v4l2_fmtdesc *f = arg;
@@ -343,7 +343,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
index = f->index;
if (index != 0)
return -EINVAL;
-
+
memset(f,0,sizeof(*f));
f->index = index;
strlcpy(f->description, "MPEG TS", sizeof(f->description));
@@ -358,7 +358,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
memset(f,0,sizeof(*f));
f->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-
+
/* FIXME: translate subsampling type EMPRESS into
* width/height: */
f->fmt.pix.width = 720; /* D1 */
@@ -367,7 +367,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
f->fmt.pix.sizeimage = TS_PACKET_SIZE*ts_nr_packets;
return 0;
}
-
+
case VIDIOC_S_FMT:
{
struct v4l2_format *f = arg;
@@ -375,11 +375,11 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
if (f->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
- /*
+ /*
FIXME: translate and round width/height into EMPRESS
subsample type:
-
- type | PAL | NTSC
+
+ type | PAL | NTSC
---------------------------
SIF | 352x288 | 352x240
1/2 D1 | 352x576 | 352x480
@@ -420,7 +420,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file,
case MPEG_SETPARAMS:
return ts_init_encoder(dev, arg);
-
+
default:
return -ENOIOCTLCMD;
}
@@ -490,8 +490,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev)
saa_writeb(SAA7134_TS_PARALLEL_SERIAL, (TS_PACKET_SIZE-1));
saa_writeb(SAA7134_TS_DMA0, ((ts_nr_packets-1)&0xff));
saa_writeb(SAA7134_TS_DMA1, (((ts_nr_packets-1)>>8)&0xff));
- saa_writeb(SAA7134_TS_DMA2, ((((ts_nr_packets-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */
-
+ saa_writeb(SAA7134_TS_DMA2, ((((ts_nr_packets-1)>>16)&0x3f) | 0x00)); /* TSNOPIT=0, TSCOLAP=0 */
+
return 0;
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c
index 2e8b3d0b0..682c79857 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.13 2004/09/22 11:47:11 kraxel Exp $
+ * $Id: saa7134-tvaudio.c,v 1.14 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* tv audio decoder (fm stereo, nicam, ...)
@@ -169,7 +169,7 @@ static void tvaudio_init(struct saa7134_dev *dev)
if (UNSET != audio_clock_override)
clock = audio_clock_override;
-
+
/* init all audio registers */
saa_writeb(SAA7134_AUDIO_PLL_CTRL, 0x00);
if (need_resched())
@@ -284,7 +284,7 @@ static void tvaudio_setmode(struct saa7134_dev *dev,
saa_writeb(SAA7134_AUDIO_CLOCKS_PER_FIELD1, (acpf & 0x00ff00) >> 8);
saa_writeb(SAA7134_AUDIO_CLOCKS_PER_FIELD2, (acpf & 0x030000) >> 16);
tvaudio_setcarrier(dev,audio->carr1,audio->carr2);
-
+
switch (audio->mode) {
case TVAUDIO_FM_MONO:
case TVAUDIO_FM_BG_STEREO:
@@ -324,7 +324,7 @@ static void tvaudio_setmode(struct saa7134_dev *dev,
static int tvaudio_sleep(struct saa7134_dev *dev, int timeout)
{
DECLARE_WAITQUEUE(wait, current);
-
+
add_wait_queue(&dev->thread.wq, &wait);
if (dev->thread.scan1 == dev->thread.scan2 && !dev->thread.shutdown) {
if (timeout < 0) {
@@ -364,13 +364,13 @@ static int tvaudio_checkcarrier(struct saa7134_dev *dev, struct mainscan *scan)
if (tvaudio_sleep(dev,SCAN_SAMPLE_DELAY))
return -1;
left = saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
-
+
tvaudio_setcarrier(dev,scan->carr+90,scan->carr+90);
saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
if (tvaudio_sleep(dev,SCAN_SAMPLE_DELAY))
return -1;
right = saa_readl(SAA7134_LEVEL_READOUT1 >> 2);
-
+
left >>= 16;
right >>= 16;
value = left > right ? left - right : right - left;
@@ -407,7 +407,7 @@ static int tvaudio_getstereo(struct saa7134_dev *dev, struct saa7134_tvaudio *au
{
__u32 idp,nicam;
int retval = -1;
-
+
switch (audio->mode) {
case TVAUDIO_FM_MONO:
return V4L2_TUNER_SUB_MONO;
@@ -652,7 +652,7 @@ static char *stdres[0x20] = {
[0x09] = "D/K NICAM",
[0x0a] = "L NICAM",
[0x0b] = "I NICAM",
-
+
[0x0c] = "M Korea",
[0x0d] = "M BTSC ",
[0x0e] = "M EIAJ",
@@ -747,7 +747,7 @@ static int mute_input_7133(struct saa7134_dev *dev)
{
u32 reg = 0;
int mask;
-
+
switch (dev->input->amux) {
case TV: reg = 0x02; break;
case LINE1: reg = 0x00; break;
@@ -787,11 +787,11 @@ static int tvaudio_thread_ddep(void *data)
if (UNSET != audio_clock_override)
clock = audio_clock_override;
saa_writel(0x598 >> 2, clock);
-
+
/* unmute */
saa_dsp_writel(dev, 0x474 >> 2, 0x00);
saa_dsp_writel(dev, 0x450 >> 2, 0x00);
-
+
for (;;) {
tvaudio_sleep(dev,-1);
if (dev->thread.shutdown || signal_pending(current))
@@ -840,7 +840,7 @@ static int tvaudio_thread_ddep(void *data)
/* setup crossbars */
saa_dsp_writel(dev, 0x464 >> 2, 0x000000);
saa_dsp_writel(dev, 0x470 >> 2, 0x101010);
-
+
if (tvaudio_sleep(dev,3000))
goto restart;
value = saa_readl(0x528 >> 2) & 0xffffff;
@@ -861,12 +861,12 @@ static int tvaudio_thread_ddep(void *data)
(value & 0x002000) ? " BTSC stereo noise mute " : "",
(value & 0x004000) ? " SAP noise mute " : "",
(value & 0x008000) ? " VDSP " : "",
-
+
(value & 0x010000) ? " NICST " : "",
(value & 0x020000) ? " NICDU " : "",
(value & 0x040000) ? " NICAM muted " : "",
(value & 0x080000) ? " NICAM reserve sound " : "",
-
+
(value & 0x100000) ? " init done " : "");
}
@@ -881,7 +881,7 @@ static int tvaudio_thread_ddep(void *data)
int saa7134_tvaudio_rx2mode(u32 rx)
{
u32 mode;
-
+
mode = V4L2_TUNER_MODE_MONO;
if (rx & V4L2_TUNER_SUB_STEREO)
mode = V4L2_TUNER_MODE_STEREO;
@@ -891,7 +891,7 @@ int saa7134_tvaudio_rx2mode(u32 rx)
mode = V4L2_TUNER_MODE_LANG2;
return mode;
}
-
+
void saa7134_tvaudio_setmute(struct saa7134_dev *dev)
{
switch (dev->pci->device) {
@@ -959,11 +959,11 @@ int saa7134_tvaudio_init2(struct saa7134_dev *dev)
if (saa7134_boards[dev->board].has_ts) {
int i2sform = (48000 == dev->oss.rate)
? 0x01 : 0x00;
-
+
/* enable I2S output */
- saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80);
- saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2sform);
- saa_writeb(SAA7134_I2S_OUTPUT_LEVEL, 0x0F);
+ saa_writeb(SAA7134_I2S_OUTPUT_SELECT, 0x80);
+ saa_writeb(SAA7134_I2S_OUTPUT_FORMAT, i2sform);
+ saa_writeb(SAA7134_I2S_OUTPUT_LEVEL, 0x0F);
saa_writeb(SAA7134_I2S_AUDIO_OUTPUT, 0x01);
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-vbi.c b/linux/drivers/media/video/saa7134/saa7134-vbi.c
index 312da9bf7..ee4806d54 100644
--- a/linux/drivers/media/video/saa7134/saa7134-vbi.c
+++ b/linux/drivers/media/video/saa7134/saa7134-vbi.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-vbi.c,v 1.3 2004/09/23 13:58:19 kraxel Exp $
+ * $Id: saa7134-vbi.c,v 1.4 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -53,7 +53,7 @@ static void task_init(struct saa7134_dev *dev, struct saa7134_buf *buf,
int task)
{
struct saa7134_tvnorm *norm = dev->tvnorm;
-
+
/* setup video scaler */
saa_writeb(SAA7134_VBI_H_START1(task), norm->h_start & 0xff);
saa_writeb(SAA7134_VBI_H_START2(task), norm->h_start >> 8);
@@ -174,7 +174,7 @@ buffer_setup(void *priv, unsigned int *count, unsigned int *size)
struct saa7134_fh *fh = priv;
struct saa7134_dev *dev = fh->dev;
int llength,lines;
-
+
lines = dev->tvnorm->vbi_v_stop - dev->tvnorm->vbi_v_start +1;
#if 1
llength = VBI_LINE_LENGTH;
@@ -195,7 +195,7 @@ static void buffer_queue(void *priv, struct videobuf_buffer *vb)
struct saa7134_fh *fh = priv;
struct saa7134_dev *dev = fh->dev;
struct saa7134_buf *buf = (struct saa7134_buf *)vb;
-
+
saa7134_buffer_queue(dev,&dev->vbi_q,buf);
}
@@ -204,7 +204,7 @@ static void buffer_release(void *priv, struct videobuf_buffer *vb)
struct saa7134_fh *fh = priv;
struct saa7134_dev *dev = fh->dev;
struct saa7134_buf *buf = (struct saa7134_buf *)vb;
-
+
saa7134_dma_free(dev,buf);
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 4d79c3dc6..3995f062b 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.15 2004/10/11 14:53:13 kraxel Exp $
+ * $Id: saa7134-video.c,v 1.16 2004/10/13 10:39:00 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -55,7 +55,7 @@ MODULE_PARM_DESC(noninterlaced,"video input is noninterlaced");
static int video_out[][9] = {
[CCIR656] = { 0x00, 0xb1, 0x00, 0xa1, 0x00, 0x04, 0x06, 0x00, 0x00 },
};
-
+
static struct saa7134_format formats[] = {
{
.name = "8 bpp gray",
@@ -373,7 +373,7 @@ static const unsigned int CTRLS = ARRAY_SIZE(video_ctrls);
static const struct v4l2_queryctrl* ctrl_by_id(unsigned int id)
{
unsigned int i;
-
+
for (i = 0; i < CTRLS; i++)
if (video_ctrls[i].id == id)
return video_ctrls+i;
@@ -482,12 +482,12 @@ static void set_tvnorm(struct saa7134_dev *dev, struct saa7134_tvnorm *norm)
saa_writeb(SAA7134_HSYNC_START, 0xeb);
saa_writeb(SAA7134_HSYNC_STOP, 0xe0);
saa_writeb(SAA7134_SOURCE_TIMING1, norm->src_timing);
-
+
saa_writeb(SAA7134_SYNC_CTRL, sync_control);
saa_writeb(SAA7134_LUMA_CTRL, luma_control);
saa_writeb(SAA7134_DEC_LUMA_BRIGHT, dev->ctl_bright);
saa_writeb(SAA7134_DEC_LUMA_CONTRAST, dev->ctl_contrast);
-
+
saa_writeb(SAA7134_DEC_CHROMA_SATURATION, dev->ctl_saturation);
saa_writeb(SAA7134_DEC_CHROMA_HUE, dev->ctl_hue);
saa_writeb(SAA7134_CHROMA_CTRL1, norm->chroma_ctrl1);
@@ -570,7 +570,7 @@ static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale)
static void set_v_scale(struct saa7134_dev *dev, int task, int yscale)
{
int val,mirror;
-
+
saa_writeb(SAA7134_V_SCALE_RATIO1(task), yscale & 0xff);
saa_writeb(SAA7134_V_SCALE_RATIO2(task), yscale >> 8);
@@ -604,7 +604,7 @@ static void set_size(struct saa7134_dev *dev, int task,
v_start = dev->crop_current.top/2;
h_stop = (dev->crop_current.left + dev->crop_current.width -1);
v_stop = (dev->crop_current.top + dev->crop_current.height -1)/2;
-
+
saa_writeb(SAA7134_VIDEO_H_START1(task), h_start & 0xff);
saa_writeb(SAA7134_VIDEO_H_START2(task), h_start >> 8);
saa_writeb(SAA7134_VIDEO_H_STOP1(task), h_stop & 0xff);
@@ -624,7 +624,7 @@ static void set_size(struct saa7134_dev *dev, int task,
saa_writeb(SAA7134_H_SCALE_INC1(task), xscale & 0xff);
saa_writeb(SAA7134_H_SCALE_INC2(task), xscale >> 8);
set_v_scale(dev,task,yscale);
-
+
saa_writeb(SAA7134_VIDEO_PIXELS1(task), width & 0xff);
saa_writeb(SAA7134_VIDEO_PIXELS2(task), width >> 8);
saa_writeb(SAA7134_VIDEO_LINES1(task), height/div & 0xff);
@@ -651,7 +651,7 @@ static void sort_cliplist(struct cliplist *cl, int entries)
{
struct cliplist swap;
int i,j,n;
-
+
for (i = entries-2; i >= 0; i--) {
for (n = 0, j = 0; j <= i; j++) {
if (cl[j].position > cl[j+1].position) {
@@ -846,7 +846,7 @@ static int buffer_activate(struct saa7134_dev *dev,
dprintk("buffer_activate buf=%p\n",buf);
buf->vb.state = STATE_ACTIVE;
buf->top_seen = 0;
-
+
set_size(dev,TASK_A,buf->vb.width,buf->vb.height,
V4L2_FIELD_HAS_BOTH(buf->vb.field));
if (buf->fmt->yuv)
@@ -926,7 +926,7 @@ static int buffer_prepare(void *priv, struct videobuf_buffer *vb,
struct saa7134_buf *buf = (struct saa7134_buf *)vb;
unsigned int size;
int err;
-
+
/* sanity checks */
if (NULL == fh->fmt)
return -EINVAL;
@@ -995,7 +995,7 @@ static void buffer_queue(void *priv, struct videobuf_buffer *vb)
{
struct saa7134_fh *fh = priv;
struct saa7134_buf *buf = (struct saa7134_buf *)vb;
-
+
saa7134_buffer_queue(fh->dev,&fh->dev->video_q,buf);
}
@@ -1003,7 +1003,7 @@ static void buffer_release(void *priv, struct videobuf_buffer *vb)
{
struct saa7134_fh *fh = priv;
struct saa7134_buf *buf = (struct saa7134_buf *)vb;
-
+
saa7134_dma_free(fh->dev,buf);
}
@@ -1160,7 +1160,7 @@ static int set_control(struct saa7134_dev *dev, struct saa7134_fh *fh,
static struct videobuf_queue* saa7134_queue(struct saa7134_fh *fh)
{
struct videobuf_queue* q = NULL;
-
+
switch (fh->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
q = &fh->cap;
@@ -1177,7 +1177,7 @@ static struct videobuf_queue* saa7134_queue(struct saa7134_fh *fh)
static int saa7134_resource(struct saa7134_fh *fh)
{
int res = 0;
-
+
switch (fh->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
res = RESOURCE_VIDEO;
@@ -1199,7 +1199,7 @@ static int video_open(struct inode *inode, struct file *file)
struct list_head *list;
enum v4l2_buf_type type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
int radio = 0;
-
+
list_for_each(list,&saa7134_devlist) {
h = list_entry(list, struct saa7134_dev, devlist);
if (h->video_dev && (h->video_dev->minor == minor))
@@ -1377,7 +1377,7 @@ static int
video_mmap(struct file *file, struct vm_area_struct * vma)
{
struct saa7134_fh *fh = file->private_data;
-
+
return videobuf_mmap_mapper(vma,saa7134_queue(fh));
}
@@ -1436,7 +1436,7 @@ int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
struct v4l2_format *f)
{
int err;
-
+
switch (f->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
{
@@ -1451,7 +1451,7 @@ int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
field = f->fmt.pix.field;
maxw = min(dev->crop_current.width*4, dev->crop_bounds.width);
maxh = min(dev->crop_current.height*4, dev->crop_bounds.height);
-
+
if (V4L2_FIELD_ANY == field) {
field = (f->fmt.pix.height > maxh/2)
? V4L2_FIELD_INTERLACED
@@ -1481,7 +1481,7 @@ int saa7134_try_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
(f->fmt.pix.width * fmt->depth) >> 3;
f->fmt.pix.sizeimage =
f->fmt.pix.height * f->fmt.pix.bytesperline;
-
+
return 0;
}
case V4L2_BUF_TYPE_VIDEO_OVERLAY:
@@ -1502,13 +1502,13 @@ int saa7134_s_fmt(struct saa7134_dev *dev, struct saa7134_fh *fh,
{
unsigned long flags;
int err;
-
+
switch (f->type) {
case V4L2_BUF_TYPE_VIDEO_CAPTURE:
err = saa7134_try_fmt(dev,fh,f);
if (0 != err)
return err;
-
+
fh->fmt = format_by_fourcc(f->fmt.pix.pixelformat);
fh->width = f->fmt.pix.width;
fh->height = f->fmt.pix.height;
@@ -1550,7 +1550,7 @@ int saa7134_common_ioctl(struct saa7134_dev *dev,
unsigned int cmd, void *arg)
{
int err;
-
+
switch (cmd) {
case VIDIOC_QUERYCTRL:
{
@@ -1617,7 +1617,7 @@ int saa7134_common_ioctl(struct saa7134_dev *dev,
case VIDIOC_S_INPUT:
{
int *i = arg;
-
+
if (*i < 0 || *i >= SAA7134_INPUT_MAX)
return -EINVAL;
if (NULL == card_in(dev,*i).name)
@@ -1665,7 +1665,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_QUERYCAP:
{
struct v4l2_capability *cap = arg;
-
+
memset(cap,0,sizeof(*cap));
strcpy(cap->driver, "saa7134");
strlcpy(cap->card, saa7134_boards[dev->board].name,
@@ -1677,7 +1677,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
V4L2_CAP_VIDEO_OVERLAY |
V4L2_CAP_VBI_CAPTURE |
V4L2_CAP_TUNER |
- V4L2_CAP_READWRITE |
+ V4L2_CAP_READWRITE |
V4L2_CAP_STREAMING;
return 0;
}
@@ -1727,7 +1727,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
set_tvnorm(dev,&tvnorms[i]);
start_preview(dev,fh);
spin_unlock_irqrestore(&dev->slock,flags);
- } else
+ } else
set_tvnorm(dev,&tvnorms[i]);
saa7134_tvaudio_do_scan(dev);
up(&dev->lock);
@@ -1759,7 +1759,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_CROP:
{
struct v4l2_crop * crop = arg;
-
+
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY)
return -EINVAL;
@@ -1770,7 +1770,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
{
struct v4l2_crop *crop = arg;
struct v4l2_rect *b = &dev->crop_bounds;
-
+
if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
crop->type != V4L2_BUF_TYPE_VIDEO_OVERLAY)
return -EINVAL;
@@ -1790,7 +1790,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
crop->c.top = b->top + b->height;
if (crop->c.height > b->top - crop->c.top + b->height)
crop->c.height = b->top - crop->c.top + b->height;
-
+
if (crop->c.left < b->left)
crop->c.top = b->left;
if (crop->c.left > b->left + b->width)
@@ -1873,7 +1873,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
up(&dev->lock);
return 0;
}
-
+
/* --- control ioctls ---------------------------------------- */
case VIDIOC_ENUMINPUT:
case VIDIOC_G_INPUT:
@@ -1949,7 +1949,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
strcpy(f->description,"vbi data");
break;
default:
- return -EINVAL;
+ return -EINVAL;
}
return 0;
}
@@ -1965,7 +1965,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
{
struct v4l2_framebuffer *fb = arg;
struct saa7134_format *fmt;
-
+
if(!capable(CAP_SYS_ADMIN) &&
!capable(CAP_SYS_RAWIO))
return -EPERM;
@@ -2021,7 +2021,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
struct v4l2_format *f = arg;
return saa7134_try_fmt(dev,fh,f);
}
-
+
case VIDIOCGMBUF:
{
struct video_mbuf *mbuf = arg;
@@ -2096,7 +2096,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
{
struct saa7134_fh *fh = file->private_data;
struct saa7134_dev *dev = fh->dev;
-
+
if (video_debug > 1)
saa7134_print_ioctl(dev->name,cmd);
switch (cmd) {
@@ -2127,7 +2127,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
#ifdef V4L2_I2C_CLIENTS
saa7134_i2c_call_clients(dev,VIDIOC_G_TUNER,t);
-#else
+#else
{
struct video_tuner vt;
memset(&vt,0,sizeof(vt));
@@ -2140,7 +2140,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_ENUMINPUT:
{
struct v4l2_input *i = arg;
-
+
if (i->index != 0)
return -EINVAL;
strcpy(i->name,"Radio");
@@ -2194,7 +2194,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
case VIDIOC_G_FREQUENCY:
case VIDIOC_S_FREQUENCY:
return video_do_ioctl(inode,file,cmd,arg);
-
+
default:
return v4l_compat_translate_ioctl(inode,file,cmd,arg,
radio_do_ioctl);
@@ -2302,7 +2302,7 @@ int saa7134_video_init1(struct saa7134_dev *dev)
saa_writeb(SAA7134_VIDEO_PORT_CTRL7, video_out[vo][7]);
saa_writeb(SAA7134_VIDEO_PORT_CTRL8, video_out[vo][8]);
}
-
+
return 0;
}
@@ -2330,7 +2330,7 @@ void saa7134_irq_video_intl(struct saa7134_dev *dev)
norm = saa_readb(SAA7134_STATUS_VIDEO1) & 0x03;
dprintk("DCSDT: %s\n",st[norm]);
-
+
if (0 != norm) {
/* wake up tvaudio audio carrier scan thread */
saa7134_tvaudio_do_scan(dev);
@@ -2348,7 +2348,7 @@ void saa7134_irq_video_intl(struct saa7134_dev *dev)
void saa7134_irq_video_done(struct saa7134_dev *dev, unsigned long status)
{
enum v4l2_field field;
-
+
spin_lock(&dev->slock);
if (dev->video_q.curr) {
dev->video_fieldcount++;
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 89c0813c4..8a4446703 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.21 2004/10/12 17:08:43 kraxel Exp $
+ * $Id: saa7134.h,v 1.22 2004/10/13 10:39:00 kraxel Exp $
*
* v4l2 device driver for philips saa7134 based TV cards
*
@@ -204,7 +204,7 @@ struct saa7134_board {
struct saa7134_input inputs[SAA7134_INPUT_MAX];
struct saa7134_input radio;
struct saa7134_input mute;
-
+
/* peripheral I/O */
unsigned int has_ts;
enum saa7134_video_out video_out;
@@ -283,7 +283,7 @@ struct saa7134_fh {
unsigned int radio;
enum v4l2_buf_type type;
unsigned int resources;
-#ifdef VIDIOC_G_PRIORITY
+#ifdef VIDIOC_G_PRIORITY
enum v4l2_priority prio;
#endif
@@ -362,7 +362,7 @@ struct saa7134_dev {
struct list_head devlist;
struct semaphore lock;
spinlock_t slock;
-#ifdef VIDIOC_G_PRIORITY
+#ifdef VIDIOC_G_PRIORITY
struct v4l2_prio_state prio;
#endif
@@ -426,12 +426,12 @@ struct saa7134_dev {
int ctl_y_odd;
int ctl_y_even;
int ctl_automute;
-
+
/* crop */
struct v4l2_rect crop_bounds;
struct v4l2_rect crop_defrect;
struct v4l2_rect crop_current;
-
+
/* other global state info */
unsigned int automute;
struct saa7134_thread thread;
diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c
index efc1c96a5..6ab76e480 100644
--- a/linux/drivers/media/video/tda7432.c
+++ b/linux/drivers/media/video/tda7432.c
@@ -1,8 +1,8 @@
/*
* For the STS-Thompson TDA7432 audio processor chip
- *
+ *
* Handles audio functions: volume, balance, tone, loudness
- * This driver will not complain if used with any
+ * This driver will not complain if used with any
* other i2c device with the same address.
*
* Muting and tone control by Jonathan Isom <jisom@ematic.com>
@@ -112,7 +112,7 @@ static struct i2c_client client_template;
* output (for front and rear). Since most vidcap cards probably
* don't have 4 channel output, this driver will set front & rear
* together (no independent control).
- */
+ */
/* Subaddresses for TDA7432 */
@@ -138,13 +138,13 @@ static struct i2c_client client_template;
* 0x03 - Mute (Using Attenuators Plays better with modules)
* Mono probably isn't used - I'm guessing only the stereo
* input is connected on most cards, so we'll set it to stereo.
- *
+ *
* Bit 3 controls bass cut: 0/1 is non-symmetric/symmetric bass cut
* Bit 4 controls bass range: 0/1 is extended/standard bass range
- *
+ *
* Highest 3 bits not used
*/
-
+
#define TDA7432_STEREO_IN 0
#define TDA7432_MONO_IN 2 /* Probably won't be used */
#define TDA7432_BASS_SYM 1 << 3
@@ -167,7 +167,7 @@ static struct i2c_client client_template;
#define TDA7432_LD_ON 1 << 7
-/* Subaddress 0x02 - Tone control */
+/* Subaddress 0x02 - Tone control */
/* Bits 0,1,2 control absolute treble gain from 0dB to 14dB
* 0x0 is 14dB, 0x7 is 0dB
@@ -179,23 +179,23 @@ static struct i2c_client client_template;
* Bits 4,5,6 control absolute bass gain from 0dB to 14dB
* (This is only true for normal base range, set in 0x00)
* 0x0 << 4 is 14dB, 0x7 is 0dB
- *
+ *
* Bit 7 controls bass attenuation/gain (sign)
* 1 << 7 = gain (+)
- * 0 << 7 = attenuation (-)
+ * 0 << 7 = attenuation (-)
*
* Example:
* 1 1 0 1 0 1 0 1 is +4dB bass, -4dB treble
*/
-#define TDA7432_TREBLE_0DB 0xf
+#define TDA7432_TREBLE_0DB 0xf
#define TDA7432_TREBLE 7
#define TDA7432_TREBLE_GAIN 1 << 3
#define TDA7432_BASS_0DB 0xf
#define TDA7432_BASS 7 << 4
#define TDA7432_BASS_GAIN 1 << 7
-
+
/* Subaddress 0x03 - Left Front attenuation */
/* Subaddress 0x04 - Left Rear attenuation */
/* Subaddress 0x05 - Right Front attenuation */
@@ -208,7 +208,7 @@ static struct i2c_client client_template;
* 0x1f is -37.5dB
*
* Bit 5 mutes that channel when set (1 = mute, 0 = unmute)
- * We'll use the mute on the input, though (above)
+ * We'll use the mute on the input, though (above)
* Bits 6,7 unused
*/
@@ -229,8 +229,8 @@ static struct i2c_client client_template;
*
* Bits 5,6,7 unused
*/
-
-
+
+
/* Begin code */
@@ -259,7 +259,7 @@ static int tda7432_read(struct i2c_client *client)
printk(KERN_WARNING "tda7432: I/O error, trying (read)\n");
return -1;
}
- dprintk("tda7432: Read 0x%02x\n", buffer);
+ dprintk("tda7432: Read 0x%02x\n", buffer);
return buffer;
}
#endif
@@ -269,8 +269,8 @@ static int tda7432_set(struct i2c_client *client)
struct tda7432 *t = i2c_get_clientdata(client);
unsigned char buf[16];
d2printk("tda7432: In tda7432_set\n");
-
- dprintk(KERN_INFO
+
+ dprintk(KERN_INFO
"tda7432: 7432_set(0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x,0x%02x)\n",
t->input,t->volume,t->bass,t->treble,t->lf,t->lr,t->rf,t->rr,t->loud);
buf[0] = TDA7432_IN;
@@ -298,10 +298,10 @@ static void do_tda7432_init(struct i2c_client *client)
t->input = TDA7432_STEREO_IN | /* Main (stereo) input */
TDA7432_BASS_SYM | /* Symmetric bass cut */
- TDA7432_BASS_NORM; /* Normal bass range */
+ TDA7432_BASS_NORM; /* Normal bass range */
t->volume = 0x3b ; /* -27dB Volume */
if (loudness) /* Turn loudness on? */
- t->volume |= TDA7432_LD_ON;
+ t->volume |= TDA7432_LD_ON;
t->muted = VIDEO_AUDIO_MUTE;
t->treble = TDA7432_TREBLE_0DB; /* 0dB Treble */
t->bass = TDA7432_BASS_0DB; /* 0dB Bass */
@@ -339,7 +339,7 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr,
client->adapter = adap;
client->addr = addr;
i2c_set_clientdata(client, t);
-
+
do_tda7432_init(client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
@@ -368,7 +368,7 @@ static int tda7432_detach(struct i2c_client *client)
do_tda7432_init(client);
i2c_detach_client(client);
-
+
kfree(t);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_DEC_USE_COUNT;
@@ -386,7 +386,7 @@ static int tda7432_command(struct i2c_client *client,
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */
-
+
/* Query card - scale from TDA7432 settings to V4L settings */
case VIDIOCGAUDIO:
{
@@ -402,7 +402,7 @@ static int tda7432_command(struct i2c_client *client,
va->mode |= VIDEO_SOUND_STEREO;
/* Master volume control
* V4L volume is min 0, max 65535
- * TDA7432 Volume:
+ * TDA7432 Volume:
* Min (-79dB) is 0x6f
* Max (+20dB) is 0x07 (630)
* Max (0dB) is 0x20 (829)
@@ -413,7 +413,7 @@ static int tda7432_command(struct i2c_client *client,
} else { /* max 0db */
va->volume = ( 0x6f - (t->volume & 0x7F) ) * 829;
}
-
+
/* Balance depends on L,R attenuation
* V4L balance is 0 to 65535, middle is 32768
* TDA7432 attenuation: min (0dB) is 0, max (-37.5dB) is 0x1f
@@ -421,15 +421,15 @@ static int tda7432_command(struct i2c_client *client,
* attenuation exists for lf, lr, rf, rr
* we use only lf and rf (front channels)
*/
-
+
if ( (t->lf) < (t->rf) )
/* right is attenuated, balance shifted left */
va->balance = (32768 - 1057*(t->rf));
else
/* left is attenuated, balance shifted right */
va->balance = (32768 + 1057*(t->lf));
-
- /* Bass/treble 4 bits each */
+
+ /* Bass/treble 4 bits each */
va->bass=t->bass;
if(va->bass >= 0x8)
va->bass = ~(va->bass - 0x8) & 0xf;
@@ -438,7 +438,7 @@ static int tda7432_command(struct i2c_client *client,
if(va->treble >= 0x8)
va->treble = ~(va->treble - 0x8) & 0xf;
va->treble = (va->treble << 12)+(va->treble << 8)+(va->treble << 4)+(va->treble);
-
+
break; /* VIDIOCGAUDIO case */
}
@@ -454,13 +454,13 @@ static int tda7432_command(struct i2c_client *client,
} else { /* max 0db */
t->volume = 0x6f - ((va->volume)/829);
}
-
+
if (loudness) /* Turn on the loudness bit */
t->volume |= TDA7432_LD_ON;
-
+
tda7432_write(client,TDA7432_VL, t->volume);
}
-
+
if(va->flags & VIDEO_AUDIO_BASS)
{
t->bass = va->bass >> 12;
@@ -475,15 +475,15 @@ static int tda7432_command(struct i2c_client *client,
}
if(va->flags & (VIDEO_AUDIO_TREBLE| VIDEO_AUDIO_BASS))
tda7432_write(client,TDA7432_TN, 0x10 | (t->bass << 4) | t->treble );
-
+
if(va->flags & VIDEO_AUDIO_BALANCE) {
- if (va->balance < 32768)
+ if (va->balance < 32768)
{
/* shifted to left, attenuate right */
t->rr = (32768 - va->balance)/1057;
t->rf = t->rr;
t->lr = TDA7432_ATTEN_0DB;
- t->lf = TDA7432_ATTEN_0DB;
+ t->lf = TDA7432_ATTEN_0DB;
}
else if(va->balance > 32769)
{
@@ -491,22 +491,22 @@ static int tda7432_command(struct i2c_client *client,
t->lf = (va->balance - 32768)/1057;
t->lr = t->lf;
t->rr = TDA7432_ATTEN_0DB;
- t->rf = TDA7432_ATTEN_0DB;
+ t->rf = TDA7432_ATTEN_0DB;
}
- else
+ else
{
- /* centered */
+ /* centered */
t->rr = TDA7432_ATTEN_0DB;
t->rf = TDA7432_ATTEN_0DB;
t->lf = TDA7432_ATTEN_0DB;
t->lr = TDA7432_ATTEN_0DB;
}
}
-
- t->muted=(va->flags & VIDEO_AUDIO_MUTE);
+
+ t->muted=(va->flags & VIDEO_AUDIO_MUTE);
if (t->muted)
{
- /* Mute & update balance*/
+ /* Mute & update balance*/
tda7432_write(client,TDA7432_LF, t->lf | TDA7432_MUTE);
tda7432_write(client,TDA7432_LR, t->lr | TDA7432_MUTE);
tda7432_write(client,TDA7432_RF, t->rf | TDA7432_MUTE);
@@ -517,7 +517,7 @@ static int tda7432_command(struct i2c_client *client,
tda7432_write(client,TDA7432_RF, t->rf);
tda7432_write(client,TDA7432_RR, t->rr);
}
-
+
break;
} /* end of VIDEOCSAUDIO case */
@@ -548,7 +548,7 @@ static struct i2c_client client_template =
{
I2C_DEVNAME("tda7432"),
.id = -1,
- .driver = &driver,
+ .driver = &driver,
};
static int __init tda7432_init(void)
diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c
index cbb305b19..54c3fa517 100644
--- a/linux/drivers/media/video/tda9875.c
+++ b/linux/drivers/media/video/tda9875.c
@@ -1,19 +1,19 @@
/*
* For the TDA9875 chip
- * (The TDA9875 is used on the Diamond DTV2000 french version
+ * (The TDA9875 is used on the Diamond DTV2000 french version
* Other cards probably use these chips as well.)
- * This driver will not complain if used with any
+ * This driver will not complain if used with any
* other i2c device with the same address.
*
* Copyright (c) 2000 Guillaume Delvit based on Gerd Knorr source and
- * Eric Sandeen
+ * Eric Sandeen
* This code is placed under the terms of the GNU General Public License
* Based on tda9855.c by Steve VanDeBogart (vandebo@uclink.berkeley.edu)
* Which was based on tda8425.c by Greg Alexander (c) 1998
*
* OPTIONS:
* debug - set to 1 if you'd like to see debug messages
- *
+ *
* Revision: 0.1 - original version
*/
@@ -70,7 +70,7 @@ static struct i2c_client client_template;
* http://www.semiconductors.philips.com
* TDA9875: I2C-bus controlled DSP audio processor, FM demodulator
*
- */
+ */
/* subaddresses for TDA9875 */
#define TDA9875_MUT 0x12 /*General mute (value --> 0b11001100*/
@@ -139,7 +139,7 @@ static int tda9875_read(struct i2c_client *client)
printk(KERN_WARNING "tda9875: I/O error, trying (read)\n");
return -1;
}
- dprintk("Read 0x%02x\n", buffer);
+ dprintk("Read 0x%02x\n", buffer);
return buffer;
}
#endif
@@ -184,7 +184,7 @@ static void tda9875_set(struct i2c_client *client)
static void do_tda9875_init(struct i2c_client *client)
{
struct tda9875 *t = i2c_get_clientdata(client);
- dprintk("In tda9875_init\n");
+ dprintk("In tda9875_init\n");
tda9875_write(client, TDA9875_CFG, 0xd0 ); /*reg de config 0 (reset)*/
tda9875_write(client, TDA9875_MSR, 0x03 ); /* Monitor 0b00000XXX*/
tda9875_write(client, TDA9875_C1MSB, 0x00 ); /*Car1(FM) MSB XMHz*/
@@ -198,7 +198,7 @@ static void do_tda9875_init(struct i2c_client *client)
tda9875_write(client, TDA9875_FMAT, 0x00 ); /*FM Matrix reg 0x00*/
tda9875_write(client, TDA9875_SC1, 0x00 ); /* SCART 1 (SC1)*/
tda9875_write(client, TDA9875_SC2, 0x01 ); /* SCART 2 (sc2)*/
-
+
tda9875_write(client, TDA9875_CH1V, 0x10 ); /* Channel volume 1 mute*/
tda9875_write(client, TDA9875_CH2V, 0x10 ); /* Channel volume 2 mute */
tda9875_write(client, TDA9875_DACOS, 0x02 ); /* sig DAC i/o(in:nicam)*/
@@ -210,14 +210,14 @@ static void do_tda9875_init(struct i2c_client *client)
tda9875_write(client, TDA9875_MVR, 0x03 ); /* Vol Main right 10dB*/
tda9875_write(client, TDA9875_MBA, 0x00 ); /* Main Bass Main 0dB*/
tda9875_write(client, TDA9875_MTR, 0x00 ); /* Main Treble Main 0dB*/
- tda9875_write(client, TDA9875_ACS, 0x44 ); /* Aux chan select (dac)*/
+ tda9875_write(client, TDA9875_ACS, 0x44 ); /* Aux chan select (dac)*/
tda9875_write(client, TDA9875_AVL, 0x00 ); /* Vol Aux left 0dB*/
tda9875_write(client, TDA9875_AVR, 0x00 ); /* Vol Aux right 0dB*/
tda9875_write(client, TDA9875_ABA, 0x00 ); /* Aux Bass Main 0dB*/
tda9875_write(client, TDA9875_ATR, 0x00 ); /* Aux Aigus Main 0dB*/
-
+
tda9875_write(client, TDA9875_MUT, 0xcc ); /* General mute */
-
+
t->mode=AUDIO_UNMUTE;
t->lvol=t->rvol =0; /* 0dB */
t->bass=0; /* 0dB */
@@ -273,7 +273,7 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr,
kfree(t);
return 1;
}
-
+
do_tda9875_init(client);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
@@ -302,7 +302,7 @@ static int tda9875_detach(struct i2c_client *client)
do_tda9875_init(client);
i2c_detach_client(client);
-
+
kfree(t);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_DEC_USE_COUNT;
@@ -315,9 +315,9 @@ static int tda9875_command(struct i2c_client *client,
{
struct tda9875 *t = i2c_get_clientdata(client);
- dprintk("In tda9875_command...\n");
+ dprintk("In tda9875_command...\n");
- switch (cmd) {
+ switch (cmd) {
/* --- v4l ioctls --- */
/* take care: bttv does userspace copying, we'll get a
kernel pointer here... */
@@ -352,7 +352,7 @@ static int tda9875_command(struct i2c_client *client,
struct video_audio *va = arg;
int left,right;
- dprintk("VIDEOCSAUDIO...\n");
+ dprintk("VIDEOCSAUDIO...\n");
left = (min(65536 - va->balance,32768) *
va->volume) / 32768;
right = (min(va->balance,(__u16)32768) *
@@ -374,7 +374,7 @@ static int tda9875_command(struct i2c_client *client,
t->bass = 15;
if (t->bass < -12)
t->bass = -12 & 0xff;
-
+
t->treble = ((va->treble/2700)-12) & 0xff;
if (t->treble > 12)
t->treble = 12;
@@ -384,7 +384,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);
diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c
index 6f2e4516d..dc3ad44cc 100644
--- a/linux/drivers/media/video/tda9887.c
+++ b/linux/drivers/media/video/tda9887.c
@@ -401,7 +401,7 @@ static int tda9887_set_insmod(struct tda9887 *t, char *buf)
else
buf[1] &= ~cQSS;
}
-
+
if (adjust >= 0x00 && adjust < 0x20)
buf[2] |= adjust;
return 0;
@@ -521,7 +521,7 @@ static int tda9887_status(struct tda9887 *t)
{
unsigned char buf[1];
int rc;
-
+
memset(buf,0,sizeof(buf));
if (1 != (rc = i2c_master_recv(&t->client,buf,1)))
printk(PREFIX "i2c i/o error: rc == %d (should be 1)\n",rc);
@@ -586,7 +586,7 @@ static int tda9887_attach(struct i2c_adapter *adap, int addr,
t->pinnacle_id = UNSET;
i2c_set_clientdata(&t->client, t);
i2c_attach_client(&t->client);
-
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
MOD_INC_USE_COUNT;
#endif
@@ -641,7 +641,7 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg)
t->radio = 1;
tda9887_configure(t);
break;
-
+
case AUDC_CONFIG_PINNACLE:
{
int *i = arg;
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index 97533e3bc..5261cb844 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -3,12 +3,12 @@
*
* Copyright (c) 2000 Gerd Knorr
* based on code by:
- * Eric Sandeen (eric_sandeen@bigfoot.com)
+ * Eric Sandeen (eric_sandeen@bigfoot.com)
* Steve VanDeBogart (vandebo@uclink.berkeley.edu)
* Greg Alexander (galexand@acm.org)
*
* This code is placed under the terms of the GNU General Public License
- *
+ *
* OPTIONS:
* debug - set to 1 if you'd like to see debug messages
*
@@ -213,7 +213,7 @@ static int chip_read(struct CHIPSTATE *chip)
i2c_clientname(&chip->c));
return -1;
}
- dprintk("%s: chip_read: 0x%x\n",i2c_clientname(&chip->c),buffer);
+ dprintk("%s: chip_read: 0x%x\n",i2c_clientname(&chip->c),buffer);
return buffer;
}
@@ -233,14 +233,14 @@ static int chip_read2(struct CHIPSTATE *chip, int subaddr)
return -1;
}
dprintk("%s: chip_read2: reg%d=0x%x\n",
- i2c_clientname(&chip->c),subaddr,read[0]);
+ i2c_clientname(&chip->c),subaddr,read[0]);
return read[0];
}
static int chip_cmd(struct CHIPSTATE *chip, char *name, audiocmd *cmd)
{
int i;
-
+
if (0 == cmd->count)
return 0;
@@ -279,7 +279,7 @@ static int chip_thread(void *data)
DECLARE_WAITQUEUE(wait, current);
struct CHIPSTATE *chip = data;
struct CHIPDESC *desc = chiplist + chip->type;
-
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61)
lock_kernel();
daemonize();
@@ -291,7 +291,7 @@ static int chip_thread(void *data)
allow_signal(SIGTERM);
#endif
dprintk("%s: thread started\n", i2c_clientname(&chip->c));
-
+
for (;;) {
add_wait_queue(&chip->wq, &wait);
if (!chip->done) {
@@ -306,10 +306,10 @@ static int chip_thread(void *data)
/* don't do anything for radio or if mode != auto */
if (chip->norm == VIDEO_MODE_RADIO || chip->mode != 0)
continue;
-
+
/* have a look what's going on */
desc->checkmode(chip);
-
+
/* schedule next check */
mod_timer(&chip->wt, jiffies+2*HZ);
}
@@ -366,14 +366,14 @@ static void generic_checkmode(struct CHIPSTATE *chip)
static int tda9840_getmode(struct CHIPSTATE *chip)
{
int val, mode;
-
+
val = chip_read(chip);
mode = VIDEO_SOUND_MONO;
if (val & TDA9840_DS_DUAL)
mode |= VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
if (val & TDA9840_ST_STEREO)
mode |= VIDEO_SOUND_STEREO;
-
+
dprintk ("tda9840_getmode(): raw chip read: %d, return: %d\n",
val, mode);
return mode;
@@ -383,7 +383,7 @@ static void tda9840_setmode(struct CHIPSTATE *chip, int mode)
{
int update = 1;
int t = chip->shadow.bytes[TDA9840_SW + 1] & ~0x7e;
-
+
switch (mode) {
case VIDEO_SOUND_MONO:
t |= TDA9840_MONO;
@@ -433,7 +433,7 @@ static void tda9840_setmode(struct CHIPSTATE *chip, int mode)
* in 1dB steps - mute is 0x27 */
-/* 0x02 - BA in TDA9855 */
+/* 0x02 - BA in TDA9855 */
/* lower 5 bits control bass gain from -12dB (0x06) to 16.5dB (0x19)
* in .5dB steps - 0 is 0x0E */
@@ -447,7 +447,7 @@ static void tda9840_setmode(struct CHIPSTATE *chip, int mode)
/* Unique to TDA9855: */
/* 4 bits << 2 control subwoofer/surround gain from -14db (0x1) to 14db (0xf)
* in 3dB steps - mute is 0x0 */
-
+
/* Unique to TDA9850: */
/* lower 4 bits control stereo noise threshold, over which stereo turns off
* set to values of 0x00 through 0x0f for Ster1 through Ster16 */
@@ -460,7 +460,7 @@ 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
+ * 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) */
@@ -513,7 +513,7 @@ static int tda985x_getmode(struct CHIPSTATE *chip)
{
int mode;
- mode = ((TDA985x_STP | TDA985x_SAPP) &
+ mode = ((TDA985x_STP | TDA985x_SAPP) &
chip_read(chip)) >> 4;
/* Add mono mode regardless of SAP and stereo */
/* Allows forced mono */
@@ -524,7 +524,7 @@ static void tda985x_setmode(struct CHIPSTATE *chip, int mode)
{
int update = 1;
int c6 = chip->shadow.bytes[TDA985x_C6+1] & 0x3f;
-
+
switch (mode) {
case VIDEO_SOUND_MONO:
c6 |= TDA985x_MONO;
@@ -552,7 +552,7 @@ static void tda985x_setmode(struct CHIPSTATE *chip, int mode)
#define TDA9873_AD 0x01 /* Adjust */
#define TDA9873_PT 0x02 /* Port */
-/* Subaddress 0x00: Switching Data
+/* Subaddress 0x00: Switching Data
* B7..B0:
*
* B1, B0: Input source selection
@@ -566,10 +566,10 @@ static void tda985x_setmode(struct CHIPSTATE *chip, int mode)
#define TDA9873_EXT_MONO 1
/* B3, B2: output signal select
- * B4 : transmission mode
+ * B4 : transmission mode
* 0, 0, 1 Mono
* 1, 0, 0 Stereo
- * 1, 1, 1 Stereo (reversed channel)
+ * 1, 1, 1 Stereo (reversed channel)
* 0, 0, 0 Dual AB
* 0, 0, 1 Dual AA
* 0, 1, 0 Dual BB
@@ -601,7 +601,7 @@ static void tda985x_setmode(struct CHIPSTATE *chip, int mode)
#define TDA9873_STEREO_ADJ 0x06 /* 0dB gain */
-/* Bits C6..C4 control FM stantard
+/* Bits C6..C4 control FM stantard
* C6, C5, C4
* 0, 0, 0 B/G (PAL FM)
* 0, 0, 1 M
@@ -623,7 +623,7 @@ static void tda985x_setmode(struct CHIPSTATE *chip, int mode)
#define TDA9873_IDR_FAST 1 << 7
-/* Subaddress 0x02: Port data */
+/* Subaddress 0x02: Port data */
/* E1, E0 free programmable ports P1/P2
0, 0 both ports low
@@ -646,11 +646,11 @@ static void tda985x_setmode(struct CHIPSTATE *chip, int mode)
*/
#define TDA9873_MOUT_MONO 0
#define TDA9873_MOUT_FMONO 0
-#define TDA9873_MOUT_DUALA 0
-#define TDA9873_MOUT_DUALB 1 << 3
-#define TDA9873_MOUT_ST 1 << 4
+#define TDA9873_MOUT_DUALA 0
+#define TDA9873_MOUT_DUALB 1 << 3
+#define TDA9873_MOUT_ST 1 << 4
#define TDA9873_MOUT_EXTM (1 << 4 ) & (1 << 3)
-#define TDA9873_MOUT_EXTL 1 << 5
+#define TDA9873_MOUT_EXTL 1 << 5
#define TDA9873_MOUT_EXTR (1 << 5 ) & (1 << 3)
#define TDA9873_MOUT_EXTLR (1 << 5 ) & (1 << 4)
#define TDA9873_MOUT_MUTE (1 << 5 ) & (1 << 4) & (1 << 3)
@@ -684,13 +684,13 @@ static void tda9873_setmode(struct CHIPSTATE *chip, int mode)
dprintk("tda9873_setmode(): external input\n");
return;
}
-
+
dprintk("tda9873_setmode(): chip->shadow.bytes[%d] = %d\n", TDA9873_SW+1, chip->shadow.bytes[TDA9873_SW+1]);
dprintk("tda9873_setmode(): sw_data = %d\n", sw_data);
switch (mode) {
case VIDEO_SOUND_MONO:
- sw_data |= TDA9873_TR_MONO;
+ sw_data |= TDA9873_TR_MONO;
break;
case VIDEO_SOUND_STEREO:
sw_data |= TDA9873_TR_STEREO;
@@ -885,7 +885,7 @@ static int tda9874a_getmode(struct CHIPSTATE *chip)
if(nsr & 0x02) /* NSR.S/MB=1 */
mode |= VIDEO_SOUND_STEREO;
#endif
- if(nsr & 0x01) /* NSR.D/SB=1 */
+ if(nsr & 0x01) /* NSR.D/SB=1 */
mode |= VIDEO_SOUND_LANG1 | VIDEO_SOUND_LANG2;
} else {
if(dsr & 0x02) /* DSR.IDSTE=1 */
@@ -1096,7 +1096,7 @@ static int tda8425_initialize(struct CHIPSTATE *chip)
static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
{
int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1;
-
+
if (mode & VIDEO_SOUND_LANG1) {
s1 |= TDA8425_S1_ML_SOUND_A;
s1 |= TDA8425_S1_STEREO_PSEUDO;
@@ -1104,10 +1104,10 @@ static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
} else if (mode & VIDEO_SOUND_LANG2) {
s1 |= TDA8425_S1_ML_SOUND_B;
s1 |= TDA8425_S1_STEREO_PSEUDO;
-
+
} else {
s1 |= TDA8425_S1_ML_STEREO;
-
+
if (mode & VIDEO_SOUND_MONO)
s1 |= TDA8425_S1_STEREO_MONO;
if (mode & VIDEO_SOUND_STEREO)
@@ -1166,7 +1166,7 @@ static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
static int ta8874z_getmode(struct CHIPSTATE *chip)
{
int val, mode;
-
+
val = chip_read(chip);
mode = VIDEO_SOUND_MONO;
if (val & TA8874Z_B1){
@@ -1278,7 +1278,7 @@ static struct CHIPDESC chiplist[] = {
.inputmute = TDA9873_MUTE | TDA9873_AUTOMUTE,
.inputmap = {0xa0, 0xa2, 0xa0, 0xa0, 0xc0},
.inputmask = TDA9873_INP_MASK|TDA9873_MUTE|TDA9873_AUTOMUTE,
-
+
},
{
.name = "tda9874h/a",
@@ -1544,7 +1544,7 @@ static int chip_detach(struct i2c_client *client)
wake_up_interruptible(&chip->wq);
wait_for_completion(&chip->texit);
}
-
+
i2c_detach_client(&chip->c);
kfree(chip);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
@@ -1612,7 +1612,7 @@ static int chip_command(struct i2c_client *client,
case VIDIOCSAUDIO:
{
struct video_audio *va = arg;
-
+
if (desc->flags & CHIP_HAS_VOLUME) {
chip->left = (min(65536 - va->balance,32768) *
va->volume) / 32768;
@@ -1638,7 +1638,7 @@ static int chip_command(struct i2c_client *client,
case VIDIOCSCHAN:
{
struct video_channel *vc = arg;
-
+
dprintk(KERN_DEBUG "tvaudio: VIDIOCSCHAN\n");
chip->norm = vc->norm;
break;
diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c
index ec59e4598..1d082d5be 100644
--- a/linux/drivers/media/video/tvmixer.c
+++ b/linux/drivers/media/video/tvmixer.c
@@ -92,7 +92,7 @@ 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));
@@ -158,7 +158,7 @@ static int tvmixer_ioctl(struct inode *inode, struct file *file, unsigned int cm
va.volume) / 32768;
ret = v4l_to_mix2(left,right);
break;
-
+
case MIXER_WRITE(SOUND_MIXER_BASS):
va.bass = mix_to_v4l(val);
client->driver->command(client,VIDIOCSAUDIO,&va);
@@ -348,7 +348,7 @@ static int tvmixer_clients(struct i2c_client *client)
devices[i].dev = client;
printk("tvmixer: %s (%s) registered with minor %d\n",
client->name,client->adapter->name,minor);
-
+
return 0;
}
@@ -357,7 +357,7 @@ static int tvmixer_clients(struct i2c_client *client)
static int __init tvmixer_init_module(void)
{
int i;
-
+
for (i = 0; i < DEV_MAX; i++)
devices[i].minor = -1;
@@ -367,7 +367,7 @@ static int __init tvmixer_init_module(void)
static void __exit tvmixer_cleanup_module(void)
{
int i;
-
+
i2c_del_driver(&driver);
for (i = 0; i < DEV_MAX; i++) {
if (devices[i].minor != -1) {
diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c
index 6e1389147..71c8f9174 100644
--- a/linux/drivers/media/video/v4l1-compat.c
+++ b/linux/drivers/media/video/v4l1-compat.c
@@ -117,7 +117,7 @@ set_v4l_control(struct inode *inode,
if (value && qctrl2.type == V4L2_CTRL_TYPE_BOOLEAN)
value = 65535;
ctrl2.id = qctrl2.id;
- ctrl2.value =
+ ctrl2.value =
(value * (qctrl2.maximum - qctrl2.minimum)
+ 32767)
/ 65535;
@@ -268,7 +268,7 @@ static int check_size(struct inode *inode,
memset(&desc2,0,sizeof(desc2));
memset(&fmt2,0,sizeof(fmt2));
-
+
desc2.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (0 != drv(inode,file,VIDIOC_ENUM_FMT, &desc2))
goto done;
@@ -338,7 +338,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
err = 0;
}
- memcpy(cap->name, cap2->card,
+ memcpy(cap->name, cap2->card,
min(sizeof(cap->name), sizeof(cap2->card)));
cap->name[sizeof(cap->name) - 1] = 0;
if (cap2->capabilities & V4L2_CAP_VIDEO_CAPTURE)
@@ -395,7 +395,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
if (0 != fbuf2.fmt.bytesperline)
buffer->bytesperline = fbuf2.fmt.bytesperline;
else {
- buffer->bytesperline =
+ buffer->bytesperline =
(buffer->width * buffer->depth + 7) & 7;
buffer->bytesperline >>= 3;
}
@@ -645,7 +645,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
if (err < 0)
dprintk("VIDIOCSPICT / VIDIOC_G_FMT: %d\n",err);
- if (fmt2->fmt.pix.pixelformat !=
+ if (fmt2->fmt.pix.pixelformat !=
palette_to_pixelformat(pict->palette)) {
fmt2->fmt.pix.pixelformat = palette_to_pixelformat(
pict->palette);
@@ -819,7 +819,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
memset(&aud2,0,sizeof(aud2));
memset(&tun2,0,sizeof(tun2));
-
+
aud2.index = aud->audio;
err = drv(inode, file, VIDIOC_S_AUDIO, &aud2);
if (err < 0) {
@@ -827,7 +827,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
break;
}
- set_v4l_control(inode, file, V4L2_CID_AUDIO_VOLUME,
+ set_v4l_control(inode, file, V4L2_CID_AUDIO_VOLUME,
aud->volume, drv);
set_v4l_control(inode, file, V4L2_CID_AUDIO_BASS,
aud->bass, drv);
@@ -875,16 +875,16 @@ v4l_compat_translate_ioctl(struct inode *inode,
fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
memset(&buf2,0,sizeof(buf2));
memset(fmt2,0,sizeof(*fmt2));
-
+
fmt2->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
if (err < 0) {
dprintk("VIDIOCMCAPTURE / VIDIOC_G_FMT: %d\n",err);
break;
}
- if (mm->width != fmt2->fmt.pix.width ||
+ if (mm->width != fmt2->fmt.pix.width ||
mm->height != fmt2->fmt.pix.height ||
- palette_to_pixelformat(mm->format) !=
+ palette_to_pixelformat(mm->format) !=
fmt2->fmt.pix.pixelformat)
{/* New capture format... */
fmt2->fmt.pix.width = mm->width;
@@ -967,11 +967,11 @@ v4l_compat_translate_ioctl(struct inode *inode,
case VIDIOCGVBIFMT: /* query VBI data capture format */
{
struct vbi_format *fmt = arg;
-
+
fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
memset(fmt2, 0, sizeof(*fmt2));
fmt2->type = V4L2_BUF_TYPE_VBI_CAPTURE;
-
+
err = drv(inode, file, VIDIOC_G_FMT, fmt2);
if (err < 0) {
dprintk("VIDIOCGVBIFMT / VIDIOC_G_FMT: %d\n", err);
@@ -991,7 +991,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
case VIDIOCSVBIFMT:
{
struct vbi_format *fmt = arg;
-
+
fmt2 = kmalloc(sizeof(*fmt2),GFP_KERNEL);
memset(fmt2, 0, sizeof(*fmt2));
@@ -999,10 +999,10 @@ v4l_compat_translate_ioctl(struct inode *inode,
fmt2->fmt.vbi.samples_per_line = fmt->samples_per_line;
fmt2->fmt.vbi.sampling_rate = fmt->sampling_rate;
fmt2->fmt.vbi.sample_format = V4L2_PIX_FMT_GREY;
- fmt2->fmt.vbi.start[0] = fmt->start[0];
- fmt2->fmt.vbi.count[0] = fmt->count[0];
- fmt2->fmt.vbi.start[1] = fmt->start[1];
- fmt2->fmt.vbi.count[1] = fmt->count[1];
+ fmt2->fmt.vbi.start[0] = fmt->start[0];
+ fmt2->fmt.vbi.count[0] = fmt->count[0];
+ fmt2->fmt.vbi.start[1] = fmt->start[1];
+ fmt2->fmt.vbi.count[1] = fmt->count[1];
fmt2->fmt.vbi.flags = fmt->flags;
err = drv(inode, file, VIDIOC_TRY_FMT, fmt2);
if (err < 0) {
@@ -1026,7 +1026,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
dprintk("VIDIOCSVBIFMT / VIDIOC_S_FMT: %d\n", err);
break;
}
-
+
default:
err = -ENOIOCTLCMD;
break;
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index 1b900c33b..5eb986bd6 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -36,7 +36,7 @@
/*
* Video4linux 1/2 integration by Justin Schoeman
* <justin@suntiger.ee.up.ac.za>
- * 2.4 PROCFS support ported from 2.4 kernels by
+ * 2.4 PROCFS support ported from 2.4 kernels by
* Iñaki García Etxebarria <garetxe@euskalnet.net>
* Makefile fix by "W. Michael Petullo" <mike@flyn.org>
* 2.4 devfs support ported from 2.4 kernels by
@@ -88,14 +88,14 @@ MODULE_LICENSE("GPL");
* Video Standard Operations (contributed by Michael Schimek)
*/
-/* This is the recommended method to deal with the framerate fields. More
+/* This is the recommended method to deal with the framerate fields. More
sophisticated drivers will access the fields directly. */
unsigned int
v4l2_video_std_fps(struct v4l2_standard *vs)
-{
+{
if (vs->frameperiod.numerator > 0)
- return (((vs->frameperiod.denominator << 8) /
- vs->frameperiod.numerator) +
+ return (((vs->frameperiod.denominator << 8) /
+ vs->frameperiod.numerator) +
(1 << 7)) / (1 << 8);
return 0;
}
@@ -136,7 +136,7 @@ int v4l2_prio_init(struct v4l2_prio_state *global)
memset(global,0,sizeof(*global));
return 0;
}
-
+
int v4l2_prio_change(struct v4l2_prio_state *global, enum v4l2_priority *local,
enum v4l2_priority new)
{
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 219143d0a..96964242a 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.12 2004/10/11 14:53:13 kraxel Exp $
+ * $Id: video-buf.c,v 1.13 2004/10/13 10:39:00 kraxel Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -9,7 +9,7 @@
* into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data (thus it is probably not useful for USB 1.1
* as data often must be uncompressed by the drivers).
- *
+ *
* (c) 2001-2004 Gerd Knorr <kraxel@bytesex.org> [SUSE Labs]
*
* This program is free software; you can redistribute it and/or modify
@@ -71,7 +71,7 @@ videobuf_vmalloc_to_sg(unsigned char *virt, int nr_pages)
sglist[i].length = PAGE_SIZE;
}
return sglist;
-
+
err:
kfree(sglist);
return NULL;
@@ -198,7 +198,7 @@ int videobuf_dma_pci_map(struct pci_dev *dev, struct videobuf_dmabuf *dma)
{
MAGIC_CHECK(dma->magic,MAGIC_DMABUF);
BUG_ON(0 == dma->nr_pages);
-
+
if (dma->pages) {
dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages,
dma->offset);
@@ -299,7 +299,7 @@ int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr)
{
int retval = 0;
DECLARE_WAITQUEUE(wait, current);
-
+
MAGIC_CHECK(vb->magic,MAGIC_BUFFER);
add_wait_queue(&vb->done, &wait);
while (vb->state == STATE_ACTIVE || vb->state == STATE_QUEUED) {
@@ -365,7 +365,7 @@ videobuf_iolock(struct pci_dev *pci, struct videobuf_buffer *vb,
err = videobuf_dma_pci_map(pci,&vb->dma);
if (0 != err)
return err;
-
+
return 0;
}
@@ -393,11 +393,11 @@ videobuf_queue_init(struct videobuf_queue *q,
INIT_LIST_HEAD(&q->stream);
}
-int
+int
videobuf_queue_is_busy(struct videobuf_queue *q)
{
int i;
-
+
if (q->streaming) {
dprintk(1,"busy: streaming active\n");
return 1;
@@ -646,7 +646,7 @@ videobuf_qbuf(void *priv, struct videobuf_queue *q,
retval = q->ops->buf_prepare(priv,buf,field);
if (0 != retval)
goto done;
-
+
list_add_tail(&buf->stream,&q->stream);
if (q->streaming) {
spin_lock_irqsave(q->irqlock,flags);
@@ -654,7 +654,7 @@ videobuf_qbuf(void *priv, struct videobuf_queue *q,
spin_unlock_irqrestore(q->irqlock,flags);
}
retval = 0;
-
+
done:
up(&q->lock);
return retval;
@@ -666,7 +666,7 @@ videobuf_dqbuf(void *priv, struct videobuf_queue *q,
{
struct videobuf_buffer *buf;
int retval;
-
+
down(&q->lock);
retval = -EBUSY;
if (q->reading)
@@ -707,7 +707,7 @@ int videobuf_streamon(void *priv, struct videobuf_queue *q)
struct list_head *list;
unsigned long flags;
int retval;
-
+
down(&q->lock);
retval = -EBUSY;
if (q->reading)
@@ -766,7 +766,7 @@ videobuf_read_zerocopy(void *priv, struct videobuf_queue *q,
retval = q->ops->buf_prepare(priv,q->read_buf,field);
if (0 != retval)
goto done;
-
+
/* start capture & wait */
spin_lock_irqsave(q->irqlock,flags);
q->ops->buf_queue(priv,q->read_buf);
@@ -900,7 +900,7 @@ int videobuf_read_start(void *priv, struct videobuf_queue *q)
void videobuf_read_stop(void *priv, struct videobuf_queue *q)
{
int i;
-
+
videobuf_queue_cancel(priv,q);
INIT_LIST_HEAD(&q->stream);
for (i = 0; i < VIDEO_MAX_FRAME; i++) {
@@ -920,7 +920,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
unsigned int *fc, bytes;
int err, retval;
unsigned long flags;
-
+
dprintk(2,"%s\n",__FUNCTION__);
down(&q->lock);
retval = -EBUSY;
@@ -960,7 +960,7 @@ ssize_t videobuf_read_stream(void *priv, struct videobuf_queue *q,
*fc = q->read_buf->field_count >> 1;
dprintk(1,"vbihack: %d\n",*fc);
}
-
+
/* copy stuff */
bytes = count;
if (bytes > q->read_buf->size - q->read_off)
diff --git a/linux/include/linux/videodev.h b/linux/include/linux/videodev.h
index 30ab076ce..8c16620df 100644
--- a/linux/include/linux/videodev.h
+++ b/linux/include/linux/videodev.h
@@ -44,7 +44,7 @@ struct video_device
unsigned int (*poll)(struct video_device *, struct file *, poll_table *);
int (*ioctl)(struct video_device *, unsigned int , void *);
int (*mmap)(struct video_device *, const char *, unsigned long);
- int (*initialize)(struct video_device *);
+ int (*initialize)(struct video_device *);
#endif
#if 1 /* to be removed in 2.7.x */
@@ -159,7 +159,7 @@ struct video_channel
#define VIDEO_VC_AUDIO 2 /* Channel has audio */
__u16 type;
#define VIDEO_TYPE_TV 1
-#define VIDEO_TYPE_CAMERA 2
+#define VIDEO_TYPE_CAMERA 2
__u16 norm; /* Norm set by channel */
};
@@ -198,7 +198,7 @@ struct video_picture
#define VIDEO_PALETTE_HI240 2 /* High 240 cube (BT848) */
#define VIDEO_PALETTE_RGB565 3 /* 565 16 bit RGB */
#define VIDEO_PALETTE_RGB24 4 /* 24bit RGB */
-#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
+#define VIDEO_PALETTE_RGB32 5 /* 32bit RGB */
#define VIDEO_PALETTE_RGB555 6 /* 555 15bit RGB */
#define VIDEO_PALETTE_YUV422 7 /* YUV422 capture */
#define VIDEO_PALETTE_YUYV 8
@@ -224,7 +224,7 @@ struct video_audio
#define VIDEO_AUDIO_MUTABLE 2
#define VIDEO_AUDIO_VOLUME 4
#define VIDEO_AUDIO_BASS 8
-#define VIDEO_AUDIO_TREBLE 16
+#define VIDEO_AUDIO_TREBLE 16
#define VIDEO_AUDIO_BALANCE 32
char name[16];
#define VIDEO_SOUND_MONO 1
@@ -298,11 +298,11 @@ struct video_mbuf
int frames; /* Frames */
int offsets[VIDEO_MAX_FRAME];
};
-
+
#define VIDEO_NO_UNIT (-1)
-
+
struct video_unit
{
int video; /* Video minor */
@@ -399,7 +399,7 @@ struct video_code
/* p1: = VIDEO_MODE_PAL, VIDEO_MODE_NTSC, etc ... */
#define VID_PLAY_GENLOCK 1
/* p1: 0 = OFF, 1 = ON */
- /* p2: GENLOCK FINE DELAY value */
+ /* p2: GENLOCK FINE DELAY value */
#define VID_PLAY_NORMAL 2
#define VID_PLAY_PAUSE 3
#define VID_PLAY_SINGLE_FRAME 4
@@ -447,7 +447,7 @@ struct video_code
#define VID_HARDWARE_CPIA 24
#define VID_HARDWARE_ZR36120 25 /* Zoran ZR36120/ZR36125 */
#define VID_HARDWARE_ZR36067 26 /* Zoran ZR36067/36060 */
-#define VID_HARDWARE_OV511 27
+#define VID_HARDWARE_OV511 27
#define VID_HARDWARE_ZR356700 28 /* Zoran 36700 series */
#define VID_HARDWARE_W9966 29
#define VID_HARDWARE_SE401 30 /* SE401 USB webcams */
diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
index 75d838922..15571c046 100644
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -95,20 +95,20 @@ enum v4l2_colorspace {
/* HD and modern captures. */
V4L2_COLORSPACE_REC709 = 3,
-
+
/* broken BT878 extents (601, luma range 16-253 instead of 16-235) */
V4L2_COLORSPACE_BT878 = 4,
-
+
/* These should be useful. Assume 601 extents. */
V4L2_COLORSPACE_470_SYSTEM_M = 5,
V4L2_COLORSPACE_470_SYSTEM_BG = 6,
-
+
/* I know there will be cameras that send this. So, this is
* unspecified chromaticities and full 0-255 on each of the
* Y'CbCr components
*/
V4L2_COLORSPACE_JPEG = 7,
-
+
/* For RGB colourspaces, this is probably a good start. */
V4L2_COLORSPACE_SRGB = 8,
};
@@ -319,14 +319,14 @@ struct v4l2_mpeg_compression {
/* program stream */
u16 ps_size;
u16 reserved_1; /* align */
-
+
/* audio */
enum v4l2_mpeg_audiotype au_type;
struct v4l2_bitrate au_bitrate;
u32 au_sample_rate;
u8 au_pesid;
u8 reserved_2[3]; /* align */
-
+
/* video */
enum v4l2_mpeg_videotype vi_type;
struct v4l2_bitrate vi_bitrate;
@@ -354,10 +354,10 @@ struct v4l2_jpegcompression
* must be 0..15 */
int APP_len; /* Length of data in JPEG APPn segment */
char APP_data[60]; /* Data in the JPEG APPn segment. */
-
+
int COM_len; /* Length of data in JPEG COM segment */
char COM_data[60]; /* Data in JPEG COM segment */
-
+
__u32 jpeg_markers; /* Which markers should go into the JPEG
* output. Unless you exactly know what
* you do, leave them untouched.
@@ -367,7 +367,7 @@ struct v4l2_jpegcompression
* The presence of the APP and COM marker
* is influenced by APP_len and COM_len
* ONLY, not by this property! */
-
+
#define V4L2_JPEG_MARKER_DHT (1<<3) /* Define Huffman Tables */
#define V4L2_JPEG_MARKER_DQT (1<<4) /* Define Quantization Tables */
#define V4L2_JPEG_MARKER_DRI (1<<5) /* Define Restart Interval */
@@ -490,7 +490,7 @@ struct v4l2_outputparm
*/
struct v4l2_cropcap {
- enum v4l2_buf_type type;
+ enum v4l2_buf_type type;
struct v4l2_rect bounds;
struct v4l2_rect defrect;
struct v4l2_fract pixelaspect;
diff --git a/linux/include/media/audiochip.h b/linux/include/media/audiochip.h
index fadc32dab..d3e9e3060 100644
--- a/linux/include/media/audiochip.h
+++ b/linux/include/media/audiochip.h
@@ -13,7 +13,7 @@
#define AUDIO_RADIO 0x01
#define AUDIO_EXTERN 0x02
#define AUDIO_INTERN 0x03
-#define AUDIO_OFF 0x04
+#define AUDIO_OFF 0x04
#define AUDIO_ON 0x05
#define AUDIO_EXTERN_1 AUDIO_EXTERN
#define AUDIO_EXTERN_2 0x06
diff --git a/linux/include/media/saa6752hs.h b/linux/include/media/saa6752hs.h
index 8485d2e49..135f9a682 100644
--- a/linux/include/media/saa6752hs.h
+++ b/linux/include/media/saa6752hs.h
@@ -1,4 +1,4 @@
-/*
+/*
saa6752hs.h - definition for saa6752hs MPEG encoder
Copyright (C) 2003 Andrew de Quincey <adq@lidskialf.net>
@@ -31,14 +31,14 @@ enum mpeg_bitrate_mode {
enum mpeg_audio_bitrate {
MPEG_AUDIO_BITRATE_256 = 0, /* 256 kBit/sec */
MPEG_AUDIO_BITRATE_384 = 1, /* 384 kBit/sec */
-
+
MPEG_AUDIO_BITRATE_MAX
};
#define MPEG_VIDEO_TARGET_BITRATE_MAX 27000
#define MPEG_VIDEO_MAX_BITRATE_MAX 27000
#define MPEG_TOTAL_BITRATE_MAX 27000
-
+
struct mpeg_params {
enum mpeg_bitrate_mode bitrate_mode;
unsigned int video_target_bitrate;
diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h
index 2128e8df7..5534d484b 100644
--- a/linux/include/media/tuner.h
+++ b/linux/include/media/tuner.h
@@ -1,5 +1,5 @@
-/*
+/*
tuner.h - definition for different tuners
Copyright (C) 1997 Markus Schroeder (schroedm@uni-duesseldorf.de)
@@ -70,7 +70,7 @@
#define TUNER_PHILIPS_ATSC 42
#define TUNER_PHILIPS_FM1236_MK3 43
#define TUNER_PHILIPS_4IN1 44 /* ATI TV Wonder Pro - Conexant */
-/* Microtune mergeged with Temic 12/31/1999 partially financed by Alps - these may be similar to Temic */
+/* Microtune mergeged with Temic 12/31/1999 partially financed by Alps - these may be similar to Temic */
#define TUNER_MICROTUNE_4049FM5 45
#define TUNER_LG_NTSC_TAPE 47
#define TUNER_TNF_8831BGFF 48
diff --git a/linux/include/media/video-buf.h b/linux/include/media/video-buf.h
index 3fd4d7db1..fdf5c71e2 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.7 2004/10/11 14:53:13 kraxel Exp $
+ * $Id: video-buf.h,v 1.8 2004/10/13 10:39:00 kraxel Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -9,7 +9,7 @@
* into PAGE_SIZE chunks). They also assume the driver does not need
* to touch the video data (thus it is probably not useful for USB as
* data often must be uncompressed by the drivers).
- *
+ *
* (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -102,7 +102,7 @@ int videobuf_dma_free(struct videobuf_dmabuf *dma);
* functions, additionally some commonly used fields for v4l buffers
* (width, height, lists, waitqueue) are in there. That struct should
* be used as first element in the drivers buffer struct.
- *
+ *
* about the mmap helpers (videobuf_mmap_*):
*
* The mmaper function allows to map any subset of contingous buffers.