Re: Building the current saa7134 snapshot.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I attach a patch file that much improves buildability for 2.4 series kernels. It doesn't quite fix the problem as saa7134-input.c is still built. It needs ir-common.c while doesn't build at all well. On my system I just removed saa7134-input.o from the Make.config and then it builds, installs, and seems to work. YMMV.

Philip

Bill Eldridge wrote:



Try the version from August 6 I believe, I had trouble
with later. However that's for saa7134 - people have
been having trouble with saa7133's I believe, and I'm
in PAL-land right now so testing mine is kind of worthless.

Philip Gladstone wrote:

Hi,

I'm having problems with the current saa7134 snapshot -- trying to build it on a 2.4.20 kernel. This is due to the addition of function calls like video_device_alloc and friends:

video_device_alloc, video_device_release
pci_name
ir_input_init, ir_extract_bits

These last two seem to be defined in ir-common.c, but this file is not built (and doesn't actually build due to missing defines like KEY_RADIO).

I suspect that these are related to 2.6 support, and It is not clear to me how to fix it for 2.4.

My real interest is in trying to make a new SAA7133 card work (Compro VideoMate TV -- PCI id 185b:c100). Not much happens with the stock 0.2.8 drivers (apart from a lot of VIDIOC_DQBUF errors), but this may be due to having the wrong tuner set. (Is this likely?)

And now I've got the dreaded video31 problem. I've got some version skew somewhere...... I'm going to bed......

Philip







--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list





--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list



--- saa7134-0.2.9-orig/saa7134-core.c	2003-08-28 05:17:40.000000000 -0400
+++ saa7134-0.2.9/saa7134-core.c	2003-09-09 21:18:49.000000000 -0400
@@ -131,6 +131,11 @@
 };
 #define OSSPCM_IOCTLS ARRAY_SIZE(v4l2_ioctls)
 
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+#define video_device_release(video_dev) do { video_unregister_device(video_dev); kfree(video_dev); } while (0)
+#endif
+
 void saa7134_print_ioctl(char *name, unsigned int cmd)
 {
 	char *dir;
@@ -599,10 +604,12 @@
 		if ((report & SAA7134_IRQ_REPORT_DONE_RA3))
 			saa7134_irq_oss_done(dev,status);
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
 		if ((report & (SAA7134_IRQ_REPORT_GPIO16 |
 			       SAA7134_IRQ_REPORT_GPIO18)) &&
 		    dev->remote)
 			saa7134_input_irq(dev);
+#endif
 
 	};
 	if (10 == loop) {
@@ -630,7 +637,9 @@
 	saa7134_vbi_init(dev);
 	if (card_has_ts(dev))
 		saa7134_ts_init(dev);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
 	saa7134_input_init(dev);
+#endif
 
 	switch (dev->pci->device) {
 	case PCI_DEVICE_ID_PHILIPS_SAA7134:
@@ -713,7 +722,11 @@
 {
 	struct video_device *vfd;
 	
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
 	vfd = video_device_alloc();
+#else
+	vfd = kmalloc(sizeof(*vfd),GFP_KERNEL);
+#endif
 	if (NULL == vfd)
 		return NULL;
 	*vfd = *template;
@@ -977,7 +990,9 @@
 	}
 	if (card_has_ts(dev))
 		saa7134_ts_fini(dev);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
 	saa7134_input_fini(dev);
+#endif
 	saa7134_vbi_fini(dev);
 	saa7134_video_fini(dev);
 	saa7134_tvaudio_fini(dev);
diff -u saa7134-0.2.9-orig/saa7134.h saa7134-0.2.9/saa7134.h
--- saa7134-0.2.9-orig/saa7134.h	2003-08-27 06:35:01.000000000 -0400
+++ saa7134-0.2.9/saa7134.h	2003-09-09 21:00:40.000000000 -0400
@@ -65,6 +65,7 @@
 #endif
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 # define need_resched() (current->need_resched)
+# define pci_name(x)	((x)->slot_name)
 #endif
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19)
 # define BUG_ON(condition) do { if ((condition)!=0) BUG(); } while(0)

[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux