From patchwork Fri May 22 20:25:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manu Abraham X-Patchwork-Id: 25457 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4MKQ5t0015275 for ; Fri, 22 May 2009 20:26:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753102AbZEVU0A (ORCPT ); Fri, 22 May 2009 16:26:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756880AbZEVU0A (ORCPT ); Fri, 22 May 2009 16:26:00 -0400 Received: from mail-fx0-f168.google.com ([209.85.220.168]:63802 "EHLO mail-fx0-f168.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753102AbZEVUZ7 (ORCPT ); Fri, 22 May 2009 16:25:59 -0400 X-Greylist: delayed 8032 seconds by postgrey-1.27 at vger.kernel.org; Fri, 22 May 2009 16:25:58 EDT Received: by fxm12 with SMTP id 12so87580fxm.37 for ; Fri, 22 May 2009 13:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=amIwHGd5b+e5h9xhTbbNpTJ1SPHcedqU7IZBj2B2rWU=; b=Ifl2bgdfjrErBYQ71/Pdq10zfPaylL8D9hC4IaU5BodSedcv1IiQS1PR431vtAAMu3 gKMRZm6jgQ+EtC8l72IW1W0jLbpPB8JXEOkg0gCJx645AtiGieN4/b/9ZqEVhf7S85Ef VNMnqsDlaRGx/3q/vqDlJ2G9BkWlCsD/yTnCw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=X62y8dPw+ANWcqL9zlgni5SgwiIyipiY8Fk4iIPGYK8h4RWKqhvM+hCMx+AI6fP8ph /ijyZjqGyvlMpSZvILwMOe+KVHmaVVorIvMk13sFg5ZUeA3ruP0/STFFmMkgwGx60yRt +11ap2pyXVeUbbk5XXYkpWTLXPNlcJ89R6xfE= MIME-Version: 1.0 Received: by 10.223.108.196 with SMTP id g4mr2585843fap.36.1243023959686; Fri, 22 May 2009 13:25:59 -0700 (PDT) In-Reply-To: <20090522234201.4ee5cf47@bk.ru> References: <53876.82.95.219.165.1243013567.squirrel@webmail.xs4all.nl> <1a297b360905221048p5a7c548anbdef992b5a1a697d@mail.gmail.com> <20090522234201.4ee5cf47@bk.ru> Date: Sat, 23 May 2009 00:25:59 +0400 Message-ID: <1a297b360905221325r46432d02g8a97b1361e7958ac@mail.gmail.com> Subject: Re: [linux-dvb] Most stable DVB-S2 PCI Card? From: Manu Abraham To: Goga777 Cc: linux-media@vger.kernel.org Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Fri, May 22, 2009 at 11:42 PM, Goga777 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. 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: