Prelim support for FlyVideo2000 (PAL BG)

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



Hi,

This is my first attempt at posting code. I hope I got it right. I've
enclosed two diffs as MIME enclosures to avoid problems with mailers
truncating things (since the v4l2 digest is sent as MIME, I
guess most people should be able to handle it?).

The first diff, saa7134-0.1.5-fv2k-boardonly.diff just defines an entry
for the FlyVideo2000 TV Capture card (for PAL BG). It doesn't work
properly out of the box as TV audio is not enabled correctly. It touches
saa7134-core.c and saa7134.h to define the entries, otherwise no
code changes.

The proper diff, saa7134-0.1.5-fv2k.diff, addes several new fields to
the board definition structs, to account for the differences in Audio
Inputs for FlyVideo 2000. This patch is an educated guess on my part
for the other TV Capture cards, so pls. review. I've added a brief
explanation for the FlyVideo 2000 in an additional text file (part of the
diff).

Missing item(s):
Audio In for Composite Video / S-Video sources not working.
  I don't have the specs for the SAA7130/4 device (it's not availble from
  the Phillips website either), so I can't figure out the audio path
  routing.

S-Video color is not correct compared to the Composite Video Input.
  Can compensate somewhat manually by playing with hue and color but it
  doesn't give identical results.

Regards,
T.C.
----
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 : 2DB6 E00A 9B98 BD36 AF0A  0FE8 69D2 20E5 573C DBA3
diff -Naur saa7134-0.1.5/FlyVideo2K-specs.txt saa7134-0.1.5-fv2k/FlyVideo2K-specs.txt
--- saa7134-0.1.5/FlyVideo2K-specs.txt	Thu Jan  1 00:00:00 1970
+++ saa7134-0.1.5-fv2k/FlyVideo2K-specs.txt	Sun Feb 17 09:04:00 2002
@@ -0,0 +1,63 @@
+FlyVideo 2000 Specs
+===================
+TC Wan <tcwan@xxxxxxxxx>, 20020217
+
+The FlyVideo 2000 TV Capture card is a SAA7130 based card. It is very similar
+to the FlyVideo 3000 TV Capture card, which is based on SAA7134 (with addition
+of FM Radio input and Stereo TV audio support).
+
+FlyVideo 2000 Features
+----------------------
+1 TV RF Input
+1 S-Video Input
+1 Composite Video Input
+1 Audio Input
+1 Audio Output (Line Out to Soundcard)
+1 Remote Control CABLE Input (optional)
+
+-> FM Antenna Input	  } Present in
+-> Stereo TV audio decode } FlyVideo 3000
+
+Hardware Details
+----------------
+The board I have is marked LR 138 Rev. C.
+
+For the PAL-BG version of the FlyVideo 2000, the TV Tuner has model number 
+  TCL2002MB-1
+    2K1 001
+There are no other markings for the TV Tuner manufacturer that I can find.
+
+The PAL-BG TV Tuner uses Phillips TDA9800T and Phillips TDA6503AT for decoding.
+The TDA9800T is a Video IF PLL Demodulator, while the TDA6503AT is a 
+programmable mixer/frequency Synthesizer. As the programming bits used for the
+TDA6503AT is different from the default TDA6503 device, it is crucial that the
+correct tuner type is selected, otherwise the TV Tuner is not able to sync. 
+to the requested TV channel frequency. 
+
+The supported "LG PAL (newer TAPC series)" tuner is compatible with the 
+requirements for the TCL2002MB-1 Tuner.
+
+Other than the SAA7130 device, the PCI board has a Phillips HEF4052BT analog 
+audio mux and an unknown IC with markings "LVA001".
+
+Input Switching
+---------------
+The saa7134 module defines 5 Video Inputs and 3 Audio Inputs.
+
+Video			FlyVideo 2000 Source
+-----			--------------------
+Composite0		S-Video Input
+Composite1/Television*	TV Tuner Input
+Composite2		Unknown (Mirror/sideband signal from S-Video?)
+Composite3		Composite Video Input
+Composite4		Unknown (gray scanlines)
+
+* If Cardtype not recognized by saa7134 module, it is displayed as Composite1, 
+else it is recognized as Television Input.
+
+Audio			FlyVideo 2000 Source
+-----			--------------------
+TV			Static
+LINE1			Muted
+LINE2			TV Tuner Audio Input (!)
+
diff -Naur saa7134-0.1.5/saa7134-core.c saa7134-0.1.5-fv2k/saa7134-core.c
--- saa7134-0.1.5/saa7134-core.c	Mon Feb 11 17:26:40 2002
+++ saa7134-0.1.5-fv2k/saa7134-core.c	Sun Feb 17 08:53:08 2002
@@ -80,6 +80,9 @@
 		tuner_type:	TUNER_ABSENT,
 		tuner_input:	-1,
 		audio_clock:	0x00187de7,
+		tuner_audio:	-1,
+		composite_audio: LINE1,
+		radio:		-1,
 	},
 	[SAA7143_BOARD_PROTEUS_PRO] = {
 		/* /me */
@@ -87,6 +90,9 @@
 		tuner_type:	TUNER_PHILIPS_PAL,
 		tuner_input:	1,
 		audio_clock:	0x00187de7,
+		tuner_audio:	TV,
+		composite_audio: LINE1,
+		radio:		-1,
 	},
 	[SAA7143_BOARD_FLYVIDEO3000] = {
 		/* "Marco d'Itri" <md@xxxxxxxx> */
@@ -94,8 +100,20 @@
 		tuner_type:	TUNER_PHILIPS_PAL,
 		tuner_input:	1,
 		audio_clock:	0x00200000,
+		tuner_audio:	TV,
+		composite_audio: LINE1,
 		radio:          LINE2,
 	},
+	[SAA7143_BOARD_FLYVIDEO2000] = {
+		/* "TC Wan" <tcwan@xxxxxxxxx> */
+		name:		"LifeView FlyVIDEO2000",
+		tuner_type:	TUNER_LG_PAL_NEW_TAPC,	/* compatible with TCL2002MB-1 */
+		tuner_input:	1,
+		audio_clock:	0x00200000,
+		tuner_audio:	LINE2,
+		composite_audio: -1,			/* Unknown Input, leave undefined for now - tcwan 20020217 */
+		radio:		-1,
+	},
 };
 #define BOARDS (sizeof(boards)/sizeof(struct saa7134_board))
 
@@ -898,6 +916,12 @@
                 subvendor:    PCI_VENDOR_ID_PHILIPS,
 		subdevice:    0,
 		driver_data:  SAA7143_BOARD_FLYVIDEO3000,
+        },{
+                vendor:       PCI_VENDOR_ID_PHILIPS,
+                device:       PCI_DEVICE_ID_PHILIPS_SAA7130,
+                subvendor:    PCI_VENDOR_ID_PHILIPS,
+		subdevice:    0,
+		driver_data:  SAA7143_BOARD_FLYVIDEO2000,
 	},{
 		
 		/* --- default catch --- */
diff -Naur saa7134-0.1.5/saa7134-video.c saa7134-0.1.5-fv2k/saa7134-video.c
--- saa7134-0.1.5/saa7134-video.c	Mon Feb 11 17:25:37 2002
+++ saa7134-0.1.5-fv2k/saa7134-video.c	Sun Feb 17 08:56:45 2002
@@ -474,7 +474,8 @@
 	dprintk("video input = %d%s\n",input,is_tv ? " [TV]" : "");
 	dev->ctl_input = input;
 	saa_andorb(SAA7134_ANALOG_IN_CTRL1,0x0f,input);
-	saa7134_tvaudio_setinput(dev, is_tv ? TV : LINE1);
+	// saa7134_tvaudio_setinput(dev, is_tv ? TV : LINE1);
+	saa7134_tvaudio_setinput(dev, is_tv ? card_tuner_audio(dev) : card_composite_audio(dev));
 }
 
 static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale)
diff -Naur saa7134-0.1.5/saa7134.h saa7134-0.1.5-fv2k/saa7134.h
--- saa7134-0.1.5/saa7134.h	Mon Feb 11 17:25:04 2002
+++ saa7134-0.1.5-fv2k/saa7134.h	Sun Feb 17 08:49:25 2002
@@ -124,18 +124,23 @@
 #define SAA7143_BOARD_UNKNOWN           0
 #define SAA7143_BOARD_PROTEUS_PRO       1
 #define SAA7143_BOARD_FLYVIDEO3000      2
+#define SAA7143_BOARD_FLYVIDEO2000      3
 
 struct saa7134_board {
 	char                    *name;
 	int                     tuner_type;
 	int                     tuner_input;
 	int                     audio_clock;
+	enum saa7134_audio_in   tuner_audio;
+	enum saa7134_audio_in   composite_audio;
 	enum saa7134_audio_in   radio;
 };
 
 #define card_hasaudio(dev)    (dev->pci->device == PCI_DEVICE_ID_PHILIPS_SAA7134)
 #define card_tuner_type(dev)  (saa7134_boards[dev->board].tuner_type)
 #define card_tuner_input(dev) (saa7134_boards[dev->board].tuner_input)
+#define card_tuner_audio(dev) (saa7134_boards[dev->board].tuner_audio)
+#define card_composite_audio(dev) (saa7134_boards[dev->board].composite_audio)
 
 /* ----------------------------------------------------------- */
 /* device / file handle status                                 */
diff -Naur saa7134-0.1.5/saa7134-core.c saa7134-0.1.5-fv2k/saa7134-core.c
--- saa7134-0.1.5/saa7134-core.c	Mon Feb 11 17:26:40 2002
+++ saa7134-0.1.5-fv2k/saa7134-core.c	Sun Feb 17 07:59:43 2002
@@ -96,6 +96,13 @@
 		audio_clock:	0x00200000,
 		radio:          LINE2,
 	},
+	[SAA7143_BOARD_FLYVIDEO2000] = {
+		/* "TC Wan" <tcwan@xxxxxxxxx> */
+		name:		"LifeView FlyVIDEO2000",
+		tuner_type:	TUNER_LG_PAL_NEW_TAPC,	/* compatible with TCL2002MB-1 */
+		tuner_input:	1,
+		audio_clock:	0x00200000,
+	},
 };
 #define BOARDS (sizeof(boards)/sizeof(struct saa7134_board))
 
@@ -898,6 +905,12 @@
                 subvendor:    PCI_VENDOR_ID_PHILIPS,
 		subdevice:    0,
 		driver_data:  SAA7143_BOARD_FLYVIDEO3000,
+        },{
+                vendor:       PCI_VENDOR_ID_PHILIPS,
+                device:       PCI_DEVICE_ID_PHILIPS_SAA7130,
+                subvendor:    PCI_VENDOR_ID_PHILIPS,
+		subdevice:    0,
+		driver_data:  SAA7143_BOARD_FLYVIDEO2000,
 	},{
 		
 		/* --- default catch --- */
diff -Naur saa7134-0.1.5/saa7134.h saa7134-0.1.5-fv2k/saa7134.h
--- saa7134-0.1.5/saa7134.h	Mon Feb 11 17:25:04 2002
+++ saa7134-0.1.5-fv2k/saa7134.h	Sun Feb 17 07:53:02 2002
@@ -124,6 +124,7 @@
 #define SAA7143_BOARD_UNKNOWN           0
 #define SAA7143_BOARD_PROTEUS_PRO       1
 #define SAA7143_BOARD_FLYVIDEO3000      2
+#define SAA7143_BOARD_FLYVIDEO2000      3
 
 struct saa7134_board {
 	char                    *name;

[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