Skip to contentSkip to conversation

cx88 update.

PATCH New Gerd Knorr 1 participant 1 message Apr 5, 2004 Media (V4L/DVB)

lore
Share & tools
lore

Gerd Knorr

author
#0 lore raw

PATCH 1/1 cx88 update.

Hi,

This is a update for the cx88 driver. There are *lots* of changes:

* vbi support was added.
* plenty of fixes for audio support (there are still problems through).
* new cards added.
* serveral minor tweaks.

please apply,

Gerd

drivers/media/video/cx88/Makefile +1 -1
diff -up linux-2.6.5/drivers/media/video/cx88/Makefile linux/drivers/media/video/cx88/Makefile
@@ -1,5 +1,5 @@
 cx88xx-objs	:= cx88-cards.o cx88-core.o
-cx8800-objs	:= cx88-video.o cx88-tvaudio.o cx88-i2c.o
+cx8800-objs	:= cx88-video.o cx88-tvaudio.o cx88-i2c.o cx88-vbi.o
 
 obj-$(CONFIG_VIDEO_CX88) += cx88xx.o cx8800.o
 
drivers/media/video/cx88/cx88-cards.c +101 -5

178 lines not on this page · raw message

drivers/media/video/cx88/cx88-core.c +12 -24
diff -up linux-2.6.5/drivers/media/video/cx88/cx88-core.c linux/drivers/media/video/cx88/cx88-core.c
@@ -100,15 +100,6 @@ static const char *v4l2_ioctls[] = {
 };
 #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
 
-static const char *osspcm_ioctls[] = {
-	"RESET", "SYNC", "SPEED", "STEREO", "GETBLKSIZE", "SETFMT",
-	"CHANNELS", "?", "POST", "SUBDIVIDE", "SETFRAGMENT", "GETFMTS",
-	"GETOSPACE", "GETISPACE", "NONBLOCK", "GETCAPS", "GET/SETTRIGGER",
-	"GETIPTR", "GETOPTR", "MAPINBUF", "MAPOUTBUF", "SETSYNCRO",
-	"SETDUPLEX", "GETODELAY"
-};
-#define OSSPCM_IOCTLS ARRAY_SIZE(v4l2_ioctls)
-
 void cx88_print_ioctl(char *name, unsigned int cmd)
 {
 	char *dir;
@@ -131,15 +122,6 @@ void cx88_print_ioctl(char *name, unsign
 		       name, cmd, dir, (_IOC_NR(cmd) < V4L2_IOCTLS) ?
 		       v4l2_ioctls[_IOC_NR(cmd)] : "???");
 		break;
-	case 'P':
-		printk(KERN_DEBUG "%s: ioctl 0x%08x (oss dsp, %s, SNDCTL_DSP_%s)\n",
-		       name, cmd, dir, (_IOC_NR(cmd) < OSSPCM_IOCTLS) ?
-		       osspcm_ioctls[_IOC_NR(cmd)] : "???");
-		break;
-	case 'M':
-		printk(KERN_DEBUG "%s: ioctl 0x%08x (oss mixer, %s, #%d)\n",
-		       name, cmd, dir, _IOC_NR(cmd));
-		break;
 	default:
 		printk(KERN_DEBUG "%s: ioctl 0x%08x (???, %s, #%d)\n",
 		       name, cmd, dir, _IOC_NR(cmd));
@@ -296,6 +278,7 @@ struct sram_channel cx88_sram_channels[]
 		.name       = "video y / packed",
 		.cmds_start = 0x180040,
 		.ctrl_start = 0x180400,
+	        .cdt        = 0x180400 + 64,
 		.fifo_start = 0x180c00,
 		.fifo_size  = 0x002800,
 		.ptr1_reg   = MO_DMA21_PTR1,
@@ -307,6 +290,7 @@ struct sram_channel cx88_sram_channels[]
 		.name       = "video u",
 		.cmds_start = 0x180080,
 		.ctrl_start = 0x1804a0,
+	        .cdt        = 0x1804a0 + 64,
 		.fifo_start = 0x183400,
 		.fifo_size  = 0x000800,
 		.ptr1_reg   = MO_DMA22_PTR1,
@@ -318,6 +302,7 @@ struct sram_channel cx88_sram_channels[]
 		.name       = "video v",
 		.cmds_start = 0x1800c0,
 		.ctrl_start = 0x180540,
+	        .cdt        = 0x180540 + 64,
 		.fifo_start = 0x183c00,
 		.fifo_size  = 0x000800,
 		.ptr1_reg   = MO_DMA23_PTR1,
@@ -329,6 +314,7 @@ struct sram_channel cx88_sram_channels[]
 		.name       = "vbi",
 		.cmds_start = 0x180100,
 		.ctrl_start = 0x1805e0,
+	        .cdt        = 0x1805e0 + 64,
 		.fifo_start = 0x184400,
 		.fifo_size  = 0x001000,
 		.ptr1_reg   = MO_DMA24_PTR1,
@@ -340,6 +326,7 @@ struct sram_channel cx88_sram_channels[]
 		.name       = "audio from",
 		.cmds_start = 0x180140,
 		.ctrl_start = 0x180680,
+	        .cdt        = 0x180680 + 64,
 		.fifo_start = 0x185400,
 		.fifo_size  = 0x000200,
 		.ptr1_reg   = MO_DMA25_PTR1,
@@ -351,8 +338,9 @@ struct sram_channel cx88_sram_channels[]
 		.name       = "audio to",
 		.cmds_start = 0x180180,
 		.ctrl_start = 0x180720,
-		.fifo_start = 0x185600,
-		.fifo_size  = 0x000200,
+	        .cdt        = 0x180680 + 64,  /* same as audio IN */
+		.fifo_start = 0x185400,       /* same as audio IN */
+		.fifo_size  = 0x000200,       /* same as audio IN */
 		.ptr1_reg   = MO_DMA26_PTR1,
 		.ptr2_reg   = MO_DMA26_PTR2,
 		.cnt1_reg   = MO_DMA26_CNT1,
@@ -368,7 +356,7 @@ int cx88_sram_channel_setup(struct cx880
 	u32 cdt;
 
 	bpl   = (bpl + 7) & ~7; /* alignment */
-	cdt   = ch->ctrl_start + 64;
+	cdt   = ch->cdt;
 	lines = ch->fifo_size / bpl;
 	if (lines > 6)
 		lines = 6;
@@ -429,13 +417,13 @@ int cx88_risc_decode(u32 risc)
 	};
 	int i;
 
-	printk("0x%08x [ %s", risc, instr[risc >> 28] ?
-				instr[risc >> 28] : "INVALID");
+	printk("0x%08x [ %s", risc,
+	       instr[risc >> 28] ? instr[risc >> 28] : "INVALID");
 	for (i = ARRAY_SIZE(bits)-1; i >= 0; i--)
 		if (risc & (1 << (i + 12)))
 			printk(" %s",bits[i]);
 	printk(" count=%d ]\n", risc & 0xfff);
-	return incr[risc >> 28] ? 1 : incr[risc >> 28];
+	return incr[risc >> 28] ? incr[risc >> 28] : 1;
 }
 
 void cx88_risc_disasm(struct cx8800_dev *dev,
drivers/media/video/cx88/cx88-i2c.c +3 -1
diff -up linux-2.6.5/drivers/media/video/cx88/cx88-i2c.c linux/drivers/media/video/cx88/cx88-i2c.c
@@ -152,7 +152,7 @@ int __devinit cx8800_i2c_init(struct cx8
 	       sizeof(dev->i2c_client));
 
 	dev->i2c_adap.dev.parent = &dev->pci->dev;
-	strcpy(dev->i2c_adap.name,dev->name);
+	strlcpy(dev->i2c_adap.name,dev->name,sizeof(dev->i2c_adap.name));
         dev->i2c_algo.data = dev;
         i2c_set_adapdata(&dev->i2c_adap,dev);
         dev->i2c_adap.algo_data = &dev->i2c_algo;
@@ -162,6 +162,8 @@ int __devinit cx8800_i2c_init(struct cx8
 	cx8800_bit_setsda(dev,1);
 
 	dev->i2c_rc = i2c_bit_add_bus(&dev->i2c_adap);
+	printk("%s: i2c register %s\n", dev->name,
+	       (0 == dev->i2c_rc) ? "ok" : "FAILED");
 	return dev->i2c_rc;
 }
 
drivers/media/video/cx88/cx88-reg.h +4 -1
diff -up linux-2.6.5/drivers/media/video/cx88/cx88-reg.h linux/drivers/media/video/cx88/cx88-reg.h
@@ -146,6 +146,8 @@
 #define MO_INPUT_FORMAT     0x310104
 #define MO_AGC_BURST        0x31010c
 #define MO_CONTR_BRIGHT     0x310110
+#define MO_UV_SATURATION    0x310114
+#define MO_HUE              0x310118
 #define MO_HTOTAL           0x310120
 #define MO_HDELAY_EVEN      0x310124
 #define MO_HDELAY_ODD       0x310128
@@ -175,6 +177,7 @@
 #define MO_VBI_PACKET       0x310188 // vbi packet size / delay
 #define MO_FIELD_COUNT      0x310190 // field counter
 #define MO_VIP_CONFIG       0x310194
+#define MO_VBOS_CONTROL	    0x3101a8
 
 #define MO_AGC_BACK_VBI     0x310200
 #define MO_AGC_SYNC_TIP1    0x310208
@@ -406,7 +409,7 @@
 #define AUD_PDF_DDS_CNST_BYTE1   0x320d02
 #define AUD_PDF_DDS_CNST_BYTE0   0x320d03
 #define AUD_PHACC_FREQ_8MSB      0x320d2a
-#define AUD_PHACC_FREQ_8LSB      0x320d23
+#define AUD_PHACC_FREQ_8LSB      0x320d2b
 #define AUD_QAM_MODE             0x320d04
 
 
drivers/media/video/cx88/cx88-tvaudio.c +323 -71

525 lines not on this page · raw message

drivers/media/video/cx88/cx88-vbi.c +228 -0

228 lines not on this page · raw message

drivers/media/video/cx88/cx88-video.c +442 -80

920 lines not on this page · raw message

drivers/media/video/cx88/cx88.h +47 -6

154 lines not on this page · raw message

Signature · 1 line
http://bigendian.bytesex.org