On 07-12-2011 17:31, Gianluca Gennari wrote:
thanks a lot for the detailed explanation, but it is not needed anymore. I think I got it: reading the comments in the code and in particular a couple of weird "hacks", I think I figured out what is going on. I have prepared a patch that fixes center frequency adjustment: basically, this let us get rid of this weird code: if ((priv->cur_fw.type& DTV78)&& freq< 470000000) offset -= 500000; which assumes all channels below 470000000 have 7MHz bw. Also we can get rid of this adjustment that seems to come out of nowhere: if (priv->cur_fw.type& DTV7) offset += 500000; Maybe those hacks where necessary for old firmwares, but the updated ones (a comment mentions updates SCODE tables, whatever this means) seems to use the same center frequency value for all bandwidths and all firmwares (well, at least DTV7, DTV8 and DTV78; we will never know about DTV6).
Old firmwares behave like newer ones, AFAIK. DTV78 is there since at least firmware v2.2.
I tested this patch with all firmwares: DTV7 -> OK in VHF band DTV8 -> OK in UHF band DTV78 -> OK in both VHF and UHF Please note also that the patch is not changing anything for DTV7 and DTV8 firmwares. The only thing really affected is the center frequency calculation for DTV78 firmware in VHF band. What do you think about it?
It makes sense. The offset adjustment should be done based on the bandwidth and if the firmware is either DTV78 or DTV7/DTV8, and not based on the frequency.
By the way, DVB-T tables from dvb-apps are really outdated, and anyway they are completely useless in Italy. Here we have a jungle of frequencies (about 50 in my area), which are appearing/disappearing/changing some modulation parameter almost every day, and also if you move a few km away you will probably get some different ones. So no table will be ever up-to-date, and even if it is, it will be only useful to the person who created it. Maybe in a year or two the situation will stabilize (after the switch-off is completed everywhere), but until then it's a mess.
It would be nice to at least fix the auto-italy table, in order for it to match whatever Italy channel frequencies are in use, currently.
Best regards, Gianluca
Regards, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html