Patch for FlyVideo2000 fixes against saa7134-20020311.tar.gz

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



Hi Gerd,

Enclosed is a patch to fixup some minor issues with FlyVideo2000 support
in your latest saa7134 snapshot. Most notable is that the Composite1
Video Input is Input 3 rather than Input 1 (S-Video). I've added an entry
for S-Video In, but the color is still out of spec. In addition,
I've added support for muting on the FlyVideo2000 via audio
path switching between LINE1 and LINE2.

I built it against kernel-2.4.19-pre3 (from kernel.org) with gcc-2.96-98
(RH 7.2 compiler toolchain).

Some unresolved issues:

1. (not a saa7134 issue, but a kernel issue)
   Kernel 2.4.19-pre3 defines a Machine Check Exception option in the
   Processor Type menu. When compiled for Pentium-Pro/Celeron/Pentium II,
   I consistently hang on boot, after the line "Intel Machine Check
   Architecture Supported" appears. Booting with kernel option "nomce"
   works though. Looks like a bug in the kernel's MCE support?
   (This happened on both a PII-266, and a Celeron-466, both on VIA
    chipsets).

2. S-Video color is out of spec compared with Composite In. Is this
   something easy to fix?

3. If I moved the position of the Television entry to after the
   S-Video1 entry, xawtv 3.71 would not switch to the TV video signal
   properly on startup, though audio path is correct. Reselection of
   "Television" would work. (The debug output indicates that the
   Television input is selected, but somehow the hardware is not
   programmed correctly but selecting a non-valid Video input source
   e.g., video input 2 or 4). [Possible gcc bug?]

   The patch as submitted works around this problem by defining S-Video1
   input last.

4. xawtv experiences worse 'feathering' effect with this snapshot, most
   notable in full-screen mode. I'm running on XFree-4.1, Riva TNT2
   (NVidia drivers).

That's all for now.

T.C.


-----saa7134-0.1.5-fv2k.diff------------ cut here -----------------------
diff -Naur saa7134-0.1.5/README saa7134-0.1.5-fv2k/README
--- saa7134-0.1.5/README	Sat Feb  9 13:53:36 2002
+++ saa7134-0.1.5-fv2k/README	Wed Mar 13 16:04:48 2002
@@ -33,7 +33,7 @@
 Build
 =====

-Pick up videodev + v4l2 patches from http://bytesex.org/patches/.
+Pick up videodev, v4l2 & vmalloc patches from http://bytesex.org/patches/.
 Build, install + boot the new kernel.  Type "make" to build the driver
 now.  "make install" installs the driver.  "modprobe saa7134" should
 load it now.
diff -Naur saa7134-0.1.5/saa7134-cards.c saa7134-0.1.5-fv2k/saa7134-cards.c
--- saa7134-0.1.5/saa7134-cards.c	Mon Mar 11 10:27:30 2002
+++ saa7134-0.1.5-fv2k/saa7134-cards.c	Wed Mar 13 16:30:54 2002
@@ -30,6 +30,7 @@
 static char name_radio[] = "Radio";
 static char name_tv[]    = "Television";
 static char name_ext1[]  = "Composite1";
+static char name_ext2[]  = "S-Video1";

 /* ------------------------------------------------------------------ */
 /* board config info                                                  */
@@ -89,15 +90,23 @@
 		gpiomask:       0x6000,
 		inputs: {{
 			name: name_ext1,
-			vmux: 0,
+			vmux: 3,
 			amux: LINE2,
 			gpio: 0x4000,
+			ext_mute: 1,
 		},{
 			name: name_tv,
 			vmux: 1,
 			amux: LINE2,
 			gpio: 0x0000,
 			tv:   1,
+			ext_mute: 1,
+		},{
+			name: name_ext2,
+			vmux: 0,
+			amux: LINE2,
+			gpio: 0x4000,
+			ext_mute: 1,
 		}},
 	},
 };
diff -Naur saa7134-0.1.5/saa7134-tvaudio.c saa7134-0.1.5-fv2k/saa7134-tvaudio.c
--- saa7134-0.1.5/saa7134-tvaudio.c	Mon Mar 11 10:17:23 2002
+++ saa7134-0.1.5-fv2k/saa7134-tvaudio.c	Wed Mar 13 16:04:10 2002
@@ -145,8 +145,17 @@

 void saa7134_tvaudio_setmute(struct saa7134_dev *dev)
 {
-	saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
-		   (dev->ctl_mute || dev->automute) ? 0xff : 0xbb);
+	struct saa7134_input *in;
+	in = &card_in(dev,dev->ctl_input);
+	if (!in->ext_mute) {
+	   saa_writeb(SAA7134_AUDIO_MUTE_CTRL,
+		      (dev->ctl_mute || dev->automute) ? 0xff : 0xbb);
+	} else {
+	   if (dev->ctl_mute || dev->automute)
+	      saa_andorb(SAA7134_ANALOG_IO_SELECT, 0x07, 0x00);	/* LINE1 */
+	   else
+	      saa7134_tvaudio_setinput(dev,in);
+	}
 }

 void saa7134_tvaudio_setinput(struct saa7134_dev *dev,
diff -Naur saa7134-0.1.5/saa7134.h saa7134-0.1.5-fv2k/saa7134.h
--- saa7134-0.1.5/saa7134.h	Mon Mar 11 10:27:05 2002
+++ saa7134-0.1.5-fv2k/saa7134.h	Tue Mar 12 08:24:43 2002
@@ -120,7 +120,7 @@
 	int                     vmux;
 	enum saa7134_audio_in   amux;
 	int                     gpio;
-	int                     tv:1;
+	int                     tv:1,ext_mute:1;
 };

 struct saa7134_board {
----------------- cut here ---------------------------------------


----
Wan Tat Chee (Lecturer)
School of Computer Science, Univ. Science Malaysia,
11800 Minden, Penang, Malaysia.          Ofc Ph: +604 657-7888 x 3617
Internet: tcwan@xxxxxxxxx            Web: http://nrg.cs.usm.my/~tcwan
GPG Key : http://nrg.cs.usm.my/~tcwan/tcw_gpg.asc
F'print :  FB0F CED7 85A5 ECF9 DEF0  50E8 A550 A0D2 8638 B1EB





[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