Patch 28 / 50: code cleanup for lgdt330x

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



#Applies against: 2.6.17
#Signed-off-by: Uwe Bugla <uwe.bugla@xxxxxx>
#Changes: fix type and / or tab errors, extracts documentary parts out of the module and transforms them into a documentary text file
--- a/drivers/media/dvb/frontends/lgdt330x.c	2006-05-27 14:03:00
+++ b/drivers/media/dvb/frontends/lgdt330x.c	2006-05-28 13:08:00
@@ -16,34 +16,16 @@
  *    You should have received a copy of the GNU General Public License
  *    along with this program; if not, write to the Free Software
  *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
  */
 
-/*
- *                      NOTES ABOUT THIS DRIVER
- *
- * This Linux driver supports:
- *   DViCO FusionHDTV 3 Gold-Q
- *   DViCO FusionHDTV 3 Gold-T
- *   DViCO FusionHDTV 5 Gold
- *   DViCO FusionHDTV 5 Lite
- *   DViCO FusionHDTV 5 USB Gold
- *   Air2PC/AirStar 2 ATSC 3rd generation (HD5000)
- *
- * TODO:
- * signal strength always returns 0.
- *
- */
-
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/string.h>
 #include <linux/slab.h>
 #include <asm/byteorder.h>
-
 #include "dvb_frontend.h"
 #include "lgdt330x_priv.h"
 #include "lgdt330x.h"
@@ -551,37 +533,6 @@
 static int lgdt3302_read_snr(struct dvb_frontend* fe, u16* snr)
 {
 #ifdef SNR_IN_DB
-	/*
-	 * Spec sheet shows formula for SNR_EQ = 10 log10(25 * 24**2 / noise)
-	 * and SNR_PH = 10 log10(25 * 32**2 / noise) for equalizer and phase tracker
-	 * respectively. The following tables are built on these formulas.
-	 * The usual definition is SNR = 20 log10(signal/noise)
-	 * If the specification is wrong the value retuned is 1/2 the actual SNR in db.
-	 *
-	 * This table is a an ordered list of noise values computed by the
-	 * formula from the spec sheet such that the index into the table
-	 * starting at 43 or 45 is the SNR value in db. There are duplicate noise
-	 * value entries at the beginning because the SNR varies more than
-	 * 1 db for a change of 1 digit in noise at very small values of noise.
-	 *
-	 * Examples from SNR_EQ table:
-	 * noise SNR
-	 *   0    43
-	 *   1    42
-	 *   2    39
-	 *   3    37
-	 *   4    36
-	 *   5    35
-	 *   6    34
-	 *   7    33
-	 *   8    33
-	 *   9    32
-	 *   10   32
-	 *   11   31
-	 *   12   31
-	 *   13   30
-	 */
-
 	static const u32 SNR_EQ[] =
 		{ 1,     2,      2,      2, 3,      3,      4,     4,     5,     7,
 		  9,     11,     13,     17, 21,     26,     33,    41,    52,    65,
@@ -743,8 +694,7 @@
 	state->frontend.ops = &state->ops;
 	state->frontend.demodulator_priv = state;
 	return &state->frontend;
-
-error:
+ error:
 	kfree(state);
 	dprintk("%s: ERROR\n",__FUNCTION__);
 	return NULL;
@@ -799,11 +749,4 @@
 MODULE_DESCRIPTION("LGDT330X (ATSC 8VSB & ITU-T J.83 AnnexB 64/256 QAM) Demodulator Driver");
 MODULE_AUTHOR("Wilson Michaels");
 MODULE_LICENSE("GPL");
-
 EXPORT_SYMBOL(lgdt330x_attach);
-
-/*
- * Local variables:
- * c-basic-offset: 8
- * End:
- */
--- a/dev/null				2006-05-27 14:03:00
+++ b/Documentation/dvb/lgdt330x.txt	2006-05-28 13:27:00
@@ -0,0 +1,39 @@
+Driver for LGDT3302 and LGDT3303 - VSB/QAM, supporting the following cards:
+
+DViCO FusionHDTV 3 Gold-Q
+DViCO FusionHDTV 3 Gold-T
+DViCO FusionHDTV 5 Gold
+DViCO FusionHDTV 5 Lite
+DViCO FusionHDTV 5 USB Gold
+Air2PC/AirStar 2 ATSC 3rd generation (HD5000)
+
+TODO:
+signal strength always returns 0.
+
+Spec sheet shows formula for SNR_EQ = 10 log10(25 * 24**2 / noise)
+and SNR_PH = 10 log10(25 * 32**2 / noise) for equalizer and phase tracker
+respectively. The following tables are built on these formulas.
+The usual definition is SNR = 20 log10(signal/noise)
+If the specification is wrong the value retuned is 1/2 the actual SNR in db.
+This table is a an ordered list of noise values computed by the
+formula from the spec sheet such that the index into the table
+starting at 43 or 45 is the SNR value in db. There are duplicate noise
+value entries at the beginning because the SNR varies more than
+1 db for a change of 1 digit in noise at very small values of noise.
+
+Examples from SNR_EQ table:
+noise SNR
+0    43
+1    42
+2    39
+3    37
+4    36
+5    35
+6    34
+7    33
+8    33
+9    32
+10   32
+11   31
+12   31
+13   30

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux