summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/cx88')
-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
11 files changed, 279 insertions, 279 deletions
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);