diff mbox

Add support for Zolid Hybrid PCI card

Message ID 20090907124934.GA8339@systol-ng.god.lan (mailing list archive)
State Superseded
Headers show

Commit Message

spam@systol-ng.god.lan Sept. 7, 2009, 12:49 p.m. UTC
Hmm gmail front-end encoded the attachment as binary, retry.... 
----- snip -----

This patch adds support for Zolid Hybrid TV card. The results are
pretty encouraging DVB reception and analog TV reception are confirmed
to work. Might still need to find the GPIO pin that switches AGC on
the TDA18271 for even better reception.

see:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner
for more information.

Signed-off-by: Henk.Vergonet@gmail.com

Comments

Michael Krufky Sept. 7, 2009, 2:18 p.m. UTC | #1
On Mon, Sep 7, 2009 at 8:49 AM, <spam@systol-ng.god.lan> wrote:
> Hmm gmail front-end encoded the attachment as binary, retry....
> ----- snip -----
>
> This patch adds support for Zolid Hybrid TV card. The results are
> pretty encouraging DVB reception and analog TV reception are confirmed
> to work. Might still need to find the GPIO pin that switches AGC on
> the TDA18271 for even better reception.
>
> see:
> http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner
> for more information.
>
> Signed-off-by: Henk.Vergonet@gmail.com
>
>

Henk, thanks for your contribution, but this patch has problems.  This
should NOT be merged as it is here.  Please see below:

#1) It's just a copy of the HVR1120 configuration.  There tuner_config
= 3 value is definitely wrong for your board.  To prove my point,
notice that you added a case for your board to the switch..case block
in saa7134_tda8290_callback.  This will cause
saa7134_tda8290_18271_callback to get called, then the default case
will do nothing and the entire thing was a no-op.

The correct value for your board for tuner_config is 0.  Always try
the defaults before blindly copying somebody else's configuration.

#2) Card description reads, "NXP Europa DVB-T hybrid reference design"
but the card ID is SAA7134_BOARD_ZOLID_HYBRID_PCI.  I suggest to pick
one name for the sake of clarity, specifically, the actual board name.
 Feel free to indicate that it is based on a reference design in
comments.

#3) The change in saa7134-dvb will prevent an HVR1120 and your Zolid
board from working together in the same PC.  Please create a new case
block for the Zolid board, and create a new configuration structure
for the tda10048 -- do not edit the value of static structures
on-the-fly, and dont alter configuration of cards other than that of
the board that you are adding today.

#4) Does your card have a saa7131 on it or some other saa713x variant?
Is there actually a tda8290 present on the board?  Does the
tda8290_attach function sucess or fail?  Please send in a dmesg
snippit of the board functioning with your next patch.

#5)  Aren't there multiple versions of this board using different
steppings of the tda18271 tuner?  This I am not sure of, but I do
recall having issues bringing up the Zolid board months ago -- is this
actually working for you?

After you resubmit a cleaned up patch, we should see if anybody else
out there can test this for you.  A dmesg snippit of the board's
driver output would be nice.

Cheers,

Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c	Thu Sep 03 09:06:34 2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c	Mon Sep 07 00:16:24 2009 +0200
@@ -3521,6 +3521,35 @@ 
 			.gpio = 0x0800100, /* GPIO 23 HI for FM */
 		},
 	},
+	[SAA7134_BOARD_ZOLID_HYBRID_PCI] = {
+		.name           = "NXP Europa DVB-T hybrid reference design",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_TDA8290,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tuner_config   = 3,
+		.mpeg           = SAA7134_MPEG_DVB,
+		.ts_type	= SAA7134_MPEG_TS_PARALLEL,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 1,
+			.amux = TV,
+			.tv   = 1,
+		}, {
+			.name = name_comp1,
+			.vmux = 0,
+			.amux = LINE1,
+		}, {
+			.name = name_svideo,
+			.vmux = 6,
+			.amux = LINE1,
+		} },
+		.radio = {
+			.name = name_radio,
+			.amux = TV,
+		},
+	},
 	[SAA7134_BOARD_CINERGY_HT_PCMCIA] = {
 		.name           = "Terratec Cinergy HT PCMCIA",
 		.audio_clock    = 0x00187de7,
@@ -6429,6 +6458,12 @@ 
 		.subdevice    = 0x0138, /* LifeView FlyTV Prime30 OEM */
 		.driver_data  = SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM,
 	}, {
+		.vendor       = PCI_VENDOR_ID_PHILIPS,
+		.device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+		.subvendor    = PCI_VENDOR_ID_PHILIPS,
+		.subdevice    = 0x2004,
+		.driver_data  = SAA7134_BOARD_ZOLID_HYBRID_PCI,
+	}, {
 		/* --- boards without eeprom + subsystem ID --- */
 		.vendor       = PCI_VENDOR_ID_PHILIPS,
 		.device       = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -6655,6 +6690,7 @@ 
 	switch (dev->board) {
 	case SAA7134_BOARD_HAUPPAUGE_HVR1150:
 	case SAA7134_BOARD_HAUPPAUGE_HVR1120:
+	case SAA7134_BOARD_ZOLID_HYBRID_PCI:
 		/* tda8290 + tda18271 */
 		ret = saa7134_tda8290_18271_callback(dev, command, arg);
 		break;
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c	Thu Sep 03 09:06:34 2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c	Mon Sep 07 00:16:24 2009 +0200
@@ -1125,6 +1125,13 @@ 
 			goto dettach_frontend;
 		break;
 	case SAA7134_BOARD_HAUPPAUGE_HVR1120:
+	case SAA7134_BOARD_ZOLID_HYBRID_PCI:
+		/* match interface type of SAA713x and TDA10048 */
+                if (saa7134_boards[dev->board].ts_type == SAA7134_MPEG_TS_PARALLEL) {
+			hcw_tda10048_config.output_mode = TDA10048_PARALLEL_OUTPUT;
+		} else {
+			hcw_tda10048_config.output_mode = TDA10048_SERIAL_OUTPUT;
+		}
 		fe0->dvb.frontend = dvb_attach(tda10048_attach,
 					       &hcw_tda10048_config,
 					       &dev->i2c_adap);
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h	Thu Sep 03 09:06:34 2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134.h	Mon Sep 07 00:16:24 2009 +0200
@@ -297,6 +297,7 @@ 
 #define SAA7134_BOARD_AVERMEDIA_STUDIO_505  170
 #define SAA7134_BOARD_BEHOLD_X7             171
 #define SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM 172
+#define SAA7134_BOARD_ZOLID_HYBRID_PCI		173
 
 #define SAA7134_MAXBOARDS 32
 #define SAA7134_INPUT_MAX 8