diff mbox

Add support for Zolid Hybrid PCI card

Message ID 20090908212733.GA19438@systol-ng.god.lan (mailing list archive)
State Changes Requested
Headers show

Commit Message

spam@systol-ng.god.lan Sept. 8, 2009, 9:27 p.m. UTC
On Mon, Sep 07, 2009 at 12:12:15PM -0400, Michael Krufky wrote:
> 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

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?
>> [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: Henk.Vergonet@gmail.com

Comments

Michael Krufky Sept. 8, 2009, 9:57 p.m. UTC | #1
On Tue, Sep 8, 2009 at 5:27 PM, <spam@systol-ng.god.lan> wrote:
> On Mon, Sep 07, 2009 at 12:12:15PM -0400, Michael Krufky wrote:
>> 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
>
> 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?
>>> [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: Henk.Vergonet@gmail.com

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
--
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
Michael Krufky Sept. 14, 2009, 4:06 p.m. UTC | #2
On Wed, Sep 9, 2009 at 11:08 AM, Michael Krufky <mkrufky@kernellabs.com> wrote:
> On Wed, Sep 9, 2009 at 10:01 AM,  <spam@systol-ng.god.lan> wrote:
>> On Tue, Sep 08, 2009 at 05:57:12PM -0400, Michael Krufky wrote:
>>>
>>> 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
>>
>> 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
>>
>
> 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 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	Tue Sep 08 00:32:02 2009 +0200
@@ -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,
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	Tue Sep 08 00:32:02 2009 +0200
@@ -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,
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	Tue Sep 08 00:32:02 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