Skip to contentSkip to conversation

Add support for Zolid Hybrid PCI card

PATCH In review Henk 5 participants 18 messages Sep 7, 2009 – Dec 8, 2009 2 messages not in the archive Media (V4L/DVB)

lore
Share & tools
lore

Henk

author
#0 lore raw

PATCH 1/1 Add support for Zolid Hybrid PCI card

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.

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

Signed-off-by [email protected]
linux/drivers/media/video/saa7134/saa7134-cards.c +36 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -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;
linux/drivers/media/video/saa7134/saa7134-dvb.c +7 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -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);
linux/drivers/media/video/saa7134/saa7134.h +1 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134.h
@@ -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

_______________________________________________
linux-dvb users mailing list
For V4L/DVB development, please use instead [email protected] [email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

author
#1 lore raw

PATCH 1/1 Add support for Zolid Hybrid PCI card

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.

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

Signed-off-by [email protected]
linux/drivers/media/video/saa7134/saa7134-cards.c +36 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -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;
linux/drivers/media/video/saa7134/saa7134-dvb.c +7 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -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);
linux/drivers/media/video/saa7134/saa7134.h +1 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134.h
@@ -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
#2 lore raw

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 [email protected]
linux/drivers/media/video/saa7134/saa7134-cards.c +36 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -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;
linux/drivers/media/video/saa7134/saa7134-dvb.c +7 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -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);
linux/drivers/media/video/saa7134/saa7134.h +1 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134.h
@@ -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
#3 lore raw
Quoted 8 lines · On Mon, Sep 7, 2009 at 8:49 AM, <[email protected]> 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.

Quoted 7 lines

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

Signed-off-by [email protected]

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

#4 lore raw
Quoted 10 lines · Michael Krufky
Quoted 10 lines

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.

Quoted 6 lines
Quoted 3 lines
Signed-off-by [email protected]

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

Thanks for the review.

Quoted 10 lines

#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.

You're right, changed tuner_config to zero.

Quoted 6 lines

#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.

Fair enough.

Quoted 6 lines

#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.

Ok I was assuming configuration parameters get copied in the tuner state.

Quoted 6 lines

#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.

Well the chip is labeled as SAA7131E/03/G, according to the NXP docs its a SAA7135 combined with a TDA8295 analog IF demod.

dmesg is attached below.

Quoted 4 lines

#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?

Well all the references on the net refer to a tda18271/C2 version.

I have tested dvb reception just now, with a good antenna, and it works get good audio and video. I still need to test analog reception.

Also I assume selectivity can be better as I assume the V_AGC pin of the TDA18271 is connected to some GPIO pin.

Quoted 8 lines

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

Can you take a peek at the improved patch below?

dmesg:

[280156.190062] saa7130/34: v4l2 driver version 0.2.15 loaded
[280156.190234] saa7133[0]: found at 0000:04:00.0, rev: 209, irq: 16, latency: 64, mmio: 0xfebff800
[280156.190271] saa7133[0]: subsystem: 1131:2004, board: Zolid Hybrid TV Tuner PCI [card=173,autodetected]
[280156.190445] saa7133[0]: board init: gpio is 400100
[280156.190481] IRQ 16/saa7133[0]: IRQF_DISABLED is not guaranteed on shared IRQs
[280156.372530] saa7133[0]: i2c eeprom 00: 31 11 04 20 54 20 1c 00 43 43 a9 1c 55 d2 b2 92
[280156.372579] saa7133[0]: i2c eeprom 10: 00 ff 86 0f ff 20 ff ff ff ff ff ff ff ff ff ff
[280156.372622] saa7133[0]: i2c eeprom 20: 01 40 01 02 03 01 01 03 08 ff 00 b2 ff ff ff ff
[280156.372664] saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372715] saa7133[0]: i2c eeprom 40: ff 35 00 c0 96 10 03 32 21 05 ff ff ff ff ff ff
[280156.372758] saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372800] saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372842] saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372885] saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372927] saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372969] saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373012] saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373054] saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373097] saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373139] saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373181] saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373229] i2c-adapter i2c-3: Invalid 7-bit address 0x7a
[280156.500405] tuner 3-004b: chip found @ 0x96 (saa7133[0])
[280156.660034] tda829x 3-004b: setting tuner address to 60
[280156.738826] tda18271 3-0060: creating new instance
[280156.820031] TDA18271HD/C2 detected @ 3-0060
[280159.210047] tda18271: performing RF tracking filter calibration
[280192.310026] tda18271: RF tracking filter calibration complete
[280192.420033] tda829x 3-004b: type set to tda8290+18271
[280200.470374] saa7133[0]: dsp access error
[280200.602731] saa7133[0]: registered device video0 [v4l2]
[280200.602842] saa7133[0]: registered device vbi0
[280200.602945] saa7133[0]: registered device radio0
[280200.659811] dvb_init() allocating 1 frontend
[280200.920034] tda829x 3-004b: type set to tda8290
[280200.960408] tda18271 3-0060: attaching existing instance
[280200.960426] DVB: registering new adapter (saa7133[0])
[280200.960440] DVB: registering adapter 0 frontend 0 (NXP TDA10048HN DVB-T)...
[280201.780031] tda10048_firmware_upload: waiting for firmware upload (dvb-fe-tda10048-1.0.fw)...
[280201.780054] saa7134 0000:04:00.0: firmware: requesting dvb-fe-tda10048-1.0.fw
[280201.794323] tda10048_firmware_upload: firmware read 24878 bytes.
[280201.794342] tda10048_firmware_upload: firmware uploading
[280207.010051] tda10048_firmware_upload: firmware uploaded
[280207.404727] saa7134 ALSA driver for DMA sound loaded
[280207.404763] IRQ 16/saa7133[0]: IRQF_DISABLED is not guaranteed on shared IRQs
[280207.404812] saa7133[0]/alsa: saa7133[0] at 0xfebff800 irq 16 registered as card -1

Here's a new patch:

linux/drivers/media/video/saa7134/saa7134-cards.c +35 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -3521,6 +3521,35 @@
 			.gpio = 0x0800100, /* GPIO 23 HI for FM */
 		},
 	},
+	[SAA7134_BOARD_ZOLID_HYBRID_PCI] = {
+		.name           = "Zolid Hybrid TV Tuner PCI",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_TDA8290,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tuner_config   = 0,
+		.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,
linux/drivers/media/video/saa7134/saa7134-dvb.c +25 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1013,6 +1013,18 @@
 	.probe_tuner = TDA829X_DONT_PROBE,
 };
 
+static struct tda10048_config zolid_tda10048_config = {
+	.demod_address    = 0x10 >> 1,
+	.output_mode      = TDA10048_PARALLEL_OUTPUT,
+	.fwbulkwritelen   = TDA10048_BULKWRITE_200,
+	.inversion        = TDA10048_INVERSION_ON,
+	.dtv6_if_freq_khz = TDA10048_IF_3300,
+	.dtv7_if_freq_khz = TDA10048_IF_3500,
+	.dtv8_if_freq_khz = TDA10048_IF_4000,
+	.clk_freq_khz     = TDA10048_CLK_16000,
+	.disable_gate_access = 1,
+};
+
 /* ==================================================================
  * Core code
  */
@@ -1124,6 +1136,19 @@
 					 &tda827x_cfg_2) < 0)
 			goto dettach_frontend;
 		break;
+	case SAA7134_BOARD_ZOLID_HYBRID_PCI:
+		fe0->dvb.frontend = dvb_attach(tda10048_attach,
+					       &zolid_tda10048_config,
+					       &dev->i2c_adap);
+		if (fe0->dvb.frontend != NULL) {
+			dvb_attach(tda829x_attach, fe0->dvb.frontend,
+				   &dev->i2c_adap, 0x4b,
+				   &tda829x_no_probe);
+			dvb_attach(tda18271_attach, fe0->dvb.frontend,
+				   0x60, &dev->i2c_adap,
+				   &hcw_tda18271_config);
+		}
+		break;
 	case SAA7134_BOARD_HAUPPAUGE_HVR1120:
 		fe0->dvb.frontend = dvb_attach(tda10048_attach,
 					       &hcw_tda10048_config,
linux/drivers/media/video/saa7134/saa7134.h +1 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134.h
@@ -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
#5 lore raw
Quoted 135 lines · On Mon, Sep 7, 2009 at 11:18 AM, <[email protected]> wrote:
Quoted 10 lines · Michael Krufky
Quoted 10 lines

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.

Quoted 6 lines
Quoted 3 lines
Signed-off-by [email protected]

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

Thanks for the review.

Quoted 10 lines

#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.

You're right, changed tuner_config to zero.

Quoted 6 lines

#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.

Fair enough.

Quoted 6 lines

#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.

Ok I was assuming configuration parameters get copied in the tuner state.

Quoted 6 lines

#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.

Well the chip is labeled as SAA7131E/03/G, according to the NXP docs its a SAA7135 combined with a TDA8295 analog IF demod.

dmesg is attached below.

Quoted 4 lines

#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?

Well all the references on the net refer to a tda18271/C2 version.

I have tested dvb reception just now, with a good antenna, and it works get good audio and video. I still need to test analog reception.

Also I assume selectivity can be better as I assume the V_AGC pin of the TDA18271 is connected to some GPIO pin.

Quoted 8 lines

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

Can you take a peek at the improved patch below?

dmesg:

[280156.190062] saa7130/34: v4l2 driver version 0.2.15 loaded
[280156.190234] saa7133[0]: found at 0000:04:00.0, rev: 209, irq: 16, latency: 64, mmio: 0xfebff800
[280156.190271] saa7133[0]: subsystem: 1131:2004, board: Zolid Hybrid TV Tuner PCI [card=173,autodetected]
[280156.190445] saa7133[0]: board init: gpio is 400100
[280156.190481] IRQ 16/saa7133[0]: IRQF_DISABLED is not guaranteed on shared IRQs
[280156.372530] saa7133[0]: i2c eeprom 00: 31 11 04 20 54 20 1c 00 43 43 a9 1c 55 d2 b2 92
[280156.372579] saa7133[0]: i2c eeprom 10: 00 ff 86 0f ff 20 ff ff ff ff ff ff ff ff ff ff
[280156.372622] saa7133[0]: i2c eeprom 20: 01 40 01 02 03 01 01 03 08 ff 00 b2 ff ff ff ff
[280156.372664] saa7133[0]: i2c eeprom 30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372715] saa7133[0]: i2c eeprom 40: ff 35 00 c0 96 10 03 32 21 05 ff ff ff ff ff ff
[280156.372758] saa7133[0]: i2c eeprom 50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372800] saa7133[0]: i2c eeprom 60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372842] saa7133[0]: i2c eeprom 70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372885] saa7133[0]: i2c eeprom 80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372927] saa7133[0]: i2c eeprom 90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.372969] saa7133[0]: i2c eeprom a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373012] saa7133[0]: i2c eeprom b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373054] saa7133[0]: i2c eeprom c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373097] saa7133[0]: i2c eeprom d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373139] saa7133[0]: i2c eeprom e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373181] saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[280156.373229] i2c-adapter i2c-3: Invalid 7-bit address 0x7a
[280156.500405] tuner 3-004b: chip found @ 0x96 (saa7133[0])
[280156.660034] tda829x 3-004b: setting tuner address to 60
[280156.738826] tda18271 3-0060: creating new instance
[280156.820031] TDA18271HD/C2 detected @ 3-0060
[280159.210047] tda18271: performing RF tracking filter calibration
[280192.310026] tda18271: RF tracking filter calibration complete
[280192.420033] tda829x 3-004b: type set to tda8290+18271
[280200.470374] saa7133[0]: dsp access error
[280200.602731] saa7133[0]: registered device video0 [v4l2]
[280200.602842] saa7133[0]: registered device vbi0
[280200.602945] saa7133[0]: registered device radio0
[280200.659811] dvb_init() allocating 1 frontend
[280200.920034] tda829x 3-004b: type set to tda8290
[280200.960408] tda18271 3-0060: attaching existing instance
[280200.960426] DVB: registering new adapter (saa7133[0])
[280200.960440] DVB: registering adapter 0 frontend 0 (NXP TDA10048HN DVB-T)...
[280201.780031] tda10048_firmware_upload: waiting for firmware upload (dvb-fe-tda10048-1.0.fw)...
[280201.780054] saa7134 0000:04:00.0: firmware: requesting dvb-fe-tda10048-1.0.fw
[280201.794323] tda10048_firmware_upload: firmware read 24878 bytes.
[280201.794342] tda10048_firmware_upload: firmware uploading
[280207.010051] tda10048_firmware_upload: firmware uploaded
[280207.404727] saa7134 ALSA driver for DMA sound loaded
[280207.404763] IRQ 16/saa7133[0]: IRQF_DISABLED is not guaranteed on shared IRQs
[280207.404812] saa7133[0]/alsa: saa7133[0] at 0xfebff800 irq 16 registered as card -1
Quoted 2 lines

Here's a new patch:

Henk,

Something is up with your mailer, making it difficult to reply to your emails.... going to some spam account instead of your email address... Please look into that, maybe set up a reply-to or something.

Anyway, thanks for your responses -- that clears a lot up. I recommend to also create your own tda18271 config structure, as I have a pending pull request that will tweak the tda18271 configuration within that hcw_tda18271_config structure -- Id hate for your board to break as a result of using somebody else's config.

About the SAA7131 - correct -- it is a SAA713x combined with a TDA8295 analog IF demod. I was just checking to see that it was actually what your board uses. Looks good to me.

As far as the analog input setup, have you verified that those work properly, or did you also copy those from the HVR1120 configuration? If you havent verified those yourself, I recommend removing them from your patch -- better to not check in untested configurations, as it may lead others to believe that it should work, causing support problems for the future.

After you re-submit with the above recommended changes, I'll be happy to push the patch for you.

Regards,

Mike

#6 lore raw
Quoted 23 lines · Michael Krufky

Henk,

Something is up with your mailer, making it difficult to reply to your emails.... going to some spam account instead of your email address... Please look into that, maybe set up a reply-to or something.

Anyway, thanks for your responses -- that clears a lot up. I recommend to also create your own tda18271 config structure, as I have a pending pull request that will tweak the tda18271 configuration within that hcw_tda18271_config structure -- Id hate for your board to break as a result of using somebody else's config.

About the SAA7131 - correct -- it is a SAA713x combined with a TDA8295 analog IF demod. I was just checking to see that it was actually what your board uses. Looks good to me.

As far as the analog input setup, have you verified that those work properly, or did you also copy those from the HVR1120 configuration? If you havent verified those yourself, I recommend removing them from your patch -- better to not check in untested configurations, as it may lead others to believe that it should work, causing support problems for the future.

Quoted 6 lines

After you re-submit with the above recommended changes, I'll be happy to push the patch for you.

Regards,

Mike

Hi Mike,

I tested the analog part (PAL-B), sound and picture work but with some issues:

- Sometimes picture is noisy, but it becomes crystal clear after switching between channels. (happens for example at 687.25 Mhz)
- On a lower frequency (511.25 Mhz) the picture is always sharp, but lacks colour.
- No sound problems.
- radio untested.

Digital:
- DVB-T/H stream reception works.
- Would expect to see some more channels in the higher frequency region.

Overall is the impression that sensitivity still needs improvement both in analog and digital modes.

If you look at the dmesg, analog tuner is detected as 8290 instead of the expected 8295 could this be a problem?

Quoted 1 line
Quoted 1 line
[280192.420033] tda829x 3-004b: type set to tda8290+18271

For information on the card see:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner

Signed-off-by [email protected]
linux/drivers/media/video/saa7134/saa7134-cards.c +27 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -3521,6 +3521,27 @@
 			.gpio = 0x0800100, /* GPIO 23 HI for FM */
 		},
 	},
+	[SAA7134_BOARD_ZOLID_HYBRID_PCI] = {
+		.name           = "Zolid Hybrid TV Tuner PCI",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_TDA8290,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tuner_config   = 0,
+		.mpeg           = SAA7134_MPEG_DVB,
+		.ts_type	= SAA7134_MPEG_TS_PARALLEL,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 1,
+			.amux = TV,
+			.tv   = 1,
+		}},
+		.radio = {	// untested
+			.name = name_radio,
+			.amux = TV,
+		},
+	},
 	[SAA7134_BOARD_CINERGY_HT_PCMCIA] = {
 		.name           = "Terratec Cinergy HT PCMCIA",
 		.audio_clock    = 0x00187de7,
@@ -6429,6 +6450,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,
linux/drivers/media/video/saa7134/saa7134-dvb.c +30 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1013,6 +1013,23 @@
 	.probe_tuner = TDA829X_DONT_PROBE,
 };
 
+static struct tda10048_config zolid_tda10048_config = {
+	.demod_address    = 0x10 >> 1,
+	.output_mode      = TDA10048_PARALLEL_OUTPUT,
+	.fwbulkwritelen   = TDA10048_BULKWRITE_200,
+	.inversion        = TDA10048_INVERSION_ON,
+	.dtv6_if_freq_khz = TDA10048_IF_3300,
+	.dtv7_if_freq_khz = TDA10048_IF_3500,
+	.dtv8_if_freq_khz = TDA10048_IF_4000,
+	.clk_freq_khz     = TDA10048_CLK_16000,
+	.disable_gate_access = 1,
+};
+
+static struct tda18271_config zolid_tda18271_config = {
+	.gate    = TDA18271_GATE_ANALOG,
+	.config  = 0,	/* no AGC config */
+};
+
 /* ==================================================================
  * Core code
  */
@@ -1124,6 +1141,19 @@
 					 &tda827x_cfg_2) < 0)
 			goto dettach_frontend;
 		break;
+	case SAA7134_BOARD_ZOLID_HYBRID_PCI:
+		fe0->dvb.frontend = dvb_attach(tda10048_attach,
+					       &zolid_tda10048_config,
+					       &dev->i2c_adap);
+		if (fe0->dvb.frontend != NULL) {
+			dvb_attach(tda829x_attach, fe0->dvb.frontend,
+				   &dev->i2c_adap, 0x4b,
+				   &tda829x_no_probe);
+			dvb_attach(tda18271_attach, fe0->dvb.frontend,
+				   0x60, &dev->i2c_adap,
+				   &zolid_tda18271_config);
+		}
+		break;
 	case SAA7134_BOARD_HAUPPAUGE_HVR1120:
 		fe0->dvb.frontend = dvb_attach(tda10048_attach,
 					       &hcw_tda10048_config,
linux/drivers/media/video/saa7134/saa7134.h +1 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134.h
@@ -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
#7 lore raw
Quoted 52 lines · On Tue, Sep 8, 2009 at 5:27 PM, <[email protected]> wrote:
Quoted 23 lines · Michael Krufky

Henk,

Something is up with your mailer, making it difficult to reply to your emails.... going to some spam account instead of your email address... Please look into that, maybe set up a reply-to or something.

Anyway, thanks for your responses -- that clears a lot up.  I recommend to also create your own tda18271 config structure, as I have a pending pull request that will tweak the tda18271 configuration within that hcw_tda18271_config structure -- Id hate for your board to break as a result of using somebody else's config.

About the SAA7131 - correct -- it is a SAA713x combined with a TDA8295 analog IF demod.  I was just checking to see that it was actually what your board uses.  Looks good to me.

As far as the analog input setup, have you verified that those work properly, or did you also copy those from the HVR1120 configuration? If you havent verified those yourself, I recommend removing them from your patch -- better to not check in untested configurations, as it may lead others to believe that it should work, causing support problems for the future.

Quoted 6 lines

After you re-submit with the above recommended changes, I'll be happy to push the patch for you.

Regards,

Mike

Hi Mike,

I tested the analog part (PAL-B), sound and picture work but with some issues:

- Sometimes picture is noisy, but it becomes crystal clear after switching between channels. (happens for example at 687.25 Mhz)
- On a lower frequency (511.25 Mhz) the picture is always sharp, but lacks colour.
- No sound problems.
- radio untested.

Digital:
- DVB-T/H stream reception works.
- Would expect to see some more channels in the higher frequency region.

Overall is the impression that sensitivity still needs improvement both in analog and digital modes.

If you look at the dmesg, analog tuner is detected as 8290 instead of the expected 8295 could this be a problem?

Quoted 7 lines
Quoted 1 line
Quoted 1 line
[280192.420033] tda829x 3-004b: type set to tda8290+18271

For information on the card see:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner

Signed-off-by [email protected]

Henk,

Why do you expect a 8295? If your board uses the SAA7131, then we would expect an 8290 IF demod.

Ah, I just checked the history of this email thread -- I must have read one of your previous emails too quickly. :-) Perhaps there is a typo in the document that you read -- tda8290 is correct.

About the analog noise and quality issues that you report, perhaps there is some tweaking that can be done to help the situation. I dont have that Zolid board, myself, so I can't reallt help much in that respect, unfortunately.

At this point, I feel that your patch is fine to merge into the development repository, although I have some small cleanup requests:

#1) You can omit this line from the tda18271_config struct:

.config = 0, /* no AGC config */

This is not necessary, as it is initialized at zero and this serves no purpose even for documentation's sake.

#2) The configuration inside saa7134-cards.c should be moved to the end of the boards array.

#3) The configuration case inside saa7134-dvb.c should be moved to the end of the switch..case block.

I'll wait for these cleanups, then I have no issue pushing up your patch. Any quality improvements that we find along the way can certainly be added afterwards.

Good work.

Regards,

Mike

#8 lore raw
Quoted 38 lines · Michael Krufky
Quoted 3 lines

Hi Mike,

Henk,

Why do you expect a 8295? If your board uses the SAA7131, then we would expect an 8290 IF demod.

Ah, I just checked the history of this email thread -- I must have read one of your previous emails too quickly. :-) Perhaps there is a typo in the document that you read -- tda8290 is correct.

About the analog noise and quality issues that you report, perhaps there is some tweaking that can be done to help the situation. I dont have that Zolid board, myself, so I can't reallt help much in that respect, unfortunately.

At this point, I feel that your patch is fine to merge into the development repository, although I have some small cleanup requests:

#1) You can omit this line from the tda18271_config struct:

.config = 0, /* no AGC config */

This is not necessary, as it is initialized at zero and this serves no purpose even for documentation's sake.

#2) The configuration inside saa7134-cards.c should be moved to the end of the boards array.

#3) The configuration case inside saa7134-dvb.c should be moved to the end of the switch..case block.

I'll wait for these cleanups, then I have no issue pushing up your patch. Any quality improvements that we find along the way can certainly be added afterwards.

Quoted 5 lines

Good work.

Regards,

Mike

Hi Mike,

Did the last cleanups.
Good review! Thank you for your help.

- henk

----- patch comment -----

Adds support for Zolid Hybrid PCI card:
http://linuxtv.org/wiki/index.php/Zolid_Hybrid_TV_Tuner

test status analog (PAL-B):
- Sometimes picture is noisy, but it becomes crystal clear after switching between channels. (happens for example at 687.25 Mhz)
- On a lower frequency (511.25 Mhz) the picture is always sharp, but lacks colour.
- No sound problems.
- radio untested.

Digital:
- DVB-T/H stream reception works.
- Would expect to see some more channels in the higher frequency region.

Overall is the impression that sensitivity still needs improvement both in analog and digital modes.

Signed-off-by [email protected]
linux/drivers/media/video/saa7134/saa7134-cards.c +27 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -5296,6 +5296,27 @@
 			.amux = TV,
 		},
 	},
+	[SAA7134_BOARD_ZOLID_HYBRID_PCI] = {
+		.name           = "Zolid Hybrid TV Tuner PCI",
+		.audio_clock    = 0x00187de7,
+		.tuner_type     = TUNER_PHILIPS_TDA8290,
+		.radio_type     = UNSET,
+		.tuner_addr     = ADDR_UNSET,
+		.radio_addr     = ADDR_UNSET,
+		.tuner_config   = 0,
+		.mpeg           = SAA7134_MPEG_DVB,
+		.ts_type	= SAA7134_MPEG_TS_PARALLEL,
+		.inputs         = {{
+			.name = name_tv,
+			.vmux = 1,
+			.amux = TV,
+			.tv   = 1,
+		}},
+		.radio = {	// untested
+			.name = name_radio,
+			.amux = TV,
+		},
+	},
 
 };
 
@@ -6429,6 +6450,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,
linux/drivers/media/video/saa7134/saa7134-dvb.c +29 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1013,6 +1013,22 @@
 	.probe_tuner = TDA829X_DONT_PROBE,
 };
 
+static struct tda10048_config zolid_tda10048_config = {
+	.demod_address    = 0x10 >> 1,
+	.output_mode      = TDA10048_PARALLEL_OUTPUT,
+	.fwbulkwritelen   = TDA10048_BULKWRITE_200,
+	.inversion        = TDA10048_INVERSION_ON,
+	.dtv6_if_freq_khz = TDA10048_IF_3300,
+	.dtv7_if_freq_khz = TDA10048_IF_3500,
+	.dtv8_if_freq_khz = TDA10048_IF_4000,
+	.clk_freq_khz     = TDA10048_CLK_16000,
+	.disable_gate_access = 1,
+};
+
+static struct tda18271_config zolid_tda18271_config = {
+	.gate    = TDA18271_GATE_ANALOG,
+};
+
 /* ==================================================================
  * Core code
  */
@@ -1492,6 +1508,19 @@
 					__func__);
 
 		break;
+	case SAA7134_BOARD_ZOLID_HYBRID_PCI:
+		fe0->dvb.frontend = dvb_attach(tda10048_attach,
+					       &zolid_tda10048_config,
+					       &dev->i2c_adap);
+		if (fe0->dvb.frontend != NULL) {
+			dvb_attach(tda829x_attach, fe0->dvb.frontend,
+				   &dev->i2c_adap, 0x4b,
+				   &tda829x_no_probe);
+			dvb_attach(tda18271_attach, fe0->dvb.frontend,
+				   0x60, &dev->i2c_adap,
+				   &zolid_tda18271_config);
+		}
+		break;
 	default:
 		wprintk("Huh? unknown DVB card?\n");
 		break;
linux/drivers/media/video/saa7134/saa7134.h +1 -0
diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134.h
@@ -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

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw

PATCH 1/1 tda18271 add FM filter selction + minor fixes

This patch adds support for FM filter selection. The tda18271 has two rf inputs RF_IN (45-864 MHz) and FM_IN (65-108 MHz). The code automatically enables the antialiasing filter for radio reception and depending on the FM input selected configures EB23 register.

Additional fixes:
- Fixed the temerature comensation, see revision history of TDA18271HD_4 spec.
- Minor cosmetic change in the tda18271_rf_band[]
- Fixed one value and removed a duplicate in tda18271_cid_target[]

Signed-off-by [email protected]
linux/drivers/media/common/tuners/tda18271-fe.c +17 -1
diff -r 2b49813f8482 linux/drivers/media/common/tuners/tda18271-fe.c
@@ -99,6 +99,22 @@
 	if (tda_fail(ret))
 		goto fail;
 
+	/* update FM filter selection */
+	if (map->std == 0) {
+		/* std == FM radio */
+		regs[R_EB23] |=  0x06; /* 1.5 Mhz cut-off freq */
+	} else if (map->fm_rfn) {
+		/* antenna FM_IN, std != FM radio */
+		regs[R_EB23] |=  0x04; /* set FORCELP */
+		regs[R_EB23] &= ~0x02; /* clear LP_FC */
+	} else {
+		/* antenna RF_IN, std != FM radio */
+		regs[R_EB23] &= ~0x06; /* clear FORCELP, LP_FC */
+	}
+	ret = tda18271_write_regs(fe, R_EB23, 1);
+	if (tda_fail(ret))
+		goto fail;
+
 	/* --------------------------------------------------------------- */
 
 	/* disable Power Level Indicator */
@@ -272,7 +288,7 @@
 	tda18271_lookup_map(fe, RF_CAL_DC_OVER_DT, &freq, &dc_over_dt);
 
 	/* calculate temperature compensation */
-	rfcal_comp = dc_over_dt * (tm_current - priv->tm_rfcal);
+	rfcal_comp = dc_over_dt * (tm_current - priv->tm_rfcal) / 1000;
 
 	regs[R_EB14] = approx + rfcal_comp;
 	ret = tda18271_write_regs(fe, R_EB14, 1);
linux/drivers/media/common/tuners/tda18271-maps.c +3 -3
diff -r 2b49813f8482 linux/drivers/media/common/tuners/tda18271-maps.c
@@ -229,8 +229,8 @@
 static struct tda18271_map tda18271_rf_band[] = {
 	{ .rfmax =  47900, .val = 0x00 },
 	{ .rfmax =  61100, .val = 0x01 },
+	{ .rfmax = 121200, .val = 0x02 },
 /*	{ .rfmax = 152600, .val = 0x02 }, */
-	{ .rfmax = 121200, .val = 0x02 },
 	{ .rfmax = 164700, .val = 0x03 },
 	{ .rfmax = 203500, .val = 0x04 },
 	{ .rfmax = 457800, .val = 0x05 },
@@ -962,10 +962,10 @@
 static struct tda18271_cid_target_map tda18271_cid_target[] = {
 	{ .rfmax =  46000, .target = 0x04, .limit =  1800 },
 	{ .rfmax =  52200, .target = 0x0a, .limit =  1500 },
-	{ .rfmax =  79100, .target = 0x01, .limit =  4000 },
+	{ .rfmax =  70100, .target = 0x01, .limit =  4000 },
+/*	{ .rfmax =  79100, .target = 0x01, .limit =  4000 },	*/
 	{ .rfmax = 136800, .target = 0x18, .limit =  4000 },
 	{ .rfmax = 156700, .target = 0x18, .limit =  4000 },
-	{ .rfmax = 156700, .target = 0x18, .limit =  4000 },
 	{ .rfmax = 186250, .target = 0x0a, .limit =  4000 },
 	{ .rfmax = 230000, .target = 0x0a, .limit =  4000 },
 	{ .rfmax = 345000, .target = 0x18, .limit =  4000 },
#12 lore raw

Re: [PATCH] tda18271 add FM filter selction + minor fixes

Quoted 6 lines · On Sun, Sep 13, 2009 at 8:14 PM, <[email protected]> wrote:

This patch adds support for FM filter selection. The tda18271 has two rf inputs RF_IN (45-864 MHz) and FM_IN (65-108 MHz). The code automatically enables the antialiasing filter for radio reception and depending on the FM input selected configures EB23 register.

Quoted 9 lines

Additional fixes:
- Fixed the temerature comensation, see revision history of TDA18271HD_4 spec.
- Minor cosmetic change in the tda18271_rf_band[]
- Fixed one value and removed a duplicate in tda18271_cid_target[]

Signed-off-by [email protected]

Henk,

Thank you for your patch.

I have some other tda18271 patches pending merge currently, so it will be a few days before I'll be able to test and merge your patch.

In the meanwhile, I'd request that this single patch be broken down into three separate patches, each with a description of the change and sign-off. I know that the patch you sent in is small, I just prefer to apply changes separately.

Do you have FM radio working on the Zolid board after applying this?

Regards,

Mike

#13 lore raw

Re: [PATCH] tda18271 add FM filter selction + minor fixes

Quoted 21 lines · Michael Krufky
Quoted 6 lines · On Sun, Sep 13, 2009 at 8:14 PM, <[email protected]> wrote:

This patch adds support for FM filter selection. The tda18271 has two rf inputs RF_IN (45-864 MHz) and FM_IN (65-108 MHz). The code automatically enables the antialiasing filter for radio reception and depending on the FM input selected configures EB23 register.

Quoted 9 lines

Additional fixes:
- Fixed the temerature comensation, see revision history of TDA18271HD_4 ?spec.
- Minor cosmetic change in the tda18271_rf_band[]
- Fixed one value and removed a duplicate in tda18271_cid_target[]

Signed-off-by [email protected]

Henk,

Thank you for your patch.

Quoted 8 lines

I have some other tda18271 patches pending merge currently, so it will be a few days before I'll be able to test and merge your patch.

In the meanwhile, I'd request that this single patch be broken down into three separate patches, each with a description of the change and sign-off. I know that the patch you sent in is small, I just prefer to apply changes separately.

Thats fine, I will wait for the pull in v4l-dvb and then redo the patches:
- FM filter selection
- Errata temerature compensation
- Table fixes

if thast ok.

Quoted 1 line

Do you have FM radio working on the Zolid board after applying this?

Unfortunately not yet, I get static noise with small 'ticks' at regular intervals. It maybe the way I am testing. Currently I am using:

	mplayer radio://91.3/capture -nocache -rawaudio rate=32000 -radio \
		adevice=hw=1.0:arate=32000

to test.

I will try to see if a can solder some pin headers on the card so I can use audio bypass to the sound card.

Thanks,

Henk

#14 lore raw

Re: [PATCH] tda18271 add FM filter selction + minor fixes

Quoted 42 lines · On Mon, Sep 14, 2009 at 11:10 AM, <[email protected]> wrote:
Quoted 21 lines · Michael Krufky
Quoted 6 lines · On Sun, Sep 13, 2009 at 8:14 PM,  <[email protected]> wrote:

This patch adds support for FM filter selection. The tda18271 has two rf inputs RF_IN (45-864 MHz) and FM_IN (65-108 MHz). The code automatically enables the antialiasing filter for radio reception and depending on the FM input selected configures EB23 register.

Quoted 9 lines

Additional fixes:
- Fixed the temerature comensation, see revision history of TDA18271HD_4 ?spec.
- Minor cosmetic change in the tda18271_rf_band[]
- Fixed one value and removed a duplicate in tda18271_cid_target[]

Signed-off-by [email protected]

Henk,

Thank you for your patch.

Quoted 8 lines

I have some other tda18271 patches pending merge currently, so it will be a few days before I'll be able to test and merge your patch.

In the meanwhile, I'd request that this single patch be broken down into three separate patches, each with a description of the change and sign-off.  I know that the patch you sent in is small, I just prefer to apply changes separately.

Thats fine, I will wait for the pull in v4l-dvb and then redo the patches:
- FM filter selection
- Errata temerature compensation
- Table fixes

if thast ok.

Quoted 1 line

Do you have FM radio working on the Zolid board after applying this?

Unfortunately not yet, I get static noise with small 'ticks' at regular intervals. It maybe the way I am testing. Currently I am using:

Quoted 7 lines

       mplayer radio://91.3/capture -nocache -rawaudio rate=32000 -radio \
               adevice=hw=1.0:arate=32000

to test.

I will try to see if a can solder some pin headers on the card so I can use audio bypass to the sound card.

Henk,

Don't wait for them to be merged to v4l-dvb -- Just work against the tda18271 development repository:

http://kernellabs.com/hg/~mkrufky/tda18271

I maintain this driver, and I actually have some other fixes with respect to rf tracking filter calibration / compensation that I have yet to push. I'm asking you to resend your patches so that I'll queue them for the next tda18271 merge.

Regards,

Mike

#15 lore raw

Re: [PATCH] tda18271 add FM filter selction + minor fixes

Quoted 9 lines · Michael Krufky

Don't wait for them to be merged to v4l-dvb -- Just work against the tda18271 development repository:

http://kernellabs.com/hg/~mkrufky/tda18271

I maintain this driver, and I actually have some other fixes with respect to rf tracking filter calibration / compensation that I have yet to push. I'm asking you to resend your patches so that I'll queue them for the next tda18271 merge.

Done

#16 lore raw
In reply to a message not in the archive
Quoted 27 lines · Michael Krufky
Quoted 16 lines · On Wed, Sep 9, 2009 at 10:01 AM,  <[email protected]> wrote:
Quoted 10 lines · Michael Krufky

Henk,

Why do you expect a 8295?  If your board uses the SAA7131, then we would expect an 8290 IF demod.

Ah, I just checked the history of this email thread -- I must have read one of your previous emails too quickly.  :-)  Perhaps there is a typo in the document that you read -- tda8290 is correct.

Just to come back to this point,

Well zolid has a SAA7131E, if you look at the datasheet (botom of page 15)
http://www.nxp.com/acrobat_download/datasheets/SAA7131E_3.pdf

Quoted 9 lines

it says:
"The SAA7131E is functionally compatible with the SAA7135 audio and video broadcast decoder device and the stand-alone low-IF device TDA8295."

So thats why I asked.

Regards,
Henk

Quoted 7 lines

FIX YOUR MAILER!!

It's a pain to reply to your emails -- I have to insert your actual email address each time :-(

Anyway, I am under the impression that it's a typo in the datasheet. It is actually a tda8290.

Henk,

Just FYI, I merged your patch to my saa7134 repository last week:

http://www.kernellabs.com/hg/~mkrufky/saa7134

I thought that I had replied to you already but that message seems to have gotten dropped somewhere :-/

I intend to send a pull request to Mauro for this, in addition to some other pending patches after he merges what I have already pending.

Thanks again for your work.

Regards,

Mike Krufky

#17 lore raw

I accidently sent this mail to Michael's private address, I'm sorry for that.

Hi,

I bought the same card a couple of months ago and back then, it just wouldn't work. I set up a wiki page, which henk has updated with links to patches, to document the card as well as possible. I set up a thread on this mailing list
(http://osdir.com/ml/video4linux-list/2009-05/msg00102.html) on making the card work, but that resulted to nothing. I was surprised to find this thread when I accidently searched for "Zolid" in my mailbox. I'm at my internship at the moment, but I'll try this patch as soon as I get home :)

If you need the card for further development/testing: I'm willing to send it to you by mail. I just want it back when you're done testing, so I can finally watch tv on my computer :)

Greetings, Sander Pientka

2009/9/14 Michael Krufky <[email protected]>:

Quoted 58 lines · Michael Krufky
Quoted 27 lines · On Wed, Sep 9, 2009 at 10:01 AM,  <[email protected]> wrote:
Quoted 16 lines · Michael Krufky
Quoted 10 lines

Henk,

Why do you expect a 8295?  If your board uses the SAA7131, then we would expect an 8290 IF demod.

Ah, I just checked the history of this email thread -- I must have read one of your previous emails too quickly.  :-)  Perhaps there is a typo in the document that you read -- tda8290 is correct.

Just to come back to this point,

Well zolid has a SAA7131E, if you look at the datasheet (botom of page 15)
http://www.nxp.com/acrobat_download/datasheets/SAA7131E_3.pdf

Quoted 9 lines

it says:
"The SAA7131E is functionally compatible with the SAA7135 audio and video broadcast decoder device and the stand-alone low-IF device TDA8295."

So thats why I asked.

Regards,
Henk

Quoted 7 lines

FIX YOUR MAILER!!

It's a pain to reply to your emails -- I have to insert your actual email address each time :-(

Anyway, I am under the impression that it's a typo in the datasheet. It is actually a tda8290.

Henk,

Just FYI, I merged your patch to my saa7134 repository last week:

http://www.kernellabs.com/hg/~mkrufky/saa7134

I thought that I had replied to you already but that message seems to have gotten dropped somewhere :-/

I intend to send a pull request to Mauro for this, in addition to some other pending patches after he merges what I have already pending.

Thanks again for your work.

Regards,

Mike Krufky
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#18 lore raw
Quoted 54 lines

2009/9/14 Michael Krufky <[email protected]>:

Quoted 53 lines · Michael Krufky
Quoted 27 lines · On Wed, Sep 9, 2009 at 10:01 AM,  <[email protected]> wrote:
Quoted 16 lines · Michael Krufky
Quoted 10 lines

Henk,

Why do you expect a 8295?  If your board uses the SAA7131, then we would expect an 8290 IF demod.

Ah, I just checked the history of this email thread -- I must have read one of your previous emails too quickly.  :-)  Perhaps there is a typo in the document that you read -- tda8290 is correct.

Just to come back to this point,

Well zolid has a SAA7131E, if you look at the datasheet (botom of page 15)
http://www.nxp.com/acrobat_download/datasheets/SAA7131E_3.pdf

Quoted 9 lines

it says:
"The SAA7131E is functionally compatible with the SAA7135 audio and video broadcast decoder device and the stand-alone low-IF device TDA8295."

So thats why I asked.

Regards,
Henk

Quoted 7 lines

FIX YOUR MAILER!!

It's a pain to reply to your emails -- I have to insert your actual email address each time :-(

Anyway, I am under the impression that it's a typo in the datasheet. It is actually a tda8290.

Henk,

Just FYI, I merged your patch to my saa7134 repository last week:

http://www.kernellabs.com/hg/~mkrufky/saa7134

I thought that I had replied to you already but that message seems to have gotten dropped somewhere :-/

I intend to send a pull request to Mauro for this, in addition to some other pending patches after he merges what I have already pending.

Thanks again for your work.

Regards,

Mike Krufky

Quoted 14 lines · Sander Pientka

I accidently sent this mail to Michael's private address, I'm sorry for that.

Hi,

I bought the same card a couple of months ago and back then, it just wouldn't work. I set up a wiki page, which henk has updated with links to patches, to document the card as well as possible. I set up a thread on this mailing list
(http://osdir.com/ml/video4linux-list/2009-05/msg00102.html) on making the card work, but that resulted to nothing. I was surprised to find this thread when I accidently searched for "Zolid" in my mailbox. I'm at my internship at the moment, but I'll try this patch as soon as I get home :)

Quoted 6 lines

If you need the card for further development/testing: I'm willing to send it to you by mail. I just want it back when you're done testing, so I can finally watch tv on my computer :)

Greetings, Sander Pientka

Please do not top-quote. The policy on this mailing list is to include the reply BELOW the quoted text.

Anyway, don't even bother testing any patch -- just use the latest v4l-dvb tree -- the code is all merged up.

Regards,

Mike

#19 lore raw
In reply to Henk

Apologies, I sent this from a bad email address at first.

Quoted 10 lines · Henk

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.

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

Signed-off-by [email protected]

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