[PATCH 4/9] [media] dvb-frontends/stv0910: Fix signal strength reporting

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

 



Daniel Scheller writes:
 > From: Daniel Scheller <d.scheller@xxxxxxx>
 > 
 > Original code at least has some signed/unsigned issues, resulting in
 > values like 32dBm.

I will look into that.

 > Change signal strength readout to work without asking
 > the attached tuner, and use a lookup table instead of log calc. Values

How can you determine the exact strength without knowing what the tuner did?
At least the stv6111 does its own AGC which has to be added.


 > +struct SLookup padc_lookup[] = {
 > +	{    0,  118000 }, /* PADC=+0dBm  */
 > +	{ -100,  93600  }, /* PADC=-1dBm  */
 > +	{ -200,  74500  }, /* PADC=-2dBm  */
 > +	{ -300,  59100  }, /* PADC=-3dBm  */
 > +	{ -400,  47000  }, /* PADC=-4dBm  */
 > +	{ -500,  37300  }, /* PADC=-5dBm  */
 > +	{ -600,  29650  }, /* PADC=-6dBm  */
 > +	{ -700,  23520  }, /* PADC=-7dBm  */
 > +	{ -900,  14850  }, /* PADC=-9dBm  */
 > +	{ -1100, 9380   }, /* PADC=-11dBm */
 > +	{ -1300, 5910   }, /* PADC=-13dBm */
 > +	{ -1500, 3730   }, /* PADC=-15dBm */
 > +	{ -1700, 2354   }, /* PADC=-17dBm */
 > +	{ -1900, 1485   }, /* PADC=-19dBm */
 > +	{ -2000, 1179   }, /* PADC=-20dBm */
 > +	{ -2100, 1000   }, /* PADC=-21dBm */
 > +};
 ...
 > -	if (bbgain < (s32) *strength)
 > -		*strength -= bbgain;
 > -	else
 > -		*strength = 0;
 > +	padc = TableLookup(padc_lookup, ARRAY_SIZE(padc_lookup), Power) + 352;
 >  


Where does the padc_lookup table come from?
I saw it before in CrazyCat github tree.
Is he or you the original source/author or somebody else?


Regards,
Ralph



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux