by updatelee » Mon Aug 19, 2013 5:35 am
personally I think the whole % thing is one of the stupidest things Ive ever seen in the v4l tree. Such a royally asinine thing I cant fathom why they took an industry standard and destroyed it to the point its completely useless now. I intend to bring it up with the v4l mailing list just havent had time.
V4L way is take the current_db / (max_db - min_db) = register, register / 65535 = %, any relevent info is now lost, and a completely useless value is returned.
To keep the number semi relevent between old code and mine I chose
current_db * 10 * 256 = register,
register / 10 / 256 = db
register / 65535 = %
10.2db * 10 * 256 = 26112
26112 / 10 / 256 = 10.2db
26112 / 65535 = 40%
The other thing Ive considered doing is
65535 * (10.2db / 100) = 6684
6684 / 65535 * 100 = 10.2db
6684 / 65535 = 10.2%
So the userland apps not changed would at first glance apear to have terrible signal quality but would actually be displaying db.
The big problem is linus has stated very clearly that kernel changes can NOT break userland applications, even if the original decision to use % was stupid, he thinks we should be stuck with it till an API change happens, dvb APIv6 maybe? who knows.
UDL
TBS6925/5980, Prof 7301/7500/8000, Genpix Skywalker-1, Skystar 2 Express HD
Hauppauge 950Q, Kworld 330U/435v3/445v3
Dreambox 800
I use Linux and support open source projects.