All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manu Abraham <abraham.manu@gmail.com>
To: Goga777 <goga777@bk.ru>
Cc: linux-media@vger.kernel.org
Subject: Re: [linux-dvb] Most stable DVB-S2 PCI Card?
Date: Sat, 23 May 2009 00:25:59 +0400	[thread overview]
Message-ID: <1a297b360905221325r46432d02g8a97b1361e7958ac@mail.gmail.com> (raw)
In-Reply-To: <20090522234201.4ee5cf47@bk.ru>

[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]

On Fri, May 22, 2009 at 11:42 PM, Goga777 <goga777@bk.ru> wrote:
>> >> What is the most stable DVB-S2 PCI card?
>
> I use hvr4000 without any problem.


Yes, no issues. Just that it is based a Generation 1 demodulator which
are limited in capabilities even for a Generation 1 demodulator. Also that the
statistics are just home made empirical values, rather than real ones.


>> > In short, the Hauppauge NOVA-HD-S2 is the one to buy. Yes, it's somewhat
>> > more expensive but it's the best DVB-S2 based PCI card concerning
>> > stability and usability with for example VDR.
>>
>>
>> Unfortunately, the Nova HD-S2 won't support any DVB-S2 stream with
>> symbol rates > 30 MSPS, also it supports only DVB-S2 NBC mode
>
> is there any dvb-s2 channels with sr > 30 msps ??



Of course, Generation 2 transmissions there are quite a lot of new things.
There are are some broadcasts on Intelsat 903 with 45 MSPS.
That's what i know for now, There could be more though.

There will be more of it, as broadcaster goes the 2nd generation path, as
well as broadcasters who don't want PC users to capture the stream on
Home PC's. (Till vendors come up with new hardware to do that)



>> of operation, being based on an older generation demodulator.
>
> what about quality indicators - snr and ber in your drivers ? do they work correctly ?

Yes, they do, currently it is on a dBm/10 scale.

(The statistics on the Nova HD are just crude just based on empirical
home tests,
not real statistics though.)

If you need statistics normalized to the current API (TT S2 1600),
attached is a
patch that fixes STR and SNR calculation and normalizes the value into the
0..0xFFFF range.

If you find any issues with the driver, please do report it over here.
Currently haven't
seen any issues by any of the testers.

[-- Attachment #2: stv090x-str_snr-fixes.diff --]
[-- Type: text/x-diff, Size: 3739 bytes --]

diff -r b301def35098 linux/drivers/media/dvb/frontends/stv090x.c
--- a/linux/drivers/media/dvb/frontends/stv090x.c	Thu May 21 17:18:15 2009 +0200
+++ b/linux/drivers/media/dvb/frontends/stv090x.c	Thu May 21 23:22:28 2009 +0200
@@ -4227,14 +4227,10 @@
 	int res = 0;
 	int min = 0, med;
 
-	if (val < tab[min].read)
-		res = tab[min].real;
-	else if (val >= tab[max].read)
-		res = tab[max].real;
-	else {
+	if ((val >= tab[min].read && val < tab[max].read) || (val >= tab[max].read && val < tab[min].read)) {
 		while ((max - min) > 1) {
 			med = (max + min) / 2;
-			if (val >= tab[min].read && val < tab[med].read)
+			if ((val >= tab[min].read && val < tab[med].read) || (val >= tab[med].read && val < tab[min].read))
 				max = med;
 			else
 				min = med;
@@ -4243,6 +4239,18 @@
 		       (tab[max].real - tab[min].real) /
 		       (tab[max].read - tab[min].read)) +
 			tab[min].real;
+	} else {
+		if (tab[min].read < tab[max].read) {
+			if (val < tab[min].read)
+				res = tab[min].real;
+			else if (val >= tab[max].read)
+				res = tab[max].real;
+		} else {
+			if (val >= tab[min].read)
+				res = tab[min].real;
+			else if (val < tab[max].read)
+				res = tab[max].real;
+		}
 	}
 
 	return res;
@@ -4252,16 +4260,21 @@
 {
 	struct stv090x_state *state = fe->demodulator_priv;
 	u32 reg;
-	s32 agc;
+	s32 agc_0, agc_1, agc;
+	s32 str;
 
 	reg = STV090x_READ_DEMOD(state, AGCIQIN1);
-	agc = STV090x_GETFIELD_Px(reg, AGCIQ_VALUE_FIELD);
-
-	*strength = stv090x_table_lookup(stv090x_rf_tab, ARRAY_SIZE(stv090x_rf_tab) - 1, agc);
+	agc_1 = STV090x_GETFIELD_Px(reg, AGCIQ_VALUE_FIELD);
+	reg = STV090x_READ_DEMOD(state, AGCIQIN0);
+	agc_0 = STV090x_GETFIELD_Px(reg, AGCIQ_VALUE_FIELD);
+	agc = MAKEWORD16(agc_1, agc_0);
+
+	str = stv090x_table_lookup(stv090x_rf_tab, ARRAY_SIZE(stv090x_rf_tab) - 1, agc);
 	if (agc > stv090x_rf_tab[0].read)
-		*strength = 5;
+		str = 0;
 	else if (agc < stv090x_rf_tab[ARRAY_SIZE(stv090x_rf_tab) - 1].read)
-		*strength = -100;
+		str = -100;
+	*strength = (str + 100) * 0xFFFF / 100;
 
 	return 0;
 }
@@ -4272,6 +4285,7 @@
 	u32 reg_0, reg_1, reg, i;
 	s32 val_0, val_1, val = 0;
 	u8 lock_f;
+	s32 snr;
 
 	switch (state->delsys) {
 	case STV090x_DVBS2:
@@ -4283,14 +4297,13 @@
 				reg_1 = STV090x_READ_DEMOD(state, NNOSPLHT1);
 				val_1 = STV090x_GETFIELD_Px(reg_1, NOSPLHT_NORMED_FIELD);
 				reg_0 = STV090x_READ_DEMOD(state, NNOSPLHT0);
-				val_0 = STV090x_GETFIELD_Px(reg_1, NOSPLHT_NORMED_FIELD);
+				val_0 = STV090x_GETFIELD_Px(reg_0, NOSPLHT_NORMED_FIELD);
 				val  += MAKEWORD16(val_1, val_0);
 				msleep(1);
 			}
 			val /= 16;
-			*cnr = stv090x_table_lookup(stv090x_s2cn_tab, ARRAY_SIZE(stv090x_s2cn_tab) - 1, val);
-			if (val < stv090x_s2cn_tab[ARRAY_SIZE(stv090x_s2cn_tab) - 1].read)
-				*cnr = 1000;
+			snr = stv090x_table_lookup(stv090x_s2cn_tab, ARRAY_SIZE(stv090x_s2cn_tab) - 1, val);
+			*cnr = snr * 0xFFFF / stv090x_s2cn_tab[ARRAY_SIZE(stv090x_s2cn_tab) - 1].real;
 		}
 		break;
 
@@ -4304,14 +4317,13 @@
 				reg_1 = STV090x_READ_DEMOD(state, NOSDATAT1);
 				val_1 = STV090x_GETFIELD_Px(reg_1, NOSDATAT_UNNORMED_FIELD);
 				reg_0 = STV090x_READ_DEMOD(state, NOSDATAT0);
-				val_0 = STV090x_GETFIELD_Px(reg_1, NOSDATAT_UNNORMED_FIELD);
+				val_0 = STV090x_GETFIELD_Px(reg_0, NOSDATAT_UNNORMED_FIELD);
 				val  += MAKEWORD16(val_1, val_0);
 				msleep(1);
 			}
 			val /= 16;
-			*cnr = stv090x_table_lookup(stv090x_s1cn_tab, ARRAY_SIZE(stv090x_s1cn_tab) - 1, val);
-			if (val < stv090x_s2cn_tab[ARRAY_SIZE(stv090x_s1cn_tab) - 1].read)
-				*cnr = 1000;
+			snr = stv090x_table_lookup(stv090x_s1cn_tab, ARRAY_SIZE(stv090x_s1cn_tab) - 1, val);
+			*cnr = snr * 0xFFFF / stv090x_s1cn_tab[ARRAY_SIZE(stv090x_s1cn_tab) - 1].real;
 		}
 		break;
 	default:

  reply	other threads:[~2009-05-22 20:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 17:32 [linux-dvb] Most stable DVB-S2 PCI Card? Niels Wagenaar
2009-05-22 17:48 ` Manu Abraham
2009-05-22 19:42   ` Goga777
2009-05-22 20:25     ` Manu Abraham [this message]
     [not found]       ` <4A171985.3090205@gmail.com>
2009-05-22 21:38         ` Manu Abraham
2009-05-23  5:51           ` David Lister
2009-05-23  6:37             ` Manu Abraham
2009-05-23 10:03               ` David Lister
2009-05-23 10:39                 ` Manu Abraham
2009-05-23 13:30                   ` David Lister
     [not found]                   ` <4A17F4E9.7090503@gmail.com>
2009-05-23 13:39                     ` Manu Abraham
2009-05-23 16:01                 ` Andreas Regel
2009-05-23 18:16                   ` David Lister
2009-05-23 18:45                     ` Manu Abraham
2009-05-23 20:30                       ` David Lister
2009-05-24  6:45                         ` VDR User
2009-05-25  2:36             ` Re : " Manu
2009-05-25  5:32               ` David Lister
  -- strict thread matches above, loose matches on Subject: below --
2009-05-22 18:02 Niels Wagenaar
2009-05-22 18:12 ` Manu Abraham
2009-05-22 17:23 Bob Ingraham
2009-05-22 17:28 ` [linux-dvb] " Another Sillyname
2009-05-22 17:35 ` Manu Abraham
2009-11-13  1:17   ` Jonas Kvinge
2009-11-13  9:43     ` rulet1
2009-11-13 18:02     ` Magnus Hörlin
2009-11-13 20:11       ` Jonas Kvinge
2009-11-13 20:28         ` hermann pitton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a297b360905221325r46432d02g8a97b1361e7958ac@mail.gmail.com \
    --to=abraham.manu@gmail.com \
    --cc=goga777@bk.ru \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.